janet_abstract_begin:
 1366|  4.09M|void *janet_abstract_begin(const JanetAbstractType *atype, size_t size) {
 1367|  4.09M|    JanetAbstractHead *header = janet_gcalloc(JANET_MEMORY_NONE,
 1368|  4.09M|        sizeof(JanetAbstractHead) + size);
 1369|  4.09M|    header->size = size;
 1370|  4.09M|    header->type = atype;
 1371|  4.09M|    return (void *) & (header->data);
 1372|  4.09M|}
janet_abstract_end:
 1374|  4.09M|void *janet_abstract_end(void *x) {
 1375|  4.09M|    janet_gc_settype((void *)(janet_abstract_head(x)), JANET_MEMORY_ABSTRACT);
  ------------------
  |  |  656|  4.09M|#define janet_gc_settype(m, t) ((janet_gc_header(m)->flags |= (0xFF & (t))))
  |  |  ------------------
  |  |  |  |  650|  4.09M|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
 1376|  4.09M|    return x;
 1377|  4.09M|}
janet_abstract:
 1379|  4.09M|void *janet_abstract(const JanetAbstractType *atype, size_t size) {
 1380|  4.09M|    return janet_abstract_end(janet_abstract_begin(atype, size));
 1381|  4.09M|}
janet_abstract_begin_threaded:
 1389|   347k|void *janet_abstract_begin_threaded(const JanetAbstractType *atype, size_t size) {
 1390|   347k|    JanetAbstractHead *header = janet_malloc(sizeof(JanetAbstractHead) + size);
  ------------------
  |  | 2406|   347k|#define janet_malloc(X) malloc((X))
  ------------------
 1391|   347k|    if (NULL == header) {
  ------------------
  |  Branch (1391:9): [True: 0, False: 347k]
  ------------------
 1392|      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]
  |  |  ------------------
  ------------------
 1393|      0|    }
 1394|   347k|    janet_vm.next_collection += size + sizeof(JanetAbstractHead);
 1395|   347k|    header->gc.flags = JANET_MEMORY_THREADED_ABSTRACT;
 1396|   347k|    header->gc.data.next = NULL; /* Clear memory for address sanitizers */
 1397|   347k|    header->gc.data.refcount = 1;
 1398|   347k|    header->size = size;
 1399|   347k|    header->type = atype;
 1400|   347k|    void *abstract = (void *) & (header->data);
 1401|   347k|    janet_table_put(&janet_vm.threaded_abstracts, janet_wrap_abstract(abstract), janet_wrap_false());
  ------------------
  |  |  851|   347k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|   347k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   347k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   347k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_table_put(&janet_vm.threaded_abstracts, janet_wrap_abstract(abstract), janet_wrap_false());
  ------------------
  |  |  833|   347k|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|   347k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   347k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   347k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1402|   347k|    return abstract;
 1403|   347k|}
janet_abstract_end_threaded:
 1405|   347k|void *janet_abstract_end_threaded(void *x) {
 1406|   347k|    janet_gc_settype((void *)(janet_abstract_head(x)), JANET_MEMORY_THREADED_ABSTRACT);
  ------------------
  |  |  656|   347k|#define janet_gc_settype(m, t) ((janet_gc_header(m)->flags |= (0xFF & (t))))
  |  |  ------------------
  |  |  |  |  650|   347k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
 1407|   347k|    return x;
 1408|   347k|}
janet_abstract_threaded:
 1410|   347k|void *janet_abstract_threaded(const JanetAbstractType *atype, size_t size) {
 1411|   347k|    return janet_abstract_end_threaded(janet_abstract_begin_threaded(atype, size));
 1412|   347k|}
janet_os_mutex_size:
 1470|     37|size_t janet_os_mutex_size(void) {
 1471|     37|    return sizeof(pthread_mutex_t);
 1472|     37|}
janet_os_rwlock_size:
 1474|    316|size_t janet_os_rwlock_size(void) {
 1475|    316|    return sizeof(pthread_rwlock_t);
 1476|    316|}
janet_os_mutex_init:
 1478|    512|void janet_os_mutex_init(JanetOSMutex *mutex) {
 1479|    512|    pthread_mutexattr_t attr;
 1480|    512|    pthread_mutexattr_init(&attr);
 1481|    512|    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
 1482|    512|    pthread_mutex_init((pthread_mutex_t *) mutex, &attr);
 1483|    512|}
janet_os_mutex_deinit:
 1485|    512|void janet_os_mutex_deinit(JanetOSMutex *mutex) {
 1486|    512|    pthread_mutex_destroy((pthread_mutex_t *) mutex);
 1487|    512|}
janet_os_mutex_lock:
 1489|     10|void janet_os_mutex_lock(JanetOSMutex *mutex) {
 1490|     10|    pthread_mutex_lock((pthread_mutex_t *) mutex);
 1491|     10|}
janet_os_mutex_unlock:
 1493|     10|void janet_os_mutex_unlock(JanetOSMutex *mutex) {
 1494|     10|    int ret = pthread_mutex_unlock((pthread_mutex_t *) mutex);
 1495|     10|    if (ret) janet_panic("cannot release lock");
  ------------------
  |  Branch (1495:9): [True: 0, False: 10]
  ------------------
 1496|     10|}
janet_os_rwlock_init:
 1498|    316|void janet_os_rwlock_init(JanetOSRWLock *rwlock) {
 1499|       |    pthread_rwlock_init((pthread_rwlock_t *) rwlock, NULL);
 1500|    316|}
janet_os_rwlock_deinit:
 1502|    316|void janet_os_rwlock_deinit(JanetOSRWLock *rwlock) {
 1503|    316|    pthread_rwlock_destroy((pthread_rwlock_t *) rwlock);
 1504|    316|}
janet_abstract_decref:
 1528|   347k|int32_t janet_abstract_decref(void *abst) {
 1529|       |    return janet_atomic_dec(&janet_abstract_head(abst)->gc.data.refcount);
  ------------------
  |  | 1897|   347k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
 1530|   347k|}
janet_abstract_decref_maybe_free:
 1532|   347k|int32_t janet_abstract_decref_maybe_free(void *abst) {
 1533|   347k|    int32_t result = janet_abstract_decref(abst);
 1534|   347k|    if (0 == result) {
  ------------------
  |  Branch (1534:9): [True: 347k, False: 0]
  ------------------
 1535|   347k|        JanetAbstractHead *head = janet_abstract_head(abst);
  ------------------
  |  | 1897|   347k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
 1536|   347k|        if (head->type->gc) {
  ------------------
  |  Branch (1536:13): [True: 347k, False: 0]
  ------------------
 1537|   347k|            janet_assert(!head->type->gc(head->data, head->size), "finalizer failed");
  ------------------
  |  |  389|   347k|#define janet_assert(c, m) do { \
  |  |  390|   347k|    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: 347k]
  |  |  ------------------
  |  |  391|   347k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 347k]
  |  |  ------------------
  ------------------
 1538|   347k|        }
 1539|       |        /* Free memory */
 1540|   347k|        janet_free(head);
  ------------------
  |  | 2415|   347k|#define janet_free(X) free((X))
  ------------------
 1541|   347k|    }
 1542|   347k|    return result;
 1543|   347k|}
janet_array:
 1604|   654k|JanetArray *janet_array(int32_t capacity) {
 1605|   654k|    JanetArray *array = janet_gcalloc(JANET_MEMORY_ARRAY, sizeof(JanetArray));
 1606|   654k|    janet_array_impl(array, capacity);
 1607|   654k|    return array;
 1608|   654k|}
janet_array_weak:
 1611|  1.07M|JanetArray *janet_array_weak(int32_t capacity) {
 1612|  1.07M|    JanetArray *array = janet_gcalloc(JANET_MEMORY_ARRAY_WEAK, sizeof(JanetArray));
 1613|  1.07M|    janet_array_impl(array, capacity);
 1614|  1.07M|    return array;
 1615|  1.07M|}
janet_array_n:
 1618|  13.9M|JanetArray *janet_array_n(const Janet *elements, int32_t n) {
 1619|  13.9M|    JanetArray *array = janet_gcalloc(JANET_MEMORY_ARRAY, sizeof(JanetArray));
 1620|  13.9M|    array->capacity = n;
 1621|  13.9M|    array->count = n;
 1622|  13.9M|    array->data = array_allocate(sizeof(Janet), (size_t) n);
 1623|  13.9M|    if (!array->data) {
  ------------------
  |  Branch (1623:9): [True: 0, False: 13.9M]
  ------------------
 1624|      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]
  |  |  ------------------
  ------------------
 1625|      0|    }
 1626|  13.9M|    safe_memcpy(array->data, elements, sizeof(Janet) * n);
 1627|  13.9M|    return array;
 1628|  13.9M|}
janet_array_ensure:
 1631|  37.7M|void janet_array_ensure(JanetArray *array, int32_t capacity, int32_t growth) {
 1632|  37.7M|    Janet *newData;
 1633|  37.7M|    Janet *old = array->data;
 1634|  37.7M|    if (capacity <= array->capacity) return;
  ------------------
  |  Branch (1634:9): [True: 29.1M, False: 8.52M]
  ------------------
 1635|  8.52M|    int64_t new_capacity = ((int64_t) capacity) * growth;
 1636|  8.52M|    if (new_capacity > MAX_ARRAY_CAPACITY) new_capacity = MAX_ARRAY_CAPACITY;
  ------------------
  |  | 1584|  8.52M|#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: 8.52M]
  ------------------
 1637|  8.52M|    capacity = (int32_t) new_capacity;
 1638|  8.52M|    newData = janet_realloc(old, capacity * sizeof(Janet));
  ------------------
  |  | 2409|  8.52M|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 1639|  8.52M|    if (NULL == newData) {
  ------------------
  |  Branch (1639:9): [True: 0, False: 8.52M]
  ------------------
 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|  8.52M|    janet_vm.next_collection += (capacity - array->capacity) * sizeof(Janet);
 1643|  8.52M|    array->data = newData;
 1644|  8.52M|    array->capacity = capacity;
 1645|  8.52M|}
janet_array_push:
 1662|   295k|void janet_array_push(JanetArray *array, Janet x) {
 1663|   295k|    if (array->count == MAX_ARRAY_CAPACITY) {
  ------------------
  |  | 1584|   295k|#define MAX_ARRAY_CAPACITY INT32_MAX
  ------------------
  |  Branch (1663:9): [True: 0, False: 295k]
  ------------------
 1664|      0|        janet_panic("array overflow");
 1665|      0|    }
 1666|   295k|    int32_t newcount = array->count + 1;
 1667|   295k|    janet_array_ensure(array, newcount, 2);
 1668|   295k|    array->data[array->count] = x;
 1669|   295k|    array->count = newcount;
 1670|   295k|}
janet_array_pop:
 1673|   316k|Janet janet_array_pop(JanetArray *array) {
 1674|   316k|    if (array->count) {
  ------------------
  |  Branch (1674:9): [True: 316k, False: 0]
  ------------------
 1675|   316k|        return array->data[--array->count];
 1676|   316k|    } else {
 1677|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1678|      0|    }
 1679|   316k|}
cfun_array_new:
 1696|    565|              "the maximum size is known.") {
 1697|    565|    janet_fixarity(argc, 1);
 1698|    565|    int32_t cap = janet_getinteger(argv, 0);
 1699|    565|    JanetArray *array = janet_array(cap);
 1700|    565|    return janet_wrap_array(array);
  ------------------
  |  |  845|    565|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|    565|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    565|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    565|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1701|    565|}
cfun_array_weak:
 1707|     46|              "`array/new`.") {
 1708|     46|    janet_fixarity(argc, 1);
 1709|     46|    int32_t cap = janet_getinteger(argv, 0);
 1710|     46|    JanetArray *array = janet_array_weak(cap);
 1711|     46|    return janet_wrap_array(array);
  ------------------
  |  |  845|     46|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|     46|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     46|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     46|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1712|     46|}
cfun_array_new_filled:
 1717|   330k|              "`val`, which defaults to nil.") {
 1718|   330k|    janet_arity(argc, 1, 2);
 1719|   330k|    int32_t count = janet_getnat(argv, 0);
 1720|   330k|    Janet x = (argc == 2) ? argv[1] : janet_wrap_nil();
  ------------------
  |  |  831|   328k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   328k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   328k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   328k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1720:15): [True: 1.97k, False: 328k]
  ------------------
 1721|   330k|    JanetArray *array = janet_array(count);
 1722|  4.27M|    for (int32_t i = 0; i < count; i++) {
  ------------------
  |  Branch (1722:25): [True: 3.93M, False: 330k]
  ------------------
 1723|  3.93M|        array->data[i] = x;
 1724|  3.93M|    }
 1725|   330k|    array->count = count;
 1726|   330k|    return janet_wrap_array(array);
  ------------------
  |  |  845|   330k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|   330k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   330k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   330k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1727|   330k|}
cfun_array_fill:
 1733|     51|              "Returns `arr`.") {
 1734|     51|    janet_arity(argc, 1, 2);
 1735|     51|    JanetArray *array = janet_getarray(argv, 0);
 1736|     51|    Janet x = (argc == 2) ? argv[1] : janet_wrap_nil();
  ------------------
  |  |  831|     51|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     51|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     51|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     51|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1736:15): [True: 0, False: 51]
  ------------------
 1737|    511|    for (int32_t i = 0; i < array->count; i++) {
  ------------------
  |  Branch (1737:25): [True: 460, False: 51]
  ------------------
 1738|    460|        array->data[i] = x;
 1739|    460|    }
 1740|     51|    return argv[0];
 1741|     51|}
cfun_array_pop:
 1746|   316k|              "`arr` is empty, returns nil. Modifies `arr`.") {
 1747|   316k|    janet_fixarity(argc, 1);
 1748|   316k|    JanetArray *array = janet_getarray(argv, 0);
 1749|   316k|    return janet_array_pop(array);
 1750|   316k|}
cfun_array_peek:
 1755|      1|              "`arr`.") {
 1756|      1|    janet_fixarity(argc, 1);
 1757|      1|    JanetArray *array = janet_getarray(argv, 0);
 1758|      1|    return janet_array_peek(array);
 1759|      1|}
cfun_array_push:
 1764|  37.4M|              "Returns `arr`.") {
 1765|  37.4M|    janet_arity(argc, 1, -1);
 1766|  37.4M|    JanetArray *array = janet_getarray(argv, 0);
 1767|  37.4M|    if (MAX_ARRAY_CAPACITY - argc + 1 <= array->count) {
  ------------------
  |  | 1584|  37.4M|#define MAX_ARRAY_CAPACITY INT32_MAX
  ------------------
  |  Branch (1767:9): [True: 0, False: 37.4M]
  ------------------
 1768|      0|        janet_panic("array overflow");
 1769|      0|    }
 1770|  37.4M|    int32_t newcount = array->count - 1 + argc;
 1771|  37.4M|    janet_array_ensure(array, newcount, 2);
 1772|  37.4M|    if (argc > 1) memcpy(array->data + array->count, argv + 1, (size_t)(argc - 1) * sizeof(Janet));
  ------------------
  |  Branch (1772:9): [True: 37.4M, False: 3]
  ------------------
 1773|  37.4M|    array->count = newcount;
 1774|  37.4M|    return argv[0];
 1775|  37.4M|}
cfun_array_ensure:
 1784|      2|              "there is enough space. Returns `arr`.") {
 1785|      2|    janet_fixarity(argc, 3);
 1786|      2|    JanetArray *array = janet_getarray(argv, 0);
 1787|      2|    int32_t newcount = janet_getinteger(argv, 1);
 1788|      2|    int32_t growth = janet_getinteger(argv, 2);
 1789|      2|    if (newcount < 1) janet_panic("expected positive integer");
  ------------------
  |  Branch (1789:9): [True: 0, False: 2]
  ------------------
 1790|      2|    if (growth < 1) janet_panic("expected positive integer for growth");
  ------------------
  |  Branch (1790:9): [True: 0, False: 2]
  ------------------
 1791|      2|    janet_array_ensure(array, newcount, growth);
 1792|      2|    return argv[0];
 1793|      2|}
cfun_array_slice:
 1797|  1.09k|              "Same as `tuple/slice`, but returns an array.") {
 1798|  1.09k|    JanetView view = janet_getindexed(argv, 0);
 1799|  1.09k|    JanetRange range = janet_getslice(argc, argv);
 1800|  1.09k|    JanetArray *array = janet_array(range.end - range.start);
 1801|  1.09k|    if (array->data)
  ------------------
  |  Branch (1801:9): [True: 1.07k, False: 20]
  ------------------
 1802|  1.07k|        memcpy(array->data, view.items + range.start, sizeof(Janet) * (range.end - range.start));
 1803|  1.09k|    array->count = range.end - range.start;
 1804|  1.09k|    return janet_wrap_array(array);
  ------------------
  |  |  845|  1.09k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  1.09k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.09k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.09k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1805|  1.09k|}
cfun_array_concat:
 1813|   229k|              "will be appended to `arr` in order. Returns `arr`.") {
 1814|   229k|    int32_t i;
 1815|   229k|    janet_arity(argc, 1, -1);
 1816|   229k|    JanetArray *array = janet_getarray(argv, 0);
 1817|   528k|    for (i = 1; i < argc; i++) {
  ------------------
  |  Branch (1817:17): [True: 298k, False: 229k]
  ------------------
 1818|   298k|        switch (janet_type(argv[i])) {
  ------------------
  |  |  795|   298k|    (isnan((x).number) \
  |  |  796|   298k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   298k|        : JANET_NUMBER)
  ------------------
  |  Branch (1818:17): [True: 298k, False: 0]
  ------------------
 1819|      0|            default:
  ------------------
  |  Branch (1819:13): [True: 0, False: 298k]
  ------------------
 1820|      0|                janet_array_push(array, argv[i]);
 1821|      0|                break;
 1822|   229k|            case JANET_ARRAY:
  ------------------
  |  Branch (1822:13): [True: 229k, False: 68.3k]
  ------------------
 1823|   298k|            case JANET_TUPLE: {
  ------------------
  |  Branch (1823:13): [True: 68.3k, False: 229k]
  ------------------
 1824|   298k|                int32_t j, len = 0;
 1825|   298k|                const Janet *vals = NULL;
 1826|   298k|                janet_indexed_view(argv[i], &vals, &len);
 1827|   298k|                if (array->data == vals) {
  ------------------
  |  Branch (1827:21): [True: 0, False: 298k]
  ------------------
 1828|      0|                    int32_t newcount = array->count + len;
 1829|      0|                    janet_array_ensure(array, newcount, 2);
 1830|      0|                    janet_indexed_view(argv[i], &vals, &len);
 1831|      0|                }
 1832|   457k|                for (j = 0; j < len; j++)
  ------------------
  |  Branch (1832:29): [True: 159k, False: 298k]
  ------------------
 1833|   159k|                    janet_array_push(array, vals[j]);
 1834|   298k|            }
 1835|   298k|            break;
 1836|   298k|        }
 1837|   298k|    }
 1838|   229k|    return janet_wrap_array(array);
  ------------------
  |  |  845|   229k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|   229k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   229k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   229k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1839|   229k|}
cfun_array_insert:
 1872|      1|              "to `arr`. Returns `arr`.") {
 1873|      1|    size_t chunksize, restsize;
 1874|      1|    janet_arity(argc, 2, -1);
 1875|      1|    JanetArray *array = janet_getarray(argv, 0);
 1876|      1|    int32_t at = janet_getinteger(argv, 1);
 1877|      1|    if (at < 0) {
  ------------------
  |  Branch (1877:9): [True: 0, False: 1]
  ------------------
 1878|      0|        at = array->count + at + 1;
 1879|      0|    }
 1880|      1|    if (at < 0 || at > array->count)
  ------------------
  |  Branch (1880:9): [True: 1, False: 0]
  |  Branch (1880:19): [True: 0, False: 0]
  ------------------
 1881|      0|        janet_panicf("insertion index %d out of range [0,%d]", at, array->count);
 1882|      1|    chunksize = (argc - 2) * sizeof(Janet);
 1883|      1|    restsize = (array->count - at) * sizeof(Janet);
 1884|      1|    if (MAX_ARRAY_CAPACITY - (argc - 2) < array->count) {
  ------------------
  |  | 1584|      1|#define MAX_ARRAY_CAPACITY INT32_MAX
  ------------------
  |  Branch (1884:9): [True: 0, False: 1]
  ------------------
 1885|      0|        janet_panic("array overflow");
 1886|      0|    }
 1887|      1|    janet_array_ensure(array, array->count + argc - 2, 2);
 1888|      1|    if (restsize) {
  ------------------
  |  Branch (1888:9): [True: 0, False: 1]
  ------------------
 1889|      0|        memmove(array->data + at + argc - 2,
 1890|      0|                array->data + at,
 1891|      0|                restsize);
 1892|      0|    }
 1893|      1|    safe_memcpy(array->data + at, argv + 2, chunksize);
 1894|      1|    array->count += (argc - 2);
 1895|      1|    return argv[0];
 1896|      1|}
cfun_array_remove:
 1903|   158k|              "By default `n` is 1. Returns `arr`.") {
 1904|   158k|    janet_arity(argc, 2, 3);
 1905|   158k|    JanetArray *array = janet_getarray(argv, 0);
 1906|   158k|    int32_t at = janet_getinteger(argv, 1);
 1907|   158k|    int32_t n = 1;
 1908|   158k|    if (at < 0) {
  ------------------
  |  Branch (1908:9): [True: 0, False: 158k]
  ------------------
 1909|      0|        at = array->count + at;
 1910|      0|    }
 1911|   158k|    if (at < 0 || at > array->count)
  ------------------
  |  Branch (1911:9): [True: 1, False: 158k]
  |  Branch (1911:19): [True: 0, False: 158k]
  ------------------
 1912|      0|        janet_panicf("removal index %d out of range [0,%d]", at, array->count);
 1913|   158k|    if (argc == 3) {
  ------------------
  |  Branch (1913:9): [True: 158k, False: 1]
  ------------------
 1914|   158k|        n = janet_getinteger(argv, 2);
 1915|   158k|        if (n < 0)
  ------------------
  |  Branch (1915:13): [True: 0, False: 158k]
  ------------------
 1916|      0|            janet_panicf("expected non-negative integer for argument n, got %v", argv[2]);
 1917|   158k|    }
 1918|   158k|    if (n > array->count - at) {
  ------------------
  |  Branch (1918:9): [True: 0, False: 158k]
  ------------------
 1919|      0|        n = array->count - at;
 1920|      0|    }
 1921|   158k|    memmove(array->data + at,
 1922|   158k|            array->data + at + n,
 1923|   158k|            (array->count - at - n) * sizeof(Janet));
 1924|   158k|    array->count -= n;
 1925|   158k|    return argv[0];
 1926|   158k|}
cfun_array_trim:
 1931|      1|              "length. Returns `arr`.") {
 1932|      1|    janet_fixarity(argc, 1);
 1933|      1|    JanetArray *array = janet_getarray(argv, 0);
 1934|      1|    if (array->count) {
  ------------------
  |  Branch (1934:9): [True: 0, False: 1]
  ------------------
 1935|      0|        if (array->count < array->capacity) {
  ------------------
  |  Branch (1935:13): [True: 0, False: 0]
  ------------------
 1936|      0|            Janet *newData = janet_realloc(array->data, array->count * sizeof(Janet));
  ------------------
  |  | 2409|      0|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 1937|      0|            if (NULL == newData) {
  ------------------
  |  Branch (1937:17): [True: 0, False: 0]
  ------------------
 1938|      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]
  |  |  ------------------
  ------------------
 1939|      0|            }
 1940|      0|            array->data = newData;
 1941|      0|            array->capacity = array->count;
 1942|      0|        }
 1943|      1|    } else {
 1944|      1|        array->capacity = 0;
 1945|      1|        janet_free(array->data);
  ------------------
  |  | 2415|      1|#define janet_free(X) free((X))
  ------------------
 1946|      1|        array->data = NULL;
 1947|      1|    }
 1948|      1|    return argv[0];
 1949|      1|}
janet_lib_array:
 1962|  8.33k|void janet_lib_array(JanetTable *env) {
 1963|  8.33k|    JanetRegExt array_cfuns[] = {
 1964|  8.33k|        JANET_CORE_REG("array/new", cfun_array_new),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1965|  8.33k|        JANET_CORE_REG("array/weak", cfun_array_weak),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1966|  8.33k|        JANET_CORE_REG("array/new-filled", cfun_array_new_filled),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1967|  8.33k|        JANET_CORE_REG("array/fill", cfun_array_fill),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1968|  8.33k|        JANET_CORE_REG("array/pop", cfun_array_pop),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1969|  8.33k|        JANET_CORE_REG("array/peek", cfun_array_peek),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1970|  8.33k|        JANET_CORE_REG("array/push", cfun_array_push),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1971|  8.33k|        JANET_CORE_REG("array/ensure", cfun_array_ensure),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1972|  8.33k|        JANET_CORE_REG("array/slice", cfun_array_slice),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1973|  8.33k|        JANET_CORE_REG("array/concat", cfun_array_concat),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1974|  8.33k|        JANET_CORE_REG("array/insert", cfun_array_insert),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1975|  8.33k|        JANET_CORE_REG("array/remove", cfun_array_remove),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1976|  8.33k|        JANET_CORE_REG("array/trim", cfun_array_trim),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1977|  8.33k|        JANET_CORE_REG("array/clear", cfun_array_clear),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1978|  8.33k|        JANET_CORE_REG("array/join", cfun_array_join),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1979|  8.33k|        JANET_REG_END
  ------------------
  |  | 2110|  8.33k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 1980|  8.33k|    };
 1981|       |    janet_core_cfuns_ext(env, NULL, array_cfuns);
 1982|  8.33k|}
janet_lib_asm:
 3136|  8.33k|void janet_lib_asm(JanetTable *env) {
 3137|  8.33k|    JanetRegExt asm_cfuns[] = {
 3138|  8.33k|        JANET_CORE_REG("asm", cfun_asm),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3139|  8.33k|        JANET_CORE_REG("disasm", cfun_disasm),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3140|  8.33k|        JANET_REG_END
  ------------------
  |  | 2110|  8.33k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 3141|  8.33k|    };
 3142|       |    janet_core_cfuns_ext(env, NULL, asm_cfuns);
 3143|  8.33k|}
janet_buffer_init:
 3204|  9.84M|JanetBuffer *janet_buffer_init(JanetBuffer *buffer, int32_t capacity) {
 3205|  9.84M|    janet_buffer_init_impl(buffer, capacity);
 3206|  9.84M|    buffer->gc.data.next = NULL;
 3207|  9.84M|    buffer->gc.flags = JANET_MEM_DISABLED;
  ------------------
  |  |  654|  9.84M|#define JANET_MEM_DISABLED 0x200
  ------------------
 3208|  9.84M|    return buffer;
 3209|  9.84M|}
janet_buffer_deinit:
 3224|  23.2M|void janet_buffer_deinit(JanetBuffer *buffer) {
 3225|  23.2M|    if (!(buffer->gc.flags & JANET_BUFFER_FLAG_NO_REALLOC)) {
  ------------------
  |  | 1780|  23.2M|#define JANET_BUFFER_FLAG_NO_REALLOC 0x10000
  ------------------
  |  Branch (3225:9): [True: 23.2M, False: 0]
  ------------------
 3226|  23.2M|        janet_free(buffer->data);
  ------------------
  |  | 2415|  23.2M|#define janet_free(X) free((X))
  ------------------
 3227|       |        buffer->data = NULL;
 3228|  23.2M|    }
 3229|  23.2M|}
janet_buffer:
 3232|  13.4M|JanetBuffer *janet_buffer(int32_t capacity) {
 3233|  13.4M|    JanetBuffer *buffer = janet_gcalloc(JANET_MEMORY_BUFFER, sizeof(JanetBuffer));
 3234|  13.4M|    return janet_buffer_init_impl(buffer, capacity);
 3235|  13.4M|}
janet_buffer_ensure:
 3238|    286|void janet_buffer_ensure(JanetBuffer *buffer, int32_t capacity, int32_t growth) {
 3239|    286|    uint8_t *new_data;
 3240|    286|    uint8_t *old = buffer->data;
 3241|    286|    if (capacity <= buffer->capacity) return;
  ------------------
  |  Branch (3241:9): [True: 267, False: 19]
  ------------------
 3242|     19|    janet_buffer_can_realloc(buffer);
 3243|     19|    int64_t big_capacity = ((int64_t) capacity) * growth;
 3244|     19|    capacity = big_capacity > INT32_MAX ? INT32_MAX : (int32_t) big_capacity;
  ------------------
  |  Branch (3244:16): [True: 0, False: 19]
  ------------------
 3245|     19|    janet_gcpressure(capacity - buffer->capacity);
 3246|     19|    new_data = janet_realloc(old, (size_t) capacity * sizeof(uint8_t));
  ------------------
  |  | 2409|     19|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 3247|     19|    if (NULL == new_data) {
  ------------------
  |  Branch (3247:9): [True: 0, False: 19]
  ------------------
 3248|      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]
  |  |  ------------------
  ------------------
 3249|      0|    }
 3250|     19|    buffer->data = new_data;
 3251|     19|    buffer->capacity = capacity;
 3252|     19|}
janet_buffer_setcount:
 3255|     36|void janet_buffer_setcount(JanetBuffer *buffer, int32_t count) {
 3256|     36|    if (count < 0)
  ------------------
  |  Branch (3256:9): [True: 0, False: 36]
  ------------------
 3257|      0|        return;
 3258|     36|    if (count > buffer->count) {
  ------------------
  |  Branch (3258:9): [True: 14, False: 22]
  ------------------
 3259|     14|        int32_t oldcount = buffer->count;
 3260|     14|        janet_buffer_ensure(buffer, count, 1);
 3261|     14|        memset(buffer->data + oldcount, 0, count - oldcount);
 3262|     14|    }
 3263|     36|    buffer->count = count;
 3264|     36|}
janet_buffer_extra:
 3268|   414M|void janet_buffer_extra(JanetBuffer *buffer, int32_t n) {
 3269|       |    /* Check for buffer overflow */
 3270|   414M|    if ((int64_t)n + buffer->count > INT32_MAX) {
  ------------------
  |  Branch (3270:9): [True: 0, False: 414M]
  ------------------
 3271|      0|        janet_panic("buffer overflow");
 3272|      0|    }
 3273|   414M|    int32_t new_size = buffer->count + n;
 3274|   414M|    if (new_size > buffer->capacity) {
  ------------------
  |  Branch (3274:9): [True: 17.2M, False: 397M]
  ------------------
 3275|  17.2M|        janet_buffer_can_realloc(buffer);
 3276|  17.2M|        int32_t new_capacity = (new_size > (INT32_MAX / 2)) ? INT32_MAX : (new_size * 2);
  ------------------
  |  Branch (3276:32): [True: 0, False: 17.2M]
  ------------------
 3277|  17.2M|        uint8_t *new_data = janet_realloc(buffer->data, new_capacity * sizeof(uint8_t));
  ------------------
  |  | 2409|  17.2M|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 3278|  17.2M|        janet_gcpressure(new_capacity - buffer->capacity);
 3279|  17.2M|        if (NULL == new_data) {
  ------------------
  |  Branch (3279:13): [True: 0, False: 17.2M]
  ------------------
 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|  17.2M|        buffer->data = new_data;
 3283|  17.2M|        buffer->capacity = new_capacity;
 3284|  17.2M|    }
 3285|   414M|}
janet_buffer_push_cstring:
 3288|  5.39M|void janet_buffer_push_cstring(JanetBuffer *buffer, const char *cstring) {
 3289|  5.39M|    int32_t len = (int32_t) strlen(cstring);
 3290|  5.39M|    janet_buffer_push_bytes(buffer, (const uint8_t *) cstring, len);
 3291|  5.39M|}
janet_buffer_push_bytes:
 3294|  83.2M|void janet_buffer_push_bytes(JanetBuffer *buffer, const uint8_t *string, int32_t length) {
 3295|  83.2M|    if (0 == length) return;
  ------------------
  |  Branch (3295:9): [True: 3.29M, False: 79.9M]
  ------------------
 3296|  79.9M|    janet_buffer_extra(buffer, length);
 3297|  79.9M|    memcpy(buffer->data + buffer->count, string, length);
 3298|  79.9M|    buffer->count += length;
 3299|  79.9M|}
janet_buffer_push_u8:
 3306|   329M|void janet_buffer_push_u8(JanetBuffer *buffer, uint8_t byte) {
 3307|   329M|    janet_buffer_extra(buffer, 1);
 3308|   329M|    buffer->data[buffer->count] = byte;
 3309|   329M|    buffer->count++;
 3310|   329M|}
cfun_buffer_new:
 3349|     24|              "Returns a new buffer of length 0.") {
 3350|     24|    janet_fixarity(argc, 1);
 3351|     24|    int32_t cap = janet_getinteger(argv, 0);
 3352|     24|    JanetBuffer *buffer = janet_buffer(cap);
 3353|     24|    return janet_wrap_buffer(buffer);
  ------------------
  |  |  847|     24|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|     24|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     24|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     24|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3354|     24|}
cfun_buffer_new_filled:
 3359|     71|              "By default, `byte` is 0. Returns the new buffer.") {
 3360|     71|    janet_arity(argc, 1, 2);
 3361|     71|    int32_t count = janet_getinteger(argv, 0);
 3362|     71|    if (count < 0) count = 0;
  ------------------
  |  Branch (3362:9): [True: 6, False: 65]
  ------------------
 3363|     71|    int32_t byte = 0;
 3364|     71|    if (argc == 2) {
  ------------------
  |  Branch (3364:9): [True: 8, False: 63]
  ------------------
 3365|      8|        byte = janet_getinteger(argv, 1) & 0xFF;
 3366|      8|    }
 3367|     71|    JanetBuffer *buffer = janet_buffer(count);
 3368|     71|    if (buffer->data && count > 0)
  ------------------
  |  Branch (3368:9): [True: 66, False: 5]
  |  Branch (3368:25): [True: 62, False: 4]
  ------------------
 3369|     62|        memset(buffer->data, byte, count);
 3370|     71|    buffer->count = count;
 3371|     71|    return janet_wrap_buffer(buffer);
  ------------------
  |  |  847|     71|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|     71|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     71|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     71|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3372|     71|}
cfun_buffer_frombytes:
 3377|  5.87k|              "will be coerced to the range of 1 byte 0-255.") {
 3378|  5.87k|    int32_t i;
 3379|  5.87k|    JanetBuffer *buffer = janet_buffer(argc);
 3380|  15.5k|    for (i = 0; i < argc; i++) {
  ------------------
  |  Branch (3380:17): [True: 9.64k, False: 5.87k]
  ------------------
 3381|  9.64k|        int32_t c = janet_getinteger(argv, i);
 3382|  9.64k|        buffer->data[i] = c & 0xFF;
 3383|  9.64k|    }
 3384|  5.87k|    buffer->count = argc;
 3385|  5.87k|    return janet_wrap_buffer(buffer);
  ------------------
  |  |  847|  5.87k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|  5.87k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.87k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.87k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3386|  5.87k|}
cfun_buffer_fill:
 3391|      6|              "not change `buf`'s length. Returns `buf`.") {
 3392|      6|    janet_arity(argc, 1, 2);
 3393|      6|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3394|      6|    int32_t byte = 0;
 3395|      6|    if (argc == 2) {
  ------------------
  |  Branch (3395:9): [True: 3, False: 3]
  ------------------
 3396|      3|        byte = janet_getinteger(argv, 1) & 0xFF;
 3397|      3|    }
 3398|      6|    if (buffer->count) {
  ------------------
  |  Branch (3398:9): [True: 0, False: 6]
  ------------------
 3399|      0|        memset(buffer->data, byte, buffer->count);
 3400|      0|    }
 3401|      6|    return argv[0];
 3402|      6|}
cfun_buffer_trim:
 3407|  7.02k|              "length. Returns `buf`.") {
 3408|  7.02k|    janet_fixarity(argc, 1);
 3409|  7.02k|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3410|  7.02k|    janet_buffer_can_realloc(buffer);
 3411|  7.02k|    if (buffer->count < buffer->capacity) {
  ------------------
  |  Branch (3411:9): [True: 7.02k, False: 3]
  ------------------
 3412|  7.02k|        int32_t newcap = buffer->count > 4 ? buffer->count : 4;
  ------------------
  |  Branch (3412:26): [True: 6.84k, False: 174]
  ------------------
 3413|  7.02k|        uint8_t *newData = janet_realloc(buffer->data, newcap);
  ------------------
  |  | 2409|  7.02k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 3414|  7.02k|        if (NULL == newData) {
  ------------------
  |  Branch (3414:13): [True: 0, False: 7.02k]
  ------------------
 3415|      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]
  |  |  ------------------
  ------------------
 3416|      0|        }
 3417|  7.02k|        buffer->data = newData;
 3418|  7.02k|        buffer->capacity = newcap;
 3419|  7.02k|    }
 3420|  7.02k|    return argv[0];
 3421|  7.02k|}
cfun_buffer_u8:
 3426|      1|              "`buf` as needed. Throws an error if size limit is exceeded.") {
 3427|      1|    int32_t i;
 3428|      1|    janet_arity(argc, 1, -1);
 3429|      1|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3430|      1|    for (i = 1; i < argc; i++) {
  ------------------
  |  Branch (3430:17): [True: 0, False: 1]
  ------------------
 3431|      0|        janet_buffer_push_u8(buffer, (uint8_t)(janet_getinteger(argv, i) & 0xFF));
 3432|      0|    }
 3433|      1|    return argv[0];
 3434|      1|}
cfun_buffer_word:
 3441|      1|              "needed. Throws an error if size limit is exceeded.") {
 3442|      1|    int32_t i;
 3443|      1|    janet_arity(argc, 1, -1);
 3444|      1|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3445|      1|    for (i = 1; i < argc; i++) {
  ------------------
  |  Branch (3445:17): [True: 0, False: 1]
  ------------------
 3446|      0|        double number = janet_getnumber(argv, i);
 3447|      0|        uint32_t word = (uint32_t) number;
 3448|      0|        if (word != number)
  ------------------
  |  Branch (3448:13): [True: 0, False: 0]
  ------------------
 3449|      0|            janet_panicf("cannot convert %v to machine word", argv[i]);
 3450|      0|        janet_buffer_push_u32(buffer, word);
 3451|      0|    }
 3452|      1|    return argv[0];
 3453|      1|}
cfun_buffer_chars:
 3459|  1.18k|              "`buf` as needed. Throws an error if size limit is exceeded.") {
 3460|  1.18k|    int32_t i;
 3461|  1.18k|    janet_arity(argc, 1, -1);
 3462|  1.18k|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3463|  2.37k|    for (i = 1; i < argc; i++) {
  ------------------
  |  Branch (3463:17): [True: 1.18k, False: 1.18k]
  ------------------
 3464|  1.18k|        JanetByteView view = janet_getbytes(argv, i);
 3465|  1.18k|        if (view.bytes == buffer->data) {
  ------------------
  |  Branch (3465:13): [True: 0, False: 1.18k]
  ------------------
 3466|      0|            janet_buffer_ensure(buffer, buffer->count + view.len, 2);
 3467|      0|            view.bytes = buffer->data;
 3468|      0|        }
 3469|  1.18k|        janet_buffer_push_bytes(buffer, view.bytes, view.len);
 3470|  1.18k|    }
 3471|  1.18k|    return argv[0];
 3472|  1.18k|}
cfun_buffer_push_uint16:
 3522|      1|              "Throws an error if size limit is exceeded.") {
 3523|      1|    janet_fixarity(argc, 3);
 3524|      1|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3525|      1|    int reverse = should_reverse_bytes(argv, 1);
 3526|      1|    uint16_t data = janet_getuinteger16(argv, 2);
 3527|      1|    uint8_t bytes[sizeof(data)];
 3528|      1|    memcpy(bytes, &data, sizeof(bytes));
 3529|      1|    if (reverse) {
  ------------------
  |  Branch (3529:9): [True: 0, False: 1]
  ------------------
 3530|      0|        uint8_t temp = bytes[1];
 3531|      0|        bytes[1] = bytes[0];
 3532|      0|        bytes[0] = temp;
 3533|      0|    }
 3534|      1|    janet_buffer_push_bytes(buffer, bytes, sizeof(bytes));
 3535|      1|    return argv[0];
 3536|      1|}
cfun_buffer_push_uint32:
 3542|      1|              "Throws an error if size limit is exceeded.") {
 3543|      1|    janet_fixarity(argc, 3);
 3544|      1|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3545|      1|    int reverse = should_reverse_bytes(argv, 1);
 3546|      1|    uint32_t data = janet_getuinteger(argv, 2);
 3547|      1|    uint8_t bytes[sizeof(data)];
 3548|      1|    memcpy(bytes, &data, sizeof(bytes));
 3549|      1|    if (reverse)
  ------------------
  |  Branch (3549:9): [True: 0, False: 1]
  ------------------
 3550|      0|        reverse_u32(bytes);
 3551|      1|    janet_buffer_push_bytes(buffer, bytes, sizeof(bytes));
 3552|      1|    return argv[0];
 3553|      1|}
cfun_buffer_push_uint64:
 3559|      1|              "Throws an error if size limit is exceeded.") {
 3560|      1|    janet_fixarity(argc, 3);
 3561|      1|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3562|      1|    int reverse = should_reverse_bytes(argv, 1);
 3563|      1|    uint64_t data = janet_getuinteger64(argv, 2);
 3564|      1|    uint8_t bytes[sizeof(data)];
 3565|      1|    memcpy(bytes, &data, sizeof(bytes));
 3566|      1|    if (reverse)
  ------------------
  |  Branch (3566:9): [True: 0, False: 1]
  ------------------
 3567|      0|        reverse_u64(bytes);
 3568|      1|    janet_buffer_push_bytes(buffer, bytes, sizeof(bytes));
 3569|      1|    return argv[0];
 3570|      1|}
cfun_buffer_push_float64:
 3593|      2|              "as needed. Throws an error if size limit is exceeded.") {
 3594|      2|    janet_fixarity(argc, 3);
 3595|      2|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3596|      2|    int reverse = should_reverse_bytes(argv, 1);
 3597|      2|    double data = janet_getnumber(argv, 2);
 3598|      2|    uint8_t bytes[sizeof(data)];
 3599|      2|    memcpy(bytes, &data, sizeof(bytes));
 3600|      2|    if (reverse)
  ------------------
  |  Branch (3600:9): [True: 0, False: 2]
  ------------------
 3601|      0|        reverse_u64(bytes);
 3602|      2|    janet_buffer_push_bytes(buffer, bytes, sizeof(bytes));
 3603|      2|    return argv[0];
 3604|      2|}
cfun_buffer_push:
 3648|  50.8M|              "exceeded.") {
 3649|  50.8M|    janet_arity(argc, 1, -1);
 3650|  50.8M|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3651|  50.8M|    buffer_push_impl(buffer, argv, 1, argc);
 3652|  50.8M|    return argv[0];
 3653|  50.8M|}
cfun_buffer_clear:
 3659|  6.15M|              "`buf`.") {
 3660|  6.15M|    janet_fixarity(argc, 1);
 3661|  6.15M|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3662|  6.15M|    buffer->count = 0;
 3663|  6.15M|    return argv[0];
 3664|  6.15M|}
cfun_buffer_slice:
 3684|    599|              "Same as `string/slice`, but returns a buffer.") {
 3685|    599|    JanetByteView view = janet_getbytes(argv, 0);
 3686|    599|    JanetRange range = janet_getslice(argc, argv);
 3687|    599|    JanetBuffer *buffer = janet_buffer(range.end - range.start);
 3688|    599|    if (buffer->data)
  ------------------
  |  Branch (3688:9): [True: 596, False: 3]
  ------------------
 3689|    596|        memcpy(buffer->data, view.bytes + range.start, range.end - range.start);
 3690|    599|    buffer->count = range.end - range.start;
 3691|    599|    return janet_wrap_buffer(buffer);
  ------------------
  |  |  847|    599|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|    599|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    599|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    599|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3692|    599|}
cfun_buffer_bitclear:
 3723|      1|              "`buf`.") {
 3724|      1|    int bit;
 3725|      1|    int32_t index;
 3726|      1|    JanetBuffer *buffer;
 3727|      1|    bitloc(argc, argv, &buffer, &index, &bit);
 3728|      1|    buffer->data[index] &= ~(1 << bit);
 3729|      1|    return argv[0];
 3730|      1|}
cfun_buffer_bittoggle:
 3746|     19|              "`buf`.") {
 3747|     19|    int bit;
 3748|     19|    int32_t index;
 3749|     19|    JanetBuffer *buffer;
 3750|     19|    bitloc(argc, argv, &buffer, &index, &bit);
 3751|     19|    buffer->data[index] ^= (1 << bit);
 3752|     19|    return argv[0];
 3753|     19|}
cfun_buffer_blit:
 3759|      2|              "negative in order to index from the end of `src` or `dest`. Returns `dest`.") {
 3760|      2|    janet_arity(argc, 2, 5);
 3761|      2|    JanetBuffer *dest = janet_getbuffer(argv, 0);
 3762|      2|    JanetByteView src = janet_getbytes(argv, 1);
 3763|      2|    int same_buf = src.bytes == dest->data;
 3764|      2|    int32_t offset_dest = 0;
 3765|      2|    int32_t offset_src = 0;
 3766|      2|    if (argc > 2 && !janet_checktype(argv[2], 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 (3766:9): [True: 0, False: 2]
  |  Branch (3766:21): [True: 0, False: 0]
  ------------------
 3767|      0|        offset_dest = janet_gethalfrange(argv, 2, dest->count, "dest-start");
 3768|      2|    if (argc > 3 && !janet_checktype(argv[3], 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 (3768:9): [True: 0, False: 2]
  |  Branch (3768:21): [True: 0, False: 0]
  ------------------
 3769|      0|        offset_src = janet_gethalfrange(argv, 3, src.len, "src-start");
 3770|      2|    int32_t length_src;
 3771|      2|    if (argc > 4) {
  ------------------
  |  Branch (3771:9): [True: 0, False: 2]
  ------------------
 3772|      0|        int32_t src_end = src.len;
 3773|      0|        if (!janet_checktype(argv[4], 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 (3773:13): [True: 0, False: 0]
  ------------------
 3774|      0|            src_end = janet_gethalfrange(argv, 4, src.len, "src-end");
 3775|      0|        length_src = src_end - offset_src;
 3776|      0|        if (length_src < 0) length_src = 0;
  ------------------
  |  Branch (3776:13): [True: 0, False: 0]
  ------------------
 3777|      2|    } else {
 3778|      2|        length_src = src.len - offset_src;
 3779|      2|    }
 3780|      2|    int64_t last = (int64_t) offset_dest + length_src;
 3781|      2|    if (last > INT32_MAX)
  ------------------
  |  Branch (3781:9): [True: 0, False: 2]
  ------------------
 3782|      0|        janet_panic("buffer blit out of range");
 3783|      2|    int32_t last32 = (int32_t) last;
 3784|      2|    janet_buffer_ensure(dest, last32, 2);
 3785|      2|    if (last32 > dest->count) dest->count = last32;
  ------------------
  |  Branch (3785:9): [True: 0, False: 2]
  ------------------
 3786|      2|    if (length_src) {
  ------------------
  |  Branch (3786:9): [True: 0, False: 2]
  ------------------
 3787|      0|        if (same_buf) {
  ------------------
  |  Branch (3787:13): [True: 0, False: 0]
  ------------------
 3788|       |            /* janet_buffer_ensure may have invalidated src */
 3789|      0|            src.bytes = dest->data;
 3790|      0|            memmove(dest->data + offset_dest, src.bytes + offset_src, length_src);
 3791|      0|        } else {
 3792|      0|            memcpy(dest->data + offset_dest, src.bytes + offset_src, length_src);
 3793|      0|        }
 3794|      0|    }
 3795|      2|    return argv[0];
 3796|      2|}
cfun_buffer_format:
 3801|  1.18k|              "buffer `buf`. Returns buf.") {
 3802|  1.18k|    janet_arity(argc, 2, -1);
 3803|  1.18k|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3804|  1.18k|    const char *strfrmt = (const char *) janet_getstring(argv, 1);
 3805|  1.18k|    janet_buffer_format(buffer, strfrmt, 1, argc, argv);
 3806|  1.18k|    return argv[0];
 3807|  1.18k|}
cfun_buffer_format_at:
 3812|      5|              "buffer `buf`, starting at index `at`. Returns buf.") {
 3813|      5|    janet_arity(argc, 2, -1);
 3814|      5|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3815|      5|    int32_t at = janet_getinteger(argv, 1);
 3816|      5|    if (at < 0) {
  ------------------
  |  Branch (3816:9): [True: 0, False: 5]
  ------------------
 3817|      0|        at += buffer->count + 1;
 3818|      0|    }
 3819|      5|    if (at > buffer->count || at < 0) janet_panicf("expected index at to be in range [0, %d), got %d", buffer->count, at);
  ------------------
  |  Branch (3819:9): [True: 4, False: 1]
  |  Branch (3819:31): [True: 0, False: 1]
  ------------------
 3820|      4|    int32_t oldcount = buffer->count;
 3821|      4|    buffer->count = at;
 3822|      4|    const char *strfrmt = (const char *) janet_getstring(argv, 2);
 3823|      4|    janet_buffer_format(buffer, strfrmt, 2, argc, argv);
 3824|      4|    if (buffer->count < oldcount) {
  ------------------
  |  Branch (3824:9): [True: 0, False: 4]
  ------------------
 3825|      0|        buffer->count = oldcount;
 3826|      0|    }
 3827|      4|    return argv[0];
 3828|      5|}
janet_lib_buffer:
 3830|  8.33k|void janet_lib_buffer(JanetTable *env) {
 3831|  8.33k|    JanetRegExt buffer_cfuns[] = {
 3832|  8.33k|        JANET_CORE_REG("buffer/new", cfun_buffer_new),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3833|  8.33k|        JANET_CORE_REG("buffer/new-filled", cfun_buffer_new_filled),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3834|  8.33k|        JANET_CORE_REG("buffer/from-bytes", cfun_buffer_frombytes),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3835|  8.33k|        JANET_CORE_REG("buffer/fill", cfun_buffer_fill),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3836|  8.33k|        JANET_CORE_REG("buffer/trim", cfun_buffer_trim),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3837|  8.33k|        JANET_CORE_REG("buffer/push-byte", cfun_buffer_u8),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3838|  8.33k|        JANET_CORE_REG("buffer/push-word", cfun_buffer_word),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3839|  8.33k|        JANET_CORE_REG("buffer/push-string", cfun_buffer_chars),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3840|  8.33k|        JANET_CORE_REG("buffer/push-uint16", cfun_buffer_push_uint16),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3841|  8.33k|        JANET_CORE_REG("buffer/push-uint32", cfun_buffer_push_uint32),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3842|  8.33k|        JANET_CORE_REG("buffer/push-uint64", cfun_buffer_push_uint64),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3843|  8.33k|        JANET_CORE_REG("buffer/push-float32", cfun_buffer_push_float32),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3844|  8.33k|        JANET_CORE_REG("buffer/push-float64", cfun_buffer_push_float64),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3845|  8.33k|        JANET_CORE_REG("buffer/push", cfun_buffer_push),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3846|  8.33k|        JANET_CORE_REG("buffer/push-at", cfun_buffer_push_at),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3847|  8.33k|        JANET_CORE_REG("buffer/popn", cfun_buffer_popn),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3848|  8.33k|        JANET_CORE_REG("buffer/clear", cfun_buffer_clear),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3849|  8.33k|        JANET_CORE_REG("buffer/slice", cfun_buffer_slice),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3850|  8.33k|        JANET_CORE_REG("buffer/bit-set", cfun_buffer_bitset),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3851|  8.33k|        JANET_CORE_REG("buffer/bit-clear", cfun_buffer_bitclear),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3852|  8.33k|        JANET_CORE_REG("buffer/bit", cfun_buffer_bitget),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3853|  8.33k|        JANET_CORE_REG("buffer/bit-toggle", cfun_buffer_bittoggle),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3854|  8.33k|        JANET_CORE_REG("buffer/blit", cfun_buffer_blit),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3855|  8.33k|        JANET_CORE_REG("buffer/format", cfun_buffer_format),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3856|  8.33k|        JANET_CORE_REG("buffer/format-at", cfun_buffer_format_at),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3857|  8.33k|        JANET_REG_END
  ------------------
  |  | 2110|  8.33k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 3858|  8.33k|    };
 3859|       |    janet_core_cfuns_ext(env, NULL, buffer_cfuns);
 3860|  8.33k|}
janet_bytecode_dead_code:
 4707|   777k|void janet_bytecode_dead_code(JanetFuncDef *def) {
 4708|   777k|    int32_t *pcstack = NULL;
 4709|   777k|    uint32_t *code = def->bytecode;
 4710|   777k|    int32_t *codes = (int32_t *)code;
 4711|   777k|    int32_t len = def->bytecode_length;
 4712|   777k|    int32_t words = ((len - 1) / 32) + 1;
 4713|   777k|    uint32_t *visited_bitmap = array_allocate(sizeof(uint32_t), words);
 4714|   777k|    memset(visited_bitmap, 0, words * sizeof(uint32_t));
 4715|   777k|    janet_v_push(pcstack, 0);
  ------------------
  |  |  734|   777k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|   777k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|   777k|#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: 777k, 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|   777k|#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|   777k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   777k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4716|  2.35M|    while (janet_v_count(pcstack)) {
  ------------------
  |  |  736|  2.35M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  2.35M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  2.35M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:33): [True: 1.58M, False: 777k]
  |  |  |  Branch (736:34): [True: 2.35M, False: 0]
  |  |  ------------------
  ------------------
 4717|  1.58M|        int32_t pc = janet_v_last(pcstack);
  ------------------
  |  |  737|  1.58M|#define janet_v_last(v)         ((v)[janet_v__cnt(v) - 1])
  |  |  ------------------
  |  |  |  |  743|  1.58M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.58M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4718|  1.58M|        janet_v_pop(pcstack);
  ------------------
  |  |  735|  1.58M|#define janet_v_pop(v)          (janet_v_count(v) ? janet_v__cnt(v)-- : 0)
  |  |  ------------------
  |  |  |  |  736|  1.58M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.58M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  741|  1.58M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (736:33): [True: 1.58M, False: 0]
  |  |  |  |  |  Branch (736:34): [True: 1.58M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_pop(v)          (janet_v_count(v) ? janet_v__cnt(v)-- : 0)
  |  |  ------------------
  |  |  |  |  743|  1.58M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.58M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4719|   262M|        while (pc < len) {
  ------------------
  |  Branch (4719:16): [True: 261M, False: 984k]
  ------------------
 4720|   261M|            int32_t index = pc >> 5;
 4721|   261M|            int32_t mask = ((uint32_t)1) << (pc & 0x1F);
 4722|   261M|            if (visited_bitmap[index] & mask) break;
  ------------------
  |  Branch (4722:17): [True: 597k, False: 260M]
  ------------------
 4723|   260M|            visited_bitmap[index] |= mask;
 4724|   260M|            switch (code[pc] & 0x7F) {
 4725|   258M|                default:
  ------------------
  |  Branch (4725:17): [True: 258M, False: 1.72M]
  ------------------
 4726|   258M|                    pc++;
 4727|   258M|                    continue;
 4728|   210k|                case JOP_RETURN_NIL:
  ------------------
  |  Branch (4728:17): [True: 210k, False: 260M]
  ------------------
 4729|   744k|                case JOP_RETURN:
  ------------------
  |  Branch (4729:17): [True: 533k, False: 259M]
  ------------------
 4730|   744k|                case JOP_ERROR:
  ------------------
  |  Branch (4730:17): [True: 58, False: 260M]
  ------------------
 4731|   920k|                case JOP_TAILCALL:
  ------------------
  |  Branch (4731:17): [True: 175k, False: 260M]
  ------------------
 4732|   920k|                    pc = len;
 4733|   920k|                    continue;
 4734|  64.1k|                case JOP_JUMP:
  ------------------
  |  Branch (4734:17): [True: 64.1k, False: 260M]
  ------------------
 4735|  64.1k|                    janet_v_push(pcstack, pc + (codes[pc] >> 8));
  ------------------
  |  |  734|  64.1k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  64.1k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  64.1k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  64.1k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  64.1k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|  64.1k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  64.1k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 0, False: 64.1k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 49.2k, False: 14.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  49.2k|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  743|  64.1k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  64.1k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4736|  64.1k|                    pc = len;
 4737|  64.1k|                    continue;
 4738|  4.70k|                case JOP_JUMP_IF:
  ------------------
  |  Branch (4738:17): [True: 4.70k, False: 260M]
  ------------------
 4739|  33.6k|                case JOP_JUMP_IF_NIL:
  ------------------
  |  Branch (4739:17): [True: 28.9k, False: 260M]
  ------------------
 4740|   580k|                case JOP_JUMP_IF_NOT:
  ------------------
  |  Branch (4740:17): [True: 547k, False: 259M]
  ------------------
 4741|   739k|                case JOP_JUMP_IF_NOT_NIL:
  ------------------
  |  Branch (4741:17): [True: 158k, False: 260M]
  ------------------
 4742|   739k|                    janet_v_push(pcstack, pc + (codes[pc] >> 16));
  ------------------
  |  |  734|   739k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|   739k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|   739k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|   739k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|   739k|#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|   739k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|   739k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 0, False: 739k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 331k, False: 407k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|   331k|#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|   739k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   739k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4743|   739k|                    pc++;
 4744|   739k|                    continue;
 4745|   260M|            }
 4746|   260M|        }
 4747|  1.58M|    }
 4748|   261M|    for (int32_t pc = 0; pc < len; pc++) {
  ------------------
  |  Branch (4748:26): [True: 260M, False: 777k]
  ------------------
 4749|   260M|        if (!(visited_bitmap[pc >> 5] & (((uint32_t)1) << (pc & 0x1F)))) {
  ------------------
  |  Branch (4749:13): [True: 43.6k, False: 260M]
  ------------------
 4750|  43.6k|            code[pc] = JOP_NOOP;
 4751|  43.6k|        }
 4752|   260M|    }
 4753|   777k|    janet_free(visited_bitmap);
  ------------------
  |  | 2415|   777k|#define janet_free(X) free((X))
  ------------------
 4754|       |    janet_v_free(pcstack);
  ------------------
  |  |  733|   777k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|   777k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 777k, False: 0]
  |  |  ------------------
  ------------------
 4755|   777k|}
janet_bytecode_remove_unused_closures:
 4778|   591k|void janet_bytecode_remove_unused_closures(JanetFuncDef *def) {
 4779|   591k|    if (def->defs_length < 1) return;
  ------------------
  |  Branch (4779:9): [True: 380k, False: 211k]
  ------------------
 4780|   211k|    uint32_t *code = def->bytecode;
 4781|   211k|    int32_t words = ((def->defs_length - 1) >> 5) + 1;
 4782|   211k|    janet_assert(words > 0, "bad length");
  ------------------
  |  |  389|   211k|#define janet_assert(c, m) do { \
  |  |  390|   211k|    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: 211k]
  |  |  ------------------
  |  |  391|   211k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 211k]
  |  |  ------------------
  ------------------
 4783|   211k|    uint32_t *bitset = array_allocate(sizeof(uint32_t), words);
 4784|   211k|    memset(bitset, 0, words * sizeof(uint32_t));
 4785|  3.00M|    for (int32_t pc = 0; pc < def->bytecode_length; pc++) {
  ------------------
  |  Branch (4785:26): [True: 2.79M, False: 211k]
  ------------------
 4786|  2.79M|        uint32_t E = code[pc] >> 16;
 4787|  2.79M|        switch (code[pc] & 0x7F) {
 4788|  2.56M|            default:
  ------------------
  |  Branch (4788:13): [True: 2.56M, False: 222k]
  ------------------
 4789|  2.56M|                continue;
 4790|  2.56M|            case JOP_CLOSURE:
  ------------------
  |  Branch (4790:13): [True: 222k, False: 2.56M]
  ------------------
 4791|   222k|                bs_set_bit(bitset, E);
 4792|   222k|                continue;
 4793|  2.79M|        }
 4794|  2.79M|    }
 4795|       |
 4796|       |    /* Check if we need to compress closures */
 4797|   211k|    int remap = 0;
 4798|   408k|    for (int32_t i = 0; i < def->defs_length; i++) {
  ------------------
  |  Branch (4798:25): [True: 237k, False: 170k]
  ------------------
 4799|   237k|        if (!bs_read_bit(bitset, i)) {
  ------------------
  |  Branch (4799:13): [True: 40.8k, False: 197k]
  ------------------
 4800|  40.8k|            remap = 1;
 4801|  40.8k|            break;
 4802|  40.8k|        }
 4803|   237k|    }
 4804|       |
 4805|       |    /* Remap closures */
 4806|   211k|    if (remap) {
  ------------------
  |  Branch (4806:9): [True: 40.8k, False: 170k]
  ------------------
 4807|  40.8k|        uint32_t *def_remaps = array_allocate(sizeof(uint32_t), def->defs_length);
 4808|  40.8k|        int32_t j = 0;
 4809|   203k|        for (int32_t i = 0; i < def->defs_length; i++) {
  ------------------
  |  Branch (4809:29): [True: 162k, False: 40.8k]
  ------------------
 4810|   162k|            def_remaps[i] = j;
 4811|   162k|            def->defs[j] = def->defs[i];
 4812|   162k|            if (bs_read_bit(bitset, i)) {
  ------------------
  |  Branch (4812:17): [True: 42.6k, False: 119k]
  ------------------
 4813|  42.6k|                j++;
 4814|  42.6k|            }
 4815|   162k|        }
 4816|  40.8k|        def->defs_length = j;
 4817|  1.99M|        for (int32_t pc = 0; pc < def->bytecode_length; pc++) {
  ------------------
  |  Branch (4817:30): [True: 1.95M, False: 40.8k]
  ------------------
 4818|  1.95M|            uint32_t E = code[pc] >> 16;
 4819|  1.95M|            switch (code[pc] & 0x7F) {
 4820|  1.91M|                default:
  ------------------
  |  Branch (4820:17): [True: 1.91M, False: 42.6k]
  ------------------
 4821|  1.91M|                    continue;
 4822|  1.91M|                case JOP_CLOSURE:
  ------------------
  |  Branch (4822:17): [True: 42.6k, False: 1.91M]
  ------------------
 4823|  42.6k|                    code[pc] = (code[pc] & 0xFFFF) | (def_remaps[E] << 16);
 4824|  42.6k|                    continue;
 4825|  1.95M|            }
 4826|  1.95M|        }
 4827|  40.8k|        janet_free(def_remaps);
  ------------------
  |  | 2415|  40.8k|#define janet_free(X) free((X))
  ------------------
 4828|       |
 4829|       |        /* TODO - recalculate closure bitset and do more optimization */
 4830|  40.8k|    }
 4831|       |
 4832|   211k|    janet_free(bitset);
  ------------------
  |  | 2415|   211k|#define janet_free(X) free((X))
  ------------------
 4833|   211k|}
janet_bytecode_remove_unused_constants:
 4836|   591k|void janet_bytecode_remove_unused_constants(JanetFuncDef *def) {
 4837|   591k|    if (def->constants_length < 1) return;
  ------------------
  |  Branch (4837:9): [True: 319k, False: 272k]
  ------------------
 4838|   272k|    uint32_t *code = def->bytecode;
 4839|   272k|    int32_t words = ((def->constants_length - 1) >> 5) + 1;
 4840|   272k|    janet_assert(words > 0, "bad length");
  ------------------
  |  |  389|   272k|#define janet_assert(c, m) do { \
  |  |  390|   272k|    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: 272k]
  |  |  ------------------
  |  |  391|   272k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 272k]
  |  |  ------------------
  ------------------
 4841|   272k|    uint32_t *bitset = array_allocate(sizeof(uint32_t), words);
 4842|   272k|    memset(bitset, 0, words * sizeof(uint32_t));
 4843|       |
 4844|       |    /* Quirk: We rely on the first N constants being the named arguments of a function for warnings
 4845|       |     * while making function calls. Preserve these in the case we have named arguments so we don't get
 4846|       |     * spurious warnings for unused named arguments (or miss warnings!) */
 4847|   272k|    if (def->flags & JANET_FUNCDEF_FLAG_NAMEDARGS) {
  ------------------
  |  | 1107|   272k|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (4847:9): [True: 8, False: 272k]
  ------------------
 4848|     94|        for (int32_t index = 0; index < def->named_args_count; index++) {
  ------------------
  |  Branch (4848:33): [True: 86, False: 8]
  ------------------
 4849|     86|            bs_set_bit(bitset, index);
 4850|     86|        }
 4851|      8|    }
 4852|       |
 4853|  6.43M|    for (int32_t pc = 0; pc < def->bytecode_length; pc++) {
  ------------------
  |  Branch (4853:26): [True: 6.16M, False: 272k]
  ------------------
 4854|  6.16M|        uint32_t E = code[pc] >> 16;
 4855|  6.16M|        switch (code[pc] & 0x7F) {
 4856|  4.09M|            default:
  ------------------
  |  Branch (4856:13): [True: 4.09M, False: 2.06M]
  ------------------
 4857|  4.09M|                continue;
 4858|  4.09M|            case JOP_LOAD_CONSTANT:
  ------------------
  |  Branch (4858:13): [True: 2.06M, False: 4.09M]
  ------------------
 4859|  2.06M|                bs_set_bit(bitset, E);
 4860|  2.06M|                continue;
 4861|  6.16M|        }
 4862|  6.16M|    }
 4863|       |
 4864|       |    /* Check if we need to compress constants */
 4865|   272k|    int remap = 0;
 4866|   884k|    for (int32_t i = 0; i < def->constants_length; i++) {
  ------------------
  |  Branch (4866:25): [True: 628k, False: 255k]
  ------------------
 4867|   628k|        if (!bs_read_bit(bitset, i)) {
  ------------------
  |  Branch (4867:13): [True: 16.6k, False: 611k]
  ------------------
 4868|  16.6k|            remap = 1;
 4869|  16.6k|            break;
 4870|  16.6k|        }
 4871|   628k|    }
 4872|       |
 4873|       |    /* Remap constants */
 4874|   272k|    if (remap) {
  ------------------
  |  Branch (4874:9): [True: 16.6k, False: 255k]
  ------------------
 4875|  16.6k|        uint32_t *constant_remaps = array_allocate(sizeof(uint32_t), def->constants_length);
 4876|  16.6k|        int32_t j = 0;
 4877|   196k|        for (int32_t i = 0; i < def->constants_length; i++) {
  ------------------
  |  Branch (4877:29): [True: 179k, False: 16.6k]
  ------------------
 4878|   179k|            constant_remaps[i] = j;
 4879|   179k|            def->constants[j] = def->constants[i];
 4880|   179k|            if (bs_read_bit(bitset, i)) {
  ------------------
  |  Branch (4880:17): [True: 31.1k, False: 148k]
  ------------------
 4881|  31.1k|                j++;
 4882|  31.1k|            }
 4883|   179k|        }
 4884|  16.6k|        def->constants_length = j;
 4885|  1.05M|        for (int32_t pc = 0; pc < def->bytecode_length; pc++) {
  ------------------
  |  Branch (4885:30): [True: 1.03M, False: 16.6k]
  ------------------
 4886|  1.03M|            uint32_t E = code[pc] >> 16;
 4887|  1.03M|            switch (code[pc] & 0x7F) {
 4888|   762k|                default:
  ------------------
  |  Branch (4888:17): [True: 762k, False: 271k]
  ------------------
 4889|   762k|                    continue;
 4890|   762k|                case JOP_LOAD_CONSTANT:
  ------------------
  |  Branch (4890:17): [True: 271k, False: 762k]
  ------------------
 4891|   271k|                    code[pc] = (code[pc] & 0xFFFF) | (constant_remaps[E] << 16);
 4892|   271k|                    continue;
 4893|  1.03M|            }
 4894|  1.03M|        }
 4895|  16.6k|        janet_free(constant_remaps);
  ------------------
  |  | 2415|  16.6k|#define janet_free(X) free((X))
  ------------------
 4896|  16.6k|    }
 4897|       |
 4898|   272k|    janet_free(bitset);
  ------------------
  |  | 2415|   272k|#define janet_free(X) free((X))
  ------------------
 4899|   272k|}
janet_bytecode_remove_noops:
 4903|   777k|void janet_bytecode_remove_noops(JanetFuncDef *def) {
 4904|       |
 4905|       |    /* Get an instruction rewrite map so we can rewrite jumps */
 4906|   777k|    uint32_t *pc_map = janet_smalloc(sizeof(uint32_t) * (1 + def->bytecode_length));
 4907|   777k|    uint32_t new_bytecode_length = 0;
 4908|   261M|    for (int32_t i = 0; i < def->bytecode_length; i++) {
  ------------------
  |  Branch (4908:25): [True: 260M, False: 777k]
  ------------------
 4909|   260M|        uint32_t instr = def->bytecode[i];
 4910|   260M|        uint32_t opcode = instr & 0x7F;
 4911|   260M|        pc_map[i] = new_bytecode_length;
 4912|   260M|        if (opcode != JOP_NOOP) {
  ------------------
  |  Branch (4912:13): [True: 254M, False: 5.95M]
  ------------------
 4913|   254M|            new_bytecode_length++;
 4914|   254M|        }
 4915|   260M|    }
 4916|   777k|    pc_map[def->bytecode_length] = new_bytecode_length;
 4917|       |
 4918|       |    /* Linear scan rewrite bytecode and sourcemap. Also fix jumps. */
 4919|   777k|    int32_t j = 0;
 4920|   261M|    for (int32_t i = 0; i < def->bytecode_length; i++) {
  ------------------
  |  Branch (4920:25): [True: 260M, False: 777k]
  ------------------
 4921|   260M|        uint32_t instr = def->bytecode[i];
 4922|   260M|        uint32_t opcode = instr & 0x7F;
 4923|   260M|        int32_t old_jump_target = 0;
 4924|   260M|        int32_t new_jump_target = 0;
 4925|   260M|        switch (opcode) {
 4926|  5.95M|            case JOP_NOOP:
  ------------------
  |  Branch (4926:13): [True: 5.95M, False: 254M]
  ------------------
 4927|  5.95M|                continue;
 4928|  64.1k|            case JOP_JUMP:
  ------------------
  |  Branch (4928:13): [True: 64.1k, False: 260M]
  ------------------
 4929|       |                /* relative pc is in DS field of instruction */
 4930|  64.1k|                old_jump_target = i + (((int32_t)instr) >> 8);
 4931|  64.1k|                janet_assert(old_jump_target >= 0, "bounds");
  ------------------
  |  |  389|  64.1k|#define janet_assert(c, m) do { \
  |  |  390|  64.1k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 64.1k]
  |  |  ------------------
  |  |  391|  64.1k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 64.1k]
  |  |  ------------------
  ------------------
 4932|  64.1k|                janet_assert(old_jump_target < def->bytecode_length, "bounds");
  ------------------
  |  |  389|  64.1k|#define janet_assert(c, m) do { \
  |  |  390|  64.1k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 64.1k]
  |  |  ------------------
  |  |  391|  64.1k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 64.1k]
  |  |  ------------------
  ------------------
 4933|  64.1k|                new_jump_target = pc_map[old_jump_target];
 4934|  64.1k|                instr += (uint32_t)(new_jump_target - old_jump_target + (i - j)) << 8;
 4935|  64.1k|                break;
 4936|  4.70k|            case JOP_JUMP_IF:
  ------------------
  |  Branch (4936:13): [True: 4.70k, False: 260M]
  ------------------
 4937|  33.6k|            case JOP_JUMP_IF_NIL:
  ------------------
  |  Branch (4937:13): [True: 28.9k, False: 260M]
  ------------------
 4938|   580k|            case JOP_JUMP_IF_NOT:
  ------------------
  |  Branch (4938:13): [True: 547k, False: 260M]
  ------------------
 4939|   739k|            case JOP_JUMP_IF_NOT_NIL:
  ------------------
  |  Branch (4939:13): [True: 158k, False: 260M]
  ------------------
 4940|       |                /* relative pc is in ES field of instruction */
 4941|   739k|                old_jump_target = i + (((int32_t)instr) >> 16);
 4942|   739k|                janet_assert(old_jump_target >= 0, "bounds");
  ------------------
  |  |  389|   739k|#define janet_assert(c, m) do { \
  |  |  390|   739k|    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: 739k]
  |  |  ------------------
  |  |  391|   739k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 739k]
  |  |  ------------------
  ------------------
 4943|   739k|                janet_assert(old_jump_target < def->bytecode_length, "bounds");
  ------------------
  |  |  389|   739k|#define janet_assert(c, m) do { \
  |  |  390|   739k|    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: 739k]
  |  |  ------------------
  |  |  391|   739k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 739k]
  |  |  ------------------
  ------------------
 4944|   739k|                new_jump_target = pc_map[old_jump_target];
 4945|   739k|                instr += (uint32_t)(new_jump_target - old_jump_target + (i - j)) << 16;
 4946|   739k|                break;
 4947|   253M|            default:
  ------------------
  |  Branch (4947:13): [True: 253M, False: 6.76M]
  ------------------
 4948|   253M|                break;
 4949|   260M|        }
 4950|   254M|        def->bytecode[j] = instr;
 4951|   254M|        if (def->sourcemap != NULL) {
  ------------------
  |  Branch (4951:13): [True: 254M, False: 6]
  ------------------
 4952|   254M|            def->sourcemap[j] = def->sourcemap[i];
 4953|   254M|        }
 4954|   254M|        j++;
 4955|   254M|    }
 4956|       |
 4957|       |    /* Rewrite symbolmap */
 4958|   777k|    rewrite_symbolmap(def, pc_map);
 4959|       |
 4960|   777k|    def->bytecode_length = new_bytecode_length;
 4961|   777k|    def->bytecode = janet_realloc(def->bytecode, def->bytecode_length * sizeof(uint32_t));
  ------------------
  |  | 2409|   777k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 4962|   777k|    janet_sfree(pc_map);
 4963|   777k|}
janet_bytecode_jump_threading:
 4967|   777k|void janet_bytecode_jump_threading(JanetFuncDef *def) {
 4968|   777k|    int32_t blen = def->bytecode_length;
 4969|   777k|    uint32_t *code = def->bytecode;
 4970|   777k|    int32_t *codes = (int32_t *)code;
 4971|   777k|    int recur = 1;
 4972|  1.57M|    while (recur) {
  ------------------
  |  Branch (4972:12): [True: 796k, False: 777k]
  ------------------
 4973|   796k|        recur = 0;
 4974|   269M|        for (int32_t i = 0; i < blen; i++) {
  ------------------
  |  Branch (4974:29): [True: 268M, False: 796k]
  ------------------
 4975|   268M|            int32_t target;
 4976|   268M|            int is_branch = 0;
 4977|   268M|            switch (code[i] & 0x7F) {
 4978|   120M|                default:
  ------------------
  |  Branch (4978:17): [True: 120M, False: 148M]
  ------------------
 4979|   120M|                    continue;
 4980|   120M|                case JOP_MOVE_NEAR:
  ------------------
  |  Branch (4980:17): [True: 74.8M, False: 193M]
  ------------------
 4981|   147M|                case JOP_MOVE_FAR:
  ------------------
  |  Branch (4981:17): [True: 72.4M, False: 196M]
  ------------------
 4982|   147M|                    if (((codes[i] >> 8) & 0xFF) == (codes[i] >> 16)) {
  ------------------
  |  Branch (4982:25): [True: 77, False: 147M]
  ------------------
 4983|       |                        /* Not really jump threading, but an easy optimization */
 4984|     77|                        code[i] = JOP_NOOP;
 4985|     77|                    }
 4986|   147M|                    continue;
 4987|  74.3k|                case JOP_JUMP:
  ------------------
  |  Branch (4987:17): [True: 74.3k, False: 268M]
  ------------------
 4988|  74.3k|                    target = i + (codes[i] >> 8);
 4989|  74.3k|                    break;
 4990|  4.70k|                case JOP_JUMP_IF:
  ------------------
  |  Branch (4990:17): [True: 4.70k, False: 268M]
  ------------------
 4991|   809k|                case JOP_JUMP_IF_NOT:
  ------------------
  |  Branch (4991:17): [True: 804k, False: 267M]
  ------------------
 4992|   840k|                case JOP_JUMP_IF_NIL:
  ------------------
  |  Branch (4992:17): [True: 31.3k, False: 268M]
  ------------------
 4993|  1.01M|                case JOP_JUMP_IF_NOT_NIL:
  ------------------
  |  Branch (4993:17): [True: 175k, False: 268M]
  ------------------
 4994|  1.01M|                    is_branch = 1;
 4995|  1.01M|                    target = i + (codes[i] >> 16);
 4996|  1.01M|                    break;
 4997|   268M|            }
 4998|  1.09M|            if (target == i) continue; /* infinite loop */
  ------------------
  |  Branch (4998:17): [True: 20.8k, False: 1.07M]
  ------------------
 4999|  1.07M|            if (target == i + 1) {
  ------------------
  |  Branch (4999:17): [True: 18.0k, False: 1.05M]
  ------------------
 5000|  18.0k|                code[i] = JOP_NOOP;
 5001|  18.0k|                recur = 1;
 5002|  18.0k|                continue;
 5003|  18.0k|            }
 5004|  1.05M|            while ((code[target] & 0x7F) == JOP_NOOP) { /* Skip noops */
  ------------------
  |  Branch (5004:20): [True: 15, False: 1.05M]
  ------------------
 5005|     15|                target++;
 5006|     15|            }
 5007|  1.05M|            if ((code[target] & 0x7F) == JOP_RETURN_NIL && !is_branch) {
  ------------------
  |  Branch (5007:17): [True: 20.7k, False: 1.03M]
  |  Branch (5007:60): [True: 12, False: 20.7k]
  ------------------
 5008|     12|                code[i] = JOP_RETURN_NIL;
 5009|     12|                recur = 1;
 5010|     12|                continue;
 5011|     12|            }
 5012|       |            /* update target */
 5013|  1.05M|            if ((code[target] & 0x7F) == JOP_JUMP) {
  ------------------
  |  Branch (5013:17): [True: 542, False: 1.05M]
  ------------------
 5014|    542|                target += (codes[target] >> 8);
 5015|    542|            }
 5016|  1.05M|            uint32_t newcode;
 5017|  1.05M|            if (is_branch) {
  ------------------
  |  Branch (5017:17): [True: 998k, False: 53.2k]
  ------------------
 5018|   998k|                newcode = (code[i] & 0xFFFF) | ((uint32_t)(target - i) << 16);
 5019|   998k|            } else {
 5020|  53.2k|                newcode = (code[i] & 0xFF) | ((uint32_t)(target - i) << 8);
 5021|  53.2k|            }
 5022|  1.05M|            if (newcode != code[i]) recur = 1;
  ------------------
  |  Branch (5022:17): [True: 507, False: 1.05M]
  ------------------
 5023|  1.05M|            code[i] = newcode;
 5024|  1.05M|        }
 5025|   796k|    }
 5026|   777k|}
janet_bytecode_movopt_full:
 5268|   777k|void janet_bytecode_movopt_full(JanetFuncDef *def, BytecodeBB *blocks, int32_t nblocks) {
 5269|       |
 5270|       |    /* Allocate nblocks bitmaps */
 5271|   777k|    int32_t wordlen = ((def->slotcount - 1) >> 5) + 1;
 5272|   777k|    janet_assert(wordlen > 0, "bad len");
  ------------------
  |  |  389|   777k|#define janet_assert(c, m) do { \
  |  |  390|   777k|    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: 777k]
  |  |  ------------------
  |  |  391|   777k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 777k]
  |  |  ------------------
  ------------------
 5273|   777k|    uint32_t **bitsets = array_allocate(sizeof(uint32_t *), nblocks);
 5274|  2.61M|    for (int32_t block_i = 0; block_i < nblocks; block_i++) {
  ------------------
  |  Branch (5274:31): [True: 1.83M, False: 777k]
  ------------------
 5275|  1.83M|        bitsets[block_i] = array_allocate(sizeof(uint32_t), wordlen);
 5276|  1.83M|        memset(bitsets[block_i], 0, wordlen * sizeof(uint32_t));
 5277|  1.83M|    }
 5278|       |
 5279|       |    /* Find all local block inputs */
 5280|  2.61M|    for (int32_t block_i = 0; block_i < nblocks; block_i++) {
  ------------------
  |  Branch (5280:31): [True: 1.83M, False: 777k]
  ------------------
 5281|  1.83M|        janet_bytecode_movopt_basic_block(def, blocks[block_i], bitsets[block_i], 1);
 5282|  1.83M|    }
 5283|       |
 5284|       |    /* Propagate inputs to predecessors */
 5285|   777k|    int recur = 1;
 5286|  1.98M|    while (recur) {
  ------------------
  |  Branch (5286:12): [True: 1.21M, False: 777k]
  ------------------
 5287|  1.21M|        recur = 0;
 5288|  15.5M|        for (int32_t block_i = 0; block_i < nblocks; block_i++) {
  ------------------
  |  Branch (5288:35): [True: 14.3M, False: 1.21M]
  ------------------
 5289|  43.1M|            for (int j = 0; j < 2; j++) {
  ------------------
  |  Branch (5289:29): [True: 28.7M, False: 14.3M]
  ------------------
 5290|  28.7M|                int32_t block_next = blocks[block_i].next[j];
 5291|  28.7M|                if (block_next != -1) {
  ------------------
  |  Branch (5291:21): [True: 24.0M, False: 4.67M]
  ------------------
 5292|   227M|                    for (int32_t i = 0; i < wordlen; i++) {
  ------------------
  |  Branch (5292:41): [True: 203M, False: 24.0M]
  ------------------
 5293|   203M|                        uint32_t before = bitsets[block_i][i];
 5294|   203M|                        bitsets[block_i][i] |= bitsets[block_next][i];
 5295|   203M|                        if (before != bitsets[block_i][i]) recur = 1;
  ------------------
  |  Branch (5295:29): [True: 6.64M, False: 197M]
  ------------------
 5296|   203M|                    }
 5297|  24.0M|                }
 5298|  28.7M|            }
 5299|  14.3M|        }
 5300|  1.21M|    }
 5301|       |
 5302|       |    /* Remove extra writes */
 5303|  2.61M|    for (int32_t block_i = 0; block_i < nblocks; block_i++) {
  ------------------
  |  Branch (5303:31): [True: 1.83M, False: 777k]
  ------------------
 5304|  1.83M|        janet_bytecode_movopt_basic_block(def, blocks[block_i], bitsets[block_i], 0);
 5305|  1.83M|    }
 5306|       |
 5307|       |    /* Cleanup */
 5308|  2.61M|    for (int32_t block_i = 0; block_i < nblocks; block_i++) {
  ------------------
  |  Branch (5308:31): [True: 1.83M, False: 777k]
  ------------------
 5309|  1.83M|        janet_free(bitsets[block_i]);
  ------------------
  |  | 2415|  1.83M|#define janet_free(X) free((X))
  ------------------
 5310|  1.83M|    }
 5311|   777k|    janet_free(bitsets);
  ------------------
  |  | 2415|   777k|#define janet_free(X) free((X))
  ------------------
 5312|   777k|}
janet_bytecode_compact_slots:
 5315|   591k|void janet_bytecode_compact_slots(JanetFuncDef *def) {
 5316|       |    /* TODO - we would need to be somewhat careful in that case. */
 5317|   591k|    if (def->slotcount > 256) return;
  ------------------
  |  Branch (5317:9): [True: 1.30k, False: 590k]
  ------------------
 5318|       |    /* Remap: old slot -> new slot */
 5319|       |    /* Invert: new slot -> old slot */
 5320|   590k|    int32_t *remap = array_allocate(sizeof(int32_t), def->slotcount * 2);
 5321|   590k|    int32_t *invert = remap + def->slotcount;
 5322|   590k|    uint32_t *code = def->bytecode;
 5323|   590k|    int32_t len = def->bytecode_length;
 5324|   590k|    int32_t next_slot = def->arity;
 5325|   590k|    int32_t greatest = 0;
 5326|  2.99M|    for (int32_t i = 0; i < def->slotcount * 2; i++) remap[i] = -1;
  ------------------
  |  Branch (5326:25): [True: 2.40M, False: 590k]
  ------------------
 5327|       |    /* Pin closure slots for now */
 5328|   590k|    if (def->closure_bitset) {
  ------------------
  |  Branch (5328:9): [True: 13.4k, False: 577k]
  ------------------
 5329|   109k|        for (int32_t i = 0; i < def->slotcount; i++) {
  ------------------
  |  Branch (5329:29): [True: 96.3k, False: 13.4k]
  ------------------
 5330|  96.3k|            if (bs_read_bit(def->closure_bitset, i)) {
  ------------------
  |  Branch (5330:17): [True: 35.2k, False: 61.0k]
  ------------------
 5331|  35.2k|                remap[i] = i;
 5332|  35.2k|                invert[i] = i;
 5333|  35.2k|                greatest = i;
 5334|  35.2k|            }
 5335|  96.3k|        }
 5336|  13.4k|    }
 5337|       |    /* Pin arguments - TODO slots for unused arguments could be reused */
 5338|   629k|    for (int32_t i = 0; i < def->arity && i < def->slotcount; i++) {
  ------------------
  |  Branch (5338:25): [True: 39.2k, False: 590k]
  |  Branch (5338:43): [True: 39.2k, False: 0]
  ------------------
 5339|  39.2k|        remap[i] = i;
 5340|  39.2k|        invert[i] = i;
 5341|  39.2k|        if (i > greatest) greatest = i;
  ------------------
  |  Branch (5341:13): [True: 6.32k, False: 32.9k]
  ------------------
 5342|  39.2k|    }
 5343|   590k|    if (def->flags & (JANET_FUNCDEF_FLAG_VARARG | JANET_FUNCDEF_FLAG_NAMEDARGS | JANET_FUNCDEF_FLAG_STRUCTARG)) {
  ------------------
  |  | 1097|   590k|#define JANET_FUNCDEF_FLAG_VARARG 0x10000
  ------------------
                  if (def->flags & (JANET_FUNCDEF_FLAG_VARARG | JANET_FUNCDEF_FLAG_NAMEDARGS | JANET_FUNCDEF_FLAG_STRUCTARG)) {
  ------------------
  |  | 1107|   590k|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
                  if (def->flags & (JANET_FUNCDEF_FLAG_VARARG | JANET_FUNCDEF_FLAG_NAMEDARGS | JANET_FUNCDEF_FLAG_STRUCTARG)) {
  ------------------
  |  | 1105|   590k|#define JANET_FUNCDEF_FLAG_STRUCTARG 0x1000000
  ------------------
  |  Branch (5343:9): [True: 29, False: 590k]
  ------------------
 5344|     29|        remap[def->arity] = def->arity;
 5345|     29|        invert[def->arity] = def->arity;
 5346|     29|        next_slot++;
 5347|     29|    }
 5348|       |    /* Rename 8 bit slots first, then larger slots */
 5349|  4.64M|    for (int32_t pc = 0; pc < len; pc++) {
  ------------------
  |  Branch (5349:26): [True: 4.05M, False: 590k]
  ------------------
 5350|  4.05M|        enum JanetInstructionType itype = janet_instructions[code[pc] & 0x7F];
 5351|  4.05M|        int nslots = 0;
 5352|  4.05M|        uint32_t slots[3];
 5353|       |        /* rewrite slots. For now, assume adding slot delta will not overflow any slot indices */
 5354|  4.05M|        switch (itype) {
  ------------------
  |  Branch (5354:17): [True: 4.05M, False: 0]
  ------------------
 5355|  43.5k|            case JINT_0:
  ------------------
  |  Branch (5355:13): [True: 43.5k, False: 4.01M]
  ------------------
 5356|  59.0k|            case JINT_L:
  ------------------
  |  Branch (5356:13): [True: 15.4k, False: 4.03M]
  ------------------
 5357|  59.0k|                continue;
 5358|  1.28M|            case JINT_S:
  ------------------
  |  Branch (5358:13): [True: 1.28M, False: 2.77M]
  ------------------
 5359|  1.28M|                nslots = 1;
 5360|  1.28M|                slots[0] = (code[pc] >> 8) & 0xFFFFFFU;
 5361|  1.28M|                break;
 5362|   227k|            case JINT_SES:
  ------------------
  |  Branch (5362:13): [True: 227k, False: 3.82M]
  ------------------
 5363|   286k|            case JINT_SI:
  ------------------
  |  Branch (5363:13): [True: 58.9k, False: 3.99M]
  ------------------
 5364|   286k|            case JINT_SU:
  ------------------
  |  Branch (5364:13): [True: 0, False: 4.05M]
  ------------------
 5365|   286k|            case JINT_ST:
  ------------------
  |  Branch (5365:13): [True: 0, False: 4.05M]
  ------------------
 5366|   402k|            case JINT_SL:
  ------------------
  |  Branch (5366:13): [True: 115k, False: 3.93M]
  ------------------
 5367|   623k|            case JINT_SD:
  ------------------
  |  Branch (5367:13): [True: 221k, False: 3.83M]
  ------------------
 5368|  1.83M|            case JINT_SC:
  ------------------
  |  Branch (5368:13): [True: 1.21M, False: 2.84M]
  ------------------
 5369|  1.83M|                nslots = 1;
 5370|  1.83M|                slots[0] = (code[pc] >> 8) & 0xFFU;
 5371|  1.83M|                break;
 5372|   560k|            case JINT_SS:
  ------------------
  |  Branch (5372:13): [True: 560k, False: 3.49M]
  ------------------
 5373|   560k|                nslots = 2;
 5374|   560k|                slots[0] = (code[pc] >> 8) & 0xFFU;
 5375|   560k|                slots[1] = (code[pc] >> 16) & 0xFFFFU;
 5376|   560k|                break;
 5377|  57.5k|            case JINT_SSI:
  ------------------
  |  Branch (5377:13): [True: 57.5k, False: 3.99M]
  ------------------
 5378|  62.8k|            case JINT_SSU:
  ------------------
  |  Branch (5378:13): [True: 5.32k, False: 4.04M]
  ------------------
 5379|  62.8k|                nslots = 2;
 5380|  62.8k|                slots[0] = (code[pc] >> 8) & 0xFFU;
 5381|  62.8k|                slots[1] = (code[pc] >> 16) & 0xFFU;
 5382|  62.8k|                break;
 5383|   256k|            case JINT_SSS:
  ------------------
  |  Branch (5383:13): [True: 256k, False: 3.79M]
  ------------------
 5384|   256k|                nslots = 3;
 5385|   256k|                slots[0] = (code[pc] >> 8) & 0xFFU;
 5386|   256k|                slots[1] = (code[pc] >> 16) & 0xFFU;
 5387|   256k|                slots[2] = code[pc] >> 24;
 5388|   256k|                break;
 5389|  4.05M|        }
 5390|       |        /* Find new slots */
 5391|  9.12M|        for (int i = 0; i < nslots; i++) {
  ------------------
  |  Branch (5391:25): [True: 5.13M, False: 3.99M]
  ------------------
 5392|  5.13M|            if (remap[slots[i]] == -1) {
  ------------------
  |  Branch (5392:17): [True: 1.06M, False: 4.06M]
  ------------------
 5393|  1.09M|                while (invert[next_slot] != -1) next_slot++;
  ------------------
  |  Branch (5393:24): [True: 31.6k, False: 1.06M]
  ------------------
 5394|  1.06M|                remap[slots[i]] = next_slot;
 5395|  1.06M|                invert[next_slot] = slots[i];
 5396|  1.06M|                next_slot++;
 5397|  1.06M|            }
 5398|  5.13M|            slots[i] = remap[slots[i]];
 5399|  5.13M|        }
 5400|       |        /* Now rewrite */
 5401|  3.99M|        switch (itype) {
  ------------------
  |  Branch (5401:17): [True: 3.99M, False: 0]
  ------------------
 5402|      0|            case JINT_0:
  ------------------
  |  Branch (5402:13): [True: 0, False: 3.99M]
  ------------------
 5403|      0|            case JINT_L:
  ------------------
  |  Branch (5403:13): [True: 0, False: 3.99M]
  ------------------
 5404|      0|                continue;
 5405|  1.28M|            case JINT_S:
  ------------------
  |  Branch (5405:13): [True: 1.28M, False: 2.71M]
  ------------------
 5406|  1.28M|                code[pc] = (code[pc] & 0xFFU) | (slots[0] << 8);
 5407|  1.28M|                break;
 5408|   227k|            case JINT_SES:
  ------------------
  |  Branch (5408:13): [True: 227k, False: 3.76M]
  ------------------
 5409|   286k|            case JINT_SI:
  ------------------
  |  Branch (5409:13): [True: 58.9k, False: 3.93M]
  ------------------
 5410|   286k|            case JINT_SU:
  ------------------
  |  Branch (5410:13): [True: 0, False: 3.99M]
  ------------------
 5411|   286k|            case JINT_ST:
  ------------------
  |  Branch (5411:13): [True: 0, False: 3.99M]
  ------------------
 5412|   402k|            case JINT_SL:
  ------------------
  |  Branch (5412:13): [True: 115k, False: 3.87M]
  ------------------
 5413|   623k|            case JINT_SD:
  ------------------
  |  Branch (5413:13): [True: 221k, False: 3.77M]
  ------------------
 5414|  1.83M|            case JINT_SC:
  ------------------
  |  Branch (5414:13): [True: 1.21M, False: 2.78M]
  ------------------
 5415|  1.83M|                code[pc] = (code[pc] & 0xFFFF00FFU) | ((slots[0] & 0xFF) << 8);
 5416|  1.83M|                break;
 5417|   560k|            case JINT_SS:
  ------------------
  |  Branch (5417:13): [True: 560k, False: 3.43M]
  ------------------
 5418|   560k|                code[pc] = (code[pc] & 0xFFU) | ((slots[0] & 0xFF) << 8) | (slots[1] << 16);
 5419|   560k|                break;
 5420|  57.5k|            case JINT_SSI:
  ------------------
  |  Branch (5420:13): [True: 57.5k, False: 3.93M]
  ------------------
 5421|  62.8k|            case JINT_SSU:
  ------------------
  |  Branch (5421:13): [True: 5.32k, False: 3.98M]
  ------------------
 5422|  62.8k|                code[pc] = (code[pc] & 0xFF0000FFU) | ((slots[0] & 0xFF) << 8) | ((slots[1] & 0xFF) << 16);
 5423|  62.8k|                break;
 5424|   256k|            case JINT_SSS:
  ------------------
  |  Branch (5424:13): [True: 256k, False: 3.73M]
  ------------------
 5425|   256k|                code[pc] = (code[pc] & 0xFFU) | ((slots[0] & 0xFF) << 8)  | ((slots[1] & 0xFF) << 16) | (slots[2] << 24);
 5426|   256k|                break;
 5427|  3.99M|        }
 5428|  3.99M|    }
 5429|       |    /* Fix symbol mappings */
 5430|   590k|    int32_t smout = 0;
 5431|  1.01M|    for (int32_t i = 0; i < def->symbolmap_length; i++) {
  ------------------
  |  Branch (5431:25): [True: 420k, False: 590k]
  ------------------
 5432|   420k|        if (def->symbolmap[i].birth_pc == UINT32_MAX) {
  ------------------
  |  Branch (5432:13): [True: 303k, False: 116k]
  ------------------
 5433|   303k|            smout++;
 5434|   303k|            continue; /* upvalue */
 5435|   303k|        }
 5436|   116k|        JanetSymbolMap sm = def->symbolmap[i];
 5437|   116k|        uint32_t old_slot = sm.slot_index;
 5438|   116k|        if (remap[old_slot] != -1) { /* If not remapped, drop! */
  ------------------
  |  Branch (5438:13): [True: 75.2k, False: 41.6k]
  ------------------
 5439|  75.2k|            sm.slot_index = (uint32_t) remap[old_slot];
 5440|  75.2k|            def->symbolmap[smout++] = sm;
 5441|  75.2k|        }
 5442|   116k|    }
 5443|   590k|    def->symbolmap_length = smout;
 5444|   590k|    if (greatest + 1 > next_slot) next_slot = greatest + 1;
  ------------------
  |  Branch (5444:9): [True: 15.4k, False: 575k]
  ------------------
 5445|   590k|    def->slotcount = next_slot;
 5446|   590k|    janet_free(remap);
  ------------------
  |  | 2415|   590k|#define janet_free(X) free((X))
  ------------------
 5447|   590k|}
janet_bytecode_optimize:
 5589|   591k|void janet_bytecode_optimize(JanetFuncDef *def, int32_t level) {
 5590|   591k|    int32_t delta;
 5591|       |#ifdef JANET_DEBUG
 5592|       |    int result = janet_verify(def);
 5593|       |    if (result != 0) {
 5594|       |        for (int32_t i = 0; i < def->bytecode_length; i++) {
 5595|       |            janet_eprintf("%4d: %Q\n", i, janet_asm_decode_instruction(def->bytecode[i]));
 5596|       |        }
 5597|       |    }
 5598|       |    janet_assert(result == 0, "input bytecode bad");
 5599|       |#endif
 5600|   591k|    if (level >= 0) {
  ------------------
  |  Branch (5600:9): [True: 591k, False: 0]
  ------------------
 5601|   777k|        do { /* Fixpoint for instruction removal */
 5602|   777k|            int32_t before = def->bytecode_length;
 5603|   777k|            janet_bytecode_jump_threading(def);
 5604|   777k|            {
 5605|   777k|                int32_t nblocks = 0;
 5606|   777k|                BytecodeBB *basic_blocks = janet_bytecode_basic_blocks(def, &nblocks);
 5607|   777k|                janet_assert(nblocks > 0, "no blocks");
  ------------------
  |  |  389|   777k|#define janet_assert(c, m) do { \
  |  |  390|   777k|    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: 777k]
  |  |  ------------------
  |  |  391|   777k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 777k]
  |  |  ------------------
  ------------------
 5608|   777k|                if (level >= 1) {
  ------------------
  |  Branch (5608:21): [True: 0, False: 777k]
  ------------------
 5609|       |                    /* TODO - allow limited value numbering at optimize = 0.
 5610|       |                     * Constant folding can currently remove named slots which can break debug info */
 5611|      0|                    janet_bytecode_local_value_numbering(def, basic_blocks, nblocks);
 5612|      0|                }
 5613|       |                /* This will currently also break debug info, although less severely than
 5614|       |                 * value numbering. At optimize=0, we should pin all named slots but allow
 5615|       |                 * constant propogation for anonymous intermediate computations */
 5616|   777k|                janet_bytecode_movopt_full(def, basic_blocks, nblocks);
 5617|   777k|                janet_free(basic_blocks);
  ------------------
  |  | 2415|   777k|#define janet_free(X) free((X))
  ------------------
 5618|   777k|            }
 5619|      0|            janet_bytecode_dead_code(def);
 5620|   777k|            janet_bytecode_remove_noops(def);
 5621|   777k|            delta = def->bytecode_length - before;
 5622|       |#ifdef JANET_BOOTSTRAP
 5623|       |            total_optimize_fixpoint_loops++;
 5624|       |#endif
 5625|   777k|        } while (delta < 0);
  ------------------
  |  Branch (5625:18): [True: 185k, False: 591k]
  ------------------
 5626|   591k|        janet_bytecode_remove_unused_constants(def);
 5627|   591k|        janet_bytecode_remove_unused_closures(def);
 5628|   591k|        janet_bytecode_compact_slots(def);
 5629|   591k|    }
 5630|       |#ifdef JANET_BOOTSTRAP
 5631|       |    total_instruction_count += def->bytecode_length;
 5632|       |    total_funcdefs_optimized++;
 5633|       |#endif
 5634|   591k|}
janet_verify:
 5637|  5.34M|int janet_verify(JanetFuncDef *def) {
 5638|       |    /* vararg, structarg and namedargs each reserve a tuple slot at index arity */
 5639|  5.34M|    int vargs = !!(def->flags & (JANET_FUNCDEF_FLAG_VARARG | JANET_FUNCDEF_FLAG_STRUCTARG | JANET_FUNCDEF_FLAG_NAMEDARGS));
  ------------------
  |  | 1097|  5.34M|#define JANET_FUNCDEF_FLAG_VARARG 0x10000
  ------------------
                  int vargs = !!(def->flags & (JANET_FUNCDEF_FLAG_VARARG | JANET_FUNCDEF_FLAG_STRUCTARG | JANET_FUNCDEF_FLAG_NAMEDARGS));
  ------------------
  |  | 1105|  5.34M|#define JANET_FUNCDEF_FLAG_STRUCTARG 0x1000000
  ------------------
                  int vargs = !!(def->flags & (JANET_FUNCDEF_FLAG_VARARG | JANET_FUNCDEF_FLAG_STRUCTARG | JANET_FUNCDEF_FLAG_NAMEDARGS));
  ------------------
  |  | 1107|  5.34M|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
 5640|  5.34M|    int32_t i;
 5641|  5.34M|    int32_t maxslot = def->arity + vargs;
 5642|  5.34M|    int32_t sc = def->slotcount;
 5643|       |
 5644|  5.34M|    if (def->environments_length > 256) return 15;
  ------------------
  |  Branch (5644:9): [True: 0, False: 5.34M]
  ------------------
 5645|  5.34M|    if (def->bytecode_length == 0) return 1;
  ------------------
  |  Branch (5645:9): [True: 0, False: 5.34M]
  ------------------
 5646|       |
 5647|       |    /* Named args are the first named_args_count constants, so the count must fit the constant array */
 5648|  5.34M|    if ((def->flags & JANET_FUNCDEF_FLAG_NAMEDARGS) &&
  ------------------
  |  | 1107|  5.34M|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (5648:9): [True: 19.8k, False: 5.32M]
  ------------------
 5649|  19.8k|            (def->named_args_count < 0 || def->named_args_count > def->constants_length))
  ------------------
  |  Branch (5649:14): [True: 0, False: 19.8k]
  |  Branch (5649:43): [True: 0, False: 19.8k]
  ------------------
 5650|      0|        return 17;
 5651|       |
 5652|       |    /* Environment indices must be -1 or non-negative */
 5653|  7.32M|    for (i = 0; i < def->environments_length; i++) {
  ------------------
  |  Branch (5653:17): [True: 1.97M, False: 5.34M]
  ------------------
 5654|  1.97M|        if (def->environments[i] < -1) return 16;
  ------------------
  |  Branch (5654:13): [True: 0, False: 1.97M]
  ------------------
 5655|  1.97M|    }
 5656|       |
 5657|  5.34M|    if (maxslot > sc) return 2;
  ------------------
  |  Branch (5657:9): [True: 4, False: 5.34M]
  ------------------
 5658|       |
 5659|       |    /* Verify each instruction */
 5660|   152M|    for (i = 0; i < def->bytecode_length; i++) {
  ------------------
  |  Branch (5660:17): [True: 147M, False: 5.41M]
  ------------------
 5661|   147M|        uint32_t instr = def->bytecode[i];
 5662|       |        /* Check for invalid instructions */
 5663|   147M|        if ((instr & 0x7F) >= JOP_INSTRUCTION_COUNT) {
  ------------------
  |  Branch (5663:13): [True: 1, False: 147M]
  ------------------
 5664|      1|            return 3;
 5665|      1|        }
 5666|   147M|        enum JanetInstructionType type = janet_instructions[instr & 0x7F];
 5667|   147M|        switch (type) {
  ------------------
  |  Branch (5667:17): [True: 147M, False: 18.4E]
  ------------------
 5668|   776k|            case JINT_0:
  ------------------
  |  Branch (5668:13): [True: 776k, False: 146M]
  ------------------
 5669|   776k|                continue;
 5670|  28.3M|            case JINT_S: {
  ------------------
  |  Branch (5670:13): [True: 28.3M, False: 119M]
  ------------------
 5671|  28.3M|                if ((int32_t)(instr >> 8) >= sc) return 4;
  ------------------
  |  Branch (5671:21): [True: 7, False: 28.3M]
  ------------------
 5672|  28.3M|                continue;
 5673|  28.3M|            }
 5674|  28.3M|            case JINT_SI:
  ------------------
  |  Branch (5674:13): [True: 3.36M, False: 144M]
  ------------------
 5675|  3.36M|            case JINT_SU:
  ------------------
  |  Branch (5675:13): [True: 0, False: 147M]
  ------------------
 5676|  3.36M|            case JINT_ST: {
  ------------------
  |  Branch (5676:13): [True: 39, False: 147M]
  ------------------
 5677|  3.36M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5677:21): [True: 2, False: 3.36M]
  ------------------
 5678|  3.36M|                continue;
 5679|  3.36M|            }
 5680|  6.18M|            case JINT_L: {
  ------------------
  |  Branch (5680:13): [True: 6.18M, False: 141M]
  ------------------
 5681|  6.18M|                int32_t jumpdest = i + (((int32_t)instr) >> 8);
 5682|  6.18M|                if (jumpdest < 0 || jumpdest >= def->bytecode_length) return 5;
  ------------------
  |  Branch (5682:21): [True: 18.4E, False: 6.18M]
  |  Branch (5682:37): [True: 18.4E, False: 6.18M]
  ------------------
 5683|  6.18M|                continue;
 5684|  6.18M|            }
 5685|  39.5M|            case JINT_SS: {
  ------------------
  |  Branch (5685:13): [True: 39.5M, False: 108M]
  ------------------
 5686|  39.5M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc ||
  ------------------
  |  Branch (5686:21): [True: 18.4E, False: 39.5M]
  ------------------
 5687|  39.5M|                        (int32_t)(instr >> 16) >= sc) return 4;
  ------------------
  |  Branch (5687:25): [True: 18.4E, False: 39.5M]
  ------------------
 5688|  39.5M|                continue;
 5689|  39.5M|            }
 5690|  39.5M|            case JINT_SSI:
  ------------------
  |  Branch (5690:13): [True: 2.59M, False: 144M]
  ------------------
 5691|  4.13M|            case JINT_SSU: {
  ------------------
  |  Branch (5691:13): [True: 1.54M, False: 146M]
  ------------------
 5692|  4.13M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc ||
  ------------------
  |  Branch (5692:21): [True: 67, False: 4.13M]
  ------------------
 5693|  4.13M|                        (int32_t)((instr >> 16) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5693:25): [True: 18.4E, False: 4.13M]
  ------------------
 5694|  4.13M|                continue;
 5695|  4.13M|            }
 5696|  10.7M|            case JINT_SL: {
  ------------------
  |  Branch (5696:13): [True: 10.7M, False: 136M]
  ------------------
 5697|  10.7M|                int32_t jumpdest = i + (((int32_t)instr) >> 16);
 5698|  10.7M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5698:21): [True: 1, False: 10.7M]
  ------------------
 5699|  10.7M|                if (jumpdest < 0 || jumpdest >= def->bytecode_length) return 5;
  ------------------
  |  Branch (5699:21): [True: 18.4E, False: 10.7M]
  |  Branch (5699:37): [True: 18.4E, False: 10.7M]
  ------------------
 5700|  10.7M|                continue;
 5701|  10.7M|            }
 5702|  19.8M|            case JINT_SSS: {
  ------------------
  |  Branch (5702:13): [True: 19.8M, False: 127M]
  ------------------
 5703|  19.8M|                if (((int32_t)(instr >> 8) & 0xFF) >= sc ||
  ------------------
  |  Branch (5703:21): [True: 18.4E, False: 19.8M]
  ------------------
 5704|  19.8M|                        ((int32_t)(instr >> 16) & 0xFF) >= sc ||
  ------------------
  |  Branch (5704:25): [True: 18.4E, False: 19.8M]
  ------------------
 5705|  19.8M|                        ((int32_t)(instr >> 24) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5705:25): [True: 18.4E, False: 19.8M]
  ------------------
 5706|  19.8M|                continue;
 5707|  19.8M|            }
 5708|  19.8M|            case JINT_SD: {
  ------------------
  |  Branch (5708:13): [True: 1.57M, False: 145M]
  ------------------
 5709|  1.57M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5709:21): [True: 1, False: 1.57M]
  ------------------
 5710|  1.57M|                if ((int32_t)(instr >> 16) >= def->defs_length) return 6;
  ------------------
  |  Branch (5710:21): [True: 7, False: 1.57M]
  ------------------
 5711|  1.57M|                continue;
 5712|  1.57M|            }
 5713|  26.9M|            case JINT_SC: {
  ------------------
  |  Branch (5713:13): [True: 26.9M, False: 120M]
  ------------------
 5714|  26.9M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5714:21): [True: 1, False: 26.9M]
  ------------------
 5715|  26.9M|                if ((int32_t)(instr >> 16) >= def->constants_length) return 7;
  ------------------
  |  Branch (5715:21): [True: 2, False: 26.9M]
  ------------------
 5716|  26.9M|                continue;
 5717|  26.9M|            }
 5718|  26.9M|            case JINT_SES: {
  ------------------
  |  Branch (5718:13): [True: 6.13M, False: 141M]
  ------------------
 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|  6.13M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (5722:21): [True: 2, False: 6.13M]
  ------------------
 5723|  6.13M|                if ((int32_t)((instr >> 16) & 0xFF) >= def->environments_length) return 8;
  ------------------
  |  Branch (5723:21): [True: 2, False: 6.13M]
  ------------------
 5724|  6.13M|                continue;
 5725|  6.13M|            }
 5726|   147M|        }
 5727|   147M|    }
 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|  5.41M|    {
 5734|  5.41M|        uint32_t lastop = def->bytecode[def->bytecode_length - 1] & 0xFF;
 5735|  5.41M|        switch (lastop) {
 5736|      2|            default:
  ------------------
  |  Branch (5736:13): [True: 2, False: 5.41M]
  ------------------
 5737|      2|                return 9;
 5738|  3.14M|            case JOP_RETURN:
  ------------------
  |  Branch (5738:13): [True: 3.14M, False: 2.27M]
  ------------------
 5739|  3.54M|            case JOP_RETURN_NIL:
  ------------------
  |  Branch (5739:13): [True: 408k, False: 5.00M]
  ------------------
 5740|  3.55M|            case JOP_JUMP:
  ------------------
  |  Branch (5740:13): [True: 9.93k, False: 5.40M]
  ------------------
 5741|  3.62M|            case JOP_ERROR:
  ------------------
  |  Branch (5741:13): [True: 69.5k, False: 5.34M]
  ------------------
 5742|  5.34M|            case JOP_TAILCALL:
  ------------------
  |  Branch (5742:13): [True: 1.71M, False: 3.69M]
  ------------------
 5743|  5.34M|                break;
 5744|  5.41M|        }
 5745|  5.41M|    }
 5746|       |
 5747|       |    /* Verify debug info - slotmapping, etc. */
 5748|  55.9M|    for (int32_t i = def->symbolmap_length - 1; i >= 0; i--) {
  ------------------
  |  Branch (5748:49): [True: 50.6M, False: 5.34M]
  ------------------
 5749|  50.6M|        JanetSymbolMap jsm = def->symbolmap[i];
 5750|  50.6M|        if (jsm.birth_pc == UINT32_MAX) {
  ------------------
  |  Branch (5750:13): [True: 26.0M, False: 24.5M]
  ------------------
 5751|  26.0M|            if (jsm.death_pc >= (uint32_t) def->environments_length) {
  ------------------
  |  Branch (5751:17): [True: 0, False: 26.0M]
  ------------------
 5752|      0|                return 10;
 5753|       |                /* We should also check jsm.slot_index */
 5754|      0|            }
 5755|  26.0M|        } else {
 5756|  24.5M|            if (jsm.slot_index >= (uint32_t) def->slotcount) {
  ------------------
  |  Branch (5756:17): [True: 0, False: 24.5M]
  ------------------
 5757|      0|                return 11;
 5758|      0|            }
 5759|  24.5M|            if (jsm.birth_pc != UINT32_MAX && jsm.birth_pc >= (uint32_t) def->bytecode_length) {
  ------------------
  |  Branch (5759:17): [True: 24.5M, False: 18.4E]
  |  Branch (5759:47): [True: 0, False: 24.5M]
  ------------------
 5760|      0|                return 12;
 5761|      0|            }
 5762|  24.5M|            if (jsm.death_pc != UINT32_MAX && jsm.death_pc > (uint32_t) def->bytecode_length) {
  ------------------
  |  Branch (5762:17): [True: 24.5M, False: 18.4E]
  |  Branch (5762:47): [True: 0, False: 24.5M]
  ------------------
 5763|      0|                return 13;
 5764|      0|            }
 5765|  24.5M|        }
 5766|  50.6M|        if (jsm.symbol == NULL) {
  ------------------
  |  Branch (5766:13): [True: 0, False: 50.6M]
  ------------------
 5767|      0|            return 14;
 5768|      0|        }
 5769|  50.6M|    }
 5770|       |
 5771|  5.34M|    return 0;
 5772|  5.34M|}
janet_funcdef_alloc:
 5776|   591k|JanetFuncDef *janet_funcdef_alloc(void) {
 5777|   591k|    JanetFuncDef *def = janet_gcalloc(JANET_MEMORY_FUNCDEF, sizeof(JanetFuncDef));
 5778|   591k|    def->environments = NULL;
 5779|   591k|    def->constants = NULL;
 5780|   591k|    def->bytecode = NULL;
 5781|   591k|    def->closure_bitset = NULL;
 5782|   591k|    def->flags = 0;
 5783|   591k|    def->slotcount = 0;
 5784|   591k|    def->symbolmap = NULL;
 5785|   591k|    def->arity = 0;
 5786|   591k|    def->min_arity = 0;
 5787|   591k|    def->max_arity = INT32_MAX;
 5788|   591k|    def->source = NULL;
 5789|   591k|    def->sourcemap = NULL;
 5790|   591k|    def->name = NULL;
 5791|       |    def->defs = NULL;
 5792|   591k|    def->defs_length = 0;
 5793|   591k|    def->constants_length = 0;
 5794|   591k|    def->bytecode_length = 0;
 5795|   591k|    def->environments_length = 0;
 5796|   591k|    def->symbolmap_length = 0;
 5797|   591k|    def->named_args_count = 0;
 5798|   591k|    return def;
 5799|   591k|}
janet_thunk:
 5802|   241k|JanetFunction *janet_thunk(JanetFuncDef *def) {
 5803|   241k|    JanetFunction *func = janet_gcalloc(JANET_MEMORY_FUNCTION, sizeof(JanetFunction));
 5804|   241k|    func->def = def;
 5805|   241k|    janet_assert(def->environments_length == 0, "tried to create thunk that needs upvalues");
  ------------------
  |  |  389|   241k|#define janet_assert(c, m) do { \
  |  |  390|   241k|    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: 241k]
  |  |  ------------------
  |  |  391|   241k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 241k]
  |  |  ------------------
  ------------------
 5806|   241k|    return func;
 5807|   241k|}
janet_signalv:
 5882|  9.59k|void janet_signalv(JanetSignal sig, Janet message) {
 5883|  9.59k|    if (janet_vm.return_reg != NULL) {
  ------------------
  |  Branch (5883:9): [True: 9.59k, False: 0]
  ------------------
 5884|       |        /* Should match logic in janet_call for coercing everything not ok to an error (no awaits, yields, etc.) */
 5885|  9.59k|        if (janet_vm.coerce_error && sig != JANET_SIGNAL_OK) {
  ------------------
  |  Branch (5885:13): [True: 41, False: 9.55k]
  |  Branch (5885:38): [True: 41, False: 0]
  ------------------
 5886|     41|#ifdef JANET_EV
 5887|     41|            if (NULL != janet_vm.root_fiber && sig == JANET_SIGNAL_EVENT) {
  ------------------
  |  Branch (5887:17): [True: 41, False: 0]
  |  Branch (5887:48): [True: 0, False: 41]
  ------------------
 5888|      0|                janet_vm.root_fiber->sched_id++;
 5889|      0|            }
 5890|     41|#endif
 5891|     41|            if (sig != JANET_SIGNAL_ERROR) {
  ------------------
  |  Branch (5891:17): [True: 0, False: 41]
  ------------------
 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|     41|            sig = JANET_SIGNAL_ERROR;
 5895|     41|        }
 5896|  9.59k|        *janet_vm.return_reg = message;
 5897|  9.59k|        if (NULL != janet_vm.fiber) {
  ------------------
  |  Branch (5897:13): [True: 9.59k, False: 1]
  ------------------
 5898|  9.59k|            janet_vm.fiber->flags |= JANET_FIBER_DID_LONGJUMP;
  ------------------
  |  |  814|  9.59k|#define JANET_FIBER_DID_LONGJUMP     0x8000000
  ------------------
 5899|  9.59k|        }
 5900|       |#if defined(JANET_BSD) || defined(JANET_APPLE)
 5901|       |        _longjmp(*janet_vm.signal_buf, sig);
 5902|       |#else
 5903|  9.59k|        longjmp(*janet_vm.signal_buf, sig);
 5904|  9.59k|#endif
 5905|  9.59k|    } 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|  9.59k|}
janet_panicv:
 5911|  4.51k|void janet_panicv(Janet message) {
 5912|  4.51k|    janet_signalv(JANET_SIGNAL_ERROR, message);
 5913|  4.51k|}
janet_panicf:
 5915|  4.33k|void janet_panicf(const char *format, ...) {
 5916|  4.33k|    va_list args;
 5917|  4.33k|    const uint8_t *ret;
 5918|  4.33k|    JanetBuffer buffer;
 5919|  4.33k|    int32_t len = 0;
 5920|   148k|    while (format[len]) len++;
  ------------------
  |  Branch (5920:12): [True: 143k, False: 4.33k]
  ------------------
 5921|  4.33k|    janet_buffer_init(&buffer, len);
 5922|  4.33k|    va_start(args, format);
 5923|  4.33k|    janet_formatbv(&buffer, format, args);
 5924|       |    va_end(args);
 5925|  4.33k|    ret = janet_string(buffer.data, buffer.count);
 5926|  4.33k|    janet_buffer_deinit(&buffer);
 5927|  4.33k|    janet_panics(ret);
 5928|  4.33k|}
janet_panic:
 5930|    142|void janet_panic(const char *message) {
 5931|    142|    janet_panicv(janet_cstringv(message));
  ------------------
  |  | 1826|    142|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  848|    142|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|    142|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    142|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    142|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5932|    142|}
janet_panics:
 5934|  4.33k|void janet_panics(const uint8_t *message) {
 5935|  4.33k|    janet_panicv(janet_wrap_string(message));
  ------------------
  |  |  848|  4.33k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  4.33k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.33k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.33k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5936|  4.33k|}
janet_panic_type:
 5938|  1.55k|void janet_panic_type(Janet x, int32_t n, int expected) {
 5939|  1.55k|    janet_panicf("bad slot #%d, expected %T, got %v", n, expected, x);
 5940|  1.55k|}
janet_panic_abstract:
 5942|     59|void janet_panic_abstract(Janet x, int32_t n, const JanetAbstractType *at) {
 5943|     59|    janet_panicf("bad slot #%d, expected %s, got %v", n, at->name, x);
 5944|     59|}
janet_fixarity:
 5946|   233M|void janet_fixarity(int32_t arity, int32_t fix) {
 5947|   233M|    if (arity != fix)
  ------------------
  |  Branch (5947:9): [True: 98, False: 233M]
  ------------------
 5948|     98|        janet_panicf("arity mismatch, expected %d, got %d", fix, arity);
 5949|   233M|}
janet_arity:
 5951|   126M|void janet_arity(int32_t arity, int32_t min, int32_t max) {
 5952|   126M|    if (min >= 0 && arity < min)
  ------------------
  |  Branch (5952:9): [True: 126M, False: 2]
  |  Branch (5952:21): [True: 41, False: 126M]
  ------------------
 5953|     41|        janet_panicf("arity mismatch, expected at least %d, got %d", min, arity);
 5954|   126M|    if (max >= 0 && arity > max)
  ------------------
  |  Branch (5954:9): [True: 34.8M, False: 91.3M]
  |  Branch (5954:21): [True: 81, False: 34.8M]
  ------------------
 5955|     81|        janet_panicf("arity mismatch, expected at most %d, got %d", max, arity);
 5956|   126M|}
janet_getmethod:
 5982|  8.62M|int janet_getmethod(const uint8_t *method, const JanetMethod *methods, Janet *out) {
 5983|  67.6M|    while (methods->name) {
  ------------------
  |  Branch (5983:12): [True: 67.6M, False: 20]
  ------------------
 5984|  67.6M|        if (!janet_cstrcmp(method, methods->name)) {
  ------------------
  |  Branch (5984:13): [True: 8.62M, False: 59.0M]
  ------------------
 5985|  8.62M|            *out = janet_wrap_cfunction(methods->cfun);
  ------------------
  |  |  853|  8.62M|#define janet_wrap_cfunction(s) janet_nanbox_wrap_((s), JANET_CFUNCTION)
  |  |  ------------------
  |  |  |  |  825|  8.62M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.62M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.62M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5986|  8.62M|            return 1;
 5987|  8.62M|        }
 5988|  59.0M|        methods++;
 5989|  59.0M|    }
 5990|     20|    return 0;
 5991|  8.62M|}
janet_nextmethod:
 5993|  24.0M|Janet janet_nextmethod(const JanetMethod *methods, Janet key) {
 5994|  24.0M|    if (!janet_checktype(key, JANET_NIL)) {
  ------------------
  |  |  806|  24.0M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 24.0M]
  |  |  ------------------
  |  |  807|  24.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|  24.0M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  24.0M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  24.0M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  24.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  24.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5994:9): [True: 23.1M, False: 963k]
  ------------------
 5995|   288M|        while (methods->name) {
  ------------------
  |  Branch (5995:16): [True: 288M, False: 0]
  ------------------
 5996|   288M|            if (janet_keyeq(key, methods->name)) {
  ------------------
  |  Branch (5996:17): [True: 23.1M, False: 265M]
  ------------------
 5997|  23.1M|                methods++;
 5998|  23.1M|                break;
 5999|  23.1M|            }
 6000|   265M|            methods++;
 6001|   265M|        }
 6002|  23.1M|    }
 6003|  24.0M|    if (methods->name) {
  ------------------
  |  Branch (6003:9): [True: 23.1M, False: 962k]
  ------------------
 6004|  23.1M|        return janet_ckeywordv(methods->name);
  ------------------
  |  | 1843|  23.1M|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  23.1M|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  23.1M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  23.1M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  23.1M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6005|  23.1M|    } else {
 6006|   962k|        return janet_wrap_nil();
  ------------------
  |  |  831|   962k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   962k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   962k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   962k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6007|   962k|    }
 6008|  24.0M|}
janet_optcstring:
 6041|   528k|const char *janet_optcstring(const Janet *argv, int32_t argc, int32_t n, const char *dflt) {
 6042|   528k|    if (n >= argc || janet_checktype(argv[n], JANET_NIL)) {
  ------------------
  |  |  806|   497k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 271, False: 497k]
  |  |  |  Branch (806:6): [Folded, False: 497k]
  |  |  ------------------
  |  |  807|   497k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   497k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   497k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   497k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   497k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   497k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6042:9): [True: 31.5k, False: 497k]
  ------------------
 6043|  31.8k|        return dflt;
 6044|  31.8k|    }
 6045|   497k|    return janet_getcstring(argv, n);
 6046|   528k|}
janet_getcstring:
 6052|   630k|const char *janet_getcstring(const Janet *argv, int32_t n) {
 6053|   630k|    if (!janet_checktype(argv[n], JANET_STRING)) {
  ------------------
  |  |  806|   630k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 630k]
  |  |  ------------------
  |  |  807|   630k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   630k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   630k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   630k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   630k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   630k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6053:9): [True: 17, False: 630k]
  ------------------
 6054|     17|        janet_panic_type(argv[n], n, JANET_TFLAG_STRING);
  ------------------
  |  |  599|     17|#define JANET_TFLAG_STRING (1 << JANET_STRING)
  ------------------
 6055|     17|    }
 6056|   630k|    return janet_getcbytes(argv, n);
 6057|   630k|}
janet_getcbytes:
 6059|   630k|const char *janet_getcbytes(const Janet *argv, int32_t n) {
 6060|       |    /* Ensure buffer 0-padded */
 6061|   630k|    if (janet_checktype(argv[n], JANET_BUFFER)) {
  ------------------
  |  |  806|   630k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 9, False: 630k]
  |  |  |  Branch (806:6): [Folded, False: 630k]
  |  |  ------------------
  |  |  807|   630k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   630k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   630k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   630k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   630k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   630k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6062|      9|        JanetBuffer *b = janet_unwrap_buffer(argv[n]);
  ------------------
  |  |  862|      9|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
 6063|      9|        if ((b->gc.flags & JANET_BUFFER_FLAG_NO_REALLOC) && b->count == b->capacity) {
  ------------------
  |  | 1780|      9|#define JANET_BUFFER_FLAG_NO_REALLOC 0x10000
  ------------------
  |  Branch (6063:13): [True: 0, False: 9]
  |  Branch (6063:61): [True: 0, False: 0]
  ------------------
 6064|       |            /* Make a copy with janet_smalloc in the rare case we have a buffer that
 6065|       |             * cannot be realloced and pushing a 0 byte would panic. */
 6066|      0|            char *new_string = janet_smalloc(b->count + 1);
 6067|      0|            memcpy(new_string, b->data, b->count);
 6068|      0|            new_string[b->count] = 0;
 6069|      0|            if (strlen(new_string) != (size_t) b->count) goto badzeros;
  ------------------
  |  Branch (6069:17): [True: 0, False: 0]
  ------------------
 6070|      0|            return new_string;
 6071|      9|        } else {
 6072|       |            /* Ensure trailing 0 */
 6073|      9|            janet_buffer_push_u8(b, 0);
 6074|      9|            b->count--;
 6075|      9|            if (strlen((char *)b->data) != (size_t) b->count) goto badzeros;
  ------------------
  |  Branch (6075:17): [True: 1, False: 8]
  ------------------
 6076|      8|            return (const char *) b->data;
 6077|      9|        }
 6078|      9|    }
 6079|   630k|    JanetByteView view = janet_getbytes(argv, n);
 6080|   630k|    const char *cstr = (const char *)view.bytes;
 6081|   630k|    if (strlen(cstr) != (size_t) view.len) goto badzeros;
  ------------------
  |  Branch (6081:9): [True: 2, False: 630k]
  ------------------
 6082|   630k|    return cstr;
 6083|       |
 6084|      3|badzeros:
 6085|      3|    janet_panic("bytes contain embedded 0s");
 6086|   630k|}
janet_getnat:
 6095|   459k|int32_t janet_getnat(const Janet *argv, int32_t n) {
 6096|   459k|    Janet x = argv[n];
 6097|   459k|    if (!janet_checkint(x)) goto bad;
  ------------------
  |  Branch (6097:9): [True: 20, False: 459k]
  ------------------
 6098|   459k|    int32_t ret = janet_unwrap_integer(x);
  ------------------
  |  |  966|   459k|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|   459k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
 6099|   459k|    if (ret < 0) goto bad;
  ------------------
  |  Branch (6099:9): [True: 15, False: 459k]
  ------------------
 6100|   459k|    return ret;
 6101|     35|bad:
 6102|     35|    janet_panicf("bad slot #%d, expected non-negative 32 bit signed integer, got %v", n, x);
 6103|   459k|}
janet_checkabstract:
 6105|     65|JanetAbstract janet_checkabstract(Janet x, const JanetAbstractType *at) {
 6106|     65|    if (!janet_checktype(x, JANET_ABSTRACT)) return NULL;
  ------------------
  |  |  806|     65|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 65]
  |  |  ------------------
  |  |  807|     65|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     65|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     65|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     65|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     65|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     65|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6106:9): [True: 50, False: 15]
  ------------------
 6107|     15|    JanetAbstract a = janet_unwrap_abstract(x);
  ------------------
  |  |  866|     15|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
 6108|     15|    if (janet_abstract_type(a) != at) return NULL;
  ------------------
  |  | 1899|     15|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|     15|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (6108:9): [True: 2, False: 13]
  ------------------
 6109|     13|    return a;
 6110|     15|}
janet_keyeq:
 6117|   288M|int janet_keyeq(Janet x, const char *cstring) {
 6118|   288M|    return janet_strlike_cmp(JANET_KEYWORD, x, cstring);
 6119|   288M|}
janet_symeq:
 6125|   163k|int janet_symeq(Janet x, const char *cstring) {
 6126|   163k|    return janet_strlike_cmp(JANET_SYMBOL, x, cstring);
 6127|   163k|}
janet_getinteger:
 6129|  63.6M|int32_t janet_getinteger(const Janet *argv, int32_t n) {
 6130|  63.6M|    Janet x = argv[n];
 6131|  63.6M|    if (!janet_checkint(x)) {
  ------------------
  |  Branch (6131:9): [True: 63, False: 63.6M]
  ------------------
 6132|     63|        janet_panicf("bad slot #%d, expected 32 bit signed integer, got %v", n, x);
 6133|     63|    }
 6134|  63.6M|    return janet_unwrap_integer(x);
  ------------------
  |  |  966|  63.6M|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|  63.6M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
 6135|  63.6M|}
janet_getinteger64:
 6177|  1.54k|int64_t janet_getinteger64(const Janet *argv, int32_t n) {
 6178|  1.54k|#ifdef JANET_INT_TYPES
 6179|  1.54k|    return janet_unwrap_s64(argv[n]);
 6180|       |#else
 6181|       |    Janet x = argv[n];
 6182|       |    if (!janet_checkint64(x)) {
 6183|       |        janet_panicf("bad slot #%d, expected 64 bit signed integer, got %v", n, x);
 6184|       |    }
 6185|       |    return (int64_t) janet_unwrap_number(x);
 6186|       |#endif
 6187|  1.54k|}
janet_getuinteger64:
 6189|     12|uint64_t janet_getuinteger64(const Janet *argv, int32_t n) {
 6190|     12|#ifdef JANET_INT_TYPES
 6191|     12|    return janet_unwrap_u64(argv[n]);
 6192|       |#else
 6193|       |    Janet x = argv[n];
 6194|       |    if (!janet_checkuint64(x)) {
 6195|       |        janet_panicf("bad slot #%d, expected 64 bit unsigned integer, got %v", n, x);
 6196|       |    }
 6197|       |    return (uint64_t) janet_unwrap_number(x);
 6198|       |#endif
 6199|     12|}
janet_getsize:
 6201|    661|size_t janet_getsize(const Janet *argv, int32_t n) {
 6202|    661|    Janet x = argv[n];
 6203|    661|    if (!janet_checksize(x)) {
  ------------------
  |  Branch (6203:9): [True: 3, False: 658]
  ------------------
 6204|      3|        janet_panicf("bad slot #%d, expected size, got %v", n, x);
 6205|      3|    }
 6206|    658|    return (size_t) janet_unwrap_number(x);
  ------------------
  |  |  839|    658|#define janet_unwrap_number(x) ((x).number)
  ------------------
 6207|    661|}
janet_gethalfrange:
 6209|  5.67M|int32_t janet_gethalfrange(const Janet *argv, int32_t n, int32_t length, const char *which) {
 6210|  5.67M|    int32_t raw = janet_getinteger(argv, n);
 6211|  5.67M|    int32_t not_raw = raw;
 6212|  5.67M|    if (not_raw < 0) not_raw += length + 1;
  ------------------
  |  Branch (6212:9): [True: 69.3k, False: 5.60M]
  ------------------
 6213|  5.67M|    if (not_raw < 0 || not_raw > length)
  ------------------
  |  Branch (6213:9): [True: 38, False: 5.67M]
  |  Branch (6213:24): [True: 23, False: 5.67M]
  ------------------
 6214|     49|        janet_panicf("%s index %d out of range [%d,%d]", which, (int64_t) raw, -(int64_t)length - 1, (int64_t) length);
 6215|  5.67M|    return not_raw;
 6216|  5.67M|}
janet_getstartrange:
 6218|  17.0M|int32_t janet_getstartrange(const Janet *argv, int32_t argc, int32_t n, int32_t length) {
 6219|  17.0M|    if (n >= argc || janet_checktype(argv[n], JANET_NIL)) {
  ------------------
  |  |  806|  5.07M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 6, False: 5.07M]
  |  |  |  Branch (806:6): [Folded, False: 5.07M]
  |  |  ------------------
  |  |  807|  5.07M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.07M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  5.07M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  5.07M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.07M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.07M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6219:9): [True: 11.9M, False: 5.07M]
  ------------------
 6220|  11.9M|        return 0;
 6221|  11.9M|    }
 6222|  5.07M|    return janet_gethalfrange(argv, n, length, "start");
 6223|  17.0M|}
janet_getendrange:
 6225|  17.0M|int32_t janet_getendrange(const Janet *argv, int32_t argc, int32_t n, int32_t length) {
 6226|  17.0M|    if (n >= argc || janet_checktype(argv[n], JANET_NIL)) {
  ------------------
  |  |  806|   592k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 592k]
  |  |  |  Branch (806:6): [Folded, False: 592k]
  |  |  ------------------
  |  |  807|   592k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   592k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   592k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   592k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   592k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   592k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6226:9): [True: 16.4M, False: 592k]
  ------------------
 6227|  16.4M|        return length;
 6228|  16.4M|    }
 6229|   592k|    return janet_gethalfrange(argv, n, length, "end");
 6230|  17.0M|}
janet_getindexed:
 6241|  16.6M|JanetView janet_getindexed(const Janet *argv, int32_t n) {
 6242|  16.6M|    Janet x = argv[n];
 6243|  16.6M|    JanetView view;
 6244|  16.6M|    if (!janet_indexed_view(x, &view.items, &view.len)) {
  ------------------
  |  Branch (6244:9): [True: 1, False: 16.6M]
  ------------------
 6245|      1|        janet_panic_type(x, n, JANET_TFLAG_INDEXED);
  ------------------
  |  |  613|      1|#define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  ------------------
  |  |  |  |  602|      1|#define JANET_TFLAG_ARRAY (1 << JANET_ARRAY)
  |  |  ------------------
  |  |               #define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  ------------------
  |  |  |  |  603|      1|#define JANET_TFLAG_TUPLE (1 << JANET_TUPLE)
  |  |  ------------------
  ------------------
 6246|      1|    }
 6247|  16.6M|    return view;
 6248|  16.6M|}
janet_getbytes:
 6250|  51.1M|JanetByteView janet_getbytes(const Janet *argv, int32_t n) {
 6251|  51.1M|    Janet x = argv[n];
 6252|  51.1M|    JanetByteView view;
 6253|  51.1M|    if (!janet_bytes_view(x, &view.bytes, &view.len)) {
  ------------------
  |  Branch (6253:9): [True: 68, False: 51.1M]
  ------------------
 6254|     68|        janet_panic_type(x, n, JANET_TFLAG_BYTES);
  ------------------
  |  |  612|     68|#define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  599|     68|#define JANET_TFLAG_STRING (1 << JANET_STRING)
  |  |  ------------------
  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  600|     68|#define JANET_TFLAG_SYMBOL (1 << JANET_SYMBOL)
  |  |  ------------------
  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  606|     68|#define JANET_TFLAG_BUFFER (1 << JANET_BUFFER)
  |  |  ------------------
  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  601|     68|#define JANET_TFLAG_KEYWORD (1 << JANET_KEYWORD)
  |  |  ------------------
  ------------------
 6255|     68|    }
 6256|  51.1M|    return view;
 6257|  51.1M|}
janet_getabstract:
 6268|  3.12M|void *janet_getabstract(const Janet *argv, int32_t n, const JanetAbstractType *at) {
 6269|  3.12M|    Janet x = argv[n];
 6270|  3.12M|    if (!janet_checktype(x, JANET_ABSTRACT)) {
  ------------------
  |  |  806|  3.12M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 3.12M]
  |  |  ------------------
  |  |  807|  3.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|  3.12M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  3.12M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  3.12M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.12M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.12M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6270:9): [True: 48, False: 3.12M]
  ------------------
 6271|     48|        janet_panic_abstract(x, n, at);
 6272|     48|    }
 6273|  3.12M|    void *abstractx = janet_unwrap_abstract(x);
  ------------------
  |  |  866|  3.12M|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
 6274|  3.12M|    if (janet_abstract_type(abstractx) != at) {
  ------------------
  |  | 1899|  3.12M|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|  3.12M|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (6274:9): [True: 11, False: 3.12M]
  ------------------
 6275|     11|        janet_panic_abstract(x, n, at);
 6276|     11|    }
 6277|  3.12M|    return abstractx;
 6278|  3.12M|}
janet_getslice:
 6280|  17.0M|JanetRange janet_getslice(int32_t argc, const Janet *argv) {
 6281|  17.0M|    janet_arity(argc, 1, 3);
 6282|  17.0M|    JanetRange range;
 6283|  17.0M|    int32_t length = janet_length(argv[0]);
 6284|  17.0M|    range.start = janet_getstartrange(argv, argc, 1, length);
 6285|  17.0M|    range.end = janet_getendrange(argv, argc, 2, length);
 6286|  17.0M|    if (range.end < range.start)
  ------------------
  |  Branch (6286:9): [True: 6, False: 17.0M]
  ------------------
 6287|      6|        range.end = range.start;
 6288|  17.0M|    return range;
 6289|  17.0M|}
janet_dyn:
 6291|  5.40M|Janet janet_dyn(const char *name) {
 6292|  5.40M|    if (!janet_vm.fiber) {
  ------------------
  |  Branch (6292:9): [True: 302k, False: 5.10M]
  ------------------
 6293|   302k|        if (!janet_vm.top_dyns) return janet_wrap_nil();
  ------------------
  |  |  831|   302k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   302k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   302k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   302k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6293:13): [True: 302k, 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|   302k|    }
 6296|  5.10M|    if (janet_vm.fiber->env) {
  ------------------
  |  Branch (6296:9): [True: 5.09M, False: 2.20k]
  ------------------
 6297|  5.09M|        return janet_table_get_keyword(janet_vm.fiber->env, name);
 6298|  5.09M|    } else {
 6299|  2.20k|        return janet_wrap_nil();
  ------------------
  |  |  831|  2.20k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  2.20k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.20k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.20k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6300|  2.20k|    }
 6301|  5.10M|}
janet_getflags:
 6342|     26|uint64_t janet_getflags(const Janet *argv, int32_t n, const char *flags) {
 6343|     26|    uint64_t ret = 0;
 6344|     26|    const uint8_t *keyw = janet_getkeyword(argv, n);
 6345|     26|    int32_t klen = janet_string_length(keyw);
  ------------------
  |  | 1813|     26|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|     26|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
 6346|     26|    int32_t flen = (int32_t) strlen(flags);
 6347|     26|    if (flen > 64) {
  ------------------
  |  Branch (6347:9): [True: 0, False: 26]
  ------------------
 6348|      0|        flen = 64;
 6349|      0|    }
 6350|    438|    for (int32_t j = 0; j < klen; j++) {
  ------------------
  |  Branch (6350:25): [True: 418, False: 20]
  ------------------
 6351|  1.23k|        for (int32_t i = 0; i < flen; i++) {
  ------------------
  |  Branch (6351:29): [True: 1.22k, False: 6]
  ------------------
 6352|  1.22k|            if (((uint8_t) flags[i]) == keyw[j]) {
  ------------------
  |  Branch (6352:17): [True: 412, False: 812]
  ------------------
 6353|    412|                ret |= 1ULL << i;
 6354|    412|                goto found;
 6355|    412|            }
 6356|  1.22k|        }
 6357|      6|        janet_panicf("unexpected flag %c, expected one of \"%s\"", (char) keyw[j], flags);
 6358|    412|    found:
 6359|    412|        ;
 6360|    412|    }
 6361|     20|    return ret;
 6362|     26|}
janet_optnat:
 6364|   153k|int32_t janet_optnat(const Janet *argv, int32_t argc, int32_t n, int32_t dflt) {
 6365|   153k|    if (argc <= n) return dflt;
  ------------------
  |  Branch (6365:9): [True: 152k, False: 395]
  ------------------
 6366|    395|    if (janet_checktype(argv[n], JANET_NIL)) return dflt;
  ------------------
  |  |  806|    395|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 7, False: 388]
  |  |  |  Branch (806:6): [Folded, False: 395]
  |  |  ------------------
  |  |  807|    395|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    395|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    395|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    395|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    395|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    395|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6367|    388|    return janet_getnat(argv, n);
 6368|    395|}
janet_optinteger:
 6370|  10.0k|int32_t janet_optinteger(const Janet *argv, int32_t argc, int32_t n, int32_t dflt) {
 6371|  10.0k|    if (argc <= n) return dflt;
  ------------------
  |  Branch (6371:9): [True: 10.0k, False: 7]
  ------------------
 6372|      7|    if (janet_checktype(argv[n], JANET_NIL)) return dflt;
  ------------------
  |  |  806|      7|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1, False: 6]
  |  |  |  Branch (806:6): [Folded, False: 7]
  |  |  ------------------
  |  |  807|      7|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      7|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      7|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      7|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      7|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      7|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6373|      6|    return janet_getinteger(argv, n);
 6374|      7|}
janet_optsize:
 6382|  2.01k|size_t janet_optsize(const Janet *argv, int32_t argc, int32_t n, size_t dflt) {
 6383|  2.01k|    if (argc <= n) return dflt;
  ------------------
  |  Branch (6383:9): [True: 1.78k, False: 229]
  ------------------
 6384|    229|    if (janet_checktype(argv[n], JANET_NIL)) return dflt;
  ------------------
  |  |  806|    229|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 8, False: 221]
  |  |  |  Branch (806:6): [Folded, False: 229]
  |  |  ------------------
  |  |  807|    229|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    229|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    229|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    229|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    229|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    229|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6385|    221|    return janet_getsize(argv, n);
 6386|    229|}
janet_optabstract:
 6388|  5.29k|void *janet_optabstract(const Janet *argv, int32_t argc, int32_t n, const JanetAbstractType *at, void *dflt) {
 6389|  5.29k|    if (argc <= n) return dflt;
  ------------------
  |  Branch (6389:9): [True: 2.03k, False: 3.26k]
  ------------------
 6390|  3.26k|    if (janet_checktype(argv[n], JANET_NIL)) return dflt;
  ------------------
  |  |  806|  3.26k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 3.26k]
  |  |  |  Branch (806:6): [Folded, False: 3.26k]
  |  |  ------------------
  |  |  807|  3.26k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  3.26k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  3.26k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  3.26k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.26k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.26k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6391|  3.26k|    return janet_getabstract(argv, n, at);
 6392|  3.26k|}
janet_atomic_inc:
 6408|  2.98k|JanetAtomicInt janet_atomic_inc(JanetAtomicInt volatile *x) {
 6409|       |#ifdef _MSC_VER
 6410|       |    return _InterlockedIncrement(x);
 6411|       |#elif defined(JANET_USE_STDATOMIC)
 6412|       |    return atomic_fetch_add_explicit(x, 1, memory_order_relaxed) + 1;
 6413|       |#elif defined(JANET_PLAN9)
 6414|       |    return aincl((void *)x, 1);
 6415|       |#else
 6416|  2.98k|    return __atomic_add_fetch(x, 1, __ATOMIC_RELAXED);
 6417|  2.98k|#endif
 6418|  2.98k|}
janet_atomic_dec:
 6420|   348k|JanetAtomicInt janet_atomic_dec(JanetAtomicInt volatile *x) {
 6421|       |#ifdef _MSC_VER
 6422|       |    return _InterlockedDecrement(x);
 6423|       |#elif defined(JANET_USE_STDATOMIC)
 6424|       |    return atomic_fetch_add_explicit(x, -1, memory_order_acq_rel) - 1;
 6425|       |#elif defined(JANET_PLAN9)
 6426|       |    return aincl((void *)x, -1);
 6427|       |#else
 6428|   348k|    return __atomic_add_fetch(x, -1, __ATOMIC_ACQ_REL);
 6429|   348k|#endif
 6430|   348k|}
janet_atomic_load:
 6432|  4.09k|JanetAtomicInt janet_atomic_load(JanetAtomicInt volatile *x) {
 6433|       |#ifdef _MSC_VER
 6434|       |    return _InterlockedOr(x, 0);
 6435|       |#elif defined(JANET_PLAN9)
 6436|       |    return agetl((void *)x);
 6437|       |#elif defined(JANET_USE_STDATOMIC)
 6438|       |    return atomic_load_explicit(x, memory_order_acquire);
 6439|       |#else
 6440|  4.09k|    return __atomic_load_n(x, __ATOMIC_ACQUIRE);
 6441|  4.09k|#endif
 6442|  4.09k|}
janet_atomic_load_relaxed:
 6444|  4.12G|JanetAtomicInt janet_atomic_load_relaxed(JanetAtomicInt volatile *x) {
 6445|       |#ifdef _MSC_VER
 6446|       |    return _InterlockedOr(x, 0);
 6447|       |#elif defined(JANET_PLAN9)
 6448|       |    return agetl((void *)x);
 6449|       |#elif defined(JANET_USE_STDATOMIC)
 6450|       |    return atomic_load_explicit(x, memory_order_relaxed);
 6451|       |#else
 6452|  4.12G|    return __atomic_load_n(x, __ATOMIC_RELAXED);
 6453|  4.12G|#endif
 6454|  4.12G|}
janetc_funopt:
 6900|   490k|const JanetFunOptimizer *janetc_funopt(uint32_t flags) {
 6901|   490k|    uint32_t tag = flags & JANET_FUNCDEF_FLAG_TAG;
  ------------------
  |  | 1108|   490k|#define JANET_FUNCDEF_FLAG_TAG 0xFFFF
  ------------------
 6902|   490k|    if (tag == 0)
  ------------------
  |  Branch (6902:9): [True: 3.01k, False: 487k]
  ------------------
 6903|  3.01k|        return NULL;
 6904|   487k|    uint32_t index = tag - 1;
 6905|   487k|    if (index >= (sizeof(optimizers) / sizeof(optimizers[0])))
  ------------------
  |  Branch (6905:9): [True: 0, False: 487k]
  ------------------
 6906|      0|        return NULL;
 6907|   487k|    return optimizers + index;
 6908|   487k|}
janetc_fopts_default:
 6948|  2.74M|JanetFopts janetc_fopts_default(JanetCompiler *c) {
 6949|  2.74M|    JanetFopts ret;
 6950|  2.74M|    ret.compiler = c;
 6951|  2.74M|    ret.flags = 0;
 6952|  2.74M|    ret.hint = janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|  2.74M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  2.74M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.74M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.74M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6953|  2.74M|    return ret;
 6954|  2.74M|}
janetc_error:
 6957|   720k|void janetc_error(JanetCompiler *c, const uint8_t *m) {
 6958|       |    /* Don't override first error */
 6959|   720k|    if (c->result.status == JANET_COMPILE_ERROR) {
  ------------------
  |  Branch (6959:9): [True: 718k, False: 2.17k]
  ------------------
 6960|   718k|        return;
 6961|   718k|    }
 6962|  2.17k|    c->result.status = JANET_COMPILE_ERROR;
 6963|  2.17k|    c->result.error = m;
 6964|  2.17k|}
janetc_cerror:
 6967|   666k|void janetc_cerror(JanetCompiler *c, const char *m) {
 6968|   666k|    janetc_error(c, janet_cstring(m));
 6969|   666k|}
janetc_lintf:
 6978|  2.63M|void janetc_lintf(JanetCompiler *c, JanetCompileLintLevel level, const char *format, ...) {
 6979|  2.63M|    if (NULL != c->lints) {
  ------------------
  |  Branch (6979:9): [True: 0, False: 2.63M]
  ------------------
 6980|       |        /* format message */
 6981|      0|        va_list args;
 6982|      0|        JanetBuffer buffer;
 6983|      0|        int32_t len = 0;
 6984|      0|        while (format[len]) len++;
  ------------------
  |  Branch (6984:16): [True: 0, False: 0]
  ------------------
 6985|      0|        janet_buffer_init(&buffer, len);
 6986|      0|        va_start(args, format);
 6987|      0|        janet_formatbv(&buffer, format, args);
 6988|      0|        va_end(args);
 6989|      0|        const uint8_t *str = janet_string(buffer.data, buffer.count);
 6990|      0|        janet_buffer_deinit(&buffer);
 6991|       |        /* construct linting payload */
 6992|      0|        Janet *payload = janet_tuple_begin(4);
 6993|      0|        payload[0] = janet_ckeywordv(janet_lint_level_names[level]);
  ------------------
  |  | 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6994|      0|        payload[1] = c->current_mapping.line == -1 ? janet_wrap_nil() : janet_wrap_integer(c->current_mapping.line);
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      payload[1] = c->current_mapping.line == -1 ? janet_wrap_nil() : janet_wrap_integer(c->current_mapping.line);
  ------------------
  |  |  967|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
  |  Branch (6994:22): [True: 0, False: 0]
  ------------------
 6995|      0|        payload[2] = c->current_mapping.column == -1 ? janet_wrap_nil() : janet_wrap_integer(c->current_mapping.column);
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      payload[2] = c->current_mapping.column == -1 ? janet_wrap_nil() : janet_wrap_integer(c->current_mapping.column);
  ------------------
  |  |  967|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
  |  Branch (6995:22): [True: 0, False: 0]
  ------------------
 6996|      0|        payload[3] = janet_wrap_string(str);
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6997|      0|        janet_array_push(c->lints, janet_wrap_tuple(janet_tuple_end(payload)));
  ------------------
  |  |  843|      0|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6998|      0|    }
 6999|  2.63M|}
janetc_freeslot:
 7002|  10.8M|void janetc_freeslot(JanetCompiler *c, JanetSlot s) {
 7003|  10.8M|    if (s.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF | JANET_SLOT_NAMED)) return;
  ------------------
  |  | 1015|  10.8M|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
                  if (s.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF | JANET_SLOT_NAMED)) return;
  ------------------
  |  | 1018|  10.8M|#define JANET_SLOT_REF 0x80000
  ------------------
                  if (s.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF | JANET_SLOT_NAMED)) return;
  ------------------
  |  | 1016|  10.8M|#define JANET_SLOT_NAMED 0x20000
  ------------------
  |  Branch (7003:9): [True: 5.89M, False: 4.91M]
  ------------------
 7004|  4.91M|    if (s.envindex >= 0) return;
  ------------------
  |  Branch (7004:9): [True: 0, False: 4.91M]
  ------------------
 7005|  4.91M|    janetc_regalloc_free(&c->scope->ra, s.index);
 7006|  4.91M|}
janetc_nameslot:
 7009|  5.78M|void janetc_nameslot(JanetCompiler *c, const uint8_t *sym, JanetSlot s, uint32_t flags) {
 7010|  5.78M|    if (!(flags & JANET_DEFFLAG_NO_SHADOWCHECK)) {
  ------------------
  |  | 1159|  5.78M|#define JANET_DEFFLAG_NO_SHADOWCHECK 1
  ------------------
  |  Branch (7010:9): [True: 5.78M, False: 705]
  ------------------
 7011|  5.78M|        if (sym[0] != '_') {
  ------------------
  |  Branch (7011:13): [True: 1.43M, False: 4.34M]
  ------------------
 7012|  1.43M|            switch (janetc_shadowcheck(c, sym)) {
 7013|  24.2k|                default:
  ------------------
  |  Branch (7013:17): [True: 24.2k, False: 1.40M]
  ------------------
 7014|  24.2k|                    break;
 7015|  24.2k|                case JANETC_SHADOW_MACRO:
  ------------------
  |  Branch (7015:17): [True: 2.61k, False: 1.43M]
  ------------------
 7016|  2.61k|                    janetc_lintf(c, JANET_C_LINT_NORMAL, "binding %q is shadowing a macro", janet_wrap_symbol(sym));
  ------------------
  |  |  849|  2.61k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|  2.61k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.61k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.61k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7017|  2.61k|                    break;
 7018|  1.36M|                case JANETC_SHADOW_LOCAL_HIDES_LOCAL:
  ------------------
  |  Branch (7018:17): [True: 1.36M, False: 70.3k]
  ------------------
 7019|  1.36M|                    janetc_lintf(c, JANET_C_LINT_STRICT, "binding %q is shadowing a binding", janet_wrap_symbol(sym));
  ------------------
  |  |  849|  1.36M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|  1.36M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.36M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.36M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7020|  1.36M|                    break;
 7021|  42.1k|                case JANETC_SHADOW_LOCAL_HIDES_GLOBAL:
  ------------------
  |  Branch (7021:17): [True: 42.1k, False: 1.39M]
  ------------------
 7022|  42.1k|                    janetc_lintf(c, JANET_C_LINT_STRICT, "binding %q is shadowing a top-level binding", janet_wrap_symbol(sym));
  ------------------
  |  |  849|  42.1k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|  42.1k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  42.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  42.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7023|  42.1k|                    break;
 7024|  1.21k|                case JANETC_SHADOW_GLOBAL_HIDES_GLOBAL:
  ------------------
  |  Branch (7024:17): [True: 1.21k, False: 1.43M]
  ------------------
 7025|  1.21k|                    janetc_lintf(c, JANET_C_LINT_STRICT, "top-level binding %q is shadowing another top-level binding", janet_wrap_symbol(sym));
  ------------------
  |  |  849|  1.21k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|  1.21k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.21k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.21k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7026|  1.21k|                    break;
 7027|  1.43M|            }
 7028|  1.43M|        }
 7029|  5.78M|    }
 7030|  5.78M|    SymPair sp;
 7031|  5.78M|    int32_t cnt = janet_v_count(c->buffer);
  ------------------
  |  |  736|  5.78M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  2.81M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  2.81M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 2.81M, False: 2.97M]
  |  |  ------------------
  ------------------
 7032|  5.78M|    sp.sym = sym;
 7033|  5.78M|    sp.sym2 = sym;
 7034|  5.78M|    sp.slot = s;
 7035|  5.78M|    sp.keep = 0;
 7036|  5.78M|    if (flags & JANET_DEFFLAG_NO_UNUSED) {
  ------------------
  |  | 1160|  5.78M|#define JANET_DEFFLAG_NO_UNUSED 2
  ------------------
  |  Branch (7036:9): [True: 14.1k, False: 5.76M]
  ------------------
 7037|  14.1k|        sp.referenced = 1;
 7038|  5.76M|    } else {
 7039|  5.76M|        sp.referenced = sym[0] == '_'; /* Fake ref if symbol starts with _ to avoid lints */
 7040|  5.76M|    }
 7041|  5.78M|    sp.slot.flags |= JANET_SLOT_NAMED;
  ------------------
  |  | 1016|  5.78M|#define JANET_SLOT_NAMED 0x20000
  ------------------
 7042|  5.78M|    sp.birth_pc = cnt ? cnt - 1 : 0;
  ------------------
  |  Branch (7042:19): [True: 2.81M, False: 2.97M]
  ------------------
 7043|  5.78M|    sp.death_pc = UINT32_MAX;
 7044|       |    janet_v_push(c->scope->syms, sp);
  ------------------
  |  |  734|  5.78M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  5.78M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  5.78M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  5.59M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  5.59M|#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.59M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  5.59M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 190k, False: 5.59M]
  |  |  |  |  |  |  |  Branch (745:50): [True: 104k, False: 5.48M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|   295k|#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.78M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  5.78M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7045|  5.78M|}
janetc_cslot:
 7048|  10.8M|JanetSlot janetc_cslot(Janet x) {
 7049|  10.8M|    JanetSlot ret;
 7050|  10.8M|    ret.flags = (1 << janet_type(x)) | JANET_SLOT_CONSTANT;
  ------------------
  |  |  795|  10.8M|    (isnan((x).number) \
  |  |  796|  10.8M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  10.8M|        : JANET_NUMBER)
  ------------------
                  ret.flags = (1 << janet_type(x)) | JANET_SLOT_CONSTANT;
  ------------------
  |  | 1015|  10.8M|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (7050:23): [True: 10.1M, False: 610k]
  ------------------
 7051|  10.8M|    ret.index = -1;
 7052|  10.8M|    ret.constant = x;
 7053|  10.8M|    ret.envindex = -1;
 7054|  10.8M|    return ret;
 7055|  10.8M|}
janetc_farslot:
 7058|  8.11M|JanetSlot janetc_farslot(JanetCompiler *c) {
 7059|  8.11M|    JanetSlot ret;
 7060|  8.11M|    ret.flags = JANET_SLOTTYPE_ANY;
  ------------------
  |  | 1025|  8.11M|#define JANET_SLOTTYPE_ANY 0xFFFF
  ------------------
 7061|  8.11M|    ret.index = janetc_allocfar(c);
 7062|  8.11M|    ret.constant = janet_wrap_nil();
  ------------------
  |  |  831|  8.11M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  8.11M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.11M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.11M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7063|  8.11M|    ret.envindex = -1;
 7064|  8.11M|    return ret;
 7065|  8.11M|}
janetc_scope:
 7068|  1.25M|void janetc_scope(JanetScope *s, JanetCompiler *c, int flags, const char *name) {
 7069|  1.25M|    JanetScope scope;
 7070|  1.25M|    scope.name = name;
 7071|  1.25M|    scope.child = NULL;
 7072|  1.25M|    scope.consts = NULL;
 7073|  1.25M|    scope.syms = NULL;
 7074|  1.25M|    scope.envs = NULL;
 7075|  1.25M|    scope.defs = NULL;
 7076|  1.25M|    scope.bytecode_start = janet_v_count(c->buffer);
  ------------------
  |  |  736|  1.25M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   904k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   904k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 904k, False: 348k]
  |  |  ------------------
  ------------------
 7077|  1.25M|    scope.flags = flags;
 7078|  1.25M|    scope.parent = c->scope;
 7079|  1.25M|    janetc_regalloc_init(&scope.ua);
 7080|       |    /* Inherit slots */
 7081|  1.25M|    if ((!(flags & JANET_SCOPE_FUNCTION)) && c->scope) {
  ------------------
  |  | 1035|  1.25M|#define JANET_SCOPE_FUNCTION 1
  ------------------
  |  Branch (7081:9): [True: 650k, False: 602k]
  |  Branch (7081:46): [True: 650k, False: 0]
  ------------------
 7082|   650k|        janetc_regalloc_clone(&scope.ra, &(c->scope->ra));
 7083|   650k|    } else {
 7084|   602k|        janetc_regalloc_init(&scope.ra);
 7085|   602k|    }
 7086|       |    /* Link parent and child and update pointer */
 7087|  1.25M|    if (c->scope)
  ------------------
  |  Branch (7087:9): [True: 1.00M, False: 243k]
  ------------------
 7088|  1.00M|        c->scope->child = s;
 7089|  1.25M|    c->scope = s;
 7090|  1.25M|    *s = scope;
 7091|  1.25M|}
janetc_popscope:
 7094|  1.25M|void janetc_popscope(JanetCompiler *c) {
 7095|  1.25M|    JanetScope *oldscope = c->scope;
 7096|  1.25M|    JanetScope *newscope = oldscope->parent;
 7097|       |    /* Move free slots to parent scope if not a new function.
 7098|       |     * We need to know the total number of slots used when compiling the function. */
 7099|  1.25M|    if (!(oldscope->flags & (JANET_SCOPE_FUNCTION | JANET_SCOPE_UNUSED)) && newscope) {
  ------------------
  |  | 1035|  1.25M|#define JANET_SCOPE_FUNCTION 1
  ------------------
                  if (!(oldscope->flags & (JANET_SCOPE_FUNCTION | JANET_SCOPE_UNUSED)) && newscope) {
  ------------------
  |  | 1038|  1.25M|#define JANET_SCOPE_UNUSED 8
  ------------------
  |  Branch (7099:9): [True: 568k, False: 684k]
  |  Branch (7099:77): [True: 568k, False: 0]
  ------------------
 7100|       |        /* Parent scopes inherit child's closure flag. Needed
 7101|       |         * for while loops. (if a while loop creates a closure, it
 7102|       |         * is compiled to a tail recursive iife) */
 7103|   568k|        if (oldscope->flags & JANET_SCOPE_CLOSURE) {
  ------------------
  |  | 1039|   568k|#define JANET_SCOPE_CLOSURE 16
  ------------------
  |  Branch (7103:13): [True: 47.7k, False: 520k]
  ------------------
 7104|  47.7k|            newscope->flags |= JANET_SCOPE_CLOSURE;
  ------------------
  |  | 1039|  47.7k|#define JANET_SCOPE_CLOSURE 16
  ------------------
 7105|  47.7k|        }
 7106|   568k|        if (newscope->ra.max < oldscope->ra.max) {
  ------------------
  |  Branch (7106:13): [True: 255k, False: 312k]
  ------------------
 7107|   255k|            newscope->ra.max = oldscope->ra.max;
 7108|   255k|        }
 7109|       |
 7110|       |        /* Keep upvalue slots and symbols for debugging. */
 7111|  7.33M|        for (int32_t i = 0; i < janet_v_count(oldscope->syms); i++) {
  ------------------
  |  |  736|  7.33M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  7.14M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  7.14M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 7.14M, False: 190k]
  |  |  ------------------
  ------------------
  |  Branch (7111:29): [True: 6.76M, False: 568k]
  ------------------
 7112|  6.76M|            SymPair pair = oldscope->syms[i];
 7113|       |            /* Check for unused symbols */
 7114|  6.76M|            if (pair.referenced == 0 && pair.sym) {
  ------------------
  |  Branch (7114:17): [True: 1.02M, False: 5.74M]
  |  Branch (7114:41): [True: 388k, False: 638k]
  ------------------
 7115|   388k|                janetc_lintf(c, JANET_C_LINT_STRICT, "binding %q is unused", janet_wrap_symbol(pair.sym));
  ------------------
  |  |  849|   388k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|   388k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   388k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   388k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7116|   388k|            }
 7117|       |            /* The variable should not be lexically accessible */
 7118|  6.76M|            pair.sym = NULL;
 7119|  6.76M|            if (pair.death_pc == UINT32_MAX) {
  ------------------
  |  Branch (7119:17): [True: 523k, False: 6.24M]
  ------------------
 7120|   523k|                pair.death_pc = (uint32_t) janet_v_count(c->buffer);
  ------------------
  |  |  736|   523k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   523k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   523k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 523k, False: 0]
  |  |  ------------------
  ------------------
 7121|   523k|            }
 7122|  6.76M|            if (pair.keep) {
  ------------------
  |  Branch (7122:17): [True: 49.0k, False: 6.72M]
  ------------------
 7123|       |                /* The variable should also not be included in the locals */
 7124|  49.0k|                pair.sym2 = NULL;
 7125|  49.0k|                janetc_regalloc_touch(&newscope->ra, pair.slot.index);
 7126|  49.0k|            }
 7127|  6.76M|            janet_v_push(newscope->syms, pair);
  ------------------
  |  |  734|  6.76M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  6.76M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  6.76M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  6.45M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  6.45M|#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|  6.45M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  6.45M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 316k, False: 6.45M]
  |  |  |  |  |  |  |  Branch (745:50): [True: 368k, False: 6.08M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|   685k|#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|  6.76M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  6.76M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7128|  6.76M|        }
 7129|   568k|    }
 7130|       |
 7131|       |    /* Free the old scope */
 7132|  1.25M|    janet_v_free(oldscope->consts);
  ------------------
  |  |  733|  1.25M|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|   273k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 273k, False: 979k]
  |  |  ------------------
  ------------------
 7133|  1.25M|    janet_v_free(oldscope->syms);
  ------------------
  |  |  733|  1.25M|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|   507k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 507k, False: 745k]
  |  |  ------------------
  ------------------
 7134|  1.25M|    janet_v_free(oldscope->envs);
  ------------------
  |  |  733|  1.25M|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|   110k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 110k, False: 1.14M]
  |  |  ------------------
  ------------------
 7135|  1.25M|    janet_v_free(oldscope->defs);
  ------------------
  |  |  733|  1.25M|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|   212k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 212k, False: 1.04M]
  |  |  ------------------
  ------------------
 7136|  1.25M|    janetc_regalloc_deinit(&oldscope->ra);
 7137|  1.25M|    janetc_regalloc_deinit(&oldscope->ua);
 7138|       |    /* Update pointer */
 7139|  1.25M|    if (newscope)
  ------------------
  |  Branch (7139:9): [True: 1.00M, False: 243k]
  ------------------
 7140|  1.00M|        newscope->child = NULL;
 7141|  1.25M|    c->scope = newscope;
 7142|  1.25M|}
janetc_popscope_keepslot:
 7145|   169k|void janetc_popscope_keepslot(JanetCompiler *c, JanetSlot retslot) {
 7146|   169k|    JanetScope *scope;
 7147|   169k|    janetc_popscope(c);
 7148|   169k|    scope = c->scope;
 7149|   169k|    if (scope && retslot.envindex < 0 && retslot.index >= 0) {
  ------------------
  |  Branch (7149:9): [True: 169k, False: 0]
  |  Branch (7149:18): [True: 169k, False: 180]
  |  Branch (7149:42): [True: 13.6k, False: 155k]
  ------------------
 7150|  13.6k|        janetc_regalloc_touch(&scope->ra, retslot.index);
 7151|  13.6k|    }
 7152|   169k|}
janetc_shadowcheck:
 7189|  1.43M|Shadowing janetc_shadowcheck(JanetCompiler *c, const uint8_t *sym) {
 7190|       |    /* Check locals */
 7191|  1.43M|    JanetScope *scope = c->scope;
 7192|  1.43M|    int is_global = (scope->flags & JANET_SCOPE_TOP);
  ------------------
  |  | 1037|  1.43M|#define JANET_SCOPE_TOP 4
  ------------------
 7193|  12.8M|    while (scope) {
  ------------------
  |  Branch (7193:12): [True: 12.7M, False: 69.1k]
  ------------------
 7194|  12.7M|        int32_t len = janet_v_count(scope->syms);
  ------------------
  |  |  736|  12.7M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  4.87M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  4.87M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 4.87M, False: 7.87M]
  |  |  ------------------
  ------------------
 7195|  34.9M|        for (int32_t i = len - 1; i >= 0; i--) {
  ------------------
  |  Branch (7195:35): [True: 23.5M, False: 11.3M]
  ------------------
 7196|  23.5M|            SymPair *pair = scope->syms + i;
 7197|  23.5M|            if (pair->sym == sym) {
  ------------------
  |  Branch (7197:17): [True: 1.36M, False: 22.2M]
  ------------------
 7198|  1.36M|                if (is_global) {
  ------------------
  |  Branch (7198:21): [True: 1.14k, False: 1.36M]
  ------------------
 7199|       |                    /* This can happen in a top level form like (def [x [x y]] [1 [2 3]])` where a symbol is reused in one expression */
 7200|       |                    /* janet_assert(!is_global, "shadowing analysis is incorrect. compiler bug"); */
 7201|  1.14k|                    return JANETC_SHADOW_GLOBAL_HIDES_GLOBAL;
 7202|  1.14k|                }
 7203|  1.36M|                return JANETC_SHADOW_LOCAL_HIDES_LOCAL;
 7204|  1.36M|            }
 7205|  23.5M|        }
 7206|  11.3M|        scope = scope->parent;
 7207|  11.3M|    }
 7208|       |    /* Check globals */
 7209|  69.1k|    JanetBinding binding = janet_resolve_ext(c->env, sym);
 7210|  69.1k|    if (binding.type == JANET_BINDING_MACRO || binding.type == JANET_BINDING_DYNAMIC_MACRO) {
  ------------------
  |  Branch (7210:9): [True: 2.61k, False: 66.5k]
  |  Branch (7210:48): [True: 0, False: 66.5k]
  ------------------
 7211|  2.61k|        return JANETC_SHADOW_MACRO;
 7212|  66.5k|    } else if (binding.type == JANET_BINDING_NONE) {
  ------------------
  |  Branch (7212:16): [True: 24.2k, False: 42.2k]
  ------------------
 7213|  24.2k|        return JANETC_SHADOW_NONE;
 7214|  42.2k|    } else {
 7215|  42.2k|        if (is_global) {
  ------------------
  |  Branch (7215:13): [True: 71, False: 42.1k]
  ------------------
 7216|     71|            return JANETC_SHADOW_GLOBAL_HIDES_GLOBAL;
 7217|  42.1k|        } else {
 7218|  42.1k|            return JANETC_SHADOW_LOCAL_HIDES_GLOBAL;
 7219|  42.1k|        }
 7220|  42.2k|    }
 7221|  69.1k|}
janetc_resolve:
 7226|  1.41M|    const uint8_t *sym) {
 7227|       |
 7228|  1.41M|    JanetSlot ret = janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|  1.41M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.41M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.41M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.41M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7229|  1.41M|    JanetScope *scope = c->scope;
 7230|  1.41M|    SymPair *pair;
 7231|  1.41M|    int foundlocal = 1;
 7232|  1.41M|    int unused = 0;
 7233|       |
 7234|       |    /* Search scopes for symbol, starting from top */
 7235|  52.9M|    while (scope) {
  ------------------
  |  Branch (7235:12): [True: 52.2M, False: 725k]
  ------------------
 7236|  52.2M|        int32_t i, len;
 7237|  52.2M|        if (scope->flags & JANET_SCOPE_UNUSED)
  ------------------
  |  | 1038|  52.2M|#define JANET_SCOPE_UNUSED 8
  ------------------
  |  Branch (7237:13): [True: 4.30M, False: 47.9M]
  ------------------
 7238|  4.30M|            unused = 1;
 7239|  52.2M|        len = janet_v_count(scope->syms);
  ------------------
  |  |  736|  52.2M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  23.1M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  23.1M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 23.1M, False: 29.0M]
  |  |  ------------------
  ------------------
 7240|       |        /* Search in reverse order */
 7241|   322M|        for (i = len - 1; i >= 0; i--) {
  ------------------
  |  Branch (7241:27): [True: 271M, False: 51.5M]
  ------------------
 7242|   271M|            pair = scope->syms + i;
 7243|   271M|            if (pair->sym == sym) {
  ------------------
  |  Branch (7243:17): [True: 689k, False: 270M]
  ------------------
 7244|   689k|                ret = pair->slot;
 7245|   689k|                pair->referenced = 1;
 7246|   689k|                goto found;
 7247|   689k|            }
 7248|   271M|        }
 7249|  51.5M|        if (scope->flags & JANET_SCOPE_FUNCTION)
  ------------------
  |  | 1035|  51.5M|#define JANET_SCOPE_FUNCTION 1
  ------------------
  |  Branch (7249:13): [True: 4.89M, False: 46.6M]
  ------------------
 7250|  4.89M|            foundlocal = 0;
 7251|  51.5M|        scope = scope->parent;
 7252|  51.5M|    }
 7253|       |
 7254|       |    /* Symbol not found - check for global */
 7255|   725k|    {
 7256|   725k|        JanetBinding binding = janet_resolve_ext(c->env, sym);
 7257|   725k|        if (binding.type == JANET_BINDING_NONE) {
  ------------------
  |  Branch (7257:13): [True: 1.37k, False: 724k]
  ------------------
 7258|  1.37k|            Janet handler = janet_table_get_keyword(c->env, "missing-symbol");
 7259|  1.37k|            switch (janet_type(handler)) {
  ------------------
  |  |  795|  1.37k|    (isnan((x).number) \
  |  |  796|  1.37k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  1.37k|        : JANET_NUMBER)
  ------------------
  |  Branch (7259:21): [True: 1.37k, False: 0]
  ------------------
 7260|  1.37k|                case JANET_NIL:
  ------------------
  |  Branch (7260:17): [True: 1.37k, False: 0]
  ------------------
 7261|  1.37k|                    break;
 7262|      0|                case JANET_FUNCTION:
  ------------------
  |  Branch (7262:17): [True: 0, False: 1.37k]
  ------------------
 7263|      0|                    if (!lookup_missing(c, sym, janet_unwrap_function(handler), &binding))
  ------------------
  |  |  868|      0|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (7263:25): [True: 0, False: 0]
  ------------------
 7264|      0|                        return janetc_cslot(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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7265|      0|                    break;
 7266|      0|                default:
  ------------------
  |  Branch (7266:17): [True: 0, False: 1.37k]
  ------------------
 7267|      0|                    janetc_error(c, janet_formatc("invalid lookup handler %V", handler));
 7268|      0|                    return janetc_cslot(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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7269|  1.37k|            }
 7270|  1.37k|        }
 7271|       |
 7272|   725k|        switch (binding.type) {
 7273|      0|            default:
  ------------------
  |  Branch (7273:13): [True: 0, False: 725k]
  ------------------
 7274|  1.37k|            case JANET_BINDING_NONE:
  ------------------
  |  Branch (7274:13): [True: 1.37k, False: 724k]
  ------------------
 7275|  1.37k|                janetc_error(c, janet_formatc("unknown symbol %q", janet_wrap_symbol(sym)));
  ------------------
  |  |  849|  1.37k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|  1.37k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.37k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.37k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7276|  1.37k|                return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|  1.37k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.37k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.37k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.37k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7277|   697k|            case JANET_BINDING_DEF:
  ------------------
  |  Branch (7277:13): [True: 697k, False: 28.0k]
  ------------------
 7278|   724k|            case JANET_BINDING_MACRO: /* Macro should function like defs when not in calling pos */
  ------------------
  |  Branch (7278:13): [True: 26.2k, False: 699k]
  ------------------
 7279|   724k|                ret = janetc_cslot(binding.value);
 7280|   724k|                break;
 7281|      0|            case JANET_BINDING_DYNAMIC_DEF:
  ------------------
  |  Branch (7281:13): [True: 0, False: 725k]
  ------------------
 7282|      0|            case JANET_BINDING_DYNAMIC_MACRO:
  ------------------
  |  Branch (7282:13): [True: 0, False: 725k]
  ------------------
 7283|      0|                ret = janetc_cslot(binding.value);
 7284|      0|                ret.flags |= JANET_SLOT_REF | JANET_SLOT_NAMED | JANET_SLOTTYPE_ANY;
  ------------------
  |  | 1018|      0|#define JANET_SLOT_REF 0x80000
  ------------------
                              ret.flags |= JANET_SLOT_REF | JANET_SLOT_NAMED | JANET_SLOTTYPE_ANY;
  ------------------
  |  | 1016|      0|#define JANET_SLOT_NAMED 0x20000
  ------------------
                              ret.flags |= JANET_SLOT_REF | JANET_SLOT_NAMED | JANET_SLOTTYPE_ANY;
  ------------------
  |  | 1025|      0|#define JANET_SLOTTYPE_ANY 0xFFFF
  ------------------
 7285|      0|                ret.flags &= ~JANET_SLOT_CONSTANT;
  ------------------
  |  | 1015|      0|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
 7286|      0|                break;
 7287|    373|            case JANET_BINDING_VAR: {
  ------------------
  |  Branch (7287:13): [True: 373, False: 725k]
  ------------------
 7288|    373|                ret = janetc_cslot(binding.value);
 7289|    373|                ret.flags |= JANET_SLOT_REF | JANET_SLOT_NAMED | JANET_SLOT_MUTABLE | JANET_SLOTTYPE_ANY;
  ------------------
  |  | 1018|    373|#define JANET_SLOT_REF 0x80000
  ------------------
                              ret.flags |= JANET_SLOT_REF | JANET_SLOT_NAMED | JANET_SLOT_MUTABLE | JANET_SLOTTYPE_ANY;
  ------------------
  |  | 1016|    373|#define JANET_SLOT_NAMED 0x20000
  ------------------
                              ret.flags |= JANET_SLOT_REF | JANET_SLOT_NAMED | JANET_SLOT_MUTABLE | JANET_SLOTTYPE_ANY;
  ------------------
  |  | 1017|    373|#define JANET_SLOT_MUTABLE 0x40000
  ------------------
                              ret.flags |= JANET_SLOT_REF | JANET_SLOT_NAMED | JANET_SLOT_MUTABLE | JANET_SLOTTYPE_ANY;
  ------------------
  |  | 1025|    373|#define JANET_SLOTTYPE_ANY 0xFFFF
  ------------------
 7290|    373|                ret.flags &= ~JANET_SLOT_CONSTANT;
  ------------------
  |  | 1015|    373|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
 7291|    373|                break;
 7292|      0|            }
 7293|   725k|        }
 7294|   724k|        JanetCompileLintLevel depLevel = JANET_C_LINT_RELAXED;
 7295|   724k|        switch (binding.deprecation) {
  ------------------
  |  Branch (7295:17): [True: 724k, False: 0]
  ------------------
 7296|   724k|            case JANET_BINDING_DEP_NONE:
  ------------------
  |  Branch (7296:13): [True: 724k, False: 0]
  ------------------
 7297|   724k|                break;
 7298|      0|            case JANET_BINDING_DEP_RELAXED:
  ------------------
  |  Branch (7298:13): [True: 0, False: 724k]
  ------------------
 7299|      0|                depLevel = JANET_C_LINT_RELAXED;
 7300|      0|                break;
 7301|      0|            case JANET_BINDING_DEP_NORMAL:
  ------------------
  |  Branch (7301:13): [True: 0, False: 724k]
  ------------------
 7302|      0|                depLevel = JANET_C_LINT_NORMAL;
 7303|      0|                break;
 7304|      0|            case JANET_BINDING_DEP_STRICT:
  ------------------
  |  Branch (7304:13): [True: 0, False: 724k]
  ------------------
 7305|      0|                depLevel = JANET_C_LINT_STRICT;
 7306|      0|                break;
 7307|   724k|        }
 7308|   724k|        if (binding.deprecation != JANET_BINDING_DEP_NONE) {
  ------------------
  |  Branch (7308:13): [True: 0, False: 724k]
  ------------------
 7309|      0|            janetc_lintf(c, depLevel, "%q is deprecated", janet_wrap_symbol(sym));
  ------------------
  |  |  849|      0|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7310|      0|        }
 7311|   724k|        return ret;
 7312|   724k|    }
 7313|       |
 7314|       |    /* Symbol was found */
 7315|   689k|found:
 7316|       |
 7317|       |    /* Constants can be returned immediately (they are stateless) */
 7318|   689k|    if (ret.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF))
  ------------------
  |  | 1015|   689k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
                  if (ret.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF))
  ------------------
  |  | 1018|   689k|#define JANET_SLOT_REF 0x80000
  ------------------
  |  Branch (7318:9): [True: 0, False: 689k]
  ------------------
 7319|      0|        return ret;
 7320|       |
 7321|       |    /* Unused references and locals shouldn't add captured envs. */
 7322|   689k|    if (foundlocal) {
  ------------------
  |  Branch (7322:9): [True: 386k, False: 302k]
  ------------------
 7323|   386k|        ret.envindex = -1;
 7324|   386k|        return ret;
 7325|   386k|    }
 7326|   302k|    if (unused) {
  ------------------
  |  Branch (7326:9): [True: 1.13k, False: 301k]
  ------------------
 7327|  1.13k|        ret.index = 0; /* we must have at least 1 slot if we are calling resolve in scope */
 7328|  1.13k|        ret.envindex = -1;
 7329|  1.13k|        return ret;
 7330|  1.13k|    }
 7331|   301k|    if (ret.index > 0xFF) {
  ------------------
  |  Branch (7331:9): [True: 16, False: 301k]
  ------------------
 7332|     16|        janetc_error(c, janet_formatc("too many closure upvalues: %S", sym));
 7333|     16|        ret.envindex = -1;
 7334|     16|        return ret;
 7335|     16|    }
 7336|       |
 7337|       |    /* non-local scope needs to expose its environment */
 7338|   301k|    JanetScope *original_scope = scope;
 7339|   301k|    pair->keep = 1;
 7340|   301k|    pair->referenced = 1;
 7341|  1.02M|    while (scope && !(scope->flags & JANET_SCOPE_FUNCTION))
  ------------------
  |  | 1035|  1.02M|#define JANET_SCOPE_FUNCTION 1
  ------------------
  |  Branch (7341:12): [True: 1.02M, False: 0]
  |  Branch (7341:21): [True: 725k, False: 301k]
  ------------------
 7342|   725k|        scope = scope->parent;
 7343|   301k|    janet_assert(scope, "invalid scopes");
  ------------------
  |  |  389|   301k|#define janet_assert(c, m) do { \
  |  |  390|   301k|    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: 301k]
  |  |  ------------------
  |  |  391|   301k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 301k]
  |  |  ------------------
  ------------------
 7344|   301k|    scope->flags |= JANET_SCOPE_ENV;
  ------------------
  |  | 1036|   301k|#define JANET_SCOPE_ENV 2
  ------------------
 7345|       |
 7346|       |    /* In the function scope, allocate the slot as an upvalue */
 7347|   301k|    janetc_regalloc_touch(&scope->ua, ret.index);
 7348|       |
 7349|       |    /* Iterate through child scopes and make sure environment is propagated */
 7350|   301k|    scope = scope->child;
 7351|       |
 7352|       |    /* Propagate env up to current scope */
 7353|   301k|    int32_t envindex = -1;
 7354|  2.50M|    while (scope) {
  ------------------
  |  Branch (7354:12): [True: 2.20M, False: 301k]
  ------------------
 7355|  2.20M|        if (scope->flags & JANET_SCOPE_FUNCTION) {
  ------------------
  |  | 1035|  2.20M|#define JANET_SCOPE_FUNCTION 1
  ------------------
  |  Branch (7355:13): [True: 575k, False: 1.62M]
  ------------------
 7356|   575k|            int32_t j, len;
 7357|   575k|            int scopefound = 0;
 7358|       |            /* Check if scope already has env. If so, break */
 7359|   575k|            len = janet_v_count(scope->envs);
  ------------------
  |  |  736|   575k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   465k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   465k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 465k, False: 110k]
  |  |  ------------------
  ------------------
 7360|   788k|            for (j = 0; j < len; j++) {
  ------------------
  |  Branch (7360:25): [True: 655k, False: 132k]
  ------------------
 7361|   655k|                if (scope->envs[j].envindex == envindex) {
  ------------------
  |  Branch (7361:21): [True: 442k, False: 212k]
  ------------------
 7362|   442k|                    scopefound = 1;
 7363|   442k|                    envindex = j;
 7364|   442k|                    break;
 7365|   442k|                }
 7366|   655k|            }
 7367|       |            /* Add the environment if it is not already referenced */
 7368|   575k|            if (!scopefound) {
  ------------------
  |  Branch (7368:17): [True: 132k, False: 442k]
  ------------------
 7369|   132k|                len = janet_v_count(scope->envs);
  ------------------
  |  |  736|   132k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  22.7k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  22.7k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 22.7k, False: 110k]
  |  |  ------------------
  ------------------
 7370|   132k|                JanetEnvRef ref;
 7371|   132k|                ref.envindex = envindex;
 7372|   132k|                ref.scope = original_scope;
 7373|   132k|                janet_v_push(scope->envs, ref);
  ------------------
  |  |  734|   132k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|   132k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|   132k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  22.7k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  22.7k|#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|  22.7k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  22.7k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 110k, False: 22.7k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 22.7k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|   132k|#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|   132k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   132k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7374|   132k|                envindex = len;
 7375|   132k|            }
 7376|   575k|        }
 7377|  2.20M|        scope = scope->child;
 7378|  2.20M|    }
 7379|       |
 7380|   301k|    ret.envindex = envindex;
 7381|   301k|    return ret;
 7382|   301k|}
janetc_return:
 7385|   593k|JanetSlot janetc_return(JanetCompiler *c, JanetSlot s) {
 7386|   593k|    if (!(s.flags & JANET_SLOT_RETURNED)) {
  ------------------
  |  | 1019|   593k|#define JANET_SLOT_RETURNED 0x100000
  ------------------
  |  Branch (7386:9): [True: 569k, False: 24.4k]
  ------------------
 7387|   569k|        if (s.flags & JANET_SLOT_CONSTANT && janet_checktype(s.constant, JANET_NIL))
  ------------------
  |  | 1015|  1.13M|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
                      if (s.flags & JANET_SLOT_CONSTANT && janet_checktype(s.constant, JANET_NIL))
  ------------------
  |  |  806|   103k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 23.5k, False: 79.4k]
  |  |  |  Branch (806:6): [Folded, False: 103k]
  |  |  ------------------
  |  |  807|   103k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   103k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   103k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   103k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   103k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   103k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7387:13): [True: 103k, False: 466k]
  ------------------
 7388|  23.5k|            janetc_emit(c, JOP_RETURN_NIL);
 7389|   545k|        else
 7390|   545k|            janetc_emit_s(c, JOP_RETURN, s, 0);
 7391|   569k|        s.flags |= JANET_SLOT_RETURNED;
  ------------------
  |  | 1019|   569k|#define JANET_SLOT_RETURNED 0x100000
  ------------------
 7392|   569k|    }
 7393|   593k|    return s;
 7394|   593k|}
janetc_gettarget:
 7397|  3.22M|JanetSlot janetc_gettarget(JanetFopts opts) {
 7398|  3.22M|    JanetSlot slot;
 7399|  3.22M|    if ((opts.flags & JANET_FOPTS_HINT) &&
  ------------------
  |  | 1125|  3.22M|#define JANET_FOPTS_HINT 0x20000
  ------------------
  |  Branch (7399:9): [True: 54.5k, False: 3.17M]
  ------------------
 7400|  54.5k|            (opts.hint.envindex < 0) &&
  ------------------
  |  Branch (7400:13): [True: 29.2k, False: 25.2k]
  ------------------
 7401|  29.2k|            (opts.hint.index >= 0 && opts.hint.index <= 0xFF)) {
  ------------------
  |  Branch (7401:14): [True: 29.2k, False: 0]
  |  Branch (7401:38): [True: 29.2k, False: 17]
  ------------------
 7402|  29.2k|        slot = opts.hint;
 7403|  3.19M|    } else {
 7404|  3.19M|        slot.envindex = -1;
 7405|  3.19M|        slot.constant = janet_wrap_nil();
  ------------------
  |  |  831|  3.19M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  3.19M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.19M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.19M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7406|  3.19M|        slot.flags = 0;
 7407|  3.19M|        slot.index = janetc_allocfar(opts.compiler);
 7408|  3.19M|    }
 7409|  3.22M|    return slot;
 7410|  3.22M|}
janetc_toslots:
 7413|   708k|JanetSlot *janetc_toslots(JanetCompiler *c, const Janet *vals, int32_t len) {
 7414|   708k|    int32_t i;
 7415|   708k|    JanetSlot *ret = NULL;
 7416|   708k|    JanetFopts subopts = janetc_fopts_default(c);
 7417|   708k|    subopts.flags |= JANET_FOPTS_ACCEPT_SPLICE;
  ------------------
  |  | 1127|   708k|#define JANET_FOPTS_ACCEPT_SPLICE 0x80000
  ------------------
 7418|  3.14M|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (7418:17): [True: 2.43M, False: 708k]
  ------------------
 7419|       |        janet_v_push(ret, janetc_value(subopts, vals[i]));
  ------------------
  |  |  734|  2.43M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  2.43M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  2.43M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  1.76M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  1.76M|#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.76M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  1.76M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 669k, False: 1.76M]
  |  |  |  |  |  |  |  Branch (745:50): [True: 843k, False: 926k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  1.51M|#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.43M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  2.43M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7420|  2.43M|    }
 7421|   708k|    return ret;
 7422|   708k|}
janetc_toslotskv:
 7425|  2.44k|JanetSlot *janetc_toslotskv(JanetCompiler *c, Janet ds) {
 7426|  2.44k|    JanetSlot *ret = NULL;
 7427|  2.44k|    JanetFopts subopts = janetc_fopts_default(c);
 7428|  2.44k|    subopts.flags |= JANET_FOPTS_ACCEPT_SPLICE;
  ------------------
  |  | 1127|  2.44k|#define JANET_FOPTS_ACCEPT_SPLICE 0x80000
  ------------------
 7429|  2.44k|    const JanetKV *kvs = NULL;
 7430|  2.44k|    int32_t cap = 0, len = 0;
 7431|  2.44k|    janet_dictionary_view(ds, &kvs, &len, &cap);
 7432|       |    /* Sort keys for stability of order? */
 7433|  2.44k|    int32_t *index_buf;
 7434|  2.44k|    int32_t index_buf_stack[32];
 7435|  2.44k|    int32_t *index_buf_heap = NULL;
 7436|  2.44k|    if (len < 32) {
  ------------------
  |  Branch (7436:9): [True: 2.42k, False: 11]
  ------------------
 7437|  2.42k|        index_buf = index_buf_stack;
 7438|  2.42k|    } else {
 7439|     11|        index_buf_heap = janet_smalloc(sizeof(int32_t) * len);
 7440|     11|        index_buf = index_buf_heap;
 7441|     11|    }
 7442|  2.44k|    if (len) janet_sorted_keys(kvs, cap, index_buf);
  ------------------
  |  Branch (7442:9): [True: 284, False: 2.15k]
  ------------------
 7443|  4.71k|    for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (7443:25): [True: 2.27k, False: 2.44k]
  ------------------
 7444|  2.27k|        janet_v_push(ret, janetc_value(subopts, kvs[index_buf[i]].key));
  ------------------
  |  |  734|  2.27k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  2.27k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  2.27k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  1.99k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  1.99k|#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.99k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  1.99k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 284, False: 1.99k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 258, False: 1.73k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|    542|#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.27k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  2.27k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7445|  2.27k|        janet_v_push(ret, janetc_value(subopts, kvs[index_buf[i]].value));
  ------------------
  |  |  734|  2.27k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  2.27k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  2.27k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  2.27k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  2.27k|#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.27k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  2.27k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 0, False: 2.27k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 876, False: 1.40k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|    876|#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.27k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  2.27k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7446|  2.27k|    }
 7447|  2.44k|    if (index_buf_heap) janet_sfree(index_buf_heap);
  ------------------
  |  Branch (7447:9): [True: 11, False: 2.42k]
  ------------------
 7448|  2.44k|    return ret;
 7449|  2.44k|}
janetc_pushslots:
 7454|  2.32M|int32_t janetc_pushslots(JanetCompiler *c, JanetSlot *slots) {
 7455|  2.32M|    int32_t i;
 7456|  2.32M|    int32_t count = janet_v_count(slots);
  ------------------
  |  |  736|  2.32M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  2.24M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  2.24M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 2.24M, False: 83.2k]
  |  |  ------------------
  ------------------
 7457|  2.32M|    int32_t min_arity = 0;
 7458|  2.32M|    int has_splice = 0;
 7459|  5.11M|    for (i = 0; i < count;) {
  ------------------
  |  Branch (7459:17): [True: 2.78M, False: 2.32M]
  ------------------
 7460|  2.78M|        if (slots[i].flags & JANET_SLOT_SPLICED) {
  ------------------
  |  | 1023|  2.78M|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
  |  Branch (7460:13): [True: 7.75k, False: 2.78M]
  ------------------
 7461|  7.75k|            janetc_emit_s(c, JOP_PUSH_ARRAY, slots[i], 0);
 7462|  7.75k|            i++;
 7463|  7.75k|            has_splice = 1;
 7464|  2.78M|        } else if (i + 1 == count) {
  ------------------
  |  Branch (7464:20): [True: 226k, False: 2.55M]
  ------------------
 7465|   226k|            janetc_emit_s(c, JOP_PUSH, slots[i], 0);
 7466|   226k|            i++;
 7467|   226k|            min_arity++;
 7468|  2.55M|        } else if (slots[i + 1].flags & JANET_SLOT_SPLICED) {
  ------------------
  |  | 1023|  2.55M|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
  |  Branch (7468:20): [True: 128k, False: 2.42M]
  ------------------
 7469|   128k|            janetc_emit_s(c, JOP_PUSH, slots[i], 0);
 7470|   128k|            janetc_emit_s(c, JOP_PUSH_ARRAY, slots[i + 1], 0);
 7471|   128k|            i += 2;
 7472|   128k|            min_arity++;
 7473|   128k|            has_splice = 1;
 7474|  2.42M|        } else if (i + 2 == count) {
  ------------------
  |  Branch (7474:20): [True: 1.99M, False: 429k]
  ------------------
 7475|  1.99M|            janetc_emit_ss(c, JOP_PUSH_2, slots[i], slots[i + 1], 0);
 7476|  1.99M|            i += 2;
 7477|  1.99M|            min_arity += 2;
 7478|  1.99M|        } else if (slots[i + 2].flags & JANET_SLOT_SPLICED) {
  ------------------
  |  | 1023|   429k|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
  |  Branch (7478:20): [True: 1.70k, False: 428k]
  ------------------
 7479|  1.70k|            janetc_emit_ss(c, JOP_PUSH_2, slots[i], slots[i + 1], 0);
 7480|  1.70k|            janetc_emit_s(c, JOP_PUSH_ARRAY, slots[i + 2], 0);
 7481|  1.70k|            i += 3;
 7482|  1.70k|            min_arity += 2;
 7483|  1.70k|            has_splice = 1;
 7484|   428k|        } else {
 7485|   428k|            janetc_emit_sss(c, JOP_PUSH_3, slots[i], slots[i + 1], slots[i + 2], 0);
 7486|   428k|            i += 3;
 7487|   428k|            min_arity += 3;
 7488|   428k|        }
 7489|  2.78M|    }
 7490|  2.32M|    return has_splice ? (-1 - min_arity) : min_arity;
  ------------------
  |  Branch (7490:12): [True: 129k, False: 2.19M]
  ------------------
 7491|  2.32M|}
janetc_freeslots:
 7504|  2.81M|void janetc_freeslots(JanetCompiler *c, JanetSlot *slots) {
 7505|  2.81M|    int32_t i;
 7506|  9.77M|    for (i = 0; i < janet_v_count(slots); i++) {
  ------------------
  |  |  736|  9.77M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  9.67M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  9.67M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 9.67M, False: 99.3k]
  |  |  ------------------
  ------------------
  |  Branch (7506:17): [True: 6.95M, False: 2.81M]
  ------------------
 7507|  6.95M|        janetc_freeslot(c, slots[i]);
 7508|  6.95M|    }
 7509|       |    janet_v_free(slots);
  ------------------
  |  |  733|  2.81M|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|  2.71M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 2.71M, False: 99.3k]
  |  |  ------------------
  ------------------
 7510|  2.81M|}
janetc_throwaway:
 7515|  47.1k|void janetc_throwaway(JanetFopts opts, Janet x) {
 7516|  47.1k|    JanetCompiler *c = opts.compiler;
 7517|  47.1k|    JanetScope unusedScope;
 7518|  47.1k|    int32_t bufstart = janet_v_count(c->buffer);
  ------------------
  |  |  736|  47.1k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  47.1k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  47.1k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 47.1k, False: 10]
  |  |  ------------------
  ------------------
 7519|  47.1k|    int32_t mapbufstart = janet_v_count(c->mapbuffer);
  ------------------
  |  |  736|  47.1k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  47.1k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  47.1k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 47.1k, False: 10]
  |  |  ------------------
  ------------------
 7520|  47.1k|    janetc_scope(&unusedScope, c, JANET_SCOPE_UNUSED, "unused");
  ------------------
  |  | 1038|  47.1k|#define JANET_SCOPE_UNUSED 8
  ------------------
 7521|  47.1k|    janetc_value(opts, x);
 7522|  47.1k|    janetc_lintf(c, JANET_C_LINT_STRICT, "dead code, consider removing %.4q", x);
 7523|  47.1k|    janetc_popscope(c);
 7524|  47.1k|    if (c->buffer) {
  ------------------
  |  Branch (7524:9): [True: 47.1k, False: 10]
  ------------------
 7525|  47.1k|        janet_v__cnt(c->buffer) = bufstart;
  ------------------
  |  |  743|  47.1k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  ------------------
  |  |  |  |  741|  47.1k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
 7526|  47.1k|        if (c->mapbuffer)
  ------------------
  |  Branch (7526:13): [True: 47.1k, False: 0]
  ------------------
 7527|  47.1k|            janet_v__cnt(c->mapbuffer) = mapbufstart;
  ------------------
  |  |  743|  47.1k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  ------------------
  |  |  |  |  741|  47.1k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
 7528|  47.1k|    }
 7529|  47.1k|}
janetc_value:
 7902|  5.73M|JanetSlot janetc_value(JanetFopts opts, Janet x) {
 7903|  5.73M|    JanetSlot ret;
 7904|  5.73M|    JanetCompiler *c = opts.compiler;
 7905|  5.73M|    JanetSourceMapping last_mapping = c->current_mapping;
 7906|  5.73M|    c->recursion_guard--;
 7907|       |
 7908|       |    /* Guard against previous errors and unbounded recursion */
 7909|  5.73M|    if (c->result.status == JANET_COMPILE_ERROR) return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|   311k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   311k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   311k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   311k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7909:9): [True: 311k, False: 5.42M]
  ------------------
 7910|  5.42M|    if (c->recursion_guard <= 0) {
  ------------------
  |  Branch (7910:9): [True: 6, False: 5.42M]
  ------------------
 7911|      6|        janetc_cerror(c, "recursed too deeply");
 7912|      6|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|      6|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      6|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      6|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      6|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7913|      6|    }
 7914|       |
 7915|       |    /* Macro expand. Also gets possible special form and
 7916|       |     * refines source mapping cursor if possible. */
 7917|  5.42M|    const JanetSpecial *spec = NULL;
 7918|  5.42M|    int macroi = JANET_MAX_MACRO_EXPAND;
  ------------------
  |  |  302|  5.42M|#define JANET_MAX_MACRO_EXPAND 200
  ------------------
 7919|  5.72M|    while (macroi &&
  ------------------
  |  Branch (7919:12): [True: 5.72M, False: 0]
  ------------------
 7920|  5.72M|            c->result.status != JANET_COMPILE_ERROR &&
  ------------------
  |  Branch (7920:13): [True: 5.72M, False: 0]
  ------------------
 7921|  5.72M|            macroexpand1(c, x, &x, &spec))
  ------------------
  |  Branch (7921:13): [True: 304k, False: 5.42M]
  ------------------
 7922|   304k|        macroi--;
 7923|  5.42M|    if (macroi == 0) {
  ------------------
  |  Branch (7923:9): [True: 0, False: 5.42M]
  ------------------
 7924|      0|        janetc_cerror(c, "recursed too deeply in macro expansion");
 7925|      0|        return janetc_cslot(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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7926|      0|    }
 7927|       |
 7928|       |    /* Special forms */
 7929|  5.42M|    if (spec) {
  ------------------
  |  Branch (7929:9): [True: 2.39M, False: 3.02M]
  ------------------
 7930|  2.39M|        const Janet *tup = janet_unwrap_tuple(x);
  ------------------
  |  |  858|  2.39M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
 7931|  2.39M|        ret = spec->compile(opts, janet_tuple_length(tup) - 1, tup + 1);
  ------------------
  |  | 1802|  2.39M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  2.39M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
 7932|  3.02M|    } else {
 7933|  3.02M|        switch (janet_type(x)) {
  ------------------
  |  |  795|  3.02M|    (isnan((x).number) \
  |  |  796|  3.02M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  3.02M|        : JANET_NUMBER)
  ------------------
  |  Branch (7933:17): [True: 2.62M, False: 399k]
  ------------------
 7934|   907k|            case JANET_TUPLE: {
  ------------------
  |  Branch (7934:13): [True: 907k, False: 2.11M]
  ------------------
 7935|   907k|                JanetFopts subopts = janetc_fopts_default(c);
 7936|   907k|                const Janet *tup = janet_unwrap_tuple(x);
  ------------------
  |  |  858|   907k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
 7937|       |                /* Empty tuple is tuple literal */
 7938|   907k|                if (janet_tuple_length(tup) == 0) {
  ------------------
  |  | 1802|   907k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|   907k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (7938:21): [True: 204k, False: 702k]
  ------------------
 7939|   204k|                    ret = janetc_cslot(janet_wrap_tuple(janet_tuple_n(NULL, 0)));
  ------------------
  |  |  843|   204k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|   204k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   204k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   204k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7940|   702k|                } else if (janet_tuple_flag(tup) & JANET_TUPLE_FLAG_BRACKETCTOR) { /* [] tuples are not function call */
  ------------------
  |  | 1806|   702k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|   702k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                              } else if (janet_tuple_flag(tup) & JANET_TUPLE_FLAG_BRACKETCTOR) { /* [] tuples are not function call */
  ------------------
  |  | 1798|   702k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (7940:28): [True: 1.45k, False: 701k]
  ------------------
 7941|  1.45k|                    ret = janetc_tuple(opts, x);
 7942|   701k|                } else {
 7943|       |                    /* Function calls */
 7944|   701k|                    JanetSlot head = janetc_value(subopts, tup[0]);
 7945|   701k|                    ret = janetc_call(opts, janetc_toslots(c, tup + 1, janet_tuple_length(tup) - 1), head, tup);
  ------------------
  |  | 1802|   701k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|   701k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
 7946|   701k|                    janetc_freeslot(c, head);
 7947|   701k|                }
 7948|   907k|                ret.flags &= ~JANET_SLOT_SPLICED;
  ------------------
  |  | 1023|   907k|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
 7949|   907k|            }
 7950|   907k|            break;
 7951|       |            /* Data Constructors */
 7952|  1.35M|            case JANET_SYMBOL:
  ------------------
  |  Branch (7952:13): [True: 1.35M, False: 1.66M]
  ------------------
 7953|  1.35M|                ret = janetc_resolve(c, janet_unwrap_symbol(x));
  ------------------
  |  |  864|  1.35M|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
 7954|  1.35M|                break;
 7955|  3.84k|            case JANET_ARRAY:
  ------------------
  |  Branch (7955:13): [True: 3.84k, False: 3.02M]
  ------------------
 7956|  3.84k|                ret = janetc_array(opts, x);
 7957|  3.84k|                break;
 7958|  2.33k|            case JANET_STRUCT:
  ------------------
  |  Branch (7958:13): [True: 2.33k, False: 3.02M]
  ------------------
 7959|  2.33k|                ret = janetc_tablector(opts, x, JOP_MAKE_STRUCT);
 7960|  2.33k|                break;
 7961|    110|            case JANET_TABLE:
  ------------------
  |  Branch (7961:13): [True: 110, False: 3.02M]
  ------------------
 7962|    110|                ret = janetc_tablector(opts, x, JOP_MAKE_TABLE);
 7963|    110|                break;
 7964|  1.52k|            case JANET_BUFFER:
  ------------------
  |  Branch (7964:13): [True: 1.52k, False: 3.02M]
  ------------------
 7965|  1.52k|                ret = janetc_bufferctor(opts, x);
 7966|  1.52k|                break;
 7967|   751k|            default:
  ------------------
  |  Branch (7967:13): [True: 751k, False: 2.27M]
  ------------------
 7968|   751k|                ret = janetc_cslot(x);
 7969|   751k|                break;
 7970|  3.02M|        }
 7971|  3.02M|    }
 7972|       |
 7973|  5.42M|    if (c->result.status == JANET_COMPILE_ERROR)
  ------------------
  |  Branch (7973:9): [True: 33.7k, False: 5.38M]
  ------------------
 7974|  33.7k|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|  33.7k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  33.7k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  33.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  33.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7975|  5.38M|    if (opts.flags & JANET_FOPTS_TAIL)
  ------------------
  |  | 1124|  5.38M|#define JANET_FOPTS_TAIL 0x10000
  ------------------
  |  Branch (7975:9): [True: 593k, False: 4.79M]
  ------------------
 7976|   593k|        ret = janetc_return(c, ret);
 7977|  5.38M|    if (opts.flags & JANET_FOPTS_HINT) {
  ------------------
  |  | 1125|  5.38M|#define JANET_FOPTS_HINT 0x20000
  ------------------
  |  Branch (7977:9): [True: 54.7k, False: 5.33M]
  ------------------
 7978|  54.7k|        janetc_copy(c, opts.hint, ret);
 7979|  54.7k|        ret = opts.hint;
 7980|  54.7k|    }
 7981|  5.38M|    c->current_mapping = last_mapping;
 7982|  5.38M|    c->recursion_guard++;
 7983|  5.38M|    return ret;
 7984|  5.42M|}
janet_def_addflags:
 7987|   591k|void janet_def_addflags(JanetFuncDef *def) {
 7988|   591k|    int32_t set_flags = 0;
 7989|   591k|    int32_t unset_flags = 0;
 7990|       |    /* pos checks */
 7991|   591k|    if (def->name)              set_flags |= JANET_FUNCDEF_FLAG_HASNAME;
  ------------------
  |  | 1100|   591k|#define JANET_FUNCDEF_FLAG_HASNAME 0x80000
  ------------------
  |  Branch (7991:9): [True: 591k, False: 285]
  ------------------
 7992|   591k|    if (def->source)            set_flags |= JANET_FUNCDEF_FLAG_HASSOURCE;
  ------------------
  |  | 1101|   591k|#define JANET_FUNCDEF_FLAG_HASSOURCE 0x100000
  ------------------
  |  Branch (7992:9): [True: 591k, False: 2]
  ------------------
 7993|   591k|    if (def->defs)              set_flags |= JANET_FUNCDEF_FLAG_HASDEFS;
  ------------------
  |  | 1102|   211k|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (7993:9): [True: 211k, False: 380k]
  ------------------
 7994|   591k|    if (def->environments)      set_flags |= JANET_FUNCDEF_FLAG_HASENVS;
  ------------------
  |  | 1103|   591k|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (7994:9): [True: 591k, False: 0]
  ------------------
 7995|   591k|    if (def->sourcemap)         set_flags |= JANET_FUNCDEF_FLAG_HASSOURCEMAP;
  ------------------
  |  | 1104|   591k|#define JANET_FUNCDEF_FLAG_HASSOURCEMAP 0x800000
  ------------------
  |  Branch (7995:9): [True: 591k, False: 2]
  ------------------
 7996|   591k|    if (def->closure_bitset)    set_flags |= JANET_FUNCDEF_FLAG_HASCLOBITSET;
  ------------------
  |  | 1106|  13.4k|#define JANET_FUNCDEF_FLAG_HASCLOBITSET 0x2000000
  ------------------
  |  Branch (7996:9): [True: 13.4k, False: 578k]
  ------------------
 7997|   591k|    if (def->named_args_count)  set_flags |= JANET_FUNCDEF_FLAG_NAMEDARGS;
  ------------------
  |  | 1107|      8|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (7997:9): [True: 8, False: 591k]
  ------------------
 7998|       |    /* negative checks */
 7999|   591k|    if (!def->name)             unset_flags |= JANET_FUNCDEF_FLAG_HASNAME;
  ------------------
  |  | 1100|    285|#define JANET_FUNCDEF_FLAG_HASNAME 0x80000
  ------------------
  |  Branch (7999:9): [True: 285, False: 591k]
  ------------------
 8000|   591k|    if (!def->source)           unset_flags |= JANET_FUNCDEF_FLAG_HASSOURCE;
  ------------------
  |  | 1101|      2|#define JANET_FUNCDEF_FLAG_HASSOURCE 0x100000
  ------------------
  |  Branch (8000:9): [True: 2, False: 591k]
  ------------------
 8001|   591k|    if (!def->defs)             unset_flags |= JANET_FUNCDEF_FLAG_HASDEFS;
  ------------------
  |  | 1102|   380k|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (8001:9): [True: 380k, False: 211k]
  ------------------
 8002|   591k|    if (!def->environments)     unset_flags |= JANET_FUNCDEF_FLAG_HASENVS;
  ------------------
  |  | 1103|      0|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (8002:9): [True: 0, False: 591k]
  ------------------
 8003|   591k|    if (!def->sourcemap)        unset_flags |= JANET_FUNCDEF_FLAG_HASSOURCEMAP;
  ------------------
  |  | 1104|      2|#define JANET_FUNCDEF_FLAG_HASSOURCEMAP 0x800000
  ------------------
  |  Branch (8003:9): [True: 2, False: 591k]
  ------------------
 8004|   591k|    if (!def->closure_bitset)   unset_flags |= JANET_FUNCDEF_FLAG_HASCLOBITSET;
  ------------------
  |  | 1106|   578k|#define JANET_FUNCDEF_FLAG_HASCLOBITSET 0x2000000
  ------------------
  |  Branch (8004:9): [True: 578k, False: 13.4k]
  ------------------
 8005|   591k|    if (!def->named_args_count) unset_flags |= JANET_FUNCDEF_FLAG_NAMEDARGS;
  ------------------
  |  | 1107|   591k|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (8005:9): [True: 591k, False: 8]
  ------------------
 8006|       |    /* Update flags */
 8007|   591k|    def->flags |= set_flags;
 8008|   591k|    def->flags &= ~unset_flags;
 8009|   591k|}
janetc_pop_funcdef:
 8014|   591k|JanetFuncDef *janetc_pop_funcdef(JanetCompiler *c, JanetString name) {
 8015|   591k|    JanetScope *scope = c->scope;
 8016|   591k|    JanetFuncDef *def = janet_funcdef_alloc();
 8017|   591k|    def->slotcount = scope->ra.max + 1;
 8018|       |
 8019|   591k|    janet_assert(scope->flags & JANET_SCOPE_FUNCTION, "expected function scope");
  ------------------
  |  |  389|   591k|#define janet_assert(c, m) do { \
  |  |  390|   591k|    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: 591k]
  |  |  ------------------
  |  |  391|   591k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 591k]
  |  |  ------------------
  ------------------
 8020|       |
 8021|       |    /* Copy envs */
 8022|   591k|    def->environments_length = janet_v_count(scope->envs);
  ------------------
  |  |  736|   591k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   109k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   109k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 109k, False: 482k]
  |  |  ------------------
  ------------------
 8023|   591k|    def->environments = janet_malloc(sizeof(int32_t) * def->environments_length);
  ------------------
  |  | 2406|   591k|#define janet_malloc(X) malloc((X))
  ------------------
 8024|   724k|    for (int32_t i = 0; i < def->environments_length; i++) {
  ------------------
  |  Branch (8024:25): [True: 132k, False: 591k]
  ------------------
 8025|   132k|        def->environments[i] = scope->envs[i].envindex;
 8026|   132k|    }
 8027|       |
 8028|   591k|    def->constants_length = janet_v_count(scope->consts);
  ------------------
  |  |  736|   591k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   272k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   272k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 272k, False: 319k]
  |  |  ------------------
  ------------------
 8029|   591k|    def->constants = janet_v_flatten(scope->consts);
  ------------------
  |  |  739|   591k|#define janet_v_flatten(v)      (janet_v_flattenmem((v), sizeof(*(v))))
  ------------------
 8030|       |
 8031|   591k|    def->defs_length = janet_v_count(scope->defs);
  ------------------
  |  |  736|   591k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   211k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   211k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 211k, False: 380k]
  |  |  ------------------
  ------------------
 8032|   591k|    def->defs = janet_v_flatten(scope->defs);
  ------------------
  |  |  739|   591k|#define janet_v_flatten(v)      (janet_v_flattenmem((v), sizeof(*(v))))
  ------------------
 8033|       |
 8034|       |    /* Copy bytecode (only last chunk) */
 8035|   591k|    def->bytecode_length = janet_v_count(c->buffer) - scope->bytecode_start;
  ------------------
  |  |  736|   591k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   591k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   591k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 591k, False: 0]
  |  |  ------------------
  ------------------
 8036|   591k|    if (def->bytecode_length) {
  ------------------
  |  Branch (8036:9): [True: 591k, False: 0]
  ------------------
 8037|   591k|        size_t s = sizeof(int32_t) * (size_t) def->bytecode_length;
 8038|   591k|        def->bytecode = janet_malloc(s);
  ------------------
  |  | 2406|   591k|#define janet_malloc(X) malloc((X))
  ------------------
 8039|   591k|        if (NULL == def->bytecode) {
  ------------------
  |  Branch (8039:13): [True: 0, False: 591k]
  ------------------
 8040|      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]
  |  |  ------------------
  ------------------
 8041|      0|        }
 8042|   591k|        safe_memcpy(def->bytecode, c->buffer + scope->bytecode_start, s);
 8043|   591k|        janet_v__cnt(c->buffer) = scope->bytecode_start;
  ------------------
  |  |  743|   591k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  ------------------
  |  |  |  |  741|   591k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
 8044|   591k|        if (NULL != c->mapbuffer && c->source) {
  ------------------
  |  Branch (8044:13): [True: 591k, False: 0]
  |  Branch (8044:37): [True: 591k, False: 2]
  ------------------
 8045|   591k|            size_t s = sizeof(JanetSourceMapping) * (size_t) def->bytecode_length;
 8046|   591k|            def->sourcemap = janet_malloc(s);
  ------------------
  |  | 2406|   591k|#define janet_malloc(X) malloc((X))
  ------------------
 8047|   591k|            if (NULL == def->sourcemap) {
  ------------------
  |  Branch (8047:17): [True: 0, False: 591k]
  ------------------
 8048|      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]
  |  |  ------------------
  ------------------
 8049|      0|            }
 8050|   591k|            safe_memcpy(def->sourcemap, c->mapbuffer + scope->bytecode_start, s);
 8051|   591k|            janet_v__cnt(c->mapbuffer) = scope->bytecode_start;
  ------------------
  |  |  743|   591k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  ------------------
  |  |  |  |  741|   591k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
 8052|   591k|        }
 8053|   591k|    }
 8054|       |
 8055|       |    /* Get source from parser */
 8056|   591k|    def->source = c->source;
 8057|       |
 8058|   591k|    def->arity = 0;
 8059|   591k|    def->min_arity = 0;
 8060|   591k|    def->flags = 0;
 8061|   591k|    if (scope->flags & JANET_SCOPE_ENV) {
  ------------------
  |  | 1036|   591k|#define JANET_SCOPE_ENV 2
  ------------------
  |  Branch (8061:9): [True: 13.4k, False: 578k]
  ------------------
 8062|  13.4k|        def->flags |= JANET_FUNCDEF_FLAG_NEEDSENV;
  ------------------
  |  | 1098|  13.4k|#define JANET_FUNCDEF_FLAG_NEEDSENV 0x20000
  ------------------
 8063|  13.4k|    }
 8064|       |
 8065|       |    /* Copy upvalue bitset */
 8066|   591k|    if (scope->ua.count) {
  ------------------
  |  Branch (8066:9): [True: 13.4k, False: 578k]
  ------------------
 8067|       |        /* Number of u32s we need to create a bitmask for all slots */
 8068|  13.4k|        int32_t slotchunks = ((def->slotcount - 1) >> 5) + 1;
 8069|       |        /* numchunks is min of slotchunks and scope->ua.count */
 8070|  13.4k|        int32_t numchunks = slotchunks > scope->ua.count ? scope->ua.count : slotchunks;
  ------------------
  |  Branch (8070:29): [True: 75, False: 13.4k]
  ------------------
 8071|  13.4k|        uint32_t *chunks = janet_calloc(slotchunks, sizeof(uint32_t));
  ------------------
  |  | 2412|  13.4k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
 8072|  13.4k|        if (NULL == chunks) {
  ------------------
  |  Branch (8072:13): [True: 0, False: 13.4k]
  ------------------
 8073|      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]
  |  |  ------------------
  ------------------
 8074|      0|        }
 8075|  13.4k|        memcpy(chunks, scope->ua.chunks, sizeof(uint32_t) * numchunks);
 8076|       |        /* fprintf(stderr, "slot chunks: %d, scope->ua.count: %d, numchunks: %d\n", slotchunks, scope->ua.count, numchunks); */
 8077|       |        /* Register allocator preallocates some registers [240-255, high 16 bits of chunk index 7], we can ignore those. */
 8078|  13.4k|        if (scope->ua.count > 7 && slotchunks > 7) chunks[7] &= 0xFFFFU;
  ------------------
  |  Branch (8078:13): [True: 2, False: 13.4k]
  |  Branch (8078:36): [True: 1, False: 1]
  ------------------
 8079|  13.4k|        def->closure_bitset = chunks;
 8080|  13.4k|    }
 8081|       |
 8082|       |    /* Capture symbol to local mapping */
 8083|   591k|    JanetSymbolMap *locals = NULL;
 8084|       |
 8085|       |    /* Symbol -> upvalue mapping */
 8086|   591k|    JanetScope *top = c->scope;
 8087|  8.52M|    while (top->parent) top = top->parent;
  ------------------
  |  Branch (8087:12): [True: 7.93M, False: 591k]
  ------------------
 8088|  9.12M|    for (JanetScope *s = top; s != NULL; s = s->child) {
  ------------------
  |  Branch (8088:31): [True: 8.52M, False: 591k]
  ------------------
 8089|  11.1M|        for (int32_t j = 0; j < janet_v_count(scope->envs); j++) {
  ------------------
  |  |  736|  11.1M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  4.73M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  4.73M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 4.73M, False: 6.37M]
  |  |  ------------------
  ------------------
  |  Branch (8089:29): [True: 2.58M, False: 8.52M]
  ------------------
 8090|  2.58M|            JanetEnvRef ref = scope->envs[j];
 8091|  2.58M|            JanetScope *upscope = ref.scope;
 8092|  2.58M|            if (upscope != s) continue;
  ------------------
  |  Branch (8092:17): [True: 2.45M, False: 132k]
  ------------------
 8093|   436k|            for (int32_t i = 0; i < janet_v_count(upscope->syms); i++) {
  ------------------
  |  |  736|   436k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   436k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   436k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 436k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (8093:33): [True: 304k, False: 132k]
  ------------------
 8094|   304k|                SymPair pair = upscope->syms[i];
 8095|   304k|                if (pair.sym2) {
  ------------------
  |  Branch (8095:21): [True: 303k, False: 521]
  ------------------
 8096|   303k|                    JanetSymbolMap jsm;
 8097|   303k|                    jsm.birth_pc = UINT32_MAX;
 8098|   303k|                    jsm.death_pc = j; /* Use death_pc to encode environment index */
 8099|   303k|                    jsm.slot_index = pair.slot.index;
 8100|   303k|                    jsm.symbol = pair.sym2;
 8101|   303k|                    janet_v_push(locals, jsm);
  ------------------
  |  |  734|   303k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|   303k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|   303k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|   194k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|   194k|#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|   194k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|   194k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 109k, False: 194k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 149k, False: 44.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|   259k|#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|   303k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   303k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8102|   303k|                }
 8103|   304k|            }
 8104|   132k|        }
 8105|  8.52M|    }
 8106|       |
 8107|       |    /* Symbol -> slot mapping */
 8108|  5.57M|    for (int32_t i = 0; i < janet_v_count(scope->syms); i++) {
  ------------------
  |  |  736|  5.57M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  5.04M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  5.04M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 5.04M, False: 530k]
  |  |  ------------------
  ------------------
  |  Branch (8108:25): [True: 4.98M, False: 591k]
  ------------------
 8109|  4.98M|        SymPair pair = scope->syms[i];
 8110|  4.98M|        if (pair.sym2) {
  ------------------
  |  Branch (8110:13): [True: 4.96M, False: 25.1k]
  ------------------
 8111|  4.96M|            JanetSymbolMap jsm;
 8112|       |            /* Check for unused symbols */
 8113|  4.96M|            if (pair.referenced == 0 && pair.sym) {
  ------------------
  |  Branch (8113:17): [True: 817k, False: 4.14M]
  |  Branch (8113:41): [True: 792k, False: 25.9k]
  ------------------
 8114|   792k|                janetc_lintf(c, JANET_C_LINT_STRICT, "binding %q is unused", janet_wrap_symbol(pair.sym));
  ------------------
  |  |  849|   792k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|   792k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   792k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   792k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8115|   792k|            }
 8116|  4.96M|            if (pair.death_pc == UINT32_MAX) {
  ------------------
  |  Branch (8116:17): [True: 4.92M, False: 37.7k]
  ------------------
 8117|  4.92M|                jsm.death_pc = def->bytecode_length;
 8118|  4.92M|            } else {
 8119|  37.7k|                jsm.death_pc = pair.death_pc - scope->bytecode_start;
 8120|  37.7k|            }
 8121|       |            /* Handle birth_pc == 0 correctly */
 8122|  4.96M|            if ((uint32_t) scope->bytecode_start > pair.birth_pc) {
  ------------------
  |  Branch (8122:17): [True: 1.25M, False: 3.70M]
  ------------------
 8123|  1.25M|                jsm.birth_pc = 0;
 8124|  3.70M|            } else {
 8125|  3.70M|                jsm.birth_pc = pair.birth_pc - scope->bytecode_start;
 8126|  3.70M|            }
 8127|  4.96M|            janet_assert(jsm.birth_pc <= jsm.death_pc, "birth pc after death pc");
  ------------------
  |  |  389|  4.96M|#define janet_assert(c, m) do { \
  |  |  390|  4.96M|    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: 4.96M]
  |  |  ------------------
  |  |  391|  4.96M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 4.96M]
  |  |  ------------------
  ------------------
 8128|  4.96M|            janet_assert(jsm.birth_pc < (uint32_t) def->bytecode_length, "bad birth pc");
  ------------------
  |  |  389|  4.96M|#define janet_assert(c, m) do { \
  |  |  390|  4.96M|    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: 4.96M]
  |  |  ------------------
  |  |  391|  4.96M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 4.96M]
  |  |  ------------------
  ------------------
 8129|  4.96M|            janet_assert(jsm.death_pc <= (uint32_t) def->bytecode_length, "bad death pc");
  ------------------
  |  |  389|  4.96M|#define janet_assert(c, m) do { \
  |  |  390|  4.96M|    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: 4.96M]
  |  |  ------------------
  |  |  391|  4.96M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 4.96M]
  |  |  ------------------
  ------------------
 8130|  4.96M|            jsm.slot_index = pair.slot.index;
 8131|  4.96M|            jsm.symbol = pair.sym2;
 8132|  4.96M|            janet_v_push(locals, jsm);
  ------------------
  |  |  734|  4.96M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  4.96M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  4.96M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  4.92M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  4.92M|#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.92M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  4.92M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 35.3k, False: 4.92M]
  |  |  |  |  |  |  |  Branch (745:50): [True: 35.8k, False: 4.89M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  71.1k|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  743|  4.96M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  4.96M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8133|  4.96M|        }
 8134|  4.98M|    }
 8135|   591k|    def->symbolmap_length = janet_v_count(locals);
  ------------------
  |  |  736|   591k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   145k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   145k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 145k, False: 446k]
  |  |  ------------------
  ------------------
 8136|   591k|    def->symbolmap = janet_v_flatten(locals);
  ------------------
  |  |  739|   591k|#define janet_v_flatten(v)      (janet_v_flattenmem((v), sizeof(*(v))))
  ------------------
 8137|   591k|    if (def->symbolmap_length) def->flags |= JANET_FUNCDEF_FLAG_HASSYMBOLMAP;
  ------------------
  |  | 1099|   145k|#define JANET_FUNCDEF_FLAG_HASSYMBOLMAP 0x40000
  ------------------
  |  Branch (8137:9): [True: 145k, False: 446k]
  ------------------
 8138|       |
 8139|       |    /* Pop the scope */
 8140|   591k|    janetc_popscope(c);
 8141|       |
 8142|       |    /* Add a name _before_ optimization for debugging */
 8143|   591k|    def->name = name;
 8144|       |
 8145|       |#ifdef JANET_DEBUG
 8146|       |    janet_verify(def);
 8147|       |#endif
 8148|       |
 8149|   591k|    return def;
 8150|   591k|}
janet_compile_lint:
 8189|   243k|                                      JanetTable *env, const uint8_t *where, JanetArray *lints) {
 8190|   243k|    JanetCompiler c;
 8191|   243k|    JanetScope rootscope;
 8192|   243k|    JanetFopts fopts;
 8193|       |
 8194|   243k|    janetc_init(&c, env, where, lints);
 8195|       |
 8196|       |    /* Push a function scope */
 8197|   243k|    janetc_scope(&rootscope, &c, JANET_SCOPE_FUNCTION | JANET_SCOPE_TOP, "root");
  ------------------
  |  | 1035|   243k|#define JANET_SCOPE_FUNCTION 1
  ------------------
                  janetc_scope(&rootscope, &c, JANET_SCOPE_FUNCTION | JANET_SCOPE_TOP, "root");
  ------------------
  |  | 1037|   243k|#define JANET_SCOPE_TOP 4
  ------------------
 8198|       |
 8199|       |    /* Set initial form options */
 8200|   243k|    fopts.compiler = &c;
 8201|   243k|    fopts.flags = JANET_FOPTS_TAIL | JANET_SLOTTYPE_ANY;
  ------------------
  |  | 1124|   243k|#define JANET_FOPTS_TAIL 0x10000
  ------------------
                  fopts.flags = JANET_FOPTS_TAIL | JANET_SLOTTYPE_ANY;
  ------------------
  |  | 1025|   243k|#define JANET_SLOTTYPE_ANY 0xFFFF
  ------------------
 8202|   243k|    fopts.hint = janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|   243k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   243k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   243k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   243k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8203|       |
 8204|       |    /* Compile the value */
 8205|   243k|    janetc_value(fopts, source);
 8206|       |
 8207|   243k|    if (c.result.status == JANET_COMPILE_OK) {
  ------------------
  |  Branch (8207:9): [True: 241k, False: 2.17k]
  ------------------
 8208|   241k|        JanetFuncDef *def = janetc_pop_funcdef(&c, janet_cstring("thunk"));
 8209|   241k|        janet_def_addflags(def);
 8210|   241k|        janet_bytecode_optimize(def, c.optimize);
 8211|   241k|        c.result.funcdef = def;
 8212|   241k|    } else {
 8213|  2.17k|        c.result.error_mapping = c.current_mapping;
 8214|  2.17k|        janetc_popscope(&c);
 8215|  2.17k|    }
 8216|       |
 8217|   243k|    janetc_deinit(&c);
 8218|       |
 8219|   243k|    return c.result;
 8220|   243k|}
janet_compile:
 8222|   242k|JanetCompileResult janet_compile(Janet source, JanetTable *env, const uint8_t *where) {
 8223|       |    return janet_compile_lint(source, env, where, NULL);
 8224|   242k|}
cfun_compile:
 8237|    991|              "line col message]`.") {
 8238|    991|    janet_sandbox_assert(JANET_SANDBOX_COMPILE);
  ------------------
  |  | 2041|    991|#define JANET_SANDBOX_COMPILE 32768
  ------------------
 8239|    991|    janet_arity(argc, 1, 4);
 8240|    991|    JanetTable *env = (argc > 1 && !janet_checktype(argv[1], JANET_NIL))
  ------------------
  |  |  806|    988|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 988]
  |  |  ------------------
  |  |  807|    988|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    988|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    988|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    988|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    988|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    988|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (8240:24): [True: 988, False: 3]
  |  Branch (8240:36): [True: 1, False: 987]
  ------------------
 8241|    991|                      ? janet_gettable(argv, 1) : janet_vm.fiber->env;
 8242|    991|    if (NULL == env) {
  ------------------
  |  Branch (8242:9): [True: 0, False: 991]
  ------------------
 8243|      0|        env = janet_table(0);
 8244|      0|        janet_vm.fiber->env = env;
 8245|      0|    }
 8246|    991|    const uint8_t *source = NULL;
 8247|    991|    if (argc >= 3) {
  ------------------
  |  Branch (8247:9): [True: 987, False: 4]
  ------------------
 8248|    987|        Janet x = argv[2];
 8249|    987|        if (janet_checktype(x, JANET_STRING)) {
  ------------------
  |  |  806|    987|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 987]
  |  |  |  Branch (806:6): [Folded, False: 987]
  |  |  ------------------
  |  |  807|    987|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    987|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    987|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    987|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    987|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    987|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8250|      0|            source = janet_unwrap_string(x);
  ------------------
  |  |  863|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
 8251|    987|        } else if (janet_checktype(x, JANET_KEYWORD)) {
  ------------------
  |  |  806|    987|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 987, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 987]
  |  |  ------------------
  |  |  807|    987|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    987|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    987|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    987|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    987|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    987|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8252|    987|            source = janet_unwrap_keyword(x);
  ------------------
  |  |  865|    987|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
 8253|    987|        } else if (!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 (8253:20): [True: 0, False: 0]
  ------------------
 8254|      0|            janet_panic_type(x, 2, JANET_TFLAG_STRING | JANET_TFLAG_KEYWORD);
  ------------------
  |  |  599|      0|#define JANET_TFLAG_STRING (1 << JANET_STRING)
  ------------------
                          janet_panic_type(x, 2, JANET_TFLAG_STRING | JANET_TFLAG_KEYWORD);
  ------------------
  |  |  601|      0|#define JANET_TFLAG_KEYWORD (1 << JANET_KEYWORD)
  ------------------
 8255|      0|        }
 8256|    987|    }
 8257|    991|    JanetArray *lints = (argc >= 4 && !janet_checktype(argv[3], 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 (8257:26): [True: 0, False: 991]
  |  Branch (8257:39): [True: 0, False: 0]
  ------------------
 8258|    991|                        ? janet_getarray(argv, 3) : NULL;
 8259|    991|    JanetCompileResult res = janet_compile_lint(argv[0], env, source, lints);
 8260|    991|    if (res.status == JANET_COMPILE_OK) {
  ------------------
  |  Branch (8260:9): [True: 989, False: 2]
  ------------------
 8261|    989|        return janet_wrap_function(janet_thunk(res.funcdef));
  ------------------
  |  |  852|    989|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  825|    989|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    989|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    989|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8262|    989|    } else {
 8263|      2|        JanetTable *t = janet_table(4);
 8264|      2|        janet_table_put(t, janet_ckeywordv("error"), janet_wrap_string(res.error));
  ------------------
  |  | 1843|      2|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|      2|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|      2|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      janet_table_put(t, janet_ckeywordv("error"), janet_wrap_string(res.error));
  ------------------
  |  |  848|      2|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|      2|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8265|      2|        if (res.error_mapping.line > 0) {
  ------------------
  |  Branch (8265:13): [True: 0, False: 2]
  ------------------
 8266|      0|            janet_table_put(t, janet_ckeywordv("line"), janet_wrap_integer(res.error_mapping.line));
  ------------------
  |  | 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          janet_table_put(t, janet_ckeywordv("line"), janet_wrap_integer(res.error_mapping.line));
  ------------------
  |  |  967|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 8267|      0|        }
 8268|      2|        if (res.error_mapping.column > 0) {
  ------------------
  |  Branch (8268:13): [True: 0, False: 2]
  ------------------
 8269|      0|            janet_table_put(t, janet_ckeywordv("column"), janet_wrap_integer(res.error_mapping.column));
  ------------------
  |  | 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          janet_table_put(t, janet_ckeywordv("column"), janet_wrap_integer(res.error_mapping.column));
  ------------------
  |  |  967|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 8270|      0|        }
 8271|      2|        if (res.macrofiber) {
  ------------------
  |  Branch (8271:13): [True: 0, False: 2]
  ------------------
 8272|      0|            janet_table_put(t, janet_ckeywordv("fiber"), janet_wrap_fiber(res.macrofiber));
  ------------------
  |  | 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          janet_table_put(t, janet_ckeywordv("fiber"), janet_wrap_fiber(res.macrofiber));
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8273|      0|        }
 8274|      2|        return janet_wrap_table(t);
  ------------------
  |  |  846|      2|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|      2|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8275|      2|    }
 8276|    991|}
janet_lib_compile:
 8278|  8.33k|void janet_lib_compile(JanetTable *env) {
 8279|  8.33k|    JanetRegExt cfuns[] = {
 8280|  8.33k|        JANET_CORE_REG("compile", cfun_compile),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 8281|  8.33k|        JANET_REG_END
  ------------------
  |  | 2110|  8.33k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 8282|  8.33k|    };
 8283|       |    janet_core_cfuns_ext(env, NULL, cfuns);
 8284|  8.33k|}
janet_native:
 8335|     15|JanetModule janet_native(const char *name, const uint8_t **error) {
 8336|     15|    janet_sandbox_assert(JANET_SANDBOX_DYNAMIC_MODULES);
  ------------------
  |  | 2032|     15|#define JANET_SANDBOX_DYNAMIC_MODULES 512
  ------------------
 8337|     15|    char *processed_name = get_processed_name(name);
 8338|     15|    Clib lib = load_clib(processed_name);
  ------------------
  |  |  544|     15|#define load_clib(name) dlopen((name), RTLD_NOW)
  ------------------
 8339|     15|    JanetModule init;
 8340|     15|    JanetModconf getter;
 8341|     15|    if (name != processed_name) janet_free(processed_name);
  ------------------
  |  | 2415|     13|#define janet_free(X) free((X))
  ------------------
  |  Branch (8341:9): [True: 13, False: 2]
  ------------------
 8342|     15|    if (!lib) {
  ------------------
  |  Branch (8342:9): [True: 15, False: 0]
  ------------------
 8343|     15|        *error = janet_cstring(error_clib());
  ------------------
  |  |  547|     15|#define error_clib dlerror
  ------------------
 8344|     15|        return NULL;
 8345|     15|    }
 8346|      0|    init = (JanetModule) symbol_clib(lib, "_janet_init");
  ------------------
  |  |  546|      0|#define symbol_clib(lib, sym) dlsym((lib), (sym))
  ------------------
 8347|      0|    if (!init) {
  ------------------
  |  Branch (8347:9): [True: 0, False: 0]
  ------------------
 8348|      0|        *error = janet_cstring("could not find the _janet_init symbol");
 8349|      0|        return NULL;
 8350|      0|    }
 8351|      0|    getter = (JanetModconf) symbol_clib(lib, "_janet_mod_config");
  ------------------
  |  |  546|      0|#define symbol_clib(lib, sym) dlsym((lib), (sym))
  ------------------
 8352|      0|    if (!getter) {
  ------------------
  |  Branch (8352:9): [True: 0, False: 0]
  ------------------
 8353|      0|        *error = janet_cstring("could not find the _janet_mod_config symbol");
 8354|      0|        return NULL;
 8355|      0|    }
 8356|      0|    JanetBuildConfig modconf = getter();
 8357|      0|    JanetBuildConfig host = janet_config_current();
  ------------------
  |  |  386|      0|#define janet_config_current() ((JanetBuildConfig){ \
  |  |  387|      0|    JANET_VERSION_MAJOR, \
  |  |  ------------------
  |  |  |  |    6|      0|#define JANET_VERSION_MAJOR 1
  |  |  ------------------
  |  |  388|      0|    JANET_VERSION_MINOR, \
  |  |  ------------------
  |  |  |  |    7|      0|#define JANET_VERSION_MINOR 43
  |  |  ------------------
  |  |  389|      0|    JANET_VERSION_PATCH, \
  |  |  ------------------
  |  |  |  |    8|      0|#define JANET_VERSION_PATCH 1
  |  |  ------------------
  |  |  390|      0|    JANET_CURRENT_CONFIG_BITS })
  |  |  ------------------
  |  |  |  |  364|      0|    (JANET_SINGLE_THREADED_BIT | \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|      0|#define JANET_SINGLE_THREADED_BIT 0
  |  |  |  |  ------------------
  |  |  |  |  365|      0|     JANET_NANBOX_BIT | \
  |  |  |  |  ------------------
  |  |  |  |  |  |  348|      0|#define JANET_NANBOX_BIT 0x1
  |  |  |  |  ------------------
  |  |  |  |  366|      0|     JANET_NANBOX_POINTER_SHIFT_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  358|      0|#define JANET_NANBOX_POINTER_SHIFT_BITS (JANET_NANBOX_64_POINTER_SHIFT ? (0x4 << JANET_NANBOX_64_POINTER_SHIFT) : 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  341|      0|#define JANET_NANBOX_64_POINTER_SHIFT 0
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (341:39): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define JANET_NANBOX_POINTER_SHIFT_BITS (JANET_NANBOX_64_POINTER_SHIFT ? (0x4 << JANET_NANBOX_64_POINTER_SHIFT) : 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  341|      0|#define JANET_NANBOX_64_POINTER_SHIFT 0
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8358|      0|    if (host.major != modconf.major ||
  ------------------
  |  Branch (8358:9): [True: 0, False: 0]
  ------------------
 8359|      0|            host.minor != modconf.minor ||
  ------------------
  |  Branch (8359:13): [True: 0, False: 0]
  ------------------
 8360|      0|            host.bits != modconf.bits) {
  ------------------
  |  Branch (8360:13): [True: 0, False: 0]
  ------------------
 8361|      0|        char errbuf[128];
 8362|      0|        snprintf(errbuf, sizeof(errbuf), "config mismatch - host %d.%.d.%d(%.4x) vs. module %d.%d.%d(%.4x) - native needs to be recompiled!",
 8363|      0|                 host.major,
 8364|      0|                 host.minor,
 8365|      0|                 host.patch,
 8366|      0|                 host.bits,
 8367|      0|                 modconf.major,
 8368|      0|                 modconf.minor,
 8369|      0|                 modconf.patch,
 8370|      0|                 modconf.bits);
 8371|      0|        *error = janet_cstring(errbuf);
 8372|      0|        return NULL;
 8373|      0|    }
 8374|      0|    return init;
 8375|      0|}
janet_core_expand_path:
 8413|  15.8k|              "* :sys: -- the system path, or (dyn :syspath)") {
 8414|  15.8k|    janet_fixarity(argc, 2);
 8415|  15.8k|    const char *input = janet_getcstring(argv, 0);
 8416|  15.8k|    const char *template = janet_getcstring(argv, 1);
 8417|  15.8k|    const char *curfile = janet_dyncstring("current-file", "");
 8418|  15.8k|    const char *syspath = janet_dyncstring("syspath", "");
 8419|  15.8k|    JanetBuffer *out = janet_buffer(0);
 8420|  15.8k|    size_t tlen = strlen(template);
 8421|       |
 8422|       |    /* Calculate name */
 8423|  15.8k|    const char *name = input + strlen(input);
 8424|  89.1k|    while (name > input) {
  ------------------
  |  Branch (8424:12): [True: 76.5k, False: 12.5k]
  ------------------
 8425|  76.5k|        if (is_path_sep(*(name - 1))) break;
  ------------------
  |  Branch (8425:13): [True: 3.25k, False: 73.3k]
  ------------------
 8426|  73.3k|        name--;
 8427|  73.3k|    }
 8428|       |
 8429|       |    /* Calculate dirpath from current file */
 8430|  15.8k|    const char *curname = curfile + strlen(curfile);
 8431|  15.8k|    while (curname > curfile) {
  ------------------
  |  Branch (8431:12): [True: 0, False: 15.8k]
  ------------------
 8432|      0|        if (is_path_sep(*curname)) break;
  ------------------
  |  Branch (8432:13): [True: 0, False: 0]
  ------------------
 8433|      0|        curname--;
 8434|      0|    }
 8435|  15.8k|    const char *curdir;
 8436|  15.8k|    int32_t curlen;
 8437|  15.8k|    if (curname == curfile) {
  ------------------
  |  Branch (8437:9): [True: 15.8k, False: 1]
  ------------------
 8438|       |        /* Current file has one or zero path segments, so
 8439|       |         * we are in the . directory. */
 8440|  15.8k|        curdir = ".";
 8441|  15.8k|        curlen = 1;
 8442|  15.8k|    } else {
 8443|       |        /* Current file has 2 or more segments, so we
 8444|       |         * can cut off the last segment. */
 8445|      1|        curdir = curfile;
 8446|      1|        curlen = (int32_t)(curname - curfile);
 8447|      1|    }
 8448|       |
 8449|   155k|    for (size_t i = 0; i < tlen; i++) {
  ------------------
  |  Branch (8449:24): [True: 139k, False: 15.8k]
  ------------------
 8450|   139k|        if (template[i] == ':') {
  ------------------
  |  Branch (8450:13): [True: 31.1k, False: 108k]
  ------------------
 8451|  31.1k|            if (strncmp(template + i, ":all:", 5) == 0) {
  ------------------
  |  Branch (8451:17): [True: 13.4k, False: 17.7k]
  ------------------
 8452|  13.4k|                janet_buffer_push_cstring(out, input);
 8453|  13.4k|                i += 4;
 8454|  17.7k|            } else if (strncmp(template + i, ":@all:", 6) == 0) {
  ------------------
  |  Branch (8454:24): [True: 2.36k, False: 15.3k]
  ------------------
 8455|  2.36k|                if (input[0] == '@') {
  ------------------
  |  Branch (8455:21): [True: 2.36k, False: 0]
  ------------------
 8456|  2.36k|                    const char *p = input;
 8457|  11.3k|                    while (*p && !is_path_sep(*p)) p++;
  ------------------
  |  Branch (8457:28): [True: 10.0k, False: 1.36k]
  |  Branch (8457:34): [True: 9.00k, False: 992]
  ------------------
 8458|  2.36k|                    size_t len = p - input - 1;
 8459|  2.36k|                    char *str = janet_smalloc(len + 1);
 8460|  2.36k|                    memcpy(str, input + 1, len);
 8461|  2.36k|                    str[len] = '\0';
 8462|  2.36k|                    janet_formatb(out, "%V", janet_dyn(str));
 8463|  2.36k|                    janet_sfree(str);
 8464|  2.36k|                    janet_buffer_push_cstring(out, p);
 8465|  2.36k|                } else {
 8466|      0|                    janet_buffer_push_cstring(out, input);
 8467|      0|                }
 8468|  2.36k|                i += 5;
 8469|  15.3k|            } else if (strncmp(template + i, ":cur:", 5) == 0) {
  ------------------
  |  Branch (8469:24): [True: 5.18k, False: 10.2k]
  ------------------
 8470|  5.18k|                janet_buffer_push_bytes(out, (const uint8_t *)curdir, curlen);
 8471|  5.18k|                i += 4;
 8472|  10.2k|            } else if (strncmp(template + i, ":dir:", 5) == 0) {
  ------------------
  |  Branch (8472:24): [True: 0, False: 10.2k]
  ------------------
 8473|      0|                janet_buffer_push_bytes(out, (const uint8_t *)input,
 8474|      0|                                        (int32_t)(name - input));
 8475|      0|                i += 4;
 8476|  10.2k|            } else if (strncmp(template + i, ":sys:", 5) == 0) {
  ------------------
  |  Branch (8476:24): [True: 6.24k, False: 3.95k]
  ------------------
 8477|  6.24k|                janet_buffer_push_cstring(out, syspath);
 8478|  6.24k|                i += 4;
 8479|  6.24k|            } else if (strncmp(template + i, ":name:", 6) == 0) {
  ------------------
  |  Branch (8479:24): [True: 0, False: 3.95k]
  ------------------
 8480|      0|                janet_buffer_push_cstring(out, name);
 8481|      0|                i += 5;
 8482|  3.95k|            } else if (strncmp(template + i, ":native:", 8) == 0) {
  ------------------
  |  Branch (8482:24): [True: 3.95k, False: 0]
  ------------------
 8483|       |#ifdef JANET_WINDOWS
 8484|       |                janet_buffer_push_cstring(out, ".dll");
 8485|       |#else
 8486|  3.95k|                janet_buffer_push_cstring(out, ".so");
 8487|  3.95k|#endif
 8488|  3.95k|                i += 7;
 8489|  3.95k|            } else {
 8490|      0|                janet_buffer_push_u8(out, (uint8_t) template[i]);
 8491|      0|            }
 8492|   108k|        } else {
 8493|   108k|            janet_buffer_push_u8(out, (uint8_t) template[i]);
 8494|   108k|        }
 8495|   139k|    }
 8496|       |
 8497|       |    /* Normalize */
 8498|  15.8k|    uint8_t *scan = out->data;
 8499|  15.8k|    uint8_t *print = scan;
 8500|  15.8k|    uint8_t *scanend = scan + out->count;
 8501|  15.8k|    int normal_section_count = 0;
 8502|  15.8k|    int dot_count = 0;
 8503|  4.58M|    while (scan < scanend) {
  ------------------
  |  Branch (8503:12): [True: 4.56M, False: 15.8k]
  ------------------
 8504|  4.56M|        if (*scan == '.') {
  ------------------
  |  Branch (8504:13): [True: 4.32M, False: 240k]
  ------------------
 8505|  4.32M|            if (dot_count >= 0) {
  ------------------
  |  Branch (8505:17): [True: 3.99M, False: 333k]
  ------------------
 8506|  3.99M|                dot_count++;
 8507|  3.99M|            } else {
 8508|   333k|                *print++ = '.';
 8509|   333k|            }
 8510|  4.32M|        } else if (is_path_sep(*scan)) {
  ------------------
  |  Branch (8510:20): [True: 43.0k, False: 197k]
  ------------------
 8511|  43.0k|            if (dot_count == 1) {
  ------------------
  |  Branch (8511:17): [True: 8.47k, False: 34.5k]
  ------------------
 8512|  8.47k|                ;
 8513|  34.5k|            } else if (dot_count == 2) {
  ------------------
  |  Branch (8513:24): [True: 1.86k, False: 32.6k]
  ------------------
 8514|  1.86k|                if (normal_section_count > 0) {
  ------------------
  |  Branch (8514:21): [True: 782, False: 1.08k]
  ------------------
 8515|       |                    /* unprint last separator */
 8516|    782|                    print--;
 8517|       |                    /* unprint last section */
 8518|  4.24M|                    while (print > out->data && !is_path_sep(*(print - 1)))
  ------------------
  |  Branch (8518:28): [True: 4.24M, False: 152]
  |  Branch (8518:49): [True: 4.24M, False: 630]
  ------------------
 8519|  4.24M|                        print--;
 8520|    782|                    normal_section_count--;
 8521|  1.08k|                } else {
 8522|  1.08k|                    *print++ = '.';
 8523|  1.08k|                    *print++ = '.';
 8524|  1.08k|                    *print++ = '/';
 8525|  1.08k|                }
 8526|  32.6k|            } else if (scan == out->data || dot_count != 0) {
  ------------------
  |  Branch (8526:24): [True: 7.58k, False: 25.1k]
  |  Branch (8526:45): [True: 24.2k, False: 848]
  ------------------
 8527|  3.12M|                while (dot_count > 0) {
  ------------------
  |  Branch (8527:24): [True: 3.09M, False: 31.8k]
  ------------------
 8528|  3.09M|                    --dot_count;
 8529|  3.09M|                    *print++ = '.';
 8530|  3.09M|                }
 8531|  31.8k|                if (scan > out->data) {
  ------------------
  |  Branch (8531:21): [True: 24.2k, False: 7.58k]
  ------------------
 8532|  24.2k|                    normal_section_count++;
 8533|  24.2k|                }
 8534|  31.8k|                *print++ = '/';
 8535|  31.8k|            }
 8536|  43.0k|            dot_count = 0;
 8537|   197k|        } else {
 8538|  1.08M|            while (dot_count > 0) {
  ------------------
  |  Branch (8538:20): [True: 888k, False: 197k]
  ------------------
 8539|   888k|                --dot_count;
 8540|   888k|                *print++ = '.';
 8541|   888k|            }
 8542|   197k|            dot_count = -1;
 8543|   197k|            *print++ = *scan;
 8544|   197k|        }
 8545|  4.56M|        scan++;
 8546|  4.56M|    }
 8547|  15.8k|    out->count = (int32_t)(print - out->data);
 8548|  15.8k|    return janet_wrap_buffer(out);
  ------------------
  |  |  847|  15.8k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|  15.8k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  15.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  15.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8549|  15.8k|}
janet_core_dyn:
 8554|  5.75M|              "returns `dflt` (or nil).") {
 8555|  5.75M|    janet_arity(argc, 1, 2);
 8556|  5.75M|    Janet value;
 8557|  5.75M|    if (janet_vm.fiber->env) {
  ------------------
  |  Branch (8557:9): [True: 5.75M, False: 336]
  ------------------
 8558|  5.75M|        value = janet_table_get(janet_vm.fiber->env, argv[0]);
 8559|  5.75M|    } else {
 8560|    336|        value = janet_wrap_nil();
  ------------------
  |  |  831|    336|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    336|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    336|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    336|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8561|    336|    }
 8562|  5.75M|    if (argc == 2 && janet_checktype(value, JANET_NIL)) {
  ------------------
  |  |  806|   185k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 185k, False: 4]
  |  |  |  Branch (806:6): [Folded, False: 185k]
  |  |  ------------------
  |  |  807|   185k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   185k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   185k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   185k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   185k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   185k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (8562:9): [True: 185k, False: 5.56M]
  ------------------
 8563|   185k|        return argv[1];
 8564|   185k|    }
 8565|  5.56M|    return value;
 8566|  5.75M|}
janet_core_setdyn:
 8570|   228k|              "Set a dynamic binding for `key` to `val`. Returns `val`.") {
 8571|   228k|    janet_fixarity(argc, 2);
 8572|   228k|    if (!janet_vm.fiber->env) {
  ------------------
  |  Branch (8572:9): [True: 0, False: 228k]
  ------------------
 8573|      0|        janet_vm.fiber->env = janet_table(2);
 8574|      0|    }
 8575|   228k|    janet_table_put(janet_vm.fiber->env, argv[0], argv[1]);
 8576|   228k|    return argv[1];
 8577|   228k|}
janet_core_native:
 8585|     16|              "from the native module.") {
 8586|     16|    JanetModule init;
 8587|     16|    janet_arity(argc, 1, 2);
 8588|     16|    Janet argv0 = argv[0];
 8589|     16|    const uint8_t *path = janet_getstring(argv, 0);
 8590|     16|    const uint8_t *error = NULL;
 8591|     16|    JanetTable *env;
 8592|     16|    if (argc == 2) {
  ------------------
  |  Branch (8592:9): [True: 0, False: 16]
  ------------------
 8593|      0|        env = janet_gettable(argv, 1);
 8594|     16|    } else {
 8595|     16|        env = janet_table(0);
 8596|     16|    }
 8597|     16|    init = janet_native((const char *)path, &error);
 8598|     16|    if (!init) {
  ------------------
  |  Branch (8598:9): [True: 15, False: 1]
  ------------------
 8599|     15|        janet_panicf("could not load native %S: %S", path, error);
 8600|     15|    }
 8601|       |    /* GC root incase garbage collection called inside module entry */
 8602|      1|    janet_fiber_push(janet_vm.fiber, janet_wrap_table(env));
  ------------------
  |  |  846|      1|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|      1|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8603|      1|    init(env);
 8604|      1|    janet_table_put(env, janet_ckeywordv("native"), argv0);
  ------------------
  |  | 1843|      1|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|      1|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|      1|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8605|      1|    return janet_wrap_table(env);
  ------------------
  |  |  846|      1|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|      1|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8606|     16|}
janet_core_describe:
 8613|  10.3k|              "value from which the identity of `x` can be determined.") {
 8614|  10.3k|    JanetBuffer *b = janet_buffer(0);
 8615|  19.1k|    for (int32_t i = 0; i < argc; ++i)
  ------------------
  |  Branch (8615:25): [True: 8.79k, False: 10.3k]
  ------------------
 8616|  8.79k|        janet_description_b(b, argv[i]);
 8617|  10.3k|    return janet_stringv(b->data, b->count);
  ------------------
  |  | 1827|  10.3k|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|  10.3k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  10.3k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  10.3k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  10.3k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8618|  10.3k|}
janet_core_string:
 8624|  7.87M|              "Returns the new string.") {
 8625|  7.87M|    JanetBuffer *b = janet_buffer(0);
 8626|  18.7M|    for (int32_t i = 0; i < argc; ++i)
  ------------------
  |  Branch (8626:25): [True: 10.9M, False: 7.87M]
  ------------------
 8627|  10.9M|        janet_to_string_b(b, argv[i]);
 8628|  7.87M|    return janet_stringv(b->data, b->count);
  ------------------
  |  | 1827|  7.87M|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|  7.87M|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  7.87M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  7.87M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  7.87M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8629|  7.87M|}
janet_core_symbol:
 8635|  3.61M|              "Returns the new symbol.") {
 8636|  3.61M|    JanetBuffer *b = janet_buffer(0);
 8637|  14.4M|    for (int32_t i = 0; i < argc; ++i)
  ------------------
  |  Branch (8637:25): [True: 10.8M, False: 3.61M]
  ------------------
 8638|  10.8M|        janet_to_string_b(b, argv[i]);
 8639|  3.61M|    return janet_symbolv(b->data, b->count);
  ------------------
  |  | 1836|  3.61M|#define janet_symbolv(str, len) janet_wrap_symbol(janet_symbol((str), (len)))
  |  |  ------------------
  |  |  |  |  849|  3.61M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  3.61M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  3.61M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  3.61M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8640|  3.61M|}
janet_core_keyword:
 8646|    157|              "Returns the new keyword.") {
 8647|    157|    JanetBuffer *b = janet_buffer(0);
 8648|  9.84k|    for (int32_t i = 0; i < argc; ++i)
  ------------------
  |  Branch (8648:25): [True: 9.68k, False: 157]
  ------------------
 8649|  9.68k|        janet_to_string_b(b, argv[i]);
 8650|    157|    return janet_keywordv(b->data, b->count);
  ------------------
  |  | 1842|    157|#define janet_keywordv(str, len) janet_wrap_keyword(janet_keyword((str), (len)))
  |  |  ------------------
  |  |  |  |  850|    157|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|    157|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    157|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    157|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8651|    157|}
janet_core_buffer:
 8657|  11.7k|              "Returns the new buffer.") {
 8658|  11.7k|    JanetBuffer *b = janet_buffer(0);
 8659|  23.8k|    for (int32_t i = 0; i < argc; ++i)
  ------------------
  |  Branch (8659:25): [True: 12.0k, False: 11.7k]
  ------------------
 8660|  12.0k|        janet_to_string_b(b, argv[i]);
 8661|  11.7k|    return janet_wrap_buffer(b);
  ------------------
  |  |  847|  11.7k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|  11.7k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  11.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  11.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8662|  11.7k|}
janet_core_is_abstract:
 8666|  1.14k|              "Check if x is an abstract type.") {
 8667|  1.14k|    janet_fixarity(argc, 1);
 8668|  1.14k|    return janet_wrap_boolean(janet_checktype(argv[0], JANET_ABSTRACT));
  ------------------
  |  |  834|  1.14k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|  2.29k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.14k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.14k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (822:51): [True: 0, False: 0]
  |  |  |  |  |  Branch (822:51): [True: 0, False: 0]
  |  |  |  |  |  Branch (822:51): [Folded, False: 1.14k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8669|  1.14k|}
janet_core_scannumber:
 8677|  10.0k|              "radix specifier is expected at the beginning of the number.") {
 8678|  10.0k|    double number;
 8679|  10.0k|    janet_arity(argc, 1, 2);
 8680|  10.0k|    JanetByteView view = janet_getbytes(argv, 0);
 8681|  10.0k|    int32_t base = janet_optinteger(argv, argc, 1, 0);
 8682|  10.0k|    int valid = base == 0 || (base >= 2 && base <= 36);
  ------------------
  |  Branch (8682:17): [True: 10.0k, False: 5]
  |  Branch (8682:31): [True: 4, False: 1]
  |  Branch (8682:44): [True: 4, False: 0]
  ------------------
 8683|  10.0k|    if (!valid) {
  ------------------
  |  Branch (8683:9): [True: 1, False: 10.0k]
  ------------------
 8684|      1|        janet_panicf("expected base between 2 and 36, got %d", base);
 8685|      1|    }
 8686|  10.0k|    if (janet_scan_number_base(view.bytes, view.len, base, &number))
  ------------------
  |  Branch (8686:9): [True: 8.45k, False: 1.58k]
  ------------------
 8687|  8.45k|        return janet_wrap_nil();
  ------------------
  |  |  831|  8.45k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  8.45k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.45k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.45k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8688|  1.58k|    return janet_wrap_number(number);
  ------------------
  |  |  835|  1.58k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
 8689|  10.0k|}
janet_core_tuple:
 8693|  4.70M|              "Creates and returns a tuple that contains values from `xs`.") {
 8694|  4.70M|    return janet_wrap_tuple(janet_tuple_n(argv, argc));
  ------------------
  |  |  843|  4.70M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  4.70M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.70M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.70M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8695|  4.70M|}
janet_core_array:
 8699|  1.06k|              "Creates and returns an array that contains values from `xs`.") {
 8700|  1.06k|    JanetArray *array = janet_array(argc);
 8701|  1.06k|    array->count = argc;
 8702|  1.06k|    safe_memcpy(array->data, argv, argc * sizeof(Janet));
 8703|  1.06k|    return janet_wrap_array(array);
  ------------------
  |  |  845|  1.06k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  1.06k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.06k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.06k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8704|  1.06k|}
janet_core_slice:
 8715|  56.2k|              "If `x` is an indexed type, returns a tuple.") {
 8716|  56.2k|    JanetRange range;
 8717|  56.2k|    JanetByteView bview;
 8718|  56.2k|    JanetView iview;
 8719|  56.2k|    if (janet_bytes_view(argv[0], &bview.bytes, &bview.len)) {
  ------------------
  |  Branch (8719:9): [True: 1.64k, False: 54.5k]
  ------------------
 8720|  1.64k|        range = janet_getslice(argc, argv);
 8721|  1.64k|        return janet_stringv(bview.bytes + range.start, range.end - range.start);
  ------------------
  |  | 1827|  1.64k|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|  1.64k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.64k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.64k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.64k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8722|  54.5k|    } else if (janet_indexed_view(argv[0], &iview.items, &iview.len)) {
  ------------------
  |  Branch (8722:16): [True: 54.5k, False: 2]
  ------------------
 8723|  54.5k|        range = janet_getslice(argc, argv);
 8724|  54.5k|        return janet_wrap_tuple(janet_tuple_n(iview.items + range.start, range.end - range.start));
  ------------------
  |  |  843|  54.5k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  54.5k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  54.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  54.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8725|  54.5k|    } else {
 8726|      2|        janet_panic_type(argv[0], 0, JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED);
  ------------------
  |  |  612|      2|#define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  599|      2|#define JANET_TFLAG_STRING (1 << JANET_STRING)
  |  |  ------------------
  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  600|      2|#define JANET_TFLAG_SYMBOL (1 << JANET_SYMBOL)
  |  |  ------------------
  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  606|      2|#define JANET_TFLAG_BUFFER (1 << JANET_BUFFER)
  |  |  ------------------
  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  601|      2|#define JANET_TFLAG_KEYWORD (1 << JANET_KEYWORD)
  |  |  ------------------
  ------------------
                      janet_panic_type(argv[0], 0, JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED);
  ------------------
  |  |  613|      2|#define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  ------------------
  |  |  |  |  602|      2|#define JANET_TFLAG_ARRAY (1 << JANET_ARRAY)
  |  |  ------------------
  |  |               #define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  ------------------
  |  |  |  |  603|      2|#define JANET_TFLAG_TUPLE (1 << JANET_TUPLE)
  |  |  ------------------
  ------------------
 8727|      2|    }
 8728|  56.2k|}
janet_core_range:
 8734|  3.27k|              "a range [start, end). With three, returns a range with optional step size.") {
 8735|  3.27k|    janet_arity(argc, 1, 3);
 8736|  3.27k|    double start = 0, stop = 0, step = 1, count = 0;
 8737|  3.27k|    if (argc == 3) {
  ------------------
  |  Branch (8737:9): [True: 2.24k, False: 1.02k]
  ------------------
 8738|  2.24k|        start = janet_getnumber(argv, 0);
 8739|  2.24k|        stop = janet_getnumber(argv, 1);
 8740|  2.24k|        step = janet_getnumber(argv, 2);
 8741|  2.24k|        count = (step > 0.0) ? (stop - start) / step :
  ------------------
  |  Branch (8741:17): [True: 900, False: 1.34k]
  ------------------
 8742|  2.24k|                ((step < 0.0) ? (stop - start) / step : 0.0);
  ------------------
  |  Branch (8742:18): [True: 1.32k, False: 25]
  ------------------
 8743|  2.24k|    } else if (argc == 2) {
  ------------------
  |  Branch (8743:16): [True: 106, False: 918]
  ------------------
 8744|    106|        start = janet_getnumber(argv, 0);
 8745|    106|        stop = janet_getnumber(argv, 1);
 8746|    106|        count = stop - start;
 8747|    918|    } else {
 8748|    918|        stop = janet_getnumber(argv, 0);
 8749|    918|        count = stop;
 8750|    918|    }
 8751|  3.27k|    if (isinf(step)) {
  ------------------
  |  Branch (8751:9): [True: 0, False: 3.27k]
  ------------------
 8752|      0|        janet_panic("infinite step not allowed");
 8753|      0|    }
 8754|  3.27k|    count = (count > 0.0) ? count : 0.0;
  ------------------
  |  Branch (8754:13): [True: 2.05k, False: 1.21k]
  ------------------
 8755|  3.27k|    int32_t int_count;
 8756|  3.27k|    janet_assert(count >= 0.0, "bad range code (count)");
  ------------------
  |  |  389|  3.27k|#define janet_assert(c, m) do { \
  |  |  390|  3.27k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 3.27k]
  |  |  ------------------
  |  |  391|  3.27k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 3.27k]
  |  |  ------------------
  ------------------
 8757|  3.27k|    if (count > (double) INT32_MAX) {
  ------------------
  |  Branch (8757:9): [True: 1, False: 3.27k]
  ------------------
 8758|      1|        janet_panicf("range is too large, %f elements", count);
 8759|  3.27k|    } else {
 8760|  3.27k|        int_count = (int32_t) ceil(count);
 8761|  3.27k|    }
 8762|  3.27k|    if (int_count) { /* e.g. (range 10 0 0) */
  ------------------
  |  Branch (8762:9): [True: 2.05k, False: 1.21k]
  ------------------
 8763|  2.05k|        if (step > 0.0) {
  ------------------
  |  Branch (8763:13): [True: 1.77k, False: 280]
  ------------------
 8764|  1.77k|            janet_assert(start + int_count * step >= stop, "bad range code (+step)");
  ------------------
  |  |  389|  1.77k|#define janet_assert(c, m) do { \
  |  |  390|  1.77k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 1.77k]
  |  |  ------------------
  |  |  391|  1.77k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 1.77k]
  |  |  ------------------
  ------------------
 8765|  1.77k|        } else {
 8766|    280|            janet_assert(start + int_count * step <= stop, "bad range code (-step)");
  ------------------
  |  |  389|    280|#define janet_assert(c, m) do { \
  |  |  390|    280|    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: 280]
  |  |  ------------------
  |  |  391|    280|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 280]
  |  |  ------------------
  ------------------
 8767|    280|        }
 8768|  2.05k|    }
 8769|  3.27k|    JanetArray *array = janet_array(int_count);
 8770|  80.2M|    for (int32_t i = 0; i < int_count; i++) {
  ------------------
  |  Branch (8770:25): [True: 80.2M, False: 3.27k]
  ------------------
 8771|  80.2M|        array->data[i] = janet_wrap_number((double) start + (double) i * step);
  ------------------
  |  |  835|  80.2M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
 8772|  80.2M|    }
 8773|  3.27k|    array->count = int_count;
 8774|  3.27k|    return janet_wrap_array(array);
  ------------------
  |  |  845|  3.27k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  3.27k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.27k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.27k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8775|  3.27k|}
janet_core_table:
 8782|  7.17k|              "thrown.") {
 8783|  7.17k|    int32_t i;
 8784|  7.17k|    if (argc & 1)
  ------------------
  |  Branch (8784:9): [True: 0, False: 7.17k]
  ------------------
 8785|      0|        janet_panic("expected even number of arguments");
 8786|  7.17k|    JanetTable *table = janet_table(argc >> 1);
 8787|  36.2k|    for (i = 0; i < argc; i += 2) {
  ------------------
  |  Branch (8787:17): [True: 29.0k, False: 7.17k]
  ------------------
 8788|  29.0k|        janet_table_put(table, argv[i], argv[i + 1]);
 8789|  29.0k|    }
 8790|  7.17k|    return janet_wrap_table(table);
  ------------------
  |  |  846|  7.17k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|  7.17k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.17k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.17k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8791|  7.17k|}
janet_core_getproto:
 8796|      1|              "`dict` has no prototype.") {
 8797|      1|    janet_fixarity(argc, 1);
 8798|      1|    if (janet_checktype(argv[0], JANET_TABLE)) {
  ------------------
  |  |  806|      1|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 1]
  |  |  ------------------
  |  |  807|      1|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      1|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      1|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      1|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8799|      1|        JanetTable *t = janet_unwrap_table(argv[0]);
  ------------------
  |  |  861|      1|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
 8800|      1|        return t->proto
  ------------------
  |  Branch (8800:16): [True: 0, False: 1]
  ------------------
 8801|      1|               ? janet_wrap_table(t->proto)
  ------------------
  |  |  846|      0|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8802|      1|               : janet_wrap_nil();
  ------------------
  |  |  831|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8803|      1|    }
 8804|      0|    if (janet_checktype(argv[0], JANET_STRUCT)) {
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8805|      0|        JanetStruct st = janet_unwrap_struct(argv[0]);
  ------------------
  |  |  857|      0|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
 8806|      0|        return janet_struct_proto(st)
  ------------------
  |  | 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 (1851:31): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 8807|      0|               ? janet_wrap_struct(janet_struct_proto(st))
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8808|      0|               : 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8809|      0|    }
 8810|      0|    janet_panicf("expected struct or table, got %v", argv[0]);
 8811|      0|}
janet_core_struct:
 8818|  16.1k|              "thrown.") {
 8819|  16.1k|    int32_t i;
 8820|  16.1k|    if (argc & 1) {
  ------------------
  |  Branch (8820:9): [True: 0, False: 16.1k]
  ------------------
 8821|      0|        janet_panic("expected even number of arguments");
 8822|      0|    }
 8823|  16.1k|    JanetKV *st = janet_struct_begin(argc >> 1);
 8824|  45.3k|    for (i = 0; i < argc; i += 2) {
  ------------------
  |  Branch (8824:17): [True: 29.2k, False: 16.1k]
  ------------------
 8825|  29.2k|        janet_struct_put(st, argv[i], argv[i + 1]);
 8826|  29.2k|    }
 8827|  16.1k|    return janet_wrap_struct(janet_struct_end(st));
  ------------------
  |  |  842|  16.1k|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|  16.1k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  16.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  16.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8828|  16.1k|}
janet_core_gensym:
 8834|   525k|              "it can be used in macros to generate automatic bindings.") {
 8835|   525k|    (void) argv;
 8836|   525k|    janet_fixarity(argc, 0);
 8837|   525k|    return janet_wrap_symbol(janet_symbol_gen());
  ------------------
  |  |  849|   525k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|   525k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   525k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   525k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8838|   525k|}
janet_core_gccollect:
 8842|  2.80k|              "Run the garbage collector to free unreachable values.") {
 8843|  2.80k|    (void) argv;
 8844|  2.80k|    janet_fixarity(argc, 0);
 8845|  2.80k|    janet_collect();
 8846|  2.80k|    return janet_wrap_nil();
  ------------------
  |  |  831|  2.80k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  2.80k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.80k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.80k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8847|  2.80k|}
janet_core_gcsetinterval:
 8853|      3|              "High values will be faster but use more memory. Set to 0 to disable automatic collection.") {
 8854|      3|    janet_fixarity(argc, 1);
 8855|      3|    size_t s = janet_getsize(argv, 0);
 8856|       |    /* limit interval to 48 bits */
 8857|      3|#ifdef JANET_64
 8858|      3|    if (s >> 48) {
  ------------------
  |  Branch (8858:9): [True: 0, False: 3]
  ------------------
 8859|      0|        janet_panic("interval too large");
 8860|      0|    }
 8861|      3|#endif
 8862|      3|    janet_vm.gc_interval = s;
 8863|      3|    return janet_wrap_nil();
  ------------------
  |  |  831|      3|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      3|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8864|      3|}
janet_core_gcinterval:
 8869|     14|              "of garbage collection.") {
 8870|     14|    (void) argv;
 8871|     14|    janet_fixarity(argc, 0);
 8872|     14|    return janet_wrap_number((double) janet_vm.gc_interval);
  ------------------
  |  |  835|     14|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
 8873|     14|}
janet_core_type:
 8893|   128M|              "or another keyword for an abstract type.") {
 8894|   128M|    janet_fixarity(argc, 1);
 8895|   128M|    JanetType t = janet_type(argv[0]);
  ------------------
  |  |  795|   128M|    (isnan((x).number) \
  |  |  796|   128M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   128M|        : JANET_NUMBER)
  ------------------
  |  Branch (8895:19): [True: 128M, False: 635k]
  ------------------
 8896|   128M|    if (t == JANET_ABSTRACT) {
  ------------------
  |  Branch (8896:9): [True: 372k, False: 128M]
  ------------------
 8897|   372k|        return janet_ckeywordv(janet_abstract_type(janet_unwrap_abstract(argv[0]))->name);
  ------------------
  |  | 1843|   372k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|   372k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|   372k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   372k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   372k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8898|   128M|    } else {
 8899|   128M|        return janet_ckeywordv(janet_type_names[t]);
  ------------------
  |  | 1843|   128M|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|   128M|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|   128M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   128M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   128M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8900|   128M|    }
 8901|   128M|}
janet_core_hash:
 8907|  2.07k|              "then they will have the same hash value.") {
 8908|  2.07k|    janet_fixarity(argc, 1);
 8909|  2.07k|    return janet_wrap_number(janet_hash(argv[0]));
  ------------------
  |  |  835|  2.07k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
 8910|  2.07k|}
janet_core_getline:
 8920|   366k|              "terminal program.") {
 8921|   366k|    FILE *in = janet_dynfile("in", stdin);
 8922|   366k|    FILE *out = janet_dynfile("out", stdout);
 8923|   366k|    janet_arity(argc, 0, 3);
 8924|   366k|    JanetBuffer *buf = (argc >= 2) ? janet_getbuffer(argv, 1) : janet_buffer(10);
  ------------------
  |  Branch (8924:24): [True: 366k, False: 8]
  ------------------
 8925|   366k|    if (argc >= 1) {
  ------------------
  |  Branch (8925:9): [True: 366k, False: 8]
  ------------------
 8926|   366k|        const char *prompt = (const char *) janet_getstring(argv, 0);
 8927|   366k|        fprintf(out, "%s", prompt);
 8928|   366k|        fflush(out);
 8929|   366k|    }
 8930|   366k|    {
 8931|   366k|        buf->count = 0;
 8932|   366k|        int c;
 8933|   366k|        for (;;) {
 8934|   366k|            c = fgetc(in);
 8935|   366k|            if (feof(in) || c < 0) {
  ------------------
  |  Branch (8935:17): [True: 366k, False: 0]
  |  Branch (8935:29): [True: 0, False: 0]
  ------------------
 8936|   366k|                break;
 8937|   366k|            }
 8938|      0|            janet_buffer_push_u8(buf, (uint8_t) c);
 8939|      0|            if (c == '\n') break;
  ------------------
  |  Branch (8939:17): [True: 0, False: 0]
  ------------------
 8940|      0|        }
 8941|   366k|    }
 8942|   366k|    return janet_wrap_buffer(buf);
  ------------------
  |  |  847|   366k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|   366k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   366k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   366k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8943|   366k|}
janet_core_trace:
 8947|     87|              "Enable tracing on a function. Returns the function.") {
 8948|     87|    janet_fixarity(argc, 1);
 8949|     87|    JanetFunction *func = janet_getfunction(argv, 0);
 8950|     87|    func->gc.flags |= JANET_FUNCFLAG_TRACE;
  ------------------
  |  | 1164|     87|#define JANET_FUNCFLAG_TRACE (1 << 16)
  ------------------
 8951|     87|    return argv[0];
 8952|     87|}
janet_core_untrace:
 8956|      3|              "Disables tracing on a function. Returns the function.") {
 8957|      3|    janet_fixarity(argc, 1);
 8958|      3|    JanetFunction *func = janet_getfunction(argv, 0);
 8959|      3|    func->gc.flags &= ~JANET_FUNCFLAG_TRACE;
  ------------------
  |  | 1164|      3|#define JANET_FUNCFLAG_TRACE (1 << 16)
  ------------------
 8960|      3|    return argv[0];
 8961|      3|}
janet_core_check_int:
 8965|    393|              "Check if x can be exactly represented as a 32 bit signed two's complement integer.") {
 8966|    393|    janet_fixarity(argc, 1);
 8967|    393|    return janet_wrap_boolean(janet_checkint(argv[0]));
  ------------------
  |  |  834|    393|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|    393|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    393|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    393|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8968|    393|}
janet_core_check_nat:
 8972|  3.67k|              "Check if x can be exactly represented as a non-negative 32 bit signed two's complement integer.") {
 8973|  3.67k|    janet_fixarity(argc, 1);
 8974|  3.67k|    if (!janet_checkint(argv[0])) return janet_wrap_false();
  ------------------
  |  |  833|  2.10k|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|  2.10k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.10k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.10k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (8974:9): [True: 2.10k, False: 1.56k]
  ------------------
 8975|  1.56k|    return janet_wrap_boolean(janet_unwrap_integer(argv[0]) >= 0);
  ------------------
  |  |  834|  1.56k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|  1.56k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.56k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.56k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8976|  3.67k|}
janet_core_is_bytes:
 8980|  2.69k|              "Check if x is a string, symbol, keyword, or buffer.") {
 8981|  2.69k|    janet_fixarity(argc, 1);
 8982|  2.69k|    return janet_wrap_boolean(janet_checktypes(argv[0], JANET_TFLAG_BYTES));
  ------------------
  |  |  834|  2.69k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|  5.38k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.69k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.69k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (822:51): [True: 2.62k, False: 69]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8983|  2.69k|}
janet_core_is_indexed:
 8987|   687k|              "Check if x is an array or tuple.") {
 8988|   687k|    janet_fixarity(argc, 1);
 8989|   687k|    return janet_wrap_boolean(janet_checktypes(argv[0], JANET_TFLAG_INDEXED));
  ------------------
  |  |  834|   687k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|  1.37M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   687k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   687k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (822:51): [True: 687k, False: 54]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8990|   687k|}
janet_core_is_dictionary:
 8994|   997k|              "Check if x is a table or struct.") {
 8995|   997k|    janet_fixarity(argc, 1);
 8996|   997k|    return janet_wrap_boolean(janet_checktypes(argv[0], JANET_TFLAG_DICTIONARY));
  ------------------
  |  |  834|   997k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|  1.99M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   997k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   997k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (822:51): [True: 997k, False: 20]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8997|   997k|}
janet_core_is_lengthable:
 9001|   329k|              "Check if x is a bytes, indexed, or dictionary.") {
 9002|   329k|    janet_fixarity(argc, 1);
 9003|   329k|    return janet_wrap_boolean(janet_checktypes(argv[0], JANET_TFLAG_LENGTHABLE));
  ------------------
  |  |  834|   329k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|   658k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   329k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   329k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (822:51): [True: 329k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9004|   329k|}
janet_core_signal:
 9016|      1|              "* :await") {
 9017|      1|    janet_arity(argc, 1, 2);
 9018|      1|    Janet payload = argc == 2 ? argv[1] : 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 (9018:21): [True: 1, False: 0]
  ------------------
 9019|      1|    if (janet_checkint(argv[0])) {
  ------------------
  |  Branch (9019:9): [True: 0, False: 1]
  ------------------
 9020|      0|        int32_t s = janet_unwrap_integer(argv[0]);
  ------------------
  |  |  966|      0|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
 9021|      0|        if (s < 0 || s > 9) {
  ------------------
  |  Branch (9021:13): [True: 0, False: 0]
  |  Branch (9021:22): [True: 0, False: 0]
  ------------------
 9022|      0|            janet_panicf("expected user signal between 0 and 9, got %d", s);
 9023|      0|        }
 9024|      0|        janet_signalv(JANET_SIGNAL_USER0 + s, payload);
 9025|      1|    } else {
 9026|      1|        JanetKeyword kw = janet_getkeyword(argv, 0);
 9027|      1|        for (unsigned i = 0; i < sizeof(janet_signal_names) / sizeof(char *); i++) {
  ------------------
  |  Branch (9027:30): [True: 0, False: 1]
  ------------------
 9028|      0|            if (!janet_cstrcmp(kw, janet_signal_names[i])) {
  ------------------
  |  Branch (9028:17): [True: 0, False: 0]
  ------------------
 9029|      0|                janet_signalv((JanetSignal) i, payload);
 9030|      0|            }
 9031|      0|        }
 9032|      1|    }
 9033|      1|    janet_panicf("unknown signal %v", argv[0]);
 9034|      1|}
janet_core_memcmp:
 9041|  50.9k|              "to compare slices of the bytes sequences.") {
 9042|  50.9k|    janet_arity(argc, 2, 5);
 9043|  50.9k|    JanetByteView a = janet_getbytes(argv, 0);
 9044|  50.9k|    JanetByteView b = janet_getbytes(argv, 1);
 9045|  50.9k|    int32_t len = janet_optnat(argv, argc, 2, a.len < b.len ? a.len : b.len);
  ------------------
  |  Branch (9045:47): [True: 1.13k, False: 49.8k]
  ------------------
 9046|  50.9k|    int32_t offset_a = janet_optnat(argv, argc, 3, 0);
 9047|  50.9k|    int32_t offset_b = janet_optnat(argv, argc, 4, 0);
 9048|  50.9k|    if (len > a.len - offset_a) janet_panicf("invalid offset-a: %d", offset_a);
  ------------------
  |  Branch (9048:9): [True: 12, False: 50.9k]
  ------------------
 9049|  50.9k|    if (len > b.len - offset_b) janet_panicf("invalid offset-b: %d", offset_b);
  ------------------
  |  Branch (9049:9): [True: 1, False: 50.9k]
  ------------------
 9050|  50.9k|    return janet_wrap_integer(memcmp(a.bytes + offset_a, b.bytes + offset_b, (size_t) len));
  ------------------
  |  |  967|  50.9k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  50.9k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 9051|  50.9k|}
janet_core_sandbox:
 9115|      6|              "* :unmarshal - disallow calling the `unmarshal` function.\n") {
 9116|      6|    uint32_t flags = 0;
 9117|      9|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (9117:25): [True: 9, False: 0]
  ------------------
 9118|      9|        JanetKeyword kw = janet_getkeyword(argv, i);
 9119|      9|        const SandboxOption *opt = sandbox_options;
 9120|    219|        while (opt->name != NULL) {
  ------------------
  |  Branch (9120:16): [True: 213, False: 6]
  ------------------
 9121|    213|            if (janet_cstrcmp(kw, opt->name) == 0) {
  ------------------
  |  Branch (9121:17): [True: 3, False: 210]
  ------------------
 9122|      3|                flags |= opt->flag;
 9123|      3|                break;
 9124|      3|            }
 9125|    210|            opt++;
 9126|    210|        }
 9127|      9|        if (opt->name == NULL) janet_panicf("unknown capability %v", argv[i]);
  ------------------
  |  Branch (9127:13): [True: 6, False: 3]
  ------------------
 9128|      9|    }
 9129|      0|    janet_sandbox(flags);
 9130|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9131|      6|}
janet_core_env:
 9689|  8.33k|JanetTable *janet_core_env(JanetTable *replacements) {
 9690|       |    /* Memoize core env, ignoring replacements the second time around. */
 9691|  8.33k|    if (NULL != janet_vm.core_env) {
  ------------------
  |  Branch (9691:9): [True: 0, False: 8.33k]
  ------------------
 9692|      0|        return janet_vm.core_env;
 9693|      0|    }
 9694|       |
 9695|  8.33k|    JanetTable *dict = janet_core_lookup_table(replacements);
 9696|       |
 9697|       |    /* Unmarshal bytecode */
 9698|  8.33k|    Janet marsh_out = janet_unmarshal(
 9699|  8.33k|                          janet_core_image,
 9700|  8.33k|                          janet_core_image_size,
 9701|  8.33k|                          0,
 9702|  8.33k|                          dict,
 9703|  8.33k|                          NULL);
 9704|       |
 9705|       |    /* Memoize */
 9706|  8.33k|    janet_gcroot(marsh_out);
 9707|  8.33k|    JanetTable *env = janet_unwrap_table(marsh_out);
  ------------------
  |  |  861|  8.33k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
 9708|  8.33k|    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|  8.33k|    Janet lidv, midv;
 9713|  8.33k|    lidv = midv = janet_wrap_nil();
  ------------------
  |  |  831|  8.33k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  8.33k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.33k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.33k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9714|  8.33k|    janet_resolve(env, janet_csymbol("load-image-dict"), &lidv);
 9715|  8.33k|    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|  8.33k|    if (janet_checktype(lidv, JANET_TABLE) && janet_checktype(midv, JANET_TABLE)) {
  ------------------
  |  |  806|  16.6k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 8.33k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 8.33k]
  |  |  ------------------
  |  |  807|  16.6k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  16.6k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  8.33k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  8.33k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.33k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.33k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (janet_checktype(lidv, JANET_TABLE) && janet_checktype(midv, JANET_TABLE)) {
  ------------------
  |  |  806|  8.33k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 8.33k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 8.33k]
  |  |  ------------------
  |  |  807|  8.33k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  8.33k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  8.33k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  8.33k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.33k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.33k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9719|  8.33k|        JanetTable *lid = janet_unwrap_table(lidv);
  ------------------
  |  |  861|  8.33k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
 9720|  8.33k|        JanetTable *mid = janet_unwrap_table(midv);
  ------------------
  |  |  861|  8.33k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
 9721|  17.0M|        for (int32_t i = 0; i < lid->capacity; i++) {
  ------------------
  |  Branch (9721:29): [True: 17.0M, False: 8.33k]
  ------------------
 9722|  17.0M|            const JanetKV *kv = lid->data + i;
 9723|  17.0M|            if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  17.0M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 17.0M]
  |  |  ------------------
  |  |  807|  17.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|  17.0M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  17.0M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  17.0M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  17.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  17.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (9723:17): [True: 5.49M, False: 11.5M]
  ------------------
 9724|  5.49M|                janet_table_put(mid, kv->value, kv->key);
 9725|  5.49M|            }
 9726|  17.0M|        }
 9727|  8.33k|    }
 9728|       |
 9729|  8.33k|    return env;
 9730|  8.33k|}
janet_core_lookup_table:
 9734|  8.33k|JanetTable *janet_core_lookup_table(JanetTable *replacements) {
 9735|  8.33k|    JanetTable *dict = janet_table(512);
 9736|  8.33k|    janet_load_libs(dict);
 9737|       |
 9738|       |    /* Add replacements */
 9739|  8.33k|    if (replacements != NULL) {
  ------------------
  |  Branch (9739:9): [True: 0, False: 8.33k]
  ------------------
 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|  8.33k|    return dict;
 9750|  8.33k|}
janet_debug_break:
 9793|     11|void janet_debug_break(JanetFuncDef *def, int32_t pc) {
 9794|     11|    if (pc >= def->bytecode_length || pc < 0)
  ------------------
  |  Branch (9794:9): [True: 0, False: 11]
  |  Branch (9794:39): [True: 0, False: 11]
  ------------------
 9795|      0|        janet_panic("invalid bytecode offset");
 9796|     11|    def->bytecode[pc] |= 0x80;
 9797|     11|}
janet_debug_unbreak:
 9800|    146|void janet_debug_unbreak(JanetFuncDef *def, int32_t pc) {
 9801|    146|    if (pc >= def->bytecode_length || pc < 0)
  ------------------
  |  Branch (9801:9): [True: 0, False: 146]
  |  Branch (9801:39): [True: 2, False: 144]
  ------------------
 9802|      2|        janet_panic("invalid bytecode offset");
 9803|    144|    def->bytecode[pc] &= ~((uint32_t)0x80);
 9804|    144|}
janet_stacktrace_ext:
 9862|   501k|void janet_stacktrace_ext(JanetFiber *fiber, Janet err, const char *prefix) {
 9863|       |
 9864|   501k|    int32_t fi;
 9865|   501k|    const char *errstr = (const char *)janet_to_string(err);
 9866|   501k|    JanetFiber **fibers = NULL;
 9867|   501k|    int wrote_error = !prefix;
 9868|       |
 9869|   501k|    int print_color = janet_truthy(janet_dyn("err-color"));
  ------------------
  |  |  818|   501k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|  1.00M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 501k]
  |  |  |  |  ------------------
  |  |  |  |  807|  1.00M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!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.00M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|   501k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|   501k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   501k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   501k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 0, False: 501k]
  |  |  ------------------
  |  |  819|   501k|     (!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]
  |  |  ------------------
  ------------------
 9870|   501k|    if (print_color) janet_eprintf("\x1b[31m");
  ------------------
  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
  |  Branch (9870:9): [True: 0, False: 501k]
  ------------------
 9871|       |
 9872|  1.00M|    while (fiber) {
  ------------------
  |  Branch (9872:12): [True: 501k, False: 501k]
  ------------------
 9873|   501k|        janet_v_push(fibers, fiber);
  ------------------
  |  |  734|   501k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|   501k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|   501k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|     52|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|     52|#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|     52|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|     52|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 501k, False: 52]
  |  |  |  |  |  |  |  Branch (745:50): [True: 51, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|   501k|#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|   501k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   501k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9874|   501k|        fiber = fiber->child;
 9875|   501k|    }
 9876|       |
 9877|  1.00M|    for (fi = janet_v_count(fibers) - 1; fi >= 0; fi--) {
  ------------------
  |  |  736|   501k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   501k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   501k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 501k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (9877:42): [True: 501k, False: 501k]
  ------------------
 9878|   501k|        fiber = fibers[fi];
 9879|   501k|        int32_t i = fiber->frame;
 9880|  1.05M|        while (i > 0) {
  ------------------
  |  Branch (9880:16): [True: 555k, False: 501k]
  ------------------
 9881|   555k|            JanetCFunRegistry *reg = NULL;
 9882|   555k|            JanetStackFrame *frame = (JanetStackFrame *)(fiber->data + i - JANET_FRAME_SIZE);
  ------------------
  |  | 1026|   555k|#define JANET_FRAME_SIZE 4
  ------------------
 9883|   555k|            JanetFuncDef *def = NULL;
 9884|   555k|            i = frame->prevframe;
 9885|       |
 9886|       |            /* Print prelude to stack frame */
 9887|   555k|            if (!wrote_error) {
  ------------------
  |  Branch (9887:17): [True: 499k, False: 55.9k]
  ------------------
 9888|   499k|                JanetFiberStatus status = janet_fiber_status(fiber);
 9889|   499k|                janet_eprintf("%s%s: %s\n",
  ------------------
  |  | 2195|  1.99M|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (2195:59): [True: 499k, False: 0]
  |  |  |  Branch (2195:59): [True: 499k, False: 0]
  |  |  ------------------
  ------------------
 9890|   499k|                              prefix ? prefix : "",
 9891|   499k|                              janet_status_names[status],
 9892|   499k|                              errstr ? errstr : janet_status_names[status]);
 9893|   499k|                wrote_error = 1;
 9894|   499k|            }
 9895|       |
 9896|   555k|            janet_eprintf("  in");
  ------------------
  |  | 2195|   555k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 9897|       |
 9898|   555k|            if (frame->func) {
  ------------------
  |  Branch (9898:17): [True: 551k, False: 3.63k]
  ------------------
 9899|   551k|                def = frame->func->def;
 9900|   551k|                janet_eprintf(" %s", def->name ? (const char *)def->name : "<anonymous>");
  ------------------
  |  | 2195|  1.10M|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (2195:59): [True: 551k, False: 0]
  |  |  ------------------
  ------------------
 9901|   551k|                if (def->source) {
  ------------------
  |  Branch (9901:21): [True: 551k, False: 86]
  ------------------
 9902|   551k|                    janet_eprintf(" [%s]", (const char *)def->source);
  ------------------
  |  | 2195|   551k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 9903|   551k|                }
 9904|   551k|            } else {
 9905|  3.63k|                JanetCFunction cfun = (JanetCFunction)(frame->pc);
 9906|  3.63k|                if (cfun) {
  ------------------
  |  Branch (9906:21): [True: 3.63k, False: 0]
  ------------------
 9907|  3.63k|                    reg = janet_registry_get(cfun);
 9908|  3.63k|                    if (NULL != reg && NULL != reg->name) {
  ------------------
  |  Branch (9908:25): [True: 3.59k, False: 44]
  |  Branch (9908:40): [True: 3.59k, False: 0]
  ------------------
 9909|  3.59k|                        if (reg->name_prefix) {
  ------------------
  |  Branch (9909:29): [True: 0, False: 3.59k]
  ------------------
 9910|      0|                            janet_eprintf(" %s/%s", reg->name_prefix, reg->name);
  ------------------
  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 9911|  3.59k|                        } else {
 9912|  3.59k|                            janet_eprintf(" %s", reg->name);
  ------------------
  |  | 2195|  3.59k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 9913|  3.59k|                        }
 9914|  3.59k|                        if (NULL != reg->source_file) {
  ------------------
  |  Branch (9914:29): [True: 3.59k, False: 0]
  ------------------
 9915|  3.59k|                            janet_eprintf(" [%s]", reg->source_file);
  ------------------
  |  | 2195|  3.59k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 9916|  3.59k|                        }
 9917|  3.59k|                    } else {
 9918|     44|                        janet_eprintf(" <cfunction>");
  ------------------
  |  | 2195|     44|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 9919|     44|                    }
 9920|  3.63k|                }
 9921|  3.63k|            }
 9922|   555k|            if (frame->flags & JANET_STACKFRAME_TAILCALL)
  ------------------
  |  | 1010|   555k|#define JANET_STACKFRAME_TAILCALL 1
  ------------------
  |  Branch (9922:17): [True: 505k, False: 49.5k]
  ------------------
 9923|   505k|                janet_eprintf(" (tail call)");
  ------------------
  |  | 2195|   505k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 9924|   555k|            if (frame->func && frame->pc) {
  ------------------
  |  Branch (9924:17): [True: 551k, False: 3.63k]
  |  Branch (9924:32): [True: 551k, False: 0]
  ------------------
 9925|   551k|                int32_t off = (int32_t)(frame->pc - def->bytecode);
 9926|   551k|                if (def->sourcemap) {
  ------------------
  |  Branch (9926:21): [True: 551k, False: 86]
  ------------------
 9927|   551k|                    JanetSourceMapping mapping = def->sourcemap[off];
 9928|   551k|                    janet_eprintf(" on line %d, column %d", mapping.line, mapping.column);
  ------------------
  |  | 2195|   551k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 9929|   551k|                } else {
 9930|     86|                    janet_eprintf(" pc=%d", off);
  ------------------
  |  | 2195|     86|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 9931|     86|                }
 9932|   551k|            } else if (NULL != reg) {
  ------------------
  |  Branch (9932:24): [True: 3.59k, False: 44]
  ------------------
 9933|       |                /* C Function */
 9934|  3.59k|                if (reg->source_line > 0) {
  ------------------
  |  Branch (9934:21): [True: 3.59k, False: 0]
  ------------------
 9935|  3.59k|                    janet_eprintf(" on line %d", (long) reg->source_line);
  ------------------
  |  | 2195|  3.59k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 9936|  3.59k|                }
 9937|  3.59k|            }
 9938|   555k|            janet_eprintf("\n");
  ------------------
  |  | 2195|   555k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 9939|       |            /* Print fiber points optionally. Clutters traces but provides info
 9940|       |            if (i <= 0 && fi > 0) {
 9941|       |                janet_eprintf("  in parent fiber\n");
 9942|       |            }
 9943|       |            */
 9944|   555k|        }
 9945|   501k|    }
 9946|       |
 9947|   501k|    if (print_color) janet_eprintf("\x1b[0m");
  ------------------
  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
  |  Branch (9947:9): [True: 0, False: 501k]
  ------------------
 9948|       |
 9949|       |    janet_v_free(fibers);
  ------------------
  |  |  733|   501k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|   501k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 501k, False: 0]
  |  |  ------------------
  ------------------
 9950|   501k|}
cfun_debug_fbreak:
10006|     12|              "if the offset is too large or negative.") {
10007|     12|    JanetFuncDef *def;
10008|     12|    int32_t offset = 0;
10009|     12|    helper_find_fun(argc, argv, &def, &offset);
10010|     12|    janet_debug_break(def, offset);
10011|     12|    return janet_wrap_nil();
  ------------------
  |  |  831|     12|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     12|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     12|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     12|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10012|     12|}
cfun_debug_unfbreak:
10016|    149|              "Unset a breakpoint set with debug/fbreak.") {
10017|    149|    JanetFuncDef *def;
10018|    149|    int32_t offset;
10019|    149|    helper_find_fun(argc, argv, &def, &offset);
10020|    149|    janet_debug_unbreak(def, offset);
10021|    149|    return janet_wrap_nil();
  ------------------
  |  |  831|    149|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    149|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    149|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    149|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10022|    149|}
cfun_debug_stack:
10145|      1|              "* :tail - boolean indicating a tail call") {
10146|      1|    janet_fixarity(argc, 1);
10147|      1|    JanetFiber *fiber = janet_getfiber(argv, 0);
10148|      1|    JanetArray *array = janet_array(0);
10149|      1|    {
10150|      1|        int32_t i = fiber->frame;
10151|      1|        JanetStackFrame *frame;
10152|      1|        while (i > 0) {
  ------------------
  |  Branch (10152:16): [True: 0, False: 1]
  ------------------
10153|      0|            frame = (JanetStackFrame *)(fiber->data + i - JANET_FRAME_SIZE);
  ------------------
  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  ------------------
10154|      0|            janet_array_push(array, doframe(frame));
10155|      0|            i = frame->prevframe;
10156|      0|        }
10157|      1|    }
10158|      1|    return janet_wrap_array(array);
  ------------------
  |  |  845|      1|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|      1|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10159|      1|}
cfun_debug_stacktrace:
10166|   496k|              "the error line. Returns `fib`.") {
10167|   496k|    janet_arity(argc, 1, 3);
10168|   496k|    JanetFiber *fiber = janet_getfiber(argv, 0);
10169|   496k|    Janet x = argc == 1 ? janet_wrap_nil() : argv[1];
  ------------------
  |  |  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 (10169:15): [True: 0, False: 496k]
  ------------------
10170|       |    const char *prefix = janet_optcstring(argv, argc, 2, NULL);
10171|   496k|    janet_stacktrace_ext(fiber, x, prefix);
10172|   496k|    return argv[0];
10173|   496k|}
cfun_debug_step:
10195|      1|              "usually nil, as breakpoints raise nil signals.") {
10196|      1|    janet_arity(argc, 1, 2);
10197|      1|    JanetFiber *fiber = janet_getfiber(argv, 0);
10198|      1|    Janet out = janet_wrap_nil();
  ------------------
  |  |  831|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10199|      1|    janet_step(fiber, argc == 1 ? janet_wrap_nil() : argv[1], &out);
  ------------------
  |  |  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 (10199:23): [True: 0, False: 1]
  ------------------
10200|      1|    return out;
10201|      1|}
janet_lib_debug:
10204|  8.33k|void janet_lib_debug(JanetTable *env) {
10205|  8.33k|    JanetRegExt debug_cfuns[] = {
10206|  8.33k|        JANET_CORE_REG("debug/break", cfun_debug_break),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10207|  8.33k|        JANET_CORE_REG("debug/unbreak", cfun_debug_unbreak),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10208|  8.33k|        JANET_CORE_REG("debug/fbreak", cfun_debug_fbreak),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10209|  8.33k|        JANET_CORE_REG("debug/unfbreak", cfun_debug_unfbreak),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10210|  8.33k|        JANET_CORE_REG("debug/arg-stack", cfun_debug_argstack),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10211|  8.33k|        JANET_CORE_REG("debug/stack", cfun_debug_stack),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10212|  8.33k|        JANET_CORE_REG("debug/stacktrace", cfun_debug_stacktrace),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10213|  8.33k|        JANET_CORE_REG("debug/lineage", cfun_debug_lineage),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10214|  8.33k|        JANET_CORE_REG("debug/step", cfun_debug_step),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
10215|  8.33k|        JANET_REG_END
  ------------------
  |  | 2110|  8.33k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
10216|  8.33k|    };
10217|       |    janet_core_cfuns_ext(env, NULL, debug_cfuns);
10218|  8.33k|}
janetc_allocfar:
10256|  11.9M|int32_t janetc_allocfar(JanetCompiler *c) {
10257|  11.9M|    int32_t reg = janetc_regalloc_1(&c->scope->ra);
10258|  11.9M|    if (reg > 0xFFFF) {
  ------------------
  |  Branch (10258:9): [True: 664k, False: 11.3M]
  ------------------
10259|   664k|        janetc_cerror(c, "ran out of internal registers");
10260|   664k|    }
10261|  11.9M|    return reg;
10262|  11.9M|}
janetc_allocnear:
10265|  1.13M|int32_t janetc_allocnear(JanetCompiler *c, JanetcRegisterTemp tag) {
10266|  1.13M|    return janetc_regalloc_temp(&c->scope->ra, tag);
10267|  1.13M|}
janetc_emit:
10270|  24.3M|void janetc_emit(JanetCompiler *c, uint32_t instr) {
10271|  24.3M|    janet_v_push(c->buffer, instr);
  ------------------
  |  |  734|  24.3M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  24.3M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  24.3M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  24.1M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  24.1M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|  24.1M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  24.1M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 242k, False: 24.1M]
  |  |  |  |  |  |  |  Branch (745:50): [True: 707k, False: 23.4M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|   949k|#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|  24.3M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  24.3M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10272|       |    janet_v_push(c->mapbuffer, c->current_mapping);
  ------------------
  |  |  734|  24.3M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  24.3M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  24.3M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  24.1M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  24.1M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|  24.1M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  24.1M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 242k, False: 24.1M]
  |  |  |  |  |  |  |  Branch (745:50): [True: 707k, False: 23.4M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|   949k|#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|  24.3M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  24.3M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10273|  24.3M|}
janetc_sequal:
10454|  1.86M|int janetc_sequal(JanetSlot lhs, JanetSlot rhs) {
10455|  1.86M|    if ((lhs.flags & ~JANET_SLOTTYPE_ANY) == (rhs.flags & ~JANET_SLOTTYPE_ANY) &&
  ------------------
  |  | 1025|  1.86M|#define JANET_SLOTTYPE_ANY 0xFFFF
  ------------------
                  if ((lhs.flags & ~JANET_SLOTTYPE_ANY) == (rhs.flags & ~JANET_SLOTTYPE_ANY) &&
  ------------------
  |  | 1025|  1.86M|#define JANET_SLOTTYPE_ANY 0xFFFF
  ------------------
  |  Branch (10455:9): [True: 1.57M, False: 290k]
  ------------------
10456|  1.57M|            lhs.index == rhs.index &&
  ------------------
  |  Branch (10456:13): [True: 83.9k, False: 1.48M]
  ------------------
10457|  83.9k|            lhs.envindex == rhs.envindex) {
  ------------------
  |  Branch (10457:13): [True: 83.9k, False: 0]
  ------------------
10458|  83.9k|        if (lhs.flags & (JANET_SLOT_REF | JANET_SLOT_CONSTANT)) {
  ------------------
  |  | 1018|  83.9k|#define JANET_SLOT_REF 0x80000
  ------------------
                      if (lhs.flags & (JANET_SLOT_REF | JANET_SLOT_CONSTANT)) {
  ------------------
  |  | 1015|  83.9k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (10458:13): [True: 0, False: 83.9k]
  ------------------
10459|      0|            return janet_equals(lhs.constant, rhs.constant);
10460|  83.9k|        } else {
10461|  83.9k|            return 1;
10462|  83.9k|        }
10463|  83.9k|    }
10464|  1.77M|    return 0;
10465|  1.86M|}
janetc_copy:
10472|  1.86M|    JanetSlot src) {
10473|  1.86M|    if (dest.flags & JANET_SLOT_CONSTANT) {
  ------------------
  |  | 1015|  1.86M|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (10473:9): [True: 0, False: 1.86M]
  ------------------
10474|      0|        janetc_cerror(c, "cannot write to constant");
10475|      0|        return;
10476|      0|    }
10477|  1.86M|    if (janetc_sequal(dest, src)) return;
  ------------------
  |  Branch (10477:9): [True: 83.9k, False: 1.77M]
  ------------------
10478|       |    /* If dest is a near register */
10479|  1.77M|    if (dest.envindex < 0 && dest.index >= 0 && dest.index <= 0xFF) {
  ------------------
  |  Branch (10479:9): [True: 1.75M, False: 25.5k]
  |  Branch (10479:30): [True: 1.75M, False: 0]
  |  Branch (10479:49): [True: 481k, False: 1.27M]
  ------------------
10480|   481k|        janetc_movenear(c, dest.index, src);
10481|   481k|        return;
10482|   481k|    }
10483|       |    /* If src is a near register */
10484|  1.29M|    if (src.envindex < 0 && src.index >= 0 && src.index <= 0xFF) {
  ------------------
  |  Branch (10484:9): [True: 1.29M, False: 0]
  |  Branch (10484:29): [True: 1.25M, False: 38.0k]
  |  Branch (10484:47): [True: 165k, False: 1.09M]
  ------------------
10485|   165k|        janetc_moveback(c, dest, src.index);
10486|   165k|        return;
10487|   165k|    }
10488|       |    /* Process: src -> near -> dest */
10489|  1.13M|    int32_t nearreg = janetc_allocnear(c, JANETC_REGTEMP_3);
10490|  1.13M|    janetc_movenear(c, nearreg, src);
10491|  1.13M|    janetc_moveback(c, dest, nearreg);
10492|       |    /* Cleanup */
10493|  1.13M|    janetc_regalloc_freetemp(&c->scope->ra, nearreg, JANETC_REGTEMP_3);
10494|  1.13M|}
janetc_emit_s:
10508|  3.15M|int32_t janetc_emit_s(JanetCompiler *c, uint8_t op, JanetSlot s, int wr) {
10509|  3.15M|    int32_t reg = janetc_regfar(c, s, JANETC_REGTEMP_0);
10510|  3.15M|    int32_t label = janet_v_count(c->buffer);
  ------------------
  |  |  736|  3.15M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  3.13M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  3.13M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 3.13M, False: 22.1k]
  |  |  ------------------
  ------------------
10511|  3.15M|    janetc_emit(c, op | ((uint32_t) reg << 8));
10512|  3.15M|    if (wr)
  ------------------
  |  Branch (10512:9): [True: 2.11M, False: 1.04M]
  ------------------
10513|  2.11M|        janetc_moveback(c, s, reg);
10514|  3.15M|    janetc_free_regnear(c, s, reg, JANETC_REGTEMP_0);
10515|  3.15M|    return label;
10516|  3.15M|}
janetc_emit_si:
10531|   290k|int32_t janetc_emit_si(JanetCompiler *c, uint8_t op, JanetSlot s, int16_t immediate, int wr) {
10532|   290k|    return emit1s(c, op, s, immediate, wr);
10533|   290k|}
janetc_emit_su:
10535|   315k|int32_t janetc_emit_su(JanetCompiler *c, uint8_t op, JanetSlot s, uint16_t immediate, int wr) {
10536|   315k|    return emit1s(c, op, s, (int32_t) immediate, wr);
10537|   315k|}
janetc_emit_ss:
10551|  2.21M|int32_t janetc_emit_ss(JanetCompiler *c, uint8_t op, JanetSlot s1, JanetSlot s2, int wr) {
10552|  2.21M|    int32_t reg1 = janetc_regnear(c, s1, JANETC_REGTEMP_0);
10553|  2.21M|    int32_t reg2 = janetc_regfar(c, s2, JANETC_REGTEMP_1);
10554|  2.21M|    int32_t label = janet_v_count(c->buffer);
  ------------------
  |  |  736|  2.21M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  2.21M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  2.21M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 2.21M, False: 1]
  |  |  ------------------
  ------------------
10555|  2.21M|    janetc_emit(c, op | ((uint32_t) reg1 << 8) | ((uint32_t) reg2 << 16));
10556|  2.21M|    janetc_free_regnear(c, s2, reg2, JANETC_REGTEMP_1);
10557|  2.21M|    if (wr)
  ------------------
  |  Branch (10557:9): [True: 216k, False: 1.99M]
  ------------------
10558|   216k|        janetc_moveback(c, s1, reg1);
10559|  2.21M|    janetc_free_regnear(c, s1, reg1, JANETC_REGTEMP_0);
10560|  2.21M|    return label;
10561|  2.21M|}
janetc_emit_ssi:
10563|   123k|int32_t janetc_emit_ssi(JanetCompiler *c, uint8_t op, JanetSlot s1, JanetSlot s2, int8_t immediate, int wr) {
10564|   123k|    return emit2s(c, op, s1, s2, immediate, wr);
10565|   123k|}
janetc_emit_ssu:
10567|  2.07M|int32_t janetc_emit_ssu(JanetCompiler *c, uint8_t op, JanetSlot s1, JanetSlot s2, uint8_t immediate, int wr) {
10568|  2.07M|    return emit2s(c, op, s1, s2, (int32_t) immediate, wr);
10569|  2.07M|}
janetc_emit_sss:
10571|  1.12M|int32_t janetc_emit_sss(JanetCompiler *c, uint8_t op, JanetSlot s1, JanetSlot s2, JanetSlot s3, int wr) {
10572|  1.12M|    int32_t reg1 = janetc_regnear(c, s1, JANETC_REGTEMP_0);
10573|  1.12M|    int32_t reg2 = janetc_regnear(c, s2, JANETC_REGTEMP_1);
10574|  1.12M|    int32_t reg3 = janetc_regnear(c, s3, JANETC_REGTEMP_2);
10575|  1.12M|    int32_t label = janet_v_count(c->buffer);
  ------------------
  |  |  736|  1.12M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  1.12M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.12M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 1.12M, False: 0]
  |  |  ------------------
  ------------------
10576|  1.12M|    janetc_emit(c, op | ((uint32_t) reg1 << 8) | ((uint32_t) reg2 << 16) | ((uint32_t) reg3 << 24));
10577|  1.12M|    janetc_free_regnear(c, s2, reg2, JANETC_REGTEMP_1);
10578|  1.12M|    janetc_free_regnear(c, s3, reg3, JANETC_REGTEMP_2);
10579|  1.12M|    if (wr)
  ------------------
  |  Branch (10579:9): [True: 696k, False: 430k]
  ------------------
10580|   696k|        janetc_moveback(c, s1, reg1);
10581|  1.12M|    janetc_free_regnear(c, s1, reg1, JANETC_REGTEMP_0);
10582|  1.12M|    return label;
10583|  1.12M|}
janet_async_end:
10855|  1.92M|void janet_async_end(JanetFiber *fiber) {
10856|  1.92M|    if (fiber->ev_callback) {
  ------------------
  |  Branch (10856:9): [True: 0, False: 1.92M]
  ------------------
10857|      0|        if (fiber->ev_stream->read_fiber == fiber) {
  ------------------
  |  Branch (10857:13): [True: 0, False: 0]
  ------------------
10858|      0|            fiber->ev_stream->read_fiber = NULL;
10859|      0|        }
10860|      0|        if (fiber->ev_stream->write_fiber == fiber) {
  ------------------
  |  Branch (10860:13): [True: 0, False: 0]
  ------------------
10861|      0|            fiber->ev_stream->write_fiber = NULL;
10862|      0|        }
10863|      0|        fiber->ev_callback(fiber, JANET_ASYNC_EVENT_DEINIT);
10864|      0|        janet_gcunroot(janet_wrap_abstract(fiber->ev_stream));
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10865|      0|        fiber->ev_callback = NULL;
10866|      0|        if (!(fiber->flags & JANET_FIBER_EV_FLAG_IN_FLIGHT)) {
  ------------------
  |  |  824|      0|#define JANET_FIBER_EV_FLAG_IN_FLIGHT 0x1
  ------------------
  |  Branch (10866:13): [True: 0, False: 0]
  ------------------
10867|      0|            if (fiber->ev_state) {
  ------------------
  |  Branch (10867:17): [True: 0, False: 0]
  ------------------
10868|      0|                janet_free(fiber->ev_state);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
10869|       |                fiber->ev_state = NULL;
10870|      0|            }
10871|      0|            janet_ev_dec_refcount();
10872|      0|        }
10873|      0|    }
10874|  1.92M|}
janet_async_start_fiber:
10884|      1|void janet_async_start_fiber(JanetFiber *fiber, JanetStream *stream, JanetAsyncMode mode, JanetEVCallback callback, void *state) {
10885|      1|    janet_assert(!fiber->ev_callback, "double async on fiber");
  ------------------
  |  |  389|      1|#define janet_assert(c, m) do { \
  |  |  390|      1|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 1]
  |  |  ------------------
  |  |  391|      1|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 1]
  |  |  ------------------
  ------------------
10886|      1|    if (mode & JANET_ASYNC_LISTEN_READ) {
  ------------------
  |  Branch (10886:9): [True: 0, False: 1]
  ------------------
10887|      0|        stream->read_fiber = fiber;
10888|      0|    }
10889|      1|    if (mode & JANET_ASYNC_LISTEN_WRITE) {
  ------------------
  |  Branch (10889:9): [True: 1, False: 0]
  ------------------
10890|      1|        stream->write_fiber = fiber;
10891|      1|    }
10892|      1|    fiber->ev_callback = callback;
10893|      1|    fiber->ev_stream = stream;
10894|      1|    janet_ev_inc_refcount();
10895|      1|    janet_gcroot(janet_wrap_abstract(stream));
  ------------------
  |  |  851|      1|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|      1|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10896|      1|    fiber->ev_state = state;
10897|      1|    callback(fiber, JANET_ASYNC_EVENT_INIT);
10898|      1|}
janet_async_start:
10900|      1|void janet_async_start(JanetStream *stream, JanetAsyncMode mode, JanetEVCallback callback, void *state) {
10901|      1|    janet_async_start_fiber(janet_vm.root_fiber, stream, mode, callback, state);
10902|      1|    janet_await();
10903|      1|}
janet_fiber_did_resume:
10905|  1.92M|void janet_fiber_did_resume(JanetFiber *fiber) {
10906|  1.92M|    janet_async_end(fiber);
10907|  1.92M|}
janet_stream_ext:
10930|     33|JanetStream *janet_stream_ext(JanetHandle handle, uint32_t flags, const JanetMethod *methods, size_t size) {
10931|     33|    janet_assert(size >= sizeof(JanetStream), "bad size");
  ------------------
  |  |  389|     33|#define janet_assert(c, m) do { \
  |  |  390|     33|    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: 33]
  |  |  ------------------
  |  |  391|     33|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 33]
  |  |  ------------------
  ------------------
10932|     33|    JanetStream *stream = janet_abstract(&janet_stream_type, size);
10933|     33|    stream->handle = handle;
10934|     33|    stream->flags = flags;
10935|     33|    stream->read_fiber = NULL;
10936|     33|    stream->write_fiber = NULL;
10937|     33|    if (methods == NULL) methods = ev_default_stream_methods;
  ------------------
  |  Branch (10937:9): [True: 23, False: 10]
  ------------------
10938|     33|    stream->methods = methods;
10939|     33|    stream->index = 0;
10940|     33|    janet_register_stream(stream);
10941|     33|    return stream;
10942|     33|}
janet_stream:
10944|     33|JanetStream *janet_stream(JanetHandle handle, uint32_t flags, const JanetMethod *methods) {
10945|     33|    return janet_stream_ext(handle, flags, methods, sizeof(JanetStream));
10946|     33|}
janet_schedule_signal:
11119|  6.53k|void janet_schedule_signal(JanetFiber *fiber, Janet value, JanetSignal sig) {
11120|  6.53k|    janet_schedule_general(fiber, value, sig, 0);
11121|  6.53k|}
janet_cancel:
11127|    289|void janet_cancel(JanetFiber *fiber, Janet value) {
11128|    289|    if (!(fiber->gc.flags & JANET_FIBER_EV_GCFLAG_ROOT)) {
  ------------------
  |  |  821|    289|#define JANET_FIBER_EV_GCFLAG_ROOT 0x4000000
  ------------------
  |  Branch (11128:9): [True: 0, False: 289]
  ------------------
11129|      0|        janet_panic("cannot cancel non-task fiber");
11130|      0|    }
11131|    289|    janet_schedule_signal(fiber, value, JANET_SIGNAL_ERROR);
11132|    289|}
janet_schedule:
11134|  6.24k|void janet_schedule(JanetFiber *fiber, Janet value) {
11135|  6.24k|    janet_schedule_signal(fiber, value, JANET_SIGNAL_OK);
11136|  6.24k|}
janet_ev_mark:
11139|  26.8k|void janet_ev_mark(void) {
11140|       |
11141|       |    /* Pending tasks */
11142|  26.8k|    JanetTask *tasks = janet_vm.spawn.data;
11143|  26.8k|    if (janet_vm.spawn.head <= janet_vm.spawn.tail) {
  ------------------
  |  Branch (11143:9): [True: 26.8k, False: 0]
  ------------------
11144|  28.0k|        for (int32_t i = janet_vm.spawn.head; i < janet_vm.spawn.tail; i++) {
  ------------------
  |  Branch (11144:47): [True: 1.22k, False: 26.8k]
  ------------------
11145|  1.22k|            janet_mark(janet_wrap_fiber(tasks[i].fiber));
  ------------------
  |  |  844|  1.22k|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11146|  1.22k|            janet_mark(tasks[i].value);
11147|  1.22k|        }
11148|  26.8k|    } else {
11149|      0|        for (int32_t i = janet_vm.spawn.head; i < janet_vm.spawn.capacity; i++) {
  ------------------
  |  Branch (11149:47): [True: 0, False: 0]
  ------------------
11150|      0|            janet_mark(janet_wrap_fiber(tasks[i].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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11151|      0|            janet_mark(tasks[i].value);
11152|      0|        }
11153|      0|        for (int32_t i = 0; i < janet_vm.spawn.tail; i++) {
  ------------------
  |  Branch (11153:29): [True: 0, False: 0]
  ------------------
11154|      0|            janet_mark(janet_wrap_fiber(tasks[i].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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11155|      0|            janet_mark(tasks[i].value);
11156|      0|        }
11157|      0|    }
11158|       |
11159|       |    /* Pending timeouts */
11160|  26.1M|    for (size_t i = 0; i < janet_vm.tq_count; i++) {
  ------------------
  |  Branch (11160:24): [True: 26.1M, False: 26.8k]
  ------------------
11161|  26.1M|        janet_mark(janet_wrap_fiber(janet_vm.tq[i].fiber));
  ------------------
  |  |  844|  26.1M|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|  26.1M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  26.1M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  26.1M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11162|  26.1M|        if (janet_vm.tq[i].curr_fiber != NULL) {
  ------------------
  |  Branch (11162:13): [True: 26.1M, False: 345]
  ------------------
11163|  26.1M|            janet_mark(janet_wrap_fiber(janet_vm.tq[i].curr_fiber));
  ------------------
  |  |  844|  26.1M|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|  26.1M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  26.1M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  26.1M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11164|  26.1M|        }
11165|  26.1M|    }
11166|  26.8k|}
janet_ev_init_common:
11184|  10.3k|void janet_ev_init_common(void) {
11185|  10.3k|    janet_q_init(&janet_vm.spawn);
11186|  10.3k|    janet_vm.tq = NULL;
11187|  10.3k|    janet_vm.tq_count = 0;
11188|  10.3k|    janet_vm.tq_capacity = 0;
11189|  10.3k|    janet_table_init_raw(&janet_vm.threaded_abstracts, 0);
11190|  10.3k|    janet_table_init_raw(&janet_vm.active_tasks, 0);
11191|  10.3k|    janet_table_init_raw(&janet_vm.signal_handlers, 0);
11192|  10.3k|    janet_rng_seed(&janet_vm.ev_rng, 0);
11193|  10.3k|#ifndef JANET_WINDOWS
11194|  10.3k|    pthread_attr_init(&janet_vm.new_thread_attr);
11195|       |    pthread_attr_setdetachstate(&janet_vm.new_thread_attr, PTHREAD_CREATE_DETACHED);
11196|  10.3k|#endif
11197|  10.3k|}
janet_ev_deinit_common:
11230|  10.3k|void janet_ev_deinit_common(void) {
11231|  10.3k|    JanetTimeout to;
11232|  1.03M|    while (peek_timeout(&to)) {
  ------------------
  |  Branch (11232:12): [True: 1.02M, False: 10.3k]
  ------------------
11233|  1.02M|        handle_timeout_worker(to, 1);
11234|  1.02M|        pop_timeout(0);
11235|  1.02M|    }
11236|  10.3k|    janet_q_deinit(&janet_vm.spawn);
11237|  10.3k|    janet_free(janet_vm.tq);
  ------------------
  |  | 2415|  10.3k|#define janet_free(X) free((X))
  ------------------
11238|  10.3k|    janet_table_deinit(&janet_vm.threaded_abstracts);
11239|  10.3k|    janet_table_deinit(&janet_vm.active_tasks);
11240|  10.3k|    janet_table_deinit(&janet_vm.signal_handlers);
11241|  10.3k|#ifndef JANET_WINDOWS
11242|  10.3k|    pthread_attr_destroy(&janet_vm.new_thread_attr);
11243|  10.3k|#endif
11244|  10.3k|}
janet_await:
11247|  5.07k|void janet_await(void) {
11248|       |    /* Store the fiber in a global table */
11249|  5.07k|    janet_signalv(JANET_SIGNAL_EVENT, janet_wrap_nil());
  ------------------
  |  |  831|  5.07k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  5.07k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.07k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.07k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11250|  5.07k|}
janet_ev_inc_refcount:
11329|  2.98k|void janet_ev_inc_refcount(void) {
11330|  2.98k|    janet_atomic_inc(&janet_vm.listener_count);
11331|  2.98k|}
janet_ev_dec_refcount:
11333|    988|void janet_ev_dec_refcount(void) {
11334|    988|    janet_atomic_dec(&janet_vm.listener_count);
11335|    988|}
janet_channel_unwrap:
11766|  2.17k|JanetChannel *janet_channel_unwrap(void *abstract) {
11767|  2.17k|    return abstract;
11768|  2.17k|}
janet_getchannel:
11770|  1.01k|JanetChannel *janet_getchannel(const Janet *argv, int32_t n) {
11771|  1.01k|    return janet_channel_unwrap(janet_getabstract(argv, n, &janet_channel_type));
11772|  1.01k|}
cfun_channel_pop:
11825|  1.00k|              "no value is available.") {
11826|  1.00k|    janet_fixarity(argc, 1);
11827|  1.00k|    JanetChannel *channel = janet_getchannel(argv, 0);
11828|  1.00k|    Janet item;
11829|  1.00k|    if (janet_vm.coerce_error) {
  ------------------
  |  Branch (11829:9): [True: 0, False: 1.00k]
  ------------------
11830|      0|        janet_panic("cannot take from channel inside janet_call");
11831|      0|    }
11832|  1.00k|    if (janet_channel_pop(channel, &item, 0)) {
  ------------------
  |  Branch (11832:9): [True: 864, False: 138]
  ------------------
11833|    864|        janet_schedule(janet_vm.root_fiber, item);
11834|    864|    }
11835|  1.00k|    janet_await();
11836|  1.00k|}
cfun_channel_choice:
11849|     12|              "closed.") {
11850|     12|    janet_arity(argc, 1, -1);
11851|     12|    int32_t len;
11852|     12|    const Janet *data;
11853|       |
11854|     12|    if (janet_vm.coerce_error) {
  ------------------
  |  Branch (11854:9): [True: 0, False: 12]
  ------------------
11855|      0|        janet_panic("cannot select from channel inside janet_call");
11856|      0|    }
11857|       |
11858|       |    /* Check channels for immediate reads and writes. Avoid awating to event loop
11859|       |     * if possible, but should be very similar to async block of code. */
11860|     24|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (11860:25): [True: 12, False: 12]
  ------------------
11861|     12|        if (janet_indexed_view(argv[i], &data, &len) && len == 2) {
  ------------------
  |  Branch (11861:13): [True: 3, False: 9]
  |  Branch (11861:57): [True: 2, False: 1]
  ------------------
11862|       |            /* Write */
11863|      2|            JanetChannel *chan = janet_getchannel(data, 0);
11864|      2|            janet_chan_lock(chan);
11865|      2|            if (chan->closed) {
  ------------------
  |  Branch (11865:17): [True: 0, False: 2]
  ------------------
11866|      0|                janet_chan_unlock(chan);
11867|      0|                return make_close_result(chan);
11868|      0|            }
11869|      2|            if (janet_q_count(&chan->items) < chan->limit) {
  ------------------
  |  Branch (11869:17): [True: 0, False: 2]
  ------------------
11870|      0|                janet_channel_push_with_lock(chan, data[1], 1);
11871|      0|                return make_write_result(chan);
11872|      0|            }
11873|      2|            janet_chan_unlock(chan);
11874|     10|        } else {
11875|       |            /* Read */
11876|     10|            JanetChannel *chan = janet_getchannel(argv, i);
11877|     10|            janet_chan_lock(chan);
11878|     10|            if (chan->closed) {
  ------------------
  |  Branch (11878:17): [True: 0, False: 10]
  ------------------
11879|      0|                janet_chan_unlock(chan);
11880|      0|                return make_close_result(chan);
11881|      0|            }
11882|     10|            if (chan->items.head != chan->items.tail) {
  ------------------
  |  Branch (11882:17): [True: 0, False: 10]
  ------------------
11883|      0|                Janet item;
11884|      0|                janet_channel_pop_with_lock(chan, &item, 1);
11885|      0|                return make_read_result(chan, item);
11886|      0|            }
11887|     10|            janet_chan_unlock(chan);
11888|     10|        }
11889|     12|    }
11890|       |
11891|       |    /* We cannot assume threaded channels are unchanged here, as other threads can mutate them.
11892|       |     * Namely, they may been closed or have items added or removed during this call. Simple channels
11893|       |     * could be slightly simpler and skip the extra closed checks. */
11894|       |
11895|       |    /* Wait for all readers or writers */
11896|     12|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (11896:25): [True: 0, False: 12]
  ------------------
11897|      0|        if (janet_indexed_view(argv[i], &data, &len) && len == 2) {
  ------------------
  |  Branch (11897:13): [True: 0, False: 0]
  |  Branch (11897:57): [True: 0, False: 0]
  ------------------
11898|       |            /* Write */
11899|      0|            JanetChannel *chan = janet_getchannel(data, 0);
11900|      0|            janet_chan_lock(chan);
11901|      0|            if (chan->closed) {
  ------------------
  |  Branch (11901:17): [True: 0, False: 0]
  ------------------
11902|      0|                janet_chan_unlock(chan);
11903|      0|                janet_schedule(janet_vm.root_fiber, make_close_result(chan));
11904|      0|                break;
11905|      0|            }
11906|      0|            if (!janet_channel_push_with_lock(chan, data[1], 1)) {
  ------------------
  |  Branch (11906:17): [True: 0, False: 0]
  ------------------
11907|      0|                janet_schedule(janet_vm.root_fiber, make_write_result(chan));
11908|      0|                break;
11909|      0|            }
11910|      0|        } else {
11911|       |            /* Read */
11912|      0|            Janet item;
11913|      0|            JanetChannel *chan = janet_getchannel(argv, i);
11914|      0|            janet_chan_lock(chan);
11915|      0|            if (chan->closed) {
  ------------------
  |  Branch (11915:17): [True: 0, False: 0]
  ------------------
11916|      0|                janet_chan_unlock(chan);
11917|      0|                janet_schedule(janet_vm.root_fiber, make_close_result(chan));
11918|      0|                break;
11919|      0|            }
11920|      0|            if (janet_channel_pop_with_lock(chan, &item, 1)) {
  ------------------
  |  Branch (11920:17): [True: 0, False: 0]
  ------------------
11921|      0|                janet_schedule(janet_vm.root_fiber, make_read_result(chan, item));
11922|      0|                break;
11923|      0|            }
11924|      0|        }
11925|      0|    }
11926|       |
11927|     12|    janet_await();
11928|     12|}
cfun_channel_rchoice:
11976|     12|              "Similar to ev/select, but will try clauses in a random order for fairness.") {
11977|     12|    fisher_yates_args(argc, argv);
11978|     12|    return cfun_channel_choice(argc, argv);
11979|     12|}
cfun_channel_new:
11984|    477|              "blocking writers, defaults to 0 if not provided. Returns a new channel.") {
11985|    477|    janet_arity(argc, 0, 1);
11986|    477|    int32_t limit = janet_optnat(argv, argc, 0, 0);
11987|    477|    JanetChannel *channel = janet_abstract(&janet_channel_type, sizeof(JanetChannel));
11988|    477|    janet_chan_init(channel, limit, 0);
11989|    477|    return janet_wrap_abstract(channel);
  ------------------
  |  |  851|    477|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|    477|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    477|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    477|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11990|    477|}
cfun_channel_new_threaded:
11995|      8|              "used to communicate between any number of operating system threads.") {
11996|      8|    janet_arity(argc, 0, 1);
11997|      8|    int32_t limit = janet_optnat(argv, argc, 0, 0);
11998|      8|    JanetChannel *tchan = janet_abstract_threaded(&janet_channel_type, sizeof(JanetChannel));
11999|      8|    janet_chan_init(tchan, limit, 1);
12000|      8|    return janet_wrap_abstract(tchan);
  ------------------
  |  |  851|      8|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|      8|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      8|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      8|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12001|      8|}
janet_loop_done:
12158|  4.06k|int janet_loop_done(void) {
12159|  4.06k|    return !((janet_vm.spawn.head != janet_vm.spawn.tail) ||
  ------------------
  |  Branch (12159:14): [True: 2.05k, False: 2.01k]
  ------------------
12160|  2.01k|             janet_vm.tq_count ||
  ------------------
  |  Branch (12160:14): [True: 1, False: 2.01k]
  ------------------
12161|  2.01k|             janet_atomic_load(&janet_vm.listener_count));
  ------------------
  |  Branch (12161:14): [True: 1, False: 2.01k]
  ------------------
12162|  4.06k|}
janet_loop1:
12164|  2.05k|JanetFiber *janet_loop1(void) {
12165|       |    /* Schedule expired timers */
12166|  2.05k|    JanetTimeout to;
12167|  2.05k|    JanetTimestamp now = ts_now();
12168|  2.05k|    while (peek_timeout(&to) && to.when <= now) {
  ------------------
  |  Branch (12168:12): [True: 1, False: 2.05k]
  |  Branch (12168:33): [True: 1, False: 0]
  ------------------
12169|      1|        pop_timeout(0);
12170|      1|        if (to.curr_fiber != NULL) {
  ------------------
  |  Branch (12170:13): [True: 0, False: 1]
  ------------------
12171|      0|            if (janet_fiber_can_resume(to.curr_fiber)) {
  ------------------
  |  Branch (12171:17): [True: 0, False: 0]
  ------------------
12172|      0|                janet_cancel(to.fiber, janet_cstringv("deadline expired"));
  ------------------
  |  | 1826|      0|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12173|      0|            }
12174|      1|        } else {
12175|       |            /* This is a timeout (for a function call, not a whole fiber) */
12176|      1|            if (to.fiber->sched_id == to.sched_id) {
  ------------------
  |  Branch (12176:17): [True: 1, False: 0]
  ------------------
12177|      1|                if (to.is_error) {
  ------------------
  |  Branch (12177:21): [True: 0, False: 1]
  ------------------
12178|      0|                    janet_cancel(to.fiber, janet_cstringv("timeout"));
  ------------------
  |  | 1826|      0|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12179|      1|                } else {
12180|      1|                    janet_schedule(to.fiber, janet_wrap_nil());
  ------------------
  |  |  831|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12181|      1|                }
12182|      1|            }
12183|      1|        }
12184|      1|        handle_timeout_worker(to, 0);
12185|      1|    }
12186|       |
12187|       |    /* Run scheduled fibers unless interrupts need to be handled. */
12188|  6.20k|    while (janet_vm.spawn.head != janet_vm.spawn.tail) {
  ------------------
  |  Branch (12188:12): [True: 4.15k, False: 2.05k]
  ------------------
12189|       |        /* Don't run until all interrupts have been marked as handled by calling janet_interpreter_interrupt_handled */
12190|  4.15k|        if (janet_atomic_load_relaxed(&janet_vm.auto_suspend)) break;
  ------------------
  |  Branch (12190:13): [True: 0, False: 4.15k]
  ------------------
12191|  4.15k|        JanetTask task = {NULL, janet_wrap_nil(), JANET_SIGNAL_OK, 0};
  ------------------
  |  |  831|  4.15k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  4.15k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.15k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.15k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12192|  4.15k|        janet_q_pop(&janet_vm.spawn, &task, sizeof(task));
12193|  4.15k|        if (task.fiber->gc.flags & JANET_FIBER_EV_GCFLAG_SUSPENDED) janet_ev_dec_refcount();
  ------------------
  |  |  820|  4.15k|#define JANET_FIBER_EV_GCFLAG_SUSPENDED 0x2000000
  ------------------
  |  Branch (12193:13): [True: 955, False: 3.20k]
  ------------------
12194|  4.15k|        task.fiber->gc.flags &= ~(JANET_FIBER_EV_GCFLAG_CANCELED | JANET_FIBER_EV_GCFLAG_SUSPENDED);
  ------------------
  |  |  819|  4.15k|#define JANET_FIBER_EV_GCFLAG_CANCELED 0x1000000
  ------------------
                      task.fiber->gc.flags &= ~(JANET_FIBER_EV_GCFLAG_CANCELED | JANET_FIBER_EV_GCFLAG_SUSPENDED);
  ------------------
  |  |  820|  4.15k|#define JANET_FIBER_EV_GCFLAG_SUSPENDED 0x2000000
  ------------------
12195|  4.15k|        if (task.expected_sched_id != task.fiber->sched_id) continue;
  ------------------
  |  Branch (12195:13): [True: 12, False: 4.14k]
  ------------------
12196|  4.14k|        Janet res;
12197|  4.14k|        JanetSignal sig = janet_continue_signal(task.fiber, task.value, &res, task.sig);
12198|  4.14k|        if (!janet_fiber_can_resume(task.fiber)) {
  ------------------
  |  Branch (12198:13): [True: 3.18k, False: 956]
  ------------------
12199|  3.18k|            janet_table_remove(&janet_vm.active_tasks, janet_wrap_fiber(task.fiber));
  ------------------
  |  |  844|  3.18k|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|  3.18k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.18k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.18k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12200|  3.18k|        }
12201|  4.14k|        void *sv = task.fiber->supervisor_channel;
12202|  4.14k|        int is_suspended = sig == JANET_SIGNAL_EVENT || sig == JANET_SIGNAL_YIELD || sig == JANET_SIGNAL_INTERRUPT;
  ------------------
  |  Branch (12202:28): [True: 956, False: 3.18k]
  |  Branch (12202:57): [True: 0, False: 3.18k]
  |  Branch (12202:86): [True: 0, False: 3.18k]
  ------------------
12203|  4.14k|        if (is_suspended) {
  ------------------
  |  Branch (12203:13): [True: 955, False: 3.19k]
  ------------------
12204|    955|            task.fiber->gc.flags |= JANET_FIBER_EV_GCFLAG_SUSPENDED;
  ------------------
  |  |  820|    955|#define JANET_FIBER_EV_GCFLAG_SUSPENDED 0x2000000
  ------------------
12205|    955|            janet_ev_inc_refcount();
12206|    955|        }
12207|  4.14k|        if (NULL == sv) {
  ------------------
  |  Branch (12207:13): [True: 2.72k, False: 1.42k]
  ------------------
12208|  2.72k|            if (!is_suspended) {
  ------------------
  |  Branch (12208:17): [True: 2.01k, False: 703]
  ------------------
12209|  2.01k|                janet_stacktrace_ext(task.fiber, res, "");
12210|  2.01k|            }
12211|  2.72k|        } else if (sig == JANET_SIGNAL_OK || (task.fiber->flags & (1 << sig))) {
  ------------------
  |  Branch (12211:20): [True: 865, False: 560]
  |  Branch (12211:46): [True: 308, False: 252]
  ------------------
12212|  1.17k|            JanetChannel *chan = janet_channel_unwrap(sv);
12213|  1.17k|            janet_channel_push(chan, make_supervisor_event(janet_signal_names[sig],
12214|  1.17k|                    task.fiber, chan->is_threaded), 2);
12215|  1.17k|        } else if (!is_suspended) {
  ------------------
  |  Branch (12215:20): [True: 0, False: 253]
  ------------------
12216|      0|            janet_stacktrace_ext(task.fiber, res, "");
12217|      0|        }
12218|  4.14k|        if (sig == JANET_SIGNAL_INTERRUPT) {
  ------------------
  |  Branch (12218:13): [True: 0, False: 4.14k]
  ------------------
12219|      0|            return task.fiber;
12220|      0|        }
12221|  4.14k|    }
12222|       |
12223|       |    /* Poll for events */
12224|  2.05k|    if (janet_vm.tq_count || janet_atomic_load(&janet_vm.listener_count)) {
  ------------------
  |  Branch (12224:9): [True: 7, False: 2.04k]
  |  Branch (12224:30): [True: 33, False: 2.01k]
  ------------------
12225|     39|        JanetTimeout to;
12226|     39|        memset(&to, 0, sizeof(to));
12227|     39|        int has_timeout;
12228|       |        /* Drop timeouts that are no longer needed */
12229|  1.34k|        while ((has_timeout = peek_timeout(&to))) {
  ------------------
  |  Branch (12229:16): [True: 1.31k, False: 38]
  ------------------
12230|  1.31k|            if (to.curr_fiber != NULL) {
  ------------------
  |  Branch (12230:17): [True: 1.31k, False: 1]
  ------------------
12231|  1.31k|                if (!janet_fiber_can_resume(to.curr_fiber)) {
  ------------------
  |  Branch (12231:21): [True: 1.31k, False: 0]
  ------------------
12232|  1.31k|                    pop_timeout(0);
12233|  1.31k|                    janet_table_remove(&janet_vm.active_tasks, janet_wrap_fiber(to.curr_fiber));
  ------------------
  |  |  844|  1.31k|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|  1.31k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.31k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.31k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12234|  1.31k|                    handle_timeout_worker(to, 1);
12235|  1.31k|                    continue;
12236|  1.31k|                }
12237|  1.31k|            } else if (to.fiber->sched_id != to.sched_id) {
  ------------------
  |  Branch (12237:24): [True: 0, False: 1]
  ------------------
12238|      0|                pop_timeout(0);
12239|      0|                handle_timeout_worker(to, 1);
12240|      0|                continue;
12241|      0|            }
12242|      1|            break;
12243|  1.31k|        }
12244|       |        /* Run polling implementation only if pending timeouts or pending events */
12245|     39|        if (janet_vm.tq_count || janet_atomic_load(&janet_vm.listener_count)) {
  ------------------
  |  Branch (12245:13): [True: 1, False: 38]
  |  Branch (12245:34): [True: 33, False: 5]
  ------------------
12246|     34|            janet_loop1_impl(has_timeout, to.when);
12247|     34|        }
12248|     39|    }
12249|       |
12250|       |    /* No fiber was interrupted */
12251|       |    return NULL;
12252|  2.05k|}
janet_loop:
12265|  2.01k|void janet_loop(void) {
12266|  4.07k|    while (!janet_loop_done()) {
  ------------------
  |  Branch (12266:12): [True: 2.05k, False: 2.01k]
  ------------------
12267|  2.05k|        JanetFiber *interrupted_fiber = janet_loop1();
12268|  2.05k|        if (NULL != interrupted_fiber) {
  ------------------
  |  Branch (12268:13): [True: 0, False: 2.05k]
  ------------------
12269|      0|            janet_schedule(interrupted_fiber, 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12270|      0|        }
12271|  2.05k|    }
12272|  2.01k|}
janet_loop1_impl:
12458|     34|void janet_loop1_impl(int has_timeout, JanetTimestamp timeout) {
12459|     34|    struct itimerspec its;
12460|     34|    if (janet_vm.timer_enabled || has_timeout) {
  ------------------
  |  Branch (12460:9): [True: 1, False: 33]
  |  Branch (12460:35): [True: 1, False: 32]
  ------------------
12461|      2|        memset(&its, 0, sizeof(its));
12462|      2|        if (has_timeout) {
  ------------------
  |  Branch (12462:13): [True: 1, False: 1]
  ------------------
12463|      1|            its.it_value.tv_sec = timeout / 1000;
12464|      1|            its.it_value.tv_nsec = (timeout % 1000) * 1000000;
12465|      1|        }
12466|      2|        timerfd_settime(janet_vm.timerfd, TFD_TIMER_ABSTIME, &its, NULL);
12467|      2|    }
12468|     34|    janet_vm.timer_enabled = has_timeout;
12469|       |
12470|       |    /* Poll for events */
12471|     34|    struct epoll_event events[JANET_EPOLL_MAX_EVENTS];
12472|     34|    int ready;
12473|     34|    do {
12474|     34|        ready = epoll_wait(janet_vm.epoll, events, JANET_EPOLL_MAX_EVENTS, -1);
  ------------------
  |  |12457|     34|#define JANET_EPOLL_MAX_EVENTS 64
  ------------------
12475|     34|    } while (ready == -1 && errno == EINTR);
  ------------------
  |  Branch (12475:14): [True: 0, False: 34]
  |  Branch (12475:29): [True: 0, False: 0]
  ------------------
12476|     34|    if (ready == -1) {
  ------------------
  |  Branch (12476:9): [True: 0, False: 34]
  ------------------
12477|      0|        JANET_EXIT("failed to poll events");
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
12478|      0|    }
12479|       |
12480|       |    /* Step state machines */
12481|     68|    for (int i = 0; i < ready; i++) {
  ------------------
  |  Branch (12481:21): [True: 34, False: 34]
  ------------------
12482|     34|        void *p = events[i].data.ptr;
12483|     34|        if (&janet_vm.timerfd == p) {
  ------------------
  |  Branch (12483:13): [True: 1, False: 33]
  ------------------
12484|      1|            /* Timer expired, ignore */;
12485|     33|        } else if (janet_vm.selfpipe == p) {
  ------------------
  |  Branch (12485:20): [True: 33, False: 0]
  ------------------
12486|       |            /* Self-pipe handling */
12487|     33|            janet_ev_handle_selfpipe();
12488|     33|        } else {
12489|      0|            JanetStream *stream = p;
12490|      0|            int mask = events[i].events;
12491|      0|            int has_err = mask & EPOLLERR;
12492|      0|            int has_hup = mask & EPOLLHUP;
12493|      0|            JanetFiber *rf = stream->read_fiber;
12494|      0|            JanetFiber *wf = stream->write_fiber;
12495|      0|            if (rf) {
  ------------------
  |  Branch (12495:17): [True: 0, False: 0]
  ------------------
12496|      0|                if (rf->ev_callback && (mask & EPOLLIN)) {
  ------------------
  |  Branch (12496:21): [True: 0, False: 0]
  |  Branch (12496:40): [True: 0, False: 0]
  ------------------
12497|      0|                    rf->ev_callback(rf, JANET_ASYNC_EVENT_READ);
12498|      0|                }
12499|      0|                if (rf->ev_callback && has_err) {
  ------------------
  |  Branch (12499:21): [True: 0, False: 0]
  |  Branch (12499:40): [True: 0, False: 0]
  ------------------
12500|      0|                    rf->ev_callback(rf, JANET_ASYNC_EVENT_ERR);
12501|      0|                }
12502|      0|                if (rf->ev_callback && has_hup) {
  ------------------
  |  Branch (12502:21): [True: 0, False: 0]
  |  Branch (12502:40): [True: 0, False: 0]
  ------------------
12503|      0|                    rf->ev_callback(rf, JANET_ASYNC_EVENT_HUP);
12504|      0|                }
12505|      0|            }
12506|      0|            if (wf) {
  ------------------
  |  Branch (12506:17): [True: 0, False: 0]
  ------------------
12507|      0|                if (wf->ev_callback && (mask & EPOLLOUT)) {
  ------------------
  |  Branch (12507:21): [True: 0, False: 0]
  |  Branch (12507:40): [True: 0, False: 0]
  ------------------
12508|      0|                    wf->ev_callback(wf, JANET_ASYNC_EVENT_WRITE);
12509|      0|                }
12510|      0|                if (wf->ev_callback && has_err) {
  ------------------
  |  Branch (12510:21): [True: 0, False: 0]
  |  Branch (12510:40): [True: 0, False: 0]
  ------------------
12511|      0|                    wf->ev_callback(wf, JANET_ASYNC_EVENT_ERR);
12512|      0|                }
12513|      0|                if (wf->ev_callback && has_hup) {
  ------------------
  |  Branch (12513:21): [True: 0, False: 0]
  |  Branch (12513:40): [True: 0, False: 0]
  ------------------
12514|      0|                    wf->ev_callback(wf, JANET_ASYNC_EVENT_HUP);
12515|      0|                }
12516|      0|            }
12517|      0|            janet_stream_checktoclose(stream);
12518|      0|        }
12519|     34|    }
12520|     34|}
janet_ev_init:
12522|  10.3k|void janet_ev_init(void) {
12523|  10.3k|    janet_ev_init_common();
12524|  10.3k|    janet_ev_setup_selfpipe();
12525|  10.3k|    janet_vm.epoll = epoll_create1(EPOLL_CLOEXEC);
12526|  10.3k|    janet_vm.timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK);
12527|  10.3k|    janet_vm.timer_enabled = 0;
12528|  10.3k|    if (janet_vm.epoll == -1 || janet_vm.timerfd == -1) goto error;
  ------------------
  |  Branch (12528:9): [True: 0, False: 10.3k]
  |  Branch (12528:33): [True: 0, False: 10.3k]
  ------------------
12529|  10.3k|    struct epoll_event ev;
12530|  10.3k|    ev.events = EPOLLIN | EPOLLET;
12531|  10.3k|    ev.data.ptr = &janet_vm.timerfd;
12532|  10.3k|    if (-1 == epoll_ctl(janet_vm.epoll, EPOLL_CTL_ADD, janet_vm.timerfd, &ev)) goto error;
  ------------------
  |  Branch (12532:9): [True: 0, False: 10.3k]
  ------------------
12533|  10.3k|    ev.events = EPOLLIN | EPOLLET;
12534|  10.3k|    ev.data.ptr = janet_vm.selfpipe;
12535|  10.3k|    if (-1 == epoll_ctl(janet_vm.epoll, EPOLL_CTL_ADD, janet_vm.selfpipe[0], &ev)) goto error;
  ------------------
  |  Branch (12535:9): [True: 0, False: 10.3k]
  ------------------
12536|  10.3k|    return;
12537|  10.3k|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|  10.3k|void janet_ev_deinit(void) {
12542|  10.3k|    janet_ev_deinit_common();
12543|  10.3k|    close(janet_vm.epoll);
12544|  10.3k|    close(janet_vm.timerfd);
12545|  10.3k|    janet_ev_cleanup_selfpipe();
12546|  10.3k|    janet_vm.epoll = 0;
12547|  10.3k|}
janet_ev_threaded_call:
12993|  2.02k|void janet_ev_threaded_call(JanetThreadedSubroutine fp, JanetEVGenericMessage arguments, JanetThreadedCallback cb) {
12994|  2.02k|    JanetEVThreadInit *init = janet_malloc(sizeof(JanetEVThreadInit));
  ------------------
  |  | 2406|  2.02k|#define janet_malloc(X) malloc((X))
  ------------------
12995|  2.02k|    if (NULL == init) {
  ------------------
  |  Branch (12995:9): [True: 0, False: 2.02k]
  ------------------
12996|      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]
  |  |  ------------------
  ------------------
12997|      0|    }
12998|  2.02k|    init->msg = arguments;
12999|  2.02k|    init->subr = fp;
13000|  2.02k|    init->cb = cb;
13001|       |
13002|       |#ifdef JANET_WINDOWS
13003|       |    init->write_pipe = janet_vm.iocp;
13004|       |    HANDLE thread_handle = CreateThread(NULL, 0, janet_thread_body, init, 0, NULL);
13005|       |    if (NULL == thread_handle) {
13006|       |        janet_free(init);
13007|       |        janet_panic("failed to create thread");
13008|       |    }
13009|       |    CloseHandle(thread_handle); /* detach from thread */
13010|       |#else
13011|  2.02k|    init->write_pipe = janet_vm.selfpipe[1];
13012|  2.02k|    pthread_t waiter_thread;
13013|  2.02k|    int err = pthread_create(&waiter_thread, &janet_vm.new_thread_attr, janet_thread_body, init);
13014|  2.02k|    if (err) {
  ------------------
  |  Branch (13014:9): [True: 0, False: 2.02k]
  ------------------
13015|      0|        janet_free(init);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
13016|      0|        janet_panicf("%s", janet_strerror(err));
13017|      0|    }
13018|  2.02k|#endif
13019|       |
13020|       |    /* Increment ev refcount so we don't quit while waiting for a subprocess */
13021|  2.02k|    janet_ev_inc_refcount();
13022|  2.02k|}
janet_ev_default_threaded_callback:
13025|     33|void janet_ev_default_threaded_callback(JanetEVGenericMessage return_value) {
13026|     33|    if (return_value.fiber == NULL) {
  ------------------
  |  Branch (13026:9): [True: 0, False: 33]
  ------------------
13027|       |        /* Clean up */
13028|      0|        switch (return_value.tag) {
13029|      0|            default:
  ------------------
  |  Branch (13029:13): [True: 0, False: 0]
  ------------------
13030|      0|                break;
13031|      0|            case JANET_EV_TCTAG_STRINGF:
  ------------------
  |  | 1581|      0|#define JANET_EV_TCTAG_STRINGF 3      /* resume with janet_cstringv((const char *) argp), then call free on argp. */
  ------------------
  |  Branch (13031:13): [True: 0, False: 0]
  ------------------
13032|      0|            case JANET_EV_TCTAG_ERR_STRINGF:
  ------------------
  |  | 1584|      0|#define JANET_EV_TCTAG_ERR_STRINGF 6  /* cancel with janet_cstringv((const char *) argp), then call free on argp. */
  ------------------
  |  Branch (13032:13): [True: 0, False: 0]
  ------------------
13033|      0|                janet_free(return_value.argp);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
13034|      0|                break;
13035|      0|        }
13036|      0|        return;
13037|      0|    }
13038|     33|    if (janet_fiber_can_resume(return_value.fiber)) {
  ------------------
  |  Branch (13038:9): [True: 33, False: 0]
  ------------------
13039|     33|        switch (return_value.tag) {
13040|      0|            default:
  ------------------
  |  Branch (13040:13): [True: 0, False: 33]
  ------------------
13041|      0|                break;
13042|     33|            case JANET_EV_TCTAG_NIL:
  ------------------
  |  | 1578|     33|#define JANET_EV_TCTAG_NIL 0          /* resume with nil */
  ------------------
  |  Branch (13042:13): [True: 33, False: 0]
  ------------------
13043|     33|                janet_schedule(return_value.fiber, janet_wrap_nil());
  ------------------
  |  |  831|     33|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     33|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     33|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     33|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13044|     33|                break;
13045|      0|            case JANET_EV_TCTAG_INTEGER:
  ------------------
  |  | 1579|      0|#define JANET_EV_TCTAG_INTEGER 1      /* resume with janet_wrap_integer(argi) */
  ------------------
  |  Branch (13045:13): [True: 0, False: 33]
  ------------------
13046|      0|                janet_schedule(return_value.fiber, janet_wrap_integer(return_value.argi));
  ------------------
  |  |  967|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
13047|      0|                break;
13048|      0|            case JANET_EV_TCTAG_STRING:
  ------------------
  |  | 1580|      0|#define JANET_EV_TCTAG_STRING 2       /* resume with janet_cstringv((const char *) argp) */
  ------------------
  |  Branch (13048:13): [True: 0, False: 33]
  ------------------
13049|      0|            case JANET_EV_TCTAG_STRINGF:
  ------------------
  |  | 1581|      0|#define JANET_EV_TCTAG_STRINGF 3      /* resume with janet_cstringv((const char *) argp), then call free on argp. */
  ------------------
  |  Branch (13049:13): [True: 0, False: 33]
  ------------------
13050|      0|                janet_schedule(return_value.fiber, janet_cstringv((const char *) return_value.argp));
  ------------------
  |  | 1826|      0|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13051|      0|                break;
13052|      0|            case JANET_EV_TCTAG_KEYWORD:
  ------------------
  |  | 1582|      0|#define JANET_EV_TCTAG_KEYWORD 4      /* resume with janet_ckeywordv((const char *) argp) */
  ------------------
  |  Branch (13052:13): [True: 0, False: 33]
  ------------------
13053|      0|                janet_schedule(return_value.fiber, janet_ckeywordv((const char *) return_value.argp));
  ------------------
  |  | 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13054|      0|                break;
13055|      0|            case JANET_EV_TCTAG_ERR_STRING:
  ------------------
  |  | 1583|      0|#define JANET_EV_TCTAG_ERR_STRING 5   /* cancel with janet_cstringv((const char *) argp) */
  ------------------
  |  Branch (13055:13): [True: 0, False: 33]
  ------------------
13056|      0|            case JANET_EV_TCTAG_ERR_STRINGF:
  ------------------
  |  | 1584|      0|#define JANET_EV_TCTAG_ERR_STRINGF 6  /* cancel with janet_cstringv((const char *) argp), then call free on argp. */
  ------------------
  |  Branch (13056:13): [True: 0, False: 33]
  ------------------
13057|      0|                janet_cancel(return_value.fiber, janet_cstringv((const char *) return_value.argp));
  ------------------
  |  | 1826|      0|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13058|      0|                break;
13059|      0|            case JANET_EV_TCTAG_ERR_KEYWORD:
  ------------------
  |  | 1585|      0|#define JANET_EV_TCTAG_ERR_KEYWORD 7  /* cancel with janet_ckeywordv((const char *) argp) */
  ------------------
  |  Branch (13059:13): [True: 0, False: 33]
  ------------------
13060|      0|                janet_cancel(return_value.fiber, janet_ckeywordv((const char *) return_value.argp));
  ------------------
  |  | 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13061|      0|                break;
13062|      0|            case JANET_EV_TCTAG_BOOLEAN:
  ------------------
  |  | 1586|      0|#define JANET_EV_TCTAG_BOOLEAN 8      /* resume with janet_wrap_boolean(argi) */
  ------------------
  |  Branch (13062:13): [True: 0, False: 33]
  ------------------
13063|      0|                janet_schedule(return_value.fiber, janet_wrap_boolean(return_value.argi));
  ------------------
  |  |  834|      0|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13064|      0|                break;
13065|     33|        }
13066|     33|    }
13067|       |    /* Clean up */
13068|     33|    switch (return_value.tag) {
13069|     33|        default:
  ------------------
  |  Branch (13069:9): [True: 33, False: 0]
  ------------------
13070|     33|            break;
13071|     33|        case JANET_EV_TCTAG_STRINGF:
  ------------------
  |  | 1581|      0|#define JANET_EV_TCTAG_STRINGF 3      /* resume with janet_cstringv((const char *) argp), then call free on argp. */
  ------------------
  |  Branch (13071:9): [True: 0, False: 33]
  ------------------
13072|      0|        case JANET_EV_TCTAG_ERR_STRINGF:
  ------------------
  |  | 1584|      0|#define JANET_EV_TCTAG_ERR_STRINGF 6  /* cancel with janet_cstringv((const char *) argp), then call free on argp. */
  ------------------
  |  Branch (13072:9): [True: 0, False: 33]
  ------------------
13073|      0|            janet_free(return_value.argp);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
13074|      0|            break;
13075|     33|    }
13076|     33|    janet_gcunroot(janet_wrap_fiber(return_value.fiber));
  ------------------
  |  |  844|     33|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|     33|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     33|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     33|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13077|     33|}
janet_ev_threaded_await:
13081|  2.02k|void janet_ev_threaded_await(JanetThreadedSubroutine fp, int tag, int argi, void *argp) {
13082|  2.02k|    JanetEVGenericMessage arguments;
13083|  2.02k|    memset(&arguments, 0, sizeof(arguments));
13084|  2.02k|    arguments.tag = tag;
13085|  2.02k|    arguments.argi = argi;
13086|  2.02k|    arguments.argp = argp;
13087|  2.02k|    arguments.fiber = janet_root_fiber();
13088|  2.02k|    janet_gcroot(janet_wrap_fiber(arguments.fiber));
  ------------------
  |  |  844|  2.02k|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|  2.02k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.02k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.02k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13089|  2.02k|    janet_ev_threaded_call(fp, arguments, janet_ev_default_threaded_callback);
13090|  2.02k|    janet_await();
13091|  2.02k|}
janet_ev_lasterr:
13141|     38|Janet janet_ev_lasterr(void) {
13142|     38|    return janet_cstringv(janet_strerror(errno));
  ------------------
  |  | 1826|     38|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  848|     38|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|     38|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     38|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     38|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13143|     38|}
janet_make_pipe:
13644|  10.3k|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|  10.3k|    if (pipe(handles)) return -1;
  ------------------
  |  Branch (13704:9): [True: 0, False: 10.3k]
  ------------------
13705|  10.3k|    if (mode != 2 && fcntl(handles[0], F_SETFD, FD_CLOEXEC)) goto error;
  ------------------
  |  Branch (13705:9): [True: 10.3k, False: 18.4E]
  |  Branch (13705:22): [True: 0, False: 10.3k]
  ------------------
13706|  10.3k|    if (mode != 1 && fcntl(handles[1], F_SETFD, FD_CLOEXEC)) goto error;
  ------------------
  |  Branch (13706:9): [True: 0, False: 10.3k]
  |  Branch (13706:22): [True: 0, False: 0]
  ------------------
13707|  10.3k|    if (mode != 2 && mode != 3 && fcntl(handles[0], F_SETFL, O_NONBLOCK)) goto error;
  ------------------
  |  Branch (13707:9): [True: 10.3k, False: 18.4E]
  |  Branch (13707:22): [True: 10.3k, False: 0]
  |  Branch (13707:35): [True: 0, False: 10.3k]
  ------------------
13708|  10.3k|    if (mode != 1 && mode != 3 && fcntl(handles[1], F_SETFL, O_NONBLOCK)) goto error;
  ------------------
  |  Branch (13708:9): [True: 0, False: 10.3k]
  |  Branch (13708:22): [True: 0, False: 0]
  |  Branch (13708:35): [True: 0, False: 0]
  ------------------
13709|  10.3k|    return 0;
13710|      0|error:
13711|      0|    close(handles[0]);
13712|      0|    close(handles[1]);
13713|      0|    return -1;
13714|  10.3k|#endif
13715|  10.3k|}
cfun_ev_go:
13728|  3.27k|              "current supervisor.") {
13729|  3.27k|    janet_arity(argc, 1, 3);
13730|  3.27k|    Janet value = argc >= 2 ? argv[1] : janet_wrap_nil();
  ------------------
  |  |  831|     11|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     11|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     11|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     11|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (13730:19): [True: 3.26k, False: 11]
  ------------------
13731|  3.27k|    void *supervisor = janet_optabstract(argv, argc, 2, &janet_channel_type, janet_vm.root_fiber->supervisor_channel);
13732|  3.27k|    JanetFiber *fiber;
13733|  3.27k|    if (janet_checktype(argv[0], JANET_FUNCTION)) {
  ------------------
  |  |  806|  3.27k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 3.25k, False: 13]
  |  |  |  Branch (806:6): [Folded, False: 3.27k]
  |  |  ------------------
  |  |  807|  3.27k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  3.27k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  3.27k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  3.27k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.27k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.27k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13734|       |        /* Create a fiber for the user */
13735|  3.25k|        JanetFunction *func = janet_unwrap_function(argv[0]);
  ------------------
  |  |  868|  3.25k|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
13736|  3.25k|        if (func->def->min_arity > 1) {
  ------------------
  |  Branch (13736:13): [True: 0, False: 3.25k]
  ------------------
13737|      0|            janet_panicf("task function must accept 0 or 1 arguments");
13738|      0|        }
13739|  3.25k|        fiber = janet_fiber(func, 64, func->def->min_arity, &value);
13740|  3.25k|        janet_assert(fiber != NULL, "bad fiber-func");
  ------------------
  |  |  389|  3.25k|#define janet_assert(c, m) do { \
  |  |  390|  3.25k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 3.25k]
  |  |  ------------------
  |  |  391|  3.25k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 3.25k]
  |  |  ------------------
  ------------------
13741|  3.25k|        fiber->flags |=
13742|  3.25k|            JANET_FIBER_MASK_ERROR |
  ------------------
  |  |  789|  3.25k|#define JANET_FIBER_MASK_ERROR 2
  ------------------
13743|  3.25k|            JANET_FIBER_MASK_USER0 |
  ------------------
  |  |  793|  3.25k|#define JANET_FIBER_MASK_USER0 (16 << 0)
  ------------------
13744|  3.25k|            JANET_FIBER_MASK_USER1 |
  ------------------
  |  |  794|  3.25k|#define JANET_FIBER_MASK_USER1 (16 << 1)
  ------------------
13745|  3.25k|            JANET_FIBER_MASK_USER2 |
  ------------------
  |  |  795|  3.25k|#define JANET_FIBER_MASK_USER2 (16 << 2)
  ------------------
13746|  3.25k|            JANET_FIBER_MASK_USER3 |
  ------------------
  |  |  796|  3.25k|#define JANET_FIBER_MASK_USER3 (16 << 3)
  ------------------
13747|  3.25k|            JANET_FIBER_MASK_USER4;
  ------------------
  |  |  797|  3.25k|#define JANET_FIBER_MASK_USER4 (16 << 4)
  ------------------
13748|  3.25k|        if (!janet_vm.fiber->env) {
  ------------------
  |  Branch (13748:13): [True: 0, False: 3.25k]
  ------------------
13749|      0|            janet_vm.fiber->env = janet_table(0);
13750|      0|        }
13751|  3.25k|        fiber->env = janet_table(0);
13752|  3.25k|        fiber->env->proto = janet_vm.fiber->env;
13753|  3.25k|    } else {
13754|     13|        fiber = janet_getfiber(argv, 0);
13755|     13|        if (janet_fiber_status(fiber) != JANET_STATUS_NEW) {
  ------------------
  |  Branch (13755:13): [True: 0, False: 13]
  ------------------
13756|      0|            janet_panic("can only schedule new fibers where (= (fiber/status f) :new)");
13757|      0|        }
13758|     13|    }
13759|  3.27k|    fiber->supervisor_channel = supervisor;
13760|  3.27k|    janet_schedule(fiber, value);
13761|  3.27k|    return janet_wrap_fiber(fiber);
  ------------------
  |  |  844|  3.27k|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|  3.27k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.27k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.27k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13762|  3.27k|}
cfun_ev_thread:
13893|  2.05k|              "* `:c` - don't copy cfunction registry to new thread (performance optimization)") {
13894|  2.05k|    janet_sandbox_assert(JANET_SANDBOX_THREADS);
  ------------------
  |  | 2043|  2.05k|#define JANET_SANDBOX_THREADS 131072
  ------------------
13895|  2.05k|    janet_arity(argc, 1, 4);
13896|  2.05k|    Janet value = argc >= 2 ? argv[1] : janet_wrap_nil();
  ------------------
  |  |  831|  1.58k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.58k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.58k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.58k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (13896:19): [True: 470, False: 1.58k]
  ------------------
13897|  2.05k|    if (janet_checktype(argv[0], JANET_FUNCTION)) {
  ------------------
  |  |  806|  2.05k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 659, False: 1.39k]
  |  |  |  Branch (806:6): [Folded, False: 2.05k]
  |  |  ------------------
  |  |  807|  2.05k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.05k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.05k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.05k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.05k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.05k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13898|    659|        JanetFunction *func = janet_getfunction(argv, 0);
13899|    659|        if (func->def->arity < 0 || func->def->min_arity > 1) {
  ------------------
  |  Branch (13899:13): [True: 0, False: 659]
  |  Branch (13899:37): [True: 0, False: 659]
  ------------------
13900|      0|            janet_panic("function must take 0 or 1 arguments");
13901|      0|        }
13902|  1.39k|    } else {
13903|  1.39k|        janet_getfiber(argv, 0); /* arg check for fiber */
13904|  1.39k|    }
13905|  2.05k|    uint64_t flags = 0;
13906|  2.05k|    if (argc >= 3) {
  ------------------
  |  Branch (13906:9): [True: 24, False: 2.02k]
  ------------------
13907|     24|        flags = janet_getflags(argv, 2, "nact");
13908|     24|    }
13909|  2.05k|    void *supervisor = janet_optabstract(argv, argc, 3, &janet_channel_type, janet_vm.root_fiber->supervisor_channel);
13910|  2.05k|    if (NULL != supervisor) flags |= JANET_THREAD_SUPERVISOR_FLAG;
  ------------------
  |  |13764|      0|#define JANET_THREAD_SUPERVISOR_FLAG 0x100
  ------------------
  |  Branch (13910:9): [True: 0, False: 2.05k]
  ------------------
13911|       |
13912|       |    /* Marshal arguments for the new thread. */
13913|  2.05k|    JanetBuffer *buffer = janet_malloc(sizeof(JanetBuffer));
  ------------------
  |  | 2406|  2.05k|#define janet_malloc(X) malloc((X))
  ------------------
13914|  2.05k|    if (NULL == buffer) {
  ------------------
  |  Branch (13914:9): [True: 0, False: 2.05k]
  ------------------
13915|      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]
  |  |  ------------------
  ------------------
13916|      0|    }
13917|  2.05k|    janet_buffer_init(buffer, 0);
13918|  2.05k|    if (!(flags & 0x2)) {
  ------------------
  |  Branch (13918:9): [True: 2.02k, False: 33]
  ------------------
13919|  2.02k|        janet_marshal(buffer, janet_wrap_table(janet_vm.abstract_registry), NULL, JANET_MARSHAL_UNSAFE);
  ------------------
  |  |  846|  2.02k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|  2.02k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.02k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.02k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      janet_marshal(buffer, janet_wrap_table(janet_vm.abstract_registry), NULL, JANET_MARSHAL_UNSAFE);
  ------------------
  |  | 1911|  2.02k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
13920|  2.02k|    }
13921|  2.05k|    if (flags & JANET_THREAD_SUPERVISOR_FLAG) {
  ------------------
  |  |13764|  2.05k|#define JANET_THREAD_SUPERVISOR_FLAG 0x100
  ------------------
  |  Branch (13921:9): [True: 0, False: 2.05k]
  ------------------
13922|      0|        janet_marshal(buffer, janet_wrap_abstract(supervisor), NULL, JANET_MARSHAL_UNSAFE);
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      janet_marshal(buffer, janet_wrap_abstract(supervisor), NULL, JANET_MARSHAL_UNSAFE);
  ------------------
  |  | 1911|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
13923|      0|    }
13924|  2.05k|    if (!(flags & 0x4)) {
  ------------------
  |  Branch (13924:9): [True: 2.01k, False: 41]
  ------------------
13925|  2.01k|        janet_assert(janet_vm.registry_count <= INT32_MAX, "assert failed size check");
  ------------------
  |  |  389|  2.01k|#define janet_assert(c, m) do { \
  |  |  390|  2.01k|    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: 2.01k]
  |  |  ------------------
  |  |  391|  2.01k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 2.01k]
  |  |  ------------------
  ------------------
13926|  2.01k|        uint32_t temp = (uint32_t) janet_vm.registry_count;
13927|  2.01k|        janet_buffer_push_bytes(buffer, (uint8_t *) &temp, sizeof(temp));
13928|  2.01k|        janet_buffer_push_bytes(buffer, (uint8_t *) janet_vm.registry, (int32_t) janet_vm.registry_count * sizeof(JanetCFunRegistry));
13929|  2.01k|    }
13930|  2.05k|    janet_marshal(buffer, argv[0], NULL, JANET_MARSHAL_UNSAFE);
  ------------------
  |  | 1911|  2.05k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
13931|  2.05k|    janet_marshal(buffer, value, NULL, JANET_MARSHAL_UNSAFE);
  ------------------
  |  | 1911|  2.05k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
13932|  2.05k|    if (flags & 0x1) {
  ------------------
  |  Branch (13932:9): [True: 0, False: 2.05k]
  ------------------
13933|       |        /* Return immediately */
13934|      0|        JanetEVGenericMessage arguments;
13935|      0|        memset(&arguments, 0, sizeof(arguments));
13936|      0|        arguments.tag = (uint32_t) flags;
13937|      0|        arguments.argi = (uint32_t) janet_vm.sandbox_flags;
13938|      0|        arguments.argp = buffer;
13939|      0|        arguments.fiber = NULL;
13940|      0|        janet_ev_threaded_call(janet_go_thread_subr, arguments, janet_ev_default_threaded_callback);
13941|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13942|  2.05k|    } else {
13943|  2.05k|        janet_ev_threaded_await(janet_go_thread_subr, (uint32_t) flags, (uint32_t) janet_vm.sandbox_flags, buffer);
13944|  2.05k|    }
13945|  2.05k|}
cfun_ev_give_supervisor:
13951|      4|              "By convention, tag should be a keyword indicating the type of message. Returns nil.") {
13952|      4|    janet_arity(argc, 1, -1);
13953|      4|    void *chanv = janet_vm.root_fiber->supervisor_channel;
13954|      4|    if (NULL != chanv) {
  ------------------
  |  Branch (13954:9): [True: 0, False: 4]
  ------------------
13955|      0|        JanetChannel *chan = janet_channel_unwrap(chanv);
13956|      0|        if (janet_channel_push(chan, janet_wrap_tuple(janet_tuple_n(argv, argc)), 0)) {
  ------------------
  |  |  843|      0|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (13956:13): [True: 0, False: 0]
  ------------------
13957|      0|            janet_await();
13958|      0|        }
13959|      0|    }
13960|      4|    return janet_wrap_nil();
  ------------------
  |  |  831|      4|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      4|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      4|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13961|      4|}
janet_sleep_await:
13963|  2.04k|JANET_NO_RETURN void janet_sleep_await(double sec) {
13964|  2.04k|    JanetTimeout to;
13965|  2.04k|    to.when = ts_delta(ts_now(), sec);
13966|  2.04k|    to.fiber = janet_vm.root_fiber;
13967|  2.04k|    to.is_error = 0;
13968|  2.04k|    to.sched_id = to.fiber->sched_id;
13969|       |    to.curr_fiber = NULL;
13970|  2.04k|    to.has_worker = 0;
13971|  2.04k|    add_timeout(to);
13972|  2.04k|    janet_await();
13973|  2.04k|}
cfun_ev_sleep:
13977|  2.06k|              "Suspend the current fiber for sec seconds without blocking the event loop.") {
13978|  2.06k|    janet_fixarity(argc, 1);
13979|  2.06k|    double sec = janet_getnumber(argv, 0);
13980|  2.06k|    janet_sleep_await(sec);
13981|  2.06k|}
cfun_ev_deadline:
13991|  1.02M|              "background thread to try to interrupt the VM if the timeout expires.") {
13992|  1.02M|    janet_arity(argc, 1, 4);
13993|  1.02M|    double sec = janet_getnumber(argv, 0);
13994|  1.02M|    sec = (sec < 0) ? 0 : sec;
  ------------------
  |  Branch (13994:11): [True: 691k, False: 332k]
  ------------------
13995|  1.02M|    JanetFiber *tocancel = janet_optfiber(argv, argc, 1, janet_vm.root_fiber);
13996|  1.02M|    JanetFiber *tocheck = janet_optfiber(argv, argc, 2, janet_vm.fiber);
13997|  1.02M|    int use_interrupt = janet_optboolean(argv, argc, 3, 0);
13998|  1.02M|    JanetTimeout to;
13999|  1.02M|    to.when = ts_delta(ts_now(), sec);
14000|  1.02M|    to.fiber = tocancel;
14001|  1.02M|    to.curr_fiber = tocheck;
14002|  1.02M|    to.is_error = 0;
14003|  1.02M|    to.sched_id = to.fiber->sched_id;
14004|  1.02M|    if (use_interrupt) {
  ------------------
  |  Branch (14004:9): [True: 0, False: 1.02M]
  ------------------
14005|       |#ifdef JANET_ANDROID
14006|       |        janet_sandbox_assert(JANET_SANDBOX_SIGNAL);
14007|       |#endif
14008|      0|        JanetThreadedTimeout *tto = janet_malloc(sizeof(JanetThreadedTimeout));
  ------------------
  |  | 2406|      0|#define janet_malloc(X) malloc((X))
  ------------------
14009|      0|        if (NULL == tto) {
  ------------------
  |  Branch (14009:13): [True: 0, False: 0]
  ------------------
14010|      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]
  |  |  ------------------
  ------------------
14011|      0|        }
14012|      0|        tto->sec = sec;
14013|      0|        tto->vm = &janet_vm;
14014|      0|        tto->fiber = tocheck;
14015|       |#ifdef JANET_WINDOWS
14016|       |        HANDLE cancel_event = CreateEvent(NULL, TRUE, FALSE, NULL);
14017|       |        if (NULL == cancel_event) {
14018|       |            janet_free(tto);
14019|       |            janet_panic("failed to create cancel event");
14020|       |        }
14021|       |        tto->cancel_event = cancel_event;
14022|       |        HANDLE worker = CreateThread(NULL, 0, janet_timeout_body, tto, CREATE_SUSPENDED, NULL);
14023|       |        if (NULL == worker) {
14024|       |            janet_free(tto);
14025|       |            janet_panic("failed to create thread");
14026|       |        }
14027|       |#else
14028|      0|        pthread_t worker;
14029|      0|        int err = pthread_create(&worker, NULL, janet_timeout_body, tto);
14030|      0|        if (err) {
  ------------------
  |  Branch (14030:13): [True: 0, False: 0]
  ------------------
14031|      0|            janet_free(tto);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
14032|      0|            janet_panicf("%s", janet_strerror(err));
14033|      0|        }
14034|      0|#endif
14035|      0|        to.has_worker = 1;
14036|      0|        to.worker = worker;
14037|       |#ifdef JANET_WINDOWS
14038|       |        to.worker_event = cancel_event;
14039|       |        ResumeThread(worker);
14040|       |#endif
14041|  1.02M|    } else {
14042|  1.02M|        to.has_worker = 0;
14043|  1.02M|    }
14044|  1.02M|    add_timeout(to);
14045|  1.02M|    return janet_wrap_fiber(tocancel);
  ------------------
  |  |  844|  1.02M|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|  1.02M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.02M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.02M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14046|  1.02M|}
cfun_ev_cancel:
14052|    289|              "fiber immediately.") {
14053|    289|    janet_fixarity(argc, 2);
14054|    289|    JanetFiber *fiber = janet_getfiber(argv, 0);
14055|    289|    Janet err = argv[1];
14056|    289|    janet_cancel(fiber, err);
14057|    289|    return argv[0];
14058|    289|}
janet_cfun_stream_close:
14062|      3|              "Close a stream. This should be the same as calling (:close stream) for all streams.") {
14063|      3|    janet_fixarity(argc, 1);
14064|      3|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
14065|      3|    janet_stream_close(stream);
14066|      3|    return argv[0];
14067|      3|}
janet_cfun_stream_read:
14077|      3|              "an error if there were problems with the IO operation.") {
14078|      3|    janet_arity(argc, 2, 4);
14079|      3|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
14080|      3|    janet_stream_flags(stream, JANET_STREAM_READABLE);
  ------------------
  |  |  625|      3|#define JANET_STREAM_READABLE 0x200
  ------------------
14081|      3|    JanetBuffer *buffer = janet_optbuffer(argv, argc, 2, 10);
14082|      3|    double to = janet_optnumber(argv, argc, 3, INFINITY);
14083|      3|    if (janet_keyeq(argv[1], "all")) {
  ------------------
  |  Branch (14083:9): [True: 0, False: 3]
  ------------------
14084|      0|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (14084:13): [True: 0, False: 0]
  ------------------
14085|      0|        janet_ev_readchunk(stream, buffer, INT32_MAX);
14086|      3|    } else {
14087|      3|        int32_t n = janet_getnat(argv, 1);
14088|      3|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (14088:13): [True: 0, False: 3]
  ------------------
14089|      3|        janet_ev_read(stream, buffer, n);
14090|      3|    }
14091|      3|}
janet_cfun_stream_chunk:
14097|      4|              "returns early with the collected bytes.") {
14098|      4|    janet_arity(argc, 2, 4);
14099|      4|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
14100|      4|    janet_stream_flags(stream, JANET_STREAM_READABLE);
  ------------------
  |  |  625|      4|#define JANET_STREAM_READABLE 0x200
  ------------------
14101|      4|    int32_t n = janet_getnat(argv, 1);
14102|      4|    JanetBuffer *buffer = janet_optbuffer(argv, argc, 2, 10);
14103|      4|    double to = janet_optnumber(argv, argc, 3, INFINITY);
14104|      4|    if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (14104:9): [True: 0, False: 4]
  ------------------
14105|      4|    janet_ev_readchunk(stream, buffer, n);
14106|      4|}
janet_cfun_mutex:
14141|     37|              "Create a new lock to coordinate threads.") {
14142|     37|    janet_fixarity(argc, 0);
14143|     37|    (void) argv;
14144|     37|    void *mutex = janet_abstract_threaded(&janet_mutex_type, janet_os_mutex_size());
14145|     37|    janet_os_mutex_init(mutex);
14146|     37|    return janet_wrap_abstract(mutex);
  ------------------
  |  |  851|     37|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|     37|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     37|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     37|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14147|     37|}
janet_cfun_mutex_release:
14162|      2|              "Release a lock such that other threads may acquire it.") {
14163|      2|    janet_fixarity(argc, 1);
14164|      2|    void *mutex = janet_getabstract(argv, 0, &janet_mutex_type);
14165|      2|    janet_os_mutex_unlock(mutex);
14166|      2|    return argv[0];
14167|      2|}
janet_cfun_rwlock:
14183|    316|              "Create a new read-write lock to coordinate threads.") {
14184|    316|    janet_fixarity(argc, 0);
14185|    316|    (void) argv;
14186|    316|    void *rwlock = janet_abstract_threaded(&janet_rwlock_type, janet_os_rwlock_size());
14187|    316|    janet_os_rwlock_init(rwlock);
14188|    316|    return janet_wrap_abstract(rwlock);
  ------------------
  |  |  851|    316|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|    316|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    316|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    316|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14189|    316|}
janet_cfun_rwlock_read_lock:
14193|      1|              "Acquire a read lock an a read-write lock.") {
14194|      1|    janet_fixarity(argc, 1);
14195|      1|    void *rwlock = janet_getabstract(argv, 0, &janet_rwlock_type);
14196|      1|    janet_os_rwlock_rlock(rwlock);
14197|      1|    return argv[0];
14198|      1|}
janet_cfun_rwlock_write_lock:
14202|      3|              "Acquire a write lock on a read-write lock.") {
14203|      3|    janet_fixarity(argc, 1);
14204|      3|    void *rwlock = janet_getabstract(argv, 0, &janet_rwlock_type);
14205|      3|    janet_os_rwlock_wlock(rwlock);
14206|      3|    return argv[0];
14207|      3|}
janet_cfun_rwlock_read_release:
14211|      1|              "Release a read lock on a read-write lock") {
14212|      1|    janet_fixarity(argc, 1);
14213|      1|    void *rwlock = janet_getabstract(argv, 0, &janet_rwlock_type);
14214|      1|    janet_os_rwlock_runlock(rwlock);
14215|      1|    return argv[0];
14216|      1|}
janet_cfun_rwlock_write_release:
14220|      2|              "Release a write lock on a read-write lock") {
14221|      2|    janet_fixarity(argc, 1);
14222|      2|    void *rwlock = janet_getabstract(argv, 0, &janet_rwlock_type);
14223|      2|    janet_os_rwlock_wunlock(rwlock);
14224|      2|    return argv[0];
14225|      2|}
janet_cfun_to_file:
14278|      1|              "when blocking IO behavior is needed.") {
14279|      1|    janet_fixarity(argc, 1);
14280|      1|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
14281|      1|    JanetFile *iof = get_file_for_stream(stream);
14282|      1|    if (iof == NULL) janet_panic("cannot make file from stream");
  ------------------
  |  Branch (14282:9): [True: 0, False: 1]
  ------------------
14283|      1|    return janet_wrap_abstract(iof);
  ------------------
  |  |  851|      1|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|      1|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14284|      1|}
janet_lib_ev:
14300|  8.33k|void janet_lib_ev(JanetTable *env) {
14301|  8.33k|    JanetRegExt ev_cfuns_ext[] = {
14302|  8.33k|        JANET_CORE_REG("ev/give", cfun_channel_push),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14303|  8.33k|        JANET_CORE_REG("ev/take", cfun_channel_pop),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14304|  8.33k|        JANET_CORE_REG("ev/full", cfun_channel_full),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14305|  8.33k|        JANET_CORE_REG("ev/capacity", cfun_channel_capacity),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14306|  8.33k|        JANET_CORE_REG("ev/count", cfun_channel_count),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14307|  8.33k|        JANET_CORE_REG("ev/select", cfun_channel_choice),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14308|  8.33k|        JANET_CORE_REG("ev/rselect", cfun_channel_rchoice),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14309|  8.33k|        JANET_CORE_REG("ev/chan", cfun_channel_new),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14310|  8.33k|        JANET_CORE_REG("ev/thread-chan", cfun_channel_new_threaded),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14311|  8.33k|        JANET_CORE_REG("ev/chan-close", cfun_channel_close),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14312|  8.33k|        JANET_CORE_REG("ev/go", cfun_ev_go),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14313|  8.33k|        JANET_CORE_REG("ev/thread", cfun_ev_thread),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14314|  8.33k|        JANET_CORE_REG("ev/give-supervisor", cfun_ev_give_supervisor),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14315|  8.33k|        JANET_CORE_REG("ev/sleep", cfun_ev_sleep),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14316|  8.33k|        JANET_CORE_REG("ev/deadline", cfun_ev_deadline),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14317|  8.33k|        JANET_CORE_REG("ev/cancel", cfun_ev_cancel),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14318|  8.33k|        JANET_CORE_REG("ev/close", janet_cfun_stream_close),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14319|  8.33k|        JANET_CORE_REG("ev/read", janet_cfun_stream_read),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14320|  8.33k|        JANET_CORE_REG("ev/chunk", janet_cfun_stream_chunk),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14321|  8.33k|        JANET_CORE_REG("ev/write", janet_cfun_stream_write),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14322|  8.33k|        JANET_CORE_REG("ev/lock", janet_cfun_mutex),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14323|  8.33k|        JANET_CORE_REG("ev/acquire-lock", janet_cfun_mutex_acquire),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14324|  8.33k|        JANET_CORE_REG("ev/release-lock", janet_cfun_mutex_release),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14325|  8.33k|        JANET_CORE_REG("ev/rwlock", janet_cfun_rwlock),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14326|  8.33k|        JANET_CORE_REG("ev/acquire-rlock", janet_cfun_rwlock_read_lock),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14327|  8.33k|        JANET_CORE_REG("ev/acquire-wlock", janet_cfun_rwlock_write_lock),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14328|  8.33k|        JANET_CORE_REG("ev/release-rlock", janet_cfun_rwlock_read_release),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14329|  8.33k|        JANET_CORE_REG("ev/release-wlock", janet_cfun_rwlock_write_release),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14330|  8.33k|        JANET_CORE_REG("ev/to-file", janet_cfun_to_file),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14331|  8.33k|        JANET_CORE_REG("ev/all-tasks", janet_cfun_ev_all_tasks),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14332|  8.33k|        JANET_REG_END
  ------------------
  |  | 2110|  8.33k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
14333|  8.33k|    };
14334|       |
14335|       |    janet_core_cfuns_ext(env, NULL, ev_cfuns_ext);
14336|  8.33k|    janet_register_abstract_type(&janet_stream_type);
14337|  8.33k|    janet_register_abstract_type(&janet_channel_type);
14338|  8.33k|    janet_register_abstract_type(&janet_mutex_type);
14339|  8.33k|    janet_register_abstract_type(&janet_rwlock_type);
14340|  8.33k|}
struct_mark:
14558|      4|int struct_mark(void *p, size_t s) {
14559|      4|    (void) s;
14560|      4|    JanetFFIStruct *st = p;
14561|      7|    for (uint32_t i = 0; i < st->field_count; i++) {
  ------------------
  |  Branch (14561:26): [True: 3, False: 4]
  ------------------
14562|      3|        JanetFFIType t = st->fields[i].type;
14563|      3|        if (t.prim == JANET_FFI_TYPE_STRUCT) {
  ------------------
  |  Branch (14563:13): [True: 0, False: 3]
  ------------------
14564|      0|            janet_mark(janet_wrap_abstract(t.st));
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14565|      0|        }
14566|      3|    }
14567|      4|    return 0;
14568|      4|}
cfun_ffi_struct:
14822|  3.80k|              "used to pass structs into native functions.") {
14823|  3.80k|    janet_arity(argc, 1, -1);
14824|  3.80k|    return janet_wrap_abstract(build_struct_type(argc, argv));
  ------------------
  |  |  851|  3.80k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  3.80k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.80k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.80k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14825|  3.80k|}
cfun_ffi_align:
14837|      1|              "Get the align of an FFI type `ffi-type` in bytes.") {
14838|      1|    janet_fixarity(argc, 1);
14839|      1|    size_t size = type_align(decode_ffi_type(argv[0]));
14840|      1|    return janet_wrap_number((double) size);
  ------------------
  |  |  835|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
14841|      1|}
cfun_ffi_jitfn:
15978|   347k|              "of `bytes` is architecture specific machine code that will be copied into executable memory.") {
15979|   347k|    janet_sandbox_assert(JANET_SANDBOX_FFI_JIT);
  ------------------
  |  | 2035|   347k|#define JANET_SANDBOX_FFI_JIT 4096
  ------------------
15980|   347k|    janet_fixarity(argc, 1);
15981|   347k|    JanetByteView bytes = janet_getbytes(argv, 0);
15982|       |
15983|       |    /* Quick hack to align to page boundary, we should query OS. FIXME */
15984|   347k|    size_t alloc_size = ((size_t) bytes.len + FFI_PAGE_MASK) & ~FFI_PAGE_MASK;
  ------------------
  |  |15973|   347k|#define FFI_PAGE_MASK 0xFFF
  ------------------
                  size_t alloc_size = ((size_t) bytes.len + FFI_PAGE_MASK) & ~FFI_PAGE_MASK;
  ------------------
  |  |15973|   347k|#define FFI_PAGE_MASK 0xFFF
  ------------------
15985|       |
15986|   347k|#ifdef JANET_FFI_JIT
15987|   347k|#ifdef JANET_EV
15988|   347k|    JanetFFIJittedFn *fn = janet_abstract_threaded(&janet_type_ffijit, sizeof(JanetFFIJittedFn));
15989|       |#else
15990|       |    JanetFFIJittedFn *fn = janet_abstract(&janet_type_ffijit, sizeof(JanetFFIJittedFn));
15991|       |#endif
15992|   347k|    fn->function_pointer = NULL;
15993|   347k|    fn->size = 0;
15994|       |#ifdef JANET_WINDOWS
15995|       |    void *ptr = VirtualAlloc(NULL, alloc_size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
15996|       |    if (!ptr) {
15997|       |        janet_panic("failed to allocate writable memory");
15998|       |    }
15999|       |#else
16000|   347k|#ifdef MAP_ANONYMOUS
16001|   347k|    void *ptr = mmap(0, alloc_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
16002|       |#elif defined(MAP_ANON)
16003|       |    /* macos doesn't have MAP_ANONYMOUS */
16004|       |    void *ptr = mmap(0, alloc_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
16005|       |#else
16006|       |    /* -std=c99 gets in the way */
16007|       |    /* #define MAP_ANONYMOUS 0x20 should work, though. */
16008|       |    void *ptr = mmap(0, alloc_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, -1, 0);
16009|       |#endif
16010|   347k|    if (ptr == MAP_FAILED) {
  ------------------
  |  Branch (16010:9): [True: 0, False: 347k]
  ------------------
16011|      0|        janet_panic("failed to memory map writable memory");
16012|      0|    }
16013|   347k|#endif
16014|   347k|    memcpy(ptr, bytes.bytes, bytes.len);
16015|       |#ifdef JANET_WINDOWS
16016|       |    DWORD old = 0;
16017|       |    if (!VirtualProtect(ptr, alloc_size, PAGE_EXECUTE_READ, &old)) {
16018|       |        janet_panic("failed to make mapped memory executable");
16019|       |    }
16020|       |#else
16021|   347k|    if (mprotect(ptr, alloc_size, PROT_READ | PROT_EXEC) == -1) {
  ------------------
  |  Branch (16021:9): [True: 0, False: 347k]
  ------------------
16022|      0|        janet_panic("failed to make mapped memory executable");
16023|      0|    }
16024|   347k|#endif
16025|   347k|    fn->size = alloc_size;
16026|   347k|    fn->function_pointer = ptr;
16027|   347k|    return janet_wrap_abstract(fn);
  ------------------
  |  |  851|   347k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|   347k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   347k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   347k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16028|       |#else
16029|       |    janet_panic("ffi/jitfn not available on this platform");
16030|       |#endif
16031|   347k|}
cfun_ffi_call:
16037|      7|              "to native machine types.") {
16038|      7|    janet_sandbox_assert(JANET_SANDBOX_FFI_USE);
  ------------------
  |  | 2034|      7|#define JANET_SANDBOX_FFI_USE 2048
  ------------------
16039|      7|    janet_arity(argc, 2, -1);
16040|      7|    void *function_pointer = janet_ffi_get_callable_pointer(argv, 0);
16041|      7|    JanetFFISignature *signature = janet_getabstract(argv, 1, &janet_signature_type);
16042|      7|    janet_fixarity(argc - 2, signature->arg_count);
16043|      7|    switch (signature->cc) {
16044|      0|        default:
  ------------------
  |  Branch (16044:9): [True: 0, False: 7]
  ------------------
16045|      0|        case JANET_FFI_CC_NONE:
  ------------------
  |  Branch (16045:9): [True: 0, False: 7]
  ------------------
16046|      0|            (void) function_pointer;
16047|      0|            janet_panic("calling convention not supported");
16048|       |#ifdef JANET_FFI_WIN64_ENABLED
16049|       |        case JANET_FFI_CC_WIN_64:
16050|       |            return janet_ffi_win64(signature, function_pointer, argv);
16051|       |#endif
16052|      0|#ifdef JANET_FFI_SYSV64_ENABLED
16053|      0|        case JANET_FFI_CC_SYSV_64:
  ------------------
  |  Branch (16053:9): [True: 0, False: 7]
  ------------------
16054|      0|            return janet_ffi_sysv64(signature, function_pointer, argv);
16055|      7|#endif
16056|       |#ifdef JANET_FFI_AAPCS64_ENABLED
16057|       |        case JANET_FFI_CC_AAPCS64:
16058|       |            return janet_ffi_aapcs64(signature, function_pointer, argv);
16059|       |#endif
16060|      7|    }
16061|      7|}
cfun_ffi_buffer_write:
16069|      1|              "or a new buffer if not supplied.") {
16070|      1|    janet_sandbox_assert(JANET_SANDBOX_FFI_USE);
  ------------------
  |  | 2034|      1|#define JANET_SANDBOX_FFI_USE 2048
  ------------------
16071|      1|    janet_arity(argc, 2, 4);
16072|      1|    JanetFFIType type = decode_ffi_type(argv[0]);
16073|      1|    uint32_t el_size = (uint32_t) type_size(type);
16074|      1|    JanetBuffer *buffer = janet_optbuffer(argv, argc, 2, el_size);
16075|      1|    int32_t index = janet_optnat(argv, argc, 3, buffer->count);
16076|      1|    int32_t old_count = buffer->count;
16077|      1|    if (index > old_count) janet_panic("index out of bounds");
  ------------------
  |  Branch (16077:9): [True: 0, False: 1]
  ------------------
16078|      1|    buffer->count = index;
16079|      1|    janet_buffer_extra(buffer, el_size);
16080|      1|    buffer->count = old_count;
16081|      1|    memset(buffer->data + index, 0, el_size);
16082|      1|    janet_ffi_write_one(buffer->data + index, argv, 1, type, JANET_FFI_MAX_RECUR);
  ------------------
  |  |14395|      1|#define JANET_FFI_MAX_RECUR 64
  ------------------
16083|      1|    index += el_size;
16084|      1|    if (buffer->count < index) buffer->count = index;
  ------------------
  |  Branch (16084:9): [True: 0, False: 1]
  ------------------
16085|      1|    return janet_wrap_buffer(buffer);
  ------------------
  |  |  847|      1|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|      1|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16086|      1|}
cfun_ffi_buffer_read:
16092|      1|              "this is unsafe.") {
16093|      1|    janet_sandbox_assert(JANET_SANDBOX_FFI_USE);
  ------------------
  |  | 2034|      1|#define JANET_SANDBOX_FFI_USE 2048
  ------------------
16094|      1|    janet_arity(argc, 2, 3);
16095|      1|    JanetFFIType type = decode_ffi_type(argv[0]);
16096|      1|    size_t offset = (size_t) janet_optnat(argv, argc, 2, 0);
16097|      1|    if (janet_checktype(argv[1], JANET_POINTER)) {
  ------------------
  |  |  806|      1|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 1]
  |  |  |  Branch (806:6): [Folded, False: 1]
  |  |  ------------------
  |  |  807|      1|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      1|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      1|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      1|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16098|      0|        uint8_t *ptr = janet_unwrap_pointer(argv[1]);
  ------------------
  |  |  867|      0|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
16099|      0|        return janet_ffi_read_one(ptr + offset, type, JANET_FFI_MAX_RECUR);
  ------------------
  |  |14395|      0|#define JANET_FFI_MAX_RECUR 64
  ------------------
16100|      1|    } else {
16101|      1|        size_t el_size = type_size(type);
16102|      1|        JanetByteView bytes = janet_getbytes(argv, 1);
16103|      1|        if ((size_t) bytes.len < offset + el_size) janet_panic("read out of range");
  ------------------
  |  Branch (16103:13): [True: 0, False: 1]
  ------------------
16104|      1|        return janet_ffi_read_one(bytes.bytes + offset, type, JANET_FFI_MAX_RECUR);
  ------------------
  |  |14395|      1|#define JANET_FFI_MAX_RECUR 64
  ------------------
16105|      1|    }
16106|      1|}
cfun_ffi_get_callback_trampoline:
16118|      3|              "`ffi/read`.") {
16119|      3|    janet_arity(argc, 0, 1);
16120|      3|    JanetFFICallingConvention cc = JANET_FFI_CC_DEFAULT;
  ------------------
  |  |14521|      3|#define JANET_FFI_CC_DEFAULT JANET_FFI_CC_SYSV_64
  ------------------
16121|      3|    if (argc >= 1) cc = decode_ffi_cc(janet_getkeyword(argv, 0));
  ------------------
  |  Branch (16121:9): [True: 0, False: 3]
  ------------------
16122|      3|    switch (cc) {
16123|      0|        default:
  ------------------
  |  Branch (16123:9): [True: 0, False: 3]
  ------------------
16124|      0|        case JANET_FFI_CC_NONE:
  ------------------
  |  Branch (16124:9): [True: 0, False: 3]
  ------------------
16125|      0|            janet_panic("calling convention not supported");
16126|       |#ifdef JANET_FFI_WIN64_ENABLED
16127|       |        case JANET_FFI_CC_WIN_64:
16128|       |            return janet_wrap_pointer(janet_ffi_win64_standard_callback);
16129|       |#endif
16130|      0|#ifdef JANET_FFI_SYSV64_ENABLED
16131|      2|        case JANET_FFI_CC_SYSV_64:
  ------------------
  |  Branch (16131:9): [True: 2, False: 1]
  ------------------
16132|      2|            return janet_wrap_pointer(janet_ffi_sysv64_standard_callback);
  ------------------
  |  |  854|      2|#define janet_wrap_pointer(s) janet_nanbox_wrap_((s), JANET_POINTER)
  |  |  ------------------
  |  |  |  |  825|      2|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16133|      3|#endif
16134|       |#ifdef JANET_FFI_AAPCS64_ENABLED
16135|       |        case JANET_FFI_CC_AAPCS64:
16136|       |            return janet_wrap_pointer(janet_ffi_aapcs64_standard_callback);
16137|       |#endif
16138|      3|    }
16139|      3|}
janet_core_raw_native:
16146|  31.6k|              "Returns a `core/native`.") {
16147|  31.6k|    janet_sandbox_assert(JANET_SANDBOX_FFI_DEFINE);
  ------------------
  |  | 2027|  31.6k|#define JANET_SANDBOX_FFI_DEFINE 16
  ------------------
16148|  31.6k|    janet_arity(argc, 0, 1);
16149|  31.6k|    const char *path = janet_optcstring(argv, argc, 0, NULL);
16150|  31.6k|    Clib lib = load_clib(path);
  ------------------
  |  |  544|  31.6k|#define load_clib(name) dlopen((name), RTLD_NOW)
  ------------------
16151|  31.6k|    if (!lib) janet_panic(error_clib());
  ------------------
  |  |  547|      0|#define error_clib dlerror
  ------------------
  |  Branch (16151:9): [True: 0, False: 31.6k]
  ------------------
16152|  31.6k|    JanetAbstractNative *anative = janet_abstract(&janet_native_type, sizeof(JanetAbstractNative));
16153|  31.6k|    anative->clib = lib;
16154|  31.6k|    anative->closed = 0;
16155|  31.6k|    anative->is_self = path == NULL;
16156|  31.6k|    return janet_wrap_abstract(anative);
  ------------------
  |  |  851|  31.6k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  31.6k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  31.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  31.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16157|  31.6k|}
janet_core_native_lookup:
16163|      2|              "the symbol is found, else nil.") {
16164|      2|    janet_sandbox_assert(JANET_SANDBOX_FFI_DEFINE);
  ------------------
  |  | 2027|      2|#define JANET_SANDBOX_FFI_DEFINE 16
  ------------------
16165|      2|    janet_fixarity(argc, 2);
16166|      2|    JanetAbstractNative *anative = janet_getabstract(argv, 0, &janet_native_type);
16167|      2|    const char *sym = janet_getcstring(argv, 1);
16168|      2|    if (anative->closed) janet_panic("native object already closed");
  ------------------
  |  Branch (16168:9): [True: 0, False: 2]
  ------------------
16169|      2|    void *value = symbol_clib(anative->clib, sym);
  ------------------
  |  |  546|      2|#define symbol_clib(lib, sym) dlsym((lib), (sym))
  ------------------
16170|      2|    if (NULL == value) 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 (16170:9): [True: 0, False: 2]
  ------------------
16171|      2|    return janet_wrap_pointer(value);
  ------------------
  |  |  854|      2|#define janet_wrap_pointer(s) janet_nanbox_wrap_((s), JANET_POINTER)
  |  |  ------------------
  |  |  |  |  825|      2|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16172|      2|}
cfun_ffi_malloc:
16190|    437|              "Allocates memory directly using the janet memory allocator. Memory allocated in this way must be freed manually! Returns a raw pointer, or nil if size = 0.") {
16191|    437|    janet_sandbox_assert(JANET_SANDBOX_FFI_USE);
  ------------------
  |  | 2034|    437|#define JANET_SANDBOX_FFI_USE 2048
  ------------------
16192|    437|    janet_fixarity(argc, 1);
16193|    437|    size_t size = janet_getsize(argv, 0);
16194|    437|    if (size == 0) return janet_wrap_nil();
  ------------------
  |  |  831|     56|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     56|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     56|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     56|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (16194:9): [True: 56, False: 381]
  ------------------
16195|    381|    return janet_wrap_pointer(janet_malloc(size));
  ------------------
  |  |  854|    381|#define janet_wrap_pointer(s) janet_nanbox_wrap_((s), JANET_POINTER)
  |  |  ------------------
  |  |  |  |  825|    381|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    381|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    381|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16196|    437|}
cfun_ffi_free:
16201|      1|              "`ffi/malloc`. Returns nil.") {
16202|      1|    janet_sandbox_assert(JANET_SANDBOX_FFI_USE);
  ------------------
  |  | 2034|      1|#define JANET_SANDBOX_FFI_USE 2048
  ------------------
16203|      1|    janet_fixarity(argc, 1);
16204|      1|    if (janet_checktype(argv[0], JANET_NIL)) return janet_wrap_nil();
  ------------------
  |  |  806|      1|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 1]
  |  |  |  Branch (806:6): [Folded, False: 1]
  |  |  ------------------
  |  |  807|      1|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      1|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      1|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      1|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (janet_checktype(argv[0], JANET_NIL)) 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16205|      1|    void *pointer = janet_getpointer(argv, 0);
16206|      1|    janet_free(pointer);
  ------------------
  |  | 2415|      1|#define janet_free(X) free((X))
  ------------------
16207|      1|    return janet_wrap_nil();
  ------------------
  |  |  831|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16208|      1|}
cfun_ffi_pointer_buffer:
16219|      7|              "new buffer.") {
16220|      7|    janet_sandbox_assert(JANET_SANDBOX_FFI_USE);
  ------------------
  |  | 2034|      7|#define JANET_SANDBOX_FFI_USE 2048
  ------------------
16221|      7|    janet_arity(argc, 2, 4);
16222|      7|    void *pointer = janet_getpointer(argv, 0);
16223|      7|    int32_t capacity = janet_getnat(argv, 1);
16224|      7|    int32_t count = janet_optnat(argv, argc, 2, 0);
16225|      7|    int64_t offset = janet_optinteger64(argv, argc, 3, 0);
16226|      7|    uint8_t *offset_pointer = ((uint8_t *) pointer) + offset;
16227|      7|    return janet_wrap_buffer(janet_pointer_buffer_unsafe(offset_pointer, capacity, count));
  ------------------
  |  |  847|      7|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|      7|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      7|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      7|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16228|      7|}
cfun_ffi_pointer_cfunction:
16234|      4|              "traces and debugging.") {
16235|      4|    janet_sandbox_assert(JANET_SANDBOX_FFI_USE);
  ------------------
  |  | 2034|      4|#define JANET_SANDBOX_FFI_USE 2048
  ------------------
16236|      4|    janet_arity(argc, 1, 4);
16237|      4|    void *pointer = janet_getpointer(argv, 0);
16238|      4|    const char *name = janet_optcstring(argv, argc, 1, NULL);
16239|      4|    const char *source = janet_optcstring(argv, argc, 2, NULL);
16240|      4|    int32_t line = janet_optinteger(argv, argc, 3, -1);
16241|      4|    if ((name != NULL) || (source != NULL) || (line != -1)) {
  ------------------
  |  Branch (16241:9): [True: 4, False: 0]
  |  Branch (16241:27): [True: 0, False: 0]
  |  Branch (16241:47): [True: 0, False: 0]
  ------------------
16242|      0|        janet_registry_put((JanetCFunction) pointer, name, NULL, source, line);
16243|      0|    }
16244|      4|    return janet_wrap_cfunction((JanetCFunction) pointer);
  ------------------
  |  |  853|      4|#define janet_wrap_cfunction(s) janet_nanbox_wrap_((s), JANET_CFUNCTION)
  |  |  ------------------
  |  |  |  |  825|      4|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      4|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16245|      4|}
cfun_ffi_supported_calling_conventions:
16256|     11|              "is a placeholder that cannot be used at runtime.") {
16257|     11|    janet_fixarity(argc, 0);
16258|     11|    (void) argv;
16259|     11|    JanetArray *array = janet_array(4);
16260|       |#ifdef JANET_FFI_WIN64_ENABLED
16261|       |    janet_array_push(array, janet_ckeywordv("win64"));
16262|       |#endif
16263|     11|#ifdef JANET_FFI_SYSV64_ENABLED
16264|     11|    janet_array_push(array, janet_ckeywordv("sysv64"));
  ------------------
  |  | 1843|     11|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|     11|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|     11|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     11|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     11|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16265|     11|#endif
16266|       |#ifdef JANET_FFI_AAPCS64_ENABLED
16267|       |    janet_array_push(array, janet_ckeywordv("aapcs64"));
16268|       |#endif
16269|     11|    janet_array_push(array, janet_ckeywordv("none"));
  ------------------
  |  | 1843|     11|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|     11|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|     11|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     11|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     11|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16270|     11|    return janet_wrap_array(array);
  ------------------
  |  |  845|     11|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|     11|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     11|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     11|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16271|     11|}
janet_lib_ffi:
16273|  8.33k|void janet_lib_ffi(JanetTable *env) {
16274|  8.33k|    JanetRegExt ffi_cfuns[] = {
16275|  8.33k|        JANET_CORE_REG("ffi/native", janet_core_raw_native),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16276|  8.33k|        JANET_CORE_REG("ffi/lookup", janet_core_native_lookup),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16277|  8.33k|        JANET_CORE_REG("ffi/close", janet_core_native_close),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16278|  8.33k|        JANET_CORE_REG("ffi/signature", cfun_ffi_signature),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16279|  8.33k|        JANET_CORE_REG("ffi/call", cfun_ffi_call),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16280|  8.33k|        JANET_CORE_REG("ffi/struct", cfun_ffi_struct),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16281|  8.33k|        JANET_CORE_REG("ffi/write", cfun_ffi_buffer_write),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16282|  8.33k|        JANET_CORE_REG("ffi/read", cfun_ffi_buffer_read),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16283|  8.33k|        JANET_CORE_REG("ffi/size", cfun_ffi_size),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16284|  8.33k|        JANET_CORE_REG("ffi/align", cfun_ffi_align),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16285|  8.33k|        JANET_CORE_REG("ffi/trampoline", cfun_ffi_get_callback_trampoline),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16286|  8.33k|        JANET_CORE_REG("ffi/jitfn", cfun_ffi_jitfn),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16287|  8.33k|        JANET_CORE_REG("ffi/malloc", cfun_ffi_malloc),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16288|  8.33k|        JANET_CORE_REG("ffi/free", cfun_ffi_free),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16289|  8.33k|        JANET_CORE_REG("ffi/pointer-buffer", cfun_ffi_pointer_buffer),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16290|  8.33k|        JANET_CORE_REG("ffi/pointer-cfunction", cfun_ffi_pointer_cfunction),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16291|  8.33k|        JANET_CORE_REG("ffi/calling-conventions", cfun_ffi_supported_calling_conventions),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16292|  8.33k|        JANET_REG_END
  ------------------
  |  | 2110|  8.33k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
16293|  8.33k|    };
16294|       |    janet_core_cfuns_ext(env, NULL, ffi_cfuns);
16295|  8.33k|}
janet_fiber_reset:
16370|  2.01M|JanetFiber *janet_fiber_reset(JanetFiber *fiber, JanetFunction *callee, int32_t argc, const Janet *argv) {
16371|  2.01M|    int32_t newstacktop;
16372|  2.01M|    fiber_reset(fiber);
16373|  2.01M|    if (argc) {
  ------------------
  |  Branch (16373:9): [True: 265k, False: 1.75M]
  ------------------
16374|   265k|        newstacktop = fiber->stacktop + argc;
16375|   265k|        if (newstacktop >= fiber->capacity) {
  ------------------
  |  Branch (16375:13): [True: 1.01k, False: 264k]
  ------------------
16376|  1.01k|            janet_fiber_setcapacity(fiber, 2 * newstacktop);
16377|  1.01k|        }
16378|   265k|        if (argv) {
  ------------------
  |  Branch (16378:13): [True: 263k, False: 1.81k]
  ------------------
16379|   263k|            memcpy(fiber->data + fiber->stacktop, argv, argc * sizeof(Janet));
16380|   263k|        } else {
16381|       |            /* If argv not given, fill with nil */
16382|  3.63k|            for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (16382:33): [True: 1.81k, False: 1.81k]
  ------------------
16383|  1.81k|                fiber->data[fiber->stacktop + i] = janet_wrap_nil();
  ------------------
  |  |  831|  1.81k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.81k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.81k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.81k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16384|  1.81k|            }
16385|  1.81k|        }
16386|   265k|        fiber->stacktop = newstacktop;
16387|   265k|    }
16388|       |    /* Don't panic on failure since we use this to implement janet_pcall */
16389|  2.01M|    if (janet_fiber_funcframe(fiber, callee)) return NULL;
  ------------------
  |  Branch (16389:9): [True: 15, False: 2.01M]
  ------------------
16390|  2.01M|    janet_fiber_frame(fiber)->flags |= JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  |  832|  2.01M|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  831|  2.01M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  2.01M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_fiber_frame(fiber)->flags |= JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  | 1013|  2.01M|#define JANET_STACKFRAME_ENTRANCE 2
  ------------------
16391|  2.01M|#ifdef JANET_EV
16392|       |    fiber->supervisor_channel = NULL;
16393|  2.01M|#endif
16394|  2.01M|    return fiber;
16395|  2.01M|}
janet_fiber:
16398|  2.01M|JanetFiber *janet_fiber(JanetFunction *callee, int32_t capacity, int32_t argc, const Janet *argv) {
16399|  2.01M|    return janet_fiber_reset(fiber_alloc(capacity), callee, argc, argv);
16400|  2.01M|}
janet_fiber_setcapacity:
16419|   550k|void janet_fiber_setcapacity(JanetFiber *fiber, int32_t n) {
16420|   550k|    int32_t old_size = fiber->capacity;
16421|   550k|    int32_t diff = n - old_size;
16422|   550k|    Janet *newData = janet_realloc(fiber->data, sizeof(Janet) * n);
  ------------------
  |  | 2409|   550k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
16423|   550k|    if (NULL == newData) {
  ------------------
  |  Branch (16423:9): [True: 0, False: 550k]
  ------------------
16424|      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]
  |  |  ------------------
  ------------------
16425|      0|    }
16426|   550k|    fiber->data = newData;
16427|   550k|    fiber->capacity = n;
16428|   550k|    janet_vm.next_collection += sizeof(Janet) * diff;
16429|   550k|}
janet_fiber_push:
16438|   403M|void janet_fiber_push(JanetFiber *fiber, Janet x) {
16439|   403M|    if (fiber->stacktop == INT32_MAX) janet_panic("stack overflow");
  ------------------
  |  Branch (16439:9): [True: 0, False: 403M]
  ------------------
16440|   403M|    if (fiber->stacktop >= fiber->capacity) {
  ------------------
  |  Branch (16440:9): [True: 3.06k, False: 403M]
  ------------------
16441|  3.06k|        janet_fiber_grow(fiber, fiber->stacktop);
16442|  3.06k|    }
16443|   403M|    fiber->data[fiber->stacktop++] = x;
16444|   403M|}
janet_fiber_push2:
16447|   374M|void janet_fiber_push2(JanetFiber *fiber, Janet x, Janet y) {
16448|   374M|    if (fiber->stacktop >= INT32_MAX - 1) janet_panic("stack overflow");
  ------------------
  |  Branch (16448:9): [True: 0, False: 374M]
  ------------------
16449|   374M|    int32_t newtop = fiber->stacktop + 2;
16450|   374M|    if (newtop > fiber->capacity) {
  ------------------
  |  Branch (16450:9): [True: 40, False: 374M]
  ------------------
16451|     40|        janet_fiber_grow(fiber, newtop);
16452|     40|    }
16453|   374M|    fiber->data[fiber->stacktop] = x;
16454|   374M|    fiber->data[fiber->stacktop + 1] = y;
16455|   374M|    fiber->stacktop = newtop;
16456|   374M|}
janet_fiber_push3:
16459|   118M|void janet_fiber_push3(JanetFiber *fiber, Janet x, Janet y, Janet z) {
16460|   118M|    if (fiber->stacktop >= INT32_MAX - 2) janet_panic("stack overflow");
  ------------------
  |  Branch (16460:9): [True: 0, False: 118M]
  ------------------
16461|   118M|    int32_t newtop = fiber->stacktop + 3;
16462|   118M|    if (newtop > fiber->capacity) {
  ------------------
  |  Branch (16462:9): [True: 3.34k, False: 118M]
  ------------------
16463|  3.34k|        janet_fiber_grow(fiber, newtop);
16464|  3.34k|    }
16465|   118M|    fiber->data[fiber->stacktop] = x;
16466|   118M|    fiber->data[fiber->stacktop + 1] = y;
16467|   118M|    fiber->data[fiber->stacktop + 2] = z;
16468|   118M|    fiber->stacktop = newtop;
16469|   118M|}
janet_fiber_pushn:
16472|  19.8M|void janet_fiber_pushn(JanetFiber *fiber, const Janet *arr, int32_t n) {
16473|  19.8M|    if (fiber->stacktop > INT32_MAX - n) janet_panic("stack overflow");
  ------------------
  |  Branch (16473:9): [True: 0, False: 19.8M]
  ------------------
16474|  19.8M|    int32_t newtop = fiber->stacktop + n;
16475|  19.8M|    if (newtop > fiber->capacity) {
  ------------------
  |  Branch (16475:9): [True: 1.04k, False: 19.8M]
  ------------------
16476|  1.04k|        janet_fiber_grow(fiber, newtop);
16477|  1.04k|    }
16478|  19.8M|    safe_memcpy(fiber->data + fiber->stacktop, arr, n * sizeof(Janet));
16479|  19.8M|    fiber->stacktop = newtop;
16480|  19.8M|}
janet_fiber_funcframe:
16494|   202M|int janet_fiber_funcframe(JanetFiber *fiber, JanetFunction *func) {
16495|   202M|    JanetStackFrame *newframe;
16496|       |
16497|   202M|    int32_t i;
16498|   202M|    int32_t oldtop = fiber->stacktop;
16499|   202M|    int32_t oldframe = fiber->frame;
16500|   202M|    int32_t nextframe = fiber->stackstart;
16501|   202M|    int32_t nextstacktop = nextframe + func->def->slotcount + JANET_FRAME_SIZE;
  ------------------
  |  | 1026|   202M|#define JANET_FRAME_SIZE 4
  ------------------
16502|   202M|    int32_t next_arity = fiber->stacktop - fiber->stackstart;
16503|       |
16504|       |    /* Check strict arity before messing with state */
16505|   202M|    if (next_arity < func->def->min_arity) return 1;
  ------------------
  |  Branch (16505:9): [True: 5, False: 202M]
  ------------------
16506|   202M|    if (next_arity > func->def->max_arity) return 1;
  ------------------
  |  Branch (16506:9): [True: 26, False: 202M]
  ------------------
16507|       |
16508|   202M|    if (fiber->capacity < nextstacktop) {
  ------------------
  |  Branch (16508:9): [True: 540k, False: 201M]
  ------------------
16509|   540k|        janet_fiber_setcapacity(fiber, 2 * nextstacktop);
16510|       |#ifdef JANET_DEBUG
16511|       |    } else {
16512|       |        janet_fiber_refresh_memory(fiber);
16513|       |#endif
16514|   540k|    }
16515|       |
16516|       |    /* Nil unset stack arguments (Needed for gc correctness) */
16517|  2.33G|    for (i = fiber->stacktop; i < nextstacktop; ++i) {
  ------------------
  |  Branch (16517:31): [True: 2.13G, False: 202M]
  ------------------
16518|  2.13G|        fiber->data[i] = janet_wrap_nil();
  ------------------
  |  |  831|  2.13G|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  2.13G|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.13G|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.13G|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16519|  2.13G|    }
16520|       |
16521|       |    /* Set up the next frame */
16522|   202M|    fiber->frame = nextframe;
16523|   202M|    fiber->stacktop = fiber->stackstart = nextstacktop;
16524|   202M|    newframe = janet_fiber_frame(fiber);
  ------------------
  |  |  832|   202M|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  831|   202M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|   202M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16525|   202M|    newframe->prevframe = oldframe;
16526|   202M|    newframe->pc = func->def->bytecode;
16527|   202M|    newframe->func = func;
16528|   202M|    newframe->env = NULL;
16529|   202M|    newframe->flags = 0;
16530|       |
16531|       |    /* Check varargs */
16532|   202M|    if (func->def->flags & JANET_FUNCDEF_FLAG_VARARG) {
  ------------------
  |  | 1097|   202M|#define JANET_FUNCDEF_FLAG_VARARG 0x10000
  ------------------
  |  Branch (16532:9): [True: 11.6M, False: 190M]
  ------------------
16533|  11.6M|        int32_t tuplehead = fiber->frame + func->def->arity;
16534|  11.6M|        janet_assert(tuplehead > 0, "fiber stack overflow");
  ------------------
  |  |  389|  11.6M|#define janet_assert(c, m) do { \
  |  |  390|  11.6M|    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: 11.6M]
  |  |  ------------------
  |  |  391|  11.6M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 11.6M]
  |  |  ------------------
  ------------------
16535|  11.6M|        int st = func->def->flags & JANET_FUNCDEF_FLAG_STRUCTARG;
  ------------------
  |  | 1105|  11.6M|#define JANET_FUNCDEF_FLAG_STRUCTARG 0x1000000
  ------------------
16536|  11.6M|        if (tuplehead >= oldtop) {
  ------------------
  |  Branch (16536:13): [True: 10.4M, False: 1.17M]
  ------------------
16537|  10.4M|            fiber->data[tuplehead] = st
  ------------------
  |  Branch (16537:38): [True: 1.17k, False: 10.4M]
  ------------------
16538|  10.4M|                                     ? make_struct_n(NULL, 0)
16539|  10.4M|                                     : janet_wrap_tuple(janet_tuple_n(NULL, 0));
  ------------------
  |  |  843|  10.4M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  20.8M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  10.4M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  10.4M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16540|  10.4M|        } else {
16541|  1.17M|            fiber->data[tuplehead] = st
  ------------------
  |  Branch (16541:38): [True: 815k, False: 360k]
  ------------------
16542|  1.17M|                                     ? make_struct_n(
16543|   815k|                                         fiber->data + tuplehead,
16544|   815k|                                         oldtop - tuplehead)
16545|  1.17M|                                     : janet_wrap_tuple(janet_tuple_n(
  ------------------
  |  |  843|   360k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  1.53M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   360k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   360k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16546|  1.17M|                                             fiber->data + tuplehead,
16547|  1.17M|                                             oldtop - tuplehead));
16548|  1.17M|        }
16549|  11.6M|    }
16550|       |
16551|       |    /* Good return */
16552|   202M|    return 0;
16553|   202M|}
janet_env_valid:
16588|   566M|int janet_env_valid(JanetFuncEnv *env) {
16589|   566M|    if (env->offset < 0) {
  ------------------
  |  Branch (16589:9): [True: 0, False: 566M]
  ------------------
16590|      0|        int32_t real_offset = -(env->offset);
16591|      0|        JanetFiber *fiber = env->as.fiber;
16592|      0|        int32_t i = fiber->frame;
16593|      0|        while (i > 0) {
  ------------------
  |  Branch (16593:16): [True: 0, False: 0]
  ------------------
16594|      0|            JanetStackFrame *frame = (JanetStackFrame *)(fiber->data + i - JANET_FRAME_SIZE);
  ------------------
  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  ------------------
16595|      0|            if (real_offset == i &&
  ------------------
  |  Branch (16595:17): [True: 0, False: 0]
  ------------------
16596|      0|                    frame->env == env &&
  ------------------
  |  Branch (16596:21): [True: 0, False: 0]
  ------------------
16597|      0|                    frame->func &&
  ------------------
  |  Branch (16597:21): [True: 0, False: 0]
  ------------------
16598|      0|                    frame->func->def->slotcount == env->length) {
  ------------------
  |  Branch (16598:21): [True: 0, False: 0]
  ------------------
16599|      0|                env->offset = real_offset;
16600|      0|                return 1;
16601|      0|            }
16602|      0|            i = frame->prevframe;
16603|      0|        }
16604|       |        /* Invalid, set to empty off-stack variant. */
16605|      0|        env->offset = 0;
16606|      0|        env->length = 0;
16607|      0|        env->as.values = NULL;
16608|      0|        return 0;
16609|   566M|    } else {
16610|   566M|        return 1;
16611|   566M|    }
16612|   566M|}
janet_env_maybe_detach:
16615|  95.0k|void janet_env_maybe_detach(JanetFuncEnv *env) {
16616|       |    /* Check for detachable closure envs */
16617|  95.0k|    janet_env_valid(env);
16618|  95.0k|    if (env->offset > 0) {
  ------------------
  |  Branch (16618:9): [True: 13.9k, False: 81.1k]
  ------------------
16619|  13.9k|        JanetFiberStatus s = janet_fiber_status(env->as.fiber);
16620|  13.9k|        int isFinished = s == JANET_STATUS_DEAD ||
  ------------------
  |  Branch (16620:26): [True: 0, False: 13.9k]
  ------------------
16621|  13.9k|                         s == JANET_STATUS_ERROR ||
  ------------------
  |  Branch (16621:26): [True: 43, False: 13.8k]
  ------------------
16622|  13.8k|                         s == JANET_STATUS_USER0 ||
  ------------------
  |  Branch (16622:26): [True: 0, False: 13.8k]
  ------------------
16623|  13.8k|                         s == JANET_STATUS_USER1 ||
  ------------------
  |  Branch (16623:26): [True: 0, False: 13.8k]
  ------------------
16624|  13.8k|                         s == JANET_STATUS_USER2 ||
  ------------------
  |  Branch (16624:26): [True: 0, False: 13.8k]
  ------------------
16625|  13.8k|                         s == JANET_STATUS_USER3 ||
  ------------------
  |  Branch (16625:26): [True: 0, False: 13.8k]
  ------------------
16626|  13.8k|                         s == JANET_STATUS_USER4;
  ------------------
  |  Branch (16626:26): [True: 0, False: 13.8k]
  ------------------
16627|  13.9k|        if (isFinished) {
  ------------------
  |  Branch (16627:13): [True: 43, False: 13.8k]
  ------------------
16628|     43|            janet_env_detach(env);
16629|     43|        }
16630|  13.9k|    }
16631|  95.0k|}
janet_fiber_funcframe_tail:
16634|  3.26G|int janet_fiber_funcframe_tail(JanetFiber *fiber, JanetFunction *func) {
16635|  3.26G|    int32_t i;
16636|  3.26G|    int32_t nextframetop = fiber->frame + func->def->slotcount;
16637|  3.26G|    int32_t nextstacktop = nextframetop + JANET_FRAME_SIZE;
  ------------------
  |  | 1026|  3.26G|#define JANET_FRAME_SIZE 4
  ------------------
16638|  3.26G|    int32_t next_arity = fiber->stacktop - fiber->stackstart;
16639|  3.26G|    int32_t stacksize;
16640|       |
16641|       |    /* Check strict arity before messing with state */
16642|  3.26G|    if (next_arity < func->def->min_arity) return 1;
  ------------------
  |  Branch (16642:9): [True: 6, False: 3.26G]
  ------------------
16643|  3.26G|    if (next_arity > func->def->max_arity) return 1;
  ------------------
  |  Branch (16643:9): [True: 7, False: 3.26G]
  ------------------
16644|       |
16645|  3.26G|    if (fiber->capacity < nextstacktop) {
  ------------------
  |  Branch (16645:9): [True: 666, False: 3.26G]
  ------------------
16646|    666|        janet_fiber_setcapacity(fiber, 2 * nextstacktop);
16647|       |#ifdef JANET_DEBUG
16648|       |    } else {
16649|       |        janet_fiber_refresh_memory(fiber);
16650|       |#endif
16651|    666|    }
16652|       |
16653|       |    /* Detach old function */
16654|  3.26G|    if (NULL != janet_fiber_frame(fiber)->func)
  ------------------
  |  |  832|  3.26G|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  831|  3.26G|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  3.26G|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (16654:9): [True: 3.26G, False: 18.4E]
  ------------------
16655|  3.26G|        janet_env_detach(janet_fiber_frame(fiber)->env);
  ------------------
  |  |  832|  3.26G|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  831|  3.26G|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  3.26G|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16656|  3.26G|    janet_fiber_frame(fiber)->env = NULL;
  ------------------
  |  |  832|  3.26G|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  831|  3.26G|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  3.26G|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16657|       |
16658|       |    /* Check varargs */
16659|  3.26G|    if (func->def->flags & JANET_FUNCDEF_FLAG_VARARG) {
  ------------------
  |  | 1097|  3.26G|#define JANET_FUNCDEF_FLAG_VARARG 0x10000
  ------------------
  |  Branch (16659:9): [True: 825k, False: 3.26G]
  ------------------
16660|   825k|        int32_t tuplehead = fiber->stackstart + func->def->arity;
16661|   825k|        int st = func->def->flags & JANET_FUNCDEF_FLAG_STRUCTARG;
  ------------------
  |  | 1105|   825k|#define JANET_FUNCDEF_FLAG_STRUCTARG 0x1000000
  ------------------
16662|   825k|        if (tuplehead >= fiber->stacktop) {
  ------------------
  |  Branch (16662:13): [True: 2.95k, False: 822k]
  ------------------
16663|  2.95k|            if (tuplehead >= fiber->capacity) janet_fiber_setcapacity(fiber, 2 * (tuplehead + 1));
  ------------------
  |  Branch (16663:17): [True: 0, False: 2.95k]
  ------------------
16664|  2.95k|            for (i = fiber->stacktop; i < tuplehead; ++i) fiber->data[i] = 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 (16664:39): [True: 0, False: 2.95k]
  ------------------
16665|  2.95k|            fiber->data[tuplehead] = st
  ------------------
  |  Branch (16665:38): [True: 0, False: 2.95k]
  ------------------
16666|  2.95k|                                     ? make_struct_n(NULL, 0)
16667|  2.95k|                                     : janet_wrap_tuple(janet_tuple_n(NULL, 0));
  ------------------
  |  |  843|  2.95k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  5.90k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.95k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.95k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16668|   822k|        } else {
16669|   822k|            fiber->data[tuplehead] = st
  ------------------
  |  Branch (16669:38): [True: 816k, False: 6.25k]
  ------------------
16670|   822k|                                     ? make_struct_n(
16671|   816k|                                         fiber->data + tuplehead,
16672|   816k|                                         fiber->stacktop - tuplehead)
16673|   822k|                                     : janet_wrap_tuple(janet_tuple_n(
  ------------------
  |  |  843|  6.25k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|   829k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.25k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.25k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16674|   822k|                                             fiber->data + tuplehead,
16675|   822k|                                             fiber->stacktop - tuplehead));
16676|   822k|        }
16677|   825k|        stacksize = tuplehead - fiber->stackstart + 1;
16678|  3.26G|    } else {
16679|  3.26G|        stacksize = fiber->stacktop - fiber->stackstart;
16680|  3.26G|    }
16681|       |
16682|  3.26G|    if (stacksize) memmove(fiber->data + fiber->frame, fiber->data + fiber->stackstart, stacksize * sizeof(Janet));
  ------------------
  |  Branch (16682:9): [True: 43.0M, False: 3.22G]
  ------------------
16683|       |
16684|       |    /* Nil unset locals (Needed for functional correctness) */
16685|  10.4G|    for (i = fiber->frame + stacksize; i < nextframetop; ++i)
  ------------------
  |  Branch (16685:40): [True: 7.21G, False: 3.26G]
  ------------------
16686|  7.21G|        fiber->data[i] = janet_wrap_nil();
  ------------------
  |  |  831|  7.21G|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  10.4G|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.21G|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.21G|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16687|       |
16688|       |    /* Set stack stuff */
16689|  3.26G|    fiber->stacktop = fiber->stackstart = nextstacktop;
16690|       |
16691|       |    /* Set frame stuff */
16692|  3.26G|    janet_fiber_frame(fiber)->func = func;
  ------------------
  |  |  832|  3.26G|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  831|  3.26G|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  3.26G|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16693|  3.26G|    janet_fiber_frame(fiber)->pc = func->def->bytecode;
  ------------------
  |  |  832|  3.26G|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  831|  3.26G|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  3.26G|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16694|  3.26G|    janet_fiber_frame(fiber)->flags |= JANET_STACKFRAME_TAILCALL;
  ------------------
  |  |  832|  3.26G|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  831|  3.26G|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  3.26G|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_fiber_frame(fiber)->flags |= JANET_STACKFRAME_TAILCALL;
  ------------------
  |  | 1010|  3.26G|#define JANET_STACKFRAME_TAILCALL 1
  ------------------
16695|       |
16696|       |    /* Good return */
16697|  3.26G|    return 0;
16698|  3.26G|}
janet_fiber_cframe:
16701|   377M|void janet_fiber_cframe(JanetFiber *fiber, JanetCFunction cfun) {
16702|   377M|    JanetStackFrame *newframe;
16703|       |
16704|   377M|    int32_t oldframe = fiber->frame;
16705|   377M|    int32_t nextframe = fiber->stackstart;
16706|   377M|    int32_t nextstacktop = fiber->stacktop + JANET_FRAME_SIZE;
  ------------------
  |  | 1026|   377M|#define JANET_FRAME_SIZE 4
  ------------------
16707|       |
16708|   377M|    if (fiber->capacity < nextstacktop) {
  ------------------
  |  Branch (16708:9): [True: 725, False: 377M]
  ------------------
16709|    725|        janet_fiber_setcapacity(fiber, 2 * nextstacktop);
16710|       |#ifdef JANET_DEBUG
16711|       |    } else {
16712|       |        janet_fiber_refresh_memory(fiber);
16713|       |#endif
16714|    725|    }
16715|       |
16716|       |    /* Set the next frame */
16717|   377M|    fiber->frame = nextframe;
16718|   377M|    fiber->stacktop = fiber->stackstart = nextstacktop;
16719|   377M|    newframe = janet_fiber_frame(fiber);
  ------------------
  |  |  832|   377M|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  831|   377M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|   377M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16720|       |
16721|       |    /* Set up the new frame */
16722|   377M|    newframe->prevframe = oldframe;
16723|   377M|    newframe->pc = (uint32_t *) cfun;
16724|   377M|    newframe->func = NULL;
16725|       |    newframe->env = NULL;
16726|   377M|    newframe->flags = 0;
16727|   377M|}
janet_fiber_popframe:
16730|   579M|void janet_fiber_popframe(JanetFiber *fiber) {
16731|   579M|    JanetStackFrame *frame = janet_fiber_frame(fiber);
  ------------------
  |  |  832|   579M|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  831|   579M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|   579M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16732|   579M|    if (fiber->frame == 0) return;
  ------------------
  |  Branch (16732:9): [True: 0, False: 579M]
  ------------------
16733|       |
16734|       |    /* Clean up the frame (detach environments) */
16735|   579M|    if (NULL != frame->func)
  ------------------
  |  Branch (16735:9): [True: 201M, False: 377M]
  ------------------
16736|   201M|        janet_env_detach(frame->env);
16737|       |
16738|       |    /* Shrink stack */
16739|   579M|    fiber->stacktop = fiber->stackstart = fiber->frame;
16740|   579M|    fiber->frame = frame->prevframe;
16741|   579M|}
janet_fiber_status:
16743|  5.75M|JanetFiberStatus janet_fiber_status(JanetFiber *f) {
16744|  5.75M|    return ((f)->flags & JANET_FIBER_STATUS_MASK) >> JANET_FIBER_STATUS_OFFSET;
  ------------------
  |  |  807|  5.75M|#define JANET_FIBER_STATUS_MASK 0x3F0000
  ------------------
                  return ((f)->flags & JANET_FIBER_STATUS_MASK) >> JANET_FIBER_STATUS_OFFSET;
  ------------------
  |  |  809|  5.75M|#define JANET_FIBER_STATUS_OFFSET 16
  ------------------
16745|  5.75M|}
janet_root_fiber:
16751|  2.02k|JanetFiber *janet_root_fiber(void) {
16752|  2.02k|    return janet_vm.root_fiber;
16753|  2.02k|}
cfun_fiber_getenv:
16760|  8.61k|              "such table is set yet.") {
16761|  8.61k|    janet_fixarity(argc, 1);
16762|  8.61k|    JanetFiber *fiber = janet_getfiber(argv, 0);
16763|  8.61k|    return fiber->env ?
  ------------------
  |  Branch (16763:12): [True: 8.61k, False: 0]
  ------------------
16764|  8.61k|           janet_wrap_table(fiber->env) :
  ------------------
  |  |  846|  8.61k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|  8.61k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.61k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.61k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16765|  8.61k|           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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16766|  8.61k|}
cfun_fiber_new:
16807|  1.46M|              "* :p - the environment table's prototype is the current environment table") {
16808|  1.46M|    janet_arity(argc, 1, 3);
16809|  1.46M|    JanetFunction *func = janet_getfunction(argv, 0);
16810|  1.46M|    JanetFiber *fiber;
16811|  1.46M|    if (func->def->min_arity > 1) {
  ------------------
  |  Branch (16811:9): [True: 0, False: 1.46M]
  ------------------
16812|      0|        janet_panicf("fiber function must accept 0 or 1 arguments");
16813|      0|    }
16814|  1.46M|    fiber = janet_fiber(func, 64, func->def->min_arity, NULL);
16815|  1.46M|    janet_assert(fiber != NULL, "bad fiber arity check");
  ------------------
  |  |  389|  1.46M|#define janet_assert(c, m) do { \
  |  |  390|  1.46M|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 1.46M]
  |  |  ------------------
  |  |  391|  1.46M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 1.46M]
  |  |  ------------------
  ------------------
16816|  1.46M|    if (argc == 3 && !janet_checktype(argv[2], JANET_NIL)) {
  ------------------
  |  |  806|      3|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 3]
  |  |  ------------------
  |  |  807|      3|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      3|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      3|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      3|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (16816:9): [True: 3, False: 1.46M]
  |  Branch (16816:22): [True: 3, False: 0]
  ------------------
16817|      3|        fiber->env = janet_gettable(argv, 2);
16818|      3|    }
16819|  1.46M|    if (argc >= 2) {
  ------------------
  |  Branch (16819:9): [True: 1.40M, False: 61.7k]
  ------------------
16820|  1.40M|        int32_t i;
16821|  1.40M|        JanetByteView view = janet_getbytes(argv, 1);
16822|  1.40M|        fiber->flags = JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  812|  1.40M|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
                      fiber->flags = JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  813|  1.40M|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  ------------------
16823|  1.40M|        janet_fiber_set_status(fiber, JANET_STATUS_NEW);
  ------------------
  |  |  826|  1.40M|#define janet_fiber_set_status(f, s) do {\
  |  |  827|  1.40M|    (f)->flags &= ~JANET_FIBER_STATUS_MASK;\
  |  |  ------------------
  |  |  |  |  807|  1.40M|#define JANET_FIBER_STATUS_MASK 0x3F0000
  |  |  ------------------
  |  |  828|  1.40M|    (f)->flags |= (s) << JANET_FIBER_STATUS_OFFSET;\
  |  |  ------------------
  |  |  |  |  809|  1.40M|#define JANET_FIBER_STATUS_OFFSET 16
  |  |  ------------------
  |  |  829|  1.40M|} while (0)
  |  |  ------------------
  |  |  |  Branch (829:10): [Folded, False: 1.40M]
  |  |  ------------------
  ------------------
16824|  4.22M|        for (i = 0; i < view.len; i++) {
  ------------------
  |  Branch (16824:21): [True: 2.82M, False: 1.40M]
  ------------------
16825|  2.82M|            if (view.bytes[i] >= '0' && view.bytes[i] <= '9') {
  ------------------
  |  Branch (16825:17): [True: 2.82M, False: 6]
  |  Branch (16825:41): [True: 8.13k, False: 2.81M]
  ------------------
16826|  8.13k|                fiber->flags |= JANET_FIBER_MASK_USERN(view.bytes[i] - '0');
  ------------------
  |  |  804|  8.13k|#define JANET_FIBER_MASK_USERN(N) (16 << (N))
  ------------------
16827|  2.81M|            } else {
16828|  2.81M|                switch (view.bytes[i]) {
16829|     22|                    default:
  ------------------
  |  Branch (16829:21): [True: 22, False: 2.81M]
  ------------------
16830|     22|                        janet_panicf("invalid flag %c, expected a, t, d, e, u, y, w, r, i, or p", view.bytes[i]);
16831|      0|                        break;
16832|  3.71k|                    case 'a':
  ------------------
  |  Branch (16832:21): [True: 3.71k, False: 2.80M]
  ------------------
16833|  3.71k|                        fiber->flags |=
16834|  3.71k|                            JANET_FIBER_MASK_DEBUG |
  ------------------
  |  |  790|  3.71k|#define JANET_FIBER_MASK_DEBUG 4
  ------------------
16835|  3.71k|                            JANET_FIBER_MASK_ERROR |
  ------------------
  |  |  789|  3.71k|#define JANET_FIBER_MASK_ERROR 2
  ------------------
16836|  3.71k|                            JANET_FIBER_MASK_USER |
  ------------------
  |  |  805|  3.71k|#define JANET_FIBER_MASK_USER 0x3FF0
  ------------------
16837|  3.71k|                            JANET_FIBER_MASK_YIELD;
  ------------------
  |  |  791|  3.71k|#define JANET_FIBER_MASK_YIELD 8
  ------------------
16838|  3.71k|                        break;
16839|    756|                    case 't':
  ------------------
  |  Branch (16839:21): [True: 756, False: 2.81M]
  ------------------
16840|    756|                        fiber->flags |=
16841|    756|                            JANET_FIBER_MASK_ERROR |
  ------------------
  |  |  789|    756|#define JANET_FIBER_MASK_ERROR 2
  ------------------
16842|    756|                            JANET_FIBER_MASK_USER0 |
  ------------------
  |  |  793|    756|#define JANET_FIBER_MASK_USER0 (16 << 0)
  ------------------
16843|    756|                            JANET_FIBER_MASK_USER1 |
  ------------------
  |  |  794|    756|#define JANET_FIBER_MASK_USER1 (16 << 1)
  ------------------
16844|    756|                            JANET_FIBER_MASK_USER2 |
  ------------------
  |  |  795|    756|#define JANET_FIBER_MASK_USER2 (16 << 2)
  ------------------
16845|    756|                            JANET_FIBER_MASK_USER3 |
  ------------------
  |  |  796|    756|#define JANET_FIBER_MASK_USER3 (16 << 3)
  ------------------
16846|    756|                            JANET_FIBER_MASK_USER4;
  ------------------
  |  |  797|    756|#define JANET_FIBER_MASK_USER4 (16 << 4)
  ------------------
16847|    756|                        break;
16848|     85|                    case 'd':
  ------------------
  |  Branch (16848:21): [True: 85, False: 2.81M]
  ------------------
16849|     85|                        fiber->flags |= JANET_FIBER_MASK_DEBUG;
  ------------------
  |  |  790|     85|#define JANET_FIBER_MASK_DEBUG 4
  ------------------
16850|     85|                        break;
16851|   816k|                    case 'e':
  ------------------
  |  Branch (16851:21): [True: 816k, False: 1.99M]
  ------------------
16852|   816k|                        fiber->flags |= JANET_FIBER_MASK_ERROR;
  ------------------
  |  |  789|   816k|#define JANET_FIBER_MASK_ERROR 2
  ------------------
16853|   816k|                        break;
16854|     70|                    case 'u':
  ------------------
  |  Branch (16854:21): [True: 70, False: 2.81M]
  ------------------
16855|     70|                        fiber->flags |= JANET_FIBER_MASK_USER;
  ------------------
  |  |  805|     70|#define JANET_FIBER_MASK_USER 0x3FF0
  ------------------
16856|     70|                        break;
16857|   586k|                    case 'y':
  ------------------
  |  Branch (16857:21): [True: 586k, False: 2.22M]
  ------------------
16858|   586k|                        fiber->flags |= JANET_FIBER_MASK_YIELD;
  ------------------
  |  |  791|   586k|#define JANET_FIBER_MASK_YIELD 8
  ------------------
16859|   586k|                        break;
16860|    137|                    case 'w':
  ------------------
  |  Branch (16860:21): [True: 137, False: 2.81M]
  ------------------
16861|    137|                        fiber->flags |= JANET_FIBER_MASK_USER9;
  ------------------
  |  |  802|    137|#define JANET_FIBER_MASK_USER9 (16 << 9)
  ------------------
16862|    137|                        break;
16863|     31|                    case 'r':
  ------------------
  |  Branch (16863:21): [True: 31, False: 2.81M]
  ------------------
16864|     31|                        fiber->flags |= JANET_FIBER_MASK_USER8;
  ------------------
  |  |  801|     31|#define JANET_FIBER_MASK_USER8 (16 << 8)
  ------------------
16865|     31|                        break;
16866|  1.40M|                    case 'i':
  ------------------
  |  Branch (16866:21): [True: 1.40M, False: 1.40M]
  ------------------
16867|  1.40M|                        if (!janet_vm.fiber->env) {
  ------------------
  |  Branch (16867:29): [True: 18, False: 1.40M]
  ------------------
16868|     18|                            janet_vm.fiber->env = janet_table(0);
16869|     18|                        }
16870|  1.40M|                        fiber->env = janet_vm.fiber->env;
16871|  1.40M|                        break;
16872|    264|                    case 'p':
  ------------------
  |  Branch (16872:21): [True: 264, False: 2.81M]
  ------------------
16873|    264|                        if (!janet_vm.fiber->env) {
  ------------------
  |  Branch (16873:29): [True: 0, False: 264]
  ------------------
16874|      0|                            janet_vm.fiber->env = janet_table(0);
16875|      0|                        }
16876|    264|                        fiber->env = janet_table(0);
16877|    264|                        fiber->env->proto = janet_vm.fiber->env;
16878|    264|                        break;
16879|  2.81M|                }
16880|  2.81M|            }
16881|  2.82M|        }
16882|  1.40M|    }
16883|  1.46M|    return janet_wrap_fiber(fiber);
  ------------------
  |  |  844|  1.46M|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|  1.46M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.46M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.46M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16884|  1.46M|}
cfun_fiber_status:
16897|   817k|              "* :alive - the fiber is currently running and cannot be resumed") {
16898|   817k|    janet_fixarity(argc, 1);
16899|   817k|    JanetFiber *fiber = janet_getfiber(argv, 0);
16900|   817k|    uint32_t s = janet_fiber_status(fiber);
16901|   817k|    return janet_ckeywordv(janet_status_names[s]);
  ------------------
  |  | 1843|   817k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|   817k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|   817k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   817k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   817k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16902|   817k|}
cfun_fiber_current:
16906|  8.61k|              "Returns the currently running fiber.") {
16907|  8.61k|    (void) argv;
16908|  8.61k|    janet_fixarity(argc, 0);
16909|  8.61k|    return janet_wrap_fiber(janet_vm.fiber);
  ------------------
  |  |  844|  8.61k|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|  8.61k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.61k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.61k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16910|  8.61k|}
cfun_fiber_root:
16916|    132|              "is also a task fiber.") {
16917|    132|    (void) argv;
16918|    132|    janet_fixarity(argc, 0);
16919|    132|    return janet_wrap_fiber(janet_vm.root_fiber);
  ------------------
  |  |  844|    132|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|    132|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    132|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    132|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16920|    132|}
cfun_fiber_maxstack:
16926|      1|              "than this amount and will throw a stack-overflow error if more memory is needed. ") {
16927|      1|    janet_fixarity(argc, 1);
16928|      1|    JanetFiber *fiber = janet_getfiber(argv, 0);
16929|      1|    return janet_wrap_integer(fiber->maxstack);
  ------------------
  |  |  967|      1|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
16930|      1|}
cfun_fiber_setmaxstack:
16935|      2|              "maximum stack size is usually 8192.") {
16936|      2|    janet_fixarity(argc, 2);
16937|      2|    JanetFiber *fiber = janet_getfiber(argv, 0);
16938|      2|    int32_t maxs = janet_getinteger(argv, 1);
16939|      2|    if (maxs < 0) {
  ------------------
  |  Branch (16939:9): [True: 0, False: 2]
  ------------------
16940|      0|        janet_panic("expected positive integer");
16941|      0|    }
16942|      2|    fiber->maxstack = maxs;
16943|      2|    return argv[0];
16944|      2|}
janet_fiber_can_resume:
16946|  5.48k|int janet_fiber_can_resume(JanetFiber *fiber) {
16947|  5.48k|    JanetFiberStatus s = janet_fiber_status(fiber);
16948|  5.48k|    int isFinished = s == JANET_STATUS_DEAD ||
  ------------------
  |  Branch (16948:22): [True: 4.26k, False: 1.22k]
  ------------------
16949|  1.22k|                     s == JANET_STATUS_ERROR ||
  ------------------
  |  Branch (16949:22): [True: 238, False: 988]
  ------------------
16950|    988|                     s == JANET_STATUS_USER0 ||
  ------------------
  |  Branch (16950:22): [True: 0, False: 988]
  ------------------
16951|    988|                     s == JANET_STATUS_USER1 ||
  ------------------
  |  Branch (16951:22): [True: 0, False: 988]
  ------------------
16952|    988|                     s == JANET_STATUS_USER2 ||
  ------------------
  |  Branch (16952:22): [True: 0, False: 988]
  ------------------
16953|    988|                     s == JANET_STATUS_USER3 ||
  ------------------
  |  Branch (16953:22): [True: 0, False: 988]
  ------------------
16954|    988|                     s == JANET_STATUS_USER4;
  ------------------
  |  Branch (16954:22): [True: 0, False: 988]
  ------------------
16955|  5.48k|    return !isFinished;
16956|  5.48k|}
cfun_fiber_can_resume:
16960|      2|              "Check if a fiber `fib` is finished and cannot be resumed.") {
16961|      2|    janet_fixarity(argc, 1);
16962|      2|    JanetFiber *fiber = janet_getfiber(argv, 0);
16963|      2|    return janet_wrap_boolean(janet_fiber_can_resume(fiber));
  ------------------
  |  |  834|      2|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|      2|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16964|      2|}
cfun_fiber_last_value:
16968|    285|              "Get the last value returned or signaled from a fiber `fib`.") {
16969|    285|    janet_fixarity(argc, 1);
16970|    285|    JanetFiber *fiber = janet_getfiber(argv, 0);
16971|    285|    return fiber->last_value;
16972|    285|}
janet_lib_fiber:
16975|  8.33k|void janet_lib_fiber(JanetTable *env) {
16976|  8.33k|    JanetRegExt fiber_cfuns[] = {
16977|  8.33k|        JANET_CORE_REG("fiber/new", cfun_fiber_new),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16978|  8.33k|        JANET_CORE_REG("fiber/status", cfun_fiber_status),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16979|  8.33k|        JANET_CORE_REG("fiber/root", cfun_fiber_root),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16980|  8.33k|        JANET_CORE_REG("fiber/current", cfun_fiber_current),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16981|  8.33k|        JANET_CORE_REG("fiber/maxstack", cfun_fiber_maxstack),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16982|  8.33k|        JANET_CORE_REG("fiber/setmaxstack", cfun_fiber_setmaxstack),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16983|  8.33k|        JANET_CORE_REG("fiber/getenv", cfun_fiber_getenv),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16984|  8.33k|        JANET_CORE_REG("fiber/setenv", cfun_fiber_setenv),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16985|  8.33k|        JANET_CORE_REG("fiber/can-resume?", cfun_fiber_can_resume),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16986|  8.33k|        JANET_CORE_REG("fiber/last-value", cfun_fiber_last_value),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16987|  8.33k|        JANET_REG_END
  ------------------
  |  | 2110|  8.33k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
16988|  8.33k|    };
16989|       |    janet_core_cfuns_ext(env, NULL, fiber_cfuns);
16990|  8.33k|}
cfun_filewatch_make:
17864|      1|              "related events, such as `:moved-from` and `:moved-to`.") {
17865|      1|    janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2029|      1|#define JANET_SANDBOX_FS_READ 64
  ------------------
17866|      1|    janet_arity(argc, 1, -1);
17867|      1|    JanetChannel *channel = janet_getchannel(argv, 0);
17868|      1|    JanetWatcher *watcher = janet_abstract(&janet_filewatch_at, sizeof(JanetWatcher));
17869|      1|    uint32_t default_flags = decode_watch_flags(argv + 1, argc - 1);
17870|      1|    janet_watcher_init(watcher, channel, default_flags);
17871|      1|    return janet_wrap_abstract(watcher);
  ------------------
  |  |  851|      1|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|      1|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17872|      1|}
cfun_filewatch_add:
17945|      2|              "") {
17946|      2|    janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2029|      2|#define JANET_SANDBOX_FS_READ 64
  ------------------
17947|      2|    janet_arity(argc, 2, -1);
17948|      2|    JanetWatcher *watcher = janet_getabstract(argv, 0, &janet_filewatch_at);
17949|      2|    const char *path = janet_getcstring(argv, 1);
17950|      2|    uint32_t flags = watcher->default_flags | decode_watch_flags(argv + 2, argc - 2);
17951|      2|    janet_watcher_add(watcher, path, flags);
17952|      2|    return argv[0];
17953|      2|}
cfun_filewatch_remove:
17957|      1|              "Remove a path from the watcher.") {
17958|      1|    janet_fixarity(argc, 2);
17959|      1|    JanetWatcher *watcher = janet_getabstract(argv, 0, &janet_filewatch_at);
17960|       |    /* TODO - pass string in directly to avoid extra allocation */
17961|      1|    const char *path = janet_getcstring(argv, 1);
17962|      1|    janet_watcher_remove(watcher, path);
17963|      1|    return argv[0];
17964|      1|}
janet_lib_filewatch:
17985|  8.33k|void janet_lib_filewatch(JanetTable *env) {
17986|  8.33k|    JanetRegExt cfuns[] = {
17987|  8.33k|        JANET_CORE_REG("filewatch/new", cfun_filewatch_make),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17988|  8.33k|        JANET_CORE_REG("filewatch/add", cfun_filewatch_add),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17989|  8.33k|        JANET_CORE_REG("filewatch/remove", cfun_filewatch_remove),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17990|  8.33k|        JANET_CORE_REG("filewatch/listen", cfun_filewatch_listen),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17991|  8.33k|        JANET_CORE_REG("filewatch/unlisten", cfun_filewatch_unlisten),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17992|  8.33k|        JANET_REG_END
  ------------------
  |  | 2110|  8.33k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
17993|  8.33k|    };
17994|       |    janet_core_cfuns_ext(env, NULL, cfuns);
17995|  8.33k|}
janet_gcpressure:
18055|  40.5M|void janet_gcpressure(size_t s) {
18056|  40.5M|    janet_vm.next_collection += s;
18057|  40.5M|}
janet_mark:
18060|   405M|void janet_mark(Janet x) {
18061|   405M|    if (depth) {
  ------------------
  |  Branch (18061:9): [True: 405M, False: 18.4E]
  ------------------
18062|   405M|        depth--;
18063|   405M|        switch (janet_type(x)) {
  ------------------
  |  |  795|   405M|    (isnan((x).number) \
  |  |  796|   405M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   405M|        : JANET_NUMBER)
  ------------------
  |  Branch (18063:17): [True: 315M, False: 89.7M]
  ------------------
18064|   265M|            default:
  ------------------
  |  Branch (18064:13): [True: 265M, False: 140M]
  ------------------
18065|   265M|                break;
18066|   265M|            case JANET_STRING:
  ------------------
  |  Branch (18066:13): [True: 15.6M, False: 389M]
  ------------------
18067|  40.6M|            case JANET_KEYWORD:
  ------------------
  |  Branch (18067:13): [True: 24.9M, False: 380M]
  ------------------
18068|  61.6M|            case JANET_SYMBOL:
  ------------------
  |  Branch (18068:13): [True: 21.0M, False: 384M]
  ------------------
18069|  61.6M|                janet_mark_string(janet_unwrap_string(x));
  ------------------
  |  |  863|  61.6M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
18070|  61.6M|                break;
18071|  12.1M|            case JANET_FUNCTION:
  ------------------
  |  Branch (18071:13): [True: 12.1M, False: 393M]
  ------------------
18072|  12.1M|                janet_mark_function(janet_unwrap_function(x));
  ------------------
  |  |  868|  12.1M|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
18073|  12.1M|                break;
18074|  83.2k|            case JANET_ARRAY:
  ------------------
  |  Branch (18074:13): [True: 83.2k, False: 405M]
  ------------------
18075|  83.2k|                janet_mark_array(janet_unwrap_array(x));
  ------------------
  |  |  860|  83.2k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
18076|  83.2k|                break;
18077|  6.55M|            case JANET_TABLE:
  ------------------
  |  Branch (18077:13): [True: 6.55M, False: 398M]
  ------------------
18078|  6.55M|                janet_mark_table(janet_unwrap_table(x));
  ------------------
  |  |  861|  6.55M|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
18079|  6.55M|                break;
18080|  72.5k|            case JANET_STRUCT:
  ------------------
  |  Branch (18080:13): [True: 72.5k, False: 405M]
  ------------------
18081|  72.5k|                janet_mark_struct(janet_unwrap_struct(x));
  ------------------
  |  |  857|  72.5k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
18082|  72.5k|                break;
18083|  7.34M|            case JANET_TUPLE:
  ------------------
  |  Branch (18083:13): [True: 7.34M, False: 398M]
  ------------------
18084|  7.34M|                janet_mark_tuple(janet_unwrap_tuple(x));
  ------------------
  |  |  858|  7.34M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
18085|  7.34M|                break;
18086|  21.0k|            case JANET_BUFFER:
  ------------------
  |  Branch (18086:13): [True: 21.0k, False: 405M]
  ------------------
18087|  21.0k|                janet_mark_buffer(janet_unwrap_buffer(x));
  ------------------
  |  |  862|  21.0k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
18088|  21.0k|                break;
18089|  52.2M|            case JANET_FIBER:
  ------------------
  |  Branch (18089:13): [True: 52.2M, False: 353M]
  ------------------
18090|  52.2M|                janet_mark_fiber(janet_unwrap_fiber(x));
  ------------------
  |  |  859|  52.2M|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
18091|  52.2M|                break;
18092|   169k|            case JANET_ABSTRACT:
  ------------------
  |  Branch (18092:13): [True: 169k, False: 405M]
  ------------------
18093|   169k|                janet_mark_abstract(janet_unwrap_abstract(x));
  ------------------
  |  |  866|   169k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18094|   169k|                break;
18095|   405M|        }
18096|   405M|        depth++;
18097|  18.4E|    } else {
18098|  18.4E|        janet_gcroot(x);
18099|  18.4E|    }
18100|   405M|}
janet_sweep:
18409|  26.8k|void janet_sweep() {
18410|  26.8k|    JanetGCObject *previous = NULL;
18411|  26.8k|    JanetGCObject *current = janet_vm.weak_blocks;
18412|  26.8k|    JanetGCObject *next;
18413|       |
18414|       |    /* Sweep weak heap to drop weak refs */
18415|  1.88M|    while (NULL != current) {
  ------------------
  |  Branch (18415:12): [True: 1.85M, False: 26.8k]
  ------------------
18416|  1.85M|        next = current->data.next;
18417|  1.85M|        if (current->flags & (JANET_MEM_REACHABLE | JANET_MEM_DISABLED)) {
  ------------------
  |  |  653|  1.85M|#define JANET_MEM_REACHABLE 0x100
  ------------------
                      if (current->flags & (JANET_MEM_REACHABLE | JANET_MEM_DISABLED)) {
  ------------------
  |  |  654|  1.85M|#define JANET_MEM_DISABLED 0x200
  ------------------
  |  Branch (18417:13): [True: 1.14k, False: 1.85M]
  ------------------
18418|       |            /* Check for dead references */
18419|  1.14k|            enum JanetMemoryType type = janet_gc_type(current);
  ------------------
  |  |  657|  1.14k|#define janet_gc_type(m) (janet_gc_header(m)->flags & 0xFF)
  |  |  ------------------
  |  |  |  |  650|  1.14k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
18420|  1.14k|            if (type == JANET_MEMORY_ARRAY_WEAK) {
  ------------------
  |  Branch (18420:17): [True: 335, False: 806]
  ------------------
18421|    335|                JanetArray *array = (JanetArray *) current;
18422|  21.1k|                for (uint32_t i = 0; i < (uint32_t) array->count; i++) {
  ------------------
  |  Branch (18422:38): [True: 20.7k, False: 335]
  ------------------
18423|  20.7k|                    if (!janet_check_liveref(array->data[i])) {
  ------------------
  |  Branch (18423:25): [True: 282, False: 20.4k]
  ------------------
18424|    282|                        array->data[i] = janet_wrap_nil();
  ------------------
  |  |  831|    282|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    282|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    282|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    282|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18425|    282|                    }
18426|  20.7k|                }
18427|    806|            } else {
18428|    806|                JanetTable *table = (JanetTable *) current;
18429|    806|                int check_values = (type == JANET_MEMORY_TABLE_WEAKV) || (type == JANET_MEMORY_TABLE_WEAKKV);
  ------------------
  |  Branch (18429:36): [True: 444, False: 362]
  |  Branch (18429:74): [True: 243, False: 119]
  ------------------
18430|    806|                int check_keys = (type == JANET_MEMORY_TABLE_WEAKK) || (type == JANET_MEMORY_TABLE_WEAKKV);
  ------------------
  |  Branch (18430:34): [True: 119, False: 687]
  |  Branch (18430:72): [True: 243, False: 444]
  ------------------
18431|    806|                JanetKV *end = table->data + table->capacity;
18432|    806|                JanetKV *kvs = table->data;
18433|  27.0M|                while (kvs < end) {
  ------------------
  |  Branch (18433:24): [True: 27.0M, False: 806]
  ------------------
18434|  27.0M|                    int drop = 0;
18435|  27.0M|                    if (check_keys && !janet_check_liveref(kvs->key)) drop = 1;
  ------------------
  |  Branch (18435:25): [True: 27.0M, False: 15.4k]
  |  Branch (18435:39): [True: 191, False: 27.0M]
  ------------------
18436|  27.0M|                    if (check_values && !janet_check_liveref(kvs->value)) drop = 1;
  ------------------
  |  Branch (18436:25): [True: 3.17M, False: 23.8M]
  |  Branch (18436:41): [True: 256, False: 3.16M]
  ------------------
18437|  27.0M|                    if (drop) {
  ------------------
  |  Branch (18437:25): [True: 445, False: 27.0M]
  ------------------
18438|       |                        /* Inlined from janet_table_remove without search */
18439|    445|                        table->count--;
18440|    445|                        table->deleted++;
18441|    445|                        kvs->key = janet_wrap_nil();
  ------------------
  |  |  831|    445|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    445|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    445|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    445|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18442|    445|                        kvs->value = janet_wrap_false();
  ------------------
  |  |  833|    445|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|    445|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    445|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    445|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18443|    445|                    }
18444|  27.0M|                    kvs++;
18445|  27.0M|                }
18446|    806|            }
18447|  1.14k|        }
18448|  1.85M|        current = next;
18449|  1.85M|    }
18450|       |
18451|       |    /* Sweep weak heap to free blocks */
18452|  26.8k|    previous = NULL;
18453|  26.8k|    current = janet_vm.weak_blocks;
18454|  1.88M|    while (NULL != current) {
  ------------------
  |  Branch (18454:12): [True: 1.85M, False: 26.8k]
  ------------------
18455|  1.85M|        next = current->data.next;
18456|  1.85M|        if (current->flags & (JANET_MEM_REACHABLE | JANET_MEM_DISABLED)) {
  ------------------
  |  |  653|  1.85M|#define JANET_MEM_REACHABLE 0x100
  ------------------
                      if (current->flags & (JANET_MEM_REACHABLE | JANET_MEM_DISABLED)) {
  ------------------
  |  |  654|  1.85M|#define JANET_MEM_DISABLED 0x200
  ------------------
  |  Branch (18456:13): [True: 1.14k, False: 1.85M]
  ------------------
18457|  1.14k|            previous = current;
18458|  1.14k|            current->flags &= ~JANET_MEM_REACHABLE;
  ------------------
  |  |  653|  1.14k|#define JANET_MEM_REACHABLE 0x100
  ------------------
18459|  1.85M|        } else {
18460|  1.85M|            janet_vm.block_count--;
18461|  1.85M|            janet_deinit_block(current);
18462|  1.85M|            if (NULL != previous) {
  ------------------
  |  Branch (18462:17): [True: 1.72M, False: 131k]
  ------------------
18463|  1.72M|                previous->data.next = next;
18464|  1.72M|            } else {
18465|   131k|                janet_vm.weak_blocks = next;
18466|   131k|            }
18467|  1.85M|            janet_free(current);
  ------------------
  |  | 2415|  1.85M|#define janet_free(X) free((X))
  ------------------
18468|  1.85M|        }
18469|  1.85M|        current = next;
18470|  1.85M|    }
18471|       |
18472|       |    /* Sweep main heap to free blocks */
18473|  26.8k|    previous = NULL;
18474|  26.8k|    current = janet_vm.blocks;
18475|  3.57G|    while (NULL != current) {
  ------------------
  |  Branch (18475:12): [True: 3.57G, False: 26.8k]
  ------------------
18476|  3.57G|        next = current->data.next;
18477|  3.57G|        if (current->flags & (JANET_MEM_REACHABLE | JANET_MEM_DISABLED)) {
  ------------------
  |  |  653|  3.57G|#define JANET_MEM_REACHABLE 0x100
  ------------------
                      if (current->flags & (JANET_MEM_REACHABLE | JANET_MEM_DISABLED)) {
  ------------------
  |  |  654|  3.57G|#define JANET_MEM_DISABLED 0x200
  ------------------
  |  Branch (18477:13): [True: 53.1M, False: 3.51G]
  ------------------
18478|  53.1M|            previous = current;
18479|  53.1M|            current->flags &= ~JANET_MEM_REACHABLE;
  ------------------
  |  |  653|  53.1M|#define JANET_MEM_REACHABLE 0x100
  ------------------
18480|  3.51G|        } else {
18481|  3.51G|            janet_vm.block_count--;
18482|  3.51G|            janet_deinit_block(current);
18483|  3.51G|            if (NULL != previous) {
  ------------------
  |  Branch (18483:17): [True: 3.51G, False: 5.47M]
  ------------------
18484|  3.51G|                previous->data.next = next;
18485|  3.51G|            } else {
18486|  5.47M|                janet_vm.blocks = next;
18487|  5.47M|            }
18488|  3.51G|            janet_free(current);
  ------------------
  |  | 2415|  3.51G|#define janet_free(X) free((X))
  ------------------
18489|  3.51G|        }
18490|  3.57G|        current = next;
18491|  3.57G|    }
18492|       |
18493|  26.8k|#ifdef JANET_EV
18494|       |    /* Sweep threaded abstract types for references to decrement */
18495|  26.8k|    JanetKV *items = janet_vm.threaded_abstracts.data;
18496|   757k|    for (int32_t i = 0; i < janet_vm.threaded_abstracts.capacity; i++) {
  ------------------
  |  Branch (18496:25): [True: 730k, False: 26.8k]
  ------------------
18497|   730k|        if (janet_checktype(items[i].key, JANET_ABSTRACT)) {
  ------------------
  |  |  806|   730k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 304k, False: 425k]
  |  |  |  Branch (806:6): [Folded, False: 730k]
  |  |  ------------------
  |  |  807|   730k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   730k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   730k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   730k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   730k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   730k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18498|       |
18499|       |            /* If item was not visited during the mark phase, then this
18500|       |             * abstract type isn't present in the heap and needs its refcount
18501|       |             * decremented, and shouuld be removed from table. If the refcount is
18502|       |             * then 0, the item will be collected. This ensures that only one interpreter
18503|       |             * will clean up the threaded abstract. */
18504|       |
18505|       |            /* If not visited... */
18506|   304k|            if (!janet_truthy(items[i].value)) {
  ------------------
  |  |  818|   304k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|   609k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 304k]
  |  |  |  |  ------------------
  |  |  |  |  807|   609k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|   609k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|   304k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|   304k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   304k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   304k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 304k, False: 0]
  |  |  ------------------
  |  |  819|   304k|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|   609k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 304k]
  |  |  |  |  ------------------
  |  |  |  |  807|   609k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|   609k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|   304k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|   304k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   304k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   304k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 0, False: 304k]
  |  |  |  Branch (819:47): [True: 234, False: 304k]
  |  |  ------------------
  ------------------
18507|   304k|                void *abst = janet_unwrap_abstract(items[i].key);
  ------------------
  |  |  866|   304k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18508|   304k|                JanetAbstractHead *head = janet_abstract_head(abst);
  ------------------
  |  | 1897|   304k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
18509|   304k|                if (head->type->gcperthread) {
  ------------------
  |  Branch (18509:21): [True: 0, False: 304k]
  ------------------
18510|      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]
  |  |  ------------------
  ------------------
18511|      0|                }
18512|   304k|                janet_abstract_decref_maybe_free(abst);
18513|       |
18514|       |                /* Mark as tombstone in place */
18515|   304k|                items[i].key = janet_wrap_nil();
  ------------------
  |  |  831|   304k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   304k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   304k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   304k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18516|   304k|                items[i].value = janet_wrap_false();
  ------------------
  |  |  833|   304k|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|   304k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   304k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   304k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18517|   304k|                janet_vm.threaded_abstracts.deleted++;
18518|   304k|                janet_vm.threaded_abstracts.count--;
18519|   304k|            }
18520|       |
18521|       |            /* Reset for next sweep */
18522|   304k|            items[i].value = janet_wrap_false();
  ------------------
  |  |  833|   304k|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|   304k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   304k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   304k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18523|   304k|        }
18524|   730k|    }
18525|  26.8k|#endif
18526|  26.8k|}
janet_gcalloc:
18529|  3.63G|void *janet_gcalloc(enum JanetMemoryType type, size_t size) {
18530|  3.63G|    JanetGCObject *mem;
18531|       |
18532|       |    /* Make sure everything is inited */
18533|  3.63G|    janet_assert(NULL != janet_vm.cache, "please initialize janet before use");
  ------------------
  |  |  389|  3.63G|#define janet_assert(c, m) do { \
  |  |  390|  3.63G|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 3.63G]
  |  |  ------------------
  |  |  391|  3.63G|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 3.63G]
  |  |  ------------------
  ------------------
18534|  3.63G|    mem = janet_malloc(size);
  ------------------
  |  | 2406|  3.63G|#define janet_malloc(X) malloc((X))
  ------------------
18535|       |
18536|       |    /* Check for bad malloc */
18537|  3.63G|    if (NULL == mem) {
  ------------------
  |  Branch (18537:9): [True: 0, False: 3.63G]
  ------------------
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|  3.63G|    mem->flags = type;
18543|       |
18544|       |    /* Prepend block to heap list */
18545|  3.63G|    janet_vm.next_collection += size;
18546|  3.63G|    if (type < JANET_MEMORY_TABLE_WEAKK) {
  ------------------
  |  Branch (18546:9): [True: 3.63G, False: 18.4E]
  ------------------
18547|       |        /* normal heap */
18548|  3.63G|        mem->data.next = janet_vm.blocks;
18549|  3.63G|        janet_vm.blocks = mem;
18550|  18.4E|    } else {
18551|       |        /* weak heap */
18552|  18.4E|        mem->data.next = janet_vm.weak_blocks;
18553|  18.4E|        janet_vm.weak_blocks = mem;
18554|  18.4E|    }
18555|  3.63G|    janet_vm.block_count++;
18556|       |
18557|  3.63G|    return (void *)mem;
18558|  3.63G|}
janet_collect:
18581|   816M|void janet_collect(void) {
18582|   816M|    uint32_t i;
18583|   816M|    if (janet_vm.gc_suspend) return;
  ------------------
  |  Branch (18583:9): [True: 816M, False: 26.5k]
  ------------------
18584|  26.5k|    depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|  26.5k|#define JANET_RECURSION_GUARD 1024
  ------------------
18585|  26.5k|    janet_vm.gc_mark_phase = 1;
18586|       |    /* Try to prevent many major collections back to back.
18587|       |     * A full collection will take O(janet_vm.block_count) time.
18588|       |     * If we have a large heap, make sure our interval is not too
18589|       |     * small so we won't make many collections over it. This is just a
18590|       |     * heuristic for automatically changing the gc interval */
18591|  26.5k|    if (janet_vm.block_count * 8 > janet_vm.gc_interval) {
  ------------------
  |  Branch (18591:9): [True: 27, False: 26.4k]
  ------------------
18592|     27|        janet_vm.gc_interval = janet_vm.block_count * sizeof(JanetGCObject);
18593|     27|    }
18594|  26.5k|    orig_rootcount = janet_vm.root_count;
18595|  26.5k|#ifdef JANET_EV
18596|  26.5k|    janet_ev_mark();
18597|  26.5k|#endif
18598|  26.5k|    if (janet_vm.top_dyns) {
  ------------------
  |  Branch (18598:9): [True: 0, False: 26.5k]
  ------------------
18599|      0|        janet_mark(janet_wrap_table(janet_vm.top_dyns));
  ------------------
  |  |  846|      0|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18600|      0|    }
18601|  26.8k|    if (janet_vm.root_fiber != NULL) { /* Can be NULL if janet_collect called outside of interpreter loop */
  ------------------
  |  Branch (18601:9): [True: 26.8k, False: 18.4E]
  ------------------
18602|  26.8k|        janet_mark_fiber(janet_vm.root_fiber);
18603|  26.8k|    }
18604|   100k|    for (i = 0; i < orig_rootcount; i++)
  ------------------
  |  Branch (18604:17): [True: 74.0k, False: 26.5k]
  ------------------
18605|  74.0k|        janet_mark(janet_vm.roots[i]);
18606|  26.5k|    while (orig_rootcount < janet_vm.root_count) {
  ------------------
  |  Branch (18606:12): [True: 48, False: 26.5k]
  ------------------
18607|     48|        Janet x = janet_vm.roots[--janet_vm.root_count];
18608|     48|        janet_mark(x);
18609|     48|    }
18610|  26.5k|    janet_vm.gc_mark_phase = 0;
18611|  26.5k|    janet_sweep();
18612|  26.5k|    janet_vm.next_collection = 0;
18613|  26.5k|    janet_free_all_scratch();
18614|  26.5k|}
janet_gcroot:
18619|  1.41M|void janet_gcroot(Janet root) {
18620|  1.41M|    size_t newcount = janet_vm.root_count + 1;
18621|  1.41M|    if (newcount > janet_vm.root_capacity) {
  ------------------
  |  Branch (18621:9): [True: 18.9k, False: 1.39M]
  ------------------
18622|  18.9k|        size_t newcap = 2 * newcount;
18623|  18.9k|        janet_vm.roots = janet_realloc(janet_vm.roots, sizeof(Janet) * newcap);
  ------------------
  |  | 2409|  18.9k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
18624|  18.9k|        if (NULL == janet_vm.roots) {
  ------------------
  |  Branch (18624:13): [True: 0, False: 18.9k]
  ------------------
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|  18.9k|        janet_vm.root_capacity = newcap;
18628|  18.9k|    }
18629|  1.41M|    janet_vm.roots[janet_vm.root_count] = root;
18630|  1.41M|    janet_vm.root_count = newcount;
18631|  1.41M|}
janet_gcunroot:
18650|  1.39M|int janet_gcunroot(Janet root) {
18651|       |    /* Search from top to bottom as access is most likely LIFO */
18652|  1.39M|    for (Janet *v = janet_vm.roots + janet_vm.root_count; v > janet_vm.roots;) {
  ------------------
  |  Branch (18652:59): [True: 1.39M, False: 81]
  ------------------
18653|  1.39M|        v--;
18654|  1.39M|        if (janet_gc_idequals(root, *v)) {
  ------------------
  |  Branch (18654:13): [True: 1.39M, False: 4.18k]
  ------------------
18655|  1.39M|            *v = janet_vm.roots[--janet_vm.root_count];
18656|  1.39M|            return 1;
18657|  1.39M|        }
18658|  1.39M|    }
18659|     81|    return 0;
18660|  1.39M|}
janet_clear_memory:
18677|  10.3k|void janet_clear_memory(void) {
18678|  10.3k|#ifdef JANET_EV
18679|  10.3k|    JanetKV *items = janet_vm.threaded_abstracts.data;
18680|   139k|    for (int32_t i = 0; i < janet_vm.threaded_abstracts.capacity; i++) {
  ------------------
  |  Branch (18680:25): [True: 129k, False: 10.3k]
  ------------------
18681|   129k|        if (janet_checktype(items[i].key, JANET_ABSTRACT)) {
  ------------------
  |  |  806|   129k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 42.8k, False: 86.2k]
  |  |  |  Branch (806:6): [Folded, False: 129k]
  |  |  ------------------
  |  |  807|   129k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   129k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   129k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   129k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   129k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   129k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18682|  42.8k|            void *abst = janet_unwrap_abstract(items[i].key);
  ------------------
  |  |  866|  42.8k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18683|  42.8k|            JanetAbstractHead *head = janet_abstract_head(abst);
  ------------------
  |  | 1897|  42.8k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
18684|  42.8k|            if (head->type->gcperthread) {
  ------------------
  |  Branch (18684:17): [True: 5, False: 42.8k]
  ------------------
18685|      5|                janet_assert(!head->type->gcperthread(head->data, head->size), "per-thread finalizer failed");
  ------------------
  |  |  389|      5|#define janet_assert(c, m) do { \
  |  |  390|      5|    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]
  |  |  ------------------
  |  |  391|      5|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 5]
  |  |  ------------------
  ------------------
18686|      5|            }
18687|  42.8k|            janet_abstract_decref_maybe_free(abst);
18688|  42.8k|        }
18689|   129k|    }
18690|  10.3k|#endif
18691|  10.3k|    JanetGCObject *current = janet_vm.blocks;
18692|   144M|    while (NULL != current) {
  ------------------
  |  Branch (18692:12): [True: 144M, False: 10.3k]
  ------------------
18693|   144M|        janet_deinit_block(current);
18694|   144M|        JanetGCObject *next = current->data.next;
18695|   144M|        janet_free(current);
  ------------------
  |  | 2415|   144M|#define janet_free(X) free((X))
  ------------------
18696|   144M|        current = next;
18697|   144M|    }
18698|  10.3k|    janet_vm.blocks = NULL;
18699|  10.3k|    janet_free_all_scratch();
18700|  10.3k|    janet_free(janet_vm.scratch_mem);
  ------------------
  |  | 2415|  10.3k|#define janet_free(X) free((X))
  ------------------
18701|  10.3k|}
janet_gclock:
18704|   305k|int janet_gclock(void) {
18705|   305k|    return janet_vm.gc_suspend++;
18706|   305k|}
janet_gcunlock:
18707|   305k|void janet_gcunlock(int handle) {
18708|   305k|    janet_vm.gc_suspend = handle;
18709|   305k|}
janet_smalloc:
18715|  8.42M|void *janet_smalloc(size_t size) {
18716|  8.42M|    JanetScratch *s = janet_malloc(sizeof(JanetScratch) + size);
  ------------------
  |  | 2406|  8.42M|#define janet_malloc(X) malloc((X))
  ------------------
18717|  8.42M|    if (NULL == s) {
  ------------------
  |  Branch (18717:9): [True: 0, False: 8.42M]
  ------------------
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|  8.42M|    s->finalize = NULL;
18721|  8.42M|    if (janet_vm.scratch_len == janet_vm.scratch_cap) {
  ------------------
  |  Branch (18721:9): [True: 26.2k, False: 8.39M]
  ------------------
18722|  26.2k|        size_t newcap = 2 * janet_vm.scratch_cap + 2;
18723|  26.2k|        JanetScratch **newmem = (JanetScratch **) janet_realloc(janet_vm.scratch_mem, newcap * sizeof(JanetScratch));
  ------------------
  |  | 2409|  26.2k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
18724|  26.2k|        if (NULL == newmem) {
  ------------------
  |  Branch (18724:13): [True: 0, False: 26.2k]
  ------------------
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|  26.2k|        janet_vm.scratch_cap = newcap;
18728|  26.2k|        janet_vm.scratch_mem = newmem;
18729|  26.2k|    }
18730|  8.42M|    janet_vm.scratch_mem[janet_vm.scratch_len++] = s;
18731|  8.42M|    return (char *)(s->mem);
18732|  8.42M|}
janet_srealloc:
18744|  15.8M|void *janet_srealloc(void *mem, size_t size) {
18745|  15.8M|    if (NULL == mem) return janet_smalloc(size);
  ------------------
  |  Branch (18745:9): [True: 6.83M, False: 9.00M]
  ------------------
18746|  9.00M|    JanetScratch *s = janet_mem2scratch(mem);
18747|  9.00M|    if (janet_vm.scratch_len) {
  ------------------
  |  Branch (18747:9): [True: 9.00M, False: 18.4E]
  ------------------
18748|  15.4M|        for (size_t i = janet_vm.scratch_len - 1; ; i--) {
18749|  15.4M|            if (janet_vm.scratch_mem[i] == s) {
  ------------------
  |  Branch (18749:17): [True: 9.00M, False: 6.48M]
  ------------------
18750|  9.00M|                JanetScratch *news = janet_realloc(s, size + sizeof(JanetScratch));
  ------------------
  |  | 2409|  9.00M|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
18751|  9.00M|                if (NULL == news) {
  ------------------
  |  Branch (18751:21): [True: 0, False: 9.00M]
  ------------------
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|  9.00M|                janet_vm.scratch_mem[i] = news;
18755|  9.00M|                return (char *)(news->mem);
18756|  9.00M|            }
18757|  6.48M|            if (i == 0) break;
  ------------------
  |  Branch (18757:17): [True: 0, False: 6.48M]
  ------------------
18758|  6.48M|        }
18759|  9.00M|    }
18760|  18.4E|    JANET_EXIT("invalid janet_srealloc");
  ------------------
  |  |  378|  18.4E|#define JANET_EXIT(m) do { \
  |  |  379|  18.4E|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  380|  18.4E|        __FILE__,\
  |  |  381|  18.4E|        __LINE__,\
  |  |  382|  18.4E|        (m));\
  |  |  383|  18.4E|    abort();\
  |  |  384|  18.4E|} while (0)
  |  |  ------------------
  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
18761|  18.4E|}
janet_sfree:
18768|  8.27M|void janet_sfree(void *mem) {
18769|  8.27M|    if (NULL == mem) return;
  ------------------
  |  Branch (18769:9): [True: 0, False: 8.27M]
  ------------------
18770|  8.27M|    JanetScratch *s = janet_mem2scratch(mem);
18771|  8.27M|    if (janet_vm.scratch_len) {
  ------------------
  |  Branch (18771:9): [True: 8.27M, False: 18.4E]
  ------------------
18772|  15.9M|        for (size_t i = janet_vm.scratch_len - 1; ; i--) {
18773|  15.9M|            if (janet_vm.scratch_mem[i] == s) {
  ------------------
  |  Branch (18773:17): [True: 8.27M, False: 7.63M]
  ------------------
18774|  8.27M|                janet_vm.scratch_mem[i] = janet_vm.scratch_mem[--janet_vm.scratch_len];
18775|  8.27M|                free_one_scratch(s);
18776|  8.27M|                return;
18777|  8.27M|            }
18778|  7.63M|            if (i == 0) break;
  ------------------
  |  Branch (18778:17): [True: 0, False: 7.63M]
  ------------------
18779|  7.63M|        }
18780|  8.27M|    }
18781|  18.4E|    JANET_EXIT("invalid janet_sfree");
  ------------------
  |  |  378|  18.4E|#define JANET_EXIT(m) do { \
  |  |  379|  18.4E|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  380|  18.4E|        __FILE__,\
  |  |  381|  18.4E|        __LINE__,\
  |  |  382|  18.4E|        (m));\
  |  |  383|  18.4E|    abort();\
  |  |  384|  18.4E|} while (0)
  |  |  ------------------
  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
18782|  18.4E|}
janet_unwrap_s64:
18903|  2.73M|int64_t janet_unwrap_s64(Janet x) {
18904|  2.73M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  2.73M|    (isnan((x).number) \
  |  |  796|  2.73M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  2.73M|        : JANET_NUMBER)
  ------------------
  |  Branch (18904:13): [True: 1.73M, False: 998k]
  ------------------
18905|    171|        default:
  ------------------
  |  Branch (18905:9): [True: 171, False: 2.73M]
  ------------------
18906|    171|            break;
18907|   998k|        case JANET_NUMBER : {
  ------------------
  |  Branch (18907:9): [True: 998k, False: 1.73M]
  ------------------
18908|   998k|            double d = janet_unwrap_number(x);
  ------------------
  |  |  839|   998k|#define janet_unwrap_number(x) ((x).number)
  ------------------
18909|   998k|            if (!janet_checkint64range(d)) break;
  ------------------
  |  |  964|   998k|#define janet_checkint64range(x) ((x) >= JANET_INTMIN_DOUBLE && (x) <= JANET_INTMAX_DOUBLE && (x) == (int64_t)(x))
  |  |  ------------------
  |  |  |  |  166|  1.99M|#define JANET_INTMIN_DOUBLE (-9007199254740992.0)
  |  |  ------------------
  |  |               #define janet_checkint64range(x) ((x) >= JANET_INTMIN_DOUBLE && (x) <= JANET_INTMAX_DOUBLE && (x) == (int64_t)(x))
  |  |  ------------------
  |  |  |  |  165|  1.99M|#define JANET_INTMAX_DOUBLE 9007199254740992.0
  |  |  ------------------
  |  |  |  Branch (964:35): [True: 998k, False: 1]
  |  |  |  Branch (964:65): [True: 998k, False: 2]
  |  |  |  Branch (964:95): [True: 998k, False: 8]
  |  |  ------------------
  ------------------
18910|   998k|            return (int64_t) d;
18911|   998k|        }
18912|     23|        case JANET_STRING: {
  ------------------
  |  Branch (18912:9): [True: 23, False: 2.73M]
  ------------------
18913|     23|            int64_t value;
18914|     23|            const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  863|     23|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
18915|     23|            if (janet_scan_int64(str, janet_string_length(str), &value))
  ------------------
  |  | 1813|     23|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|     23|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (18915:17): [True: 8, False: 15]
  ------------------
18916|      8|                return value;
18917|     15|            break;
18918|     23|        }
18919|  1.73M|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (18919:9): [True: 1.73M, False: 998k]
  ------------------
18920|  1.73M|            void *abst = janet_unwrap_abstract(x);
  ------------------
  |  |  866|  1.73M|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18921|  1.73M|            if (janet_abstract_type(abst) == &janet_s64_type ||
  ------------------
  |  | 1899|  1.73M|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|  1.73M|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (18921:17): [True: 1.73M, False: 37]
  ------------------
18922|     37|                    (janet_abstract_type(abst) == &janet_u64_type))
  ------------------
  |  | 1899|     37|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|     37|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (18922:21): [True: 37, False: 0]
  ------------------
18923|  1.73M|                return *(int64_t *)abst;
18924|      0|            break;
18925|  1.73M|        }
18926|  2.73M|    }
18927|    197|    janet_panicf("can not convert %t %q to 64 bit signed integer", x, x);
18928|      0|    return 0;
18929|  2.73M|}
janet_unwrap_u64:
18931|  3.70M|uint64_t janet_unwrap_u64(Janet x) {
18932|  3.70M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  3.70M|    (isnan((x).number) \
  |  |  796|  3.70M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  3.70M|        : JANET_NUMBER)
  ------------------
  |  Branch (18932:13): [True: 2.47M, False: 1.23M]
  ------------------
18933|     58|        default:
  ------------------
  |  Branch (18933:9): [True: 58, False: 3.70M]
  ------------------
18934|     58|            break;
18935|  1.23M|        case JANET_NUMBER : {
  ------------------
  |  Branch (18935:9): [True: 1.23M, False: 2.47M]
  ------------------
18936|  1.23M|            double d = janet_unwrap_number(x);
  ------------------
  |  |  839|  1.23M|#define janet_unwrap_number(x) ((x).number)
  ------------------
18937|  1.23M|            if (!janet_checkuint64range(d)) break;
  ------------------
  |  |  965|  1.23M|#define janet_checkuint64range(x) ((x) >= 0 && (x) <= JANET_INTMAX_DOUBLE && (x) == (uint64_t)(x))
  |  |  ------------------
  |  |  |  |  165|  2.46M|#define JANET_INTMAX_DOUBLE 9007199254740992.0
  |  |  ------------------
  |  |  |  Branch (965:36): [True: 1.23M, False: 6]
  |  |  |  Branch (965:48): [True: 1.23M, False: 1]
  |  |  |  Branch (965:78): [True: 1.23M, False: 4]
  |  |  ------------------
  ------------------
18938|  1.23M|            return (uint64_t) d;
18939|  1.23M|        }
18940|     12|        case JANET_STRING: {
  ------------------
  |  Branch (18940:9): [True: 12, False: 3.70M]
  ------------------
18941|     12|            uint64_t value;
18942|     12|            const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  863|     12|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
18943|     12|            if (janet_scan_uint64(str, janet_string_length(str), &value))
  ------------------
  |  | 1813|     12|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|     12|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (18943:17): [True: 5, False: 7]
  ------------------
18944|      5|                return value;
18945|      7|            break;
18946|     12|        }
18947|  2.47M|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (18947:9): [True: 2.47M, False: 1.23M]
  ------------------
18948|  2.47M|            void *abst = janet_unwrap_abstract(x);
  ------------------
  |  |  866|  2.47M|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18949|  2.47M|            if (janet_abstract_type(abst) == &janet_s64_type ||
  ------------------
  |  | 1899|  2.47M|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|  2.47M|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (18949:17): [True: 478k, False: 1.99M]
  ------------------
18950|  1.99M|                    (janet_abstract_type(abst) == &janet_u64_type))
  ------------------
  |  | 1899|  1.99M|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|  1.99M|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (18950:21): [True: 1.99M, False: 0]
  ------------------
18951|  2.47M|                return *(uint64_t *)abst;
18952|      0|            break;
18953|  2.47M|        }
18954|  3.70M|    }
18955|     76|    janet_panicf("can not convert %t %q to a 64 bit unsigned integer", x, x);
18956|      0|    return 0;
18957|  3.70M|}
janet_is_int:
18959|  13.8k|JanetIntType janet_is_int(Janet x) {
18960|  13.8k|    if (!janet_checktype(x, JANET_ABSTRACT)) return JANET_INT_NONE;
  ------------------
  |  |  806|  13.8k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 13.8k]
  |  |  ------------------
  |  |  807|  13.8k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  13.8k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  13.8k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  13.8k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  13.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  13.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (18960:9): [True: 1, False: 13.8k]
  ------------------
18961|  13.8k|    const JanetAbstractType *at = janet_abstract_type(janet_unwrap_abstract(x));
  ------------------
  |  | 1899|  13.8k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|  13.8k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
18962|  13.8k|    return (at == &janet_s64_type) ? JANET_INT_S64 :
  ------------------
  |  Branch (18962:12): [True: 1.08k, False: 12.7k]
  ------------------
18963|  13.8k|           ((at == &janet_u64_type) ? JANET_INT_U64 :
  ------------------
  |  Branch (18963:13): [True: 12.7k, False: 0]
  ------------------
18964|  12.7k|            JANET_INT_NONE);
18965|  13.8k|}
janet_wrap_s64:
18967|  8.18k|Janet janet_wrap_s64(int64_t x) {
18968|  8.18k|    int64_t *box = janet_abstract(&janet_s64_type, sizeof(int64_t));
18969|  8.18k|    *box = (int64_t)x;
18970|  8.18k|    return janet_wrap_abstract(box);
  ------------------
  |  |  851|  8.18k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  8.18k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.18k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.18k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18971|  8.18k|}
janet_wrap_u64:
18973|  28.3k|Janet janet_wrap_u64(uint64_t x) {
18974|  28.3k|    uint64_t *box = janet_abstract(&janet_u64_type, sizeof(uint64_t));
18975|  28.3k|    *box = (uint64_t)x;
18976|  28.3k|    return janet_wrap_abstract(box);
  ------------------
  |  |  851|  28.3k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  28.3k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  28.3k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  28.3k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18977|  28.3k|}
cfun_it_s64_new:
18981|      4|              "Create a boxed signed 64 bit integer from a string value or a number.") {
18982|      4|    janet_fixarity(argc, 1);
18983|      4|    return janet_wrap_s64(janet_unwrap_s64(argv[0]));
18984|      4|}
cfun_it_u64_new:
18988|      2|              "Create a boxed unsigned 64 bit integer from a string value or a number.") {
18989|      2|    janet_fixarity(argc, 1);
18990|      2|    return janet_wrap_u64(janet_unwrap_u64(argv[0]));
18991|      2|}
cfun_to_bytes:
19035|      3|              "- `nil` or unset - system byte order\n") {
19036|      3|    janet_arity(argc, 1, 3);
19037|      3|    if (janet_is_int(argv[0]) == JANET_INT_NONE) {
  ------------------
  |  Branch (19037:9): [True: 1, False: 2]
  ------------------
19038|      1|        janet_panicf("int/to-bytes: expected an int/s64 or int/u64, got %q", argv[0]);
19039|      1|    }
19040|       |
19041|      2|    int reverse = 0;
19042|      2|    if (argc > 1 && !janet_checktype(argv[1], 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 (19042:9): [True: 0, False: 2]
  |  Branch (19042:21): [True: 0, False: 0]
  ------------------
19043|      0|        JanetKeyword endianness_kw = janet_getkeyword(argv, 1);
19044|      0|        if (!janet_cstrcmp(endianness_kw, "le")) {
  ------------------
  |  Branch (19044:13): [True: 0, False: 0]
  ------------------
19045|       |#if JANET_BIG_ENDIAN
19046|       |            reverse = 1;
19047|       |#endif
19048|      0|        } else if (!janet_cstrcmp(endianness_kw, "be")) {
  ------------------
  |  Branch (19048:20): [True: 0, False: 0]
  ------------------
19049|      0|#if JANET_LITTLE_ENDIAN
19050|      0|            reverse = 1;
19051|      0|#endif
19052|      0|        } else {
19053|      0|            janet_panicf("int/to-bytes: expected endianness :le, :be or nil, got %v", argv[1]);
19054|      0|        }
19055|      0|    }
19056|       |
19057|      2|    JanetBuffer *buffer = NULL;
19058|      2|    if (argc > 2 && !janet_checktype(argv[2], 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 (19058:9): [True: 0, False: 2]
  |  Branch (19058:21): [True: 0, False: 0]
  ------------------
19059|      0|        if (!janet_checktype(argv[2], JANET_BUFFER)) {
  ------------------
  |  |  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 (19059:13): [True: 0, False: 0]
  ------------------
19060|      0|            janet_panicf("int/to-bytes: expected buffer or nil, got %q", argv[2]);
19061|      0|        }
19062|       |
19063|      0|        buffer = janet_unwrap_buffer(argv[2]);
  ------------------
  |  |  862|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
19064|      0|        janet_buffer_extra(buffer, 8);
19065|      2|    } else {
19066|      2|        buffer = janet_buffer(8);
19067|      2|    }
19068|       |
19069|      2|    uint8_t *bytes = janet_unwrap_abstract(argv[0]);
  ------------------
  |  |  866|      2|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
19070|      2|    if (reverse) {
  ------------------
  |  Branch (19070:9): [True: 0, False: 2]
  ------------------
19071|      0|        for (int i = 0; i < 8; ++i) {
  ------------------
  |  Branch (19071:25): [True: 0, False: 0]
  ------------------
19072|      0|            buffer->data[buffer->count + 7 - i] = bytes[i];
19073|      0|        }
19074|      2|    } else {
19075|      2|        memcpy(buffer->data + buffer->count, bytes, 8);
19076|      2|    }
19077|      2|    buffer->count += 8;
19078|       |
19079|      2|    return janet_wrap_buffer(buffer);
  ------------------
  |  |  847|      2|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|      2|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19080|      2|}
janet_lib_inttypes:
19465|  8.33k|void janet_lib_inttypes(JanetTable *env) {
19466|  8.33k|    JanetRegExt it_cfuns[] = {
19467|  8.33k|        JANET_CORE_REG("int/s64", cfun_it_s64_new),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
19468|  8.33k|        JANET_CORE_REG("int/u64", cfun_it_u64_new),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
19469|  8.33k|        JANET_CORE_REG("int/to-number", cfun_to_number),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
19470|  8.33k|        JANET_CORE_REG("int/to-bytes", cfun_to_bytes),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
19471|  8.33k|        JANET_REG_END
  ------------------
  |  | 2110|  8.33k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
19472|  8.33k|    };
19473|       |    janet_core_cfuns_ext(env, NULL, it_cfuns);
19474|  8.33k|    janet_register_abstract_type(&janet_s64_type);
19475|  8.33k|    janet_register_abstract_type(&janet_u64_type);
19476|  8.33k|}
cfun_io_temp:
19613|  1.03k|              "Raises an error on failure.") {
19614|  1.03k|    janet_sandbox_assert(JANET_SANDBOX_FS_TEMP);
  ------------------
  |  | 2033|  1.03k|#define JANET_SANDBOX_FS_TEMP 1024
  ------------------
19615|  1.03k|    (void)argv;
19616|  1.03k|    janet_fixarity(argc, 0);
19617|       |    // XXX use mkostemp when we can to avoid CLOEXEC race.
19618|  1.03k|    FILE *tmp = tmpfile();
19619|  1.03k|    if (!tmp)
  ------------------
  |  Branch (19619:9): [True: 0, False: 1.03k]
  ------------------
19620|      0|        janet_panicf("unable to create temporary file - %s", janet_strerror(errno));
19621|  1.03k|    return janet_makefile(tmp, JANET_FILE_WRITE | JANET_FILE_READ | JANET_FILE_BINARY);
  ------------------
  |  | 2274|  1.03k|#define JANET_FILE_WRITE 1
  ------------------
                  return janet_makefile(tmp, JANET_FILE_WRITE | JANET_FILE_READ | JANET_FILE_BINARY);
  ------------------
  |  | 2275|  1.03k|#define JANET_FILE_READ 2
  ------------------
                  return janet_makefile(tmp, JANET_FILE_WRITE | JANET_FILE_READ | JANET_FILE_BINARY);
  ------------------
  |  | 2280|  1.03k|#define JANET_FILE_BINARY 64
  ------------------
19622|  1.03k|}
cfun_io_fopen:
19643|   499k|              "See `fopen()` (`<stdio.h>`, C99) for further details.") {
19644|   499k|    janet_arity(argc, 1, 3);
19645|   499k|    const uint8_t *fname = janet_getstring(argv, 0);
19646|   499k|    const uint8_t *fmode;
19647|   499k|    int32_t flags;
19648|   499k|    if (argc == 2) {
  ------------------
  |  Branch (19648:9): [True: 497k, False: 2.17k]
  ------------------
19649|   497k|        fmode = janet_getkeyword(argv, 1);
19650|   497k|        flags = checkflags(fmode);
19651|   497k|    } else {
19652|  2.17k|        fmode = (const uint8_t *)"r";
19653|  2.17k|        janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2029|  2.17k|#define JANET_SANDBOX_FS_READ 64
  ------------------
19654|  2.17k|        flags = JANET_FILE_READ;
  ------------------
  |  | 2275|  2.17k|#define JANET_FILE_READ 2
  ------------------
19655|  2.17k|    }
19656|   499k|    FILE *f = fopen((const char *)fname, (const char *)fmode);
19657|   499k|    size_t bufsize = BUFSIZ;
19658|   499k|    if (f != NULL) {
  ------------------
  |  Branch (19658:9): [True: 2.85k, False: 496k]
  ------------------
19659|  2.85k|#if !(defined(JANET_WINDOWS) || defined(JANET_PLAN9))
19660|  2.85k|        struct stat st;
19661|  2.85k|        fstat(fileno(f), &st);
19662|  2.85k|        if (S_ISDIR(st.st_mode)) {
  ------------------
  |  Branch (19662:13): [True: 841, False: 2.01k]
  ------------------
19663|    841|            fclose(f);
19664|    841|            janet_panicf("cannot open directory: %s", fname);
19665|    841|        }
19666|  2.01k|#endif
19667|  2.01k|        bufsize = janet_optsize(argv, argc, 2, BUFSIZ);
19668|  2.01k|        if (bufsize != BUFSIZ) {
  ------------------
  |  Branch (19668:13): [True: 220, False: 1.79k]
  ------------------
19669|    220|            int result = setvbuf(f, NULL, bufsize ? _IOFBF : _IONBF, bufsize);
  ------------------
  |  Branch (19669:43): [True: 220, False: 0]
  ------------------
19670|    220|            if (result) {
  ------------------
  |  Branch (19670:17): [True: 0, False: 220]
  ------------------
19671|      0|                janet_panic("failed to set buffer size for file");
19672|      0|            }
19673|    220|        }
19674|  2.01k|    }
19675|   498k|    return f ? janet_wrap_abstract(makef(f, flags, bufsize))
  ------------------
  |  |  851|  2.01k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  2.01k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.01k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.01k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (19675:12): [True: 2.01k, False: 496k]
  ------------------
19676|   498k|           : (flags & JANET_FILE_NONIL) ? (janet_panicf("failed to open file %s: %s", fname, janet_strerror(errno)), janet_wrap_nil())
  ------------------
  |  | 2282|   496k|#define JANET_FILE_NONIL 512
  ------------------
                         : (flags & JANET_FILE_NONIL) ? (janet_panicf("failed to open file %s: %s", fname, janet_strerror(errno)), 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 (19676:14): [True: 1, False: 496k]
  ------------------
19677|   496k|           : janet_wrap_nil();
  ------------------
  |  |  831|   496k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   496k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   496k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   496k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19678|   498k|}
cfun_io_fread:
19702|   319k|              "* n (integer) - read up to n bytes from the file") {
19703|   319k|    janet_arity(argc, 2, 3);
19704|   319k|    JanetFile *iof = janet_getabstract(argv, 0, &janet_file_type);
19705|   319k|    if (iof->flags & JANET_FILE_CLOSED) janet_panic("file is closed");
  ------------------
  |  | 2279|   319k|#define JANET_FILE_CLOSED 32
  ------------------
  |  Branch (19705:9): [True: 0, False: 319k]
  ------------------
19706|   319k|    JanetBuffer *buffer;
19707|   319k|    if (argc == 2) {
  ------------------
  |  Branch (19707:9): [True: 0, False: 319k]
  ------------------
19708|      0|        buffer = janet_buffer(0);
19709|   319k|    } else {
19710|   319k|        buffer = janet_getbuffer(argv, 2);
19711|   319k|    }
19712|   319k|    int32_t bufstart = buffer->count;
19713|   319k|    if (janet_checktype(argv[1], JANET_KEYWORD)) {
  ------------------
  |  |  806|   319k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 319k]
  |  |  |  Branch (806:6): [Folded, False: 319k]
  |  |  ------------------
  |  |  807|   319k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   319k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   319k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   319k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   319k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   319k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19714|      0|        const uint8_t *sym = janet_unwrap_keyword(argv[1]);
  ------------------
  |  |  865|      0|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
19715|      0|        if (!janet_cstrcmp(sym, "all")) {
  ------------------
  |  Branch (19715:13): [True: 0, False: 0]
  ------------------
19716|      0|            int32_t sizeBefore;
19717|      0|            do {
19718|      0|                sizeBefore = buffer->count;
19719|      0|                read_chunk(iof, buffer, 4096);
19720|      0|            } while (sizeBefore < buffer->count);
  ------------------
  |  Branch (19720:22): [True: 0, False: 0]
  ------------------
19721|       |            /* Never return nil for :all */
19722|      0|            return 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19723|      0|        } else if (!janet_cstrcmp(sym, "line")) {
  ------------------
  |  Branch (19723:20): [True: 0, False: 0]
  ------------------
19724|      0|            for (;;) {
19725|      0|                int x = fgetc(iof->file);
19726|      0|                if (x != EOF) janet_buffer_push_u8(buffer, (uint8_t)x);
  ------------------
  |  Branch (19726:21): [True: 0, False: 0]
  ------------------
19727|      0|                if (x == EOF || x == '\n') break;
  ------------------
  |  Branch (19727:21): [True: 0, False: 0]
  |  Branch (19727:33): [True: 0, False: 0]
  ------------------
19728|      0|            }
19729|      0|        } else {
19730|      0|            janet_panicf("expected one of :all, :line, got %v", argv[1]);
19731|      0|        }
19732|   319k|    } else {
19733|   319k|        int32_t len = janet_getinteger(argv, 1);
19734|   319k|        if (len < 0) janet_panic("expected positive integer");
  ------------------
  |  Branch (19734:13): [True: 0, False: 319k]
  ------------------
19735|   319k|        read_chunk(iof, buffer, len);
19736|   319k|    }
19737|   319k|    if (bufstart == buffer->count) return janet_wrap_nil();
  ------------------
  |  |  831|   319k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   319k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   319k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   319k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (19737:9): [True: 319k, False: 1]
  ------------------
19738|      1|    return janet_wrap_buffer(buffer);
  ------------------
  |  |  847|      1|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|      1|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19739|   319k|}
janet_file_close:
19792|  32.8k|int janet_file_close(JanetFile *file) {
19793|  32.8k|    int ret = 0;
19794|  32.8k|    if (!(file->flags & (JANET_FILE_NOT_CLOSEABLE | JANET_FILE_CLOSED))) {
  ------------------
  |  | 2278|  32.8k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
                  if (!(file->flags & (JANET_FILE_NOT_CLOSEABLE | JANET_FILE_CLOSED))) {
  ------------------
  |  | 2279|  32.8k|#define JANET_FILE_CLOSED 32
  ------------------
  |  Branch (19794:9): [True: 1.26k, False: 31.5k]
  ------------------
19795|  1.26k|        ret = fclose(file->file);
19796|  1.26k|        file->flags |= JANET_FILE_CLOSED;
  ------------------
  |  | 2279|  1.26k|#define JANET_FILE_CLOSED 32
  ------------------
19797|  1.26k|        file->file = NULL; /* NULL dereference is easier to debug then other problems */
19798|  1.26k|        return ret;
19799|  1.26k|    }
19800|  31.5k|    return 0;
19801|  32.8k|}
cfun_io_fclose:
19816|  1.78k|              "other processes read the file.") {
19817|  1.78k|    janet_fixarity(argc, 1);
19818|  1.78k|    JanetFile *iof = janet_getabstract(argv, 0, &janet_file_type);
19819|  1.78k|    if (iof->flags & JANET_FILE_CLOSED)
  ------------------
  |  | 2279|  1.78k|#define JANET_FILE_CLOSED 32
  ------------------
  |  Branch (19819:9): [True: 0, False: 1.78k]
  ------------------
19820|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19821|  1.78k|    if (iof->flags & (JANET_FILE_NOT_CLOSEABLE))
  ------------------
  |  | 2278|  1.78k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
  |  Branch (19821:9): [True: 0, False: 1.78k]
  ------------------
19822|      0|        janet_panic("file not closable");
19823|  1.78k|    if (fclose(iof->file)) {
  ------------------
  |  Branch (19823:9): [True: 0, False: 1.78k]
  ------------------
19824|      0|        iof->flags |= JANET_FILE_NOT_CLOSEABLE;
  ------------------
  |  | 2278|      0|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
19825|      0|        janet_panic("could not close file");
19826|      0|    }
19827|  1.78k|    iof->flags |= JANET_FILE_CLOSED;
  ------------------
  |  | 2279|  1.78k|#define JANET_FILE_CLOSED 32
  ------------------
19828|  1.78k|    return janet_wrap_nil();
  ------------------
  |  |  831|  1.78k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.78k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.78k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.78k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19829|  1.78k|}
janet_dynfile:
19962|   733k|FILE *janet_dynfile(const char *name, FILE *def) {
19963|   733k|    Janet x = janet_dyn(name);
19964|   733k|    if (!janet_checktype(x, JANET_ABSTRACT)) return def;
  ------------------
  |  |  806|   733k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 733k]
  |  |  ------------------
  |  |  807|   733k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   733k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   733k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   733k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   733k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   733k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (19964:9): [True: 733k, False: 0]
  ------------------
19965|      0|    void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
19966|      0|    if (janet_abstract_type(abstract) != &janet_file_type) return def;
  ------------------
  |  | 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 (19966:9): [True: 0, False: 0]
  ------------------
19967|      0|    JanetFile *iofile = abstract;
19968|      0|    return iofile->file;
19969|      0|}
cfun_io_print:
20052|   197k|              "a buffer. Returns nil.") {
20053|       |    return cfun_io_print_impl(argc, argv, 1, "out", stdout);
20054|   197k|}
cfun_io_prin:
20058|    396|              "Same as `print`, but does not add trailing newline.") {
20059|       |    return cfun_io_print_impl(argc, argv, 0, "out", stdout);
20060|    396|}
cfun_io_eprint:
20064|  1.24k|              "Same as `print`, but uses `(dyn :err stderr)` instead of `(dyn :out stdout)`.") {
20065|       |    return cfun_io_print_impl(argc, argv, 1, "err", stderr);
20066|  1.24k|}
cfun_io_eprin:
20070|     23|              "Same as `prin`, but uses `(dyn :err stderr)` instead of `(dyn :out stdout)`.") {
20071|       |    return cfun_io_print_impl(argc, argv, 0, "err", stderr);
20072|     23|}
cfun_io_xprint:
20078|      1|              "to is the first argument, and is otherwise the same as `print`. Returns nil.") {
20079|      1|    janet_arity(argc, 1, -1);
20080|       |    return cfun_io_print_impl_x(argc, argv, 1, NULL, 1, argv[0]);
20081|      1|}
cfun_io_xprin:
20086|  76.7k|              "to is the first argument, and is otherwise the same as `prin`. Returns nil.") {
20087|  76.7k|    janet_arity(argc, 1, -1);
20088|       |    return cfun_io_print_impl_x(argc, argv, 0, NULL, 1, argv[0]);
20089|  76.7k|}
cfun_io_printf:
20158|    246|              "Prints output formatted as if with `(string/format fmt ;xs)` to `(dyn :out stdout)` with a trailing newline.") {
20159|       |    return cfun_io_printf_impl(argc, argv, 1, "out", stdout);
20160|    246|}
cfun_io_prinf:
20164|    104|              "Like `printf` but with no trailing newline.") {
20165|       |    return cfun_io_printf_impl(argc, argv, 0, "out", stdout);
20166|    104|}
cfun_io_eprintf:
20170|      3|              "Prints output formatted as if with `(string/format fmt ;xs)` to `(dyn :err stderr)` with a trailing newline.") {
20171|       |    return cfun_io_printf_impl(argc, argv, 1, "err", stderr);
20172|      3|}
cfun_io_eprinf:
20176|  11.3k|              "Like `eprintf` but with no trailing newline.") {
20177|       |    return cfun_io_printf_impl(argc, argv, 0, "err", stderr);
20178|  11.3k|}
cfun_io_xprinf:
20189|      6|              "Like `prinf` but prints to an explicit file or value `to`. Returns nil.") {
20190|      6|    janet_arity(argc, 2, -1);
20191|       |    return cfun_io_printf_impl_x(argc, argv, 0, NULL, 1, argv[0]);
20192|      6|}
cfun_io_flush:
20214|    246|              "Flush `(dyn :out stdout)` if it is a file, otherwise do nothing.") {
20215|    246|    janet_fixarity(argc, 0);
20216|    246|    (void) argv;
20217|    246|    janet_flusher("out", stdout);
20218|    246|    return janet_wrap_nil();
  ------------------
  |  |  831|    246|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    246|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    246|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    246|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20219|    246|}
janet_dynprintf:
20230|  3.78M|void janet_dynprintf(const char *name, FILE *dflt_file, const char *format, ...) {
20231|  3.78M|    va_list args;
20232|  3.78M|    va_start(args, format);
20233|  3.78M|    JanetType xtype;
20234|  3.78M|    Janet x;
20235|  3.78M|    if (!name || name[0] == '\0') { /* Allow NULL or empty string to just use dflt_file directly */
  ------------------
  |  Branch (20235:9): [True: 0, False: 3.78M]
  |  Branch (20235:18): [True: 0, False: 3.78M]
  ------------------
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|  3.78M|    } else {
20239|  3.78M|        x = janet_dyn(name);
20240|  3.78M|        xtype = janet_type(x);
  ------------------
  |  |  795|  3.78M|    (isnan((x).number) \
  |  |  796|  3.78M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  3.78M|        : JANET_NUMBER)
  ------------------
  |  Branch (20240:17): [True: 3.78M, False: 0]
  ------------------
20241|  3.78M|    }
20242|  3.78M|    switch (xtype) {
20243|      0|        default:
  ------------------
  |  Branch (20243:9): [True: 0, False: 3.78M]
  ------------------
20244|       |            /* Other values simply do nothing */
20245|      0|            break;
20246|  3.78M|        case JANET_NIL:
  ------------------
  |  Branch (20246:9): [True: 3.78M, False: 0]
  ------------------
20247|  3.78M|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (20247:9): [True: 0, False: 3.78M]
  ------------------
20248|  3.78M|            FILE *f = dflt_file;
20249|  3.78M|            JanetBuffer buffer;
20250|  3.78M|            int32_t len = 0;
20251|  33.7M|            while (format[len]) len++;
  ------------------
  |  Branch (20251:20): [True: 29.9M, False: 3.78M]
  ------------------
20252|  3.78M|            janet_buffer_init(&buffer, len);
20253|  3.78M|            janet_formatbv(&buffer, format, args);
20254|  3.78M|            if (xtype == JANET_ABSTRACT) {
  ------------------
  |  Branch (20254:17): [True: 0, False: 3.78M]
  ------------------
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|  3.78M|            fwrite(buffer.data, buffer.count, 1, f);
20263|  3.78M|            janet_buffer_deinit(&buffer);
20264|  3.78M|            break;
20265|  3.78M|        }
20266|      0|        case JANET_FUNCTION: {
  ------------------
  |  Branch (20266:9): [True: 0, False: 3.78M]
  ------------------
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|  3.78M|        }
20276|      0|        case JANET_BUFFER:
  ------------------
  |  Branch (20276:9): [True: 0, False: 3.78M]
  ------------------
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|  3.78M|    }
20280|  3.78M|    va_end(args);
20281|  3.78M|    return;
20282|  3.78M|}
janet_makefile:
20300|  26.0k|Janet janet_makefile(FILE *f, int32_t flags) {
20301|  26.0k|    return janet_wrap_abstract(makef(f, flags, BUFSIZ));
  ------------------
  |  |  851|  26.0k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  26.0k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  26.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  26.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20302|  26.0k|}
janet_lib_io:
20315|  8.33k|void janet_lib_io(JanetTable *env) {
20316|  8.33k|    JanetRegExt io_cfuns[] = {
20317|  8.33k|        JANET_CORE_REG("print", cfun_io_print),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20318|  8.33k|        JANET_CORE_REG("prin", cfun_io_prin),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20319|  8.33k|        JANET_CORE_REG("printf", cfun_io_printf),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20320|  8.33k|        JANET_CORE_REG("prinf", cfun_io_prinf),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20321|  8.33k|        JANET_CORE_REG("eprin", cfun_io_eprin),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20322|  8.33k|        JANET_CORE_REG("eprint", cfun_io_eprint),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20323|  8.33k|        JANET_CORE_REG("eprintf", cfun_io_eprintf),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20324|  8.33k|        JANET_CORE_REG("eprinf", cfun_io_eprinf),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20325|  8.33k|        JANET_CORE_REG("xprint", cfun_io_xprint),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20326|  8.33k|        JANET_CORE_REG("xprin", cfun_io_xprin),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20327|  8.33k|        JANET_CORE_REG("xprintf", cfun_io_xprintf),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20328|  8.33k|        JANET_CORE_REG("xprinf", cfun_io_xprinf),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20329|  8.33k|        JANET_CORE_REG("flush", cfun_io_flush),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20330|  8.33k|        JANET_CORE_REG("eflush", cfun_io_eflush),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20331|  8.33k|        JANET_CORE_REG("file/temp", cfun_io_temp),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20332|  8.33k|        JANET_CORE_REG("file/open", cfun_io_fopen),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20333|  8.33k|        JANET_CORE_REG("file/close", cfun_io_fclose),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20334|  8.33k|        JANET_CORE_REG("file/read", cfun_io_fread),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20335|  8.33k|        JANET_CORE_REG("file/write", cfun_io_fwrite),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20336|  8.33k|        JANET_CORE_REG("file/flush", cfun_io_fflush),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20337|  8.33k|        JANET_CORE_REG("file/seek", cfun_io_fseek),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20338|  8.33k|        JANET_CORE_REG("file/tell", cfun_io_ftell),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20339|  8.33k|        JANET_REG_END
  ------------------
  |  | 2110|  8.33k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
20340|  8.33k|    };
20341|  8.33k|    janet_core_cfuns_ext(env, NULL, io_cfuns);
20342|  8.33k|    janet_register_abstract_type(&janet_file_type);
20343|  8.33k|    int default_flags = JANET_FILE_NOT_CLOSEABLE | JANET_FILE_SERIALIZABLE;
  ------------------
  |  | 2278|  8.33k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
                  int default_flags = JANET_FILE_NOT_CLOSEABLE | JANET_FILE_SERIALIZABLE;
  ------------------
  |  | 2281|  8.33k|#define JANET_FILE_SERIALIZABLE 128
  ------------------
20344|       |    /* stdout */
20345|  8.33k|    JANET_CORE_DEF(env, "stdout",
  ------------------
  |  |  491|  8.33k|#define JANET_CORE_DEF(ENV, NAME, X, DOC) janet_core_def_sm(ENV, NAME, X, DOC, NULL, 0)
  ------------------
20346|  8.33k|                   janet_makefile(stdout, JANET_FILE_APPEND | default_flags),
20347|  8.33k|                   "The standard output file.");
20348|       |    /* stderr */
20349|  8.33k|    JANET_CORE_DEF(env, "stderr",
  ------------------
  |  |  491|  8.33k|#define JANET_CORE_DEF(ENV, NAME, X, DOC) janet_core_def_sm(ENV, NAME, X, DOC, NULL, 0)
  ------------------
20350|  8.33k|                   janet_makefile(stderr, JANET_FILE_APPEND | default_flags),
20351|  8.33k|                   "The standard error file.");
20352|       |    /* stdin */
20353|  8.33k|    JANET_CORE_DEF(env, "stdin",
  ------------------
  |  |  491|  8.33k|#define JANET_CORE_DEF(ENV, NAME, X, DOC) janet_core_def_sm(ENV, NAME, X, DOC, NULL, 0)
  ------------------
20354|  8.33k|                   janet_makefile(stdin, JANET_FILE_READ | default_flags),
20355|  8.33k|                   "The standard input file.");
20356|       |
20357|  8.33k|}
janet_marshal_size:
20738|  4.78k|void janet_marshal_size(JanetMarshalContext *ctx, size_t value) {
20739|  4.78k|    janet_marshal_int64(ctx, (int64_t) value);
20740|  4.78k|}
janet_marshal_int64:
20742|  4.87k|void janet_marshal_int64(JanetMarshalContext *ctx, int64_t value) {
20743|  4.87k|    MarshalState *st = (MarshalState *)(ctx->m_state);
20744|  4.87k|    push64(st, (uint64_t) value);
20745|  4.87k|}
janet_marshal_int:
20747|  9.57k|void janet_marshal_int(JanetMarshalContext *ctx, int32_t value) {
20748|  9.57k|    MarshalState *st = (MarshalState *)(ctx->m_state);
20749|  9.57k|    pushint(st, value);
20750|  9.57k|}
janet_marshal_abstract:
20792|  4.87k|void janet_marshal_abstract(JanetMarshalContext *ctx, void *abstract) {
20793|  4.87k|    MarshalState *st = (MarshalState *)(ctx->m_state);
20794|  4.87k|    Janet x = janet_wrap_abstract(abstract);
  ------------------
  |  |  851|  4.87k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  4.87k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.87k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.87k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20795|  4.87k|    MARK_SEEN();
  ------------------
  |  |20787|  4.87k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (20787:14): [True: 4.87k, False: 0]
  |  |  ------------------
  |  |20788|  4.87k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|  4.87k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|  4.87k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |20789|  4.87k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (20789:16): [Folded, False: 4.87k]
  |  |  ------------------
  ------------------
20796|  4.87k|}
janet_marshal_flags:
20798|  4.78k|int janet_marshal_flags(JanetMarshalContext *ctx) {
20799|  4.78k|    return ctx->flags;
20800|  4.78k|}
janet_marshal:
21058|   126k|    int flags) {
21059|   126k|    MarshalState st;
21060|   126k|    st.buf = buf;
21061|   126k|    st.nextid = 0;
21062|   126k|    st.seen_defs = NULL;
21063|   126k|    st.seen_envs = NULL;
21064|   126k|    st.rreg = rreg;
21065|   126k|    st.maybe_cycles = !(flags & JANET_MARSHAL_NO_CYCLES);
  ------------------
  |  | 1912|   126k|#define JANET_MARSHAL_NO_CYCLES 0x40000
  ------------------
21066|   126k|    janet_table_init(&st.seen, 0);
21067|   126k|    marshal_one(&st, x, flags);
21068|   126k|    janet_table_deinit(&st.seen);
21069|   126k|    janet_v_free(st.seen_envs);
  ------------------
  |  |  733|   126k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|  1.60k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 1.60k, False: 125k]
  |  |  ------------------
  ------------------
21070|       |    janet_v_free(st.seen_defs);
  ------------------
  |  |  733|   126k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|  96.7k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 96.7k, False: 30.0k]
  |  |  ------------------
  ------------------
21071|   126k|}
janet_unmarshal_int:
21611|  9.57k|int32_t janet_unmarshal_int(JanetMarshalContext *ctx) {
21612|  9.57k|    UnmarshalState *st = (UnmarshalState *)(ctx->u_state);
21613|  9.57k|    return readint(st, &(ctx->data));
21614|  9.57k|}
janet_unmarshal_size:
21616|  4.78k|size_t janet_unmarshal_size(JanetMarshalContext *ctx) {
21617|  4.78k|    return (size_t) janet_unmarshal_int64(ctx);
21618|  4.78k|}
janet_unmarshal_int64:
21620|  4.87k|int64_t janet_unmarshal_int64(JanetMarshalContext *ctx) {
21621|  4.87k|    UnmarshalState *st = (UnmarshalState *)(ctx->u_state);
21622|  4.87k|    return read64(st, &(ctx->data));
21623|  4.87k|}
janet_unmarshal_abstract_reuse:
21657|  4.87k|void janet_unmarshal_abstract_reuse(JanetMarshalContext *ctx, void *p) {
21658|  4.87k|    UnmarshalState *st = (UnmarshalState *)(ctx->u_state);
21659|  4.87k|    if (ctx->at == NULL) {
  ------------------
  |  Branch (21659:9): [True: 0, False: 4.87k]
  ------------------
21660|      0|        janet_panicf("janet_unmarshal_abstract called more than once");
21661|      0|    }
21662|  4.87k|    janet_v_push(st->lookup, janet_wrap_abstract(p));
  ------------------
  |  |  734|  4.87k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  4.87k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  4.87k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  4.87k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  4.87k|#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.87k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  4.87k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 0, False: 4.87k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 26, False: 4.84k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|     26|#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.87k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  4.87k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21663|       |    ctx->at = NULL;
21664|  4.87k|}
janet_unmarshal_abstract:
21666|  4.87k|void *janet_unmarshal_abstract(JanetMarshalContext *ctx, size_t size) {
21667|  4.87k|    void *p = janet_abstract(ctx->at, size);
21668|  4.87k|    janet_unmarshal_abstract_reuse(ctx, p);
21669|  4.87k|    return p;
21670|  4.87k|}
janet_unmarshal_flags:
21684|  4.78k|int janet_unmarshal_flags(JanetMarshalContext *ctx) {
21685|  4.78k|    return ctx->flags;
21686|  4.78k|}
janet_unmarshal:
22033|   595k|    const uint8_t **next) {
22034|   595k|    UnmarshalState st;
22035|   595k|    st.start = bytes;
22036|   595k|    st.end = bytes + len;
22037|   595k|    st.lookup_defs = NULL;
22038|   595k|    st.lookup_envs = NULL;
22039|   595k|    st.lookup = NULL;
22040|   595k|    st.reg = reg;
22041|   595k|    Janet out;
22042|   595k|    const uint8_t *nextbytes = unmarshal_one(&st, bytes, &out, flags);
22043|   595k|    if (next) *next = nextbytes;
  ------------------
  |  Branch (22043:9): [True: 6.05k, False: 589k]
  ------------------
22044|   595k|    janet_v_free(st.lookup_defs);
  ------------------
  |  |  733|   595k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|  10.6k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 10.6k, False: 584k]
  |  |  ------------------
  ------------------
22045|   595k|    janet_v_free(st.lookup_envs);
  ------------------
  |  |  733|   595k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|  9.94k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 9.94k, False: 585k]
  |  |  ------------------
  ------------------
22046|       |    janet_v_free(st.lookup);
  ------------------
  |  |  733|   595k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|   586k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 586k, False: 8.88k]
  |  |  ------------------
  ------------------
22047|   595k|    return out;
22048|   595k|}
cfun_marshal:
22073|   120k|              "cycles.") {
22074|   120k|    janet_arity(argc, 1, 4);
22075|   120k|    JanetBuffer *buffer;
22076|   120k|    JanetTable *rreg = NULL;
22077|   120k|    uint32_t flags = 0;
22078|   120k|    if (argc > 1) {
  ------------------
  |  Branch (22078:9): [True: 297, False: 120k]
  ------------------
22079|    297|        rreg = janet_gettable(argv, 1);
22080|    297|    }
22081|   120k|    if (argc > 2) {
  ------------------
  |  Branch (22081:9): [True: 288, False: 120k]
  ------------------
22082|    288|        buffer = janet_getbuffer(argv, 2);
22083|   120k|    } else {
22084|   120k|        buffer = janet_buffer(10);
22085|   120k|    }
22086|   120k|    if (argc > 3 && janet_truthy(argv[3])) {
  ------------------
  |  |  818|    286|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|    572|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 286]
  |  |  |  |  ------------------
  |  |  |  |  807|    572|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|    572|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|    286|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|    286|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    286|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    286|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 286, False: 0]
  |  |  ------------------
  |  |  819|    286|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|    572|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 286]
  |  |  |  |  ------------------
  |  |  |  |  807|    572|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|    572|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|    286|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|    286|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    286|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    286|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 286, False: 0]
  |  |  |  Branch (819:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (22086:9): [True: 286, False: 120k]
  ------------------
22087|    286|        flags |= JANET_MARSHAL_NO_CYCLES;
  ------------------
  |  | 1912|    286|#define JANET_MARSHAL_NO_CYCLES 0x40000
  ------------------
22088|    286|    }
22089|   120k|    janet_marshal(buffer, argv[0], rreg, flags);
22090|   120k|    return janet_wrap_buffer(buffer);
  ------------------
  |  |  847|   120k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|   120k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   120k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   120k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22091|   120k|}
cfun_unmarshal:
22097|   580k|              "Returns the value unmarshalled from `buf`.") {
22098|   580k|    janet_sandbox_assert(JANET_SANDBOX_UNMARSHAL);
  ------------------
  |  | 2044|   580k|#define JANET_SANDBOX_UNMARSHAL 262144
  ------------------
22099|   580k|    janet_arity(argc, 1, 2);
22100|   580k|    JanetByteView view = janet_getbytes(argv, 0);
22101|   580k|    JanetTable *reg = NULL;
22102|   580k|    if (argc > 1) {
  ------------------
  |  Branch (22102:9): [True: 11, False: 580k]
  ------------------
22103|     11|        reg = janet_gettable(argv, 1);
22104|     11|    }
22105|       |    return janet_unmarshal(view.bytes, (size_t) view.len, 0, reg, NULL);
22106|   580k|}
janet_lib_marsh:
22109|  8.33k|void janet_lib_marsh(JanetTable *env) {
22110|  8.33k|    JanetRegExt marsh_cfuns[] = {
22111|  8.33k|        JANET_CORE_REG("marshal", cfun_marshal),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22112|  8.33k|        JANET_CORE_REG("unmarshal", cfun_unmarshal),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22113|  8.33k|        JANET_CORE_REG("env-lookup", cfun_env_lookup),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22114|  8.33k|        JANET_REG_END
  ------------------
  |  | 2110|  8.33k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
22115|  8.33k|    };
22116|       |    janet_core_cfuns_ext(env, NULL, marsh_cfuns);
22117|  8.33k|}
janet_default_rng:
22192|  10.3k|JanetRNG *janet_default_rng(void) {
22193|  10.3k|    return &janet_vm.rng;
22194|  10.3k|}
janet_rng_seed:
22196|  94.1k|void janet_rng_seed(JanetRNG *rng, uint32_t seed) {
22197|  94.1k|    rng->a = seed;
22198|  94.1k|    rng->b = 0x97654321u;
22199|  94.1k|    rng->c = 123871873u;
22200|  94.1k|    rng->d = 0xf23f56c8u;
22201|  94.1k|    rng->counter = 0u;
22202|       |    /* First several numbers aren't that random. */
22203|  1.60M|    for (int i = 0; i < 16; i++) janet_rng_u32(rng);
  ------------------
  |  Branch (22203:21): [True: 1.50M, False: 94.1k]
  ------------------
22204|  94.1k|}
janet_rng_longseed:
22206|    658|void janet_rng_longseed(JanetRNG *rng, const uint8_t *bytes, int32_t len) {
22207|    658|    uint8_t state[16] = {0};
22208|  12.4k|    for (int32_t i = 0; i < len; i++)
  ------------------
  |  Branch (22208:25): [True: 11.7k, False: 658]
  ------------------
22209|  11.7k|        state[i & 0xF] ^= bytes[i];
22210|    658|    rng->a = state[0] + ((uint32_t) state[1] << 8) + ((uint32_t) state[2] << 16) + ((uint32_t) state[3] << 24);
22211|    658|    rng->b = state[4] + ((uint32_t) state[5] << 8) + ((uint32_t) state[6] << 16) + ((uint32_t) state[7] << 24);
22212|    658|    rng->c = state[8] + ((uint32_t) state[9] << 8) + ((uint32_t) state[10] << 16) + ((uint32_t) state[11] << 24);
22213|    658|    rng->d = state[12] + ((uint32_t) state[13] << 8) + ((uint32_t) state[14] << 16) + ((uint32_t) state[15] << 24);
22214|    658|    rng->counter = 0u;
22215|       |    /* a, b, c, d can't all be 0 */
22216|    658|    if (rng->a == 0) rng->a = 1u;
  ------------------
  |  Branch (22216:9): [True: 288, False: 370]
  ------------------
22217|  11.1k|    for (int i = 0; i < 16; i++) janet_rng_u32(rng);
  ------------------
  |  Branch (22217:21): [True: 10.5k, False: 658]
  ------------------
22218|    658|}
janet_rng_u32:
22220|  1.51M|uint32_t janet_rng_u32(JanetRNG *rng) {
22221|       |    /* Algorithm "xorwow" from p. 5 of Marsaglia, "Xorshift RNGs" */
22222|  1.51M|    uint32_t t = rng->d;
22223|  1.51M|    uint32_t const s = rng->a;
22224|  1.51M|    rng->d = rng->c;
22225|  1.51M|    rng->c = rng->b;
22226|  1.51M|    rng->b = s;
22227|  1.51M|    t ^= t >> 2;
22228|  1.51M|    t ^= t << 1;
22229|  1.51M|    t ^= s ^ (s << 4);
22230|  1.51M|    rng->a = t;
22231|  1.51M|    rng->counter += 362437;
22232|  1.51M|    return t + rng->counter;
22233|  1.51M|}
janet_rng_double:
22235|     77|double janet_rng_double(JanetRNG *rng) {
22236|     77|    uint32_t hi = janet_rng_u32(rng);
22237|     77|    uint32_t lo = janet_rng_u32(rng);
22238|     77|    uint64_t big = (uint64_t)(lo) | (((uint64_t) hi) << 32);
22239|     77|    return ldexp((double)(big >> (64 - 52)), -52);
22240|     77|}
cfun_rng_make:
22247|  74.0k|             ) {
22248|  74.0k|    janet_arity(argc, 0, 1);
22249|  74.0k|    JanetRNG *rng = janet_abstract(&janet_rng_type, sizeof(JanetRNG));
22250|  74.0k|    if (argc == 1) {
  ------------------
  |  Branch (22250:9): [True: 72.4k, False: 1.66k]
  ------------------
22251|  72.4k|        if (janet_checkint(argv[0])) {
  ------------------
  |  Branch (22251:13): [True: 71.7k, False: 664]
  ------------------
22252|  71.7k|            uint32_t seed = (uint32_t)(janet_getinteger(argv, 0));
22253|  71.7k|            janet_rng_seed(rng, seed);
22254|  71.7k|        } else {
22255|    664|            JanetByteView bytes = janet_getbytes(argv, 0);
22256|    664|            janet_rng_longseed(rng, bytes.bytes, bytes.len);
22257|    664|        }
22258|  72.4k|    } else {
22259|  1.66k|        janet_rng_seed(rng, 0);
22260|  1.66k|    }
22261|  74.0k|    return janet_wrap_abstract(rng);
  ------------------
  |  |  851|  74.0k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  74.0k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  74.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  74.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22262|  74.0k|}
cfun_rng_uniform:
22267|      2|             ) {
22268|      2|    janet_fixarity(argc, 1);
22269|      2|    JanetRNG *rng = janet_getabstract(argv, 0, &janet_rng_type);
22270|      2|    return janet_wrap_number(janet_rng_double(rng));
  ------------------
  |  |  835|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22271|      2|}
cfun_rng_int:
22278|      2|             ) {
22279|      2|    janet_arity(argc, 1, 2);
22280|      2|    JanetRNG *rng = janet_getabstract(argv, 0, &janet_rng_type);
22281|      2|    if (argc == 1) {
  ------------------
  |  Branch (22281:9): [True: 0, False: 2]
  ------------------
22282|      0|        uint32_t word = janet_rng_u32(rng) >> 1;
22283|      0|        return janet_wrap_integer(word);
  ------------------
  |  |  967|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
22284|      2|    } else {
22285|      2|        int32_t max = janet_optnat(argv, argc, 1, INT32_MAX);
22286|      2|        if (max == 0) return janet_wrap_number(0.0);
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
  |  Branch (22286:13): [True: 0, False: 2]
  ------------------
22287|      2|        uint32_t modulo = (uint32_t) max;
22288|      2|        uint32_t maxgen = INT32_MAX;
22289|      2|        uint32_t maxword = maxgen - (maxgen % modulo);
22290|      2|        uint32_t word;
22291|      2|        do {
22292|      2|            word = janet_rng_u32(rng) >> 1;
22293|      2|        } while (word > maxword);
  ------------------
  |  Branch (22293:18): [True: 0, False: 2]
  ------------------
22294|      2|        return janet_wrap_integer(word % modulo);
  ------------------
  |  |  967|      2|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
22295|      2|    }
22296|      2|}
cfun_rng_buffer:
22310|      2|             ) {
22311|      2|    janet_arity(argc, 2, 3);
22312|      2|    JanetRNG *rng = janet_getabstract(argv, 0, &janet_rng_type);
22313|      2|    int32_t n = janet_getnat(argv, 1);
22314|      2|    JanetBuffer *buffer = janet_optbuffer(argv, argc, 2, n);
22315|       |
22316|       |    /* Split into first part (that is divisible by 4), and rest */
22317|      2|    int32_t first_part = n & ~3;
22318|      2|    int32_t second_part = n - first_part;
22319|       |
22320|       |    /* Get first part in chunks of 4 bytes */
22321|      2|    janet_buffer_extra(buffer, n);
22322|      2|    uint8_t *buf = buffer->data + buffer->count;
22323|      2|    for (int32_t i = 0; i < first_part; i += 4) rng_get_4bytes(rng, buf + i);
  ------------------
  |  Branch (22323:25): [True: 0, False: 2]
  ------------------
22324|      2|    buffer->count += first_part;
22325|       |
22326|       |    /* Get remaining 0 - 3 bytes */
22327|      2|    if (second_part) {
  ------------------
  |  Branch (22327:9): [True: 0, False: 2]
  ------------------
22328|      0|        uint8_t wordbuf[4] = {0};
22329|      0|        rng_get_4bytes(rng, wordbuf);
22330|      0|        janet_buffer_push_bytes(buffer, wordbuf, second_part);
22331|      0|    }
22332|       |
22333|      2|    return janet_wrap_buffer(buffer);
  ------------------
  |  |  847|      2|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|      2|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22334|      2|}
janet_rand:
22357|     78|              "Returns a uniformly distributed random number between 0 and 1.") {
22358|     78|    (void) argv;
22359|     78|    janet_fixarity(argc, 0);
22360|     78|    return janet_wrap_number(janet_rng_double(&janet_vm.rng));
  ------------------
  |  |  835|     78|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22361|     78|}
janet_srand:
22368|      8|             ) {
22369|      8|    janet_fixarity(argc, 1);
22370|      8|    if (janet_checkint(argv[0])) {
  ------------------
  |  Branch (22370:9): [True: 0, False: 8]
  ------------------
22371|      0|        uint32_t seed = (uint32_t)(janet_getinteger(argv, 0));
22372|      0|        janet_rng_seed(&janet_vm.rng, seed);
22373|      8|    } else {
22374|      8|        JanetByteView bytes = janet_getbytes(argv, 0);
22375|      8|        janet_rng_longseed(&janet_vm.rng, bytes.bytes, bytes.len);
22376|      8|    }
22377|      8|    return janet_wrap_nil();
  ------------------
  |  |  831|      8|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      8|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      8|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      8|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22378|      8|}
janet_acos:
22381|    335|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|    335|    janet_fixarity(argc, 1); \
22383|    335|    double x = janet_getnumber(argv, 0); \
22384|    335|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|    335|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|    335|}
janet_asin:
22381|     19|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|     19|    janet_fixarity(argc, 1); \
22383|     19|    double x = janet_getnumber(argv, 0); \
22384|     19|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|     19|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|     19|}
janet_atan:
22381|    271|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|    271|    janet_fixarity(argc, 1); \
22383|    271|    double x = janet_getnumber(argv, 0); \
22384|    271|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|    271|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|    271|}
janet_cos:
22381|    387|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|    387|    janet_fixarity(argc, 1); \
22383|    387|    double x = janet_getnumber(argv, 0); \
22384|    387|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|    387|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|    387|}
janet_cosh:
22381|     39|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|     39|    janet_fixarity(argc, 1); \
22383|     39|    double x = janet_getnumber(argv, 0); \
22384|     39|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|     39|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|     39|}
janet_acosh:
22381|      5|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|      5|    janet_fixarity(argc, 1); \
22383|      5|    double x = janet_getnumber(argv, 0); \
22384|      5|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      5|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|      5|}
janet_sin:
22381|      9|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|      9|    janet_fixarity(argc, 1); \
22383|      9|    double x = janet_getnumber(argv, 0); \
22384|      9|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      9|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|      9|}
janet_tan:
22381|  4.67k|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|  4.67k|    janet_fixarity(argc, 1); \
22383|  4.67k|    double x = janet_getnumber(argv, 0); \
22384|  4.67k|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|  4.67k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|  4.67k|}
janet_tanh:
22381|    251|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|    251|    janet_fixarity(argc, 1); \
22383|    251|    double x = janet_getnumber(argv, 0); \
22384|    251|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|    251|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|    251|}
janet_exp:
22381|      1|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|      1|    janet_fixarity(argc, 1); \
22383|      1|    double x = janet_getnumber(argv, 0); \
22384|      1|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|      1|}
janet_exp2:
22381|     51|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|     51|    janet_fixarity(argc, 1); \
22383|     51|    double x = janet_getnumber(argv, 0); \
22384|     51|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|     51|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|     51|}
janet_log1p:
22381|      7|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|      7|    janet_fixarity(argc, 1); \
22383|      7|    double x = janet_getnumber(argv, 0); \
22384|      7|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      7|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|      7|}
janet_expm1:
22381|     10|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|     10|    janet_fixarity(argc, 1); \
22383|     10|    double x = janet_getnumber(argv, 0); \
22384|     10|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|     10|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|     10|}
janet_cbrt:
22381|      3|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|      3|    janet_fixarity(argc, 1); \
22383|      3|    double x = janet_getnumber(argv, 0); \
22384|      3|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      3|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|      3|}
janet_erf:
22381|    913|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|    913|    janet_fixarity(argc, 1); \
22383|    913|    double x = janet_getnumber(argv, 0); \
22384|    913|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|    913|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|    913|}
janet_erfc:
22381|  91.6k|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|  91.6k|    janet_fixarity(argc, 1); \
22383|  91.6k|    double x = janet_getnumber(argv, 0); \
22384|  91.6k|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|  91.6k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|  91.6k|}
janet_lgamma:
22381|     12|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|     12|    janet_fixarity(argc, 1); \
22383|     12|    double x = janet_getnumber(argv, 0); \
22384|     12|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|     12|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|     12|}
janet_atanh:
22381|      2|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|      2|    janet_fixarity(argc, 1); \
22383|      2|    double x = janet_getnumber(argv, 0); \
22384|      2|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|      2|}
janet_asinh:
22381|      3|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|      3|    janet_fixarity(argc, 1); \
22383|      3|    double x = janet_getnumber(argv, 0); \
22384|      3|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      3|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|      3|}
janet_log:
22381|  2.05k|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|  2.05k|    janet_fixarity(argc, 1); \
22383|  2.05k|    double x = janet_getnumber(argv, 0); \
22384|  2.05k|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|  2.05k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|  2.05k|}
janet_log10:
22381|      3|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|      3|    janet_fixarity(argc, 1); \
22383|      3|    double x = janet_getnumber(argv, 0); \
22384|      3|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      3|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|      3|}
janet_log2:
22381|  2.89k|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|  2.89k|    janet_fixarity(argc, 1); \
22383|  2.89k|    double x = janet_getnumber(argv, 0); \
22384|  2.89k|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|  2.89k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|  2.89k|}
janet_sqrt:
22381|      1|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|      1|    janet_fixarity(argc, 1); \
22383|      1|    double x = janet_getnumber(argv, 0); \
22384|      1|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|      1|}
janet_ceil:
22381|      4|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|      4|    janet_fixarity(argc, 1); \
22383|      4|    double x = janet_getnumber(argv, 0); \
22384|      4|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|      4|}
janet_floor:
22381|      2|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|      2|    janet_fixarity(argc, 1); \
22383|      2|    double x = janet_getnumber(argv, 0); \
22384|      2|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|      2|}
janet_round:
22381|      7|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
22382|      7|    janet_fixarity(argc, 1); \
22383|      7|    double x = janet_getnumber(argv, 0); \
22384|      7|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      7|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22385|      7|}
janet_atan2:
22423|     89|JANET_CORE_FN(janet_##name, signature, doc) {\
22424|     89|    janet_fixarity(argc, 2); \
22425|     89|    double lhs = janet_getnumber(argv, 0); \
22426|     89|    double rhs = janet_getnumber(argv, 1); \
22427|     89|    return janet_wrap_number(fop(lhs, rhs)); \
  ------------------
  |  |  835|     89|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22428|     89|}
janet_pow:
22423|    312|JANET_CORE_FN(janet_##name, signature, doc) {\
22424|    312|    janet_fixarity(argc, 2); \
22425|    312|    double lhs = janet_getnumber(argv, 0); \
22426|    312|    double rhs = janet_getnumber(argv, 1); \
22427|    312|    return janet_wrap_number(fop(lhs, rhs)); \
  ------------------
  |  |  835|    312|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22428|    312|}
janet_not:
22437|  38.1M|JANET_CORE_FN(janet_not, "(not x)", "Returns the boolean inverse of x.") {
22438|  38.1M|    janet_fixarity(argc, 1);
22439|  38.1M|    return janet_wrap_boolean(!janet_truthy(argv[0]));
  ------------------
  |  |  834|  38.1M|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|   116M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  38.1M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  38.1M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (822:51): [True: 0, False: 0]
  |  |  |  |  |  Branch (822:51): [True: 0, False: 0]
  |  |  |  |  |  Branch (822:51): [Folded, False: 38.1M]
  |  |  |  |  |  Branch (822:51): [True: 0, False: 0]
  |  |  |  |  |  Branch (822:51): [True: 0, False: 0]
  |  |  |  |  |  Branch (822:51): [Folded, False: 546k]
  |  |  |  |  |  Branch (822:51): [True: 174k, False: 372k]
  |  |  |  |  |  Branch (822:51): [True: 226k, False: 145k]
  |  |  |  |  |  Branch (822:51): [True: 546k, False: 37.5M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22440|  38.1M|}
janet_cfun_lcm:
22472|    909|              "Returns the least common multiple of x and y.") {
22473|    909|    janet_fixarity(argc, 2);
22474|    909|    double x = janet_getnumber(argv, 0);
22475|    909|    double y = janet_getnumber(argv, 1);
22476|    909|    return janet_wrap_number(janet_lcm(x, y));
  ------------------
  |  |  835|    909|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22477|    909|}
janet_cfun_frexp:
22480|      6|              "Returns a tuple of `[mantissa exponent]` from a number `x`.") {
22481|      6|    janet_fixarity(argc, 1);
22482|      6|    double x = janet_getnumber(argv, 0);
22483|      6|    int exp;
22484|      6|    x = frexp(x, &exp);
22485|      6|    Janet *result = janet_tuple_begin(2);
22486|      6|    result[0] = janet_wrap_number(x);
  ------------------
  |  |  835|      6|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22487|      6|    result[1] = janet_wrap_number((double) exp);
  ------------------
  |  |  835|      6|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22488|      6|    return janet_wrap_tuple(janet_tuple_end(result));
  ------------------
  |  |  843|      6|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|      6|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      6|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      6|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22489|      6|}
janet_lib_math:
22500|  8.33k|void janet_lib_math(JanetTable *env) {
22501|  8.33k|    JanetRegExt math_cfuns[] = {
22502|  8.33k|        JANET_CORE_REG("not", janet_not),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22503|  8.33k|        JANET_CORE_REG("math/random", janet_rand),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22504|  8.33k|        JANET_CORE_REG("math/seedrandom", janet_srand),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22505|  8.33k|        JANET_CORE_REG("math/cos", janet_cos),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22506|  8.33k|        JANET_CORE_REG("math/sin", janet_sin),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22507|  8.33k|        JANET_CORE_REG("math/tan", janet_tan),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22508|  8.33k|        JANET_CORE_REG("math/acos", janet_acos),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22509|  8.33k|        JANET_CORE_REG("math/asin", janet_asin),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22510|  8.33k|        JANET_CORE_REG("math/atan", janet_atan),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22511|  8.33k|        JANET_CORE_REG("math/exp", janet_exp),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22512|  8.33k|        JANET_CORE_REG("math/log", janet_log),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22513|  8.33k|        JANET_CORE_REG("math/log10", janet_log10),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22514|  8.33k|        JANET_CORE_REG("math/log2", janet_log2),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22515|  8.33k|        JANET_CORE_REG("math/sqrt", janet_sqrt),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22516|  8.33k|#ifndef JANET_PLAN9
22517|  8.33k|        JANET_CORE_REG("math/cbrt", janet_cbrt),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22518|  8.33k|        JANET_CORE_REG("math/gamma", janet_tgamma),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22519|  8.33k|        JANET_CORE_REG("math/log-gamma", janet_lgamma),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22520|  8.33k|        JANET_CORE_REG("math/erfc", janet_erfc),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22521|  8.33k|        JANET_CORE_REG("math/erf", janet_erf),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22522|  8.33k|        JANET_CORE_REG("math/expm1", janet_expm1),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22523|  8.33k|        JANET_CORE_REG("math/atanh", janet_atanh),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22524|  8.33k|        JANET_CORE_REG("math/asinh", janet_asinh),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22525|  8.33k|        JANET_CORE_REG("math/next", janet_nextafter),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22526|  8.33k|#endif
22527|  8.33k|        JANET_CORE_REG("math/floor", janet_floor),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22528|  8.33k|        JANET_CORE_REG("math/ceil", janet_ceil),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22529|  8.33k|        JANET_CORE_REG("math/pow", janet_pow),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22530|  8.33k|        JANET_CORE_REG("math/abs", janet_fabs),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22531|  8.33k|        JANET_CORE_REG("math/sinh", janet_sinh),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22532|  8.33k|        JANET_CORE_REG("math/cosh", janet_cosh),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22533|  8.33k|        JANET_CORE_REG("math/tanh", janet_tanh),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22534|  8.33k|        JANET_CORE_REG("math/acosh", janet_acosh),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22535|  8.33k|        JANET_CORE_REG("math/atan2", janet_atan2),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22536|  8.33k|        JANET_CORE_REG("math/rng", cfun_rng_make),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22537|  8.33k|        JANET_CORE_REG("math/rng-uniform", cfun_rng_uniform),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22538|  8.33k|        JANET_CORE_REG("math/rng-int", cfun_rng_int),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22539|  8.33k|        JANET_CORE_REG("math/rng-buffer", cfun_rng_buffer),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22540|  8.33k|        JANET_CORE_REG("math/hypot", janet_hypot),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22541|  8.33k|        JANET_CORE_REG("math/exp2", janet_exp2),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22542|  8.33k|        JANET_CORE_REG("math/log1p", janet_log1p),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22543|  8.33k|        JANET_CORE_REG("math/trunc", janet_trunc),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22544|  8.33k|        JANET_CORE_REG("math/round", janet_round),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22545|  8.33k|        JANET_CORE_REG("math/gcd", janet_cfun_gcd),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22546|  8.33k|        JANET_CORE_REG("math/lcm", janet_cfun_lcm),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22547|  8.33k|        JANET_CORE_REG("math/frexp", janet_cfun_frexp),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22548|  8.33k|        JANET_CORE_REG("math/ldexp", janet_cfun_ldexp),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22549|  8.33k|        JANET_REG_END
  ------------------
  |  | 2110|  8.33k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
22550|  8.33k|    };
22551|  8.33k|    janet_core_cfuns_ext(env, NULL, math_cfuns);
22552|  8.33k|    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|  8.33k|}
net_callback_connect:
22754|      1|void net_callback_connect(JanetFiber *fiber, JanetAsyncEvent event) {
22755|      1|    JanetStream *stream = fiber->ev_stream;
22756|      1|    switch (event) {
22757|      0|        default:
  ------------------
  |  Branch (22757:9): [True: 0, False: 1]
  ------------------
22758|      0|            break;
22759|      0|#ifndef JANET_WINDOWS
22760|       |        /* Wait until we have an actual event before checking.
22761|       |         * Windows doesn't support async connect with this, just try immediately.*/
22762|      1|        case JANET_ASYNC_EVENT_INIT:
  ------------------
  |  Branch (22762:9): [True: 1, False: 0]
  ------------------
22763|      1|#endif
22764|      1|        case JANET_ASYNC_EVENT_DEINIT:
  ------------------
  |  Branch (22764:9): [True: 0, False: 1]
  ------------------
22765|      1|            return;
22766|      0|        case JANET_ASYNC_EVENT_CLOSE:
  ------------------
  |  Branch (22766:9): [True: 0, False: 1]
  ------------------
22767|      0|            janet_cancel(fiber, janet_cstringv("stream closed"));
  ------------------
  |  | 1826|      0|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22768|      0|            janet_async_end(fiber);
22769|      0|            return;
22770|      1|    }
22771|       |#ifdef JANET_WINDOWS
22772|       |    /* We should be using ConnectEx here */
22773|       |    int res = 0;
22774|       |    int size = sizeof(res);
22775|       |    int r = getsockopt((SOCKET)stream->handle, SOL_SOCKET, SO_CONNECT_TIME, (char *)&res, &size);
22776|       |    if (r == NO_ERROR && res == (~0)) {
22777|       |        return; /* This apparently indicates we haven't yet gotten a connection */
22778|       |    }
22779|       |    const int no_error = NO_ERROR;
22780|       |#else
22781|      0|    int res = 0;
22782|      0|    socklen_t size = sizeof(res);
22783|      0|    int r = getsockopt(stream->handle, SOL_SOCKET, SO_ERROR, &res, &size);
22784|      0|    const int no_error = 0;
22785|      0|#endif
22786|      0|    if (r == no_error) {
  ------------------
  |  Branch (22786:9): [True: 0, False: 0]
  ------------------
22787|      0|        if (res == 0) {
  ------------------
  |  Branch (22787:13): [True: 0, False: 0]
  ------------------
22788|      0|            janet_schedule(fiber, janet_wrap_abstract(stream));
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22789|      0|        } else {
22790|      0|            janet_cancel(fiber, janet_cstringv(janet_strerror(res)));
  ------------------
  |  | 1826|      0|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22791|      0|            stream->flags |= JANET_STREAM_TOCLOSE;
  ------------------
  |  |  630|      0|#define JANET_STREAM_TOCLOSE 0x10000
  ------------------
22792|      0|        }
22793|      0|    } else {
22794|      0|        janet_cancel(fiber, janet_ev_lasterr());
22795|      0|        stream->flags |= JANET_STREAM_TOCLOSE;
  ------------------
  |  |  630|      0|#define JANET_STREAM_TOCLOSE 0x10000
  ------------------
22796|      0|    }
22797|      0|    janet_async_end(fiber);
22798|      0|}
cfun_net_sockaddr:
23059|      5|              "addresses that match in an array instead of just the first.") {
23060|      5|    janet_sandbox_assert(JANET_SANDBOX_NET_CONNECT); /* connect OR listen */
  ------------------
  |  | 2025|      5|#define JANET_SANDBOX_NET_CONNECT 4
  ------------------
23061|      5|    janet_arity(argc, 2, 4);
23062|      5|    int socktype = janet_get_sockettype(argv, argc, 2);
23063|      5|    int is_unix = 0;
23064|      5|    int make_arr = (argc >= 3 && janet_truthy(argv[3]));
  ------------------
  |  |  818|      3|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|      6|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 3]
  |  |  |  |  ------------------
  |  |  |  |  807|      6|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!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|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|      3|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|      3|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 2, False: 1]
  |  |  ------------------
  |  |  819|      3|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|      4|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 2]
  |  |  |  |  ------------------
  |  |  |  |  807|      4|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!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|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|      2|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|      2|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 1, False: 1]
  |  |  |  Branch (819:47): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (23064:21): [True: 3, False: 2]
  ------------------
23065|      5|    socklen_t addrsize = 0;
23066|      5|    struct addrinfo *ai = janet_get_addrinfo(argv, 0, socktype, 0, &is_unix, &addrsize);
23067|      5|#ifndef JANET_WINDOWS
23068|       |    /* no unix domain socket support on windows yet */
23069|      5|    if (is_unix) {
  ------------------
  |  Branch (23069:9): [True: 0, False: 5]
  ------------------
23070|      0|        void *abst = janet_abstract(&janet_address_type, addrsize);
23071|      0|        memcpy(abst, ai, addrsize);
23072|      0|        Janet ret = janet_wrap_abstract(abst);
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23073|      0|        janet_freeaddrinfo(ai, is_unix);
23074|      0|        return make_arr ? janet_wrap_array(janet_array_n(&ret, 1)) : ret;
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (23074:16): [True: 0, False: 0]
  ------------------
23075|      0|    }
23076|      5|#endif
23077|      5|    if (make_arr) {
  ------------------
  |  Branch (23077:9): [True: 0, False: 5]
  ------------------
23078|       |        /* Select all */
23079|      0|        JanetArray *arr = janet_array(10);
23080|      0|        struct addrinfo *iter = ai;
23081|      0|        while (NULL != iter) {
  ------------------
  |  Branch (23081:16): [True: 0, False: 0]
  ------------------
23082|      0|            void *abst = janet_abstract(&janet_address_type, iter->ai_addrlen);
23083|      0|            memcpy(abst, iter->ai_addr, iter->ai_addrlen);
23084|      0|            janet_array_push(arr, janet_wrap_abstract(abst));
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23085|      0|            iter = iter->ai_next;
23086|      0|        }
23087|      0|        janet_freeaddrinfo(ai, is_unix);
23088|      0|        return janet_wrap_array(arr);
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23089|      5|    } else {
23090|       |        /* Select first */
23091|      5|        if (NULL == ai) {
  ------------------
  |  Branch (23091:13): [True: 0, False: 5]
  ------------------
23092|      0|            janet_panic("no data for given address");
23093|      0|        }
23094|      5|        void *abst = janet_abstract(&janet_address_type, ai->ai_addrlen);
23095|      5|        memcpy(abst, ai->ai_addr, ai->ai_addrlen);
23096|      5|        janet_freeaddrinfo(ai, is_unix);
23097|      5|        return janet_wrap_abstract(abst);
  ------------------
  |  |  851|      5|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|      5|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      5|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      5|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23098|      5|    }
23099|      5|}
cfun_net_connect:
23110|     16|              "using the OS's preferred address.") {
23111|     16|    janet_sandbox_assert(JANET_SANDBOX_NET_CONNECT);
  ------------------
  |  | 2025|     16|#define JANET_SANDBOX_NET_CONNECT 4
  ------------------
23112|     16|    janet_arity(argc, 2, 5);
23113|       |
23114|       |    /* Check arguments */
23115|     16|    int socktype = janet_get_sockettype(argv, argc, 2);
23116|     16|    int is_unix = 0;
23117|     16|    char *bindhost = (char *) janet_optcstring(argv, argc, 3, NULL);
23118|     16|    char *bindport = NULL;
23119|     16|    if (argc >= 5 && janet_checkint(argv[4])) {
  ------------------
  |  Branch (23119:9): [True: 0, False: 16]
  |  Branch (23119:22): [True: 0, False: 0]
  ------------------
23120|      0|        bindport = (char *)janet_to_string(argv[4]);
23121|     16|    } else {
23122|     16|        bindport = (char *)janet_optcstring(argv, argc, 4, NULL);
23123|     16|    }
23124|       |
23125|       |    /* Where we're connecting to */
23126|     16|    socklen_t addrlen = 0;
23127|     16|    struct addrinfo *ai = janet_get_addrinfo(argv, 0, socktype, 0, &is_unix, &addrlen);
23128|       |
23129|       |    /* Check if we're binding address */
23130|     16|    struct addrinfo *binding = NULL;
23131|     16|    if (bindhost != NULL) {
  ------------------
  |  Branch (23131:9): [True: 0, False: 16]
  ------------------
23132|      0|        if (is_unix) {
  ------------------
  |  Branch (23132:13): [True: 0, False: 0]
  ------------------
23133|      0|            janet_freeaddrinfo(ai, is_unix);
23134|      0|            janet_panic("bindhost not supported for unix domain sockets");
23135|      0|        }
23136|       |        /* getaddrinfo */
23137|      0|        struct addrinfo hints;
23138|      0|        memset(&hints, 0, sizeof(hints));
23139|      0|        hints.ai_family = AF_UNSPEC;
23140|      0|        hints.ai_socktype = socktype;
23141|      0|        hints.ai_flags = 0;
23142|      0|        int status = getaddrinfo(bindhost, bindport, &hints, &binding);
23143|      0|        if (status) {
  ------------------
  |  Branch (23143:13): [True: 0, False: 0]
  ------------------
23144|      0|            janet_freeaddrinfo(ai, is_unix);
23145|      0|            janet_panicf("could not get address info for bindhost: %s", gai_strerror(status));
23146|      0|        }
23147|      0|    }
23148|       |
23149|       |    /* Create socket */
23150|     16|    JSock sock = JSOCKDEFAULT;
  ------------------
  |  |22653|     16|#define JSock int
  ------------------
                  JSock sock = JSOCKDEFAULT;
  ------------------
  |  |22651|     16|#define JSOCKDEFAULT 0
  ------------------
23151|     16|    void *addr = NULL;
23152|     16|#ifndef JANET_WINDOWS
23153|     16|    if (is_unix) {
  ------------------
  |  Branch (23153:9): [True: 0, False: 16]
  ------------------
23154|      0|        sock = socket(AF_UNIX, socktype | JSOCKFLAGS, 0);
  ------------------
  |  |22655|      0|#define JSOCKFLAGS SOCK_CLOEXEC
  ------------------
23155|      0|        if (!JSOCKVALID(sock)) {
  ------------------
  |  |22652|      0|#define JSOCKVALID(x) ((x) >= 0)
  ------------------
  |  Branch (23155:13): [True: 0, False: 0]
  ------------------
23156|      0|            Janet v = janet_ev_lasterr();
23157|      0|            janet_free(ai);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
23158|      0|            janet_panicf("could not create socket: %V", v);
23159|      0|        }
23160|      0|        addr = (void *) ai;
23161|      0|    } else
23162|     16|#endif
23163|     16|    {
23164|     16|        struct addrinfo *rp = NULL;
23165|     16|        for (rp = ai; rp != NULL; rp = rp->ai_next) {
  ------------------
  |  Branch (23165:23): [True: 1, False: 15]
  ------------------
23166|       |#ifdef JANET_WINDOWS
23167|       |            sock = WSASocketW(rp->ai_family, rp->ai_socktype, rp->ai_protocol, NULL, 0, WSA_FLAG_OVERLAPPED);
23168|       |#else
23169|      1|            sock = socket(rp->ai_family, rp->ai_socktype | JSOCKFLAGS, rp->ai_protocol);
  ------------------
  |  |22655|      1|#define JSOCKFLAGS SOCK_CLOEXEC
  ------------------
23170|      1|#endif
23171|      1|            if (JSOCKVALID(sock)) {
  ------------------
  |  |22652|      1|#define JSOCKVALID(x) ((x) >= 0)
  |  |  ------------------
  |  |  |  Branch (22652:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
23172|      1|                addr = rp->ai_addr;
23173|      1|                addrlen = (socklen_t) rp->ai_addrlen;
23174|      1|                break;
23175|      1|            }
23176|      1|        }
23177|     16|        if (NULL == addr) {
  ------------------
  |  Branch (23177:13): [True: 0, False: 16]
  ------------------
23178|      0|            Janet v = janet_ev_lasterr();
23179|      0|            if (binding) freeaddrinfo(binding);
  ------------------
  |  Branch (23179:17): [True: 0, False: 0]
  ------------------
23180|      0|            freeaddrinfo(ai);
23181|      0|            janet_panicf("could not create socket: %V", v);
23182|      0|        }
23183|     16|    }
23184|       |
23185|       |    /* Bind to bindhost and bindport if given */
23186|     16|    if (binding) {
  ------------------
  |  Branch (23186:9): [True: 0, False: 16]
  ------------------
23187|      0|        struct addrinfo *rp = NULL;
23188|      0|        int did_bind = 0;
23189|      0|        for (rp = binding; rp != NULL; rp = rp->ai_next) {
  ------------------
  |  Branch (23189:28): [True: 0, False: 0]
  ------------------
23190|      0|            if (bind(sock, rp->ai_addr, (int) rp->ai_addrlen) == 0) {
  ------------------
  |  Branch (23190:17): [True: 0, False: 0]
  ------------------
23191|      0|                did_bind = 1;
23192|      0|                break;
23193|      0|            }
23194|      0|        }
23195|      0|        if (!did_bind) {
  ------------------
  |  Branch (23195:13): [True: 0, False: 0]
  ------------------
23196|      0|            Janet v = janet_ev_lasterr();
23197|      0|            freeaddrinfo(binding);
23198|      0|            freeaddrinfo(ai);
23199|      0|            JSOCKCLOSE(sock);
  ------------------
  |  |22650|      0|#define JSOCKCLOSE(x) close(x)
  ------------------
23200|      0|            janet_panicf("could not bind outgoing address: %V", v);
23201|      0|        } else {
23202|      0|            freeaddrinfo(binding);
23203|      0|        }
23204|      0|    }
23205|       |
23206|       |    /* Wrap socket in abstract type JanetStream */
23207|     16|    uint32_t udp_flag = 0;
23208|     16|    if (socktype == SOCK_DGRAM) udp_flag = JANET_STREAM_UDPSERVER;
  ------------------
  |  |  628|      0|#define JANET_STREAM_UDPSERVER 0x1000
  ------------------
  |  Branch (23208:9): [True: 0, False: 16]
  ------------------
23209|     16|    JanetStream *stream = make_stream(sock, JANET_STREAM_READABLE | JANET_STREAM_WRITABLE | udp_flag);
  ------------------
  |  |  625|     16|#define JANET_STREAM_READABLE 0x200
  ------------------
                  JanetStream *stream = make_stream(sock, JANET_STREAM_READABLE | JANET_STREAM_WRITABLE | udp_flag);
  ------------------
  |  |  626|     16|#define JANET_STREAM_WRITABLE 0x400
  ------------------
23210|       |
23211|       |    /* Connect to socket */
23212|       |#ifdef JANET_WINDOWS
23213|       |    int status = 0;
23214|       |    int err = 0;
23215|       |    LPFN_CONNECTEX connect_ex = NULL;
23216|       |    if (socktype == SOCK_STREAM && ((connect_ex = lazy_get_connectex(sock)))) {
23217|       |        /* Prefer ConnecEx as it works well with overlapped IO. */
23218|       |        janet_net_socknoblock(sock);
23219|       |        NetStateConnect *state = janet_malloc(sizeof(NetStateConnect));
23220|       |        memset(state, 0, sizeof(NetStateConnect));
23221|       |        BOOL success = connect_ex(sock, addr, addrlen, NULL, 0, NULL, &state->overlapped.as.overlapped);
23222|       |        freeaddrinfo(ai);
23223|       |        if (success) {
23224|       |            /* Did not fail */
23225|       |        } else {
23226|       |            int err = WSAGetLastError();
23227|       |            if (err == ERROR_IO_PENDING) {
23228|       |                /* Did not actually fail yet */
23229|       |            } else {
23230|       |                janet_free(state);
23231|       |                Janet lasterr = janet_ev_lasterr();
23232|       |                janet_panicf("could not connect socket (ConnectEx): %V", lasterr);
23233|       |            }
23234|       |        }
23235|       |
23236|       |        net_sched_connect(stream, state);
23237|       |    } else {
23238|       |        /* Default to blocking connect if ConnectEx not available */
23239|       |        status = WSAConnect(sock, addr, addrlen, NULL, NULL, NULL, NULL);
23240|       |        err = WSAGetLastError();
23241|       |        freeaddrinfo(ai);
23242|       |        /* Set up the socket for non-blocking IO after connecting on windows by default */
23243|       |        janet_net_socknoblock(sock);
23244|       |    }
23245|       |
23246|       |#else
23247|       |    /* Set up the socket for non-blocking IO before connecting */
23248|     16|    janet_net_socknoblock(sock);
23249|     16|    int status;
23250|     16|    do {
23251|     16|        status = connect(sock, addr, addrlen);
23252|     16|    } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (23252:14): [True: 1, False: 15]
  |  Branch (23252:30): [True: 0, False: 1]
  ------------------
23253|     16|    int err = errno;
23254|     16|    janet_freeaddrinfo(ai, is_unix);
23255|     16|#endif
23256|       |
23257|     16|    if (status == 0) {
  ------------------
  |  Branch (23257:9): [True: 0, False: 16]
  ------------------
23258|       |        /* Connect completed synchronously (common for unix domain sockets).
23259|       |         * Return the stream directly without scheduling an async wait,
23260|       |         * as edge-triggered kqueue may not signal EVFILT_WRITE if the socket
23261|       |         * is already connected when registered. */
23262|      0|        return janet_wrap_abstract(stream);
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23263|      0|    }
23264|       |
23265|       |#ifdef JANET_WINDOWS
23266|       |    if (status == SOCKET_ERROR) {
23267|       |        if (err != WSAEWOULDBLOCK) {
23268|       |#else
23269|     16|    if (status == -1) {
  ------------------
  |  Branch (23269:9): [True: 1, False: 15]
  ------------------
23270|      1|        if (err != EINPROGRESS) {
  ------------------
  |  Branch (23270:13): [True: 0, False: 1]
  ------------------
23271|      0|#endif
23272|      0|            JSOCKCLOSE(sock);
  ------------------
  |  |22650|      0|#define JSOCKCLOSE(x) close(x)
  ------------------
23273|      0|            Janet lasterr = janet_ev_lasterr();
23274|      0|            janet_panicf("could not connect socket: %V", lasterr);
23275|      0|        }
23276|      1|    }
23277|       |
23278|     16|    net_sched_connect(stream, NULL);
23279|     16|}
cfun_net_socket:
23286|      9|              "should be `:ipv4` or `:ipv6`.") {
23287|      9|    janet_arity(argc, 0, 2);
23288|       |
23289|      9|    int socktype = janet_get_sockettype(argv, argc, 0);
23290|       |
23291|       |    /* Create socket */
23292|      9|    JSock sfd = JSOCKDEFAULT;
  ------------------
  |  |22653|      9|#define JSock int
  ------------------
                  JSock sfd = JSOCKDEFAULT;
  ------------------
  |  |22651|      9|#define JSOCKDEFAULT 0
  ------------------
23293|      9|    struct addrinfo *ai = NULL;
23294|      9|    struct addrinfo hints;
23295|      9|    memset(&hints, 0, sizeof(hints));
23296|      9|    hints.ai_family = AF_UNSPEC;
23297|      9|    hints.ai_socktype = socktype;
23298|      9|#ifdef AI_NUMERICSERV
23299|      9|    hints.ai_flags = AI_NUMERICSERV; /* Explicitly prevent name resolution */
23300|       |#else
23301|       |    hints.ai_flags = 0;
23302|       |#endif
23303|      9|    if (argc >= 2) {
  ------------------
  |  Branch (23303:9): [True: 0, False: 9]
  ------------------
23304|      0|        hints.ai_family = net_get_address_family(argv[1]);
23305|      0|    }
23306|      9|    int status = getaddrinfo(NULL, "0", &hints, &ai);
23307|      9|    if (status) {
  ------------------
  |  Branch (23307:9): [True: 0, False: 9]
  ------------------
23308|      0|        janet_panicf("could not get address info: %s", gai_strerror(status));
23309|      0|    }
23310|       |
23311|      9|    struct addrinfo *rp = NULL;
23312|      9|    for (rp = ai; rp != NULL; rp = rp->ai_next) {
  ------------------
  |  Branch (23312:19): [True: 9, False: 0]
  ------------------
23313|       |#ifdef JANET_WINDOWS
23314|       |        sfd = WSASocketW(rp->ai_family, rp->ai_socktype | JSOCKFLAGS, rp->ai_protocol, NULL, 0, WSA_FLAG_OVERLAPPED);
23315|       |#else
23316|      9|        sfd = socket(rp->ai_family, rp->ai_socktype | JSOCKFLAGS, rp->ai_protocol);
  ------------------
  |  |22655|      9|#define JSOCKFLAGS SOCK_CLOEXEC
  ------------------
23317|      9|#endif
23318|      9|        if (JSOCKVALID(sfd)) {
  ------------------
  |  |22652|      9|#define JSOCKVALID(x) ((x) >= 0)
  |  |  ------------------
  |  |  |  Branch (22652:23): [True: 9, False: 0]
  |  |  ------------------
  ------------------
23319|      9|            break;
23320|      9|        }
23321|      9|    }
23322|      9|    freeaddrinfo(ai);
23323|       |
23324|      9|    if (!JSOCKVALID(sfd)) {
  ------------------
  |  |22652|      9|#define JSOCKVALID(x) ((x) >= 0)
  ------------------
  |  Branch (23324:9): [True: 0, False: 9]
  ------------------
23325|      0|        Janet v = janet_ev_lasterr();
23326|      0|        janet_panicf("could not create socket: %V", v);
23327|      0|    }
23328|       |
23329|       |    /* Wrap socket in abstract type JanetStream */
23330|      9|    uint32_t udp_flag = 0;
23331|      9|    if (socktype == SOCK_DGRAM) udp_flag = JANET_STREAM_UDPSERVER;
  ------------------
  |  |  628|      0|#define JANET_STREAM_UDPSERVER 0x1000
  ------------------
  |  Branch (23331:9): [True: 0, False: 9]
  ------------------
23332|      9|    JanetStream *stream = make_stream(sfd, JANET_STREAM_READABLE | JANET_STREAM_WRITABLE | udp_flag);
  ------------------
  |  |  625|      9|#define JANET_STREAM_READABLE 0x200
  ------------------
                  JanetStream *stream = make_stream(sfd, JANET_STREAM_READABLE | JANET_STREAM_WRITABLE | udp_flag);
  ------------------
  |  |  626|      9|#define JANET_STREAM_WRITABLE 0x400
  ------------------
23333|       |
23334|       |    /* Set up the socket for non-blocking IO */
23335|      9|    janet_net_socknoblock(sfd);
23336|       |
23337|      9|    return janet_wrap_abstract(stream);
  ------------------
  |  |  851|      9|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|      9|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      9|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      9|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23338|      9|}
cfun_net_shutdown:
23378|      2|              "Returns the original socket.") {
23379|      2|    janet_arity(argc, 1, 2);
23380|      2|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
23381|      2|    janet_stream_flags(stream, JANET_STREAM_SOCKET);
  ------------------
  |  |  623|      2|#define JANET_STREAM_SOCKET 0x2
  ------------------
23382|      2|    int shutdown_type = JANET_SHUTDOWN_RW;
  ------------------
  |  |23366|      2|#define JANET_SHUTDOWN_RW SHUT_RDWR
  ------------------
23383|      2|    if (argc == 2) {
  ------------------
  |  Branch (23383:9): [True: 0, False: 2]
  ------------------
23384|      0|        const uint8_t *kw = janet_getkeyword(argv, 1);
23385|      0|        if (0 == janet_cstrcmp(kw, "rw")) {
  ------------------
  |  Branch (23385:13): [True: 0, False: 0]
  ------------------
23386|      0|            shutdown_type = JANET_SHUTDOWN_RW;
  ------------------
  |  |23366|      0|#define JANET_SHUTDOWN_RW SHUT_RDWR
  ------------------
23387|      0|        } else if (0 == janet_cstrcmp(kw, "r")) {
  ------------------
  |  Branch (23387:20): [True: 0, False: 0]
  ------------------
23388|      0|            shutdown_type = JANET_SHUTDOWN_R;
  ------------------
  |  |23367|      0|#define JANET_SHUTDOWN_R SHUT_RD
  ------------------
23389|      0|        } else if (0 == janet_cstrcmp(kw, "w")) {
  ------------------
  |  Branch (23389:20): [True: 0, False: 0]
  ------------------
23390|      0|            shutdown_type = JANET_SHUTDOWN_W;
  ------------------
  |  |23368|      0|#define JANET_SHUTDOWN_W SHUT_WR
  ------------------
23391|      0|        } else {
23392|      0|            janet_panicf("unexpected keyword %v", argv[1]);
23393|      0|        }
23394|      0|    }
23395|      2|    int status;
23396|       |#ifdef JANET_WINDOWS
23397|       |    status = shutdown((SOCKET) stream->handle, shutdown_type);
23398|       |#else
23399|      2|    do {
23400|      2|        status = shutdown(stream->handle, shutdown_type);
23401|      2|    } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (23401:14): [True: 0, False: 2]
  |  Branch (23401:30): [True: 0, False: 0]
  ------------------
23402|      2|#endif
23403|      2|    if (status) {
  ------------------
  |  Branch (23403:9): [True: 0, False: 2]
  ------------------
23404|      0|        janet_panicf("could not shutdown socket: %V", janet_ev_lasterr());
23405|      0|    }
23406|      2|    return argv[0];
23407|      2|}
cfun_net_listen:
23420|      1|              "creating a server on some operating systems.") {
23421|      1|    janet_sandbox_assert(JANET_SANDBOX_NET_LISTEN);
  ------------------
  |  | 2026|      1|#define JANET_SANDBOX_NET_LISTEN 8
  ------------------
23422|      1|    janet_arity(argc, 2, 4);
23423|       |
23424|       |    /* Get host, port, and handler*/
23425|      1|    int socktype = janet_get_sockettype(argv, argc, 2);
23426|      1|    int is_unix = 0;
23427|      1|    socklen_t addrlen = 0;
23428|      1|    struct addrinfo *ai = janet_get_addrinfo(argv, 0, socktype, 1, &is_unix, &addrlen);
23429|      1|    int reuse = !(argc >= 4 && janet_truthy(argv[3]));
  ------------------
  |  |  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 (23429:19): [True: 0, False: 1]
  ------------------
23430|       |
23431|      1|    JSock sfd = JSOCKDEFAULT;
  ------------------
  |  |22653|      1|#define JSock int
  ------------------
                  JSock sfd = JSOCKDEFAULT;
  ------------------
  |  |22651|      1|#define JSOCKDEFAULT 0
  ------------------
23432|      1|#ifndef JANET_WINDOWS
23433|      1|    if (is_unix) {
  ------------------
  |  Branch (23433:9): [True: 0, False: 1]
  ------------------
23434|      0|        sfd = socket(AF_UNIX, socktype | JSOCKFLAGS, 0);
  ------------------
  |  |22655|      0|#define JSOCKFLAGS SOCK_CLOEXEC
  ------------------
23435|      0|        if (!JSOCKVALID(sfd)) {
  ------------------
  |  |22652|      0|#define JSOCKVALID(x) ((x) >= 0)
  ------------------
  |  Branch (23435:13): [True: 0, False: 0]
  ------------------
23436|      0|            janet_free(ai);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
23437|      0|            janet_panicf("could not create socket: %V", janet_ev_lasterr());
23438|      0|        }
23439|      0|        const char *err = serverify_socket(sfd, reuse, 0);
23440|      0|        if (NULL != err || bind(sfd, (struct sockaddr *)ai, addrlen)) {
  ------------------
  |  Branch (23440:13): [True: 0, False: 0]
  |  Branch (23440:28): [True: 0, False: 0]
  ------------------
23441|      0|            JSOCKCLOSE(sfd);
  ------------------
  |  |22650|      0|#define JSOCKCLOSE(x) close(x)
  ------------------
23442|      0|            janet_free(ai);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
23443|      0|            if (err) {
  ------------------
  |  Branch (23443:17): [True: 0, False: 0]
  ------------------
23444|      0|                janet_panic(err);
23445|      0|            } else {
23446|      0|                janet_panicf("could not bind socket: %V", janet_ev_lasterr());
23447|      0|            }
23448|      0|        }
23449|      0|        janet_free(ai);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
23450|      0|    } else
23451|      1|#endif
23452|      1|    {
23453|       |        /* Check all addrinfos in a loop for the first that we can bind to. */
23454|      1|        struct addrinfo *rp = NULL;
23455|      1|        for (rp = ai; rp != NULL; rp = rp->ai_next) {
  ------------------
  |  Branch (23455:23): [True: 0, False: 1]
  ------------------
23456|       |#ifdef JANET_WINDOWS
23457|       |            sfd = WSASocketW(rp->ai_family, rp->ai_socktype | JSOCKFLAGS, rp->ai_protocol, NULL, 0, WSA_FLAG_OVERLAPPED);
23458|       |#else
23459|      0|            sfd = socket(rp->ai_family, rp->ai_socktype | JSOCKFLAGS, rp->ai_protocol);
  ------------------
  |  |22655|      0|#define JSOCKFLAGS SOCK_CLOEXEC
  ------------------
23460|      0|#endif
23461|      0|            if (!JSOCKVALID(sfd)) continue;
  ------------------
  |  |22652|      0|#define JSOCKVALID(x) ((x) >= 0)
  ------------------
  |  Branch (23461:17): [True: 0, False: 0]
  ------------------
23462|      0|            const char *err = serverify_socket(sfd, reuse, reuse);
23463|      0|            if (NULL != err) {
  ------------------
  |  Branch (23463:17): [True: 0, False: 0]
  ------------------
23464|      0|                JSOCKCLOSE(sfd);
  ------------------
  |  |22650|      0|#define JSOCKCLOSE(x) close(x)
  ------------------
23465|      0|                continue;
23466|      0|            }
23467|       |            /* Bind */
23468|      0|            if (bind(sfd, rp->ai_addr, (int) rp->ai_addrlen) == 0) break;
  ------------------
  |  Branch (23468:17): [True: 0, False: 0]
  ------------------
23469|      0|            JSOCKCLOSE(sfd);
  ------------------
  |  |22650|      0|#define JSOCKCLOSE(x) close(x)
  ------------------
23470|      0|        }
23471|      1|        freeaddrinfo(ai);
23472|      1|        if (NULL == rp) {
  ------------------
  |  Branch (23472:13): [True: 0, False: 1]
  ------------------
23473|      0|            janet_panic("could not bind to any sockets");
23474|      0|        }
23475|      1|    }
23476|       |
23477|      1|    if (socktype == SOCK_DGRAM) {
  ------------------
  |  Branch (23477:9): [True: 0, False: 1]
  ------------------
23478|       |        /* Datagram server (UDP) */
23479|      0|        JanetStream *stream = make_stream(sfd, JANET_STREAM_UDPSERVER | JANET_STREAM_READABLE);
  ------------------
  |  |  628|      0|#define JANET_STREAM_UDPSERVER 0x1000
  ------------------
                      JanetStream *stream = make_stream(sfd, JANET_STREAM_UDPSERVER | JANET_STREAM_READABLE);
  ------------------
  |  |  625|      0|#define JANET_STREAM_READABLE 0x200
  ------------------
23480|      0|        return janet_wrap_abstract(stream);
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23481|      1|    } else {
23482|       |        /* Stream server (TCP) */
23483|       |
23484|       |        /* listen */
23485|      1|        int status = listen(sfd, 1024);
23486|      1|        if (status) {
  ------------------
  |  Branch (23486:13): [True: 0, False: 1]
  ------------------
23487|      0|            JSOCKCLOSE(sfd);
  ------------------
  |  |22650|      0|#define JSOCKCLOSE(x) close(x)
  ------------------
23488|      0|            janet_panicf("could not listen on file descriptor: %V", janet_ev_lasterr());
23489|      0|        }
23490|       |
23491|       |        /* Put sfd on our loop */
23492|      1|        JanetStream *stream = make_stream(sfd, JANET_STREAM_ACCEPTABLE);
  ------------------
  |  |  627|      1|#define JANET_STREAM_ACCEPTABLE 0x800
  ------------------
23493|      1|        return janet_wrap_abstract(stream);
  ------------------
  |  |  851|      1|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|      1|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23494|      1|    }
23495|      1|}
cfun_net_getpeername:
23571|      2|              "Gets the remote peer's address and port in a tuple in that order.") {
23572|      2|    janet_fixarity(argc, 1);
23573|      2|    JanetStream *js = janet_getabstract(argv, 0, &janet_stream_type);
23574|      2|    if (js->flags & JANET_STREAM_CLOSED) janet_panic("stream closed");
  ------------------
  |  |  622|      2|#define JANET_STREAM_CLOSED 0x1
  ------------------
  |  Branch (23574:9): [True: 0, False: 2]
  ------------------
23575|      2|    struct sockaddr_storage ss;
23576|      2|    socklen_t slen = sizeof(ss);
23577|      2|    memset(&ss, 0, slen);
23578|      2|    if (getpeername((JSock)js->handle, (struct sockaddr *)&ss, &slen)) {
  ------------------
  |  Branch (23578:9): [True: 0, False: 2]
  ------------------
23579|      0|        janet_panicf("Failed to get peername on %v: %V", argv[0], janet_ev_lasterr());
23580|      0|    }
23581|      2|    janet_assert(slen <= (socklen_t) sizeof(ss), "socket address truncated");
  ------------------
  |  |  389|      2|#define janet_assert(c, m) do { \
  |  |  390|      2|    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: 2]
  |  |  ------------------
  |  |  391|      2|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 2]
  |  |  ------------------
  ------------------
23582|      2|    return janet_so_getname(&ss, slen);
23583|      2|}
cfun_stream_accept_loop:
23598|      1|              "Blocks the current fiber until the stream is closed, and will return the stream.") {
23599|      1|    janet_fixarity(argc, 2);
23600|      1|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
23601|      1|    janet_stream_flags(stream, JANET_STREAM_ACCEPTABLE | JANET_STREAM_SOCKET);
  ------------------
  |  |  627|      1|#define JANET_STREAM_ACCEPTABLE 0x800
  ------------------
                  janet_stream_flags(stream, JANET_STREAM_ACCEPTABLE | JANET_STREAM_SOCKET);
  ------------------
  |  |  623|      1|#define JANET_STREAM_SOCKET 0x2
  ------------------
23602|      1|    JanetFunction *fun = janet_getfunction(argv, 1);
23603|      1|    if (fun->def->min_arity < 1) janet_panic("handler function must take at least 1 argument");
  ------------------
  |  Branch (23603:9): [True: 0, False: 1]
  ------------------
23604|      1|    janet_sched_accept(stream, fun);
23605|      1|}
cfun_stream_read:
23626|      1|              "Returns a buffer with up to n more bytes in it, or raises an error if the read failed.") {
23627|      1|    janet_arity(argc, 2, 4);
23628|      1|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
23629|      1|    janet_stream_flags(stream, JANET_STREAM_READABLE | JANET_STREAM_SOCKET);
  ------------------
  |  |  625|      1|#define JANET_STREAM_READABLE 0x200
  ------------------
                  janet_stream_flags(stream, JANET_STREAM_READABLE | JANET_STREAM_SOCKET);
  ------------------
  |  |  623|      1|#define JANET_STREAM_SOCKET 0x2
  ------------------
23630|      1|    JanetBuffer *buffer = janet_optbuffer(argv, argc, 2, 10);
23631|      1|    double to = janet_optnumber(argv, argc, 3, INFINITY);
23632|      1|    if (janet_keyeq(argv[1], "all")) {
  ------------------
  |  Branch (23632:9): [True: 0, False: 1]
  ------------------
23633|      0|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (23633:13): [True: 0, False: 0]
  ------------------
23634|      0|        janet_ev_recvchunk(stream, buffer, INT32_MAX, MSG_NOSIGNAL);
23635|      1|    } else {
23636|      1|        int32_t n = janet_getnat(argv, 1);
23637|      1|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (23637:13): [True: 0, False: 1]
  ------------------
23638|       |        janet_ev_recv(stream, buffer, n, MSG_NOSIGNAL);
23639|      1|    }
23640|      1|}
cfun_stream_chunk:
23645|      3|              "Takes an optional timeout in seconds, after which will raise an error.") {
23646|      3|    janet_arity(argc, 2, 4);
23647|      3|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
23648|      3|    janet_stream_flags(stream, JANET_STREAM_READABLE | JANET_STREAM_SOCKET);
  ------------------
  |  |  625|      3|#define JANET_STREAM_READABLE 0x200
  ------------------
                  janet_stream_flags(stream, JANET_STREAM_READABLE | JANET_STREAM_SOCKET);
  ------------------
  |  |  623|      3|#define JANET_STREAM_SOCKET 0x2
  ------------------
23649|      3|    int32_t n = janet_getnat(argv, 1);
23650|      3|    JanetBuffer *buffer = janet_optbuffer(argv, argc, 2, 10);
23651|      3|    double to = janet_optnumber(argv, argc, 3, INFINITY);
23652|      3|    if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (23652:9): [True: 0, False: 3]
  ------------------
23653|       |    janet_ev_recvchunk(stream, buffer, n, MSG_NOSIGNAL);
23654|      3|}
cfun_stream_recv_from:
23659|      2|              "packet came from. Takes an optional timeout in seconds, after which will raise an error.") {
23660|      2|    janet_arity(argc, 3, 4);
23661|      2|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
23662|      2|    janet_stream_flags(stream, JANET_STREAM_UDPSERVER | JANET_STREAM_SOCKET);
  ------------------
  |  |  628|      2|#define JANET_STREAM_UDPSERVER 0x1000
  ------------------
                  janet_stream_flags(stream, JANET_STREAM_UDPSERVER | JANET_STREAM_SOCKET);
  ------------------
  |  |  623|      2|#define JANET_STREAM_SOCKET 0x2
  ------------------
23663|      2|    int32_t n = janet_getnat(argv, 1);
23664|      2|    JanetBuffer *buffer = janet_getbuffer(argv, 2);
23665|      2|    double to = janet_optnumber(argv, argc, 3, INFINITY);
23666|      2|    if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (23666:9): [True: 0, False: 2]
  ------------------
23667|       |    janet_ev_recvfrom(stream, buffer, n, MSG_NOSIGNAL);
23668|      2|}
cfun_stream_write:
23674|      4|              "Returns nil, or raises an error if the write failed.") {
23675|      4|    janet_arity(argc, 2, 3);
23676|      4|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
23677|      4|    janet_stream_flags(stream, JANET_STREAM_WRITABLE | JANET_STREAM_SOCKET);
  ------------------
  |  |  626|      4|#define JANET_STREAM_WRITABLE 0x400
  ------------------
                  janet_stream_flags(stream, JANET_STREAM_WRITABLE | JANET_STREAM_SOCKET);
  ------------------
  |  |  623|      4|#define JANET_STREAM_SOCKET 0x2
  ------------------
23678|      4|    double to = janet_optnumber(argv, argc, 2, INFINITY);
23679|      4|    if (janet_checktype(argv[1], JANET_BUFFER)) {
  ------------------
  |  |  806|      4|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 4]
  |  |  |  Branch (806:6): [Folded, False: 4]
  |  |  ------------------
  |  |  807|      4|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      4|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      4|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      4|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23680|      0|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (23680:13): [True: 0, False: 0]
  ------------------
23681|      0|        janet_ev_send_buffer(stream, janet_getbuffer(argv, 1), MSG_NOSIGNAL);
23682|      4|    } else {
23683|      4|        JanetByteView bytes = janet_getbytes(argv, 1);
23684|      4|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (23684:13): [True: 0, False: 4]
  ------------------
23685|       |        janet_ev_send_string(stream, bytes.bytes, MSG_NOSIGNAL);
23686|      4|    }
23687|      4|}
cfun_stream_send_to:
23693|      2|              "Returns stream.") {
23694|      2|    janet_arity(argc, 3, 4);
23695|      2|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
23696|      2|    janet_stream_flags(stream, JANET_STREAM_UDPSERVER | JANET_STREAM_SOCKET);
  ------------------
  |  |  628|      2|#define JANET_STREAM_UDPSERVER 0x1000
  ------------------
                  janet_stream_flags(stream, JANET_STREAM_UDPSERVER | JANET_STREAM_SOCKET);
  ------------------
  |  |  623|      2|#define JANET_STREAM_SOCKET 0x2
  ------------------
23697|      2|    void *dest = janet_getabstract(argv, 1, &janet_address_type);
23698|      2|    double to = janet_optnumber(argv, argc, 3, INFINITY);
23699|      2|    if (janet_checktype(argv[2], JANET_BUFFER)) {
  ------------------
  |  |  806|      2|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 2]
  |  |  |  Branch (806:6): [Folded, False: 2]
  |  |  ------------------
  |  |  807|      2|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      2|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      2|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      2|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23700|      0|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (23700:13): [True: 0, False: 0]
  ------------------
23701|      0|        janet_ev_sendto_buffer(stream, janet_getbuffer(argv, 2), dest, MSG_NOSIGNAL);
23702|      2|    } else {
23703|      2|        JanetByteView bytes = janet_getbytes(argv, 2);
23704|      2|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (23704:13): [True: 0, False: 2]
  ------------------
23705|       |        janet_ev_sendto_string(stream, bytes.bytes, dest, MSG_NOSIGNAL);
23706|      2|    }
23707|      2|}
cfun_net_setsockopt:
23764|      3|             ) {
23765|      3|    janet_arity(argc, 3, 3);
23766|      3|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
23767|      3|    janet_stream_flags(stream, JANET_STREAM_SOCKET);
  ------------------
  |  |  623|      3|#define JANET_STREAM_SOCKET 0x2
  ------------------
23768|      3|    JanetKeyword optstr = janet_getkeyword(argv, 1);
23769|       |
23770|      3|    const struct sockopt_type *st = sockopt_type_list;
23771|      3|    while (st->name) {
  ------------------
  |  Branch (23771:12): [True: 0, False: 3]
  ------------------
23772|      0|        if (janet_cstrcmp(optstr, st->name) == 0) {
  ------------------
  |  Branch (23772:13): [True: 0, False: 0]
  ------------------
23773|      0|            break;
23774|      0|        }
23775|      0|        st++;
23776|      0|    }
23777|       |
23778|      3|    if (st->name == NULL) {
  ------------------
  |  Branch (23778:9): [True: 0, False: 3]
  ------------------
23779|      0|        janet_panicf("unknown socket option %q", argv[1]);
23780|      0|    }
23781|       |
23782|      3|    union {
23783|      3|        unsigned char v_uchar;
23784|      3|        int v_int;
23785|      3|        struct ip_mreq v_mreq;
23786|      3|#ifndef JANET_NO_IPV6
23787|      3|        struct ipv6_mreq v_mreq6;
23788|      3|#endif
23789|      3|    } val;
23790|       |
23791|      3|    void *optval = (void *)&val;
23792|      3|    socklen_t optlen = 0;
23793|       |
23794|      3|    if (st->type == JANET_BOOLEAN) {
  ------------------
  |  Branch (23794:9): [True: 0, False: 3]
  ------------------
23795|      0|        val.v_int = janet_getboolean(argv, 2);
23796|      0|        optlen = sizeof(val.v_int);
23797|      3|    } else if (st->type == JANET_NUMBER) {
  ------------------
  |  Branch (23797:16): [True: 0, False: 3]
  ------------------
23798|       |#if defined(JANET_BSD) || defined(JANET_ILLUMOS)
23799|       |        int v_int = janet_getinteger(argv, 2);
23800|       |        if (st->optname == IP_MULTICAST_TTL) {
23801|       |            val.v_uchar = v_int;
23802|       |            optlen = sizeof(val.v_uchar);
23803|       |        } else {
23804|       |            val.v_int = v_int;
23805|       |            optlen = sizeof(val.v_int);
23806|       |        }
23807|       |#else
23808|      0|        val.v_int = janet_getinteger(argv, 2);
23809|      0|        optlen = sizeof(val.v_int);
23810|      0|#endif
23811|      3|    } else if (st->optname == IP_ADD_MEMBERSHIP || st->optname == IP_DROP_MEMBERSHIP) {
  ------------------
  |  Branch (23811:16): [True: 3, False: 0]
  |  Branch (23811:52): [True: 0, False: 0]
  ------------------
23812|      0|        const char *addr = janet_getcstring(argv, 2);
23813|      0|        memset(&val.v_mreq, 0, sizeof val.v_mreq);
23814|      0|        val.v_mreq.imr_interface.s_addr = htonl(INADDR_ANY);
23815|      0|        inet_pton(AF_INET, addr, &val.v_mreq.imr_multiaddr.s_addr);
23816|      0|        optlen = sizeof(val.v_mreq);
23817|      0|#ifndef JANET_NO_IPV6
23818|      3|    } else if (st->optname == IPV6_JOIN_GROUP || st->optname == IPV6_LEAVE_GROUP) {
  ------------------
  |  Branch (23818:16): [True: 3, False: 0]
  |  Branch (23818:50): [True: 0, False: 0]
  ------------------
23819|      0|        const char *addr = janet_getcstring(argv, 2);
23820|      0|        memset(&val.v_mreq6, 0, sizeof val.v_mreq6);
23821|      0|        val.v_mreq6.ipv6mr_interface = 0;
23822|      0|        inet_pton(AF_INET6, addr, &val.v_mreq6.ipv6mr_multiaddr);
23823|      0|        optlen = sizeof(val.v_mreq6);
23824|      0|#endif
23825|      3|    } else {
23826|      3|        janet_panicf("invalid socket option type");
23827|      3|    }
23828|       |
23829|      0|    janet_assert(optlen != 0, "invalid socket option value");
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
23830|       |
23831|      0|    int r = setsockopt((JSock) stream->handle, st->level, st->optname, optval, optlen);
23832|      0|    if (r == -1) {
  ------------------
  |  Branch (23832:9): [True: 0, False: 0]
  ------------------
23833|      0|        janet_panicf("setsockopt(%q): %s", argv[1], janet_strerror(errno));
23834|      0|    }
23835|       |
23836|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23837|      0|}
janet_lib_net:
23861|  8.33k|void janet_lib_net(JanetTable *env) {
23862|  8.33k|    JanetRegExt net_cfuns[] = {
23863|  8.33k|        JANET_CORE_REG("net/address", cfun_net_sockaddr),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23864|  8.33k|        JANET_CORE_REG("net/listen", cfun_net_listen),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23865|  8.33k|        JANET_CORE_REG("net/socket", cfun_net_socket),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23866|  8.33k|        JANET_CORE_REG("net/accept", cfun_stream_accept),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23867|  8.33k|        JANET_CORE_REG("net/accept-loop", cfun_stream_accept_loop),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23868|  8.33k|        JANET_CORE_REG("net/read", cfun_stream_read),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23869|  8.33k|        JANET_CORE_REG("net/chunk", cfun_stream_chunk),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23870|  8.33k|        JANET_CORE_REG("net/write", cfun_stream_write),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23871|  8.33k|        JANET_CORE_REG("net/send-to", cfun_stream_send_to),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23872|  8.33k|        JANET_CORE_REG("net/recv-from", cfun_stream_recv_from),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23873|  8.33k|        JANET_CORE_REG("net/flush", cfun_stream_flush),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23874|  8.33k|        JANET_CORE_REG("net/connect", cfun_net_connect),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23875|  8.33k|        JANET_CORE_REG("net/shutdown", cfun_net_shutdown),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23876|  8.33k|        JANET_CORE_REG("net/peername", cfun_net_getpeername),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23877|  8.33k|        JANET_CORE_REG("net/localname", cfun_net_getsockname),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23878|  8.33k|        JANET_CORE_REG("net/address-unpack", cfun_net_address_unpack),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23879|  8.33k|        JANET_CORE_REG("net/setsockopt", cfun_net_setsockopt),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
23880|  8.33k|        JANET_REG_END
  ------------------
  |  | 2110|  8.33k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
23881|  8.33k|    };
23882|       |    janet_core_cfuns_ext(env, NULL, net_cfuns);
23883|  8.33k|}
janet_net_init:
23885|  10.3k|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|  10.3k|}
janet_net_deinit:
23894|  10.3k|void janet_net_deinit(void) {
23895|       |#ifdef JANET_WINDOWS
23896|       |    WSACleanup();
23897|       |#endif
23898|  10.3k|}
os_which:
24071|     13|              "May also return a custom keyword specified at build time. Is `test` is truthy, will check if the current operating system equals `test` and return true if they are the same, false otherwise.") {
24072|     13|    janet_arity(argc, 0, 1);
24073|     13|    if (argc == 1 && janet_truthy(argv[0])) {
  ------------------
  |  |  818|      6|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|     12|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 6]
  |  |  |  |  ------------------
  |  |  |  |  807|     12|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|     12|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|      6|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|      6|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      6|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      6|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 6, False: 0]
  |  |  ------------------
  |  |  819|      6|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|     12|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 6]
  |  |  |  |  ------------------
  |  |  |  |  807|     12|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|     12|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|      6|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|      6|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      6|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      6|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 6, False: 0]
  |  |  |  Branch (819:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (24073:9): [True: 6, False: 7]
  ------------------
24074|      6|        janet_getkeyword(argv, 0); /* Constrain to keywords */
24075|      6|        return janet_wrap_boolean(janet_equals(argv[0], os_which(0, NULL)));
  ------------------
  |  |  834|      6|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|      6|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      6|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      6|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24076|      6|    }
24077|       |#if defined(JANET_OS_NAME)
24078|       |    return janet_ckeywordv(janet_stringify(JANET_OS_NAME));
24079|       |#elif defined(JANET_MINGW)
24080|       |    return janet_ckeywordv("mingw");
24081|       |#elif defined(JANET_CYGWIN)
24082|       |    return janet_ckeywordv("cygwin");
24083|       |#elif defined(JANET_WINDOWS)
24084|       |    return janet_ckeywordv("windows");
24085|       |#elif defined(JANET_APPLE)
24086|       |    return janet_ckeywordv("macos");
24087|       |#elif defined(__EMSCRIPTEN__)
24088|       |    return janet_ckeywordv("web");
24089|       |#elif defined(JANET_LINUX)
24090|      7|    return janet_ckeywordv("linux");
  ------------------
  |  | 1843|      7|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|      7|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|      7|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      7|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      7|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24091|       |#elif defined(JANET_GNU_HURD)
24092|       |    return janet_ckeywordv("hurd");
24093|       |#elif defined(__FreeBSD__)
24094|       |    return janet_ckeywordv("freebsd");
24095|       |#elif defined(__NetBSD__)
24096|       |    return janet_ckeywordv("netbsd");
24097|       |#elif defined(__OpenBSD__)
24098|       |    return janet_ckeywordv("openbsd");
24099|       |#elif defined(__DragonFly__)
24100|       |    return janet_ckeywordv("dragonfly");
24101|       |#elif defined(JANET_BSD)
24102|       |    return janet_ckeywordv("bsd");
24103|       |#elif defined(JANET_ILLUMOS)
24104|       |    return janet_ckeywordv("illumos");
24105|       |#else
24106|       |    return janet_ckeywordv("posix");
24107|       |#endif
24108|     13|}
os_arch:
24124|      3|              "* :unknown\n") {
24125|      3|    janet_fixarity(argc, 0);
24126|      3|    (void) argv;
24127|       |    /* Check 64-bit vs 32-bit */
24128|       |#if defined(JANET_ARCH_NAME)
24129|       |    return janet_ckeywordv(janet_stringify(JANET_ARCH_NAME));
24130|       |#elif defined(__EMSCRIPTEN__)
24131|       |    return janet_ckeywordv("wasm");
24132|       |#elif (defined(__x86_64__) || defined(_M_X64))
24133|      3|    return janet_ckeywordv("x64");
  ------------------
  |  | 1843|      3|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|      3|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|      3|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24134|       |#elif defined(__i386) || defined(_M_IX86)
24135|       |    return janet_ckeywordv("x86");
24136|       |#elif defined(_M_ARM64) || defined(__aarch64__)
24137|       |    return janet_ckeywordv("aarch64");
24138|       |#elif defined(_M_ARM) || defined(__arm__)
24139|       |    return janet_ckeywordv("arm");
24140|       |#elif (defined(__riscv) && (__riscv_xlen == 64))
24141|       |    return janet_ckeywordv("riscv64");
24142|       |#elif (defined(__riscv) && (__riscv_xlen == 32))
24143|       |    return janet_ckeywordv("riscv32");
24144|       |#elif (defined(__sparc__))
24145|       |    return janet_ckeywordv("sparc");
24146|       |#elif (defined(__ppc__))
24147|       |    return janet_ckeywordv("ppc");
24148|       |#elif (defined(__ppc64__) || defined(_ARCH_PPC64) || defined(_M_PPC))
24149|       |    return janet_ckeywordv("ppc64");
24150|       |#elif (defined(__s390x__))
24151|       |    return janet_ckeywordv("s390x");
24152|       |#elif (defined(__s390__))
24153|       |    return janet_ckeywordv("s390");
24154|       |#else
24155|       |    return janet_ckeywordv("unknown");
24156|       |#endif
24157|      3|}
os_compiler:
24167|      1|              "* :unknown\n\n") {
24168|      1|    janet_fixarity(argc, 0);
24169|      1|    (void) argv;
24170|       |#if defined(_MSC_VER)
24171|       |    return janet_ckeywordv("msvc");
24172|       |#elif defined(__clang__)
24173|      1|    return janet_ckeywordv("clang");
  ------------------
  |  | 1843|      1|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|      1|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|      1|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24174|       |#elif defined(__GNUC__)
24175|       |    return janet_ckeywordv("gcc");
24176|       |#elif defined(JANET_PLAN9)
24177|       |    return janet_ckeywordv("kencc");
24178|       |#else
24179|       |    return janet_ckeywordv("unknown");
24180|       |#endif
24181|      1|}
os_cpu_count:
24220|      7|              "unable to get an approximation, will return a default value dflt.") {
24221|      7|    janet_arity(argc, 0, 1);
24222|      7|    (void) argv; /* Prevent unused argument warning */
24223|       |#ifdef JANET_WINDOWS
24224|       |    SYSTEM_INFO info;
24225|       |    GetSystemInfo(&info);
24226|       |    return janet_wrap_integer(info.dwNumberOfProcessors);
24227|       |#elif defined(JANET_LINUX)
24228|       |    cpu_set_t cs;
24229|      7|    CPU_ZERO(&cs);
  ------------------
  |  Branch (24229:5): [Folded, False: 7]
  ------------------
24230|      7|    sched_getaffinity(0, sizeof(cs), &cs);
24231|      7|    int count = CPU_COUNT(&cs);
24232|      7|    return janet_wrap_integer(count);
  ------------------
  |  |  967|      7|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|      7|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
24233|       |#elif defined(JANET_BSD) && defined(HW_NCPUONLINE)
24234|       |    const int name[2] = {CTL_HW, HW_NCPUONLINE};
24235|       |    int result = 0;
24236|       |    size_t len = sizeof(int);
24237|       |    if (-1 == sysctl(name, 2, &result, &len, NULL, 0)) {
24238|       |        return argc > 0 ? argv[0] : janet_wrap_nil();
24239|       |    }
24240|       |    return janet_wrap_integer(result);
24241|       |#elif defined(JANET_BSD) && defined(HW_NCPU)
24242|       |    const int name[2] = {CTL_HW, HW_NCPU};
24243|       |    int result = 0;
24244|       |    size_t len = sizeof(int);
24245|       |    if (-1 == sysctl(name, 2, &result, &len, NULL, 0)) {
24246|       |        return argc > 0 ? argv[0] : janet_wrap_nil();
24247|       |    }
24248|       |    return janet_wrap_integer(result);
24249|       |#elif defined(JANET_ILLUMOS)
24250|       |    long result = sysconf(_SC_NPROCESSORS_CONF);
24251|       |    if (result < 0) {
24252|       |        return argc > 0 ? argv[0] : janet_wrap_nil();
24253|       |    }
24254|       |    return janet_wrap_integer(result);
24255|       |#elif defined(JANET_PLAN9)
24256|       |    return janet_wrap_integer(atoi(getenv("NPROC")));
24257|       |#else
24258|       |    return argc > 0 ? argv[0] : janet_wrap_nil();
24259|       |#endif
24260|      7|}
os_proc_kill:
24718|      2|              "ignored on Windows.") {
24719|      2|    janet_arity(argc, 1, 3);
24720|      2|    JanetProc *proc = janet_getabstract(argv, 0, &ProcAT);
24721|      2|    if (proc->flags & JANET_PROC_WAITED) {
  ------------------
  |  |24425|      2|#define JANET_PROC_WAITED 2
  ------------------
  |  Branch (24721:9): [True: 0, False: 2]
  ------------------
24722|      0|        janet_panicf("cannot kill process that has already finished");
24723|      0|    }
24724|       |#ifdef JANET_WINDOWS
24725|       |    if (proc->flags & JANET_PROC_CLOSED) {
24726|       |        janet_panicf("cannot close process handle that is already closed");
24727|       |    }
24728|       |    proc->flags |= JANET_PROC_CLOSED;
24729|       |    TerminateProcess(proc->pHandle, 1);
24730|       |    CloseHandle(proc->pHandle);
24731|       |    CloseHandle(proc->tHandle);
24732|       |#else
24733|      2|    int signal = -1;
24734|      2|    if (argc == 3) {
  ------------------
  |  Branch (24734:9): [True: 0, False: 2]
  ------------------
24735|      0|        signal = get_signal_kw(argv, 2);
24736|      0|    }
24737|      2|    int status = kill(proc->pid, signal == -1 ? SIGKILL : signal);
  ------------------
  |  Branch (24737:34): [True: 0, False: 2]
  ------------------
24738|      2|    if (status) {
  ------------------
  |  Branch (24738:9): [True: 0, False: 2]
  ------------------
24739|      0|        janet_panic(janet_strerror(errno));
24740|      0|    }
24741|      2|#endif
24742|       |    /* After killing process we wait on it. */
24743|      2|    if (argc > 1 && janet_truthy(argv[1])) {
  ------------------
  |  |  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 (24743:9): [True: 0, False: 2]
  ------------------
24744|      0|#ifdef JANET_EV
24745|      0|        os_proc_wait_impl(proc);
24746|       |#else
24747|       |        return os_proc_wait_impl(proc);
24748|       |#endif
24749|      2|    } else {
24750|      2|        return argv[0];
24751|      2|    }
24752|      2|}
os_proc_getpid:
24783|     25|              "Get the process ID of the current process.") {
24784|     25|    janet_sandbox_assert(JANET_SANDBOX_SUBPROCESS);
  ------------------
  |  | 2024|     25|#define JANET_SANDBOX_SUBPROCESS 2
  ------------------
24785|     25|    janet_fixarity(argc, 0);
24786|     25|    (void) argv;
24787|       |#ifdef JANET_WINDOWS
24788|       |    return janet_wrap_number((double) _getpid());
24789|       |#else
24790|     25|    return janet_wrap_number((double) getpid());
  ------------------
  |  |  835|     25|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
24791|     25|#endif
24792|     25|}
os_sigaction:
24855|      2|              "All signal handlers are the same as supported by `os/proc-kill`.") {
24856|      2|    janet_sandbox_assert(JANET_SANDBOX_SIGNAL);
  ------------------
  |  | 2036|      2|#define JANET_SANDBOX_SIGNAL 8192
  ------------------
24857|      2|    janet_arity(argc, 1, 3);
24858|       |#ifdef JANET_WINDOWS
24859|       |    (void) argv;
24860|       |    janet_panic("unsupported on this platform");
24861|       |#else
24862|       |    /* TODO - per thread signal masks */
24863|      2|    int rc;
24864|      2|    int sig = get_signal_kw(argv, 0);
24865|      2|    JanetFunction *handler = janet_optfunction(argv, argc, 1, NULL);
24866|      2|    int can_interrupt = janet_optboolean(argv, argc, 2, 0);
24867|      2|    Janet oldhandler = janet_table_get(&janet_vm.signal_handlers, janet_wrap_integer(sig));
  ------------------
  |  |  967|      2|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
24868|      2|    if (!janet_checktype(oldhandler, JANET_NIL)) {
  ------------------
  |  |  806|      2|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 2]
  |  |  ------------------
  |  |  807|      2|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      2|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      2|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      2|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (24868:9): [True: 0, False: 2]
  ------------------
24869|      0|        janet_gcunroot(oldhandler);
24870|      0|    }
24871|      2|    if (NULL != handler) {
  ------------------
  |  Branch (24871:9): [True: 0, False: 2]
  ------------------
24872|      0|        Janet handlerv = janet_wrap_function(handler);
  ------------------
  |  |  852|      0|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24873|      0|        janet_gcroot(handlerv);
24874|      0|        janet_table_put(&janet_vm.signal_handlers, janet_wrap_integer(sig), handlerv);
  ------------------
  |  |  967|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
24875|      2|    } else {
24876|      2|        janet_table_put(&janet_vm.signal_handlers, janet_wrap_integer(sig), janet_wrap_nil());
  ------------------
  |  |  967|      2|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
                      janet_table_put(&janet_vm.signal_handlers, janet_wrap_integer(sig), janet_wrap_nil());
  ------------------
  |  |  831|      2|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      2|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24877|      2|    }
24878|      2|    struct sigaction action;
24879|      2|    sigset_t mask;
24880|      2|    sigaddset(&mask, sig);
24881|      2|    memset(&action, 0, sizeof(action));
24882|      2|    action.sa_flags |= SA_RESTART;
24883|      2|    if (can_interrupt) {
  ------------------
  |  Branch (24883:9): [True: 0, False: 2]
  ------------------
24884|       |#ifdef JANET_NO_INTERPRETER_INTERRUPT
24885|       |        janet_panic("interpreter interrupt not enabled");
24886|       |#else
24887|      0|        action.sa_handler = janet_signal_trampoline;
24888|      0|#endif
24889|      2|    } else {
24890|      2|        action.sa_handler = janet_signal_trampoline_no_interrupt;
24891|      2|    }
24892|      2|    action.sa_mask = mask;
24893|      2|    RETRY_EINTR(rc, sigaction(sig, &action, NULL));
  ------------------
  |  |  554|      2|#define RETRY_EINTR(RC, CALL) do { (RC) = CALL; } while((RC) < 0 && errno == EINTR)
  |  |  ------------------
  |  |  |  Branch (554:57): [True: 0, False: 2]
  |  |  |  Branch (554:69): [True: 0, False: 0]
  |  |  ------------------
  ------------------
24894|      2|    sigset_t set;
24895|      2|    sigemptyset(&set);
24896|      2|    sigaddset(&set, sig);
24897|       |#ifdef JANET_THREADS
24898|       |    pthread_sigmask(SIG_UNBLOCK, &set, NULL);
24899|       |#else
24900|      2|    sigprocmask(SIG_UNBLOCK, &set, NULL);
24901|      2|#endif
24902|      2|    return janet_wrap_nil();
  ------------------
  |  |  831|      2|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      2|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24903|      2|#endif
24904|      2|}
os_spawn:
25460|      1|              "can be the keyword `:out` to redirect stderr to stdout in the subprocess.") {
25461|      1|    return os_execute_impl(argc, argv, JANET_EXECUTE_SPAWN);
25462|      1|}
os_posix_exec:
25468|      7|              "does not allow redirection of stdio.") {
25469|       |#ifdef JANET_WINDOWS
25470|       |    (void) argc;
25471|       |    (void) argv;
25472|       |    janet_panic("not supported on Windows");
25473|       |#else
25474|      7|    return os_execute_impl(argc, argv, JANET_EXECUTE_EXEC);
25475|      7|#endif
25476|      7|}
os_posix_chroot:
25513|      2|              "`dir`. Only supported on POSIX systems.") {
25514|      2|    janet_sandbox_assert(JANET_SANDBOX_CHROOT);
  ------------------
  |  | 2037|      2|#define JANET_SANDBOX_CHROOT 16384
  ------------------
25515|      2|    janet_fixarity(argc, 1);
25516|       |#if defined(JANET_WINDOWS) || defined(JANET_PLAN9)
25517|       |    (void) argv;
25518|       |    janet_panic("not supported on Windows or Plan 9");
25519|       |#else
25520|      2|    const char *root = janet_getcstring(argv, 0);
25521|      2|    int result;
25522|      2|    do {
25523|      2|        result = chroot(root);
25524|      2|    } while (result == -1 && errno == EINTR);
  ------------------
  |  Branch (25524:14): [True: 0, False: 2]
  |  Branch (25524:30): [True: 0, False: 0]
  ------------------
25525|      2|    if (result == -1) {
  ------------------
  |  Branch (25525:9): [True: 0, False: 2]
  ------------------
25526|      0|        janet_panic(janet_strerror(errno));
25527|      0|    }
25528|      2|    return janet_wrap_nil();
  ------------------
  |  |  831|      2|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      2|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25529|      2|#endif
25530|      2|}
os_shell:
25551|      9|              "in most cases.") {
25552|      9|    janet_sandbox_assert(JANET_SANDBOX_SUBPROCESS);
  ------------------
  |  | 2024|      9|#define JANET_SANDBOX_SUBPROCESS 2
  ------------------
25553|      9|    janet_arity(argc, 0, 1);
25554|      9|    const char *cmd = argc
  ------------------
  |  Branch (25554:23): [True: 0, False: 9]
  ------------------
25555|      9|                      ? janet_getcstring(argv, 0)
25556|      9|                      : NULL;
25557|      9|#ifdef JANET_EV
25558|      9|    char *cmd_copy = NULL;
25559|      9|    if (cmd != NULL) {
  ------------------
  |  Branch (25559:9): [True: 0, False: 9]
  ------------------
25560|      0|        size_t cmdlen = strlen(cmd);
25561|      0|        cmd_copy = janet_malloc(cmdlen + 1);
  ------------------
  |  | 2406|      0|#define janet_malloc(X) malloc((X))
  ------------------
25562|      0|        memcpy(cmd_copy, cmd, cmdlen);
25563|      0|        cmd_copy[cmdlen] = '\0';
25564|      0|    }
25565|      9|    janet_ev_threaded_await(os_shell_subr, 0, argc, cmd_copy);
25566|       |#else
25567|       |    int stat = system(cmd);
25568|       |    return argc
25569|       |           ? janet_wrap_integer(stat)
25570|       |           : janet_wrap_boolean(stat);
25571|       |#endif
25572|      9|}
os_environ:
25579|      8|              "Get a copy of the OS environment table.") {
25580|      8|    janet_sandbox_assert(JANET_SANDBOX_ENV);
  ------------------
  |  | 2031|      8|#define JANET_SANDBOX_ENV 256
  ------------------
25581|      8|    (void) argv;
25582|      8|    janet_fixarity(argc, 0);
25583|      8|    int32_t nenv = 0;
25584|      8|    janet_lock_environ();
25585|      8|    char **env = environ;
25586|    242|    while (*env++)
  ------------------
  |  Branch (25586:12): [True: 234, False: 8]
  ------------------
25587|    234|        nenv += 1;
25588|      8|    JanetTable *t = janet_table(nenv);
25589|    242|    for (int32_t i = 0; i < nenv; i++) {
  ------------------
  |  Branch (25589:25): [True: 234, False: 8]
  ------------------
25590|    234|        char *e = environ[i];
25591|    234|        char *eq = strchr(e, '=');
25592|    234|        if (!eq) {
  ------------------
  |  Branch (25592:13): [True: 0, False: 234]
  ------------------
25593|      0|            janet_unlock_environ();
25594|      0|            janet_panic("no '=' in environ");
25595|      0|        }
25596|    234|        char *v = eq + 1;
25597|    234|        int32_t full_len = (int32_t) strlen(e);
25598|    234|        int32_t val_len = (int32_t) strlen(v);
25599|    234|        janet_table_put(
25600|    234|            t,
25601|    234|            janet_stringv((const uint8_t *)e, full_len - val_len - 1),
  ------------------
  |  | 1827|    234|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|    234|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|    234|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    234|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    234|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25602|    234|            janet_stringv((const uint8_t *)v, val_len)
  ------------------
  |  | 1827|    234|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|    234|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|    234|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    234|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    234|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25603|    234|        );
25604|    234|    }
25605|      8|    janet_unlock_environ();
25606|      8|    return janet_wrap_table(t);
  ------------------
  |  |  846|      8|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|      8|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      8|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      8|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25607|      8|}
os_getenv:
25612|  81.9k|              "Get the string value of an environment variable.") {
25613|  81.9k|    janet_sandbox_assert(JANET_SANDBOX_ENV);
  ------------------
  |  | 2031|  81.9k|#define JANET_SANDBOX_ENV 256
  ------------------
25614|  81.9k|    janet_arity(argc, 1, 2);
25615|  81.9k|    const char *cstr = janet_getcstring(argv, 0);
25616|  81.9k|    janet_lock_environ();
25617|  81.9k|    const char *res = getenv(cstr);
25618|  81.9k|    Janet ret = res
  ------------------
  |  Branch (25618:17): [True: 0, False: 81.9k]
  ------------------
25619|  81.9k|                ? janet_cstringv(res)
  ------------------
  |  | 1826|  81.9k|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25620|  81.9k|                : argc == 2
  ------------------
  |  Branch (25620:19): [True: 81.6k, False: 304]
  ------------------
25621|  81.9k|                ? argv[1]
25622|  81.9k|                : janet_wrap_nil();
  ------------------
  |  |  831|    304|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    304|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    304|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    304|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25623|  81.9k|    janet_unlock_environ();
25624|  81.9k|    return ret;
25625|  81.9k|}
os_setenv:
25629|      4|              "Set an environment variable.") {
25630|       |#ifdef JANET_WINDOWS
25631|       |#define SETENV(K,V) _putenv_s(K, V)
25632|       |#define UNSETENV(K) _putenv_s(K, "")
25633|       |#elif defined(JANET_PLAN9)
25634|       |#define SETENV(K,V) putenv(K, V)
25635|       |#define UNSETENV(K) unsetenv(K)
25636|       |#else
25637|      4|#define SETENV(K,V) setenv(K, V, 1)
25638|      4|#define UNSETENV(K) unsetenv(K)
25639|      4|#endif
25640|      4|    janet_sandbox_assert(JANET_SANDBOX_ENV);
  ------------------
  |  | 2031|      4|#define JANET_SANDBOX_ENV 256
  ------------------
25641|      4|    janet_arity(argc, 1, 2);
25642|      4|    const char *ks = janet_getcstring(argv, 0);
25643|      4|    const char *vs = janet_optcstring(argv, argc, 1, NULL);
25644|      4|    janet_lock_environ();
25645|      4|    if (NULL == vs) {
  ------------------
  |  Branch (25645:9): [True: 0, False: 4]
  ------------------
25646|      0|        UNSETENV(ks);
  ------------------
  |  |25638|      0|#define UNSETENV(K) unsetenv(K)
  ------------------
25647|      4|    } else {
25648|      4|        SETENV(ks, vs);
  ------------------
  |  |25637|      4|#define SETENV(K,V) setenv(K, V, 1)
  ------------------
25649|      4|    }
25650|      4|    janet_unlock_environ();
25651|      4|    return janet_wrap_nil();
  ------------------
  |  |  831|      4|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      4|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      4|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25652|      4|}
os_time:
25657|     73|              "January 1, 1970, the Unix epoch. Returns a real number.") {
25658|     73|    janet_fixarity(argc, 0);
25659|     73|    (void) argv;
25660|     73|    double dtime = (double)(time(NULL));
25661|     73|    return janet_wrap_number(dtime);
  ------------------
  |  |  835|     73|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
25662|     73|}
os_clock:
25687|     15|              "nanoseconds]`.\n") {
25688|     15|    enum JanetTimeSource source;
25689|     15|    janet_sandbox_assert(JANET_SANDBOX_HRTIME);
  ------------------
  |  | 2030|     15|#define JANET_SANDBOX_HRTIME 128
  ------------------
25690|     15|    janet_arity(argc, 0, 2);
25691|       |
25692|     15|    JanetKeyword sourcestr = janet_optkeyword(argv, argc, 0, NULL);
25693|     15|    if (sourcestr == NULL || janet_cstrcmp(sourcestr, "realtime") == 0) {
  ------------------
  |  Branch (25693:9): [True: 12, False: 3]
  |  Branch (25693:30): [True: 0, False: 3]
  ------------------
25694|     12|        source = JANET_TIME_REALTIME;
25695|     12|    } else if (janet_cstrcmp(sourcestr, "monotonic") == 0) {
  ------------------
  |  Branch (25695:16): [True: 0, False: 3]
  ------------------
25696|      0|        source = JANET_TIME_MONOTONIC;
25697|      3|    } else if (janet_cstrcmp(sourcestr, "cputime") == 0) {
  ------------------
  |  Branch (25697:16): [True: 0, False: 3]
  ------------------
25698|      0|        source = JANET_TIME_CPUTIME;
25699|      3|    } else {
25700|      3|        janet_panicf("expected :realtime, :monotonic, or :cputime, got %v", argv[0]);
25701|      3|    }
25702|       |
25703|     12|    struct timespec tv;
25704|     12|    if (janet_gettime(&tv, source)) janet_panic("could not get time");
  ------------------
  |  Branch (25704:9): [True: 0, False: 12]
  ------------------
25705|       |
25706|     12|    JanetKeyword formatstr = janet_optkeyword(argv, argc, 1, NULL);
25707|     12|    if (formatstr == NULL || janet_cstrcmp(formatstr, "double") == 0) {
  ------------------
  |  Branch (25707:9): [True: 8, False: 4]
  |  Branch (25707:30): [True: 0, False: 4]
  ------------------
25708|      5|        double dtime = (double)(tv.tv_sec + (tv.tv_nsec / 1E9));
25709|      5|        return janet_wrap_number(dtime);
  ------------------
  |  |  835|      5|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
25710|      7|    } else if (janet_cstrcmp(formatstr, "int") == 0) {
  ------------------
  |  Branch (25710:16): [True: 3, False: 4]
  ------------------
25711|      3|        return janet_wrap_number((double)(tv.tv_sec));
  ------------------
  |  |  835|      3|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
25712|      4|    } else if (janet_cstrcmp(formatstr, "tuple") == 0) {
  ------------------
  |  Branch (25712:16): [True: 0, False: 4]
  ------------------
25713|      0|        Janet tup[2] = {janet_wrap_number((double)tv.tv_sec),
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
25714|      0|                        janet_wrap_number((double)tv.tv_nsec)
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
25715|      0|                       };
25716|      0|        return janet_wrap_tuple(janet_tuple_n(tup, 2));
  ------------------
  |  |  843|      0|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25717|      4|    } else {
25718|      4|        janet_panicf("expected :double, :int, or :tuple, got %v", argv[1]);
25719|      4|    }
25720|     12|}
os_sleep:
25725|  1.58k|              "number with a fractional part. Returns nil.") {
25726|  1.58k|    janet_fixarity(argc, 1);
25727|  1.58k|    double delay = janet_getnumber(argv, 0);
25728|  1.58k|    if (delay < 0) janet_panic("invalid argument to sleep");
  ------------------
  |  Branch (25728:9): [True: 0, False: 1.58k]
  ------------------
25729|       |#ifdef JANET_WINDOWS
25730|       |    Sleep((DWORD)(delay * 1000));
25731|       |#else
25732|  1.58k|    int rc;
25733|  1.58k|    struct timespec ts;
25734|  1.58k|    ts.tv_sec = (time_t) delay;
25735|  1.58k|    ts.tv_nsec = (delay <= UINT32_MAX)
  ------------------
  |  Branch (25735:18): [True: 819, False: 765]
  ------------------
25736|  1.58k|                 ? (long)((delay - ((uint32_t)delay)) * 1000000000)
25737|  1.58k|                 : 0;
25738|  1.58k|    RETRY_EINTR(rc, nanosleep(&ts, &ts));
  ------------------
  |  |  554|  1.58k|#define RETRY_EINTR(RC, CALL) do { (RC) = CALL; } while((RC) < 0 && errno == EINTR)
  |  |  ------------------
  |  |  |  Branch (554:57): [True: 764, False: 820]
  |  |  |  Branch (554:69): [True: 0, False: 764]
  |  |  ------------------
  ------------------
25739|  1.58k|#endif
25740|  1.58k|    return janet_wrap_nil();
  ------------------
  |  |  831|  1.58k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.58k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.58k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.58k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25741|  1.58k|}
os_isatty:
25746|      1|              "it will default to standard output.") {
25747|      1|    janet_arity(argc, 0, 1);
25748|      1|    FILE *f = (argc == 1) ? janet_getfile(argv, 0, NULL) : stdout;
  ------------------
  |  Branch (25748:15): [True: 0, False: 1]
  ------------------
25749|       |#ifdef JANET_WINDOWS
25750|       |    int fd = _fileno(f);
25751|       |    if (fd == -1) janet_panic("not a valid stream");
25752|       |    return janet_wrap_boolean(_isatty(fd));
25753|       |#else
25754|      1|    int fd = fileno(f);
25755|      1|    if (fd == -1) janet_panic(janet_strerror(errno));
  ------------------
  |  Branch (25755:9): [True: 0, False: 1]
  ------------------
25756|      1|    return janet_wrap_boolean(isatty(fd));
  ------------------
  |  |  834|      1|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25757|      1|#endif
25758|      1|}
os_cwd:
25762|      2|              "Returns the current working directory.") {
25763|      2|    janet_fixarity(argc, 0);
25764|      2|    (void) argv;
25765|      2|    char buf[FILENAME_MAX];
25766|      2|    char *ptr;
25767|       |#ifdef JANET_WINDOWS
25768|       |    ptr = _getcwd(buf, FILENAME_MAX);
25769|       |#else
25770|      2|    ptr = getcwd(buf, FILENAME_MAX);
25771|      2|#endif
25772|      2|    if (NULL == ptr) janet_panic("could not get current directory");
  ------------------
  |  Branch (25772:9): [True: 0, False: 2]
  ------------------
25773|      2|    return janet_cstringv(ptr);
  ------------------
  |  | 1826|      2|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  848|      2|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|      2|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25774|      2|}
os_cryptorand:
25778|     45|              "Get or append `n` bytes of good quality random data provided by the OS. Returns a new buffer or `buf`.") {
25779|     45|    JanetBuffer *buffer;
25780|     45|    janet_arity(argc, 1, 2);
25781|     45|    int32_t offset;
25782|     45|    int32_t n = janet_getinteger(argv, 0);
25783|     45|    if (n < 0) janet_panic("expected positive integer");
  ------------------
  |  Branch (25783:9): [True: 1, False: 44]
  ------------------
25784|     44|    if (argc == 2) {
  ------------------
  |  Branch (25784:9): [True: 3, False: 41]
  ------------------
25785|      3|        buffer = janet_getbuffer(argv, 1);
25786|      3|        offset = buffer->count;
25787|     41|    } else {
25788|     41|        offset = 0;
25789|     41|        buffer = janet_buffer(n);
25790|     41|    }
25791|       |    /* We could optimize here by adding setcount_uninit */
25792|     44|    janet_buffer_setcount(buffer, offset + n);
25793|       |
25794|     44|    if (janet_cryptorand(buffer->data + offset, n) != 0)
  ------------------
  |  Branch (25794:9): [True: 0, False: 44]
  ------------------
25795|      0|        janet_panic("unable to get sufficient random data");
25796|       |
25797|     44|    return janet_wrap_buffer(buffer);
  ------------------
  |  |  847|     44|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|     44|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     44|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     44|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25798|     44|}
os_date:
25858|  1.78k|              "`_tzset()` (`<time.h>`) for further details.") {
25859|  1.78k|    janet_arity(argc, 0, 2);
25860|  1.78k|    (void) argv;
25861|  1.78k|    struct tm t_infos;
25862|  1.78k|    struct tm *t_info = time_to_tm(argv, argc, 0, &t_infos);
25863|  1.78k|    JanetKV *st = janet_struct_begin(9);
25864|  1.78k|    janet_struct_put(st, janet_ckeywordv("seconds"), janet_wrap_number(t_info->tm_sec));
  ------------------
  |  | 1843|  1.78k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  1.78k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.78k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.78k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.78k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_struct_put(st, janet_ckeywordv("seconds"), janet_wrap_number(t_info->tm_sec));
  ------------------
  |  |  835|  1.78k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
25865|  1.78k|    janet_struct_put(st, janet_ckeywordv("minutes"), janet_wrap_number(t_info->tm_min));
  ------------------
  |  | 1843|  1.78k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  1.78k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.78k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.78k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.78k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_struct_put(st, janet_ckeywordv("minutes"), janet_wrap_number(t_info->tm_min));
  ------------------
  |  |  835|  1.78k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
25866|  1.78k|    janet_struct_put(st, janet_ckeywordv("hours"), janet_wrap_number(t_info->tm_hour));
  ------------------
  |  | 1843|  1.78k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  1.78k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.78k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.78k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.78k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_struct_put(st, janet_ckeywordv("hours"), janet_wrap_number(t_info->tm_hour));
  ------------------
  |  |  835|  1.78k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
25867|  1.78k|    janet_struct_put(st, janet_ckeywordv("month-day"), janet_wrap_number(t_info->tm_mday - 1));
  ------------------
  |  | 1843|  1.78k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  1.78k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.78k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.78k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.78k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_struct_put(st, janet_ckeywordv("month-day"), janet_wrap_number(t_info->tm_mday - 1));
  ------------------
  |  |  835|  1.78k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
25868|  1.78k|    janet_struct_put(st, janet_ckeywordv("month"), janet_wrap_number(t_info->tm_mon));
  ------------------
  |  | 1843|  1.78k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  1.78k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.78k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.78k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.78k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_struct_put(st, janet_ckeywordv("month"), janet_wrap_number(t_info->tm_mon));
  ------------------
  |  |  835|  1.78k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
25869|  1.78k|    janet_struct_put(st, janet_ckeywordv("year"), janet_wrap_number(t_info->tm_year + 1900));
  ------------------
  |  | 1843|  1.78k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  1.78k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.78k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.78k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.78k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_struct_put(st, janet_ckeywordv("year"), janet_wrap_number(t_info->tm_year + 1900));
  ------------------
  |  |  835|  1.78k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
25870|  1.78k|    janet_struct_put(st, janet_ckeywordv("week-day"), janet_wrap_number(t_info->tm_wday));
  ------------------
  |  | 1843|  1.78k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  1.78k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.78k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.78k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.78k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_struct_put(st, janet_ckeywordv("week-day"), janet_wrap_number(t_info->tm_wday));
  ------------------
  |  |  835|  1.78k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
25871|  1.78k|    janet_struct_put(st, janet_ckeywordv("year-day"), janet_wrap_number(t_info->tm_yday));
  ------------------
  |  | 1843|  1.78k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  1.78k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.78k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.78k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.78k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_struct_put(st, janet_ckeywordv("year-day"), janet_wrap_number(t_info->tm_yday));
  ------------------
  |  |  835|  1.78k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
25872|  1.78k|    janet_struct_put(st, janet_ckeywordv("dst"), janet_wrap_boolean(t_info->tm_isdst));
  ------------------
  |  | 1843|  1.78k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  1.78k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.78k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.78k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.78k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_struct_put(st, janet_ckeywordv("dst"), janet_wrap_boolean(t_info->tm_isdst));
  ------------------
  |  |  834|  1.78k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|  1.78k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.78k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.78k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25873|  1.78k|    return janet_wrap_struct(janet_struct_end(st));
  ------------------
  |  |  842|  1.78k|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|  1.78k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.78k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.78k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25874|  1.78k|}
os_strftime:
25887|      1|              "details.") {
25888|      1|    janet_arity(argc, 1, 3);
25889|      1|    const char *fmt = janet_getcstring(argv, 0);
25890|       |    /* ANSI X3.159-1989, section 4.12.3.5 "The strftime function" */
25891|      1|    static const char *valid = "aAbBcdHIjmMpSUwWxXyYZ%";
25892|      1|    const char *p = fmt;
25893|      1|    while (*p) {
  ------------------
  |  Branch (25893:12): [True: 0, False: 1]
  ------------------
25894|      0|        if (*p++ == '%') {
  ------------------
  |  Branch (25894:13): [True: 0, False: 0]
  ------------------
25895|      0|            if (!*p) {
  ------------------
  |  Branch (25895:17): [True: 0, False: 0]
  ------------------
25896|      0|                janet_panic("invalid conversion specifier");
25897|      0|            }
25898|      0|            if (!strchr(valid, *p)) {
  ------------------
  |  Branch (25898:17): [True: 0, False: 0]
  ------------------
25899|      0|                janet_panicf("invalid conversion specifier '%%%c'", *p);
25900|      0|            }
25901|      0|            p++;
25902|      0|        }
25903|      0|    }
25904|      1|    struct tm t_infos;
25905|      1|    struct tm *t_info = time_to_tm(argv, argc, 1, &t_infos);
25906|      1|    char buf[SIZETIMEFMT];
25907|      1|    size_t len = strftime(buf, sizeof(buf), fmt, t_info);
25908|      1|    return janet_stringv((const uint8_t *)buf, (int32_t) len);
  ------------------
  |  | 1827|      1|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|      1|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|      1|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25909|      1|}
os_mktime:
25973|     19|              "Inverse function to os/date.") {
25974|     19|    janet_arity(argc, 1, 2);
25975|     19|    time_t t;
25976|     19|    struct tm t_info;
25977|       |
25978|       |    /* Use memset instead of = {0} to silence paranoid warning in macos */
25979|     19|    memset(&t_info, 0, sizeof(t_info));
25980|       |
25981|     19|    if (!janet_checktype(argv[0], JANET_TABLE) &&
  ------------------
  |  |  806|     38|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 19]
  |  |  ------------------
  |  |  807|     38|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     38|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     19|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     19|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     19|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     19|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (25981:9): [True: 15, False: 4]
  ------------------
25982|     15|            !janet_checktype(argv[0], JANET_STRUCT))
  ------------------
  |  |  806|     15|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 15]
  |  |  ------------------
  |  |  807|     15|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     15|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     15|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     15|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     15|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     15|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (25982:13): [True: 4, False: 11]
  ------------------
25983|      4|        janet_panic_type(argv[0], 0, JANET_TFLAG_DICTIONARY);
  ------------------
  |  |  614|      4|#define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  ------------------
  |  |  |  |  604|      4|#define JANET_TFLAG_TABLE (1 << JANET_TABLE)
  |  |  ------------------
  |  |               #define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  ------------------
  |  |  |  |  605|      4|#define JANET_TFLAG_STRUCT (1 << JANET_STRUCT)
  |  |  ------------------
  ------------------
25984|       |
25985|     15|    t_info.tm_sec = entry_getint(argv[0], "seconds");
25986|     15|    t_info.tm_min = entry_getint(argv[0], "minutes");
25987|     15|    t_info.tm_hour = entry_getint(argv[0], "hours");
25988|     15|    t_info.tm_mday = entry_getint(argv[0], "month-day") + 1;
25989|     15|    t_info.tm_mon = entry_getint(argv[0], "month");
25990|     15|    t_info.tm_year = entry_getint(argv[0], "year") - 1900;
25991|     15|    t_info.tm_isdst = entry_getdst(argv[0]);
25992|       |
25993|     15|    if (argc >= 2 && janet_truthy(argv[1])) {
  ------------------
  |  |  818|      3|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|      6|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 3]
  |  |  |  |  ------------------
  |  |  |  |  807|      6|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!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|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|      3|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|      3|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 3, False: 0]
  |  |  ------------------
  |  |  819|      3|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|      6|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 3]
  |  |  |  |  ------------------
  |  |  |  |  807|      6|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!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|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|      3|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|      3|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 3, False: 0]
  |  |  |  Branch (819:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (25993:9): [True: 3, False: 12]
  ------------------
25994|       |        /* local time */
25995|      3|        t = mktime(&t_info);
25996|     12|    } else {
25997|       |        /* utc time */
25998|       |#ifdef JANET_NO_UTC_MKTIME
25999|       |        janet_panic("os/mktime UTC not supported on this platform");
26000|       |#else
26001|     12|        t = timegm(&t_info);
26002|     12|#endif
26003|     12|    }
26004|       |
26005|     15|    if (t == (time_t) -1) {
  ------------------
  |  Branch (26005:9): [True: 0, False: 15]
  ------------------
26006|      0|        janet_panicf("%s", janet_strerror(errno));
26007|      0|    }
26008|       |
26009|     15|    return janet_wrap_number((double)t);
  ------------------
  |  |  835|     15|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
26010|     15|}
os_setlocale:
26030|    218|              "other functions such as `os/strftime` and even `printf`.") {
26031|    218|    janet_sandbox_assert(JANET_SANDBOX_LOCALE);
  ------------------
  |  | 2046|    218|#define JANET_SANDBOX_LOCALE 1048576
  ------------------
26032|    218|    janet_arity(argc, 0, 2);
26033|    218|    const char *locale_name = janet_optcstring(argv, argc, 0, NULL);
26034|    218|    int category_int = LC_ALL;
26035|    218|    if (argc > 1 && !janet_checktype(argv[1], JANET_NIL)) {
  ------------------
  |  |  806|      1|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 1]
  |  |  ------------------
  |  |  807|      1|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      1|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      1|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      1|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (26035:9): [True: 1, False: 217]
  |  Branch (26035:21): [True: 1, False: 0]
  ------------------
26036|      1|        if (janet_keyeq(argv[1], "all")) {
  ------------------
  |  Branch (26036:13): [True: 0, False: 1]
  ------------------
26037|      0|            category_int = LC_ALL;
26038|      1|        } else if (janet_keyeq(argv[1], "collate")) {
  ------------------
  |  Branch (26038:20): [True: 0, False: 1]
  ------------------
26039|      0|            category_int = LC_COLLATE;
26040|      1|        } else if (janet_keyeq(argv[1], "ctype")) {
  ------------------
  |  Branch (26040:20): [True: 0, False: 1]
  ------------------
26041|      0|            category_int = LC_CTYPE;
26042|      1|        } else if (janet_keyeq(argv[1], "monetary")) {
  ------------------
  |  Branch (26042:20): [True: 0, False: 1]
  ------------------
26043|      0|            category_int = LC_MONETARY;
26044|      1|        } else if (janet_keyeq(argv[1], "numeric")) {
  ------------------
  |  Branch (26044:20): [True: 0, False: 1]
  ------------------
26045|      0|            category_int = LC_NUMERIC;
26046|      1|        } else if (janet_keyeq(argv[1], "time")) {
  ------------------
  |  Branch (26046:20): [True: 0, False: 1]
  ------------------
26047|      0|            category_int = LC_TIME;
26048|      1|        } else {
26049|      1|            janet_panicf("expected one of :all, :collate, :ctype, :monetary, :numeric, or :time, got %v", argv[1]);
26050|      1|        }
26051|      1|    }
26052|    217|    const char *old = setlocale(category_int, locale_name);
26053|    217|    if (old == NULL) 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 (26053:9): [True: 0, False: 217]
  ------------------
26054|    217|    return janet_cstringv(old);
  ------------------
  |  | 1826|    217|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  848|    217|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|    217|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    217|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    217|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26055|    217|}
os_mkdir:
26103|      1|              "errors otherwise.") {
26104|      1|    janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2028|      1|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
26105|      1|    janet_fixarity(argc, 1);
26106|      1|    const char *path = janet_getcstring(argv, 0);
26107|       |#ifdef JANET_WINDOWS
26108|       |    int res = _mkdir(path);
26109|       |#else
26110|      1|    int res = mkdir(path, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IXOTH);
26111|      1|#endif
26112|      1|    if (res == 0) return janet_wrap_true();
  ------------------
  |  |  832|      0|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 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 (26112:9): [True: 0, False: 1]
  ------------------
26113|      1|    if (errno == EEXIST) return janet_wrap_false();
  ------------------
  |  |  833|      1|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (26113:9): [True: 1, False: 0]
  ------------------
26114|       |#ifdef __FreeBSD__
26115|       |    /* See kern/59739 at this point I believe its expected behaviour */
26116|       |    if (errno == EISDIR && path && path[0] == '/' && path[1] == 0) return janet_wrap_false();
26117|       |#endif
26118|      0|    janet_panicf("%s: %s", janet_strerror(errno), path);
26119|      1|}
os_touch:
26156|      6|              "times to the current time.") {
26157|      6|    janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2028|      6|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
26158|      6|    janet_arity(argc, 1, 3);
26159|      6|    const char *path = janet_getcstring(argv, 0);
26160|      6|    struct utimbuf timebuf, *bufp;
26161|      6|    if (argc >= 2) {
  ------------------
  |  Branch (26161:9): [True: 4, False: 2]
  ------------------
26162|      4|        bufp = &timebuf;
26163|      4|        timebuf.actime = (time_t) janet_getnumber(argv, 1);
26164|      4|        if (argc >= 3) {
  ------------------
  |  Branch (26164:13): [True: 2, False: 2]
  ------------------
26165|      2|            timebuf.modtime = (time_t) janet_getnumber(argv, 2);
26166|      2|        } else {
26167|      2|            timebuf.modtime = timebuf.actime;
26168|      2|        }
26169|      4|    } else {
26170|      2|        bufp = NULL;
26171|      2|    }
26172|      6|    int res = utime(path, bufp);
26173|      6|    if (-1 == res) janet_panic(janet_strerror(errno));
  ------------------
  |  Branch (26173:9): [True: 2, False: 4]
  ------------------
26174|      4|    return janet_wrap_nil();
  ------------------
  |  |  831|      4|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      4|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      4|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26175|      6|}
os_readlink:
26191|      1|              "Read the contents of a symbolic link. Does not work on Windows.\n") {
26192|      1|    janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2029|      1|#define JANET_SANDBOX_FS_READ 64
  ------------------
26193|      1|    janet_fixarity(argc, 1);
26194|       |#ifdef JANET_WINDOWS
26195|       |    (void) argc;
26196|       |    (void) argv;
26197|       |    janet_panic("not supported on Windows");
26198|       |#else
26199|      1|    char buffer[PATH_MAX];
26200|      1|    const char *path = janet_getcstring(argv, 0);
26201|      1|    ssize_t len = readlink(path, buffer, sizeof buffer);
26202|      1|    if (len < 0 || (size_t)len >= sizeof buffer)
  ------------------
  |  Branch (26202:9): [True: 1, False: 0]
  |  Branch (26202:20): [True: 0, False: 0]
  ------------------
26203|      0|        janet_panicf("%s: %s", janet_strerror(errno), path);
26204|      1|    return janet_stringv((const uint8_t *)buffer, len);
  ------------------
  |  | 1827|      1|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|      1|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|      1|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26205|      1|#endif
26206|      1|}
os_stat:
26483|  7.90k|              "* `:modified` - timestamp when file last modified (content changed)") {
26484|  7.90k|    return os_stat_or_lstat(0, argc, argv);
26485|  7.90k|}
os_dir:
26538|    361|              "array.") {
26539|    361|    janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2029|    361|#define JANET_SANDBOX_FS_READ 64
  ------------------
26540|    361|    janet_arity(argc, 1, 2);
26541|    361|    const char *dir = janet_getcstring(argv, 0);
26542|    361|    JanetArray *paths = (argc == 2) ? janet_getarray(argv, 1) : janet_array(0);
  ------------------
  |  Branch (26542:25): [True: 4, False: 357]
  ------------------
26543|       |#ifdef JANET_WINDOWS
26544|       |    /* Read directory items with FindFirstFile / FindNextFile / FindClose */
26545|       |    struct _finddata_t afile;
26546|       |    char pattern[MAX_PATH + 1];
26547|       |    if (strlen(dir) > (sizeof(pattern) - 3))
26548|       |        janet_panicf("path too long: %s", dir);
26549|       |    snprintf(pattern, sizeof(pattern), "%s/*", dir);
26550|       |    intptr_t res = _findfirst(pattern, &afile);
26551|       |    if (-1 == res) janet_panicv(janet_cstringv(janet_strerror(errno)));
26552|       |    do {
26553|       |        if (strcmp(".", afile.name) && strcmp("..", afile.name)) {
26554|       |            janet_array_push(paths, janet_cstringv(afile.name));
26555|       |        }
26556|       |    } while (_findnext(res, &afile) != -1);
26557|       |    _findclose(res);
26558|       |#else
26559|       |    /* Read directory items with opendir / readdir / closedir */
26560|    361|    struct dirent *dp;
26561|    361|    DIR *dfd = opendir(dir);
26562|    361|    if (dfd == NULL) janet_panicf("cannot open directory %s: %s", dir, janet_strerror(errno));
  ------------------
  |  Branch (26562:9): [True: 2, False: 359]
  ------------------
26563|  1.32k|    for (;;) {
26564|  1.32k|        errno = 0;
26565|  1.32k|        dp = readdir(dfd);
26566|  1.32k|        if (dp == NULL) {
  ------------------
  |  Branch (26566:13): [True: 358, False: 963]
  ------------------
26567|    358|            if (errno) {
  ------------------
  |  Branch (26567:17): [True: 0, False: 358]
  ------------------
26568|      0|                int olderr = errno;
26569|      0|                closedir(dfd);
26570|      0|                janet_panicf("failed to read directory %s: %s", dir, janet_strerror(olderr));
26571|      0|            }
26572|    358|            break;
26573|    358|        }
26574|    963|        if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) {
  ------------------
  |  Branch (26574:13): [True: 358, False: 605]
  |  Branch (26574:41): [True: 358, False: 247]
  ------------------
26575|    716|            continue;
26576|    716|        }
26577|    247|        janet_array_push(paths, janet_cstringv(dp->d_name));
  ------------------
  |  | 1826|    247|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  848|    247|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|    247|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    247|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    247|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26578|    247|    }
26579|    359|    closedir(dfd);
26580|    359|#endif
26581|    359|    return janet_wrap_array(paths);
  ------------------
  |  |  845|    359|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|    359|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    359|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    359|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26582|    359|}
os_permission_string:
26633|  1.97k|              "include the file/directory/symlink character as rendered by `ls`.") {
26634|  1.97k|    janet_fixarity(argc, 1);
26635|  1.97k|    return os_make_permstring(os_get_unix_mode(argv, 0));
26636|  1.97k|}
os_permission_int:
26640|  1.49k|              "Parse a 9-character permission string and return an integer that can be used by chmod.") {
26641|  1.49k|    janet_fixarity(argc, 1);
26642|  1.49k|    return janet_wrap_integer(os_get_unix_mode(argv, 0));
  ------------------
  |  |  967|  1.49k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  1.49k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
26643|  1.49k|}
os_open:
26690|     68|              "  * :b - `FILE_FLAG_NO_BUFFERING`\n") {
26691|     68|    janet_arity(argc, 1, 3);
26692|     68|    const char *path = janet_getcstring(argv, 0);
26693|     68|    const uint8_t *opt_flags = janet_optkeyword(argv, argc, 1, (const uint8_t *) "r");
26694|     68|    jmode_t mode = os_optmode(argc, argv, 2, 0666);
26695|     68|    uint32_t stream_flags = 0;
26696|     68|    int disable_stream_mode = 0;
26697|     68|    JanetHandle fd;
26698|       |#ifdef JANET_WINDOWS
26699|       |    (void) mode;
26700|       |    int inherited_handle = 0;
26701|       |    DWORD desiredAccess = 0;
26702|       |    DWORD shareMode = 0;
26703|       |    DWORD creationDisp = 0;
26704|       |    DWORD fileFlags = FILE_FLAG_OVERLAPPED;
26705|       |    DWORD fileAttributes = 0;
26706|       |    /* We map unix-like open flags to the creationDisp parameter */
26707|       |    int creatUnix = 0;
26708|       |#define OCREAT 1
26709|       |#define OEXCL 2
26710|       |#define OTRUNC 4
26711|       |    for (const uint8_t *c = opt_flags; *c; c++) {
26712|       |        switch (*c) {
26713|       |            default:
26714|       |                break;
26715|       |            case 'r':
26716|       |                desiredAccess |= GENERIC_READ;
26717|       |                stream_flags |= JANET_STREAM_READABLE;
26718|       |                janet_sandbox_assert(JANET_SANDBOX_FS_READ);
26719|       |                break;
26720|       |            case 'w':
26721|       |                desiredAccess |= GENERIC_WRITE;
26722|       |                stream_flags |= JANET_STREAM_WRITABLE;
26723|       |                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
26724|       |                break;
26725|       |            case 'a':
26726|       |                desiredAccess |= FILE_APPEND_DATA;
26727|       |                stream_flags |= JANET_STREAM_WRITABLE;
26728|       |                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
26729|       |                break;
26730|       |            case 'c':
26731|       |                creatUnix |= OCREAT;
26732|       |                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
26733|       |                break;
26734|       |            case 'e':
26735|       |                creatUnix |= OEXCL;
26736|       |                break;
26737|       |            case 't':
26738|       |                creatUnix |= OTRUNC;
26739|       |                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
26740|       |                break;
26741|       |            /* Windows only flags */
26742|       |            case 'D':
26743|       |                shareMode |= FILE_SHARE_DELETE;
26744|       |                break;
26745|       |            case 'R':
26746|       |                shareMode |= FILE_SHARE_READ;
26747|       |                break;
26748|       |            case 'W':
26749|       |                shareMode |= FILE_SHARE_WRITE;
26750|       |                break;
26751|       |            case 'H':
26752|       |                fileAttributes |= FILE_ATTRIBUTE_HIDDEN;
26753|       |                break;
26754|       |            case 'O':
26755|       |                fileAttributes |= FILE_ATTRIBUTE_READONLY;
26756|       |                break;
26757|       |            case 'F':
26758|       |                fileAttributes |= FILE_ATTRIBUTE_OFFLINE;
26759|       |                break;
26760|       |            case 'T':
26761|       |                fileAttributes |= FILE_ATTRIBUTE_TEMPORARY;
26762|       |                break;
26763|       |            case 'd':
26764|       |                fileFlags |= FILE_FLAG_DELETE_ON_CLOSE;
26765|       |                break;
26766|       |            case 'b':
26767|       |                fileFlags |= FILE_FLAG_NO_BUFFERING;
26768|       |                break;
26769|       |            case 'I':
26770|       |                inherited_handle = 1;
26771|       |                break;
26772|       |            case 'V':
26773|       |                fileFlags &= ~FILE_FLAG_OVERLAPPED;
26774|       |                disable_stream_mode = 1;
26775|       |                break;
26776|       |                /* we could potentially add more here -
26777|       |                 * https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea
26778|       |                 */
26779|       |        }
26780|       |    }
26781|       |    switch (creatUnix) {
26782|       |        default:
26783|       |            janet_panic("invalid creation flags");
26784|       |        case 0:
26785|       |            creationDisp = OPEN_EXISTING;
26786|       |            break;
26787|       |        case OCREAT:
26788|       |            creationDisp = OPEN_ALWAYS;
26789|       |            janet_sandbox_assert(JANET_SANDBOX_FS_WRITE | JANET_SANDBOX_FS_READ);
26790|       |            break;
26791|       |        case OCREAT + OEXCL:
26792|       |            creationDisp = CREATE_NEW;
26793|       |            janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
26794|       |            break;
26795|       |        case OCREAT + OTRUNC:
26796|       |            creationDisp = CREATE_ALWAYS;
26797|       |            janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
26798|       |            break;
26799|       |        case OTRUNC:
26800|       |            creationDisp = TRUNCATE_EXISTING;
26801|       |            janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
26802|       |            break;
26803|       |    }
26804|       |    if (fileAttributes == 0) {
26805|       |        fileAttributes = FILE_ATTRIBUTE_NORMAL;
26806|       |    }
26807|       |    SECURITY_ATTRIBUTES saAttr;
26808|       |    memset(&saAttr, 0, sizeof(saAttr));
26809|       |    saAttr.nLength = sizeof(saAttr);
26810|       |    if (inherited_handle) {
26811|       |        saAttr.bInheritHandle = TRUE; /* Needed to do interesting things with file */
26812|       |    }
26813|       |    fd = CreateFileA(path, desiredAccess, shareMode, &saAttr, creationDisp, fileFlags | fileAttributes, NULL);
26814|       |    if (fd == INVALID_HANDLE_VALUE) janet_panicv(janet_ev_lasterr());
26815|       |#else
26816|     68|    int open_flags = O_NONBLOCK;
26817|     68|#ifdef JANET_LINUX
26818|     68|    open_flags |= O_CLOEXEC;
26819|     68|#endif
26820|     68|    int read_flag = 0;
26821|     68|    int write_flag = 0;
26822|  2.28k|    for (const uint8_t *c = opt_flags; *c; c++) {
  ------------------
  |  Branch (26822:40): [True: 2.21k, False: 68]
  ------------------
26823|  2.21k|        switch (*c) {
26824|    398|            default:
  ------------------
  |  Branch (26824:13): [True: 398, False: 1.82k]
  ------------------
26825|    398|                break;
26826|    398|            case 'r':
  ------------------
  |  Branch (26826:13): [True: 119, False: 2.09k]
  ------------------
26827|    119|                read_flag = 1;
26828|    119|                stream_flags |= JANET_STREAM_READABLE;
  ------------------
  |  |  625|    119|#define JANET_STREAM_READABLE 0x200
  ------------------
26829|    119|                janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2029|    119|#define JANET_SANDBOX_FS_READ 64
  ------------------
26830|    119|                break;
26831|     80|            case 'w':
  ------------------
  |  Branch (26831:13): [True: 80, False: 2.13k]
  ------------------
26832|     80|                write_flag = 1;
26833|     80|                stream_flags |= JANET_STREAM_WRITABLE;
  ------------------
  |  |  626|     80|#define JANET_STREAM_WRITABLE 0x400
  ------------------
26834|     80|                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2028|     80|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
26835|     80|                break;
26836|    148|            case 'c':
  ------------------
  |  Branch (26836:13): [True: 148, False: 2.07k]
  ------------------
26837|    148|                open_flags |= O_CREAT;
26838|    148|                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2028|    148|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
26839|    148|                break;
26840|    821|            case 'e':
  ------------------
  |  Branch (26840:13): [True: 821, False: 1.39k]
  ------------------
26841|    821|                open_flags |= O_EXCL;
26842|    821|                break;
26843|    133|            case 't':
  ------------------
  |  Branch (26843:13): [True: 133, False: 2.08k]
  ------------------
26844|    133|                open_flags |= O_TRUNC;
26845|    133|                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2028|    133|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
26846|    133|                break;
26847|       |            /* posix only */
26848|     81|            case 'x':
  ------------------
  |  Branch (26848:13): [True: 81, False: 2.13k]
  ------------------
26849|     81|                open_flags |= O_SYNC;
26850|     81|                break;
26851|     76|            case 'C':
  ------------------
  |  Branch (26851:13): [True: 76, False: 2.14k]
  ------------------
26852|     76|                open_flags |= O_NOCTTY;
26853|     76|                break;
26854|     87|            case 'a':
  ------------------
  |  Branch (26854:13): [True: 87, False: 2.13k]
  ------------------
26855|     87|                open_flags |= O_APPEND;
26856|     87|                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2028|     87|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
26857|     87|                break;
26858|    275|            case 'N':
  ------------------
  |  Branch (26858:13): [True: 275, False: 1.94k]
  ------------------
26859|    275|                open_flags &= ~O_NONBLOCK;
26860|    275|                disable_stream_mode = 1;
26861|    275|                break;
26862|  2.21k|        }
26863|  2.21k|    }
26864|       |    /* If both read and write, fix up to O_RDWR */
26865|     68|    if (read_flag && !write_flag) {
  ------------------
  |  Branch (26865:9): [True: 12, False: 56]
  |  Branch (26865:22): [True: 9, False: 3]
  ------------------
26866|      9|        open_flags |= O_RDONLY;
26867|      9|        janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2029|      9|#define JANET_SANDBOX_FS_READ 64
  ------------------
26868|     59|    } else if (write_flag && !read_flag) {
  ------------------
  |  Branch (26868:16): [True: 10, False: 49]
  |  Branch (26868:30): [True: 7, False: 3]
  ------------------
26869|      7|        open_flags |= O_WRONLY;
26870|      7|        janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2028|      7|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
26871|     52|    } else {
26872|     52|        open_flags |= O_RDWR;
26873|     52|        janet_sandbox_assert(JANET_SANDBOX_FS_WRITE | JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2028|     52|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
                      janet_sandbox_assert(JANET_SANDBOX_FS_WRITE | JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2029|     52|#define JANET_SANDBOX_FS_READ 64
  ------------------
26874|     52|    }
26875|       |
26876|     68|    do {
26877|     68|        fd = open(path, open_flags, mode);
26878|     68|    } while (fd == -1 && errno == EINTR);
  ------------------
  |  Branch (26878:14): [True: 38, False: 30]
  |  Branch (26878:26): [True: 0, False: 38]
  ------------------
26879|     68|    if (fd == -1) janet_panicv(janet_ev_lasterr());
  ------------------
  |  Branch (26879:9): [True: 38, False: 30]
  ------------------
26880|     30|#endif
26881|     30|    return janet_wrap_abstract(janet_stream(fd, disable_stream_mode ? 0 : stream_flags, NULL));
  ------------------
  |  |  851|     30|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|     60|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     30|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     30|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (825:32): [True: 3, False: 27]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26882|     68|}
os_pipe:
26892|      3|              "By default, both ends of the pipe are non-blocking for use with the `ev` module.") {
26893|      3|    (void) argv;
26894|      3|    janet_sandbox_assert(JANET_SANDBOX_FS_WRITE | JANET_SANDBOX_FS_TEMP);
  ------------------
  |  | 2028|      3|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
                  janet_sandbox_assert(JANET_SANDBOX_FS_WRITE | JANET_SANDBOX_FS_TEMP);
  ------------------
  |  | 2033|      3|#define JANET_SANDBOX_FS_TEMP 1024
  ------------------
26895|      3|    janet_arity(argc, 0, 1);
26896|      3|    JanetHandle fds[2];
26897|      3|    int flags = 0;
26898|      3|    if (argc > 0 && !janet_checktype(argv[0], JANET_NIL)) {
  ------------------
  |  |  806|      2|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 2]
  |  |  ------------------
  |  |  807|      2|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      2|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      2|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      2|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (26898:9): [True: 2, False: 1]
  |  Branch (26898:21): [True: 2, False: 0]
  ------------------
26899|      2|        flags = (int) janet_getflags(argv, 0, "WR");
26900|      2|    }
26901|      3|    if (janet_make_pipe(fds, flags)) janet_panicv(janet_ev_lasterr());
  ------------------
  |  Branch (26901:9): [True: 0, False: 3]
  ------------------
26902|      3|    JanetStream *reader = janet_stream(fds[0], (flags & 2) ? 0 : JANET_STREAM_READABLE, NULL);
  ------------------
  |  |  625|      6|#define JANET_STREAM_READABLE 0x200
  ------------------
  |  Branch (26902:48): [True: 0, False: 3]
  ------------------
26903|      3|    JanetStream *writer = janet_stream(fds[1], (flags & 1) ? 0 : JANET_STREAM_WRITABLE, NULL);
  ------------------
  |  |  626|      6|#define JANET_STREAM_WRITABLE 0x400
  ------------------
  |  Branch (26903:48): [True: 0, False: 3]
  ------------------
26904|      3|    Janet tup[2] = {janet_wrap_abstract(reader), janet_wrap_abstract(writer)};
  ------------------
  |  |  851|      3|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|      3|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  Janet tup[2] = {janet_wrap_abstract(reader), janet_wrap_abstract(writer)};
  ------------------
  |  |  851|      3|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|      3|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26905|      3|    return janet_wrap_tuple(janet_tuple_n(tup, 2));
  ------------------
  |  |  843|      3|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|      3|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26906|      3|}
janet_lib_os:
26913|  8.33k|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|  8.33k|#ifndef JANET_NO_PROCESSES
26930|  8.33k|#endif
26931|  8.33k|    JanetRegExt os_cfuns[] = {
26932|  8.33k|        JANET_CORE_REG("os/exit", os_exit),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26933|  8.33k|        JANET_CORE_REG("os/which", os_which),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26934|  8.33k|        JANET_CORE_REG("os/arch", os_arch),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26935|  8.33k|        JANET_CORE_REG("os/compiler", os_compiler),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26936|  8.33k|#ifndef JANET_REDUCED_OS
26937|       |
26938|       |        /* misc (un-sandboxed) */
26939|  8.33k|        JANET_CORE_REG("os/cpu-count", os_cpu_count),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26940|  8.33k|        JANET_CORE_REG("os/cwd", os_cwd),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26941|  8.33k|        JANET_CORE_REG("os/cryptorand", os_cryptorand),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26942|  8.33k|        JANET_CORE_REG("os/perm-string", os_permission_string),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26943|  8.33k|        JANET_CORE_REG("os/perm-int", os_permission_int),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26944|  8.33k|        JANET_CORE_REG("os/mktime", os_mktime),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26945|  8.33k|        JANET_CORE_REG("os/time", os_time), /* not high resolution */
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26946|  8.33k|        JANET_CORE_REG("os/date", os_date), /* not high resolution */
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26947|  8.33k|        JANET_CORE_REG("os/strftime", os_strftime),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26948|  8.33k|        JANET_CORE_REG("os/sleep", os_sleep),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26949|  8.33k|        JANET_CORE_REG("os/isatty", os_isatty),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26950|  8.33k|#ifndef JANET_NO_LOCALES
26951|  8.33k|        JANET_CORE_REG("os/setlocale", os_setlocale),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26952|  8.33k|#endif
26953|       |
26954|       |        /* env functions */
26955|  8.33k|#ifndef JANET_PLAN9
26956|  8.33k|        JANET_CORE_REG("os/environ", os_environ),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26957|  8.33k|#endif
26958|  8.33k|        JANET_CORE_REG("os/getenv", os_getenv),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26959|  8.33k|        JANET_CORE_REG("os/setenv", os_setenv),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26960|       |
26961|       |        /* fs read */
26962|  8.33k|        JANET_CORE_REG("os/dir", os_dir),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26963|  8.33k|        JANET_CORE_REG("os/stat", os_stat),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26964|  8.33k|        JANET_CORE_REG("os/lstat", os_lstat),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26965|  8.33k|        JANET_CORE_REG("os/realpath", os_realpath),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26966|  8.33k|        JANET_CORE_REG("os/cd", os_cd),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26967|  8.33k|#ifndef JANET_NO_UMASK
26968|  8.33k|        JANET_CORE_REG("os/umask", os_umask),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26969|  8.33k|#endif
26970|  8.33k|#ifndef JANET_NO_SYMLINKS
26971|  8.33k|        JANET_CORE_REG("os/readlink", os_readlink),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26972|  8.33k|#endif
26973|       |
26974|       |        /* fs write */
26975|  8.33k|        JANET_CORE_REG("os/mkdir", os_mkdir),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26976|  8.33k|        JANET_CORE_REG("os/rmdir", os_rmdir),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26977|  8.33k|        JANET_CORE_REG("os/rm", os_remove),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26978|  8.33k|        JANET_CORE_REG("os/link", os_link),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26979|  8.33k|        JANET_CORE_REG("os/rename", os_rename),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26980|  8.33k|        JANET_CORE_REG("os/chmod", os_chmod),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26981|  8.33k|        JANET_CORE_REG("os/touch", os_touch),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26982|  8.33k|#ifndef JANET_NO_SYMLINKS
26983|  8.33k|        JANET_CORE_REG("os/symlink", os_symlink),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26984|  8.33k|#endif
26985|       |
26986|       |        /* processes */
26987|  8.33k|#ifndef JANET_NO_PROCESSES
26988|  8.33k|        JANET_CORE_REG("os/execute", os_execute),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26989|  8.33k|        JANET_CORE_REG("os/spawn", os_spawn),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26990|  8.33k|        JANET_CORE_REG("os/shell", os_shell),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26991|  8.33k|        JANET_CORE_REG("os/posix-fork", os_posix_fork),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26992|  8.33k|        JANET_CORE_REG("os/posix-exec", os_posix_exec),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26993|  8.33k|        JANET_CORE_REG("os/posix-chroot", os_posix_chroot),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#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|  8.33k|        JANET_CORE_REG("os/proc-wait", os_proc_wait),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26997|  8.33k|        JANET_CORE_REG("os/proc-kill", os_proc_kill),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26998|  8.33k|        JANET_CORE_REG("os/proc-close", os_proc_close),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26999|  8.33k|        JANET_CORE_REG("os/getpid", os_proc_getpid),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
27000|  8.33k|#ifdef JANET_EV
27001|  8.33k|        JANET_CORE_REG("os/sigaction", os_sigaction),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
27002|  8.33k|#endif
27003|  8.33k|#endif
27004|       |
27005|       |        /* high resolution timers */
27006|  8.33k|        JANET_CORE_REG("os/clock", os_clock),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
27007|       |
27008|  8.33k|#ifdef JANET_EV
27009|  8.33k|        JANET_CORE_REG("os/open", os_open), /* fs read and write */
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
27010|  8.33k|        JANET_CORE_REG("os/pipe", os_pipe),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
27011|  8.33k|#endif
27012|  8.33k|#endif
27013|  8.33k|        JANET_REG_END
  ------------------
  |  | 2110|  8.33k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
27014|  8.33k|    };
27015|       |    janet_core_cfuns_ext(env, NULL, os_cfuns);
27016|  8.33k|}
janet_is_symbol_char:
27076|  18.6M|int janet_is_symbol_char(uint8_t c) {
27077|  18.6M|    return symchars[c >> 5] & ((uint32_t)1 << (c & 0x1F));
27078|  18.6M|}
janet_valid_utf8:
27083|   399k|int janet_valid_utf8(const uint8_t *str, int32_t len) {
27084|   399k|    int32_t i = 0;
27085|   399k|    int32_t j;
27086|  5.40M|    while (i < len) {
  ------------------
  |  Branch (27086:12): [True: 5.00M, False: 398k]
  ------------------
27087|  5.00M|        int32_t nexti;
27088|  5.00M|        uint8_t c = str[i];
27089|       |
27090|       |        /* Check the number of bytes in code point */
27091|  5.00M|        if (c < 0x80) nexti = i + 1;
  ------------------
  |  Branch (27091:13): [True: 5.00M, False: 7.28k]
  ------------------
27092|  7.28k|        else if ((c >> 5) == 0x06) nexti = i + 2;
  ------------------
  |  Branch (27092:18): [True: 2.12k, False: 5.15k]
  ------------------
27093|  5.15k|        else if ((c >> 4) == 0x0E) nexti = i + 3;
  ------------------
  |  Branch (27093:18): [True: 2.04k, False: 3.11k]
  ------------------
27094|  3.11k|        else if ((c >> 3) == 0x1E) nexti = i + 4;
  ------------------
  |  Branch (27094:18): [True: 2.52k, False: 592]
  ------------------
27095|       |        /* Don't allow 5 or 6 byte code points */
27096|    592|        else return 0;
27097|       |
27098|       |        /* No overflow */
27099|  5.00M|        if (nexti > len) return 0;
  ------------------
  |  Branch (27099:13): [True: 86, False: 5.00M]
  ------------------
27100|       |
27101|       |        /* Ensure trailing bytes are well formed (10XX XXXX) */
27102|  5.02M|        for (j = i + 1; j < nexti; j++) {
  ------------------
  |  Branch (27102:25): [True: 13.4k, False: 5.00M]
  ------------------
27103|  13.4k|            if ((str[j] >> 6) != 2) return 0;
  ------------------
  |  Branch (27103:17): [True: 261, False: 13.1k]
  ------------------
27104|  13.4k|        }
27105|       |
27106|       |        /* Check for overlong encoding */
27107|  5.00M|        if ((nexti == i + 2) && str[i] < 0xC2) return 0;
  ------------------
  |  Branch (27107:13): [True: 2.00k, False: 5.00M]
  |  Branch (27107:33): [True: 7, False: 1.99k]
  ------------------
27108|  5.00M|        if ((str[i] == 0xE0) && str[i + 1] < 0xA0) return 0;
  ------------------
  |  Branch (27108:13): [True: 522, False: 5.00M]
  |  Branch (27108:33): [True: 1, False: 521]
  ------------------
27109|  5.00M|        if ((str[i] == 0xF0) && str[i + 1] < 0x90) return 0;
  ------------------
  |  Branch (27109:13): [True: 674, False: 5.00M]
  |  Branch (27109:33): [True: 0, False: 674]
  ------------------
27110|       |
27111|  5.00M|        i = nexti;
27112|  5.00M|    }
27113|   398k|    return 1;
27114|   399k|}
janet_parser_consume:
27718|  24.8M|void janet_parser_consume(JanetParser *parser, uint8_t c) {
27719|  24.8M|    int consumed = 0;
27720|  24.8M|    janet_parser_checkdead(parser);
27721|  24.8M|    if (c == '\r') {
  ------------------
  |  Branch (27721:9): [True: 18.6k, False: 24.8M]
  ------------------
27722|  18.6k|        parser->line++;
27723|  18.6k|        parser->column = 0;
27724|  24.8M|    } else if (c == '\n') {
  ------------------
  |  Branch (27724:16): [True: 971k, False: 23.8M]
  ------------------
27725|   971k|        parser->column = 0;
27726|   971k|        if (parser->lookback != '\r')
  ------------------
  |  Branch (27726:13): [True: 970k, False: 1.35k]
  ------------------
27727|   970k|            parser->line++;
27728|  23.8M|    } else {
27729|  23.8M|        parser->column++;
27730|  23.8M|    }
27731|  55.5M|    while (!consumed && !parser->error) {
  ------------------
  |  Branch (27731:12): [True: 30.6M, False: 24.8M]
  |  Branch (27731:25): [True: 30.6M, False: 1.23k]
  ------------------
27732|  30.6M|        JanetParseState *state = parser->states + parser->statecount - 1;
27733|  30.6M|        consumed = state->consumer(parser, state, c);
27734|  30.6M|    }
27735|  24.8M|    parser->lookback = c;
27736|  24.8M|}
janet_parser_eof:
27738|   688k|void janet_parser_eof(JanetParser *parser) {
27739|   688k|    janet_parser_checkdead(parser);
27740|   688k|    size_t oldcolumn = parser->column;
27741|   688k|    size_t oldline = parser->line;
27742|   688k|    janet_parser_consume(parser, '\n');
27743|   688k|    if (parser->statecount > 1) {
  ------------------
  |  Branch (27743:9): [True: 1.21k, False: 687k]
  ------------------
27744|  1.21k|        delim_error(parser, parser->statecount - 1, 0, "unexpected end of source");
27745|  1.21k|    }
27746|   688k|    parser->line = oldline;
27747|   688k|    parser->column = oldcolumn;
27748|   688k|    parser->flag |= JANET_PARSER_DEAD;
  ------------------
  |  |27050|   688k|#define JANET_PARSER_DEAD 0x1
  ------------------
27749|   688k|}
janet_parser_status:
27751|  24.8M|enum JanetParserStatus janet_parser_status(JanetParser *parser) {
27752|  24.8M|    if (parser->error) return JANET_PARSE_ERROR;
  ------------------
  |  Branch (27752:9): [True: 6.68k, False: 24.8M]
  ------------------
27753|  24.8M|    if (parser->flag) return JANET_PARSE_DEAD;
  ------------------
  |  Branch (27753:9): [True: 687k, False: 24.1M]
  ------------------
27754|  24.1M|    if (parser->statecount > 1) return JANET_PARSE_PENDING;
  ------------------
  |  Branch (27754:9): [True: 24.1M, False: 66.6k]
  ------------------
27755|  66.6k|    return JANET_PARSE_ROOT;
27756|  24.1M|}
janet_parser_flush:
27758|  3.34k|void janet_parser_flush(JanetParser *parser) {
27759|  3.34k|    parser->argcount = 0;
27760|  3.34k|    parser->statecount = 1;
27761|  3.34k|    parser->bufcount = 0;
27762|  3.34k|    parser->pending = 0;
27763|  3.34k|}
janet_parser_error:
27765|  3.34k|const char *janet_parser_error(JanetParser *parser) {
27766|  3.34k|    enum JanetParserStatus status = janet_parser_status(parser);
27767|  3.34k|    if (status == JANET_PARSE_ERROR) {
  ------------------
  |  Branch (27767:9): [True: 3.34k, False: 0]
  ------------------
27768|  3.34k|        const char *e = parser->error;
27769|  3.34k|        parser->error = NULL;
27770|  3.34k|        parser->flag &= ~JANET_PARSER_GENERATED_ERROR;
  ------------------
  |  |27051|  3.34k|#define JANET_PARSER_GENERATED_ERROR 0x2
  ------------------
27771|  3.34k|        janet_parser_flush(parser);
27772|  3.34k|        return e;
27773|  3.34k|    }
27774|      0|    return NULL;
27775|  3.34k|}
janet_parser_produce:
27777|   242k|Janet janet_parser_produce(JanetParser *parser) {
27778|   242k|    Janet ret;
27779|   242k|    size_t i;
27780|   242k|    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: 242k]
  ------------------
27781|   242k|    ret = janet_unwrap_tuple(parser->args[0])[0];
  ------------------
  |  |  858|   242k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
27782|   243k|    for (i = 1; i < parser->argcount; i++) {
  ------------------
  |  Branch (27782:17): [True: 856, False: 242k]
  ------------------
27783|    856|        parser->args[i - 1] = parser->args[i];
27784|    856|    }
27785|   242k|    parser->pending--;
27786|   242k|    parser->argcount--;
27787|   242k|    parser->states[0].argn--;
27788|   242k|    return ret;
27789|   242k|}
janet_parser_init:
27805|   695k|void janet_parser_init(JanetParser *parser) {
27806|   695k|    parser->args = NULL;
27807|   695k|    parser->states = NULL;
27808|   695k|    parser->buf = NULL;
27809|   695k|    parser->argcount = 0;
27810|   695k|    parser->argcap = 0;
27811|   695k|    parser->bufcount = 0;
27812|   695k|    parser->bufcap = 0;
27813|   695k|    parser->statecount = 0;
27814|   695k|    parser->statecap = 0;
27815|   695k|    parser->error = NULL;
27816|   695k|    parser->lookback = -1;
27817|   695k|    parser->line = 1;
27818|   695k|    parser->column = 0;
27819|   695k|    parser->pending = 0;
27820|   695k|    parser->flag = 0;
27821|       |
27822|   695k|    pushstate(parser, root, PFLAG_CONTAINER);
  ------------------
  |  |27155|   695k|#define PFLAG_CONTAINER 0x100
  ------------------
27823|   695k|}
janet_parser_deinit:
27825|   695k|void janet_parser_deinit(JanetParser *parser) {
27826|   695k|    janet_free(parser->args);
  ------------------
  |  | 2415|   695k|#define janet_free(X) free((X))
  ------------------
27827|   695k|    janet_free(parser->buf);
  ------------------
  |  | 2415|   695k|#define janet_free(X) free((X))
  ------------------
27828|   695k|    janet_free(parser->states);
  ------------------
  |  | 2415|   695k|#define janet_free(X) free((X))
  ------------------
27829|   695k|}
janet_parser_has_more:
27876|  25.1M|int janet_parser_has_more(JanetParser *parser) {
27877|  25.1M|    return !!parser->pending;
27878|  25.1M|}
cfun_parse_parser:
27924|   687k|              "that can receive bytes and generate a stream of values.") {
27925|   687k|    (void) argv;
27926|   687k|    janet_fixarity(argc, 0);
27927|   687k|    JanetParser *p = janet_abstract(&janet_parser_type, sizeof(JanetParser));
27928|   687k|    janet_parser_init(p);
27929|   687k|    return janet_wrap_abstract(p);
  ------------------
  |  |  851|   687k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|   687k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   687k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   687k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27930|   687k|}
cfun_parse_consume:
27936|    502|              "the number of bytes read.") {
27937|    502|    janet_arity(argc, 2, 3);
27938|    502|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
27939|    502|    JanetByteView view = janet_getbytes(argv, 1);
27940|    502|    if (argc == 3) {
  ------------------
  |  Branch (27940:9): [True: 0, False: 502]
  ------------------
27941|      0|        int32_t offset = janet_getinteger(argv, 2);
27942|      0|        if (offset < 0 || offset > view.len)
  ------------------
  |  Branch (27942:13): [True: 0, False: 0]
  |  Branch (27942:27): [True: 0, False: 0]
  ------------------
27943|      0|            janet_panicf("invalid offset %d out of range [0,%d]", offset, view.len);
27944|      0|        view.len -= offset;
27945|      0|        view.bytes += offset;
27946|      0|    }
27947|    502|    int32_t i;
27948|  8.29k|    for (i = 0; i < view.len; i++) {
  ------------------
  |  Branch (27948:17): [True: 7.79k, False: 497]
  ------------------
27949|  7.79k|        janet_parser_consume(p, view.bytes[i]);
27950|  7.79k|        switch (janet_parser_status(p)) {
27951|  1.07k|            case JANET_PARSE_ROOT:
  ------------------
  |  Branch (27951:13): [True: 1.07k, False: 6.72k]
  ------------------
27952|  7.79k|            case JANET_PARSE_PENDING:
  ------------------
  |  Branch (27952:13): [True: 6.71k, False: 1.08k]
  ------------------
27953|  7.79k|                break;
27954|      5|            default:
  ------------------
  |  Branch (27954:13): [True: 5, False: 7.79k]
  ------------------
27955|      5|                return janet_wrap_integer(i + 1);
  ------------------
  |  |  967|      5|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|      5|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
27956|  7.79k|        }
27957|  7.79k|    }
27958|    497|    return janet_wrap_integer(i);
  ------------------
  |  |  967|    497|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|    497|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
27959|    502|}
cfun_parse_eof:
27963|   687k|              "Indicate to the parser that the end of file was reached. This puts the parser in the :dead state.") {
27964|   687k|    janet_fixarity(argc, 1);
27965|   687k|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
27966|   687k|    janet_parser_eof(p);
27967|   687k|    return argv[0];
27968|   687k|}
cfun_parse_insert:
27974|      3|              "and tuples, for example. Returns the parser.") {
27975|      3|    janet_fixarity(argc, 2);
27976|      3|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
27977|      3|    JanetParseState *s = p->states + p->statecount - 1;
27978|      3|    if (s->consumer == tokenchar) {
  ------------------
  |  Branch (27978:9): [True: 0, False: 3]
  ------------------
27979|      0|        janet_parser_consume(p, ' ');
27980|      0|        p->column--;
27981|      0|        s = p->states + p->statecount - 1;
27982|      0|    }
27983|      3|    if (s->flags & PFLAG_COMMENT) s--;
  ------------------
  |  |27164|      3|#define PFLAG_COMMENT 0x20000
  ------------------
  |  Branch (27983:9): [True: 0, False: 3]
  ------------------
27984|      3|    if (s->flags & PFLAG_CONTAINER) {
  ------------------
  |  |27155|      3|#define PFLAG_CONTAINER 0x100
  ------------------
  |  Branch (27984:9): [True: 0, False: 3]
  ------------------
27985|      0|        s->argn++;
27986|      0|        if (p->statecount == 1) {
  ------------------
  |  Branch (27986:13): [True: 0, False: 0]
  ------------------
27987|      0|            p->pending++;
27988|      0|            Janet tup = janet_wrap_tuple(janet_tuple_n(argv + 1, 1));
  ------------------
  |  |  843|      0|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27989|      0|            push_arg(p, tup);
27990|      0|        } else {
27991|      0|            push_arg(p, argv[1]);
27992|      0|        }
27993|      3|    } else if (s->flags & (PFLAG_STRING | PFLAG_LONGSTRING)) {
  ------------------
  |  |27160|      3|#define PFLAG_STRING 0x2000
  ------------------
                  } else if (s->flags & (PFLAG_STRING | PFLAG_LONGSTRING)) {
  ------------------
  |  |27161|      3|#define PFLAG_LONGSTRING 0x4000
  ------------------
  |  Branch (27993:16): [True: 0, False: 3]
  ------------------
27994|      0|        const uint8_t *str = janet_to_string(argv[1]);
27995|      0|        int32_t slen = 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)))
  |  |  ------------------
  ------------------
27996|      0|        size_t newcount = p->bufcount + slen;
27997|      0|        if (p->bufcap < newcount) {
  ------------------
  |  Branch (27997:13): [True: 0, False: 0]
  ------------------
27998|      0|            size_t newcap = 2 * newcount;
27999|      0|            p->buf = janet_realloc(p->buf, newcap);
  ------------------
  |  | 2409|      0|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
28000|      0|            if (p->buf == NULL) {
  ------------------
  |  Branch (28000:17): [True: 0, False: 0]
  ------------------
28001|      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]
  |  |  ------------------
  ------------------
28002|      0|            }
28003|      0|            p->bufcap = newcap;
28004|      0|        }
28005|      0|        safe_memcpy(p->buf + p->bufcount, str, slen);
28006|      0|        p->bufcount = newcount;
28007|      3|    } else {
28008|      3|        janet_panic("cannot insert value into parser");
28009|      3|    }
28010|      0|    return argv[0];
28011|      3|}
cfun_parse_has_more:
28015|   687k|              "Check if the parser has more values in the value queue.") {
28016|   687k|    janet_fixarity(argc, 1);
28017|   687k|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
28018|   687k|    return janet_wrap_boolean(janet_parser_has_more(p));
  ------------------
  |  |  834|   687k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|   687k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   687k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   687k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28019|   687k|}
cfun_parse_byte:
28023|      1|              "Input a single byte `b` into the parser byte stream. Returns the parser.") {
28024|      1|    janet_fixarity(argc, 2);
28025|      1|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
28026|      1|    int32_t i = janet_getinteger(argv, 1);
28027|      1|    janet_parser_consume(p, 0xFF & i);
28028|      1|    return argv[0];
28029|      1|}
cfun_parse_status:
28037|   687k|              "* :root - the parser can either read more values or safely terminate.") {
28038|   687k|    janet_fixarity(argc, 1);
28039|   687k|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
28040|   687k|    const char *stat = NULL;
28041|   687k|    switch (janet_parser_status(p)) {
  ------------------
  |  Branch (28041:13): [True: 687k, False: 0]
  ------------------
28042|    493|        case JANET_PARSE_PENDING:
  ------------------
  |  Branch (28042:9): [True: 493, False: 686k]
  ------------------
28043|    493|            stat = "pending";
28044|    493|            break;
28045|      6|        case JANET_PARSE_ERROR:
  ------------------
  |  Branch (28045:9): [True: 6, False: 687k]
  ------------------
28046|      6|            stat = "error";
28047|      6|            break;
28048|      1|        case JANET_PARSE_ROOT:
  ------------------
  |  Branch (28048:9): [True: 1, False: 687k]
  ------------------
28049|      1|            stat = "root";
28050|      1|            break;
28051|   686k|        case JANET_PARSE_DEAD:
  ------------------
  |  Branch (28051:9): [True: 686k, False: 500]
  ------------------
28052|   686k|            stat = "dead";
28053|   686k|            break;
28054|   687k|    }
28055|   687k|    return janet_ckeywordv(stat);
  ------------------
  |  | 1843|   687k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|   687k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|   687k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   687k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   687k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28056|   687k|}
cfun_parse_error:
28063|      7|              "`parser/error`.") {
28064|      7|    janet_fixarity(argc, 1);
28065|      7|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
28066|      7|    const char *err = janet_parser_error(p);
28067|      7|    if (err) {
  ------------------
  |  Branch (28067:9): [True: 6, False: 1]
  ------------------
28068|      6|        return (p->flag & JANET_PARSER_GENERATED_ERROR)
  ------------------
  |  |27051|      6|#define JANET_PARSER_GENERATED_ERROR 0x2
  ------------------
  |  Branch (28068:16): [True: 0, False: 6]
  ------------------
28069|      6|               ? janet_wrap_string((const uint8_t *) err)
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28070|      6|               : janet_cstringv(err);
  ------------------
  |  | 1826|      6|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  848|      6|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|      6|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      6|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      6|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28071|      6|    }
28072|      1|    return janet_wrap_nil();
  ------------------
  |  |  831|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28073|      7|}
cfun_parse_produce:
28081|    497|              "purposes.") {
28082|    497|    janet_arity(argc, 1, 2);
28083|    497|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
28084|    497|    if (argc == 2 && janet_truthy(argv[1])) {
  ------------------
  |  |  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 (28084:9): [True: 0, False: 497]
  ------------------
28085|      0|        return janet_parser_produce_wrapped(p);
28086|    497|    } else {
28087|    497|        return janet_parser_produce(p);
28088|    497|    }
28089|    497|}
cfun_parse_flush:
28095|      2|              "to begin parsing in a new context, create a new parser.") {
28096|      2|    janet_fixarity(argc, 1);
28097|      2|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
28098|      2|    janet_parser_flush(p);
28099|      2|    return argv[0];
28100|      2|}
cfun_parse_where:
28106|   366k|              "also provided, the current column number of the parser is also first set to that value.") {
28107|   366k|    janet_arity(argc, 1, 3);
28108|   366k|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
28109|   366k|    if (argc > 1) {
  ------------------
  |  Branch (28109:9): [True: 0, False: 366k]
  ------------------
28110|      0|        int32_t line = janet_getinteger(argv, 1);
28111|      0|        if (line < 1)
  ------------------
  |  Branch (28111:13): [True: 0, False: 0]
  ------------------
28112|      0|            janet_panicf("invalid line number %d", line);
28113|      0|        p->line = (size_t) line;
28114|      0|    }
28115|   366k|    if (argc > 2) {
  ------------------
  |  Branch (28115:9): [True: 0, False: 366k]
  ------------------
28116|      0|        int32_t column = janet_getinteger(argv, 2);
28117|      0|        if (column < 0)
  ------------------
  |  Branch (28117:13): [True: 0, False: 0]
  ------------------
28118|      0|            janet_panicf("invalid column number %d", column);
28119|      0|        p->column = (size_t) column;
28120|      0|    }
28121|   366k|    Janet *tup = janet_tuple_begin(2);
28122|   366k|    tup[0] = janet_wrap_integer(p->line);
  ------------------
  |  |  967|   366k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|   366k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
28123|   366k|    tup[1] = janet_wrap_integer(p->column);
  ------------------
  |  |  967|   366k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|   366k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
28124|   366k|    return janet_wrap_tuple(janet_tuple_end(tup));
  ------------------
  |  |  843|   366k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|   366k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   366k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   366k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28125|   366k|}
cfun_parse_state:
28262|   366k|              "type of that expression and some type-specific information.") {
28263|   366k|    janet_arity(argc, 1, 2);
28264|   366k|    const uint8_t *key = NULL;
28265|   366k|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
28266|   366k|    if (argc == 2) {
  ------------------
  |  Branch (28266:9): [True: 366k, False: 0]
  ------------------
28267|   366k|        key = janet_getkeyword(argv, 1);
28268|   366k|    }
28269|       |
28270|   366k|    if (key) {
  ------------------
  |  Branch (28270:9): [True: 366k, False: 0]
  ------------------
28271|       |        /* Get one result */
28272|   366k|        for (const struct ParserStateGetter *sg = parser_state_getters;
28273|   733k|                sg->name != NULL; sg++) {
  ------------------
  |  Branch (28273:17): [True: 733k, False: 0]
  ------------------
28274|   733k|            if (janet_cstrcmp(key, sg->name)) continue;
  ------------------
  |  Branch (28274:17): [True: 366k, False: 366k]
  ------------------
28275|   366k|            return sg->fn(p);
28276|   733k|        }
28277|      0|        janet_panicf("unexpected keyword %v", janet_wrap_keyword(key));
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28278|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28279|   366k|    } else {
28280|       |        /* Put results in table */
28281|      0|        JanetTable *tab = janet_table(0);
28282|      0|        for (const struct ParserStateGetter *sg = parser_state_getters;
28283|      0|                sg->name != NULL; sg++) {
  ------------------
  |  Branch (28283:17): [True: 0, False: 0]
  ------------------
28284|      0|            janet_table_put(tab, janet_ckeywordv(sg->name), sg->fn(p));
  ------------------
  |  | 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28285|      0|        }
28286|      0|        return janet_wrap_table(tab);
  ------------------
  |  |  846|      0|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28287|      0|    }
28288|   366k|}
cfun_parse_clone:
28294|      3|              "if parsing later fails. Returns a new parser.") {
28295|      3|    janet_fixarity(argc, 1);
28296|      3|    JanetParser *src = janet_getabstract(argv, 0, &janet_parser_type);
28297|      3|    JanetParser *dest = janet_abstract(&janet_parser_type, sizeof(JanetParser));
28298|      3|    janet_parser_clone(src, dest);
28299|      3|    return janet_wrap_abstract(dest);
  ------------------
  |  |  851|      3|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|      3|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28300|      3|}
janet_lib_parse:
28330|  8.33k|void janet_lib_parse(JanetTable *env) {
28331|  8.33k|    JanetRegExt parse_cfuns[] = {
28332|  8.33k|        JANET_CORE_REG("parser/new", cfun_parse_parser),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28333|  8.33k|        JANET_CORE_REG("parser/clone", cfun_parse_clone),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28334|  8.33k|        JANET_CORE_REG("parser/has-more", cfun_parse_has_more),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28335|  8.33k|        JANET_CORE_REG("parser/produce", cfun_parse_produce),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28336|  8.33k|        JANET_CORE_REG("parser/consume", cfun_parse_consume),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28337|  8.33k|        JANET_CORE_REG("parser/byte", cfun_parse_byte),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28338|  8.33k|        JANET_CORE_REG("parser/error", cfun_parse_error),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28339|  8.33k|        JANET_CORE_REG("parser/status", cfun_parse_status),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28340|  8.33k|        JANET_CORE_REG("parser/flush", cfun_parse_flush),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28341|  8.33k|        JANET_CORE_REG("parser/state", cfun_parse_state),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28342|  8.33k|        JANET_CORE_REG("parser/where", cfun_parse_where),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28343|  8.33k|        JANET_CORE_REG("parser/eof", cfun_parse_eof),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28344|  8.33k|        JANET_CORE_REG("parser/insert", cfun_parse_insert),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28345|  8.33k|        JANET_REG_END
  ------------------
  |  | 2110|  8.33k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
28346|  8.33k|    };
28347|       |    janet_core_cfuns_ext(env, NULL, parse_cfuns);
28348|  8.33k|}
cfun_peg_compile:
30294|      2|              "`default-peg-grammar` for the grammar of the peg.") {
30295|      2|    janet_fixarity(argc, 1);
30296|      2|    JanetPeg *peg = compile_peg(argv[0]);
30297|      2|    return janet_wrap_abstract(peg);
  ------------------
  |  |  851|      2|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|      2|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30298|      2|}
cfun_peg_match:
30387|    618|              "Returns nil if text does not match the language defined by peg. The syntax of PEGs is documented on the Janet website.") {
30388|    618|    PegCall c = peg_cfun_init(argc, argv, 0);
30389|    618|    PEG_TRY_SETUP
  ------------------
  |  |30370|    618|    JanetTryState tstate; \
  |  |30371|    618|    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: 618]
  |  |  ------------------
  |  |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|    618|    const uint8_t *result = peg_rule(&c.s, c.s.bytecode, c.bytes.bytes + c.start);
30391|    618|    PEG_TRY_TEARDOWN
  ------------------
  |  |30379|    618|    if (c.input_buffer) { \
  |  |  ------------------
  |  |  |  Branch (30379:9): [True: 0, False: 618]
  |  |  ------------------
  |  |30380|      0|        janet_restore(&tstate); \
  |  |30381|      0|        c.input_buffer->gc.flags = c.old_flags; \
  |  |30382|      0|    }
  ------------------
30392|    618|    return result ? janet_wrap_array(c.s.captures) : janet_wrap_nil();
  ------------------
  |  |  845|      1|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|      1|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  return result ? janet_wrap_array(c.s.captures) : janet_wrap_nil();
  ------------------
  |  |  831|    617|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    617|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    617|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    617|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30392:12): [True: 1, False: 617]
  ------------------
30393|    618|}
cfun_peg_find:
30397|  10.1k|              "Find first index where the peg matches in text. Returns an integer, or nil if not found.") {
30398|  10.1k|    PegCall c = peg_cfun_init(argc, argv, 0);
30399|  10.1k|    PEG_TRY_SETUP
  ------------------
  |  |30370|  10.1k|    JanetTryState tstate; \
  |  |30371|  10.1k|    if (c.input_buffer && janet_try(&tstate)) { \
  |  |  ------------------
  |  |  |  | 1981|      2|#define janet_try(state) (janet_try_init(state), (JanetSignal) setjmp((state)->buf))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1981:26): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (30371:9): [True: 2, False: 10.1k]
  |  |  ------------------
  |  |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|    }
  ------------------
30400|  10.1k|    Janet result = janet_wrap_nil();
  ------------------
  |  |  831|  10.1k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  10.1k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  10.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  10.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30401|   804k|    for (int32_t i = c.start; i < c.bytes.len; i++) {
  ------------------
  |  Branch (30401:31): [True: 801k, False: 2.47k]
  ------------------
30402|   801k|        peg_call_reset(&c);
30403|   801k|        if (peg_rule(&c.s, c.s.bytecode, c.bytes.bytes + i)) {
  ------------------
  |  Branch (30403:13): [True: 7.71k, False: 794k]
  ------------------
30404|  7.71k|            result = janet_wrap_integer(i);
  ------------------
  |  |  967|  7.71k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  7.71k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
30405|  7.71k|            break;
30406|  7.71k|        }
30407|   801k|    }
30408|  10.1k|    PEG_TRY_TEARDOWN
  ------------------
  |  |30379|  10.1k|    if (c.input_buffer) { \
  |  |  ------------------
  |  |  |  Branch (30379:9): [True: 2, False: 10.1k]
  |  |  ------------------
  |  |30380|      2|        janet_restore(&tstate); \
  |  |30381|      2|        c.input_buffer->gc.flags = c.old_flags; \
  |  |30382|      2|    }
  ------------------
30409|  10.1k|    return result;
30410|  10.1k|}
cfun_peg_find_all:
30414|    692|              "Find all indexes where the peg matches in text. Returns an array of integers.") {
30415|    692|    PegCall c = peg_cfun_init(argc, argv, 0);
30416|    692|    PEG_TRY_SETUP
  ------------------
  |  |30370|    692|    JanetTryState tstate; \
  |  |30371|    692|    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: 692]
  |  |  ------------------
  |  |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|    }
  ------------------
30417|    692|    JanetArray *ret = janet_array(0);
30418|  3.57k|    for (int32_t i = c.start; i < c.bytes.len; i++) {
  ------------------
  |  Branch (30418:31): [True: 2.88k, False: 692]
  ------------------
30419|  2.88k|        peg_call_reset(&c);
30420|  2.88k|        if (peg_rule(&c.s, c.s.bytecode, c.bytes.bytes + i))
  ------------------
  |  Branch (30420:13): [True: 2.19k, False: 694]
  ------------------
30421|  2.19k|            janet_array_push(ret, janet_wrap_integer(i));
  ------------------
  |  |  967|  2.19k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  2.19k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
30422|  2.88k|    }
30423|    692|    PEG_TRY_TEARDOWN
  ------------------
  |  |30379|    692|    if (c.input_buffer) { \
  |  |  ------------------
  |  |  |  Branch (30379:9): [True: 0, False: 692]
  |  |  ------------------
  |  |30380|      0|        janet_restore(&tstate); \
  |  |30381|      0|        c.input_buffer->gc.flags = c.old_flags; \
  |  |30382|      0|    }
  ------------------
30424|    692|    return janet_wrap_array(ret);
  ------------------
  |  |  845|    692|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|    692|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    692|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    692|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30425|    692|}
cfun_peg_replace_all:
30463|     50|              "matching text followed by any captures.") {
30464|     50|    return cfun_peg_replace_generic(argc, argv, 0);
30465|     50|}
cfun_peg_replace:
30473|   124k|              "If no matches are found, returns the input string in a new buffer.") {
30474|   124k|    return cfun_peg_replace_generic(argc, argv, 1);
30475|   124k|}
janet_lib_peg:
30499|  8.33k|void janet_lib_peg(JanetTable *env) {
30500|  8.33k|    JanetRegExt cfuns[] = {
30501|  8.33k|        JANET_CORE_REG("peg/compile", cfun_peg_compile),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30502|  8.33k|        JANET_CORE_REG("peg/match", cfun_peg_match),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30503|  8.33k|        JANET_CORE_REG("peg/find", cfun_peg_find),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30504|  8.33k|        JANET_CORE_REG("peg/find-all", cfun_peg_find_all),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30505|  8.33k|        JANET_CORE_REG("peg/replace", cfun_peg_replace),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30506|  8.33k|        JANET_CORE_REG("peg/replace-all", cfun_peg_replace_all),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
30507|  8.33k|        JANET_REG_END
  ------------------
  |  | 2110|  8.33k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
30508|  8.33k|    };
30509|       |    janet_core_cfuns_ext(env, NULL, cfuns);
30510|  8.33k|    janet_register_abstract_type(&janet_peg_type);
30511|  8.33k|}
janet_to_string_b:
30741|  26.4M|void janet_to_string_b(JanetBuffer *buffer, Janet x) {
30742|  26.4M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  26.4M|    (isnan((x).number) \
  |  |  796|  26.4M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  26.4M|        : JANET_NUMBER)
  ------------------
  |  Branch (30742:13): [True: 22.1M, False: 4.27M]
  ------------------
30743|   352k|        case JANET_NIL:
  ------------------
  |  Branch (30743:9): [True: 352k, False: 26.1M]
  ------------------
30744|   352k|            janet_buffer_push_cstring(buffer, "");
30745|   352k|            break;
30746|  1.65k|        case JANET_BOOLEAN:
  ------------------
  |  Branch (30746:9): [True: 1.65k, False: 26.4M]
  ------------------
30747|  1.65k|            janet_buffer_push_cstring(buffer,
30748|  1.65k|                                      janet_unwrap_boolean(x) ? "true" : "false");
  ------------------
  |  |  838|  1.65k|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  |  |  ------------------
  |  |  |  Branch (838:33): [True: 502, False: 1.14k]
  |  |  ------------------
  ------------------
30749|  1.65k|            break;
30750|  4.27M|        case JANET_NUMBER:
  ------------------
  |  Branch (30750:9): [True: 4.27M, False: 22.1M]
  ------------------
30751|  4.27M|            number_to_string_b(buffer, janet_unwrap_number(x));
  ------------------
  |  |  839|  4.27M|#define janet_unwrap_number(x) ((x).number)
  ------------------
30752|  4.27M|            break;
30753|  6.28M|        case JANET_STRING:
  ------------------
  |  Branch (30753:9): [True: 6.28M, False: 20.1M]
  ------------------
30754|  15.5M|        case JANET_SYMBOL:
  ------------------
  |  Branch (30754:9): [True: 9.30M, False: 17.1M]
  ------------------
30755|  15.8M|        case JANET_KEYWORD:
  ------------------
  |  Branch (30755:9): [True: 235k, False: 26.2M]
  ------------------
30756|  15.8M|            janet_buffer_push_bytes(buffer,
30757|  15.8M|                                    janet_unwrap_string(x),
  ------------------
  |  |  863|  15.8M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
30758|  15.8M|                                    janet_string_length(janet_unwrap_string(x)));
  ------------------
  |  | 1813|  15.8M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  15.8M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
30759|  15.8M|            break;
30760|  5.51M|        case JANET_BUFFER: {
  ------------------
  |  Branch (30760:9): [True: 5.51M, False: 20.9M]
  ------------------
30761|  5.51M|            JanetBuffer *to = janet_unwrap_buffer(x);
  ------------------
  |  |  862|  5.51M|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
30762|       |            /* Prevent resizing buffer while appending */
30763|  5.51M|            if (buffer == to) janet_buffer_extra(buffer, to->count);
  ------------------
  |  Branch (30763:17): [True: 0, False: 5.51M]
  ------------------
30764|  5.51M|            janet_buffer_push_bytes(buffer, to->data, to->count);
30765|  5.51M|            break;
30766|  15.5M|        }
30767|   318k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (30767:9): [True: 318k, False: 26.1M]
  ------------------
30768|   318k|            JanetAbstract p = janet_unwrap_abstract(x);
  ------------------
  |  |  866|   318k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
30769|   318k|            const JanetAbstractType *t = janet_abstract_type(p);
  ------------------
  |  | 1899|   318k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|   318k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
30770|   318k|            if (t->tostring != NULL) {
  ------------------
  |  Branch (30770:17): [True: 54, False: 317k]
  ------------------
30771|     54|                t->tostring(p, buffer);
30772|   317k|            } else {
30773|   317k|                string_description_b(buffer, t->name, p);
30774|   317k|            }
30775|   318k|        }
30776|   318k|        return;
30777|    234|        case JANET_CFUNCTION: {
  ------------------
  |  Branch (30777:9): [True: 234, False: 26.4M]
  ------------------
30778|    234|            JanetCFunRegistry *reg = janet_registry_get(janet_unwrap_cfunction(x));
  ------------------
  |  |  869|    234|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
30779|    234|            if (NULL != reg) {
  ------------------
  |  Branch (30779:17): [True: 233, False: 1]
  ------------------
30780|    233|                janet_buffer_push_cstring(buffer, "<cfunction ");
30781|    233|                if (NULL != reg->name_prefix) {
  ------------------
  |  Branch (30781:21): [True: 0, False: 233]
  ------------------
30782|      0|                    janet_buffer_push_cstring(buffer, reg->name_prefix);
30783|      0|                    janet_buffer_push_u8(buffer, '/');
30784|      0|                }
30785|    233|                janet_buffer_push_cstring(buffer, reg->name);
30786|    233|                janet_buffer_push_u8(buffer, '>');
30787|    233|                break;
30788|    233|            }
30789|      1|            goto fallthrough;
30790|    234|        }
30791|  9.62k|        case JANET_FUNCTION: {
  ------------------
  |  Branch (30791:9): [True: 9.62k, False: 26.4M]
  ------------------
30792|  9.62k|            JanetFunction *fun = janet_unwrap_function(x);
  ------------------
  |  |  868|  9.62k|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
30793|  9.62k|            JanetFuncDef *def = fun->def;
30794|  9.62k|            if (def == NULL) {
  ------------------
  |  Branch (30794:17): [True: 0, False: 9.62k]
  ------------------
30795|      0|                janet_buffer_push_cstring(buffer, "<incomplete function>");
30796|      0|                break;
30797|      0|            }
30798|  9.62k|            if (def->name) {
  ------------------
  |  Branch (30798:17): [True: 9.60k, False: 19]
  ------------------
30799|  9.60k|                const uint8_t *n = def->name;
30800|  9.60k|                janet_buffer_push_cstring(buffer, "<function ");
30801|  9.60k|                janet_buffer_push_bytes(buffer, n, janet_string_length(n));
  ------------------
  |  | 1813|  9.60k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  9.60k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
30802|  9.60k|                janet_buffer_push_u8(buffer, '>');
30803|  9.60k|                break;
30804|  9.60k|            }
30805|     19|            goto fallthrough;
30806|  9.62k|        }
30807|     20|    fallthrough:
30808|   168k|        default:
  ------------------
  |  Branch (30808:9): [True: 168k, False: 26.2M]
  ------------------
30809|   168k|            string_description_b(buffer, janet_type_names[janet_type(x)], janet_unwrap_pointer(x));
  ------------------
  |  |  795|   168k|    (isnan((x).number) \
  |  |  796|   168k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   168k|        : JANET_NUMBER)
  ------------------
                          string_description_b(buffer, janet_type_names[janet_type(x)], janet_unwrap_pointer(x));
  ------------------
  |  |  867|   168k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (30809:59): [True: 168k, False: 0]
  ------------------
30810|   168k|            break;
30811|  26.4M|    }
30812|  26.4M|}
janet_description_b:
30827|  2.64M|void janet_description_b(JanetBuffer *buffer, Janet x) {
30828|  2.64M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  2.64M|    (isnan((x).number) \
  |  |  796|  2.64M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  2.64M|        : JANET_NUMBER)
  ------------------
  |  Branch (30828:13): [True: 2.36M, False: 281k]
  ------------------
30829|  2.34M|        default:
  ------------------
  |  Branch (30829:9): [True: 2.34M, False: 296k]
  ------------------
30830|  2.34M|            break;
30831|  2.34M|        case JANET_NIL:
  ------------------
  |  Branch (30831:9): [True: 642, False: 2.64M]
  ------------------
30832|    642|            janet_buffer_push_cstring(buffer, "nil");
30833|    642|            return;
30834|  60.0k|        case JANET_KEYWORD:
  ------------------
  |  Branch (30834:9): [True: 60.0k, False: 2.58M]
  ------------------
30835|  60.0k|            janet_buffer_push_u8(buffer, ':');
30836|  60.0k|            break;
30837|   145k|        case JANET_STRING:
  ------------------
  |  Branch (30837:9): [True: 145k, False: 2.49M]
  ------------------
30838|   145k|            janet_escape_string_b(buffer, janet_unwrap_string(x));
  ------------------
  |  |  863|   145k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
30839|   145k|            return;
30840|  87.3k|        case JANET_BUFFER: {
  ------------------
  |  Branch (30840:9): [True: 87.3k, False: 2.55M]
  ------------------
30841|  87.3k|            JanetBuffer *b = janet_unwrap_buffer(x);
  ------------------
  |  |  862|  87.3k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
30842|  87.3k|            janet_escape_buffer_b(buffer, b);
30843|  87.3k|            return;
30844|      0|        }
30845|  2.27k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (30845:9): [True: 2.27k, False: 2.64M]
  ------------------
30846|  2.27k|            JanetAbstract p = janet_unwrap_abstract(x);
  ------------------
  |  |  866|  2.27k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
30847|  2.27k|            const JanetAbstractType *t = janet_abstract_type(p);
  ------------------
  |  | 1899|  2.27k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|  2.27k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
30848|  2.27k|            if (t->tostring != NULL) {
  ------------------
  |  Branch (30848:17): [True: 2.25k, False: 19]
  ------------------
30849|  2.25k|                janet_buffer_push_cstring(buffer, "<");
30850|  2.25k|                janet_buffer_push_cstring(buffer, t->name);
30851|  2.25k|                janet_buffer_push_cstring(buffer, " ");
30852|  2.25k|                t->tostring(p, buffer);
30853|  2.25k|                janet_buffer_push_cstring(buffer, ">");
30854|  2.25k|            } else {
30855|     19|                string_description_b(buffer, t->name, p);
30856|     19|            }
30857|  2.27k|            return;
30858|      0|        }
30859|  2.64M|    }
30860|  2.40M|    janet_to_string_b(buffer, x);
30861|  2.40M|}
janet_to_string:
30874|  1.38M|const uint8_t *janet_to_string(Janet x) {
30875|  1.38M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  1.38M|    (isnan((x).number) \
  |  |  796|  1.38M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  1.38M|        : JANET_NUMBER)
  ------------------
  |  Branch (30875:13): [True: 1.38M, False: 570]
  ------------------
30876|   354k|        default: {
  ------------------
  |  Branch (30876:9): [True: 354k, False: 1.03M]
  ------------------
30877|   354k|            JanetBuffer b;
30878|   354k|            janet_buffer_init(&b, 10);
30879|   354k|            janet_to_string_b(&b, x);
30880|   354k|            const uint8_t *ret = janet_string(b.data, b.count);
30881|   354k|            janet_buffer_deinit(&b);
30882|   354k|            return ret;
30883|      0|        }
30884|      9|        case JANET_BUFFER:
  ------------------
  |  Branch (30884:9): [True: 9, False: 1.38M]
  ------------------
30885|      9|            return janet_string(janet_unwrap_buffer(x)->data, janet_unwrap_buffer(x)->count);
  ------------------
  |  |  862|      9|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
                          return janet_string(janet_unwrap_buffer(x)->data, janet_unwrap_buffer(x)->count);
  ------------------
  |  |  862|      9|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
30886|  1.03M|        case JANET_STRING:
  ------------------
  |  Branch (30886:9): [True: 1.03M, False: 355k]
  ------------------
30887|  1.03M|        case JANET_SYMBOL:
  ------------------
  |  Branch (30887:9): [True: 576, False: 1.38M]
  ------------------
30888|  1.03M|        case JANET_KEYWORD:
  ------------------
  |  Branch (30888:9): [True: 1.19k, False: 1.38M]
  ------------------
30889|  1.03M|            return janet_unwrap_string(x);
  ------------------
  |  |  863|  1.03M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
30890|  1.38M|    }
30891|  1.38M|}
janet_formatbv:
31514|  3.85M|void janet_formatbv(JanetBuffer *b, const char *format, va_list args) {
31515|  3.85M|    const char *format_end = format + strlen(format);
31516|  3.85M|    const char *c = format;
31517|  3.85M|    int32_t startlen = b->count;
31518|  32.4M|    while (c < format_end) {
  ------------------
  |  Branch (31518:12): [True: 28.6M, False: 3.85M]
  ------------------
31519|  28.6M|        if (*c != '%') {
  ------------------
  |  Branch (31519:13): [True: 24.7M, False: 3.81M]
  ------------------
31520|  24.7M|            janet_buffer_push_u8(b, (uint8_t) *c++);
31521|  24.7M|        } else if (*++c == '%') {
  ------------------
  |  Branch (31521:20): [True: 0, False: 3.81M]
  ------------------
31522|      0|            janet_buffer_push_u8(b, (uint8_t) *c++);
31523|  3.81M|        } else {
31524|  3.81M|            char form[MAX_FORMAT], item[MAX_ITEM];
31525|  3.81M|            char width[3], precision[3];
31526|  3.81M|            int nb = 0; /* number of bytes in added item */
31527|  3.81M|            c = scanformat(c, form, width, precision);
31528|  3.81M|            switch (*c++) {
31529|     28|                case 'c': {
  ------------------
  |  Branch (31529:17): [True: 28, False: 3.81M]
  ------------------
31530|     28|                    int n = va_arg(args, int);
31531|     28|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |31437|     28|#define MAX_ITEM  256
  ------------------
31532|     28|                    break;
31533|      0|                }
31534|  1.12M|                case 'd':
  ------------------
  |  Branch (31534:17): [True: 1.12M, False: 2.69M]
  ------------------
31535|  1.12M|                case 'i': {
  ------------------
  |  Branch (31535:17): [True: 0, False: 3.81M]
  ------------------
31536|  1.12M|                    int64_t n = (int64_t) va_arg(args, int32_t);
31537|  1.12M|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |31437|  1.12M|#define MAX_ITEM  256
  ------------------
31538|  1.12M|                    break;
31539|  1.12M|                }
31540|      0|                case 'D':
  ------------------
  |  Branch (31540:17): [True: 0, False: 3.81M]
  ------------------
31541|      0|                case 'I': {
  ------------------
  |  Branch (31541:17): [True: 0, False: 3.81M]
  ------------------
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|     35|                case 'x':
  ------------------
  |  Branch (31546:17): [True: 35, False: 3.81M]
  ------------------
31547|     35|                case 'X':
  ------------------
  |  Branch (31547:17): [True: 0, False: 3.81M]
  ------------------
31548|     35|                case 'o':
  ------------------
  |  Branch (31548:17): [True: 0, False: 3.81M]
  ------------------
31549|     35|                case 'u': {
  ------------------
  |  Branch (31549:17): [True: 0, False: 3.81M]
  ------------------
31550|     35|                    uint64_t n = va_arg(args, uint64_t);
31551|     35|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |31437|     35|#define MAX_ITEM  256
  ------------------
31552|     35|                    break;
31553|     35|                }
31554|      0|                case 'a':
  ------------------
  |  Branch (31554:17): [True: 0, False: 3.81M]
  ------------------
31555|      0|                case 'A':
  ------------------
  |  Branch (31555:17): [True: 0, False: 3.81M]
  ------------------
31556|      0|                case 'e':
  ------------------
  |  Branch (31556:17): [True: 0, False: 3.81M]
  ------------------
31557|      0|                case 'E':
  ------------------
  |  Branch (31557:17): [True: 0, False: 3.81M]
  ------------------
31558|      2|                case 'f':
  ------------------
  |  Branch (31558:17): [True: 2, False: 3.81M]
  ------------------
31559|      2|                case 'g':
  ------------------
  |  Branch (31559:17): [True: 0, False: 3.81M]
  ------------------
31560|      2|                case 'G': {
  ------------------
  |  Branch (31560:17): [True: 0, False: 3.81M]
  ------------------
31561|      2|                    double d = va_arg(args, double);
31562|      2|                    nb = snprintf(item, MAX_ITEM, form, d);
  ------------------
  |  |31437|      2|#define MAX_ITEM  256
  ------------------
31563|      2|                    break;
31564|      2|                }
31565|  2.63M|                case 's':
  ------------------
  |  Branch (31565:17): [True: 2.63M, False: 1.18M]
  ------------------
31566|  2.63M|                case 'S': {
  ------------------
  |  Branch (31566:17): [True: 115, False: 3.81M]
  ------------------
31567|  2.63M|                    const char *str = va_arg(args, const char *);
31568|  2.63M|                    int32_t len = (c[-1] == 's')
  ------------------
  |  Branch (31568:35): [True: 2.63M, False: 115]
  ------------------
31569|  2.63M|                                  ? (int32_t) strlen(str)
31570|  2.63M|                                  : janet_string_length((JanetString) str);
  ------------------
  |  | 1813|    115|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|    115|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
31571|  2.63M|                    if (form[2] == '\0')
  ------------------
  |  Branch (31571:25): [True: 2.63M, False: 0]
  ------------------
31572|  2.63M|                        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|  2.63M|                    break;
31583|  2.63M|                }
31584|  2.63M|                case 'V':
  ------------------
  |  Branch (31584:17): [True: 2.49k, False: 3.81M]
  ------------------
31585|  2.49k|                    janet_to_string_b(b, va_arg(args, Janet));
31586|  2.49k|                    break;
31587|  54.6k|                case 'v':
  ------------------
  |  Branch (31587:17): [True: 54.6k, False: 3.76M]
  ------------------
31588|  54.6k|                    janet_description_b(b, va_arg(args, Janet));
31589|  54.6k|                    break;
31590|    273|                case 't':
  ------------------
  |  Branch (31590:17): [True: 273, False: 3.81M]
  ------------------
31591|    273|                    janet_buffer_push_cstring(b, typestr(va_arg(args, Janet)));
31592|    273|                    break;
31593|  1.70k|                case 'T': {
  ------------------
  |  Branch (31593:17): [True: 1.70k, False: 3.81M]
  ------------------
31594|  1.70k|                    int types = va_arg(args, int);
31595|  1.70k|                    pushtypes(b, types);
31596|  1.70k|                    break;
31597|  2.63M|                }
31598|      0|                case 'M':
  ------------------
  |  Branch (31598:17): [True: 0, False: 3.81M]
  ------------------
31599|      0|                case 'm':
  ------------------
  |  Branch (31599:17): [True: 0, False: 3.81M]
  ------------------
31600|      0|                case 'N':
  ------------------
  |  Branch (31600:17): [True: 0, False: 3.81M]
  ------------------
31601|      0|                case 'n':
  ------------------
  |  Branch (31601:17): [True: 0, False: 3.81M]
  ------------------
31602|      0|                case 'Q':
  ------------------
  |  Branch (31602:17): [True: 0, False: 3.81M]
  ------------------
31603|  1.74k|                case 'q':
  ------------------
  |  Branch (31603:17): [True: 1.74k, False: 3.81M]
  ------------------
31604|  1.74k|                case 'P':
  ------------------
  |  Branch (31604:17): [True: 0, False: 3.81M]
  ------------------
31605|  2.04k|                case 'p': { /* janet pretty , precision = depth */
  ------------------
  |  Branch (31605:17): [True: 296, False: 3.81M]
  ------------------
31606|  2.04k|                    int depth = atoi(precision);
31607|  2.04k|                    if (depth < 1) depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|  2.04k|#define JANET_RECURSION_GUARD 1024
  ------------------
  |  Branch (31607:25): [True: 2.04k, False: 0]
  ------------------
31608|  2.04k|                    char d = c[-1];
31609|  2.04k|                    int has_color = (d == 'P') || (d == 'Q') || (d == 'M') || (d == 'N');
  ------------------
  |  Branch (31609:37): [True: 0, False: 2.04k]
  |  Branch (31609:51): [True: 0, False: 2.04k]
  |  Branch (31609:65): [True: 0, False: 2.04k]
  |  Branch (31609:79): [True: 0, False: 2.04k]
  ------------------
31610|  2.04k|                    int has_oneline = (d == 'Q') || (d == 'q') || (d == 'N') || (d == 'n');
  ------------------
  |  Branch (31610:39): [True: 0, False: 2.04k]
  |  Branch (31610:53): [True: 1.74k, False: 296]
  |  Branch (31610:67): [True: 0, False: 296]
  |  Branch (31610:81): [True: 0, False: 296]
  ------------------
31611|  2.04k|                    int has_notrunc = (d == 'M') || (d == 'm') || (d == 'N') || (d == 'n');
  ------------------
  |  Branch (31611:39): [True: 0, False: 2.04k]
  |  Branch (31611:53): [True: 0, False: 2.04k]
  |  Branch (31611:67): [True: 0, False: 2.04k]
  |  Branch (31611:81): [True: 0, False: 2.04k]
  ------------------
31612|  2.04k|                    int columns = atoi(width);
31613|  2.04k|                    if (columns == 0) {
  ------------------
  |  Branch (31613:25): [True: 2.04k, False: 0]
  ------------------
31614|  2.04k|                        columns = JANET_COLUMNS;
  ------------------
  |  |31350|  2.04k|#define JANET_COLUMNS 80
  ------------------
31615|  2.04k|                    } else if (columns < 0) {
  ------------------
  |  Branch (31615:32): [True: 0, False: 0]
  ------------------
31616|      0|                        has_oneline = 1;
31617|      0|                    }
31618|  2.04k|                    int flags = 0;
31619|  2.04k|                    flags |= has_color ? JANET_PRETTY_COLOR : 0;
  ------------------
  |  | 1967|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31619:30): [True: 0, False: 2.04k]
  ------------------
31620|  2.04k|                    flags |= has_oneline ? JANET_PRETTY_ONELINE : 0;
  ------------------
  |  | 1968|  1.74k|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (31620:30): [True: 1.74k, False: 296]
  ------------------
31621|  2.04k|                    flags |= has_notrunc ? JANET_PRETTY_NOTRUNC : 0;
  ------------------
  |  | 1969|      0|#define JANET_PRETTY_NOTRUNC 4
  ------------------
  |  Branch (31621:30): [True: 0, False: 2.04k]
  ------------------
31622|  2.04k|                    janet_pretty_(b, depth, columns, flags,
31623|  2.04k|                                  va_arg(args, Janet), startlen, b->count);
31624|  2.04k|                    break;
31625|  1.74k|                }
31626|      0|                case 'j': {
  ------------------
  |  Branch (31626:17): [True: 0, False: 3.81M]
  ------------------
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|  1.74k|                }
31634|      0|                default: {
  ------------------
  |  Branch (31634:17): [True: 0, False: 3.81M]
  ------------------
31635|       |                    /* also treat cases 'nLlh' */
31636|      0|                    janet_panicf("invalid conversion '%s' to 'format'",
31637|      0|                                 form);
31638|  1.74k|                }
31639|  3.81M|            }
31640|  3.81M|            if (nb >= MAX_ITEM)
  ------------------
  |  |31437|  3.81M|#define MAX_ITEM  256
  ------------------
  |  Branch (31640:17): [True: 0, False: 3.81M]
  ------------------
31641|      0|                janet_panic("format buffer overflow");
31642|  3.81M|            if (nb > 0)
  ------------------
  |  Branch (31642:17): [True: 1.12M, False: 2.69M]
  ------------------
31643|  1.12M|                janet_buffer_push_bytes(b, (uint8_t *) item, nb);
31644|  3.81M|        }
31645|       |
31646|  28.6M|    }
31647|  3.85M|}
janet_formatc:
31651|  61.6k|const uint8_t *janet_formatc(const char *format, ...) {
31652|  61.6k|    va_list args;
31653|  61.6k|    const uint8_t *ret;
31654|  61.6k|    JanetBuffer buffer;
31655|  61.6k|    int32_t len = 0;
31656|       |
31657|       |    /* Calculate length, init buffer and args */
31658|  2.32M|    while (format[len]) len++;
  ------------------
  |  Branch (31658:12): [True: 2.26M, False: 61.6k]
  ------------------
31659|  61.6k|    janet_buffer_init(&buffer, len);
31660|  61.6k|    va_start(args, format);
31661|       |
31662|       |    /* Run format */
31663|  61.6k|    janet_formatbv(&buffer, format, args);
31664|       |
31665|       |    /* Iterate length */
31666|  61.6k|    va_end(args);
31667|       |
31668|  61.6k|    ret = janet_string(buffer.data, buffer.count);
31669|  61.6k|    janet_buffer_deinit(&buffer);
31670|  61.6k|    return ret;
31671|  61.6k|}
janet_formatb:
31673|  3.63k|JanetBuffer *janet_formatb(JanetBuffer *buffer, const char *format, ...) {
31674|  3.63k|    va_list args;
31675|  3.63k|    va_start(args, format);
31676|  3.63k|    janet_formatbv(buffer, format, args);
31677|       |    va_end(args);
31678|  3.63k|    return buffer;
31679|  3.63k|}
janet_buffer_format:
31688|  12.8k|    Janet *argv) {
31689|  12.8k|    size_t sfl = strlen(strfrmt);
31690|  12.8k|    const char *strfrmt_end = strfrmt + sfl;
31691|  12.8k|    int32_t arg = argstart;
31692|  12.8k|    int32_t startlen = b->count;
31693|  3.68M|    while (strfrmt < strfrmt_end) {
  ------------------
  |  Branch (31693:12): [True: 3.67M, False: 12.8k]
  ------------------
31694|  3.67M|        if (*strfrmt != '%')
  ------------------
  |  Branch (31694:13): [True: 3.64M, False: 36.5k]
  ------------------
31695|  3.64M|            janet_buffer_push_u8(b, (uint8_t) * strfrmt++);
31696|  36.5k|        else if (*++strfrmt == '%')
  ------------------
  |  Branch (31696:18): [True: 3.66k, False: 32.8k]
  ------------------
31697|  3.66k|            janet_buffer_push_u8(b, (uint8_t) * strfrmt++); /* %% */
31698|  32.8k|        else { /* format item */
31699|  32.8k|            char form[MAX_FORMAT], item[MAX_ITEM];
31700|  32.8k|            char width[3], precision[3];
31701|  32.8k|            int nb = 0; /* number of bytes in added item */
31702|       |#ifdef JANET_PLAN9
31703|       |            if (*strfrmt == 'r') {
31704|       |                rerrstr(item, MAX_ITEM);
31705|       |                nb = strlen(item);
31706|       |            } else
31707|       |#endif
31708|  32.8k|                if (++arg >= argc)
  ------------------
  |  Branch (31708:21): [True: 15, False: 32.8k]
  ------------------
31709|     15|                    janet_panic("not enough values for format");
31710|  32.8k|            strfrmt = scanformat(strfrmt, form, width, precision);
31711|  32.8k|            switch (*strfrmt++) {
31712|       |#ifdef JANET_PLAN9
31713|       |                case 'r':
31714|       |                    break;
31715|       |#endif
31716|      5|                case 'c': {
  ------------------
  |  Branch (31716:17): [True: 5, False: 32.8k]
  ------------------
31717|      5|                    nb = snprintf(item, MAX_ITEM, form, (int)
  ------------------
  |  |31437|      5|#define MAX_ITEM  256
  ------------------
31718|      5|                                  janet_getinteger(argv, arg));
31719|      5|                    break;
31720|      0|                }
31721|      1|                case 'D':
  ------------------
  |  Branch (31721:17): [True: 1, False: 32.8k]
  ------------------
31722|     11|                case 'I':
  ------------------
  |  Branch (31722:17): [True: 10, False: 32.8k]
  ------------------
31723|     20|                case 'd':
  ------------------
  |  Branch (31723:17): [True: 9, False: 32.8k]
  ------------------
31724|     24|                case 'i': {
  ------------------
  |  Branch (31724:17): [True: 4, False: 32.8k]
  ------------------
31725|     24|                    int64_t n = janet_getinteger64(argv, arg);
31726|     24|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |31437|     24|#define MAX_ITEM  256
  ------------------
31727|     24|                    break;
31728|     20|                }
31729|      3|                case 'x':
  ------------------
  |  Branch (31729:17): [True: 3, False: 32.8k]
  ------------------
31730|      6|                case 'X':
  ------------------
  |  Branch (31730:17): [True: 3, False: 32.8k]
  ------------------
31731|      9|                case 'o':
  ------------------
  |  Branch (31731:17): [True: 3, False: 32.8k]
  ------------------
31732|     12|                case 'u': {
  ------------------
  |  Branch (31732:17): [True: 3, False: 32.8k]
  ------------------
31733|     12|                    uint64_t n = janet_getuinteger64(argv, arg);
31734|     12|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |31437|     12|#define MAX_ITEM  256
  ------------------
31735|     12|                    break;
31736|      9|                }
31737|      1|                case 'a':
  ------------------
  |  Branch (31737:17): [True: 1, False: 32.8k]
  ------------------
31738|      1|                case 'A':
  ------------------
  |  Branch (31738:17): [True: 0, False: 32.8k]
  ------------------
31739|      4|                case 'e':
  ------------------
  |  Branch (31739:17): [True: 3, False: 32.8k]
  ------------------
31740|    522|                case 'E':
  ------------------
  |  Branch (31740:17): [True: 518, False: 32.3k]
  ------------------
31741|    522|                case 'f':
  ------------------
  |  Branch (31741:17): [True: 0, False: 32.8k]
  ------------------
31742|    528|                case 'g':
  ------------------
  |  Branch (31742:17): [True: 6, False: 32.8k]
  ------------------
31743|    531|                case 'G': {
  ------------------
  |  Branch (31743:17): [True: 3, False: 32.8k]
  ------------------
31744|    531|                    double d = janet_getnumber(argv, arg);
31745|    531|                    nb = snprintf(item, MAX_ITEM, form, d);
  ------------------
  |  |31437|    531|#define MAX_ITEM  256
  ------------------
31746|    531|                    break;
31747|    528|                }
31748|    143|                case 's': {
  ------------------
  |  Branch (31748:17): [True: 143, False: 32.7k]
  ------------------
31749|    143|                    const char *s = janet_getcbytes(argv, arg);
31750|    143|                    if (form[2] == '\0') {
  ------------------
  |  Branch (31750:25): [True: 129, False: 14]
  ------------------
31751|       |                        /* Prevent resizing buffer while appending */
31752|    129|                        if (s == (const char *) b->data) {
  ------------------
  |  Branch (31752:29): [True: 0, False: 129]
  ------------------
31753|      0|                            janet_buffer_extra(b, b->count);
31754|      0|                            s = (const char *) b->data;
31755|      0|                        }
31756|    129|                        janet_buffer_push_cstring(b, s);
31757|    129|                    } else {
31758|     14|                        nb = snprintf(item, MAX_ITEM, form, s);
  ------------------
  |  |31437|     14|#define MAX_ITEM  256
  ------------------
31759|     14|                    }
31760|    143|                    break;
31761|    528|                }
31762|  1.81k|                case 'V': {
  ------------------
  |  Branch (31762:17): [True: 1.81k, False: 31.0k]
  ------------------
31763|  1.81k|                    janet_to_string_b(b, argv[arg]);
31764|  1.81k|                    break;
31765|    528|                }
31766|  3.59k|                case 'v': {
  ------------------
  |  Branch (31766:17): [True: 3.59k, False: 29.2k]
  ------------------
31767|  3.59k|                    janet_description_b(b, argv[arg]);
31768|  3.59k|                    break;
31769|    528|                }
31770|    653|                case 't':
  ------------------
  |  Branch (31770:17): [True: 653, False: 32.2k]
  ------------------
31771|    653|                    janet_buffer_push_cstring(b, typestr(argv[arg]));
31772|    653|                    break;
31773|  2.65k|                case 'M':
  ------------------
  |  Branch (31773:17): [True: 2.65k, False: 30.2k]
  ------------------
31774|  11.4k|                case 'm':
  ------------------
  |  Branch (31774:17): [True: 8.84k, False: 24.0k]
  ------------------
31775|  21.2k|                case 'N':
  ------------------
  |  Branch (31775:17): [True: 9.78k, False: 23.0k]
  ------------------
31776|  21.5k|                case 'n':
  ------------------
  |  Branch (31776:17): [True: 292, False: 32.5k]
  ------------------
31777|  22.0k|                case 'Q':
  ------------------
  |  Branch (31777:17): [True: 500, False: 32.3k]
  ------------------
31778|  22.4k|                case 'q':
  ------------------
  |  Branch (31778:17): [True: 351, False: 32.5k]
  ------------------
31779|  22.8k|                case 'P':
  ------------------
  |  Branch (31779:17): [True: 385, False: 32.4k]
  ------------------
31780|  24.8k|                case 'p': { /* janet pretty , precision = depth */
  ------------------
  |  Branch (31780:17): [True: 2.06k, False: 30.8k]
  ------------------
31781|  24.8k|                    int depth = atoi(precision);
31782|  24.8k|                    if (depth < 1) depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|  24.8k|#define JANET_RECURSION_GUARD 1024
  ------------------
  |  Branch (31782:25): [True: 24.8k, False: 7]
  ------------------
31783|  24.8k|                    char d = strfrmt[-1];
31784|  24.8k|                    int has_color = (d == 'P') || (d == 'Q') || (d == 'M') || (d == 'N');
  ------------------
  |  Branch (31784:37): [True: 385, False: 24.4k]
  |  Branch (31784:51): [True: 500, False: 23.9k]
  |  Branch (31784:65): [True: 2.65k, False: 21.3k]
  |  Branch (31784:79): [True: 9.78k, False: 11.5k]
  ------------------
31785|  24.8k|                    int has_oneline = (d == 'Q') || (d == 'q') || (d == 'N') || (d == 'n');
  ------------------
  |  Branch (31785:39): [True: 500, False: 24.3k]
  |  Branch (31785:53): [True: 351, False: 24.0k]
  |  Branch (31785:67): [True: 9.78k, False: 14.2k]
  |  Branch (31785:81): [True: 292, False: 13.9k]
  ------------------
31786|  24.8k|                    int has_notrunc = (d == 'M') || (d == 'm') || (d == 'N') || (d == 'n');
  ------------------
  |  Branch (31786:39): [True: 2.65k, False: 22.2k]
  |  Branch (31786:53): [True: 8.84k, False: 13.3k]
  |  Branch (31786:67): [True: 9.78k, False: 3.59k]
  |  Branch (31786:81): [True: 292, False: 3.30k]
  ------------------
31787|  24.8k|                    int columns = atoi(width);
31788|  24.8k|                    if (columns == 0)
  ------------------
  |  Branch (31788:25): [True: 24.3k, False: 502]
  ------------------
31789|  24.3k|                        columns = JANET_COLUMNS;
  ------------------
  |  |31350|  24.3k|#define JANET_COLUMNS 80
  ------------------
31790|    502|                    else if (columns < 0)
  ------------------
  |  Branch (31790:30): [True: 0, False: 502]
  ------------------
31791|      0|                        has_oneline = 1;
31792|  24.8k|                    int flags = 0;
31793|  24.8k|                    flags |= has_color ? JANET_PRETTY_COLOR : 0;
  ------------------
  |  | 1967|  13.3k|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31793:30): [True: 13.3k, False: 11.5k]
  ------------------
31794|  24.8k|                    flags |= has_oneline ? JANET_PRETTY_ONELINE : 0;
  ------------------
  |  | 1968|  10.9k|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (31794:30): [True: 10.9k, False: 13.9k]
  ------------------
31795|  24.8k|                    flags |= has_notrunc ? JANET_PRETTY_NOTRUNC : 0;
  ------------------
  |  | 1969|  21.5k|#define JANET_PRETTY_NOTRUNC 4
  ------------------
  |  Branch (31795:30): [True: 21.5k, False: 3.30k]
  ------------------
31796|  24.8k|                    janet_pretty_(b, depth, columns, flags,
31797|  24.8k|                                  argv[arg], startlen, b->count);
31798|  24.8k|                    break;
31799|  22.8k|                }
31800|  1.19k|                case 'j': {
  ------------------
  |  Branch (31800:17): [True: 1.19k, False: 31.6k]
  ------------------
31801|  1.19k|                    int depth = atoi(precision);
31802|  1.19k|                    if (depth < 1)
  ------------------
  |  Branch (31802:25): [True: 1.19k, False: 0]
  ------------------
31803|  1.19k|                        depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|  1.19k|#define JANET_RECURSION_GUARD 1024
  ------------------
31804|  1.19k|                    janet_jdn_(b, depth, argv[arg], startlen, b->count);
31805|  1.19k|                    break;
31806|  22.8k|                }
31807|     14|                default: {
  ------------------
  |  Branch (31807:17): [True: 14, False: 32.8k]
  ------------------
31808|       |                    /* also treat cases 'nLlh' */
31809|     14|                    janet_panicf("invalid conversion '%s' to 'format'",
31810|     14|                                 form);
31811|  22.8k|                }
31812|  32.8k|            }
31813|  32.8k|            if (nb >= MAX_ITEM)
  ------------------
  |  |31437|  32.8k|#define MAX_ITEM  256
  ------------------
  |  Branch (31813:17): [True: 1, False: 32.8k]
  ------------------
31814|      1|                janet_panic("format buffer overflow");
31815|  32.8k|            if (nb > 0)
  ------------------
  |  Branch (31815:17): [True: 554, False: 32.2k]
  ------------------
31816|    554|                janet_buffer_push_bytes(b, (uint8_t *) item, nb);
31817|  32.8k|        }
31818|  3.67M|    }
31819|  12.8k|}
janetc_regalloc_init:
31859|  1.85M|void janetc_regalloc_init(JanetcRegisterAllocator *ra) {
31860|       |    ra->chunks = NULL;
31861|  1.85M|    ra->count = 0;
31862|  1.85M|    ra->capacity = 0;
31863|  1.85M|    ra->max = 0;
31864|  1.85M|    ra->regtemps = 0;
31865|  1.85M|}
janetc_regalloc_deinit:
31867|  2.50M|void janetc_regalloc_deinit(JanetcRegisterAllocator *ra) {
31868|  2.50M|    janet_free(ra->chunks);
  ------------------
  |  | 2415|  2.50M|#define janet_free(X) free((X))
  ------------------
31869|  2.50M|}
janetc_regalloc_clone:
31894|   650k|void janetc_regalloc_clone(JanetcRegisterAllocator *dest, JanetcRegisterAllocator *src) {
31895|   650k|    size_t size;
31896|   650k|    dest->count = src->count;
31897|   650k|    dest->capacity = src->capacity;
31898|   650k|    dest->max = src->max;
31899|   650k|    size = sizeof(uint32_t) * (size_t) dest->capacity;
31900|   650k|    dest->regtemps = 0;
31901|   650k|    if (size) {
  ------------------
  |  Branch (31901:9): [True: 624k, False: 25.9k]
  ------------------
31902|   624k|        dest->chunks = janet_malloc(size);
  ------------------
  |  | 2406|   624k|#define janet_malloc(X) malloc((X))
  ------------------
31903|   624k|        if (!dest->chunks) {
  ------------------
  |  Branch (31903:13): [True: 0, False: 624k]
  ------------------
31904|      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]
  |  |  ------------------
  ------------------
31905|      0|        }
31906|   624k|        memcpy(dest->chunks, src->chunks, size);
31907|   624k|    } else {
31908|       |        dest->chunks = NULL;
31909|  25.9k|    }
31910|   650k|}
janetc_regalloc_touch:
31930|  1.28M|void janetc_regalloc_touch(JanetcRegisterAllocator *ra, int32_t reg) {
31931|  1.28M|    int32_t chunk = reg >> 5;
31932|  1.28M|    int32_t bit = reg & 0x1F;
31933|  1.30M|    while (chunk >= ra->count) pushchunk(ra);
  ------------------
  |  Branch (31933:12): [True: 15.5k, False: 1.28M]
  ------------------
31934|  1.28M|    ra->chunks[chunk] |= ithbit(bit);
  ------------------
  |  |31888|  1.28M|#define ithbit(I) ((uint32_t)1 << (I))
  ------------------
31935|  1.28M|}
janetc_regalloc_1:
31938|  22.4M|int32_t janetc_regalloc_1(JanetcRegisterAllocator *ra) {
31939|       |    /* Get the nth bit in the array */
31940|  22.4M|    int32_t bit, chunk, nchunks, reg;
31941|  22.4M|    bit = -1;
31942|  22.4M|    nchunks = ra->count;
31943|  15.4G|    for (chunk = 0; chunk < nchunks; chunk++) {
  ------------------
  |  Branch (31943:21): [True: 15.4G, False: 1.06M]
  ------------------
31944|  15.4G|        uint32_t block = ra->chunks[chunk];
31945|  15.4G|        if (block == 0xFFFFFFFF) continue;
  ------------------
  |  Branch (31945:13): [True: 15.4G, False: 21.4M]
  ------------------
31946|  21.4M|        bit = count_trailing_ones(block);
  ------------------
  |  |31874|  21.4M|#define count_trailing_ones(x) __builtin_ctz(~(x))
  ------------------
31947|  21.4M|        break;
31948|  15.4G|    }
31949|       |    /* No reg found */
31950|  22.4M|    if (bit == -1) {
  ------------------
  |  Branch (31950:9): [True: 1.06M, False: 21.4M]
  ------------------
31951|  1.06M|        pushchunk(ra);
31952|  1.06M|        bit = 0;
31953|  1.06M|        chunk = nchunks;
31954|  1.06M|    }
31955|       |    /* set the bit at index bit in chunk */
31956|  22.4M|    ra->chunks[chunk] |= ithbit(bit);
  ------------------
  |  |31888|  22.4M|#define ithbit(I) ((uint32_t)1 << (I))
  ------------------
31957|  22.4M|    reg = (chunk << 5) + bit;
31958|  22.4M|    if (reg > ra->max)
  ------------------
  |  Branch (31958:9): [True: 15.7M, False: 6.74M]
  ------------------
31959|  15.7M|        ra->max = reg;
31960|  22.4M|    return reg;
31961|  22.4M|}
janetc_regalloc_free:
31988|  8.37M|void janetc_regalloc_free(JanetcRegisterAllocator *ra, int32_t reg) {
31989|  8.37M|    int32_t chunk = reg >> 5;
31990|  8.37M|    int32_t bit = reg & 0x1F;
31991|  8.37M|    ra->chunks[chunk] &= ~ithbit(bit);
  ------------------
  |  |31888|  8.37M|#define ithbit(I) ((uint32_t)1 << (I))
  ------------------
31992|  8.37M|}
janetc_regalloc_temp:
32009|  10.4M|int32_t janetc_regalloc_temp(JanetcRegisterAllocator *ra, JanetcRegisterTemp nth) {
32010|  10.4M|    int32_t oldmax = ra->max;
32011|  10.4M|    if (ra->regtemps & (1 << nth)) {
  ------------------
  |  Branch (32011:9): [True: 0, False: 10.4M]
  ------------------
32012|      0|        JANET_EXIT("regtemp already allocated");
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
32013|      0|    }
32014|  10.4M|    ra->regtemps |= 1 << nth;
32015|  10.4M|    int32_t reg = janetc_regalloc_1(ra);
32016|  10.4M|    if (reg > 0xFF) {
  ------------------
  |  Branch (32016:9): [True: 7.95M, False: 2.53M]
  ------------------
32017|  7.95M|        reg = 0xF0 + nth;
32018|  7.95M|        ra->max = (reg > oldmax) ? reg : oldmax;
  ------------------
  |  Branch (32018:19): [True: 882, False: 7.95M]
  ------------------
32019|  7.95M|    }
32020|  10.4M|    return reg;
32021|  10.4M|}
janetc_regalloc_freetemp:
32023|  12.0M|void janetc_regalloc_freetemp(JanetcRegisterAllocator *ra, int32_t reg, JanetcRegisterTemp nth) {
32024|  12.0M|    ra->regtemps &= ~(1 << nth);
32025|  12.0M|    if (reg < 0xF0)
  ------------------
  |  Branch (32025:9): [True: 3.45M, False: 8.63M]
  ------------------
32026|  3.45M|        janetc_regalloc_free(ra, reg);
32027|  12.0M|}
janet_dobytes:
32063|  8.33k|int janet_dobytes(JanetTable *env, const uint8_t *bytes, int32_t len, const char *sourcePath, Janet *out) {
32064|  8.33k|    JanetParser *parser;
32065|  8.33k|    int errflags = 0, done = 0;
32066|  8.33k|    int32_t index = 0;
32067|  8.33k|    Janet ret = janet_wrap_nil();
  ------------------
  |  |  831|  8.33k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  8.33k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.33k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.33k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32068|  8.33k|    JanetFiber *fiber = NULL;
32069|  8.33k|    const uint8_t *where = sourcePath ? janet_cstring(sourcePath) : NULL;
  ------------------
  |  Branch (32069:28): [True: 8.33k, False: 0]
  ------------------
32070|       |
32071|  8.33k|    if (where) janet_gcroot(janet_wrap_string(where));
  ------------------
  |  |  848|  8.33k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  8.33k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.33k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.33k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (32071:9): [True: 8.33k, False: 0]
  ------------------
32072|  8.33k|    if (NULL == sourcePath) sourcePath = "<unknown>";
  ------------------
  |  Branch (32072:9): [True: 0, False: 8.33k]
  ------------------
32073|  8.33k|    parser = janet_abstract(&janet_parser_type, sizeof(JanetParser));
32074|  8.33k|    janet_parser_init(parser);
32075|  8.33k|    janet_gcroot(janet_wrap_abstract(parser));
  ------------------
  |  |  851|  8.33k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  8.33k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.33k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.33k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32076|       |
32077|       |    /* While we haven't seen an error */
32078|  24.1M|    while (!done) {
  ------------------
  |  Branch (32078:12): [True: 24.1M, False: 3.94k]
  ------------------
32079|       |
32080|       |        /* Evaluate parsed values */
32081|  24.4M|        while (janet_parser_has_more(parser)) {
  ------------------
  |  Branch (32081:16): [True: 242k, False: 24.1M]
  ------------------
32082|   242k|            Janet form = janet_parser_produce(parser);
32083|   242k|            JanetCompileResult cres = janet_compile(form, env, where);
32084|   242k|            if (cres.status == JANET_COMPILE_OK) {
  ------------------
  |  Branch (32084:17): [True: 240k, False: 2.17k]
  ------------------
32085|   240k|                JanetFunction *f = janet_thunk(cres.funcdef);
32086|   240k|                fiber = janet_fiber(f, 64, 0, NULL);
32087|   240k|                fiber->env = env;
32088|   240k|                JanetSignal status = janet_continue(fiber, janet_wrap_nil(), &ret);
  ------------------
  |  |  831|   240k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   240k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   240k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   240k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32089|   240k|                if (status != JANET_SIGNAL_OK && status != JANET_SIGNAL_EVENT) {
  ------------------
  |  Branch (32089:21): [True: 6.34k, False: 233k]
  |  Branch (32089:50): [True: 2.22k, False: 4.12k]
  ------------------
32090|  2.22k|                    janet_stacktrace_ext(fiber, ret, "");
32091|  2.22k|                    errflags |= JANET_DO_ERROR_RUNTIME;
  ------------------
  |  | 1736|  2.22k|#define JANET_DO_ERROR_RUNTIME 0x01
  ------------------
32092|  2.22k|                    done = 1;
32093|  2.22k|                }
32094|   240k|            } else {
32095|  2.17k|                int32_t line = (int32_t) parser->line;
32096|  2.17k|                int32_t col = (int32_t) parser->column;
32097|  2.17k|                if ((cres.error_mapping.line > 0) &&
  ------------------
  |  Branch (32097:21): [True: 1.56k, False: 608]
  ------------------
32098|  1.56k|                        (cres.error_mapping.column > 0)) {
  ------------------
  |  Branch (32098:25): [True: 1.56k, False: 0]
  ------------------
32099|  1.56k|                    line = cres.error_mapping.line;
32100|  1.56k|                    col = cres.error_mapping.column;
32101|  1.56k|                }
32102|  2.17k|                JanetString ctx = janet_formatc("%s:%d:%d: compile error",
32103|  2.17k|                                                sourcePath, line, col);
32104|  2.17k|                JanetString errstr = janet_formatc("%s: %s",
32105|  2.17k|                                                   (const char *)ctx,
32106|  2.17k|                                                   (const char *)cres.error);
32107|  2.17k|                ret = janet_wrap_string(errstr);
  ------------------
  |  |  848|  2.17k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  2.17k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.17k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.17k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32108|  2.17k|                if (cres.macrofiber) {
  ------------------
  |  Branch (32108:21): [True: 130, False: 2.04k]
  ------------------
32109|    130|                    janet_eprintf("%s", (const char *)ctx);
  ------------------
  |  | 2195|    130|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
32110|    130|                    janet_stacktrace_ext(cres.macrofiber, ret, "");
32111|  2.04k|                } else {
32112|  2.04k|                    janet_eprintf("%s\n", (const char *)errstr);
  ------------------
  |  | 2195|  2.04k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
32113|  2.04k|                }
32114|  2.17k|                errflags |= JANET_DO_ERROR_COMPILE;
  ------------------
  |  | 1737|  2.17k|#define JANET_DO_ERROR_COMPILE 0x02
  ------------------
32115|  2.17k|                done = 1;
32116|  2.17k|            }
32117|   242k|        }
32118|       |
32119|  24.1M|        if (done) break;
  ------------------
  |  Branch (32119:13): [True: 4.39k, False: 24.1M]
  ------------------
32120|       |
32121|       |        /* Dispatch based on parse state */
32122|  24.1M|        switch (janet_parser_status(parser)) {
  ------------------
  |  Branch (32122:17): [True: 24.1M, False: 0]
  ------------------
32123|    614|            case JANET_PARSE_DEAD:
  ------------------
  |  Branch (32123:13): [True: 614, False: 24.1M]
  ------------------
32124|    614|                done = 1;
32125|    614|                break;
32126|  3.33k|            case JANET_PARSE_ERROR: {
  ------------------
  |  Branch (32126:13): [True: 3.33k, False: 24.1M]
  ------------------
32127|  3.33k|                errflags |= JANET_DO_ERROR_PARSE;
  ------------------
  |  | 1738|  3.33k|#define JANET_DO_ERROR_PARSE 0x04
  ------------------
32128|  3.33k|                int32_t line = (int32_t) parser->line;
32129|  3.33k|                int32_t col = (int32_t) parser->column;
32130|  3.33k|                JanetString errstr = janet_formatc("%s:%d:%d: parse error: %s",
32131|  3.33k|                                                   sourcePath, line, col,
32132|  3.33k|                                                   janet_parser_error(parser));
32133|  3.33k|                ret = janet_wrap_string(errstr);
  ------------------
  |  |  848|  3.33k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  3.33k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.33k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.33k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32134|  3.33k|                janet_eprintf("%s\n", (const char *)errstr);
  ------------------
  |  | 2195|  3.33k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
32135|  3.33k|                done = 1;
32136|  3.33k|                break;
32137|      0|            }
32138|  65.5k|            case JANET_PARSE_ROOT:
  ------------------
  |  Branch (32138:13): [True: 65.5k, False: 24.1M]
  ------------------
32139|  24.1M|            case JANET_PARSE_PENDING:
  ------------------
  |  Branch (32139:13): [True: 24.1M, False: 69.4k]
  ------------------
32140|  24.1M|                if (index >= len) {
  ------------------
  |  Branch (32140:21): [True: 1.78k, False: 24.1M]
  ------------------
32141|  1.78k|                    janet_parser_eof(parser);
32142|  24.1M|                } else {
32143|  24.1M|                    janet_parser_consume(parser, bytes[index++]);
32144|  24.1M|                }
32145|  24.1M|                break;
32146|  24.1M|        }
32147|       |
32148|  24.1M|    }
32149|       |
32150|       |    /* Clean up and return errors */
32151|  8.33k|    janet_gcunroot(janet_wrap_abstract(parser));
  ------------------
  |  |  851|  8.33k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  8.33k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.33k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.33k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32152|  8.33k|    if (where) janet_gcunroot(janet_wrap_string(where));
  ------------------
  |  |  848|  8.33k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  8.33k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.33k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.33k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (32152:9): [True: 8.33k, False: 0]
  ------------------
32153|  8.33k|#ifdef JANET_EV
32154|       |    /* Enter the event loop if we are not already in it */
32155|  8.33k|    if (janet_vm.stackn == 0) {
  ------------------
  |  Branch (32155:9): [True: 0, False: 8.33k]
  ------------------
32156|      0|        if (fiber) {
  ------------------
  |  Branch (32156:13): [True: 0, False: 0]
  ------------------
32157|      0|            janet_gcroot(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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32158|      0|        }
32159|      0|        janet_loop();
32160|      0|        if (fiber) {
  ------------------
  |  Branch (32160:13): [True: 0, False: 0]
  ------------------
32161|      0|            janet_gcunroot(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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32162|      0|            if (!errflags)
  ------------------
  |  Branch (32162:17): [True: 0, False: 0]
  ------------------
32163|      0|                ret = fiber->last_value;
32164|      0|        }
32165|      0|    }
32166|  8.33k|#endif
32167|  8.33k|    if (out) *out = ret;
  ------------------
  |  Branch (32167:9): [True: 8.33k, False: 0]
  ------------------
32168|  8.33k|    return errflags;
32169|  8.33k|}
dohead_destructure:
32577|   342k|SlotHeadPair *dohead_destructure(JanetCompiler *c, SlotHeadPair *into, JanetFopts opts, Janet lhs, Janet rhs) {
32578|   342k|    if (c->recursion_guard <= 0) {
  ------------------
  |  Branch (32578:9): [True: 0, False: 342k]
  ------------------
32579|      0|        janetc_error(c, janet_cstring("C stack recursed too deeply"));
32580|      0|        return NULL;
32581|      0|    }
32582|       |    /* Detect if we can do an optimization to avoid some allocations */
32583|   342k|    int can_destructure_lhs = janet_checktype(lhs, JANET_TUPLE)
  ------------------
  |  |  806|   684k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 68.2k, False: 273k]
  |  |  |  Branch (806:6): [Folded, False: 342k]
  |  |  ------------------
  |  |  807|   684k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   684k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   342k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   342k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   342k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   342k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32584|   273k|                              || janet_checktype(lhs, JANET_ARRAY);
  ------------------
  |  |  806|   273k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 15, False: 273k]
  |  |  |  Branch (806:6): [Folded, False: 273k]
  |  |  ------------------
  |  |  807|   273k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   273k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   273k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   273k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   273k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   273k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32585|   342k|    int rhs_is_indexed = janet_checktype(rhs, JANET_ARRAY)
  ------------------
  |  |  806|   684k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 47, False: 341k]
  |  |  |  Branch (806:6): [Folded, False: 342k]
  |  |  ------------------
  |  |  807|   684k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   684k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   342k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   342k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   342k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   342k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32586|   341k|                         || (janet_checktype(rhs, JANET_TUPLE) && (janet_tuple_flag(janet_unwrap_tuple(rhs)) & JANET_TUPLE_FLAG_BRACKETCTOR));
  ------------------
  |  |  806|   683k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 220k, False: 121k]
  |  |  |  Branch (806:6): [Folded, False: 341k]
  |  |  ------------------
  |  |  807|   683k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   683k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   341k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   341k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   341k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   341k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                       || (janet_checktype(rhs, JANET_TUPLE) && (janet_tuple_flag(janet_unwrap_tuple(rhs)) & JANET_TUPLE_FLAG_BRACKETCTOR));
  ------------------
  |  | 1806|   220k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|   220k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                                       || (janet_checktype(rhs, JANET_TUPLE) && (janet_tuple_flag(janet_unwrap_tuple(rhs)) & JANET_TUPLE_FLAG_BRACKETCTOR));
  ------------------
  |  | 1798|   220k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (32586:67): [True: 51.7k, False: 169k]
  ------------------
32587|   342k|    uint32_t has_drop = opts.flags & JANET_FOPTS_DROP;
  ------------------
  |  | 1126|   342k|#define JANET_FOPTS_DROP 0x40000
  ------------------
32588|       |
32589|   342k|    JanetFopts subopts = janetc_fopts_default(c);
32590|   342k|    subopts.flags = opts.flags & ~(JANET_FOPTS_TAIL | JANET_FOPTS_DROP);
  ------------------
  |  | 1124|   342k|#define JANET_FOPTS_TAIL 0x10000
  ------------------
                  subopts.flags = opts.flags & ~(JANET_FOPTS_TAIL | JANET_FOPTS_DROP);
  ------------------
  |  | 1126|   342k|#define JANET_FOPTS_DROP 0x40000
  ------------------
32591|       |
32592|   342k|    if (has_drop && can_destructure_lhs && rhs_is_indexed) {
  ------------------
  |  Branch (32592:9): [True: 219k, False: 122k]
  |  Branch (32592:21): [True: 51.6k, False: 167k]
  |  Branch (32592:44): [True: 50.6k, False: 1.07k]
  ------------------
32593|       |        /* Code is of the form (def [a b] [1 2]), avoid the allocation of two tuples */
32594|  50.6k|        JanetView view_lhs = {0};
32595|  50.6k|        JanetView view_rhs = {0};
32596|  50.6k|        janet_indexed_view(lhs, &view_lhs.items, &view_lhs.len);
32597|  50.6k|        janet_indexed_view(rhs, &view_rhs.items, &view_rhs.len);
32598|  50.6k|        int found_amp = 0;
32599|  50.6k|        int found_splice = 0;
32600|       |        /* Check for (def [x y z] [(splice [1 2 3]) 4 5 6]), bail out of optimization */
32601|   151k|        for (int32_t i = 0; i < view_rhs.len; i++) {
  ------------------
  |  Branch (32601:29): [True: 101k, False: 50.6k]
  ------------------
32602|   101k|            if (!janet_checktype(view_rhs.items[i], JANET_TUPLE)) {
  ------------------
  |  |  806|   101k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 101k]
  |  |  ------------------
  |  |  807|   101k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   101k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   101k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   101k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   101k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   101k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (32602:17): [True: 50.6k, False: 50.6k]
  ------------------
32603|  50.6k|                continue;
32604|  50.6k|            }
32605|  50.6k|            JanetTuple tup = janet_unwrap_tuple(view_rhs.items[i]);
  ------------------
  |  |  858|  50.6k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
32606|  50.6k|            if (janet_tuple_length(tup) == 0) {
  ------------------
  |  | 1802|  50.6k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  50.6k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (32606:17): [True: 0, False: 50.6k]
  ------------------
32607|      0|                continue;
32608|      0|            }
32609|  50.6k|            if (janet_symeq(tup[0], "splice")) {
  ------------------
  |  Branch (32609:17): [True: 0, False: 50.6k]
  ------------------
32610|      0|                found_splice = 1;
32611|       |                /* Good error will be generated later. */
32612|      0|                break;
32613|      0|            }
32614|  50.6k|        }
32615|       |        /* Check for (def [x & more] [1 2 3]), bail out of optimization */
32616|   163k|        for (int32_t i = 0; i < view_lhs.len; i++) {
  ------------------
  |  Branch (32616:29): [True: 112k, False: 50.6k]
  ------------------
32617|   112k|            if (janet_symeq(view_lhs.items[i], "&")) {
  ------------------
  |  Branch (32617:17): [True: 2, False: 112k]
  ------------------
32618|      2|                found_amp = 1;
32619|       |                /* Good error will be generated later. */
32620|      2|                break;
32621|      2|            }
32622|   112k|        }
32623|  50.6k|        if (!found_amp && !found_splice) {
  ------------------
  |  Branch (32623:13): [True: 50.6k, False: 2]
  |  Branch (32623:27): [True: 50.6k, False: 0]
  ------------------
32624|   163k|            for (int32_t i = 0; i < view_lhs.len; i++) {
  ------------------
  |  Branch (32624:33): [True: 112k, False: 50.6k]
  ------------------
32625|   112k|                Janet sub_rhs = view_rhs.len <= i ? janet_wrap_nil() : view_rhs.items[i];
  ------------------
  |  |  831|  11.3k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  11.3k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  11.3k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  11.3k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (32625:33): [True: 11.3k, False: 101k]
  ------------------
32626|   112k|                c->recursion_guard--;
32627|   112k|                into = dohead_destructure(c, into, subopts, view_lhs.items[i], sub_rhs);
32628|   112k|                c->recursion_guard++;
32629|   112k|            }
32630|  50.6k|            return into;
32631|  50.6k|        }
32632|  50.6k|    }
32633|       |
32634|       |    /* No optimization, do the simple way */
32635|   291k|    subopts.hint = opts.hint;
32636|   291k|    JanetSlot ret = janetc_value(subopts, rhs);
32637|   291k|    SlotHeadPair shp = {lhs, ret};
32638|       |    janet_v_push(into, shp);
  ------------------
  |  |  734|   291k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|   291k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|   291k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  61.9k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  61.9k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|  61.9k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  61.9k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 229k, False: 61.9k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 50.7k, False: 11.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|   280k|#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|   291k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   291k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32639|   291k|    return into;
32640|   342k|}
janetc_special:
33459|  3.18M|const JanetSpecial *janetc_special(const uint8_t *name) {
33460|  3.18M|    return janet_strbinsearch(
33461|  3.18M|               &janetc_specials,
33462|  3.18M|               sizeof(janetc_specials) / sizeof(JanetSpecial),
33463|  3.18M|               sizeof(JanetSpecial),
33464|  3.18M|               name);
33465|  3.18M|}
janet_string_begin:
33580|  1.40M|uint8_t *janet_string_begin(int32_t length) {
33581|  1.40M|    JanetStringHead *head = janet_gcalloc(JANET_MEMORY_STRING, sizeof(JanetStringHead) + (size_t) length + 1);
33582|  1.40M|    head->length = length;
33583|  1.40M|    uint8_t *data = (uint8_t *)head->data;
33584|  1.40M|    data[length] = 0;
33585|  1.40M|    return data;
33586|  1.40M|}
janet_string_end:
33589|  1.40M|const uint8_t *janet_string_end(uint8_t *str) {
33590|  1.40M|    janet_string_hash(str) = janet_string_calchash(str, janet_string_length(str));
  ------------------
  |  | 1814|  1.40M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|  1.40M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
                  janet_string_hash(str) = janet_string_calchash(str, janet_string_length(str));
  ------------------
  |  | 1813|  1.40M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  1.40M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33591|  1.40M|    return str;
33592|  1.40M|}
janet_string:
33595|  30.5M|const uint8_t *janet_string(const uint8_t *buf, int32_t len) {
33596|  30.5M|    JanetStringHead *head = janet_gcalloc(JANET_MEMORY_STRING, sizeof(JanetStringHead) + (size_t) len + 1);
33597|  30.5M|    head->length = len;
33598|  30.5M|    head->hash = janet_string_calchash(buf, len);
33599|  30.5M|    uint8_t *data = (uint8_t *)head->data;
33600|  30.5M|    safe_memcpy(data, buf, len);
33601|  30.5M|    data[len] = 0;
33602|  30.5M|    return data;
33603|  30.5M|}
janet_string_compare:
33606|  48.8M|int janet_string_compare(const uint8_t *lhs, const uint8_t *rhs) {
33607|  48.8M|    int32_t xlen = janet_string_length(lhs);
  ------------------
  |  | 1813|  48.8M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  48.8M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33608|  48.8M|    int32_t ylen = janet_string_length(rhs);
  ------------------
  |  | 1813|  48.8M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  48.8M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33609|  48.8M|    int32_t len = xlen > ylen ? ylen : xlen;
  ------------------
  |  Branch (33609:19): [True: 19.6M, False: 29.1M]
  ------------------
33610|  48.8M|    int res = memcmp(lhs, rhs, len);
33611|  48.8M|    if (res) return res > 0 ? 1 : -1;
  ------------------
  |  Branch (33611:9): [True: 40.9M, False: 7.96M]
  |  Branch (33611:21): [True: 15.1M, False: 25.7M]
  ------------------
33612|  7.96M|    if (xlen == ylen) return 0;
  ------------------
  |  Branch (33612:9): [True: 6.07M, False: 1.88M]
  ------------------
33613|  1.88M|    return xlen < ylen ? -1 : 1;
  ------------------
  |  Branch (33613:12): [True: 1.10M, False: 785k]
  ------------------
33614|  7.96M|}
janet_string_equalconst:
33617|   278M|int janet_string_equalconst(const uint8_t *lhs, const uint8_t *rhs, int32_t rlen, int32_t rhash) {
33618|   278M|    int32_t lhash = janet_string_hash(lhs);
  ------------------
  |  | 1814|   278M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|   278M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33619|   278M|    int32_t llen = janet_string_length(lhs);
  ------------------
  |  | 1813|   278M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|   278M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33620|   278M|    if (lhash != rhash || llen != rlen)
  ------------------
  |  Branch (33620:9): [True: 50.2M, False: 228M]
  |  Branch (33620:27): [True: 11, False: 228M]
  ------------------
33621|  50.3M|        return 0;
33622|   228M|    if (lhs == rhs)
  ------------------
  |  Branch (33622:9): [True: 23.9M, False: 204M]
  ------------------
33623|  23.9M|        return 1;
33624|   204M|    return !memcmp(lhs, rhs, rlen);
33625|   228M|}
janet_string_equal:
33628|  1.41M|int janet_string_equal(const uint8_t *lhs, const uint8_t *rhs) {
33629|  1.41M|    return janet_string_equalconst(lhs, rhs,
33630|  1.41M|                                   janet_string_length(rhs), janet_string_hash(rhs));
  ------------------
  |  | 1813|  1.41M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  1.41M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
                                                 janet_string_length(rhs), janet_string_hash(rhs));
  ------------------
  |  | 1814|  1.41M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|  1.41M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
33631|  1.41M|}
janet_cstring:
33634|   952k|const uint8_t *janet_cstring(const char *str) {
33635|   952k|    return janet_string((const uint8_t *)str, (int32_t)strlen(str));
33636|   952k|}
cfun_string_slice:
33733|   375k|              "an error is raised.") {
33734|   375k|    JanetByteView view = janet_getbytes(argv, 0);
33735|   375k|    JanetRange range = janet_getslice(argc, argv);
33736|   375k|    return janet_stringv(view.bytes + range.start, range.end - range.start);
  ------------------
  |  | 1827|   375k|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|   375k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|   375k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   375k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   375k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33737|   375k|}
cfun_symbol_slice:
33741|    211|              "Same as `string/slice`, but returns a symbol.") {
33742|    211|    JanetByteView view = janet_getbytes(argv, 0);
33743|    211|    JanetRange range = janet_getslice(argc, argv);
33744|    211|    return janet_symbolv(view.bytes + range.start, range.end - range.start);
  ------------------
  |  | 1836|    211|#define janet_symbolv(str, len) janet_wrap_symbol(janet_symbol((str), (len)))
  |  |  ------------------
  |  |  |  |  849|    211|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|    211|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    211|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    211|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33745|    211|}
cfun_keyword_slice:
33749|      6|              "Same as `string/slice`, but returns a keyword.") {
33750|      6|    JanetByteView view = janet_getbytes(argv, 0);
33751|      6|    JanetRange range = janet_getslice(argc, argv);
33752|      6|    return janet_keywordv(view.bytes + range.start, range.end - range.start);
  ------------------
  |  | 1842|      6|#define janet_keywordv(str, len) janet_wrap_keyword(janet_keyword((str), (len)))
  |  |  ------------------
  |  |  |  |  850|      6|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|      6|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      6|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      6|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33753|      6|}
cfun_string_repeat:
33757|  1.38M|              "Returns a string that is `n` copies of `bytes` concatenated.") {
33758|  1.38M|    janet_fixarity(argc, 2);
33759|  1.38M|    JanetByteView view = janet_getbytes(argv, 0);
33760|  1.38M|    int32_t rep = janet_getinteger(argv, 1);
33761|  1.38M|    if (rep < 0) janet_panic("expected non-negative number of repetitions");
  ------------------
  |  Branch (33761:9): [True: 11, False: 1.38M]
  ------------------
33762|  1.38M|    if (rep == 0) return janet_cstringv("");
  ------------------
  |  | 1826|     42|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  848|     42|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|     42|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     42|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     42|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33762:9): [True: 42, False: 1.38M]
  ------------------
33763|  1.38M|    int64_t mulres = (int64_t) rep * view.len;
33764|  1.38M|    if (mulres > INT32_MAX) janet_panic("result string is too long");
  ------------------
  |  Branch (33764:9): [True: 4, False: 1.38M]
  ------------------
33765|  1.38M|    uint8_t *newbuf = janet_string_begin((int32_t) mulres);
33766|  1.38M|    uint8_t *end = newbuf + mulres;
33767|   730M|    for (uint8_t *p = newbuf; p < end; p += view.len) {
  ------------------
  |  Branch (33767:31): [True: 728M, False: 1.38M]
  ------------------
33768|   728M|        safe_memcpy(p, view.bytes, view.len);
33769|   728M|    }
33770|  1.38M|    return janet_wrap_string(janet_string_end(newbuf));
  ------------------
  |  |  848|  1.38M|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  1.38M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.38M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.38M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33771|  1.38M|}
cfun_string_bytes:
33775|     21|              "Returns a tuple of integers that are the byte values of the string.") {
33776|     21|    janet_fixarity(argc, 1);
33777|     21|    JanetByteView view = janet_getbytes(argv, 0);
33778|     21|    Janet *tup = janet_tuple_begin(view.len);
33779|     21|    int32_t i;
33780|    710|    for (i = 0; i < view.len; i++) {
  ------------------
  |  Branch (33780:17): [True: 689, False: 21]
  ------------------
33781|    689|        tup[i] = janet_wrap_integer((int32_t) view.bytes[i]);
  ------------------
  |  |  967|    689|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|    689|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
33782|    689|    }
33783|     21|    return janet_wrap_tuple(janet_tuple_end(tup));
  ------------------
  |  |  843|     21|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|     21|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     21|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     21|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33784|     21|}
cfun_string_frombytes:
33789|     12|              "will be coerced to the range of 1 byte 0-255.") {
33790|     12|    int32_t i;
33791|     12|    uint8_t *buf = janet_string_begin(argc);
33792|     50|    for (i = 0; i < argc; i++) {
  ------------------
  |  Branch (33792:17): [True: 38, False: 12]
  ------------------
33793|     38|        int32_t c = janet_getinteger(argv, i);
33794|     38|        buf[i] = c & 0xFF;
33795|     38|    }
33796|     12|    return janet_wrap_string(janet_string_end(buf));
  ------------------
  |  |  848|     12|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|     12|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     12|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     12|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33797|     12|}
cfun_string_asciilower:
33803|  1.02k|              "case check, meaning no unicode support.") {
33804|  1.02k|    janet_fixarity(argc, 1);
33805|  1.02k|    JanetByteView view = janet_getbytes(argv, 0);
33806|  1.02k|    uint8_t *buf = janet_string_begin(view.len);
33807|   206k|    for (int32_t i = 0; i < view.len; i++) {
  ------------------
  |  Branch (33807:25): [True: 205k, False: 1.02k]
  ------------------
33808|   205k|        uint8_t c = view.bytes[i];
33809|   205k|        if (c >= 65 && c <= 90) {
  ------------------
  |  Branch (33809:13): [True: 174k, False: 31.1k]
  |  Branch (33809:24): [True: 1.04k, False: 173k]
  ------------------
33810|  1.04k|            buf[i] = c + 32;
33811|   204k|        } else {
33812|   204k|            buf[i] = c;
33813|   204k|        }
33814|   205k|    }
33815|  1.02k|    return janet_wrap_string(janet_string_end(buf));
  ------------------
  |  |  848|  1.02k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  1.02k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.02k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.02k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33816|  1.02k|}
cfun_string_asciiupper:
33822|     85|              "case check, meaning no unicode support.") {
33823|     85|    janet_fixarity(argc, 1);
33824|     85|    JanetByteView view = janet_getbytes(argv, 0);
33825|     85|    uint8_t *buf = janet_string_begin(view.len);
33826|  5.04k|    for (int32_t i = 0; i < view.len; i++) {
  ------------------
  |  Branch (33826:25): [True: 4.96k, False: 85]
  ------------------
33827|  4.96k|        uint8_t c = view.bytes[i];
33828|  4.96k|        if (c >= 97 && c <= 122) {
  ------------------
  |  Branch (33828:13): [True: 2.41k, False: 2.54k]
  |  Branch (33828:24): [True: 2.12k, False: 290]
  ------------------
33829|  2.12k|            buf[i] = c - 32;
33830|  2.83k|        } else {
33831|  2.83k|            buf[i] = c;
33832|  2.83k|        }
33833|  4.96k|    }
33834|     85|    return janet_wrap_string(janet_string_end(buf));
  ------------------
  |  |  848|     85|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|     85|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     85|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     85|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33835|     85|}
cfun_string_reverse:
33839|    132|              "Returns a string that is the reversed version of `str`.") {
33840|    132|    janet_fixarity(argc, 1);
33841|    132|    JanetByteView view = janet_getbytes(argv, 0);
33842|    132|    uint8_t *buf = janet_string_begin(view.len);
33843|    132|    int32_t i, j;
33844|  17.9k|    for (i = 0, j = view.len - 1; i < view.len; i++, j--) {
  ------------------
  |  Branch (33844:35): [True: 17.7k, False: 132]
  ------------------
33845|  17.7k|        buf[i] = view.bytes[j];
33846|  17.7k|    }
33847|    132|    return janet_wrap_string(janet_string_end(buf));
  ------------------
  |  |  848|    132|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|    132|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    132|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    132|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33848|    132|}
cfun_string_find:
33868|  25.4k|              "provided.") {
33869|  25.4k|    int32_t result;
33870|  25.4k|    struct kmp_state state;
33871|  25.4k|    findsetup(argc, argv, &state, 0);
33872|  25.4k|    result = kmp_next(&state);
33873|  25.4k|    kmp_deinit(&state);
33874|  25.4k|    return result < 0
  ------------------
  |  Branch (33874:12): [True: 24.4k, False: 1.01k]
  ------------------
33875|  25.4k|           ? janet_wrap_nil()
  ------------------
  |  |  831|  24.4k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  24.4k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33876|  25.4k|           : janet_wrap_integer(result);
  ------------------
  |  |  967|  1.01k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  1.01k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
33877|  25.4k|}
cfun_string_hasprefix:
33881|  10.5M|              "Tests whether `str` starts with `pfx`.") {
33882|  10.5M|    janet_fixarity(argc, 2);
33883|  10.5M|    JanetByteView prefix = janet_getbytes(argv, 0);
33884|  10.5M|    JanetByteView str = janet_getbytes(argv, 1);
33885|  10.5M|    return str.len < prefix.len
  ------------------
  |  Branch (33885:12): [True: 19.0k, False: 10.5M]
  ------------------
33886|  10.5M|           ? janet_wrap_false()
  ------------------
  |  |  833|  19.0k|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|  19.0k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  19.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  19.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33887|  10.5M|           : janet_wrap_boolean(memcmp(prefix.bytes, str.bytes, prefix.len) == 0);
  ------------------
  |  |  834|  10.5M|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|  10.5M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  10.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  10.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33888|  10.5M|}
cfun_string_hassuffix:
33892|  15.8k|              "Tests whether `str` ends with `sfx`.") {
33893|  15.8k|    janet_fixarity(argc, 2);
33894|  15.8k|    JanetByteView suffix = janet_getbytes(argv, 0);
33895|  15.8k|    JanetByteView str = janet_getbytes(argv, 1);
33896|  15.8k|    return str.len < suffix.len
  ------------------
  |  Branch (33896:12): [True: 13.5k, False: 2.28k]
  ------------------
33897|  15.8k|           ? janet_wrap_false()
  ------------------
  |  |  833|  13.5k|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|  13.5k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  13.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  13.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33898|  15.8k|           : janet_wrap_boolean(memcmp(suffix.bytes,
  ------------------
  |  |  834|  2.28k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|  2.28k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.28k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.28k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33899|  15.8k|                                       str.bytes + str.len - suffix.len,
33900|  15.8k|                                       suffix.len) == 0);
33901|  15.8k|}
cfun_string_findall:
33910|  1.63k|              "provided.") {
33911|  1.63k|    int32_t result;
33912|  1.63k|    struct kmp_state state;
33913|  1.63k|    findsetup(argc, argv, &state, 0);
33914|  1.63k|    JanetArray *array = janet_array(0);
33915|  4.56k|    while ((result = kmp_next(&state)) >= 0) {
  ------------------
  |  Branch (33915:12): [True: 2.92k, False: 1.63k]
  ------------------
33916|  2.92k|        janet_array_push(array, janet_wrap_integer(result));
  ------------------
  |  |  967|  2.92k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  2.92k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
33917|  2.92k|    }
33918|  1.63k|    kmp_deinit(&state);
33919|  1.63k|    return janet_wrap_array(array);
  ------------------
  |  |  845|  1.63k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  1.63k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.63k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.63k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33920|  1.63k|}
cfun_string_replace:
33956|  6.20k|              "Will return the new string if `patt` is found, otherwise returns `str`.") {
33957|  6.20k|    int32_t result;
33958|  6.20k|    struct replace_state s;
33959|  6.20k|    uint8_t *buf;
33960|  6.20k|    replacesetup(argc, argv, &s);
33961|  6.20k|    result = kmp_next(&s.kmp);
33962|  6.20k|    if (result < 0) {
  ------------------
  |  Branch (33962:9): [True: 1.97k, False: 4.23k]
  ------------------
33963|  1.97k|        kmp_deinit(&s.kmp);
33964|  1.97k|        return janet_stringv(s.kmp.text, s.kmp.textlen);
  ------------------
  |  | 1827|  1.97k|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|  1.97k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.97k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.97k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.97k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33965|  1.97k|    }
33966|  4.23k|    JanetByteView subst = janet_text_substitution(&s.subst, s.kmp.text + result, s.kmp.patlen, NULL);
33967|  4.23k|    buf = janet_string_begin(s.kmp.textlen - s.kmp.patlen + subst.len);
33968|  4.23k|    safe_memcpy(buf, s.kmp.text, result);
33969|  4.23k|    safe_memcpy(buf + result, subst.bytes, subst.len);
33970|  4.23k|    safe_memcpy(buf + result + subst.len,
33971|  4.23k|                s.kmp.text + result + s.kmp.patlen,
33972|  4.23k|                s.kmp.textlen - result - s.kmp.patlen);
33973|  4.23k|    kmp_deinit(&s.kmp);
33974|  4.23k|    return janet_wrap_string(janet_string_end(buf));
  ------------------
  |  |  848|  4.23k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  4.23k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.23k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.23k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33975|  6.20k|}
cfun_string_replaceall:
33983|  5.63M|              "Will return the new string if `patt` is found, otherwise returns `str`.") {
33984|  5.63M|    int32_t result;
33985|  5.63M|    struct replace_state s;
33986|  5.63M|    JanetBuffer b;
33987|  5.63M|    int32_t lastindex = 0;
33988|  5.63M|    replacesetup(argc, argv, &s);
33989|  5.63M|    janet_buffer_init(&b, s.kmp.textlen);
33990|  5.63M|    while ((result = kmp_next(&s.kmp)) >= 0) {
  ------------------
  |  Branch (33990:12): [True: 0, False: 5.63M]
  ------------------
33991|      0|        JanetByteView subst = janet_text_substitution(&s.subst, s.kmp.text + result, s.kmp.patlen, NULL);
33992|      0|        janet_buffer_push_bytes(&b, s.kmp.text + lastindex, result - lastindex);
33993|      0|        janet_buffer_push_bytes(&b, subst.bytes, subst.len);
33994|      0|        lastindex = result + s.kmp.patlen;
33995|      0|        kmp_seti(&s.kmp, lastindex);
33996|      0|    }
33997|  5.63M|    janet_buffer_push_bytes(&b, s.kmp.text + lastindex, s.kmp.textlen - lastindex);
33998|  5.63M|    const uint8_t *ret = janet_string(b.data, b.count);
33999|  5.63M|    janet_buffer_deinit(&b);
34000|  5.63M|    kmp_deinit(&s.kmp);
34001|  5.63M|    return janet_wrap_string(ret);
  ------------------
  |  |  848|  5.63M|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  5.63M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.63M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.63M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34002|  5.63M|}
cfun_string_split:
34011|  2.59k|              "(if provided).") {
34012|  2.59k|    int32_t result;
34013|  2.59k|    JanetArray *array;
34014|  2.59k|    struct kmp_state state;
34015|  2.59k|    int32_t limit = -1, lastindex = 0;
34016|  2.59k|    if (argc == 4) {
  ------------------
  |  Branch (34016:9): [True: 237, False: 2.35k]
  ------------------
34017|    237|        limit = janet_getinteger(argv, 3);
34018|    237|    }
34019|  2.59k|    findsetup(argc, argv, &state, 1);
34020|  2.59k|    array = janet_array(0);
34021|  9.10k|    while ((result = kmp_next(&state)) >= 0 && --limit) {
  ------------------
  |  Branch (34021:12): [True: 6.51k, False: 2.59k]
  |  Branch (34021:48): [True: 6.51k, False: 0]
  ------------------
34022|  6.51k|        const uint8_t *slice = janet_string(state.text + lastindex, result - lastindex);
34023|  6.51k|        janet_array_push(array, janet_wrap_string(slice));
  ------------------
  |  |  848|  6.51k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  6.51k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.51k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.51k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34024|  6.51k|        lastindex = result + state.patlen;
34025|  6.51k|        kmp_seti(&state, lastindex);
34026|  6.51k|    }
34027|  2.59k|    const uint8_t *slice = janet_string(state.text + lastindex, state.textlen - lastindex);
34028|  2.59k|    janet_array_push(array, janet_wrap_string(slice));
  ------------------
  |  |  848|  2.59k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  2.59k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.59k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.59k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34029|  2.59k|    kmp_deinit(&state);
34030|  2.59k|    return janet_wrap_array(array);
  ------------------
  |  |  845|  2.59k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  2.59k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.59k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.59k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34031|  2.59k|}
cfun_string_checkset:
34038|  1.74k|              "not appear in `set-bytes`. Both arguments are bytes types.") {
34039|  1.74k|    uint32_t bitset[8] = {0, 0, 0, 0, 0, 0, 0, 0};
34040|  1.74k|    janet_fixarity(argc, 2);
34041|  1.74k|    JanetByteView set = janet_getbytes(argv, 0);
34042|  1.74k|    JanetByteView str = janet_getbytes(argv, 1);
34043|       |    /* Populate set */
34044|  2.66k|    for (int32_t i = 0; i < set.len; i++) {
  ------------------
  |  Branch (34044:25): [True: 924, False: 1.74k]
  ------------------
34045|    924|        int index = set.bytes[i] >> 5;
34046|    924|        uint32_t mask = (uint32_t) 1 << (set.bytes[i] & 0x1F);
34047|    924|        bitset[index] |= mask;
34048|    924|    }
34049|       |    /* Check set */
34050|  1.78k|    for (int32_t i = 0; i < str.len; i++) {
  ------------------
  |  Branch (34050:25): [True: 944, False: 842]
  ------------------
34051|    944|        int index = str.bytes[i] >> 5;
34052|    944|        uint32_t mask = (uint32_t) 1 << (str.bytes[i] & 0x1F);
34053|    944|        if (!(bitset[index] & mask)) {
  ------------------
  |  Branch (34053:13): [True: 900, False: 44]
  ------------------
34054|    900|            return janet_wrap_false();
  ------------------
  |  |  833|    900|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|    900|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    900|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    900|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34055|    900|        }
34056|    944|    }
34057|    842|    return janet_wrap_true();
  ------------------
  |  |  832|    842|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  822|    842|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    842|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    842|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34058|  1.74k|}
cfun_string_join:
34063|  9.58k|              "a separator string `sep`.") {
34064|  9.58k|    janet_arity(argc, 1, 2);
34065|  9.58k|    JanetView parts = janet_getindexed(argv, 0);
34066|  9.58k|    JanetByteView joiner;
34067|  9.58k|    if (argc == 2) {
  ------------------
  |  Branch (34067:9): [True: 8.62k, False: 959]
  ------------------
34068|  8.62k|        joiner = janet_getbytes(argv, 1);
34069|  8.62k|    } else {
34070|    959|        joiner.bytes = NULL;
34071|    959|        joiner.len = 0;
34072|    959|    }
34073|       |    /* Check args */
34074|  9.58k|    int32_t i;
34075|  9.58k|    int64_t finallen = 0;
34076|  3.02M|    for (i = 0; i < parts.len; i++) {
  ------------------
  |  Branch (34076:17): [True: 3.01M, False: 9.57k]
  ------------------
34077|  3.01M|        const uint8_t *chunk;
34078|  3.01M|        int32_t chunklen = 0;
34079|  3.01M|        if (!janet_bytes_view(parts.items[i], &chunk, &chunklen)) {
  ------------------
  |  Branch (34079:13): [True: 2, False: 3.01M]
  ------------------
34080|      2|            janet_panicf("item %d of parts is not a byte sequence, got %v", i, parts.items[i]);
34081|      2|        }
34082|  3.01M|        if (i) finallen += joiner.len;
  ------------------
  |  Branch (34082:13): [True: 3.00M, False: 9.52k]
  ------------------
34083|  3.01M|        finallen += chunklen;
34084|  3.01M|        if (finallen > INT32_MAX)
  ------------------
  |  Branch (34084:13): [True: 0, False: 3.01M]
  ------------------
34085|      0|            janet_panic("result string too long");
34086|  3.01M|    }
34087|  9.57k|    uint8_t *buf, *out;
34088|  9.57k|    out = buf = janet_string_begin((int32_t) finallen);
34089|  3.02M|    for (i = 0; i < parts.len; i++) {
  ------------------
  |  Branch (34089:17): [True: 3.01M, False: 9.57k]
  ------------------
34090|  3.01M|        const uint8_t *chunk = NULL;
34091|  3.01M|        int32_t chunklen = 0;
34092|  3.01M|        if (i) {
  ------------------
  |  Branch (34092:13): [True: 3.00M, False: 9.51k]
  ------------------
34093|  3.00M|            safe_memcpy(out, joiner.bytes, joiner.len);
34094|  3.00M|            out += joiner.len;
34095|  3.00M|        }
34096|  3.01M|        janet_bytes_view(parts.items[i], &chunk, &chunklen);
34097|  3.01M|        safe_memcpy(out, chunk, chunklen);
34098|  3.01M|        out += chunklen;
34099|  3.01M|    }
34100|  9.57k|    return janet_wrap_string(janet_string_end(buf));
  ------------------
  |  |  848|  9.57k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  9.57k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  9.57k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  9.57k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34101|  9.58k|}
cfun_string_format:
34135|     38|              "* `n`, `N` - pretty format on one line without truncation") {
34136|     38|    janet_arity(argc, 1, -1);
34137|     38|    JanetBuffer *buffer = janet_buffer(0);
34138|     38|    const char *strfrmt = (const char *) janet_getstring(argv, 0);
34139|     38|    janet_buffer_format(buffer, strfrmt, 0, argc, argv);
34140|     38|    return janet_stringv(buffer->data, buffer->count);
  ------------------
  |  | 1827|     38|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|     38|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|     38|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     38|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     38|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34141|     38|}
cfun_string_trim:
34179|     71|              "characters in `bytes` as whitespace.") {
34180|     71|    JanetByteView str, set;
34181|     71|    trim_help_args(argc, argv, &str, &set);
34182|     71|    int32_t left_edge = trim_help_leftedge(str, set);
34183|     71|    int32_t right_edge = trim_help_rightedge(str, set);
34184|     71|    if (right_edge < left_edge)
  ------------------
  |  Branch (34184:9): [True: 2, False: 69]
  ------------------
34185|      2|        return janet_stringv(NULL, 0);
  ------------------
  |  | 1827|      2|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|      2|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|      2|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34186|     69|    return janet_stringv(str.bytes + left_edge, right_edge - left_edge);
  ------------------
  |  | 1827|     69|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|     69|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|     69|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     69|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     69|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34187|     71|}
cfun_string_triml:
34193|  1.11k|              "`bytes` as whitespace.") {
34194|  1.11k|    JanetByteView str, set;
34195|  1.11k|    trim_help_args(argc, argv, &str, &set);
34196|  1.11k|    int32_t left_edge = trim_help_leftedge(str, set);
34197|  1.11k|    return janet_stringv(str.bytes + left_edge, str.len - left_edge);
  ------------------
  |  | 1827|  1.11k|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|  1.11k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.11k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.11k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.11k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34198|  1.11k|}
cfun_string_trimr:
34204|  3.41k|              "`bytes` as whitespace.") {
34205|  3.41k|    JanetByteView str, set;
34206|  3.41k|    trim_help_args(argc, argv, &str, &set);
34207|  3.41k|    int32_t right_edge = trim_help_rightedge(str, set);
34208|  3.41k|    return janet_stringv(str.bytes, right_edge);
  ------------------
  |  | 1827|  3.41k|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|  3.41k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  3.41k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  3.41k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  3.41k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34209|  3.41k|}
janet_lib_string:
34212|  8.33k|void janet_lib_string(JanetTable *env) {
34213|  8.33k|    JanetRegExt string_cfuns[] = {
34214|  8.33k|        JANET_CORE_REG("string/slice", cfun_string_slice),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34215|  8.33k|        JANET_CORE_REG("keyword/slice", cfun_keyword_slice),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34216|  8.33k|        JANET_CORE_REG("symbol/slice", cfun_symbol_slice),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34217|  8.33k|        JANET_CORE_REG("string/repeat", cfun_string_repeat),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34218|  8.33k|        JANET_CORE_REG("string/bytes", cfun_string_bytes),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34219|  8.33k|        JANET_CORE_REG("string/from-bytes", cfun_string_frombytes),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34220|  8.33k|        JANET_CORE_REG("string/ascii-lower", cfun_string_asciilower),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34221|  8.33k|        JANET_CORE_REG("string/ascii-upper", cfun_string_asciiupper),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34222|  8.33k|        JANET_CORE_REG("string/reverse", cfun_string_reverse),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34223|  8.33k|        JANET_CORE_REG("string/find", cfun_string_find),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34224|  8.33k|        JANET_CORE_REG("string/find-all", cfun_string_findall),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34225|  8.33k|        JANET_CORE_REG("string/has-prefix?", cfun_string_hasprefix),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34226|  8.33k|        JANET_CORE_REG("string/has-suffix?", cfun_string_hassuffix),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34227|  8.33k|        JANET_CORE_REG("string/replace", cfun_string_replace),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34228|  8.33k|        JANET_CORE_REG("string/replace-all", cfun_string_replaceall),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34229|  8.33k|        JANET_CORE_REG("string/split", cfun_string_split),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34230|  8.33k|        JANET_CORE_REG("string/check-set", cfun_string_checkset),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34231|  8.33k|        JANET_CORE_REG("string/join", cfun_string_join),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34232|  8.33k|        JANET_CORE_REG("string/format", cfun_string_format),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34233|  8.33k|        JANET_CORE_REG("string/trim", cfun_string_trim),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34234|  8.33k|        JANET_CORE_REG("string/triml", cfun_string_triml),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34235|  8.33k|        JANET_CORE_REG("string/trimr", cfun_string_trimr),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
34236|  8.33k|        JANET_REG_END
  ------------------
  |  | 2110|  8.33k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
34237|  8.33k|    };
34238|       |    janet_core_cfuns_ext(env, NULL, string_cfuns);
34239|  8.33k|}
janet_scan_number_base:
34500|  1.23M|    double *out) {
34501|  1.23M|    const uint8_t *end = str + len;
34502|  1.23M|    int seenadigit = 0;
34503|  1.23M|    int ex = 0;
34504|  1.23M|    int seenpoint = 0;
34505|  1.23M|    int foundexp = 0;
34506|  1.23M|    int neg = 0;
34507|  1.23M|    struct BigNat mant;
34508|  1.23M|    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|  1.23M|    if (len > JANET_NUMBER_LENGTH_RIDICULOUS) goto error;
  ------------------
  |  |34296|  1.23M|#define JANET_NUMBER_LENGTH_RIDICULOUS 0xFFFF
  ------------------
  |  Branch (34515:9): [True: 13, False: 1.23M]
  ------------------
34516|       |
34517|       |    /* Get sign */
34518|  1.23M|    if (str >= end) goto error;
  ------------------
  |  Branch (34518:9): [True: 5, False: 1.23M]
  ------------------
34519|  1.23M|    if (*str == '-') {
  ------------------
  |  Branch (34519:9): [True: 140k, False: 1.09M]
  ------------------
34520|   140k|        neg = 1;
34521|   140k|        str++;
34522|  1.09M|    } else if (*str == '+') {
  ------------------
  |  Branch (34522:16): [True: 422k, False: 670k]
  ------------------
34523|   422k|        str++;
34524|   422k|    }
34525|       |
34526|       |    /* Check for leading 0x or digit digit r */
34527|  1.23M|    if (base == 0) {
  ------------------
  |  Branch (34527:9): [True: 1.23M, False: 2]
  ------------------
34528|  1.23M|        if (str + 1 < end && str[0] == '0' && str[1] == 'x') {
  ------------------
  |  Branch (34528:13): [True: 48.3k, False: 1.18M]
  |  Branch (34528:30): [True: 9.73k, False: 38.6k]
  |  Branch (34528:47): [True: 411, False: 9.32k]
  ------------------
34529|    411|            base = 16;
34530|    411|            str += 2;
34531|  1.23M|        } else if (str + 1 < end  &&
  ------------------
  |  Branch (34531:20): [True: 47.9k, False: 1.18M]
  ------------------
34532|  47.9k|                   str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (34532:20): [True: 45.8k, False: 2.13k]
  |  Branch (34532:37): [True: 41.6k, False: 4.21k]
  ------------------
34533|  41.6k|                   str[1] == 'r') {
  ------------------
  |  Branch (34533:20): [True: 261, False: 41.3k]
  ------------------
34534|    261|            base = str[0] - '0';
34535|    261|            str += 2;
34536|  1.23M|        } else if (str + 2 < end  &&
  ------------------
  |  Branch (34536:20): [True: 34.5k, False: 1.19M]
  ------------------
34537|  34.5k|                   str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (34537:20): [True: 33.3k, False: 1.19k]
  |  Branch (34537:37): [True: 30.7k, False: 2.64k]
  ------------------
34538|  30.7k|                   str[1] >= '0' && str[1] <= '9' &&
  ------------------
  |  Branch (34538:20): [True: 27.7k, False: 2.98k]
  |  Branch (34538:37): [True: 20.9k, False: 6.82k]
  ------------------
34539|  20.9k|                   str[2] == 'r') {
  ------------------
  |  Branch (34539:20): [True: 289, False: 20.6k]
  ------------------
34540|    289|            base = 10 * (str[0] - '0') + (str[1] - '0');
34541|    289|            if (base < 2 || base > 36) goto error;
  ------------------
  |  Branch (34541:17): [True: 0, False: 289]
  |  Branch (34541:29): [True: 246, False: 43]
  ------------------
34542|     43|            str += 3;
34543|     43|        }
34544|  1.23M|    }
34545|       |
34546|       |    /* If still base is 0, set to default (10) */
34547|  1.23M|    if (base == 0) {
  ------------------
  |  Branch (34547:9): [True: 1.23M, False: 675]
  ------------------
34548|  1.23M|        base = 10;
34549|  1.23M|    }
34550|  1.23M|    int exp_base = base;
34551|       |
34552|       |    /* Skip leading zeros */
34553|  1.73M|    while (str < end && (*str == '0' || *str == '.')) {
  ------------------
  |  Branch (34553:12): [True: 737k, False: 992k]
  |  Branch (34553:26): [True: 491k, False: 246k]
  |  Branch (34553:41): [True: 5.64k, False: 240k]
  ------------------
34554|   497k|        if (seenpoint) ex--;
  ------------------
  |  Branch (34554:13): [True: 949, False: 496k]
  ------------------
34555|   497k|        if (*str == '.') {
  ------------------
  |  Branch (34555:13): [True: 5.64k, False: 491k]
  ------------------
34556|  5.64k|            if (seenpoint) goto error;
  ------------------
  |  Branch (34556:17): [True: 683, False: 4.96k]
  ------------------
34557|  4.96k|            seenpoint = 1;
34558|   491k|        } else {
34559|   491k|            seenadigit = 1;
34560|   491k|        }
34561|   496k|        str++;
34562|   496k|    }
34563|       |
34564|       |    /* Parse significant digits */
34565|  1.64M|    while (str < end) {
  ------------------
  |  Branch (34565:12): [True: 470k, False: 1.17M]
  ------------------
34566|   470k|        if (*str == '.') {
  ------------------
  |  Branch (34566:13): [True: 2.82k, False: 467k]
  ------------------
34567|  2.82k|            if (seenpoint) goto error;
  ------------------
  |  Branch (34567:17): [True: 237, False: 2.59k]
  ------------------
34568|  2.59k|            seenpoint = 1;
34569|   467k|        } else if (*str == '&') {
  ------------------
  |  Branch (34569:20): [True: 1.08k, False: 466k]
  ------------------
34570|  1.08k|            foundexp = 1;
34571|  1.08k|            break;
34572|   466k|        } else if (base == 16 && (*str == 'P' || *str == 'p')) { /* IEEE hex float */
  ------------------
  |  Branch (34572:20): [True: 745, False: 465k]
  |  Branch (34572:35): [True: 316, False: 429]
  |  Branch (34572:50): [True: 35, False: 394]
  ------------------
34573|    351|            foundexp = 1;
34574|    351|            exp_base = 10;
34575|    351|            base = 2;
34576|    351|            ex *= 4; /* We need to correct the current exponent after we change the base */
34577|    351|            break;
34578|   466k|        } else if (base == 10 && (*str == 'E' || *str == 'e')) {
  ------------------
  |  Branch (34578:20): [True: 465k, False: 828]
  |  Branch (34578:35): [True: 460, False: 464k]
  |  Branch (34578:50): [True: 6.77k, False: 458k]
  ------------------
34579|  7.23k|            foundexp = 1;
34580|  7.23k|            break;
34581|   458k|        } else if (*str == '_') {
  ------------------
  |  Branch (34581:20): [True: 5.26k, False: 453k]
  ------------------
34582|  5.26k|            if (!seenadigit) goto error;
  ------------------
  |  Branch (34582:17): [True: 1.00k, False: 4.26k]
  ------------------
34583|   453k|        } else {
34584|   453k|            int digit = digit_lookup[*str & 0x7F];
34585|   453k|            if (*str > 127 || digit >= base) goto error;
  ------------------
  |  Branch (34585:17): [True: 746, False: 452k]
  |  Branch (34585:31): [True: 46.1k, False: 406k]
  ------------------
34586|   406k|            if (seenpoint) ex--;
  ------------------
  |  Branch (34586:17): [True: 32.4k, False: 374k]
  ------------------
34587|   406k|            bignat_muladd(&mant, base, digit);
34588|   406k|            seenadigit = 1;
34589|   406k|        }
34590|   413k|        str++;
34591|   413k|    }
34592|       |
34593|  1.18M|    if (!seenadigit)
  ------------------
  |  Branch (34593:9): [True: 516k, False: 668k]
  ------------------
34594|   516k|        goto error;
34595|       |
34596|       |    /* Read exponent */
34597|   668k|    if (str < end && foundexp) {
  ------------------
  |  Branch (34597:9): [True: 7.68k, False: 661k]
  |  Branch (34597:22): [True: 7.68k, False: 0]
  ------------------
34598|  7.68k|        int eneg = 0;
34599|  7.68k|        int32_t ee = 0;
34600|  7.68k|        seenadigit = 0;
34601|  7.68k|        str++;
34602|  7.68k|        if (str >= end) goto error;
  ------------------
  |  Branch (34602:13): [True: 625, False: 7.06k]
  ------------------
34603|  7.06k|        if (*str == '-') {
  ------------------
  |  Branch (34603:13): [True: 314, False: 6.75k]
  ------------------
34604|    314|            eneg = 1;
34605|    314|            str++;
34606|  6.75k|        } else if (*str == '+') {
  ------------------
  |  Branch (34606:20): [True: 106, False: 6.64k]
  ------------------
34607|    106|            str++;
34608|    106|        }
34609|       |        /* Skip leading 0s in exponent */
34610|  18.1k|        while (str < end && *str == '0') {
  ------------------
  |  Branch (34610:16): [True: 14.8k, False: 3.29k]
  |  Branch (34610:29): [True: 11.0k, False: 3.77k]
  ------------------
34611|  11.0k|            str++;
34612|  11.0k|            seenadigit = 1;
34613|  11.0k|        }
34614|  14.6k|        while (str < end) {
  ------------------
  |  Branch (34614:16): [True: 8.39k, False: 6.24k]
  ------------------
34615|  8.39k|            int digit = digit_lookup[*str & 0x7F];
34616|  8.39k|            if (*str > 127 || digit >= exp_base) goto error;
  ------------------
  |  Branch (34616:17): [True: 293, False: 8.09k]
  |  Branch (34616:31): [True: 531, False: 7.56k]
  ------------------
34617|  7.56k|            if (ee < (INT32_MAX / 40)) {
  ------------------
  |  Branch (34617:17): [True: 6.08k, False: 1.48k]
  ------------------
34618|  6.08k|                ee = exp_base * ee + digit;
34619|  6.08k|            }
34620|  7.56k|            str++;
34621|  7.56k|            seenadigit = 1;
34622|  7.56k|        }
34623|  6.24k|        if (eneg) ex -= ee;
  ------------------
  |  Branch (34623:13): [True: 313, False: 5.92k]
  ------------------
34624|  5.92k|        else ex += ee;
34625|  6.24k|    }
34626|       |
34627|   667k|    if (!seenadigit)
  ------------------
  |  Branch (34627:9): [True: 163, False: 667k]
  ------------------
34628|    163|        goto error;
34629|       |
34630|   667k|    *out = convert(neg, &mant, base, ex);
34631|   667k|    janet_free(mant.digits);
  ------------------
  |  | 2415|   667k|#define janet_free(X) free((X))
  ------------------
34632|   667k|    return 0;
34633|       |
34634|   566k|error:
34635|   566k|    janet_free(mant.digits);
  ------------------
  |  | 2415|   566k|#define janet_free(X) free((X))
  ------------------
34636|   566k|    return 1;
34637|   667k|}
janet_scan_int64:
34710|  8.21k|int janet_scan_int64(const uint8_t *str, int32_t len, int64_t *out) {
34711|  8.21k|    int neg;
34712|  8.21k|    uint64_t bi;
34713|  8.21k|    if (scan_uint64(str, len, &bi, &neg)) {
  ------------------
  |  Branch (34713:9): [True: 5.53k, False: 2.67k]
  ------------------
34714|  5.53k|        if (neg && bi <= ((UINT64_MAX / 2) + 1)) {
  ------------------
  |  Branch (34714:13): [True: 734, False: 4.79k]
  |  Branch (34714:20): [True: 726, False: 8]
  ------------------
34715|    726|            if (bi > INT64_MAX) {
  ------------------
  |  Branch (34715:17): [True: 3, False: 723]
  ------------------
34716|      3|                *out = INT64_MIN;
34717|    723|            } else {
34718|    723|                *out = -((int64_t) bi);
34719|    723|            }
34720|    726|            return 1;
34721|    726|        }
34722|  4.80k|        if (!neg && bi <= INT64_MAX) {
  ------------------
  |  Branch (34722:13): [True: 4.79k, False: 8]
  |  Branch (34722:21): [True: 4.53k, False: 268]
  ------------------
34723|  4.53k|            *out = (int64_t) bi;
34724|  4.53k|            return 1;
34725|  4.53k|        }
34726|  4.80k|    }
34727|  2.95k|    return 0;
34728|  8.21k|}
janet_scan_uint64:
34730|  28.3k|int janet_scan_uint64(const uint8_t *str, int32_t len, uint64_t *out) {
34731|  28.3k|    int neg;
34732|  28.3k|    uint64_t bi;
34733|  28.3k|    if (scan_uint64(str, len, &bi, &neg)) {
  ------------------
  |  Branch (34733:9): [True: 10.7k, False: 17.6k]
  ------------------
34734|  10.7k|        if (!neg) {
  ------------------
  |  Branch (34734:13): [True: 10.1k, False: 529]
  ------------------
34735|  10.1k|            *out = bi;
34736|  10.1k|            return 1;
34737|  10.1k|        }
34738|  10.7k|    }
34739|  18.1k|    return 0;
34740|  28.3k|}
janet_scan_numeric:
34747|  1.26M|    Janet *out) {
34748|  1.26M|    int result;
34749|  1.26M|    double num;
34750|  1.26M|    int64_t i64 = 0;
34751|  1.26M|    uint64_t u64 = 0;
34752|  1.26M|    if (len < 2 || str[len - 2] != ':') {
  ------------------
  |  Branch (34752:9): [True: 1.14M, False: 114k]
  |  Branch (34752:20): [True: 77.0k, False: 37.1k]
  ------------------
34753|  1.22M|        result = janet_scan_number_base(str, len, 0, &num);
34754|  1.22M|        *out = janet_wrap_number(num);
  ------------------
  |  |  835|  1.22M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
34755|  1.22M|        return result;
34756|  1.22M|    }
34757|  37.1k|    switch (str[len - 1]) {
34758|    303|        default:
  ------------------
  |  Branch (34758:9): [True: 303, False: 36.8k]
  ------------------
34759|    303|            return 1;
34760|    371|        case 'n':
  ------------------
  |  Branch (34760:9): [True: 371, False: 36.8k]
  ------------------
34761|    371|            result = janet_scan_number_base(str, len - 2, 0, &num);
34762|    371|            *out = janet_wrap_number(num);
  ------------------
  |  |  835|    371|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
34763|    371|            return result;
34764|       |        /* Condition is inverted janet_scan_int64 and janet_scan_uint64 */
34765|  8.18k|        case 's':
  ------------------
  |  Branch (34765:9): [True: 8.18k, False: 28.9k]
  ------------------
34766|  8.18k|            result = !janet_scan_int64(str, len - 2, &i64);
34767|  8.18k|            *out = janet_wrap_s64(i64);
34768|  8.18k|            return result;
34769|  28.3k|        case 'u':
  ------------------
  |  Branch (34769:9): [True: 28.3k, False: 8.86k]
  ------------------
34770|  28.3k|            result = !janet_scan_uint64(str, len - 2, &u64);
34771|  28.3k|            *out = janet_wrap_u64(u64);
34772|  28.3k|            return result;
34773|  37.1k|    }
34774|  37.1k|}
janet_buffer_dtostr:
34778|  2.87k|void janet_buffer_dtostr(JanetBuffer *buffer, double x) {
34779|  2.87k|#define BUFSIZE 32
34780|  2.87k|    janet_buffer_extra(buffer, BUFSIZE);
  ------------------
  |  |34779|  2.87k|#define BUFSIZE 32
  ------------------
34781|  2.87k|    int count = snprintf((char *) buffer->data + buffer->count, BUFSIZE, "%.17g", x);
  ------------------
  |  |34779|  2.87k|#define BUFSIZE 32
  ------------------
34782|  2.87k|#undef BUFSIZE
34783|       |    /* fix locale issues with commas */
34784|  8.67k|    for (int i = 0; i < count; i++) {
  ------------------
  |  Branch (34784:21): [True: 5.79k, False: 2.87k]
  ------------------
34785|  5.79k|        char c = buffer->data[buffer->count + i];
34786|  5.79k|        if (c == ',') {
  ------------------
  |  Branch (34786:13): [True: 0, False: 5.79k]
  ------------------
34787|      0|            buffer->data[buffer->count + i] = '.';
34788|      0|        }
34789|  5.79k|    }
34790|  2.87k|    buffer->count += count;
34791|  2.87k|}
janet_struct_begin:
34828|  14.4M|JanetKV *janet_struct_begin(int32_t count) {
34829|       |    /* Calculate capacity as power of 2 after 2 * count. */
34830|  14.4M|    int32_t capacity = janet_tablen(2 * count);
34831|  14.4M|    if (capacity < 0) capacity = janet_tablen(count + 1);
  ------------------
  |  Branch (34831:9): [True: 0, False: 14.4M]
  ------------------
34832|       |
34833|  14.4M|    size_t size = sizeof(JanetStructHead) + (size_t) capacity * sizeof(JanetKV);
34834|  14.4M|    JanetStructHead *head = janet_gcalloc(JANET_MEMORY_STRUCT, size);
34835|  14.4M|    head->length = count;
34836|  14.4M|    head->capacity = capacity;
34837|  14.4M|    head->hash = 0;
34838|  14.4M|    head->proto = NULL;
34839|       |
34840|  14.4M|    JanetKV *st = (JanetKV *)(head->data);
34841|  14.4M|    janet_memempty(st, capacity);
34842|  14.4M|    return st;
34843|  14.4M|}
janet_struct_find:
34846|  36.2M|const JanetKV *janet_struct_find(const JanetKV *st, Janet key) {
34847|       |    return janet_dict_find(st, janet_struct_capacity(st), key);
  ------------------
  |  | 1849|  36.2M|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  36.2M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34848|  36.2M|}
janet_struct_put_ext:
34858|   123M|void janet_struct_put_ext(JanetKV *st, Janet key, Janet value, int replace) {
34859|   123M|    int32_t cap = janet_struct_capacity(st);
  ------------------
  |  | 1849|   123M|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|   123M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34860|   123M|    int32_t hash = janet_hash(key);
34861|   123M|    int32_t index = janet_maphash(cap, hash);
  ------------------
  |  |  396|   123M|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
34862|   123M|    int32_t i, j, dist;
34863|   123M|    int32_t bounds[4] = {index, cap, 0, index};
34864|   123M|    if (janet_checktype(key, JANET_NIL) || janet_checktype(value, JANET_NIL)) return;
  ------------------
  |  |  806|   247M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 4.41k, False: 123M]
  |  |  |  Branch (806:6): [Folded, False: 123M]
  |  |  ------------------
  |  |  807|   247M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   247M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   123M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   123M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   123M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   123M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (janet_checktype(key, JANET_NIL) || janet_checktype(value, JANET_NIL)) return;
  ------------------
  |  |  806|   123M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 2.06M, False: 121M]
  |  |  |  Branch (806:6): [Folded, False: 123M]
  |  |  ------------------
  |  |  807|   123M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   123M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   123M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   123M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   123M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   123M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34865|   121M|    if (janet_checktype(key, JANET_NUMBER) && isnan(janet_unwrap_number(key))) return;
  ------------------
  |  |  806|   243M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 2.97M, False: 118M]
  |  |  |  Branch (806:6): [True: 121M, Folded]
  |  |  ------------------
  |  |  807|   243M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|   121M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 2.97M, False: 118M]
  |  |  |  |  |  Branch (803:28): [True: 1, False: 118M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   243M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      7|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      7|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      7|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      7|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (34865:47): [True: 1, False: 2.97M]
  ------------------
34866|       |    /* Avoid extra items */
34867|   121M|    if (janet_struct_hash(st) == janet_struct_length(st)) return;
  ------------------
  |  | 1850|   121M|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|   121M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                  if (janet_struct_hash(st) == janet_struct_length(st)) return;
  ------------------
  |  | 1848|   121M|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|   121M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (34867:9): [True: 0, False: 121M]
  ------------------
34868|   121M|    for (dist = 0, j = 0; j < 4; j += 2)
  ------------------
  |  Branch (34868:27): [True: 121M, False: 1]
  ------------------
34869|   133M|        for (i = bounds[j]; i < bounds[j + 1]; i++, dist++) {
  ------------------
  |  Branch (34869:29): [True: 133M, False: 25.7k]
  ------------------
34870|   133M|            int status;
34871|   133M|            int32_t otherhash;
34872|   133M|            int32_t otherindex, otherdist;
34873|   133M|            JanetKV *kv = st + i;
34874|       |            /* We found an empty slot, so just add key and value */
34875|   133M|            if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|   133M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 119M, False: 13.8M]
  |  |  |  Branch (806:6): [Folded, False: 133M]
  |  |  ------------------
  |  |  807|   133M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   133M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   133M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   133M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   133M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   133M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34876|   119M|                kv->key = key;
34877|   119M|                kv->value = value;
34878|       |                /* Update the temporary count */
34879|   119M|                janet_struct_hash(st)++;
  ------------------
  |  | 1850|   119M|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|   119M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34880|   119M|                return;
34881|   119M|            }
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|  13.8M|            otherhash = janet_hash(kv->key);
34889|  13.8M|            otherindex = janet_maphash(cap, otherhash);
  ------------------
  |  |  396|  13.8M|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
34890|  13.8M|            otherdist = (i + cap - otherindex) & (cap - 1);
34891|  13.8M|            if (dist < otherdist)
  ------------------
  |  Branch (34891:17): [True: 431k, False: 13.3M]
  ------------------
34892|   431k|                status = -1;
34893|  13.3M|            else if (otherdist < dist)
  ------------------
  |  Branch (34893:22): [True: 45.3k, False: 13.3M]
  ------------------
34894|  45.3k|                status = 1;
34895|  13.3M|            else if (hash < otherhash)
  ------------------
  |  Branch (34895:22): [True: 10.2M, False: 3.10M]
  ------------------
34896|  10.2M|                status = -1;
34897|  3.10M|            else if (otherhash < hash)
  ------------------
  |  Branch (34897:22): [True: 1.07M, False: 2.03M]
  ------------------
34898|  1.07M|                status = 1;
34899|  2.03M|            else
34900|  2.03M|                status = janet_compare(key, kv->key);
34901|       |            /* If other is closer to their ideal slot */
34902|  13.8M|            if (status == 1) {
  ------------------
  |  Branch (34902:17): [True: 1.11M, False: 12.7M]
  ------------------
34903|       |                /* Swap current kv pair with pair in slot */
34904|  1.11M|                JanetKV temp = *kv;
34905|  1.11M|                kv->key = key;
34906|  1.11M|                kv->value = value;
34907|  1.11M|                key = temp.key;
34908|  1.11M|                value = temp.value;
34909|       |                /* Save dist and hash of new kv pair */
34910|  1.11M|                dist = otherdist;
34911|  1.11M|                hash = otherhash;
34912|  12.7M|            } else if (status == 0) {
  ------------------
  |  Branch (34912:24): [True: 2.03M, False: 10.6M]
  ------------------
34913|  2.03M|                if (replace) {
  ------------------
  |  Branch (34913:21): [True: 2.03M, False: 0]
  ------------------
34914|       |                    /* A key was added to the struct more than once - replace old value */
34915|  2.03M|                    kv->value = value;
34916|  2.03M|                }
34917|  2.03M|                return;
34918|  2.03M|            }
34919|  13.8M|        }
34920|   121M|}
janet_struct_put:
34922|   123M|void janet_struct_put(JanetKV *st, Janet key, Janet value) {
34923|   123M|    janet_struct_put_ext(st, key, value, 1);
34924|   123M|}
janet_struct_end:
34927|  12.0M|const JanetKV *janet_struct_end(JanetKV *st) {
34928|  12.0M|    if (janet_struct_hash(st) != janet_struct_length(st)) {
  ------------------
  |  | 1850|  12.0M|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  12.0M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                  if (janet_struct_hash(st) != janet_struct_length(st)) {
  ------------------
  |  | 1848|  12.0M|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|  12.0M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (34928:9): [True: 2.35M, False: 9.71M]
  ------------------
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|  2.35M|        JanetKV *newst = janet_struct_begin(janet_struct_hash(st));
  ------------------
  |  | 1850|  2.35M|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  2.35M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34933|  55.3M|        for (int32_t i = 0; i < janet_struct_capacity(st); i++) {
  ------------------
  |  | 1849|  55.3M|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  55.3M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (34933:29): [True: 53.0M, False: 2.35M]
  ------------------
34934|  53.0M|            JanetKV *kv = st + i;
34935|  53.0M|            if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  53.0M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 53.0M]
  |  |  ------------------
  |  |  807|  53.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|  53.0M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  53.0M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  53.0M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  53.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  53.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (34935:17): [True: 7.27M, False: 45.7M]
  ------------------
34936|  7.27M|                janet_struct_put(newst, kv->key, kv->value);
34937|  7.27M|            }
34938|  53.0M|        }
34939|  2.35M|        janet_struct_proto(newst) = janet_struct_proto(st);
  ------------------
  |  | 1851|  2.35M|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|  2.35M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                      janet_struct_proto(newst) = janet_struct_proto(st);
  ------------------
  |  | 1851|  2.35M|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|  2.35M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34940|  2.35M|        st = newst;
34941|  2.35M|    }
34942|  12.0M|    janet_struct_hash(st) = janet_kv_calchash(st, janet_struct_capacity(st));
  ------------------
  |  | 1850|  12.0M|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  12.0M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                  janet_struct_hash(st) = janet_kv_calchash(st, janet_struct_capacity(st));
  ------------------
  |  | 1849|  12.0M|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  12.0M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34943|  12.0M|    if (janet_struct_proto(st)) {
  ------------------
  |  | 1851|  12.0M|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|  12.0M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1851:31): [True: 526, False: 12.0M]
  |  |  ------------------
  ------------------
34944|    526|        janet_struct_hash(st) += 2654435761u * janet_struct_hash(janet_struct_proto(st));
  ------------------
  |  | 1850|    526|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|    526|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                      janet_struct_hash(st) += 2654435761u * janet_struct_hash(janet_struct_proto(st));
  ------------------
  |  | 1850|    526|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|    526|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34945|    526|    }
34946|  12.0M|    return (const JanetKV *)st;
34947|  12.0M|}
janet_struct_rawget:
34950|  40.5k|Janet janet_struct_rawget(const JanetKV *st, Janet key) {
34951|  40.5k|    const JanetKV *kv = janet_struct_find(st, key);
34952|  40.5k|    return kv ? kv->value : 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 (34952:12): [True: 40.5k, False: 0]
  ------------------
34953|  40.5k|}
janet_struct_get:
34956|  36.1M|Janet janet_struct_get(const JanetKV *st, Janet key) {
34957|  60.7M|    for (int i = JANET_MAX_PROTO_DEPTH; st && i; --i, st = janet_struct_proto(st)) {
  ------------------
  |  |  299|  36.1M|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
                  for (int i = JANET_MAX_PROTO_DEPTH; st && i; --i, st = janet_struct_proto(st)) {
  ------------------
  |  | 1851|  24.5M|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|  24.5M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (34957:41): [True: 36.1M, False: 24.5M]
  |  Branch (34957:47): [True: 36.1M, False: 0]
  ------------------
34958|  36.1M|        const JanetKV *kv = janet_struct_find(st, key);
34959|  36.1M|        if (NULL != kv && !janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  36.1M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 36.1M]
  |  |  ------------------
  |  |  807|  36.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|  36.1M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  36.1M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  36.1M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  36.1M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  36.1M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (34959:13): [True: 36.1M, False: 0]
  |  Branch (34959:27): [True: 11.5M, False: 24.5M]
  ------------------
34960|  11.5M|            return kv->value;
34961|  11.5M|        }
34962|  36.1M|    }
34963|  24.5M|    return janet_wrap_nil();
  ------------------
  |  |  831|  24.5M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  24.5M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  24.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  24.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34964|  36.1M|}
cfun_struct_with_proto:
34996|      9|              "prototype. `ksvs` are as in the `struct` function.") {
34997|      9|    janet_arity(argc, 1, -1);
34998|      9|    JanetStruct proto = janet_optstruct(argv, argc, 0, NULL);
34999|      9|    if (!(argc & 1))
  ------------------
  |  Branch (34999:9): [True: 0, False: 9]
  ------------------
35000|      0|        janet_panic("expected odd number of arguments");
35001|      9|    JanetKV *st = janet_struct_begin(argc / 2);
35002|    963|    for (int32_t i = 1; i < argc; i += 2) {
  ------------------
  |  Branch (35002:25): [True: 954, False: 9]
  ------------------
35003|    954|        janet_struct_put(st, argv[i], argv[i + 1]);
35004|    954|    }
35005|      9|    janet_struct_proto(st) = proto;
  ------------------
  |  | 1851|      9|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|      9|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
35006|      9|    return janet_wrap_struct(janet_struct_end(st));
  ------------------
  |  |  842|      9|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|      9|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      9|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      9|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35007|      9|}
cfun_struct_getproto:
35011|      2|              "Return the prototype of a struct, or nil if it doesn't have one.") {
35012|      2|    janet_fixarity(argc, 1);
35013|      2|    JanetStruct st = janet_getstruct(argv, 0);
35014|      2|    return janet_struct_proto(st)
  ------------------
  |  | 1851|      2|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|      2|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1851:31): [True: 0, False: 2]
  |  |  ------------------
  ------------------
35015|      2|           ? janet_wrap_struct(janet_struct_proto(st))
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35016|      2|           : janet_wrap_nil();
  ------------------
  |  |  831|      2|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      2|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35017|      2|}
cfun_struct_flatten:
35022|      1|              "all key value pairs from recursive prototypes into one new struct.") {
35023|      1|    janet_fixarity(argc, 1);
35024|      1|    JanetStruct st = janet_getstruct(argv, 0);
35025|       |
35026|       |    /* get an upper bounds on the number of items in the final struct */
35027|      1|    int64_t pair_count = 0;
35028|      1|    JanetStruct cursor = st;
35029|      1|    while (cursor) {
  ------------------
  |  Branch (35029:12): [True: 0, False: 1]
  ------------------
35030|      0|        pair_count += janet_struct_length(cursor);
  ------------------
  |  | 1848|      0|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|      0|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
35031|      0|        cursor = janet_struct_proto(cursor);
  ------------------
  |  | 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)))
  |  |  ------------------
  ------------------
35032|      0|    }
35033|       |
35034|      1|    if (pair_count > DICT_MAX) {
  ------------------
  |  |  507|      1|#define DICT_MAX INT32_MAX
  ------------------
  |  Branch (35034:9): [True: 0, False: 1]
  ------------------
35035|      0|        janet_panic("struct too large");
35036|      0|    }
35037|       |
35038|      1|    JanetKV *accum = janet_struct_begin((int32_t) pair_count);
35039|      1|    cursor = st;
35040|      1|    while (cursor) {
  ------------------
  |  Branch (35040:12): [True: 0, False: 1]
  ------------------
35041|      0|        for (int32_t i = 0; i < janet_struct_capacity(cursor); i++) {
  ------------------
  |  | 1849|      0|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|      0|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35041:29): [True: 0, False: 0]
  ------------------
35042|      0|            const JanetKV *kv = cursor + i;
35043|      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 (35043:17): [True: 0, False: 0]
  ------------------
35044|      0|                janet_struct_put_ext(accum, kv->key, kv->value, 0);
35045|      0|            }
35046|      0|        }
35047|      0|        cursor = janet_struct_proto(cursor);
  ------------------
  |  | 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)))
  |  |  ------------------
  ------------------
35048|      0|    }
35049|      1|    return janet_wrap_struct(janet_struct_end(accum));
  ------------------
  |  |  842|      1|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|      1|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35050|      1|}
cfun_struct_to_table:
35055|      2|              "table's prototypes into the new struct's prototypes as well.") {
35056|      2|    janet_arity(argc, 1, 2);
35057|      2|    JanetStruct st = janet_getstruct(argv, 0);
35058|      2|    int recursive = argc > 1 && janet_truthy(argv[1]);
  ------------------
  |  |  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 (35058:21): [True: 0, False: 2]
  ------------------
35059|      2|    JanetTable *tab = NULL;
35060|      2|    JanetStruct cursor = st;
35061|      2|    JanetTable *tab_cursor = tab;
35062|      2|    do {
35063|      2|        if (tab) {
  ------------------
  |  Branch (35063:13): [True: 0, False: 2]
  ------------------
35064|      0|            tab_cursor->proto = janet_table(janet_struct_length(cursor));
  ------------------
  |  | 1848|      0|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|      0|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
35065|      0|            tab_cursor = tab_cursor->proto;
35066|      2|        } else {
35067|      2|            tab = janet_table(janet_struct_length(cursor));
  ------------------
  |  | 1848|      2|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|      2|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
35068|      2|            tab_cursor = tab;
35069|      2|        }
35070|       |        /* TODO - implement as memcpy since struct memory should be compatible
35071|       |         * with table memory */
35072|      2|        for (int32_t i = 0; i < janet_struct_capacity(cursor); i++) {
  ------------------
  |  | 1849|      2|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|      2|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35072:29): [True: 0, False: 2]
  ------------------
35073|      0|            const JanetKV *kv = cursor + i;
35074|      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 (35074:17): [True: 0, False: 0]
  ------------------
35075|      0|                janet_table_put(tab_cursor, kv->key, kv->value);
35076|      0|            }
35077|      0|        }
35078|      2|        cursor = janet_struct_proto(cursor);
  ------------------
  |  | 1851|      2|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|      2|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
35079|      2|    } while (recursive && cursor);
  ------------------
  |  Branch (35079:14): [True: 0, False: 2]
  |  Branch (35079:27): [True: 0, False: 0]
  ------------------
35080|      2|    return janet_wrap_table(tab);
  ------------------
  |  |  846|      2|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|      2|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35081|      2|}
cfun_struct_rawget:
35087|  40.5k|              "nil without checking the prototype. Returns the value in the struct.") {
35088|  40.5k|    janet_fixarity(argc, 2);
35089|  40.5k|    JanetStruct st = janet_getstruct(argv, 0);
35090|  40.5k|    return janet_struct_rawget(st, argv[1]);
35091|  40.5k|}
janet_lib_struct:
35094|  8.33k|void janet_lib_struct(JanetTable *env) {
35095|  8.33k|    JanetRegExt struct_cfuns[] = {
35096|  8.33k|        JANET_CORE_REG("struct/with-proto", cfun_struct_with_proto),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35097|  8.33k|        JANET_CORE_REG("struct/getproto", cfun_struct_getproto),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35098|  8.33k|        JANET_CORE_REG("struct/proto-flatten", cfun_struct_flatten),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35099|  8.33k|        JANET_CORE_REG("struct/to-table", cfun_struct_to_table),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35100|  8.33k|        JANET_CORE_REG("struct/rawget", cfun_struct_rawget),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35101|  8.33k|        JANET_REG_END
  ------------------
  |  | 2110|  8.33k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
35102|  8.33k|    };
35103|       |    janet_core_cfuns_ext(env, NULL, struct_cfuns);
35104|  8.33k|}
janet_symcache_init:
35149|  10.3k|void janet_symcache_init() {
35150|  10.3k|    janet_vm.cache_capacity = 1024;
35151|  10.3k|    janet_vm.cache = janet_calloc(1, (size_t) janet_vm.cache_capacity * sizeof(const uint8_t *));
  ------------------
  |  | 2412|  10.3k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
35152|  10.3k|    if (NULL == janet_vm.cache) {
  ------------------
  |  Branch (35152:9): [True: 0, False: 10.3k]
  ------------------
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|  10.3k|    memset(&janet_vm.gensym_counter, '0', sizeof(janet_vm.gensym_counter));
35156|  10.3k|    janet_vm.gensym_counter[0] = '_';
35157|  10.3k|    janet_vm.cache_count = 0;
35158|  10.3k|    janet_vm.cache_deleted = 0;
35159|  10.3k|}
janet_symcache_deinit:
35162|  10.3k|void janet_symcache_deinit() {
35163|  10.3k|    janet_free((void *)janet_vm.cache);
  ------------------
  |  | 2415|  10.3k|#define janet_free(X) free((X))
  ------------------
35164|       |    janet_vm.cache = NULL;
35165|  10.3k|    janet_vm.cache_capacity = 0;
35166|  10.3k|    janet_vm.cache_count = 0;
35167|  10.3k|    janet_vm.cache_deleted = 0;
35168|  10.3k|}
janet_symbol_deinit:
35270|  23.9M|void janet_symbol_deinit(const uint8_t *sym) {
35271|  23.9M|    int status = 0;
35272|  23.9M|    const uint8_t **bucket = janet_symcache_find(sym, &status);
  ------------------
  |  |35225|  23.9M|    janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1813|  23.9M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  23.9M|#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|  23.9M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  23.9M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35273|  23.9M|    if (status) {
  ------------------
  |  Branch (35273:9): [True: 23.9M, False: 684]
  ------------------
35274|  23.9M|        janet_vm.cache_count--;
35275|  23.9M|        janet_vm.cache_deleted++;
35276|  23.9M|        *bucket = JANET_SYMCACHE_DELETED;
35277|  23.9M|    }
35278|  23.9M|}
janet_symbol:
35281|   216M|const uint8_t *janet_symbol(const uint8_t *str, int32_t len) {
35282|   216M|    int32_t hash = janet_string_calchash(str, len);
35283|   216M|    uint8_t *newstr;
35284|   216M|    int success = 0;
35285|   216M|    const uint8_t **bucket = janet_symcache_findmem(str, len, hash, &success);
35286|   216M|    if (success)
  ------------------
  |  Branch (35286:9): [True: 193M, False: 23.4M]
  ------------------
35287|   193M|        return *bucket;
35288|  23.4M|    JanetStringHead *head = janet_gcalloc(JANET_MEMORY_SYMBOL, sizeof(JanetStringHead) + (size_t) len + 1);
35289|  23.4M|    head->hash = hash;
35290|  23.4M|    head->length = len;
35291|  23.4M|    newstr = (uint8_t *)(head->data);
35292|  23.4M|    safe_memcpy(newstr, str, len);
35293|  23.4M|    newstr[len] = 0;
35294|  23.4M|    janet_symcache_put((const uint8_t *)newstr, bucket);
35295|  23.4M|    return newstr;
35296|   216M|}
janet_csymbol:
35299|   186M|const uint8_t *janet_csymbol(const char *cstr) {
35300|   186M|    return janet_symbol((const uint8_t *)cstr, (int32_t) strlen(cstr));
35301|   186M|}
janet_symbol_gen:
35324|   525k|const uint8_t *janet_symbol_gen(void) {
35325|   525k|    const uint8_t **bucket = NULL;
35326|   525k|    uint8_t *sym;
35327|   525k|    int32_t hash = 0;
35328|   525k|    int status;
35329|       |    /* Leave spaces for 6 base 64 digits and two dashes. That means 64^6 possible suffixes, which
35330|       |     * is enough for resolving collisions. */
35331|  1.78M|    do {
35332|  1.78M|        hash = janet_string_calchash(
35333|  1.78M|                   janet_vm.gensym_counter,
35334|  1.78M|                   sizeof(janet_vm.gensym_counter) - 1);
35335|  1.78M|        bucket = janet_symcache_findmem(
35336|  1.78M|                     janet_vm.gensym_counter,
35337|  1.78M|                     sizeof(janet_vm.gensym_counter) - 1,
35338|  1.78M|                     hash,
35339|  1.78M|                     &status);
35340|  1.78M|    } while (status && (inc_gensym(), 1));
  ------------------
  |  Branch (35340:14): [True: 1.26M, False: 525k]
  |  Branch (35340:24): [True: 1.26M, False: 0]
  ------------------
35341|   525k|    JanetStringHead *head = janet_gcalloc(JANET_MEMORY_SYMBOL, sizeof(JanetStringHead) + sizeof(janet_vm.gensym_counter));
35342|   525k|    head->length = sizeof(janet_vm.gensym_counter) - 1;
35343|   525k|    head->hash = hash;
35344|   525k|    sym = (uint8_t *)(head->data);
35345|   525k|    memcpy(sym, janet_vm.gensym_counter, sizeof(janet_vm.gensym_counter));
35346|   525k|    sym[head->length] = 0;
35347|   525k|    janet_symcache_put((const uint8_t *)sym, bucket);
35348|   525k|    return (const uint8_t *)sym;
35349|   525k|}
janet_table_init:
35425|   154k|JanetTable *janet_table_init(JanetTable *table, int32_t capacity) {
35426|   154k|    return janet_table_init_impl(table, capacity, 1);
35427|   154k|}
janet_table_init_raw:
35430|  31.0k|JanetTable *janet_table_init_raw(JanetTable *table, int32_t capacity) {
35431|  31.0k|    return janet_table_init_impl(table, capacity, 0);
35432|  31.0k|}
janet_table_deinit:
35435|   185k|void janet_table_deinit(JanetTable *table) {
35436|   185k|    if (table->gc.flags & JANET_TABLE_FLAG_STACK) {
  ------------------
  |  |35385|   185k|#define JANET_TABLE_FLAG_STACK 0x10000
  ------------------
  |  Branch (35436:9): [True: 154k, False: 31.0k]
  ------------------
35437|   154k|        janet_sfree(table->data);
35438|   154k|    } else {
35439|  31.0k|        janet_free(table->data);
  ------------------
  |  | 2415|  31.0k|#define janet_free(X) free((X))
  ------------------
35440|  31.0k|    }
35441|   185k|}
janet_table:
35445|  11.9M|JanetTable *janet_table(int32_t capacity) {
35446|  11.9M|    JanetTable *table = janet_gcalloc(JANET_MEMORY_TABLE, sizeof(JanetTable));
35447|  11.9M|    return janet_table_init_impl(table, capacity, 0);
35448|  11.9M|}
janet_table_weakk:
35450|   267k|JanetTable *janet_table_weakk(int32_t capacity) {
35451|   267k|    JanetTable *table = janet_gcalloc(JANET_MEMORY_TABLE_WEAKK, sizeof(JanetTable));
35452|   267k|    return janet_table_init_impl(table, capacity, 0);
35453|   267k|}
janet_table_weakv:
35455|   517k|JanetTable *janet_table_weakv(int32_t capacity) {
35456|   517k|    JanetTable *table = janet_gcalloc(JANET_MEMORY_TABLE_WEAKV, sizeof(JanetTable));
35457|   517k|    return janet_table_init_impl(table, capacity, 0);
35458|   517k|}
janet_table_weakkv:
35460|   259k|JanetTable *janet_table_weakkv(int32_t capacity) {
35461|   259k|    JanetTable *table = janet_gcalloc(JANET_MEMORY_TABLE_WEAKKV, sizeof(JanetTable));
35462|   259k|    return janet_table_init_impl(table, capacity, 0);
35463|   259k|}
janet_table_find:
35467|   298M|JanetKV *janet_table_find(JanetTable *t, Janet key) {
35468|   298M|    return (JanetKV *) janet_dict_find(t->data, t->capacity, key);
35469|   298M|}
janet_table_get:
35503|  85.1M|Janet janet_table_get(JanetTable *t, Janet key) {
35504|   145M|    for (int i = JANET_MAX_PROTO_DEPTH; t && i; t = t->proto, --i) {
  ------------------
  |  |  299|  85.1M|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
  |  Branch (35504:41): [True: 87.5M, False: 58.0M]
  |  Branch (35504:46): [True: 87.5M, False: 25]
  ------------------
35505|  87.5M|        JanetKV *bucket = janet_table_find(t, key);
35506|  87.5M|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL))
  ------------------
  |  |  806|  87.5M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 87.5M]
  |  |  ------------------
  |  |  807|  87.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|  87.5M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  87.5M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  87.5M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  87.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  87.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35506:13): [True: 87.5M, False: 793]
  |  Branch (35506:31): [True: 27.1M, False: 60.4M]
  ------------------
35507|  27.1M|            return bucket->value;
35508|  87.5M|    }
35509|  58.0M|    return janet_wrap_nil();
  ------------------
  |  |  831|  58.0M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  58.0M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  58.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  58.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35510|  85.1M|}
janet_table_get_keyword:
35513|  12.6M|Janet janet_table_get_keyword(JanetTable *t, const char *keyword) {
35514|  12.6M|    int32_t keyword_len = (int32_t) strlen(keyword);
35515|  22.4M|    for (int i = JANET_MAX_PROTO_DEPTH; t && i; t = t->proto, --i) {
  ------------------
  |  |  299|  12.6M|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
  |  Branch (35515:41): [True: 12.6M, False: 9.84M]
  |  Branch (35515:46): [True: 12.6M, False: 0]
  ------------------
35516|  12.6M|        JanetKV *bucket = (JanetKV *) janet_dict_find_keyword(t->data, t->capacity, (const uint8_t *) keyword, keyword_len);
35517|  12.6M|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL))
  ------------------
  |  |  806|  12.6M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 12.6M]
  |  |  ------------------
  |  |  807|  12.6M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  12.6M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  12.6M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  12.6M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  12.6M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  12.6M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35517:13): [True: 12.6M, False: 0]
  |  Branch (35517:31): [True: 2.75M, False: 9.84M]
  ------------------
35518|  2.75M|            return bucket->value;
35519|  12.6M|    }
35520|  9.84M|    return janet_wrap_nil();
  ------------------
  |  |  831|  9.84M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  9.84M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  9.84M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  9.84M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35521|  12.6M|}
janet_table_get_ex:
35524|  8.86k|Janet janet_table_get_ex(JanetTable *t, Janet key, JanetTable **which) {
35525|  17.7k|    for (int i = JANET_MAX_PROTO_DEPTH; t && i; t = t->proto, --i) {
  ------------------
  |  |  299|  8.86k|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
  |  Branch (35525:41): [True: 8.86k, False: 8.86k]
  |  Branch (35525:46): [True: 8.86k, False: 0]
  ------------------
35526|  8.86k|        JanetKV *bucket = janet_table_find(t, key);
35527|  8.86k|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
  ------------------
  |  |  806|  8.86k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 8.86k]
  |  |  ------------------
  |  |  807|  8.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|  8.86k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  8.86k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  8.86k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.86k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.86k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35527:13): [True: 8.86k, False: 0]
  |  Branch (35527:31): [True: 0, False: 8.86k]
  ------------------
35528|      0|            *which = t;
35529|      0|            return bucket->value;
35530|      0|        }
35531|  8.86k|    }
35532|  8.86k|    return janet_wrap_nil();
  ------------------
  |  |  831|  8.86k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  8.86k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.86k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.86k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35533|  8.86k|}
janet_table_rawget:
35536|   729k|Janet janet_table_rawget(JanetTable *t, Janet key) {
35537|   729k|    JanetKV *bucket = janet_table_find(t, key);
35538|   729k|    if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL))
  ------------------
  |  |  806|   729k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 729k]
  |  |  ------------------
  |  |  807|   729k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   729k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   729k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   729k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   729k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   729k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35538:9): [True: 729k, False: 0]
  |  Branch (35538:27): [True: 7.22k, False: 722k]
  ------------------
35539|  7.22k|        return bucket->value;
35540|   722k|    else
35541|   722k|        return janet_wrap_nil();
  ------------------
  |  |  831|   722k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   722k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   722k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   722k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35542|   729k|}
janet_table_remove:
35546|  4.65M|Janet janet_table_remove(JanetTable *t, Janet key) {
35547|  4.65M|    JanetKV *bucket = janet_table_find(t, key);
35548|  4.65M|    if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
  ------------------
  |  |  806|  4.65M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 4.65M]
  |  |  ------------------
  |  |  807|  4.65M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.65M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  4.65M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  4.65M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.65M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.65M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35548:9): [True: 4.65M, False: 0]
  |  Branch (35548:27): [True: 1.71M, False: 2.93M]
  ------------------
35549|  1.71M|        Janet ret = bucket->value;
35550|  1.71M|        t->count--;
35551|  1.71M|        t->deleted++;
35552|  1.71M|        bucket->key = janet_wrap_nil();
  ------------------
  |  |  831|  1.71M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.71M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.71M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.71M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35553|  1.71M|        bucket->value = janet_wrap_false();
  ------------------
  |  |  833|  1.71M|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|  1.71M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.71M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.71M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35554|  1.71M|        return ret;
35555|  2.93M|    } else {
35556|  2.93M|        return janet_wrap_nil();
  ------------------
  |  |  831|  2.93M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  2.93M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.93M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.93M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35557|  2.93M|    }
35558|  4.65M|}
janet_table_put:
35561|   139M|void janet_table_put(JanetTable *t, Janet key, Janet value) {
35562|   139M|    if (janet_checktype(key, JANET_NIL)) return;
  ------------------
  |  |  806|   139M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 2.74k, False: 139M]
  |  |  |  Branch (806:6): [Folded, False: 139M]
  |  |  ------------------
  |  |  807|   139M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   139M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   139M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   139M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   139M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   139M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35563|   139M|    if (janet_checktype(key, JANET_NUMBER) && isnan(janet_unwrap_number(key))) return;
  ------------------
  |  |  806|   279M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 63.6M, False: 76.1M]
  |  |  |  Branch (806:6): [True: 139M, Folded]
  |  |  ------------------
  |  |  807|   279M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|   139M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 63.6M, False: 76.1M]
  |  |  |  |  |  Branch (803:28): [True: 859, False: 76.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   279M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.54k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.54k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.54k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.54k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35563:47): [True: 1.59k, False: 63.6M]
  ------------------
35564|   139M|    if (janet_checktype(value, JANET_NIL)) {
  ------------------
  |  |  806|   139M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1.29M, False: 138M]
  |  |  |  Branch (806:6): [Folded, False: 139M]
  |  |  ------------------
  |  |  807|   139M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   139M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   139M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   139M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   139M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   139M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35565|  1.29M|        janet_table_remove(t, key);
35566|   138M|    } else {
35567|   138M|        JanetKV *bucket = janet_table_find(t, key);
35568|   138M|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
  ------------------
  |  |  806|   138M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 138M]
  |  |  ------------------
  |  |  807|   138M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   138M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   138M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   138M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   138M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   138M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35568:13): [True: 138M, False: 206k]
  |  Branch (35568:31): [True: 61.3M, False: 76.9M]
  ------------------
35569|  61.3M|            bucket->value = value;
35570|  77.1M|        } else {
35571|  77.1M|            if (NULL == bucket || 2 * (t->count + t->deleted + 1) > t->capacity) {
  ------------------
  |  Branch (35571:17): [True: 192k, False: 76.9M]
  |  Branch (35571:35): [True: 9.67M, False: 67.2M]
  ------------------
35572|  9.74M|                janet_table_rehash(t, janet_tablen(2 * t->count + 2));
35573|  9.74M|                bucket = janet_table_find(t, key);
35574|  9.74M|            }
35575|  77.1M|            if (janet_checktype(bucket->value, JANET_BOOLEAN))
  ------------------
  |  |  806|  77.1M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 77.1M]
  |  |  |  Branch (806:6): [Folded, False: 77.1M]
  |  |  ------------------
  |  |  807|  77.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|  77.1M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  77.1M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  77.1M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  77.1M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  77.1M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35576|      0|                --t->deleted;
35577|  77.1M|            bucket->key = key;
35578|  77.1M|            bucket->value = value;
35579|  77.1M|            ++t->count;
35580|  77.1M|        }
35581|   138M|    }
35582|   139M|}
janet_table_clear:
35602|     78|void janet_table_clear(JanetTable *t) {
35603|     78|    int32_t capacity = t->capacity;
35604|     78|    JanetKV *data = t->data;
35605|     78|    janet_memempty(data, capacity);
35606|     78|    t->count = 0;
35607|     78|    t->deleted = 0;
35608|     78|}
janet_table_clone:
35611|  4.82k|JanetTable *janet_table_clone(JanetTable *table) {
35612|  4.82k|    JanetTable *newTable = janet_gcalloc(JANET_MEMORY_TABLE, sizeof(JanetTable));
35613|  4.82k|    newTable->count = table->count;
35614|  4.82k|    newTable->capacity = table->capacity;
35615|  4.82k|    newTable->deleted = table->deleted;
35616|  4.82k|    newTable->proto = table->proto;
35617|  4.82k|    newTable->data = array_allocate(sizeof(JanetKV), newTable->capacity);
35618|  4.82k|    if (NULL == newTable->data) {
  ------------------
  |  Branch (35618:9): [True: 0, False: 4.82k]
  ------------------
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|  4.82k|    memcpy(newTable->data, table->data, (size_t) table->capacity * sizeof(JanetKV));
35622|  4.82k|    return newTable;
35623|  4.82k|}
janet_table_merge_struct:
35642|     90|void janet_table_merge_struct(JanetTable *table, const JanetKV *other) {
35643|       |    janet_table_mergekv(table, other, janet_struct_capacity(other));
  ------------------
  |  | 1849|     90|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|     90|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
35644|     90|}
janet_table_to_struct:
35647|  38.9k|const JanetKV *janet_table_to_struct(JanetTable *t) {
35648|  38.9k|    JanetKV *st = janet_struct_begin(t->count);
35649|  38.9k|    JanetKV *kv = t->data;
35650|  38.9k|    JanetKV *end = t->data + t->capacity;
35651|   370k|    while (kv < end) {
  ------------------
  |  Branch (35651:12): [True: 331k, False: 38.9k]
  ------------------
35652|   331k|        if (!janet_checktype(kv->key, JANET_NIL))
  ------------------
  |  |  806|   331k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 331k]
  |  |  ------------------
  |  |  807|   331k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   331k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   331k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   331k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   331k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   331k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35652:13): [True: 118k, False: 212k]
  ------------------
35653|   118k|            janet_struct_put(st, kv->key, kv->value);
35654|   331k|        kv++;
35655|   331k|    }
35656|  38.9k|    return janet_struct_end(st);
35657|  38.9k|}
cfun_table_new:
35682|    280|              "Returns the new table.") {
35683|    280|    janet_fixarity(argc, 1);
35684|    280|    int32_t cap = janet_getnat(argv, 0);
35685|    280|    return janet_wrap_table(janet_table(cap));
  ------------------
  |  |  846|    280|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|    280|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    280|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    280|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35686|    280|}
cfun_table_weak:
35691|     18|              "Returns the new table.") {
35692|     18|    janet_fixarity(argc, 1);
35693|     18|    int32_t cap = janet_getnat(argv, 0);
35694|     18|    return janet_wrap_table(janet_table_weakkv(cap));
  ------------------
  |  |  846|     18|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|     18|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     18|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     18|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35695|     18|}
cfun_table_weak_keys:
35700|   128k|              "Returns the new table.") {
35701|   128k|    janet_fixarity(argc, 1);
35702|   128k|    int32_t cap = janet_getnat(argv, 0);
35703|   128k|    return janet_wrap_table(janet_table_weakk(cap));
  ------------------
  |  |  846|   128k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|   128k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   128k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   128k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35704|   128k|}
cfun_table_weak_values:
35709|      1|              "Returns the new table.") {
35710|      1|    janet_fixarity(argc, 1);
35711|      1|    int32_t cap = janet_getnat(argv, 0);
35712|      1|    return janet_wrap_table(janet_table_weakv(cap));
  ------------------
  |  |  846|      1|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|      1|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35713|      1|}
cfun_table_getproto:
35718|  8.61k|              "has no prototype, otherwise returns the prototype.") {
35719|  8.61k|    janet_fixarity(argc, 1);
35720|  8.61k|    JanetTable *t = janet_gettable(argv, 0);
35721|  8.61k|    return t->proto
  ------------------
  |  Branch (35721:12): [True: 0, False: 8.61k]
  ------------------
35722|  8.61k|           ? janet_wrap_table(t->proto)
  ------------------
  |  |  846|      0|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35723|  8.61k|           : janet_wrap_nil();
  ------------------
  |  |  831|  8.61k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  8.61k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.61k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.61k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35724|  8.61k|}
cfun_table_setproto:
35728|  1.18M|              "Set the prototype of a table. Returns the original table `tab`.") {
35729|  1.18M|    janet_fixarity(argc, 2);
35730|  1.18M|    JanetTable *table = janet_gettable(argv, 0);
35731|  1.18M|    JanetTable *proto = NULL;
35732|  1.18M|    if (!janet_checktype(argv[1], JANET_NIL)) {
  ------------------
  |  |  806|  1.18M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 1.18M]
  |  |  ------------------
  |  |  807|  1.18M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.18M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.18M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.18M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.18M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.18M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35732:9): [True: 1.18M, False: 3]
  ------------------
35733|  1.18M|        proto = janet_gettable(argv, 1);
35734|  1.18M|    }
35735|  1.18M|    table->proto = proto;
35736|  1.18M|    return argv[0];
35737|  1.18M|}
cfun_table_tostruct:
35745|  38.9k|              "prototype.") {
35746|  38.9k|    janet_arity(argc, 1, 2);
35747|  38.9k|    JanetTable *t = janet_gettable(argv, 0);
35748|  38.9k|    JanetStruct proto = janet_optstruct(argv, argc, 1, NULL);
35749|  38.9k|    JanetStruct st = janet_table_to_struct(t);
35750|  38.9k|    janet_struct_proto(st) = proto;
  ------------------
  |  | 1851|  38.9k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|  38.9k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
35751|  38.9k|    return janet_wrap_struct(st);
  ------------------
  |  |  842|  38.9k|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|  38.9k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  38.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  38.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35752|  38.9k|}
cfun_table_rawget:
35758|  8.94k|              "nil without checking the prototype. Returns the value in the table.") {
35759|  8.94k|    janet_fixarity(argc, 2);
35760|  8.94k|    JanetTable *table = janet_gettable(argv, 0);
35761|  8.94k|    return janet_table_rawget(table, argv[1]);
35762|  8.94k|}
cfun_table_clear:
35775|     78|              "Remove all key-value pairs in a table and return the modified table `tab`.") {
35776|     78|    janet_fixarity(argc, 1);
35777|     78|    JanetTable *table = janet_gettable(argv, 0);
35778|     78|    janet_table_clear(table);
35779|     78|    return janet_wrap_table(table);
  ------------------
  |  |  846|     78|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|     78|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     78|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     78|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35780|     78|}
janet_lib_table:
35791|  8.33k|void janet_lib_table(JanetTable *env) {
35792|  8.33k|    JanetRegExt table_cfuns[] = {
35793|  8.33k|        JANET_CORE_REG("table/new", cfun_table_new),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35794|  8.33k|        JANET_CORE_REG("table/weak", cfun_table_weak),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35795|  8.33k|        JANET_CORE_REG("table/weak-keys", cfun_table_weak_keys),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35796|  8.33k|        JANET_CORE_REG("table/weak-values", cfun_table_weak_values),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35797|  8.33k|        JANET_CORE_REG("table/to-struct", cfun_table_tostruct),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35798|  8.33k|        JANET_CORE_REG("table/getproto", cfun_table_getproto),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35799|  8.33k|        JANET_CORE_REG("table/setproto", cfun_table_setproto),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35800|  8.33k|        JANET_CORE_REG("table/rawget", cfun_table_rawget),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35801|  8.33k|        JANET_CORE_REG("table/clone", cfun_table_clone),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35802|  8.33k|        JANET_CORE_REG("table/clear", cfun_table_clear),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35803|  8.33k|        JANET_CORE_REG("table/proto-flatten", cfun_table_proto_flatten),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35804|  8.33k|        JANET_REG_END
  ------------------
  |  | 2110|  8.33k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
35805|  8.33k|    };
35806|       |    janet_core_cfuns_ext(env, NULL, table_cfuns);
35807|  8.33k|}
janet_tuple_begin:
35852|   250M|Janet *janet_tuple_begin(int32_t length) {
35853|   250M|    janet_assert(length <= MAX_TUPLE_LENGTH, "tuple overflow");
  ------------------
  |  |  389|   250M|#define janet_assert(c, m) do { \
  |  |  390|   250M|    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: 250M]
  |  |  ------------------
  |  |  391|   250M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 250M]
  |  |  ------------------
  ------------------
35854|   250M|    size_t size = sizeof(JanetTupleHead) + ((size_t) length * sizeof(Janet));
35855|   250M|    JanetTupleHead *head = janet_gcalloc(JANET_MEMORY_TUPLE, size);
35856|   250M|    head->sm_line = -1;
35857|   250M|    head->sm_column = -1;
35858|   250M|    head->length = length;
35859|   250M|    return (Janet *)(head->data);
35860|   250M|}
janet_tuple_end:
35863|   250M|const Janet *janet_tuple_end(Janet *tuple) {
35864|   250M|    janet_tuple_hash(tuple) = janet_array_calchash(tuple, janet_tuple_length(tuple));
  ------------------
  |  | 1803|   250M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1800|   250M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                  janet_tuple_hash(tuple) = janet_array_calchash(tuple, janet_tuple_length(tuple));
  ------------------
  |  | 1802|   250M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|   250M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
35865|   250M|    return (const Janet *)tuple;
35866|   250M|}
janet_tuple_n:
35869|   236M|const Janet *janet_tuple_n(const Janet *values, int32_t n) {
35870|   236M|    Janet *t = janet_tuple_begin(n);
35871|   236M|    safe_memcpy(t, values, sizeof(Janet) * n);
35872|   236M|    return janet_tuple_end(t);
35873|   236M|}
cfun_tuple_brackets:
35879|  3.95M|              "Creates a new bracketed tuple containing the elements xs.") {
35880|  3.95M|    const Janet *tup = janet_tuple_n(argv, argc);
35881|  3.95M|    janet_tuple_flag(tup) |= JANET_TUPLE_FLAG_BRACKETCTOR;
  ------------------
  |  | 1806|  3.95M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  3.95M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                  janet_tuple_flag(tup) |= JANET_TUPLE_FLAG_BRACKETCTOR;
  ------------------
  |  | 1798|  3.95M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
35882|  3.95M|    return janet_wrap_tuple(tup);
  ------------------
  |  |  843|  3.95M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  3.95M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.95M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.95M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35883|  3.95M|}
cfun_tuple_slice:
35899|  16.5M|              "raised.") {
35900|  16.5M|    JanetView view = janet_getindexed(argv, 0);
35901|  16.5M|    JanetRange range = janet_getslice(argc, argv);
35902|  16.5M|    return janet_wrap_tuple(janet_tuple_n(view.items + range.start, range.end - range.start));
  ------------------
  |  |  843|  16.5M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  16.5M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  16.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  16.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35903|  16.5M|}
cfun_tuple_type:
35911|  20.5M|              "the compiler.") {
35912|  20.5M|    janet_fixarity(argc, 1);
35913|  20.5M|    const Janet *tup = janet_gettuple(argv, 0);
35914|  20.5M|    if (janet_tuple_flag(tup) & JANET_TUPLE_FLAG_BRACKETCTOR) {
  ------------------
  |  | 1806|  20.5M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  20.5M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                  if (janet_tuple_flag(tup) & JANET_TUPLE_FLAG_BRACKETCTOR) {
  ------------------
  |  | 1798|  20.5M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (35914:9): [True: 3.96M, False: 16.6M]
  ------------------
35915|  3.96M|        return janet_ckeywordv("brackets");
  ------------------
  |  | 1843|  3.96M|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  3.96M|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  3.96M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  3.96M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  3.96M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35916|  16.6M|    } else {
35917|  16.6M|        return janet_ckeywordv("parens");
  ------------------
  |  | 1843|  16.6M|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  16.6M|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  16.6M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35918|  16.6M|    }
35919|  20.5M|}
cfun_tuple_sourcemap:
35924|  9.31M|              "which is another tuple `[line column]`.") {
35925|  9.31M|    janet_fixarity(argc, 1);
35926|  9.31M|    const Janet *tup = janet_gettuple(argv, 0);
35927|  9.31M|    Janet contents[2];
35928|  9.31M|    contents[0] = janet_wrap_integer(janet_tuple_head(tup)->sm_line);
  ------------------
  |  |  967|  9.31M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  9.31M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35929|  9.31M|    contents[1] = janet_wrap_integer(janet_tuple_head(tup)->sm_column);
  ------------------
  |  |  967|  9.31M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  9.31M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35930|  9.31M|    return janet_wrap_tuple(janet_tuple_n(contents, 2));
  ------------------
  |  |  843|  9.31M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  9.31M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  9.31M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  9.31M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35931|  9.31M|}
cfun_tuple_setmap:
35936|  9.31M|              "`col` should be integers.") {
35937|  9.31M|    janet_fixarity(argc, 3);
35938|  9.31M|    const Janet *tup = janet_gettuple(argv, 0);
35939|  9.31M|    janet_tuple_head(tup)->sm_line = janet_getinteger(argv, 1);
  ------------------
  |  | 1800|  9.31M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
35940|       |    janet_tuple_head(tup)->sm_column = janet_getinteger(argv, 2);
  ------------------
  |  | 1800|  9.31M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
35941|  9.31M|    return argv[0];
35942|  9.31M|}
cfun_tuple_join:
35946|     26|              "Create a tuple by joining together other tuples and arrays.") {
35947|     26|    janet_arity(argc, 0, -1);
35948|     26|    int32_t total_len = 0;
35949|     60|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (35949:25): [True: 37, False: 23]
  ------------------
35950|     37|        int32_t len = 0;
35951|     37|        const Janet *vals = NULL;
35952|     37|        if (!janet_indexed_view(argv[i], &vals, &len)) {
  ------------------
  |  Branch (35952:13): [True: 3, False: 34]
  ------------------
35953|      3|            janet_panicf("expected indexed type for argument %d, got %v", i, argv[i]);
35954|      3|        }
35955|     34|        if (INT32_MAX - total_len < len) {
  ------------------
  |  Branch (35955:13): [True: 0, False: 34]
  ------------------
35956|      0|            janet_panic("tuple too large");
35957|      0|        }
35958|     34|        total_len += len;
35959|     34|    }
35960|     23|    if (total_len > MAX_TUPLE_LENGTH) {
  ------------------
  |  |35844|     23|#define MAX_TUPLE_LENGTH INT32_MAX
  ------------------
  |  Branch (35960:9): [True: 0, False: 23]
  ------------------
35961|      0|        janet_panic("tuple too large");
35962|      0|    }
35963|     23|    Janet *tup = janet_tuple_begin(total_len);
35964|     23|    Janet *tup_cursor = tup;
35965|     53|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (35965:25): [True: 30, False: 23]
  ------------------
35966|     30|        int32_t len = 0;
35967|     30|        const Janet *vals = NULL;
35968|     30|        janet_indexed_view(argv[i], &vals, &len);
35969|     30|        memcpy(tup_cursor, vals, len * sizeof(Janet));
35970|     30|        tup_cursor += len;
35971|     30|    }
35972|     23|    return janet_wrap_tuple(janet_tuple_end(tup));
  ------------------
  |  |  843|     23|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|     23|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     23|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     23|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35973|     23|}
janet_lib_tuple:
35976|  8.33k|void janet_lib_tuple(JanetTable *env) {
35977|  8.33k|    JanetRegExt tuple_cfuns[] = {
35978|  8.33k|        JANET_CORE_REG("tuple/brackets", cfun_tuple_brackets),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35979|  8.33k|        JANET_CORE_REG("tuple/slice", cfun_tuple_slice),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35980|  8.33k|        JANET_CORE_REG("tuple/type", cfun_tuple_type),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35981|  8.33k|        JANET_CORE_REG("tuple/sourcemap", cfun_tuple_sourcemap),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35982|  8.33k|        JANET_CORE_REG("tuple/setmap", cfun_tuple_setmap),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35983|  8.33k|        JANET_CORE_REG("tuple/join", cfun_tuple_join),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
35984|  8.33k|        JANET_REG_END
  ------------------
  |  | 2110|  8.33k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
35985|  8.33k|    };
35986|       |    janet_core_cfuns_ext(env, NULL, tuple_cfuns);
35987|  8.33k|}
janet_hash_mix:
36113|  1.50G|uint32_t janet_hash_mix(uint32_t input, uint32_t more) {
36114|  1.50G|    uint32_t mix1 = (more + 0x9e3779b9 + (input << 6) + (input >> 2));
36115|  1.50G|    return input ^ (0x9e3779b9 + (mix1 << 6) + (mix1 >> 2));
36116|  1.50G|}
janet_string_calchash:
36120|   262M|int32_t janet_string_calchash(const uint8_t *str, int32_t len) {
36121|   262M|    if (NULL == str || len == 0) return 5381;
  ------------------
  |  Branch (36121:9): [True: 367k, False: 262M]
  |  Branch (36121:24): [True: 628k, False: 261M]
  ------------------
36122|   261M|    const uint8_t *end = str + len;
36123|   261M|    uint32_t hash = 5381;
36124|  11.1G|    while (str < end)
  ------------------
  |  Branch (36124:12): [True: 10.8G, False: 261M]
  ------------------
36125|  10.8G|        hash = (hash << 5) + hash + *str++;
36126|   261M|    hash = janet_hash_mix(hash, (uint32_t) len);
36127|   261M|    return (int32_t) hash;
36128|   262M|}
janet_array_calchash:
36243|   250M|int32_t janet_array_calchash(const Janet *array, int32_t len) {
36244|   250M|    const Janet *end = array + len;
36245|   250M|    uint32_t hash = 33;
36246|   831M|    while (array < end) {
  ------------------
  |  Branch (36246:12): [True: 580M, False: 250M]
  ------------------
36247|   580M|        hash = janet_hash_mix(hash, janet_hash(*array++));
36248|   580M|    }
36249|   250M|    return (int32_t) hash;
36250|   250M|}
janet_kv_calchash:
36253|  12.0M|int32_t janet_kv_calchash(const JanetKV *kvs, int32_t len) {
36254|  12.0M|    const JanetKV *end = kvs + len;
36255|  12.0M|    uint32_t hash = 33;
36256|   343M|    while (kvs < end) {
  ------------------
  |  Branch (36256:12): [True: 331M, False: 12.0M]
  ------------------
36257|   331M|        hash = janet_hash_mix(hash, janet_hash(kvs->key));
36258|   331M|        hash = janet_hash_mix(hash, janet_hash(kvs->value));
36259|   331M|        kvs++;
36260|   331M|    }
36261|  12.0M|    return (int32_t) hash;
36262|  12.0M|}
janet_tablen:
36266|  37.3M|int32_t janet_tablen(int32_t n) {
36267|  37.3M|    if (n < 0) return 0;
  ------------------
  |  Branch (36267:9): [True: 0, False: 37.3M]
  ------------------
36268|  37.3M|    n |= n >> 1;
36269|  37.3M|    n |= n >> 2;
36270|  37.3M|    n |= n >> 4;
36271|  37.3M|    n |= n >> 8;
36272|  37.3M|    n |= n >> 16;
36273|  37.3M|    return n >= DICT_MAX ? DICT_MAX : n + 1;
  ------------------
  |  |  507|  37.3M|#define DICT_MAX INT32_MAX
  ------------------
                  return n >= DICT_MAX ? DICT_MAX : n + 1;
  ------------------
  |  |  507|  37.3M|#define DICT_MAX INT32_MAX
  ------------------
  |  Branch (36273:12): [True: 0, False: 37.3M]
  ------------------
36274|  37.3M|}
safe_memcpy:
36277|  1.07G|void safe_memcpy(void *dest, const void *src, size_t len) {
36278|  1.07G|    if (!len) return;
  ------------------
  |  Branch (36278:9): [True: 37.1M, False: 1.03G]
  ------------------
36279|  1.03G|    memcpy(dest, src, len);
36280|  1.03G|}
janet_dict_find_deep:
36284|  28.2M|const JanetKV *janet_dict_find_deep(const JanetKV *buckets, int32_t cap, Janet key) {
36285|  28.2M|    janet_assert(cap != 0, "bad capacity");
  ------------------
  |  |  389|  28.2M|#define janet_assert(c, m) do { \
  |  |  390|  28.2M|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 28.2M]
  |  |  ------------------
  |  |  391|  28.2M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 28.2M]
  |  |  ------------------
  ------------------
36286|  28.2M|    int32_t index = janet_maphash(cap, janet_hash(key));
  ------------------
  |  |  396|  28.2M|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
36287|  28.2M|    int32_t i;
36288|  28.2M|    const JanetKV *first_bucket = NULL;
36289|       |    /* Higher half */
36290|  44.4M|    for (i = index; i < cap; i++) {
  ------------------
  |  Branch (36290:21): [True: 44.1M, False: 224k]
  ------------------
36291|  44.1M|        const JanetKV *kv = buckets + i;
36292|  44.1M|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  44.1M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 23.4M, False: 20.7M]
  |  |  |  Branch (806:6): [Folded, False: 44.1M]
  |  |  ------------------
  |  |  807|  44.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|  44.1M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  44.1M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  44.1M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  44.1M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  44.1M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36293|  23.4M|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|  23.4M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 20.8M, False: 2.52M]
  |  |  |  Branch (806:6): [Folded, False: 23.4M]
  |  |  ------------------
  |  |  807|  23.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|  23.4M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  23.4M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  23.4M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  23.4M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  23.4M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36294|  20.8M|                return kv;
36295|  20.8M|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (36295:24): [True: 1.15M, False: 1.36M]
  ------------------
36296|  1.15M|                first_bucket = kv;
36297|  1.15M|            }
36298|  23.4M|        } else if (janet_bitwise_same(kv->key, key) || janet_equals(kv->key, key)) {
  ------------------
  |  |  401|  41.5M|#define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  20.7M|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |               #define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  20.7M|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |  |  Branch (401:34): [True: 6.65M, False: 14.1M]
  |  |  ------------------
  ------------------
  |  Branch (36298:56): [True: 501k, False: 13.6M]
  ------------------
36299|  7.15M|            return buckets + i;
36300|  7.15M|        }
36301|  44.1M|    }
36302|       |    /* Lower half */
36303|   288k|    for (i = 0; i < index; i++) {
  ------------------
  |  Branch (36303:17): [True: 288k, False: 18.4E]
  ------------------
36304|   288k|        const JanetKV *kv = buckets + i;
36305|   288k|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|   288k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 217k, False: 71.0k]
  |  |  |  Branch (806:6): [Folded, False: 288k]
  |  |  ------------------
  |  |  807|   288k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   288k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   288k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   288k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   288k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   288k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36306|   217k|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|   217k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 208k, False: 8.87k]
  |  |  |  Branch (806:6): [Folded, False: 217k]
  |  |  ------------------
  |  |  807|   217k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   217k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   217k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   217k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   217k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   217k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36307|   208k|                return kv;
36308|   208k|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (36308:24): [True: 430, False: 8.44k]
  ------------------
36309|    430|                first_bucket = kv;
36310|    430|            }
36311|   217k|        } else if (janet_bitwise_same(kv->key, key) || janet_equals(kv->key, key)) {
  ------------------
  |  |  401|   142k|#define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  71.0k|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |               #define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  71.0k|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |  |  Branch (401:34): [True: 14.5k, False: 56.4k]
  |  |  ------------------
  ------------------
  |  Branch (36311:56): [True: 933, False: 55.5k]
  ------------------
36312|  15.4k|            return buckets + i;
36313|  15.4k|        }
36314|   288k|    }
36315|  18.4E|    return first_bucket;
36316|   224k|}
janet_dict_find_shallow:
36319|   317M|const JanetKV *janet_dict_find_shallow(const JanetKV *buckets, int32_t cap, Janet key) {
36320|   317M|    janet_assert(cap != 0, "bad capacity");
  ------------------
  |  |  389|   317M|#define janet_assert(c, m) do { \
  |  |  390|   317M|    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: 317M]
  |  |  ------------------
  |  |  391|   317M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 317M]
  |  |  ------------------
  ------------------
36321|   317M|    int32_t hash;
36322|       |    /* Manual inline common case of symbol or keyword */
36323|   317M|    if (janet_checktype(key, JANET_KEYWORD) || janet_checktype(key, JANET_SYMBOL)) {
  ------------------
  |  |  806|   634M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 134M, False: 182M]
  |  |  |  Branch (806:6): [Folded, False: 317M]
  |  |  ------------------
  |  |  807|   634M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   634M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   317M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   317M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   317M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   317M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (janet_checktype(key, JANET_KEYWORD) || janet_checktype(key, JANET_SYMBOL)) {
  ------------------
  |  |  806|   182M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 82.3M, False: 100M]
  |  |  |  Branch (806:6): [Folded, False: 182M]
  |  |  ------------------
  |  |  807|   182M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   182M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   182M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   182M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   182M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   182M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36324|   217M|        hash = janet_string_hash(janet_unwrap_string(key));
  ------------------
  |  | 1814|   217M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|   217M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
36325|   217M|    } else {
36326|   100M|        hash = janet_hash(key);
36327|   100M|    }
36328|   317M|    int32_t index = janet_maphash(cap, hash);
  ------------------
  |  |  396|   317M|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
36329|   317M|    int32_t i;
36330|   317M|    const JanetKV *first_bucket = NULL;
36331|       |    /* Higher half */
36332|   547M|    for (i = index; i < cap; i++) {
  ------------------
  |  Branch (36332:21): [True: 545M, False: 2.11M]
  ------------------
36333|   545M|        const JanetKV *kv = buckets + i;
36334|   545M|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|   545M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 311M, False: 234M]
  |  |  |  Branch (806:6): [Folded, False: 545M]
  |  |  ------------------
  |  |  807|   545M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   545M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   545M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   545M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   545M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   545M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36335|   311M|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|   311M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 210M, False: 100M]
  |  |  |  Branch (806:6): [Folded, False: 311M]
  |  |  ------------------
  |  |  807|   311M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   311M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   311M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   311M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   311M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   311M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36336|   210M|                return kv;
36337|   210M|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (36337:24): [True: 1.02M, False: 99.1M]
  ------------------
36338|  1.02M|                first_bucket = kv;
36339|  1.02M|            }
36340|   311M|        } else if (janet_bitwise_same(kv->key, key)) {
  ------------------
  |  |  401|   234M|#define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|   234M|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |               #define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|   234M|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |  |  Branch (401:34): [True: 104M, False: 130M]
  |  |  ------------------
  ------------------
36341|   104M|            return buckets + i;
36342|   104M|        }
36343|   545M|    }
36344|       |    /* Lower half */
36345|  3.47M|    for (i = 0; i < index; i++) {
  ------------------
  |  Branch (36345:17): [True: 3.04M, False: 433k]
  ------------------
36346|  3.04M|        const JanetKV *kv = buckets + i;
36347|  3.04M|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  3.04M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1.04M, False: 1.99M]
  |  |  |  Branch (806:6): [Folded, False: 3.04M]
  |  |  ------------------
  |  |  807|  3.04M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  3.04M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  3.04M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  3.04M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.04M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.04M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36348|  1.04M|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|  1.04M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1.04M, False: 1.74k]
  |  |  |  Branch (806:6): [Folded, False: 1.04M]
  |  |  ------------------
  |  |  807|  1.04M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  1.04M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.04M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.04M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.04M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.04M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36349|  1.04M|                return kv;
36350|  1.04M|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (36350:24): [True: 314, False: 1.43k]
  ------------------
36351|    314|                first_bucket = kv;
36352|    314|            }
36353|  1.99M|        } else if (janet_bitwise_same(kv->key, key)) {
  ------------------
  |  |  401|  1.99M|#define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  1.99M|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |               #define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|  1.99M|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |  |  Branch (401:34): [True: 635k, False: 1.35M]
  |  |  ------------------
  ------------------
36354|   635k|            return buckets + i;
36355|   635k|        }
36356|  3.04M|    }
36357|   433k|    return first_bucket;
36358|  2.11M|}
janet_dict_find:
36362|   345M|const JanetKV *janet_dict_find(const JanetKV *buckets, int32_t cap, Janet key) {
36363|   345M|    if (janet_checktypes(key, HARD_KEY_TYPES) || (janet_checktype(key, JANET_NUMBER) && janet_unwrap_number(key) == 0)) {
  ------------------
  |  |  969|   690M|#define janet_checktypes(x, tps) ((1 << janet_type(x)) & (tps))
  |  |  ------------------
  |  |  |  |  795|   345M|    (isnan((x).number) \
  |  |  |  |  796|   345M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  |  |  797|   345M|        : JANET_NUMBER)
  |  |  ------------------
  |  |  |  Branch (969:34): [True: 25.3M, False: 320M]
  |  |  ------------------
  ------------------
                  if (janet_checktypes(key, HARD_KEY_TYPES) || (janet_checktype(key, JANET_NUMBER) && janet_unwrap_number(key) == 0)) {
  ------------------
  |  |  806|   640M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 65.4M, False: 254M]
  |  |  |  Branch (806:6): [True: 320M, Folded]
  |  |  ------------------
  |  |  807|   640M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|   320M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 65.4M, False: 254M]
  |  |  |  |  |  Branch (803:28): [True: 18.4E, False: 254M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  18.4E|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  18.4E|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  18.4E|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  18.4E|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  18.4E|#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|  65.4M|#define janet_unwrap_number(x) ((x).number)
  ------------------
  |  Branch (36363:9): [True: 279M, False: 65.4M]
  |  Branch (36363:89): [True: 2.68M, False: 62.8M]
  ------------------
36364|  28.2M|        return janet_dict_find_deep(buckets, cap, key);
36365|   317M|    } else {
36366|   317M|        return janet_dict_find_shallow(buckets, cap, key);
36367|   317M|    }
36368|   345M|}
janet_dict_find_keyword:
36374|  12.6M|    const uint8_t *cstr, int32_t cstr_len) {
36375|  12.6M|    int32_t hash = janet_string_calchash(cstr, cstr_len);
36376|  12.6M|    int32_t index = janet_maphash(cap, hash);
  ------------------
  |  |  396|  12.6M|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
36377|  12.6M|    int32_t i;
36378|  12.6M|    const JanetKV *first_bucket = NULL;
36379|       |    /* Higher half */
36380|  21.7M|    for (i = index; i < cap; i++) {
  ------------------
  |  Branch (36380:21): [True: 21.0M, False: 668k]
  ------------------
36381|  21.0M|        const JanetKV *kv = buckets + i;
36382|  21.0M|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  21.0M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 9.17M, False: 11.9M]
  |  |  |  Branch (806:6): [Folded, False: 21.0M]
  |  |  ------------------
  |  |  807|  21.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|  21.0M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  21.0M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  21.0M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  21.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  21.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36383|  9.17M|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|  9.17M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 9.17M, False: 80]
  |  |  |  Branch (806:6): [Folded, False: 9.17M]
  |  |  ------------------
  |  |  807|  9.17M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.17M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  9.17M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  9.17M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  9.17M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  9.17M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36384|  9.17M|                return kv;
36385|  9.17M|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (36385:24): [True: 48, False: 32]
  ------------------
36386|     48|                first_bucket = kv;
36387|     48|            }
36388|  11.9M|        } else if (janet_checktype(kv->key, JANET_KEYWORD)) {
  ------------------
  |  |  806|  11.9M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 6.56M, False: 5.35M]
  |  |  |  Branch (806:6): [Folded, False: 11.9M]
  |  |  ------------------
  |  |  807|  11.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|  11.9M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  11.9M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  11.9M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36389|       |            /* Works for symbol and keyword, too */
36390|  6.56M|            JanetString str = janet_unwrap_string(kv->key);
  ------------------
  |  |  863|  6.56M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
36391|  6.56M|            int32_t len = janet_string_length(str);
  ------------------
  |  | 1813|  6.56M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  6.56M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
36392|  6.56M|            if (hash == janet_string_hash(str) && len == cstr_len && !memcmp(str, cstr, len)) {
  ------------------
  |  | 1814|  13.1M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|  6.56M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (36392:17): [True: 2.75M, False: 3.81M]
  |  Branch (36392:51): [True: 2.75M, False: 0]
  |  Branch (36392:70): [True: 2.75M, False: 0]
  ------------------
36393|  2.75M|                return buckets + i;
36394|  2.75M|            }
36395|  6.56M|        }
36396|  21.0M|    }
36397|       |    /* Lower half */
36398|   669k|    for (i = 0; i < index; i++) {
  ------------------
  |  Branch (36398:17): [True: 669k, False: 0]
  ------------------
36399|   669k|        const JanetKV *kv = buckets + i;
36400|   669k|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|   669k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 668k, False: 478]
  |  |  |  Branch (806:6): [Folded, False: 669k]
  |  |  ------------------
  |  |  807|   669k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   669k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   669k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   669k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   669k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   669k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36401|   668k|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|   668k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 668k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 668k]
  |  |  ------------------
  |  |  807|   668k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   668k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   668k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   668k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   668k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   668k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36402|   668k|                return kv;
36403|   668k|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (36403:24): [True: 0, False: 0]
  ------------------
36404|      0|                first_bucket = kv;
36405|      0|            }
36406|   668k|        } else if (janet_checktype(kv->key, JANET_KEYWORD)) {
  ------------------
  |  |  806|    478|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 478, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 478]
  |  |  ------------------
  |  |  807|    478|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    478|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    478|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    478|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    478|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    478|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36407|       |            /* Works for symbol and keyword, too */
36408|    478|            JanetString str = janet_unwrap_string(kv->key);
  ------------------
  |  |  863|    478|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
36409|    478|            int32_t len = janet_string_length(str);
  ------------------
  |  | 1813|    478|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|    478|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
36410|    478|            if (hash == janet_string_hash(str) && len == cstr_len && !memcmp(str, cstr, len)) {
  ------------------
  |  | 1814|    956|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|    478|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (36410:17): [True: 0, False: 478]
  |  Branch (36410:51): [True: 0, False: 0]
  |  Branch (36410:70): [True: 0, False: 0]
  ------------------
36411|      0|                return buckets + i;
36412|      0|            }
36413|    478|        }
36414|   669k|    }
36415|      0|    return first_bucket;
36416|   668k|}
janet_dictionary_next:
36428|  8.15k|const JanetKV *janet_dictionary_next(const JanetKV *kvs, int32_t cap, const JanetKV *kv) {
36429|  8.15k|    const JanetKV *end = kvs + cap;
36430|  8.15k|    kv = (kv == NULL) ? kvs : kv + 1;
  ------------------
  |  Branch (36430:10): [True: 3.43k, False: 4.71k]
  ------------------
36431|  21.3k|    while (kv < end) {
  ------------------
  |  Branch (36431:12): [True: 17.9k, False: 3.43k]
  ------------------
36432|  17.9k|        if (!janet_checktype(kv->key, JANET_NIL))
  ------------------
  |  |  806|  17.9k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 17.9k]
  |  |  ------------------
  |  |  807|  17.9k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  17.9k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  17.9k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  17.9k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  17.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  17.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (36432:13): [True: 4.71k, False: 13.2k]
  ------------------
36433|  4.71k|            return kv;
36434|  13.2k|        kv++;
36435|  13.2k|    }
36436|  3.43k|    return NULL;
36437|  8.15k|}
janet_cstrcmp:
36441|   376M|int janet_cstrcmp(const uint8_t *str, const char *other) {
36442|   376M|    int32_t len = janet_string_length(str);
  ------------------
  |  | 1813|   376M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|   376M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
36443|   376M|    int32_t index;
36444|   549M|    for (index = 0; index < len; index++) {
  ------------------
  |  Branch (36444:21): [True: 512M, False: 36.9M]
  ------------------
36445|   512M|        uint8_t c = str[index];
36446|   512M|        uint8_t k = ((const uint8_t *)other)[index];
36447|   512M|        if (c < k) return -1;
  ------------------
  |  Branch (36447:13): [True: 136M, False: 376M]
  ------------------
36448|   376M|        if (c > k) return 1;
  ------------------
  |  Branch (36448:13): [True: 202M, False: 173M]
  ------------------
36449|   173M|        if (k == '\0') break;
  ------------------
  |  Branch (36449:13): [True: 0, False: 173M]
  ------------------
36450|   173M|    }
36451|  36.9M|    return (other[index] == '\0') ? 0 : -1;
  ------------------
  |  Branch (36451:12): [True: 36.9M, False: 4.36k]
  ------------------
36452|   376M|}
janet_strbinsearch:
36461|  3.89M|    const uint8_t *key) {
36462|  3.89M|    size_t low = 0;
36463|  3.89M|    size_t hi = tabcount;
36464|  3.89M|    const char *t = (const char *)tab;
36465|  14.3M|    while (low < hi) {
  ------------------
  |  Branch (36465:12): [True: 13.5M, False: 785k]
  ------------------
36466|  13.5M|        size_t mid = low + ((hi - low) / 2);
36467|  13.5M|        const char **item = (const char **)(t + mid * itemsize);
36468|  13.5M|        const char *name = *item;
36469|  13.5M|        int comp = janet_cstrcmp(key, name);
36470|  13.5M|        if (comp < 0) {
  ------------------
  |  Branch (36470:13): [True: 6.47M, False: 7.07M]
  ------------------
36471|  6.47M|            hi = mid;
36472|  7.07M|        } else if (comp > 0) {
  ------------------
  |  Branch (36472:20): [True: 3.96M, False: 3.10M]
  ------------------
36473|  3.96M|            low = mid + 1;
36474|  3.96M|        } else {
36475|  3.10M|            return (const void *)item;
36476|  3.10M|        }
36477|  13.5M|    }
36478|   785k|    return NULL;
36479|  3.89M|}
janet_registry_put:
36541|  2.93M|    int32_t source_line) {
36542|  2.93M|    if (janet_vm.registry_count == janet_vm.registry_cap) {
  ------------------
  |  Branch (36542:9): [True: 8.33k, False: 2.92M]
  ------------------
36543|  8.33k|        size_t newcap = (janet_vm.registry_count + 1) * 2;
36544|       |        /* Size it nicely with core by default */
36545|  8.33k|        if (newcap < 512) {
  ------------------
  |  Branch (36545:13): [True: 8.33k, False: 0]
  ------------------
36546|  8.33k|            newcap = 512;
36547|  8.33k|        }
36548|  8.33k|        void *newmem = janet_realloc(janet_vm.registry, newcap * sizeof(JanetCFunRegistry));
  ------------------
  |  | 2409|  8.33k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
36549|  8.33k|        if (NULL == newmem) {
  ------------------
  |  Branch (36549:13): [True: 0, False: 8.33k]
  ------------------
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|  8.33k|        janet_vm.registry = newmem;
36553|  8.33k|        janet_vm.registry_cap = newcap;
36554|  8.33k|    }
36555|  2.93M|    JanetCFunRegistry value = {
36556|  2.93M|        key,
36557|  2.93M|        name,
36558|  2.93M|        name_prefix,
36559|  2.93M|        source_file,
36560|  2.93M|        source_line
36561|  2.93M|    };
36562|  2.93M|    janet_vm.registry[janet_vm.registry_count++] = value;
36563|  2.93M|    janet_vm.registry_dirty = 1;
36564|  2.93M|}
janet_registry_get:
36566|  3.87k|JanetCFunRegistry *janet_registry_get(JanetCFunction key) {
36567|  3.87k|    if (janet_vm.registry_dirty) {
  ------------------
  |  Branch (36567:9): [True: 1.53k, False: 2.33k]
  ------------------
36568|  1.53k|        janet_registry_sort();
36569|  1.53k|    }
36570|   668k|    for (size_t i = 0; i < janet_vm.registry_count; i++) {
  ------------------
  |  Branch (36570:24): [True: 668k, False: 45]
  ------------------
36571|   668k|        if (janet_vm.registry[i].cfun == key) {
  ------------------
  |  Branch (36571:13): [True: 3.82k, False: 664k]
  ------------------
36572|  3.82k|            return janet_vm.registry + i;
36573|  3.82k|        }
36574|   668k|    }
36575|     45|    JanetCFunRegistry *lo = janet_vm.registry;
36576|     45|    JanetCFunRegistry *hi = lo + janet_vm.registry_count;
36577|    405|    while (lo < hi) {
  ------------------
  |  Branch (36577:12): [True: 360, False: 45]
  ------------------
36578|    360|        JanetCFunRegistry *mid = lo + (hi - lo) / 2;
36579|    360|        if (mid->cfun == key) {
  ------------------
  |  Branch (36579:13): [True: 0, False: 360]
  ------------------
36580|      0|            return mid;
36581|      0|        }
36582|    360|        if ((void *)(mid->cfun) > (void *)(key)) {
  ------------------
  |  Branch (36582:13): [True: 0, False: 360]
  ------------------
36583|      0|            hi = mid;
36584|    360|        } else {
36585|    360|            lo = mid + 1;
36586|    360|        }
36587|    360|    }
36588|     45|    return NULL;
36589|     45|}
janet_register_abstract_type:
36690|  75.0k|void janet_register_abstract_type(const JanetAbstractType *at) {
36691|  75.0k|    janet_check_pointer_align((void *) at);
36692|  75.0k|    Janet sym = janet_csymbolv(at->name);
  ------------------
  |  | 1837|  75.0k|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  75.0k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  75.0k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  75.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  75.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36693|  75.0k|    Janet check = janet_table_get(janet_vm.abstract_registry, sym);
36694|  75.0k|    if (!janet_checktype(check, JANET_NIL) && at != janet_unwrap_pointer(check)) {
  ------------------
  |  |  806|   150k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 75.0k]
  |  |  ------------------
  |  |  807|   150k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   150k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  75.0k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  75.0k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  75.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  75.0k|#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: 75.0k]
  |  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|  75.0k|    janet_table_put(janet_vm.abstract_registry, sym, janet_wrap_pointer((void *) at));
  ------------------
  |  |  854|  75.0k|#define janet_wrap_pointer(s) janet_nanbox_wrap_((s), JANET_POINTER)
  |  |  ------------------
  |  |  |  |  825|  75.0k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  75.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  75.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36699|  75.0k|}
janet_get_abstract_type:
36701|  4.87k|const JanetAbstractType *janet_get_abstract_type(Janet key) {
36702|  4.87k|    Janet wrapped = janet_table_get(janet_vm.abstract_registry, key);
36703|  4.87k|    if (janet_checktype(wrapped, JANET_NIL)) {
  ------------------
  |  |  806|  4.87k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 3, False: 4.87k]
  |  |  |  Branch (806:6): [Folded, False: 4.87k]
  |  |  ------------------
  |  |  807|  4.87k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.87k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  4.87k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  4.87k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.87k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.87k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36704|      3|        return NULL;
36705|      3|    }
36706|  4.87k|    return (JanetAbstractType *)(janet_unwrap_pointer(wrapped));
  ------------------
  |  |  867|  4.87k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
36707|  4.87k|}
janet_core_def_sm:
36710|  25.0k|void janet_core_def_sm(JanetTable *env, const char *name, Janet x, const void *p, const void *sf, int32_t sl) {
36711|  25.0k|    (void) sf;
36712|  25.0k|    (void) sl;
36713|  25.0k|    (void) p;
36714|  25.0k|    Janet key = janet_csymbolv(name);
  ------------------
  |  | 1837|  25.0k|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  25.0k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  25.0k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36715|  25.0k|    janet_table_put(env, key, x);
36716|  25.0k|    if (janet_checktype(x, JANET_CFUNCTION)) {
  ------------------
  |  |  806|  25.0k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 25.0k]
  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
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|  25.0k|}
janet_core_cfuns_ext:
36721|   183k|void janet_core_cfuns_ext(JanetTable *env, const char *regprefix, const JanetRegExt *cfuns) {
36722|   183k|    (void) regprefix;
36723|  3.11M|    while (cfuns->name) {
  ------------------
  |  Branch (36723:12): [True: 2.93M, False: 183k]
  ------------------
36724|  2.93M|        janet_check_pointer_align(cfuns->cfun);
36725|  2.93M|        Janet fun = janet_wrap_cfunction(cfuns->cfun);
  ------------------
  |  |  853|  2.93M|#define janet_wrap_cfunction(s) janet_nanbox_wrap_((s), JANET_CFUNCTION)
  |  |  ------------------
  |  |  |  |  825|  2.93M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.93M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.93M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36726|  2.93M|        janet_table_put(env, janet_csymbolv(cfuns->name), fun);
  ------------------
  |  | 1837|  2.93M|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  2.93M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  2.93M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  2.93M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  2.93M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36727|  2.93M|        janet_registry_put(cfuns->cfun, cfuns->name, regprefix, cfuns->source_file, cfuns->source_line);
36728|  2.93M|        cfuns++;
36729|  2.93M|    }
36730|   183k|}
janet_binding_from_entry:
36733|  1.59M|JanetBinding janet_binding_from_entry(Janet entry) {
36734|  1.59M|    JanetTable *entry_table;
36735|  1.59M|    JanetBinding binding = {
36736|  1.59M|        JANET_BINDING_NONE,
36737|  1.59M|        janet_wrap_nil(),
  ------------------
  |  |  831|  1.59M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.59M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.59M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.59M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36738|  1.59M|        JANET_BINDING_DEP_NONE
36739|  1.59M|    };
36740|       |
36741|       |    /* Check environment for entry */
36742|  1.59M|    if (!janet_checktype(entry, JANET_TABLE))
  ------------------
  |  |  806|  1.59M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 1.59M]
  |  |  ------------------
  |  |  807|  1.59M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.59M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.59M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.59M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.59M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.59M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (36742:9): [True: 26.2k, False: 1.57M]
  ------------------
36743|  26.2k|        return binding;
36744|  1.57M|    entry_table = janet_unwrap_table(entry);
  ------------------
  |  |  861|  1.57M|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
36745|       |
36746|  1.57M|    Janet deprecate = janet_table_get_keyword(entry_table, "deprecated");
36747|  1.57M|    int macro = janet_truthy(janet_table_get_keyword(entry_table, "macro"));
  ------------------
  |  |  818|  1.57M|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|  3.14M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 1.57M]
  |  |  |  |  ------------------
  |  |  |  |  807|  3.14M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|  3.14M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  1.57M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  1.57M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.57M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.57M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 333k, False: 1.23M]
  |  |  ------------------
  |  |  819|  1.57M|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|   666k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 333k]
  |  |  |  |  ------------------
  |  |  |  |  807|   666k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|   666k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|   333k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|   333k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   333k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   333k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 0, False: 333k]
  |  |  |  Branch (819:47): [True: 333k, False: 0]
  |  |  ------------------
  ------------------
36748|  1.57M|    Janet value = janet_table_get_keyword(entry_table, "value");
36749|  1.57M|    Janet ref = janet_table_get_keyword(entry_table, "ref");
36750|       |
36751|  1.57M|    if (janet_checktype(deprecate, JANET_KEYWORD)) {
  ------------------
  |  |  806|  1.57M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 1.57M]
  |  |  |  Branch (806:6): [Folded, False: 1.57M]
  |  |  ------------------
  |  |  807|  1.57M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.57M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.57M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.57M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.57M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.57M|#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|  1.57M|    } else if (!janet_checktype(deprecate, JANET_NIL)) {
  ------------------
  |  |  806|  1.57M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 1.57M]
  |  |  ------------------
  |  |  807|  1.57M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.57M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.57M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.57M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.57M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.57M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (36760:16): [True: 0, False: 1.57M]
  ------------------
36761|      0|        binding.deprecation = JANET_BINDING_DEP_NORMAL;
36762|      0|    }
36763|       |
36764|  1.57M|    int ref_is_valid = janet_checktype(ref, JANET_ARRAY);
  ------------------
  |  |  806|  1.57M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 1.57M]
  |  |  ------------------
  |  |  807|  1.57M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.57M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.57M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.57M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.57M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.57M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36765|  1.57M|    int redef = ref_is_valid && janet_truthy(janet_table_get_keyword(entry_table, "redef"));
  ------------------
  |  |  818|  1.57M|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|  1.38k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 691]
  |  |  |  |  ------------------
  |  |  |  |  807|  1.38k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!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.38k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|    691|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|    691|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    691|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    691|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 0, False: 691]
  |  |  ------------------
  |  |  819|  1.57M|     (!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: 691, False: 1.57M]
  ------------------
36766|       |
36767|  1.57M|    if (macro) {
  ------------------
  |  Branch (36767:9): [True: 333k, False: 1.23M]
  ------------------
36768|   333k|        binding.value = redef ? ref : value;
  ------------------
  |  Branch (36768:25): [True: 0, False: 333k]
  ------------------
36769|   333k|        binding.type = redef ? JANET_BINDING_DYNAMIC_MACRO : JANET_BINDING_MACRO;
  ------------------
  |  Branch (36769:24): [True: 0, False: 333k]
  ------------------
36770|   333k|        return binding;
36771|   333k|    }
36772|       |
36773|  1.23M|    if (ref_is_valid) {
  ------------------
  |  Branch (36773:9): [True: 691, False: 1.23M]
  ------------------
36774|    691|        binding.value = ref;
36775|    691|        binding.type = redef ? JANET_BINDING_DYNAMIC_DEF : JANET_BINDING_VAR;
  ------------------
  |  Branch (36775:24): [True: 0, False: 691]
  ------------------
36776|  1.23M|    } else {
36777|  1.23M|        binding.value = value;
36778|  1.23M|        binding.type = JANET_BINDING_DEF;
36779|  1.23M|    }
36780|       |
36781|  1.23M|    return binding;
36782|  1.57M|}
janet_text_substitution:
36813|  47.3k|    JanetArray *extra_argv) {
36814|  47.3k|    int32_t extra_argc = extra_argv == NULL ? 0 : extra_argv->count;
  ------------------
  |  Branch (36814:26): [True: 4.22k, False: 43.1k]
  ------------------
36815|  47.3k|    JanetType type = janet_type(*subst);
  ------------------
  |  |  795|  47.3k|    (isnan((x).number) \
  |  |  796|  47.3k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  47.3k|        : JANET_NUMBER)
  ------------------
  |  Branch (36815:22): [True: 46.9k, False: 391]
  ------------------
36816|  47.3k|    switch (type) {
36817|    181|        case JANET_FUNCTION:
  ------------------
  |  Branch (36817:9): [True: 181, False: 47.1k]
  ------------------
36818|    182|        case JANET_CFUNCTION: {
  ------------------
  |  Branch (36818:9): [True: 1, False: 47.3k]
  ------------------
36819|    182|            int32_t argc = 1 + extra_argc;
36820|    182|            Janet *argv = janet_tuple_begin(argc);
36821|    182|            argv[0] = janet_stringv(bytes, len);
  ------------------
  |  | 1827|    182|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|    182|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|    182|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    182|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    182|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36822|    310|            for (int32_t i = 0; i < extra_argc; i++) {
  ------------------
  |  Branch (36822:33): [True: 128, False: 182]
  ------------------
36823|    128|                argv[i + 1] = extra_argv->data[i];
36824|    128|            }
36825|    182|            janet_tuple_end(argv);
36826|    182|            if (type == JANET_FUNCTION) {
  ------------------
  |  Branch (36826:17): [True: 181, False: 1]
  ------------------
36827|    181|                return to_byte_view(janet_call(janet_unwrap_function(*subst), argc, argv));
  ------------------
  |  |  868|    181|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
36828|    181|            } else {
36829|      1|                return to_byte_view(janet_unwrap_cfunction(*subst)(argc, argv));
  ------------------
  |  |  869|      1|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
36830|      1|            }
36831|    182|        }
36832|  47.1k|        default:
  ------------------
  |  Branch (36832:9): [True: 47.1k, False: 182]
  ------------------
36833|  47.1k|            return memoize_byte_view(subst);
36834|  47.3k|    }
36835|  47.3k|}
janet_resolve_ext:
36837|  1.59M|JanetBinding janet_resolve_ext(JanetTable *env, const uint8_t *sym) {
36838|  1.59M|    Janet entry = janet_table_get(env, janet_wrap_symbol(sym));
  ------------------
  |  |  849|  1.59M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|  1.59M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.59M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.59M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36839|  1.59M|    return janet_binding_from_entry(entry);
36840|  1.59M|}
janet_resolve:
36842|   802k|JanetBindingType janet_resolve(JanetTable *env, const uint8_t *sym, Janet *out) {
36843|   802k|    JanetBinding binding = janet_resolve_ext(env, sym);
36844|   802k|    if (binding.type == JANET_BINDING_DYNAMIC_DEF || binding.type == JANET_BINDING_DYNAMIC_MACRO) {
  ------------------
  |  Branch (36844:9): [True: 0, False: 802k]
  |  Branch (36844:54): [True: 0, False: 802k]
  ------------------
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|   802k|    } else {
36847|   802k|        *out = binding.value;
36848|   802k|    }
36849|   802k|    return binding.type;
36850|   802k|}
janet_indexed_view:
36862|  39.1M|int janet_indexed_view(Janet seq, const Janet **data, int32_t *len) {
36863|  39.1M|    if (janet_checktype(seq, JANET_ARRAY)) {
  ------------------
  |  |  806|  39.1M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 12.4M, False: 26.7M]
  |  |  |  Branch (806:6): [Folded, False: 39.1M]
  |  |  ------------------
  |  |  807|  39.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|  39.1M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  39.1M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  39.1M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  39.1M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  39.1M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36864|  12.4M|        *data = janet_unwrap_array(seq)->data;
  ------------------
  |  |  860|  12.4M|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
36865|  12.4M|        *len = janet_unwrap_array(seq)->count;
  ------------------
  |  |  860|  12.4M|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
36866|  12.4M|        return 1;
36867|  26.7M|    } else if (janet_checktype(seq, JANET_TUPLE)) {
  ------------------
  |  |  806|  26.7M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 26.7M, False: 57]
  |  |  |  Branch (806:6): [Folded, False: 26.7M]
  |  |  ------------------
  |  |  807|  26.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|  26.7M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  26.7M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  26.7M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  26.7M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  26.7M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36868|  26.7M|        *data = janet_unwrap_tuple(seq);
  ------------------
  |  |  858|  26.7M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
36869|  26.7M|        *len = janet_tuple_length(janet_unwrap_tuple(seq));
  ------------------
  |  | 1802|  26.7M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  26.7M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
36870|  26.7M|        return 1;
36871|  26.7M|    }
36872|     57|    return 0;
36873|  39.1M|}
janet_bytes_view:
36877|  57.2M|int janet_bytes_view(Janet str, const uint8_t **data, int32_t *len) {
36878|  57.2M|    JanetType t = janet_type(str);
  ------------------
  |  |  795|  57.2M|    (isnan((x).number) \
  |  |  796|  57.2M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  57.2M|        : JANET_NUMBER)
  ------------------
  |  Branch (36878:19): [True: 57.2M, False: 424]
  ------------------
36879|  57.2M|    if (t == JANET_STRING || t == JANET_SYMBOL || t == JANET_KEYWORD) {
  ------------------
  |  Branch (36879:9): [True: 28.2M, False: 29.0M]
  |  Branch (36879:30): [True: 27.3M, False: 1.61M]
  |  Branch (36879:51): [True: 1.41M, False: 205k]
  ------------------
36880|  57.0M|        *data = janet_unwrap_string(str);
  ------------------
  |  |  863|  57.0M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
36881|  57.0M|        *len = janet_string_length(janet_unwrap_string(str));
  ------------------
  |  | 1813|  57.0M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  57.0M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
36882|  57.0M|        return 1;
36883|  57.0M|    } else if (t == JANET_BUFFER) {
  ------------------
  |  Branch (36883:16): [True: 149k, False: 55.7k]
  ------------------
36884|   149k|        *data = janet_unwrap_buffer(str)->data;
  ------------------
  |  |  862|   149k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
36885|   149k|        *len = janet_unwrap_buffer(str)->count;
  ------------------
  |  |  862|   149k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
36886|   149k|        return 1;
36887|   149k|    } else if (t == JANET_ABSTRACT) {
  ------------------
  |  Branch (36887:16): [True: 33, False: 55.7k]
  ------------------
36888|     33|        void *abst = janet_unwrap_abstract(str);
  ------------------
  |  |  866|     33|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
36889|     33|        const JanetAbstractType *atype = janet_abstract_type(abst);
  ------------------
  |  | 1899|     33|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|     33|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
36890|     33|        if (NULL == atype->bytes) {
  ------------------
  |  Branch (36890:13): [True: 33, False: 0]
  ------------------
36891|     33|            return 0;
36892|     33|        }
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|     33|    }
36898|  55.7k|    return 0;
36899|  57.2M|}
janet_dictionary_view:
36904|  16.0k|int janet_dictionary_view(Janet tab, const JanetKV **data, int32_t *len, int32_t *cap) {
36905|  16.0k|    if (janet_checktype(tab, JANET_TABLE)) {
  ------------------
  |  |  806|  16.0k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1.21k, False: 14.8k]
  |  |  |  Branch (806:6): [Folded, False: 16.0k]
  |  |  ------------------
  |  |  807|  16.0k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  16.0k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  16.0k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  16.0k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  16.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  16.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36906|  1.21k|        *data = janet_unwrap_table(tab)->data;
  ------------------
  |  |  861|  1.21k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
36907|  1.21k|        *cap = janet_unwrap_table(tab)->capacity;
  ------------------
  |  |  861|  1.21k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
36908|  1.21k|        *len = janet_unwrap_table(tab)->count;
  ------------------
  |  |  861|  1.21k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
36909|  1.21k|        return 1;
36910|  14.8k|    } else if (janet_checktype(tab, JANET_STRUCT)) {
  ------------------
  |  |  806|  14.8k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 14.8k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 14.8k]
  |  |  ------------------
  |  |  807|  14.8k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  14.8k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  14.8k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  14.8k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  14.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  14.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36911|  14.8k|        *data = janet_unwrap_struct(tab);
  ------------------
  |  |  857|  14.8k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
36912|  14.8k|        *cap = janet_struct_capacity(janet_unwrap_struct(tab));
  ------------------
  |  | 1849|  14.8k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  14.8k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
36913|  14.8k|        *len = janet_struct_length(janet_unwrap_struct(tab));
  ------------------
  |  | 1848|  14.8k|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|  14.8k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
36914|  14.8k|        return 1;
36915|  14.8k|    }
36916|      0|    return 0;
36917|  16.0k|}
janet_checkint:
36919|   336M|int janet_checkint(Janet x) {
36920|   336M|    if (!janet_checktype(x, JANET_NUMBER))
  ------------------
  |  |  806|   336M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [True: 336M, Folded]
  |  |  ------------------
  |  |  807|   336M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|   336M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 325M, False: 10.9M]
  |  |  |  |  |  Branch (803:28): [True: 18.4E, False: 10.9M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  18.4E|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  18.4E|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  18.4E|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  18.4E|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  18.4E|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (36920:9): [True: 10.9M, False: 325M]
  ------------------
36921|  10.9M|        return 0;
36922|   325M|    double dval = janet_unwrap_number(x);
  ------------------
  |  |  839|   325M|#define janet_unwrap_number(x) ((x).number)
  ------------------
36923|       |    return janet_checkintrange(dval);
  ------------------
  |  |  962|   325M|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  ------------------
  |  |  |  Branch (962:33): [True: 325M, False: 1.58k]
  |  |  |  Branch (962:53): [True: 325M, False: 4.96k]
  |  |  |  Branch (962:73): [True: 325M, False: 48]
  |  |  ------------------
  ------------------
36924|   336M|}
janet_checksize:
36975|    661|int janet_checksize(Janet x) {
36976|    661|    if (!janet_checktype(x, JANET_NUMBER))
  ------------------
  |  |  806|    661|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [True: 661, Folded]
  |  |  ------------------
  |  |  807|    661|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|    661|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 660, False: 1]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    661|        : 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 (36976:9): [True: 1, False: 660]
  ------------------
36977|      1|        return 0;
36978|    660|    double dval = janet_unwrap_number(x);
  ------------------
  |  |  839|    660|#define janet_unwrap_number(x) ((x).number)
  ------------------
36979|    660|    if (dval != (double)((size_t) dval)) return 0;
  ------------------
  |  Branch (36979:9): [True: 2, False: 658]
  ------------------
36980|       |#ifdef JANET_PLAN9
36981|       |    return dval <= SIZE_MAX;
36982|       |#else
36983|    658|    if (SIZE_MAX > JANET_INTMAX_INT64) {
  ------------------
  |  |  167|    658|#define JANET_INTMAX_INT64 9007199254740992
  ------------------
  |  Branch (36983:9): [True: 658, Folded]
  ------------------
36984|    658|        return dval <= JANET_INTMAX_INT64;
  ------------------
  |  |  167|    658|#define JANET_INTMAX_INT64 9007199254740992
  ------------------
36985|    658|    } else {
36986|       |        return dval <= SIZE_MAX;
36987|      0|    }
36988|    658|#endif
36989|    658|}
janet_sorted_keys:
37001|  7.29k|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|  7.29k|    int32_t next_index = 0;
37005|   121k|    for (int32_t i = 0; i < cap; i++) {
  ------------------
  |  Branch (37005:25): [True: 114k, False: 7.29k]
  ------------------
37006|   114k|        if (!janet_checktype(dict[i].key, JANET_NIL)) {
  ------------------
  |  |  806|   114k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 114k]
  |  |  ------------------
  |  |  807|   114k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   114k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   114k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   114k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   114k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   114k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (37006:13): [True: 37.4k, False: 76.5k]
  ------------------
37007|  37.4k|            index_buffer[next_index++] = i;
37008|  37.4k|        }
37009|   114k|    }
37010|       |
37011|       |    /* Next, sort those (simple insertion sort here for now) */
37012|  41.5k|    for (int32_t i = 1; i < next_index; i++) {
  ------------------
  |  Branch (37012:25): [True: 34.2k, False: 7.29k]
  ------------------
37013|  34.2k|        int32_t index_to_insert = index_buffer[i];
37014|  34.2k|        Janet lhs = dict[index_to_insert].key;
37015|  4.28M|        for (int32_t j = i - 1; j >= 0; j--) {
  ------------------
  |  Branch (37015:33): [True: 4.28M, False: 3.13k]
  ------------------
37016|  4.28M|            index_buffer[j + 1] = index_buffer[j];
37017|  4.28M|            Janet rhs = dict[index_buffer[j]].key;
37018|  4.28M|            if (janet_compare(lhs, rhs) >= 0) {
  ------------------
  |  Branch (37018:17): [True: 31.0k, False: 4.25M]
  ------------------
37019|  31.0k|                index_buffer[j + 1] = index_to_insert;
37020|  31.0k|                break;
37021|  4.25M|            } else if (j == 0) {
  ------------------
  |  Branch (37021:24): [True: 3.13k, False: 4.25M]
  ------------------
37022|  3.13k|                index_buffer[0] = index_to_insert;
37023|  3.13k|            }
37024|  4.28M|        }
37025|  34.2k|    }
37026|       |
37027|       |    /* Return number of indices found */
37028|  7.29k|    return next_index;
37029|  7.29k|}
janet_gettime:
37088|  1.02M|int janet_gettime(struct timespec *spec, enum JanetTimeSource source) {
37089|  1.02M|    clockid_t cid = CLOCK_REALTIME;
37090|  1.02M|    if (source == JANET_TIME_REALTIME) {
  ------------------
  |  Branch (37090:9): [True: 12, False: 1.02M]
  ------------------
37091|     12|        cid = CLOCK_REALTIME;
37092|  1.02M|    } else if (source == JANET_TIME_MONOTONIC) {
  ------------------
  |  Branch (37092:16): [True: 1.02M, False: 0]
  ------------------
37093|  1.02M|        cid = CLOCK_MONOTONIC;
37094|  1.02M|    } else if (source == JANET_TIME_CPUTIME) {
  ------------------
  |  Branch (37094:16): [True: 0, False: 0]
  ------------------
37095|       |        cid = CLOCK_PROCESS_CPUTIME_ID;
37096|      0|    }
37097|  1.02M|    return clock_gettime(cid, spec);
37098|  1.02M|}
janet_strerror:
37103|     46|const char *janet_strerror(int e) {
37104|       |#ifdef JANET_WINDOWS
37105|       |    /* Microsoft strerror seems sane here and is thread safe by default */
37106|       |    return strerror(e);
37107|       |#elif defined(__GLIBC__)
37108|       |    /* See https://linux.die.net/man/3/strerror_r */
37109|     46|    return strerror_r(e, janet_vm.strerror_buf, sizeof(janet_vm.strerror_buf));
37110|       |#else
37111|       |    strerror_r(e, janet_vm.strerror_buf, sizeof(janet_vm.strerror_buf));
37112|       |    return janet_vm.strerror_buf;
37113|       |#endif
37114|     46|}
janet_cryptorand:
37122|     36|int janet_cryptorand(uint8_t *out, size_t n) {
37123|     36|#ifndef JANET_NO_CRYPTORAND
37124|       |#ifdef JANET_WINDOWS
37125|       |    for (size_t i = 0; i < n; i += sizeof(unsigned int)) {
37126|       |        unsigned int v;
37127|       |        if (rand_s(&v))
37128|       |            return -1;
37129|       |        for (int32_t j = 0; (j < (int32_t) sizeof(unsigned int)) && (i + j < n); j++) {
37130|       |            out[i + j] = v & 0xff;
37131|       |            v = v >> 8;
37132|       |        }
37133|       |    }
37134|       |    return 0;
37135|       |#elif defined(JANET_BSD) || defined(MAC_OS_X_VERSION_10_7)
37136|       |    arc4random_buf(out, n);
37137|       |    return 0;
37138|       |#else
37139|       |    /* We should be able to call getrandom on linux, but it doesn't seem
37140|       |       to be uniformly supported on linux distros.
37141|       |       On Mac, arc4random_buf wasn't available on until 10.7.
37142|       |       In these cases, use this fallback path for now... */
37143|     36|    int rc;
37144|     36|    int randfd;
37145|     36|    RETRY_EINTR(randfd, open("/dev/urandom", O_RDONLY | O_CLOEXEC));
  ------------------
  |  |  554|     36|#define RETRY_EINTR(RC, CALL) do { (RC) = CALL; } while((RC) < 0 && errno == EINTR)
  |  |  ------------------
  |  |  |  Branch (554:57): [True: 0, False: 36]
  |  |  |  Branch (554:69): [True: 0, False: 0]
  |  |  ------------------
  ------------------
37146|     36|    if (randfd < 0)
  ------------------
  |  Branch (37146:9): [True: 0, False: 36]
  ------------------
37147|      0|        return -1;
37148|     50|    while (n > 0) {
  ------------------
  |  Branch (37148:12): [True: 14, False: 36]
  ------------------
37149|     14|        ssize_t nread;
37150|     14|        RETRY_EINTR(nread, read(randfd, out, n));
  ------------------
  |  |  554|     14|#define RETRY_EINTR(RC, CALL) do { (RC) = CALL; } while((RC) < 0 && errno == EINTR)
  |  |  ------------------
  |  |  |  Branch (554:57): [True: 0, False: 14]
  |  |  |  Branch (554:69): [True: 0, False: 0]
  |  |  ------------------
  ------------------
37151|     14|        if (nread <= 0) {
  ------------------
  |  Branch (37151:13): [True: 0, False: 14]
  ------------------
37152|      0|            RETRY_EINTR(rc, close(randfd));
  ------------------
  |  |  554|      0|#define RETRY_EINTR(RC, CALL) do { (RC) = CALL; } while((RC) < 0 && errno == EINTR)
  |  |  ------------------
  |  |  |  Branch (554:57): [True: 0, False: 0]
  |  |  |  Branch (554:69): [True: 0, False: 0]
  |  |  ------------------
  ------------------
37153|      0|            return -1;
37154|      0|        }
37155|     14|        out += nread;
37156|     14|        n -= nread;
37157|     14|    }
37158|     36|    RETRY_EINTR(rc, close(randfd));
  ------------------
  |  |  554|     36|#define RETRY_EINTR(RC, CALL) do { (RC) = CALL; } while((RC) < 0 && errno == EINTR)
  |  |  ------------------
  |  |  |  Branch (554:57): [True: 0, False: 36]
  |  |  |  Branch (554:69): [True: 0, False: 0]
  |  |  ------------------
  ------------------
37159|     36|    return 0;
37160|     36|#endif
37161|       |#else
37162|       |    (void) out;
37163|       |    (void) n;
37164|       |    return -1;
37165|       |#endif
37166|     36|}
get_processed_name:
37170|     15|char *get_processed_name(const char *name) {
37171|     15|    if (name[0] == '.') return (char *) name;
  ------------------
  |  Branch (37171:9): [True: 0, False: 15]
  ------------------
37172|     15|    const char *c;
37173|  1.26k|    for (c = name; *c; c++) {
  ------------------
  |  Branch (37173:20): [True: 1.25k, False: 13]
  ------------------
37174|  1.25k|        if (*c == '/') return (char *) name;
  ------------------
  |  Branch (37174:13): [True: 2, False: 1.25k]
  ------------------
37175|  1.25k|    }
37176|     13|    size_t l = (size_t)(c - name);
37177|     13|    char *ret = janet_malloc(l + 3);
  ------------------
  |  | 2406|     13|#define janet_malloc(X) malloc((X))
  ------------------
37178|     13|    if (NULL == ret) {
  ------------------
  |  Branch (37178:9): [True: 0, False: 13]
  ------------------
37179|      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]
  |  |  ------------------
  ------------------
37180|      0|    }
37181|     13|    ret[0] = '.';
37182|     13|    ret[1] = '/';
37183|     13|    memcpy(ret + 2, name, l + 1);
37184|     13|    return ret;
37185|     13|}
array_allocate:
37262|  88.7M|void *array_allocate(size_t element_size, int32_t count) {
37263|  88.7M|    if (count < 0) return NULL;
  ------------------
  |  Branch (37263:9): [True: 0, False: 88.7M]
  ------------------
37264|  88.7M|    if ((size_t) count > (SIZE_MAX / element_size)) return NULL;
  ------------------
  |  Branch (37264:9): [True: 0, False: 88.7M]
  ------------------
37265|  88.7M|    return janet_malloc(element_size * count);
  ------------------
  |  | 2406|  88.7M|#define janet_malloc(X) malloc((X))
  ------------------
37266|  88.7M|}
janet_next_impl:
37401|   152M|Janet janet_next_impl(Janet ds, Janet key, int is_interpreter) {
37402|   152M|    JanetType t = janet_type(ds);
  ------------------
  |  |  795|   152M|    (isnan((x).number) \
  |  |  796|   152M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   152M|        : JANET_NUMBER)
  ------------------
  |  Branch (37402:19): [True: 152M, False: 56]
  ------------------
37403|   152M|    switch (t) {
37404|    106|        default:
  ------------------
  |  Branch (37404:9): [True: 106, False: 152M]
  ------------------
37405|    106|            janet_panicf("expected iterable type, got %v", ds);
37406|  10.0M|        case JANET_TABLE:
  ------------------
  |  Branch (37406:9): [True: 10.0M, False: 142M]
  ------------------
37407|  11.9M|        case JANET_STRUCT: {
  ------------------
  |  Branch (37407:9): [True: 1.91M, False: 151M]
  ------------------
37408|  11.9M|            const JanetKV *start;
37409|  11.9M|            int32_t cap;
37410|  11.9M|            if (t == JANET_TABLE) {
  ------------------
  |  Branch (37410:17): [True: 10.0M, False: 1.91M]
  ------------------
37411|  10.0M|                JanetTable *tab = janet_unwrap_table(ds);
  ------------------
  |  |  861|  10.0M|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
37412|  10.0M|                cap = tab->capacity;
37413|  10.0M|                start = tab->data;
37414|  10.0M|            } else {
37415|  1.91M|                JanetStruct st = janet_unwrap_struct(ds);
  ------------------
  |  |  857|  1.91M|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
37416|  1.91M|                cap = janet_struct_capacity(st);
  ------------------
  |  | 1849|  1.91M|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  1.91M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37417|  1.91M|                start = st;
37418|  1.91M|            }
37419|  11.9M|            const JanetKV *end = start + cap;
37420|  11.9M|            const JanetKV *kv = janet_checktype(key, JANET_NIL)
  ------------------
  |  |  806|  11.9M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1.56M, False: 10.3M]
  |  |  |  Branch (806:6): [Folded, False: 11.9M]
  |  |  ------------------
  |  |  807|  11.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|  11.9M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  11.9M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  11.9M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37421|  11.9M|                                ? start
37422|  11.9M|                                : janet_dict_find(start, cap, key) + 1;
37423|  33.8M|            while (kv < end) {
  ------------------
  |  Branch (37423:20): [True: 32.2M, False: 1.55M]
  ------------------
37424|  32.2M|                if (!janet_checktype(kv->key, JANET_NIL)) return kv->key;
  ------------------
  |  |  806|  32.2M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 32.2M]
  |  |  ------------------
  |  |  807|  32.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|  32.2M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  32.2M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  32.2M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  32.2M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  32.2M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (37424:21): [True: 10.4M, False: 21.8M]
  ------------------
37425|  21.8M|                kv++;
37426|  21.8M|            }
37427|  1.55M|            break;
37428|  11.9M|        }
37429|  1.55M|        case JANET_STRING:
  ------------------
  |  Branch (37429:9): [True: 33.6k, False: 152M]
  ------------------
37430|   674k|        case JANET_KEYWORD:
  ------------------
  |  Branch (37430:9): [True: 641k, False: 152M]
  ------------------
37431|   116M|        case JANET_SYMBOL:
  ------------------
  |  Branch (37431:9): [True: 115M, False: 37.2M]
  ------------------
37432|   116M|        case JANET_BUFFER:
  ------------------
  |  Branch (37432:9): [True: 1.28k, False: 152M]
  ------------------
37433|   116M|        case JANET_ARRAY:
  ------------------
  |  Branch (37433:9): [True: 0, False: 152M]
  ------------------
37434|   116M|        case JANET_TUPLE: {
  ------------------
  |  Branch (37434:9): [True: 0, False: 152M]
  ------------------
37435|   116M|            int32_t i;
37436|   116M|            if (janet_checktype(key, JANET_NIL)) {
  ------------------
  |  |  806|   116M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 760k, False: 115M]
  |  |  |  Branch (806:6): [Folded, False: 116M]
  |  |  ------------------
  |  |  807|   116M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   116M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   116M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   116M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   116M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   116M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37437|   760k|                i = 0;
37438|   115M|            } else if (janet_checkint(key)) {
  ------------------
  |  Branch (37438:24): [True: 115M, False: 0]
  ------------------
37439|   115M|                i = janet_unwrap_integer(key) + 1;
  ------------------
  |  |  966|   115M|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|   115M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
37440|   115M|            } else {
37441|      0|                break;
37442|      0|            }
37443|   116M|            int32_t len;
37444|   116M|            if (t == JANET_BUFFER) {
  ------------------
  |  Branch (37444:17): [True: 1.28k, False: 116M]
  ------------------
37445|  1.28k|                len = janet_unwrap_buffer(ds)->count;
  ------------------
  |  |  862|  1.28k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
37446|   116M|            } else if (t == JANET_ARRAY) {
  ------------------
  |  Branch (37446:24): [True: 0, False: 116M]
  ------------------
37447|      0|                len = janet_unwrap_array(ds)->count;
  ------------------
  |  |  860|      0|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
37448|   116M|            } else if (t == JANET_TUPLE) {
  ------------------
  |  Branch (37448:24): [True: 0, False: 116M]
  ------------------
37449|      0|                len = janet_tuple_length(janet_unwrap_tuple(ds));
  ------------------
  |  | 1802|      0|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|      0|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
37450|   116M|            } else {
37451|   116M|                len = janet_string_length(janet_unwrap_string(ds));
  ------------------
  |  | 1813|   116M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|   116M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
37452|   116M|            }
37453|   116M|            if (i < len && i >= 0) {
  ------------------
  |  Branch (37453:17): [True: 115M, False: 760k]
  |  Branch (37453:28): [True: 115M, False: 0]
  ------------------
37454|   115M|                return janet_wrap_integer(i);
  ------------------
  |  |  967|   115M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|   115M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
37455|   115M|            }
37456|   760k|            break;
37457|   116M|        }
37458|  24.0M|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (37458:9): [True: 24.0M, False: 128M]
  ------------------
37459|  24.0M|            JanetAbstract abst = janet_unwrap_abstract(ds);
  ------------------
  |  |  866|  24.0M|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
37460|  24.0M|            const JanetAbstractType *at = janet_abstract_type(abst);
  ------------------
  |  | 1899|  24.0M|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|  24.0M|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
37461|  24.0M|            if (NULL == at->next) break;
  ------------------
  |  Branch (37461:17): [True: 2, False: 24.0M]
  ------------------
37462|  24.0M|            return at->next(abst, key);
37463|  24.0M|        }
37464|   556k|        case JANET_FIBER: {
  ------------------
  |  Branch (37464:9): [True: 556k, False: 152M]
  ------------------
37465|   556k|            JanetFiber *child = janet_unwrap_fiber(ds);
  ------------------
  |  |  859|   556k|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
37466|   556k|            Janet retreg;
37467|   556k|            JanetFiberStatus status = janet_fiber_status(child);
37468|   556k|            if (status == JANET_STATUS_ALIVE ||
  ------------------
  |  Branch (37468:17): [True: 1.55k, False: 555k]
  ------------------
37469|   555k|                    status == JANET_STATUS_DEAD ||
  ------------------
  |  Branch (37469:21): [True: 0, False: 555k]
  ------------------
37470|   555k|                    status == JANET_STATUS_ERROR ||
  ------------------
  |  Branch (37470:21): [True: 0, False: 555k]
  ------------------
37471|   555k|                    status == JANET_STATUS_USER0 ||
  ------------------
  |  Branch (37471:21): [True: 0, False: 555k]
  ------------------
37472|   555k|                    status == JANET_STATUS_USER1 ||
  ------------------
  |  Branch (37472:21): [True: 0, False: 555k]
  ------------------
37473|   555k|                    status == JANET_STATUS_USER2 ||
  ------------------
  |  Branch (37473:21): [True: 0, False: 555k]
  ------------------
37474|   555k|                    status == JANET_STATUS_USER3 ||
  ------------------
  |  Branch (37474:21): [True: 0, False: 555k]
  ------------------
37475|   555k|                    status == JANET_STATUS_USER4) {
  ------------------
  |  Branch (37475:21): [True: 0, False: 555k]
  ------------------
37476|  1.55k|                return janet_wrap_nil();
  ------------------
  |  |  831|  1.55k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.55k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.55k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.55k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37477|  1.55k|            }
37478|   555k|            janet_vm.fiber->child = child;
37479|   555k|            JanetSignal sig = janet_continue(child, janet_wrap_nil(), &retreg);
  ------------------
  |  |  831|   555k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   555k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   555k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   555k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37480|   555k|            if (sig != JANET_SIGNAL_OK && !(child->flags & (1 << sig))) {
  ------------------
  |  Branch (37480:17): [True: 0, False: 555k]
  |  Branch (37480:43): [True: 0, False: 0]
  ------------------
37481|      0|                if (is_interpreter) {
  ------------------
  |  Branch (37481:21): [True: 0, False: 0]
  ------------------
37482|      0|                    janet_signalv(sig, retreg);
37483|      0|                } else {
37484|      0|                    janet_vm.fiber->child = NULL;
37485|      0|                    janet_panicv(retreg);
37486|      0|                }
37487|      0|            }
37488|   555k|            janet_vm.fiber->child = NULL;
37489|   555k|            if (sig == JANET_SIGNAL_OK ||
  ------------------
  |  Branch (37489:17): [True: 555k, False: 0]
  ------------------
37490|      0|                    sig == JANET_SIGNAL_ERROR ||
  ------------------
  |  Branch (37490:21): [True: 0, False: 0]
  ------------------
37491|      0|                    sig == JANET_SIGNAL_USER0 ||
  ------------------
  |  Branch (37491:21): [True: 0, False: 0]
  ------------------
37492|      0|                    sig == JANET_SIGNAL_USER1 ||
  ------------------
  |  Branch (37492:21): [True: 0, False: 0]
  ------------------
37493|      0|                    sig == JANET_SIGNAL_USER2 ||
  ------------------
  |  Branch (37493:21): [True: 0, False: 0]
  ------------------
37494|      0|                    sig == JANET_SIGNAL_USER3 ||
  ------------------
  |  Branch (37494:21): [True: 0, False: 0]
  ------------------
37495|   555k|                    sig == JANET_SIGNAL_USER4) {
  ------------------
  |  Branch (37495:21): [True: 0, False: 0]
  ------------------
37496|       |                /* Fiber cannot be resumed, so discard last value. */
37497|   555k|                return janet_wrap_nil();
  ------------------
  |  |  831|   555k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   555k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   555k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   555k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37498|   555k|            } else {
37499|      0|                return janet_wrap_integer(0);
  ------------------
  |  |  967|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
37500|      0|            }
37501|   555k|        }
37502|   152M|    }
37503|  2.31M|    return janet_wrap_nil();
  ------------------
  |  |  831|  2.31M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  2.31M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.31M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.31M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37504|   152M|}
janet_equals:
37568|   540M|int janet_equals(Janet x, Janet y) {
37569|   540M|    if (janet_type(x) != janet_type(y)) return 0;
  ------------------
  |  |  795|   540M|    (isnan((x).number) \
  |  |  796|   540M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   540M|        : JANET_NUMBER)
  ------------------
                  if (janet_type(x) != janet_type(y)) return 0;
  ------------------
  |  |  795|   540M|    (isnan((x).number) \
  |  |  796|   540M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   540M|        : JANET_NUMBER)
  ------------------
  |  Branch (37569:9): [True: 528M, False: 12.6M]
  |  Branch (37569:9): [True: 24.4M, False: 516M]
  |  Branch (37569:26): [True: 522M, False: 17.8M]
  ------------------
37570|   516M|    if (janet_checktypes(x, JANET_TFLAG_TUPLE | JANET_TFLAG_STRUCT)) return janet_equals_containers(x, y);
  ------------------
  |  |  969|   516M|#define janet_checktypes(x, tps) ((1 << janet_type(x)) & (tps))
  |  |  ------------------
  |  |  |  |  795|   516M|    (isnan((x).number) \
  |  |  |  |  796|   516M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  |  |  797|   516M|        : JANET_NUMBER)
  |  |  ------------------
  |  |  |  Branch (969:34): [True: 3.90M, False: 512M]
  |  |  ------------------
  ------------------
  |  Branch (37570:9): [True: 503M, False: 12.3M]
  ------------------
37571|   512M|    return janet_equals_leaf(x, y);
37572|   516M|}
janet_hash:
37584|  1.50G|int32_t janet_hash(Janet x) {
37585|  1.50G|    int32_t hash = 0;
37586|  1.50G|    switch (janet_type(x)) {
  ------------------
  |  |  795|  1.50G|    (isnan((x).number) \
  |  |  796|  1.50G|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  1.50G|        : JANET_NUMBER)
  ------------------
  |  Branch (37586:13): [True: 1.38G, False: 123M]
  ------------------
37587|   438M|        case JANET_NIL:
  ------------------
  |  Branch (37587:9): [True: 438M, False: 1.07G]
  ------------------
37588|   438M|            hash = 0;
37589|   438M|            break;
37590|  6.87M|        case JANET_BOOLEAN:
  ------------------
  |  Branch (37590:9): [True: 6.87M, False: 1.50G]
  ------------------
37591|  6.87M|            hash = janet_unwrap_boolean(x);
  ------------------
  |  |  838|  6.87M|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
37592|  6.87M|            break;
37593|  29.9M|        case JANET_STRING:
  ------------------
  |  Branch (37593:9): [True: 29.9M, False: 1.47G]
  ------------------
37594|   518M|        case JANET_SYMBOL:
  ------------------
  |  Branch (37594:9): [True: 488M, False: 1.02G]
  ------------------
37595|   554M|        case JANET_KEYWORD:
  ------------------
  |  Branch (37595:9): [True: 36.5M, False: 1.47G]
  ------------------
37596|   554M|            hash = janet_string_hash(janet_unwrap_string(x));
  ------------------
  |  | 1814|   554M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1812|   554M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
37597|   554M|            break;
37598|   236M|        case JANET_TUPLE:
  ------------------
  |  Branch (37598:9): [True: 236M, False: 1.27G]
  ------------------
37599|   236M|            hash = janet_tuple_hash(janet_unwrap_tuple(x));
  ------------------
  |  | 1803|   236M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1800|   236M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
37600|   236M|            uint32_t inc = (janet_tuple_flag(janet_unwrap_tuple(x)) & JANET_TUPLE_FLAG_BRACKETCTOR) ? 1 : 0;
  ------------------
  |  | 1806|   236M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|   236M|#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|   236M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (37600:28): [True: 16.3M, False: 219M]
  ------------------
37601|   236M|            hash = (int32_t)((uint32_t)hash + inc); /* avoid overflow undefined behavior */
37602|   236M|            break;
37603|   359k|        case JANET_STRUCT:
  ------------------
  |  Branch (37603:9): [True: 359k, False: 1.50G]
  ------------------
37604|   359k|            hash = janet_struct_hash(janet_unwrap_struct(x));
  ------------------
  |  | 1850|   359k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|   359k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37605|   359k|            break;
37606|   123M|        case JANET_NUMBER: {
  ------------------
  |  Branch (37606:9): [True: 123M, False: 1.38G]
  ------------------
37607|   123M|            union {
37608|   123M|                double d;
37609|   123M|                uint64_t u;
37610|   123M|            } as;
37611|   123M|            as.d = janet_unwrap_number(x);
  ------------------
  |  |  839|   123M|#define janet_unwrap_number(x) ((x).number)
  ------------------
37612|   123M|            as.d += 0.0; /* normalize negative 0 */
37613|   123M|            as.u = murmur64(as.u);
37614|   123M|            uint32_t hi = (uint32_t)(as.u >> 32);
37615|   123M|            hash = (int32_t)hi;
37616|   123M|            break;
37617|   518M|        }
37618|  6.29M|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (37618:9): [True: 6.29M, False: 1.50G]
  ------------------
37619|  6.29M|            JanetAbstract xx = janet_unwrap_abstract(x);
  ------------------
  |  |  866|  6.29M|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
37620|  6.29M|            const JanetAbstractType *at = janet_abstract_type(xx);
  ------------------
  |  | 1899|  6.29M|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|  6.29M|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
37621|  6.29M|            if (at->hash != NULL) {
  ------------------
  |  Branch (37621:17): [True: 5.48M, False: 811k]
  ------------------
37622|  5.48M|                hash = at->hash(xx, janet_abstract_size(xx));
  ------------------
  |  | 1900|  5.48M|#define janet_abstract_size(u) (janet_abstract_head(u)->size)
  |  |  ------------------
  |  |  |  | 1897|  5.48M|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
37623|  5.48M|                break;
37624|  5.48M|            }
37625|  6.29M|        }
37626|       |        /* fallthrough */
37627|   144M|        default:
  ------------------
  |  Branch (37627:9): [True: 143M, False: 1.36G]
  ------------------
37628|   144M|            if (sizeof(double) == sizeof(void *)) {
  ------------------
  |  Branch (37628:17): [True: 144M, Folded]
  ------------------
37629|       |                /* Assuming 8 byte pointer (8 byte aligned) */
37630|   144M|                uint64_t i = murmur64(janet_u64(x));
  ------------------
  |  |  788|   144M|#define janet_u64(x) ((x).u64)
  ------------------
37631|   144M|                hash = (int32_t)(i >> 32);
37632|   144M|            } else {
37633|       |                /* Assuming 4 byte pointer (or smaller) */
37634|     81|                uintptr_t diff = (uintptr_t) janet_unwrap_pointer(x);
  ------------------
  |  |  867|     81|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
37635|     81|                uint32_t hilo = (uint32_t) diff * 2654435769u;
37636|     81|                hash = (int32_t)((hilo << 16) | (hilo >> 16));
37637|     81|            }
37638|   144M|            break;
37639|  1.50G|    }
37640|  1.50G|    return hash;
37641|  1.50G|}
janet_compare:
37646|  52.4M|int janet_compare(Janet x, Janet y) {
37647|  52.4M|    janet_vm.traversal = janet_vm.traversal_base;
37648|  52.4M|    int status;
37649|  52.7M|    do {
37650|  52.7M|        JanetType tx = janet_type(x);
  ------------------
  |  |  795|  52.7M|    (isnan((x).number) \
  |  |  796|  52.7M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  52.7M|        : JANET_NUMBER)
  ------------------
  |  Branch (37650:24): [True: 50.5M, False: 2.19M]
  ------------------
37651|  52.7M|        JanetType ty = janet_type(y);
  ------------------
  |  |  795|  52.7M|    (isnan((x).number) \
  |  |  796|  52.7M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  52.7M|        : JANET_NUMBER)
  ------------------
  |  Branch (37651:24): [True: 50.6M, False: 2.12M]
  ------------------
37652|  52.7M|        if (tx != ty) return tx < ty ? -1 : 1;
  ------------------
  |  Branch (37652:13): [True: 1.07M, False: 51.7M]
  |  Branch (37652:30): [True: 941k, False: 130k]
  ------------------
37653|  51.7M|        switch (tx) {
37654|  1.09k|            case JANET_NIL:
  ------------------
  |  Branch (37654:13): [True: 1.09k, False: 51.7M]
  ------------------
37655|  1.09k|                break;
37656|  9.54k|            case JANET_BOOLEAN: {
  ------------------
  |  Branch (37656:13): [True: 9.54k, False: 51.6M]
  ------------------
37657|  9.54k|                int diff = janet_unwrap_boolean(x) - janet_unwrap_boolean(y);
  ------------------
  |  |  838|  9.54k|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
                              int diff = janet_unwrap_boolean(x) - janet_unwrap_boolean(y);
  ------------------
  |  |  838|  9.54k|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
37658|  9.54k|                if (diff) return diff;
  ------------------
  |  Branch (37658:21): [True: 8.66k, False: 886]
  ------------------
37659|    886|                break;
37660|  9.54k|            }
37661|  2.03M|            case JANET_NUMBER: {
  ------------------
  |  Branch (37661:13): [True: 2.03M, False: 49.6M]
  ------------------
37662|  2.03M|                double xx = janet_unwrap_number(x);
  ------------------
  |  |  839|  2.03M|#define janet_unwrap_number(x) ((x).number)
  ------------------
37663|  2.03M|                double yy = janet_unwrap_number(y);
  ------------------
  |  |  839|  2.03M|#define janet_unwrap_number(x) ((x).number)
  ------------------
37664|  2.03M|                if (xx == yy) {
  ------------------
  |  Branch (37664:21): [True: 2.02M, False: 12.6k]
  ------------------
37665|  2.02M|                    break;
37666|  2.02M|                } else {
37667|  12.6k|                    return (xx < yy) ? -1 : 1;
  ------------------
  |  Branch (37667:28): [True: 10.8k, False: 1.72k]
  ------------------
37668|  12.6k|                }
37669|  2.03M|            }
37670|  2.55k|            case JANET_STRING:
  ------------------
  |  Branch (37670:13): [True: 2.55k, False: 51.7M]
  ------------------
37671|  48.8M|            case JANET_SYMBOL:
  ------------------
  |  Branch (37671:13): [True: 48.8M, False: 2.86M]
  ------------------
37672|  48.8M|            case JANET_KEYWORD: {
  ------------------
  |  Branch (37672:13): [True: 30.4k, False: 51.6M]
  ------------------
37673|  48.8M|                int diff = janet_string_compare(janet_unwrap_string(x), janet_unwrap_string(y));
  ------------------
  |  |  863|  48.8M|#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|  48.8M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
37674|  48.8M|                if (diff) return diff;
  ------------------
  |  Branch (37674:21): [True: 42.7M, False: 6.07M]
  ------------------
37675|  6.07M|                break;
37676|  48.8M|            }
37677|  6.07M|            case JANET_ABSTRACT: {
  ------------------
  |  Branch (37677:13): [True: 2.53k, False: 51.7M]
  ------------------
37678|  2.53k|                int diff = janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y));
  ------------------
  |  |  866|  2.53k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
                              int diff = janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y));
  ------------------
  |  |  866|  2.53k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
37679|  2.53k|                if (diff) return diff;
  ------------------
  |  Branch (37679:21): [True: 979, False: 1.55k]
  ------------------
37680|  1.55k|                break;
37681|  2.53k|            }
37682|   652k|            default: {
  ------------------
  |  Branch (37682:13): [True: 652k, False: 51.0M]
  ------------------
37683|   652k|                if (janet_unwrap_pointer(x) == janet_unwrap_pointer(y)) {
  ------------------
  |  |  867|   652k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
                              if (janet_unwrap_pointer(x) == janet_unwrap_pointer(y)) {
  ------------------
  |  |  867|   652k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (37683:21): [True: 2.85k, False: 649k]
  ------------------
37684|  2.85k|                    break;
37685|   649k|                } else {
37686|   649k|                    return janet_unwrap_pointer(x) > janet_unwrap_pointer(y) ? 1 : -1;
  ------------------
  |  |  867|   649k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
                                  return janet_unwrap_pointer(x) > janet_unwrap_pointer(y) ? 1 : -1;
  ------------------
  |  |  867|   649k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (37686:28): [True: 7.75k, False: 641k]
  ------------------
37687|   649k|                }
37688|   652k|            }
37689|   129k|            case JANET_TUPLE: {
  ------------------
  |  Branch (37689:13): [True: 129k, False: 51.5M]
  ------------------
37690|   129k|                const Janet *lhs = janet_unwrap_tuple(x);
  ------------------
  |  |  858|   129k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
37691|   129k|                const Janet *rhs = janet_unwrap_tuple(y);
  ------------------
  |  |  858|   129k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
37692|   129k|                if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(lhs) ^ janet_tuple_flag(rhs))) {
  ------------------
  |  | 1798|   129k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
                              if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(lhs) ^ janet_tuple_flag(rhs))) {
  ------------------
  |  | 1806|   129k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|   129k|#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|   129k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|   129k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37692:21): [True: 144, False: 129k]
  ------------------
37693|    144|                    return (janet_tuple_flag(lhs) & JANET_TUPLE_FLAG_BRACKETCTOR) ? 1 : -1;
  ------------------
  |  | 1806|    144|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|    144|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                                  return (janet_tuple_flag(lhs) & JANET_TUPLE_FLAG_BRACKETCTOR) ? 1 : -1;
  ------------------
  |  | 1798|    144|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (37693:28): [True: 8, False: 136]
  ------------------
37694|    144|                }
37695|   129k|                push_traversal_node(janet_tuple_head(lhs), janet_tuple_head(rhs), 1);
  ------------------
  |  | 1800|   129k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
                              push_traversal_node(janet_tuple_head(lhs), janet_tuple_head(rhs), 1);
  ------------------
  |  | 1800|   129k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
37696|   129k|                break;
37697|   129k|            }
37698|    592|            case JANET_STRUCT: {
  ------------------
  |  Branch (37698:13): [True: 592, False: 51.7M]
  ------------------
37699|    592|                const JanetKV *lhs = janet_unwrap_struct(x);
  ------------------
  |  |  857|    592|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
37700|    592|                const JanetKV *rhs = janet_unwrap_struct(y);
  ------------------
  |  |  857|    592|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
37701|    592|                int32_t llen = janet_struct_capacity(lhs);
  ------------------
  |  | 1849|    592|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|    592|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37702|    592|                int32_t rlen = janet_struct_capacity(rhs);
  ------------------
  |  | 1849|    592|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|    592|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37703|    592|                int32_t lhash = janet_struct_hash(lhs);
  ------------------
  |  | 1850|    592|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|    592|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37704|    592|                int32_t rhash = janet_struct_hash(rhs);
  ------------------
  |  | 1850|    592|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|    592|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37705|    592|                if (llen < rlen) return -1;
  ------------------
  |  Branch (37705:21): [True: 21, False: 571]
  ------------------
37706|    571|                if (llen > rlen) return 1;
  ------------------
  |  Branch (37706:21): [True: 10, False: 561]
  ------------------
37707|    561|                if (lhash < rhash) return -1;
  ------------------
  |  Branch (37707:21): [True: 47, False: 514]
  ------------------
37708|    514|                if (lhash > rhash) return 1;
  ------------------
  |  Branch (37708:21): [True: 35, False: 479]
  ------------------
37709|    479|                push_traversal_node(janet_struct_head(lhs), janet_struct_head(rhs), 0);
  ------------------
  |  | 1846|    479|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
                              push_traversal_node(janet_struct_head(lhs), janet_struct_head(rhs), 0);
  ------------------
  |  | 1846|    479|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
37710|    479|                break;
37711|    514|            }
37712|  51.7M|        }
37713|  51.7M|    } while (!(status = traversal_next(&x, &y)));
  ------------------
  |  Branch (37713:14): [True: 286k, False: 7.95M]
  ------------------
37714|  7.95M|    return status - 2;
37715|  52.4M|}
janet_in:
37728|  46.1M|Janet janet_in(Janet ds, Janet key) {
37729|  46.1M|    Janet value;
37730|  46.1M|    JanetType type = janet_type(ds);
  ------------------
  |  |  795|  46.1M|    (isnan((x).number) \
  |  |  796|  46.1M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  46.1M|        : JANET_NUMBER)
  ------------------
  |  Branch (37730:22): [True: 46.1M, False: 2]
  ------------------
37731|  46.1M|    switch (type) {
37732|     13|        default:
  ------------------
  |  Branch (37732:9): [True: 13, False: 46.1M]
  ------------------
37733|     13|            janet_panicf("expected %T, got %v", JANET_TFLAG_LENGTHABLE, ds);
  ------------------
  |  |  615|     13|#define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  612|     13|#define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  599|     13|#define JANET_TFLAG_STRING (1 << JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  600|     13|#define JANET_TFLAG_SYMBOL (1 << JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  606|     13|#define JANET_TFLAG_BUFFER (1 << JANET_BUFFER)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  601|     13|#define JANET_TFLAG_KEYWORD (1 << JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  613|     13|#define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  602|     13|#define JANET_TFLAG_ARRAY (1 << JANET_ARRAY)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  603|     13|#define JANET_TFLAG_TUPLE (1 << JANET_TUPLE)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  614|     13|#define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|     13|#define JANET_TFLAG_TABLE (1 << JANET_TABLE)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  605|     13|#define JANET_TFLAG_STRUCT (1 << JANET_STRUCT)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37734|      0|            break;
37735|      0|        case JANET_STRUCT:
  ------------------
  |  Branch (37735:9): [True: 0, False: 46.1M]
  ------------------
37736|      0|            value = janet_struct_get(janet_unwrap_struct(ds), key);
  ------------------
  |  |  857|      0|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
37737|      0|            break;
37738|  40.1M|        case JANET_TABLE:
  ------------------
  |  Branch (37738:9): [True: 40.1M, False: 5.97M]
  ------------------
37739|  40.1M|            value = janet_table_get(janet_unwrap_table(ds), key);
  ------------------
  |  |  861|  40.1M|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
37740|  40.1M|            break;
37741|   157k|        case JANET_ARRAY: {
  ------------------
  |  Branch (37741:9): [True: 157k, False: 45.9M]
  ------------------
37742|   157k|            JanetArray *array = janet_unwrap_array(ds);
  ------------------
  |  |  860|   157k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
37743|   157k|            int32_t index = getter_checkint(type, key, array->count);
37744|   157k|            value = array->data[index];
37745|   157k|            break;
37746|      0|        }
37747|  1.16M|        case JANET_TUPLE: {
  ------------------
  |  Branch (37747:9): [True: 1.16M, False: 44.9M]
  ------------------
37748|  1.16M|            const Janet *tuple = janet_unwrap_tuple(ds);
  ------------------
  |  |  858|  1.16M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
37749|  1.16M|            int32_t len = janet_tuple_length(tuple);
  ------------------
  |  | 1802|  1.16M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  1.16M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
37750|  1.16M|            value = tuple[getter_checkint(type, key, len)];
37751|  1.16M|            break;
37752|      0|        }
37753|  71.6k|        case JANET_BUFFER: {
  ------------------
  |  Branch (37753:9): [True: 71.6k, False: 46.0M]
  ------------------
37754|  71.6k|            JanetBuffer *buffer = janet_unwrap_buffer(ds);
  ------------------
  |  |  862|  71.6k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
37755|  71.6k|            int32_t index = getter_checkint(type, key, buffer->count);
37756|  71.6k|            value = janet_wrap_integer(buffer->data[index]);
  ------------------
  |  |  967|  71.6k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  71.6k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
37757|  71.6k|            break;
37758|      0|        }
37759|   218k|        case JANET_STRING:
  ------------------
  |  Branch (37759:9): [True: 218k, False: 45.9M]
  ------------------
37760|   769k|        case JANET_SYMBOL:
  ------------------
  |  Branch (37760:9): [True: 550k, False: 45.5M]
  ------------------
37761|   781k|        case JANET_KEYWORD: {
  ------------------
  |  Branch (37761:9): [True: 11.5k, False: 46.1M]
  ------------------
37762|   781k|            const uint8_t *str = janet_unwrap_string(ds);
  ------------------
  |  |  863|   781k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
37763|   781k|            int32_t index = getter_checkint(type, key, janet_string_length(str));
  ------------------
  |  | 1813|   781k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|   781k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
37764|   781k|            value = janet_wrap_integer(str[index]);
  ------------------
  |  |  967|   781k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|   781k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
37765|   781k|            break;
37766|   769k|        }
37767|  3.77M|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (37767:9): [True: 3.77M, False: 42.3M]
  ------------------
37768|  3.77M|            JanetAbstractType *type = (JanetAbstractType *)janet_abstract_type(janet_unwrap_abstract(ds));
  ------------------
  |  | 1899|  3.77M|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|  3.77M|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
37769|  3.77M|            if (type->get) {
  ------------------
  |  Branch (37769:17): [True: 3.77M, False: 0]
  ------------------
37770|  3.77M|                if (!(type->get)(janet_unwrap_abstract(ds), key, &value))
  ------------------
  |  |  866|  3.77M|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (37770:21): [True: 16, False: 3.77M]
  ------------------
37771|     16|                    janet_panicf("key %v not found in %v ", key, ds);
37772|  3.77M|            } else {
37773|      0|                janet_panicf("no getter for %v", ds);
37774|      0|            }
37775|  3.77M|            break;
37776|  3.77M|        }
37777|  3.77M|        case JANET_FIBER: {
  ------------------
  |  Branch (37777:9): [True: 16.0k, False: 46.1M]
  ------------------
37778|       |            /* Bit of a hack to allow iterating over fibers. */
37779|  16.0k|            if (janet_equals(key, janet_wrap_integer(0))) {
  ------------------
  |  |  967|  16.0k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  16.0k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
  |  Branch (37779:17): [True: 16.0k, False: 1]
  ------------------
37780|  16.0k|                return janet_unwrap_fiber(ds)->last_value;
  ------------------
  |  |  859|  16.0k|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
37781|  16.0k|            } else {
37782|      1|                janet_panicf("expected key 0, got %v", key);
37783|      1|            }
37784|  16.0k|        }
37785|  46.1M|    }
37786|  46.1M|    return value;
37787|  46.1M|}
janet_get:
37789|   109M|Janet janet_get(Janet ds, Janet key) {
37790|   109M|    JanetType t = janet_type(ds);
  ------------------
  |  |  795|   109M|    (isnan((x).number) \
  |  |  796|   109M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   109M|        : JANET_NUMBER)
  ------------------
  |  Branch (37790:19): [True: 108M, False: 519k]
  ------------------
37791|   109M|    switch (t) {
37792|  1.15M|        default:
  ------------------
  |  Branch (37792:9): [True: 1.15M, False: 107M]
  ------------------
37793|  1.15M|            return janet_wrap_nil();
  ------------------
  |  |  831|  1.15M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.15M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.15M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.15M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37794|  91.2M|        case JANET_STRING:
  ------------------
  |  Branch (37794:9): [True: 91.2M, False: 17.8M]
  ------------------
37795|  91.2M|        case JANET_SYMBOL:
  ------------------
  |  Branch (37795:9): [True: 1.04k, False: 109M]
  ------------------
37796|  91.2M|        case JANET_KEYWORD: {
  ------------------
  |  Branch (37796:9): [True: 102, False: 109M]
  ------------------
37797|  91.2M|            if (!janet_checkint(key)) return janet_wrap_nil();
  ------------------
  |  |  831|    642|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    642|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    642|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    642|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (37797:17): [True: 642, False: 91.2M]
  ------------------
37798|  91.2M|            int32_t index = janet_unwrap_integer(key);
  ------------------
  |  |  966|  91.2M|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|  91.2M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
37799|  91.2M|            if (index < 0) 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (37799:17): [True: 27, False: 91.2M]
  ------------------
37800|  91.2M|            const uint8_t *str = janet_unwrap_string(ds);
  ------------------
  |  |  863|  91.2M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
37801|  91.2M|            if (index >= janet_string_length(str)) return janet_wrap_nil();
  ------------------
  |  | 1813|  91.2M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  91.2M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
                          if (index >= janet_string_length(str)) return janet_wrap_nil();
  ------------------
  |  |  831|   730k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   730k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   730k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   730k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (37801:17): [True: 730k, False: 90.5M]
  ------------------
37802|  90.5M|            return janet_wrap_integer(str[index]);
  ------------------
  |  |  967|  90.5M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  90.5M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
37803|  91.2M|        }
37804|  4.84M|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (37804:9): [True: 4.84M, False: 104M]
  ------------------
37805|  4.84M|            Janet value;
37806|  4.84M|            void *abst = janet_unwrap_abstract(ds);
  ------------------
  |  |  866|  4.84M|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
37807|  4.84M|            JanetAbstractType *type = (JanetAbstractType *)janet_abstract_type(abst);
  ------------------
  |  | 1899|  4.84M|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|  4.84M|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
37808|  4.84M|            if (!type->get) return janet_wrap_nil();
  ------------------
  |  |  831|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (37808:17): [True: 1, False: 4.84M]
  ------------------
37809|  4.84M|            if ((type->get)(abst, key, &value))
  ------------------
  |  Branch (37809:17): [True: 4.84M, False: 15]
  ------------------
37810|  4.84M|                return value;
37811|     15|            return janet_wrap_nil();
  ------------------
  |  |  831|     15|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     15|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     15|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     15|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37812|  4.84M|        }
37813|      2|        case JANET_ARRAY:
  ------------------
  |  Branch (37813:9): [True: 2, False: 109M]
  ------------------
37814|  3.30k|        case JANET_TUPLE:
  ------------------
  |  Branch (37814:9): [True: 3.29k, False: 109M]
  ------------------
37815|  11.8M|        case JANET_BUFFER: {
  ------------------
  |  Branch (37815:9): [True: 11.8M, False: 97.3M]
  ------------------
37816|  11.8M|            if (!janet_checkint(key)) return janet_wrap_nil();
  ------------------
  |  |  831|    103|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    103|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    103|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    103|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (37816:17): [True: 103, False: 11.8M]
  ------------------
37817|  11.8M|            int32_t index = janet_unwrap_integer(key);
  ------------------
  |  |  966|  11.8M|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|  11.8M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
37818|  11.8M|            if (index < 0) return janet_wrap_nil();
  ------------------
  |  |  831|      3|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      3|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (37818:17): [True: 3, False: 11.8M]
  ------------------
37819|  11.8M|            if (t == JANET_ARRAY) {
  ------------------
  |  Branch (37819:17): [True: 0, False: 11.8M]
  ------------------
37820|      0|                JanetArray *a = janet_unwrap_array(ds);
  ------------------
  |  |  860|      0|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
37821|      0|                if (index >= a->count) 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 (37821:21): [True: 0, False: 0]
  ------------------
37822|      0|                return a->data[index];
37823|  11.8M|            } else if (t == JANET_BUFFER) {
  ------------------
  |  Branch (37823:24): [True: 11.8M, False: 3.19k]
  ------------------
37824|  11.8M|                JanetBuffer *b = janet_unwrap_buffer(ds);
  ------------------
  |  |  862|  11.8M|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
37825|  11.8M|                if (index >= b->count) return janet_wrap_nil();
  ------------------
  |  |  831|   742k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   742k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   742k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   742k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (37825:21): [True: 742k, False: 11.0M]
  ------------------
37826|  11.0M|                return janet_wrap_integer(b->data[index]);
  ------------------
  |  |  967|  11.0M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  11.0M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
37827|  11.8M|            } else {
37828|  3.19k|                const Janet *t = janet_unwrap_tuple(ds);
  ------------------
  |  |  858|  3.19k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
37829|  3.19k|                if (index >= janet_tuple_length(t)) return janet_wrap_nil();
  ------------------
  |  | 1802|  3.19k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  3.19k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                              if (index >= janet_tuple_length(t)) return janet_wrap_nil();
  ------------------
  |  |  831|  3.19k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  3.19k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.19k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.19k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (37829:21): [True: 3.19k, False: 0]
  ------------------
37830|      0|                return t[index];
37831|  3.19k|            }
37832|  11.8M|        }
37833|      1|        case JANET_TABLE: {
  ------------------
  |  Branch (37833:9): [True: 1, False: 109M]
  ------------------
37834|      1|            return janet_table_get(janet_unwrap_table(ds), key);
  ------------------
  |  |  861|      1|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
37835|  11.8M|        }
37836|      0|        case JANET_STRUCT: {
  ------------------
  |  Branch (37836:9): [True: 0, False: 109M]
  ------------------
37837|      0|            const JanetKV *st = janet_unwrap_struct(ds);
  ------------------
  |  |  857|      0|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
37838|      0|            return janet_struct_get(st, key);
37839|  11.8M|        }
37840|     40|        case JANET_FIBER: {
  ------------------
  |  Branch (37840:9): [True: 40, False: 109M]
  ------------------
37841|       |            /* Bit of a hack to allow iterating over fibers. */
37842|     40|            if (janet_equals(key, janet_wrap_integer(0))) {
  ------------------
  |  |  967|     40|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|     40|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
  |  Branch (37842:17): [True: 0, False: 40]
  ------------------
37843|      0|                return janet_unwrap_fiber(ds)->last_value;
  ------------------
  |  |  859|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
37844|     40|            } else {
37845|     40|                return janet_wrap_nil();
  ------------------
  |  |  831|     40|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     40|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     40|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     40|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37846|     40|            }
37847|     40|        }
37848|   109M|    }
37849|   109M|}
janet_getindex:
37851|    345|Janet janet_getindex(Janet ds, int32_t index) {
37852|    345|    Janet value;
37853|    345|    if (index < 0) janet_panic("expected non-negative index");
  ------------------
  |  Branch (37853:9): [True: 0, False: 345]
  ------------------
37854|    345|    switch (janet_type(ds)) {
  ------------------
  |  |  795|    345|    (isnan((x).number) \
  |  |  796|    345|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|    345|        : JANET_NUMBER)
  ------------------
  |  Branch (37854:13): [True: 294, False: 51]
  ------------------
37855|     78|        default:
  ------------------
  |  Branch (37855:9): [True: 78, False: 267]
  ------------------
37856|     78|            janet_panicf("expected %T, got %v", JANET_TFLAG_LENGTHABLE, ds);
  ------------------
  |  |  615|     78|#define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  612|     78|#define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  599|     78|#define JANET_TFLAG_STRING (1 << JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  600|     78|#define JANET_TFLAG_SYMBOL (1 << JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  606|     78|#define JANET_TFLAG_BUFFER (1 << JANET_BUFFER)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  601|     78|#define JANET_TFLAG_KEYWORD (1 << JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  613|     78|#define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  602|     78|#define JANET_TFLAG_ARRAY (1 << JANET_ARRAY)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  603|     78|#define JANET_TFLAG_TUPLE (1 << JANET_TUPLE)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  614|     78|#define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|     78|#define JANET_TFLAG_TABLE (1 << JANET_TABLE)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  605|     78|#define JANET_TFLAG_STRUCT (1 << JANET_STRUCT)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37857|      0|            break;
37858|     72|        case JANET_STRING:
  ------------------
  |  Branch (37858:9): [True: 72, False: 273]
  ------------------
37859|    133|        case JANET_SYMBOL:
  ------------------
  |  Branch (37859:9): [True: 61, False: 284]
  ------------------
37860|    225|        case JANET_KEYWORD:
  ------------------
  |  Branch (37860:9): [True: 92, False: 253]
  ------------------
37861|    225|            if (index >= janet_string_length(janet_unwrap_string(ds))) {
  ------------------
  |  | 1813|    225|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|    225|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37861:17): [True: 99, False: 126]
  ------------------
37862|     99|                value = janet_wrap_nil();
  ------------------
  |  |  831|     99|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37863|    126|            } else {
37864|    126|                value = janet_wrap_integer(janet_unwrap_string(ds)[index]);
  ------------------
  |  |  967|    126|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|    126|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
37865|    126|            }
37866|    225|            break;
37867|      0|        case JANET_ARRAY:
  ------------------
  |  Branch (37867:9): [True: 0, False: 345]
  ------------------
37868|      0|            if (index >= janet_unwrap_array(ds)->count) {
  ------------------
  |  |  860|      0|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (37868:17): [True: 0, False: 0]
  ------------------
37869|      0|                value = 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37870|      0|            } else {
37871|      0|                value = janet_unwrap_array(ds)->data[index];
  ------------------
  |  |  860|      0|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
37872|      0|            }
37873|      0|            break;
37874|     15|        case JANET_BUFFER:
  ------------------
  |  Branch (37874:9): [True: 15, False: 330]
  ------------------
37875|     15|            if (index >= janet_unwrap_buffer(ds)->count) {
  ------------------
  |  |  862|     15|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (37875:17): [True: 6, False: 9]
  ------------------
37876|      6|                value = janet_wrap_nil();
  ------------------
  |  |  831|      6|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      6|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      6|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      6|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37877|      9|            } else {
37878|      9|                value = janet_wrap_integer(janet_unwrap_buffer(ds)->data[index]);
  ------------------
  |  |  967|      9|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|      9|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
37879|      9|            }
37880|     15|            break;
37881|      0|        case JANET_TUPLE:
  ------------------
  |  Branch (37881:9): [True: 0, False: 345]
  ------------------
37882|      0|            if (index >= janet_tuple_length(janet_unwrap_tuple(ds))) {
  ------------------
  |  | 1802|      0|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|      0|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37882:17): [True: 0, False: 0]
  ------------------
37883|      0|                value = 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37884|      0|            } else {
37885|      0|                value = janet_unwrap_tuple(ds)[index];
  ------------------
  |  |  858|      0|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
37886|      0|            }
37887|      0|            break;
37888|      0|        case JANET_TABLE:
  ------------------
  |  Branch (37888:9): [True: 0, False: 345]
  ------------------
37889|      0|            value = janet_table_get(janet_unwrap_table(ds), janet_wrap_integer(index));
  ------------------
  |  |  861|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
                          value = janet_table_get(janet_unwrap_table(ds), janet_wrap_integer(index));
  ------------------
  |  |  967|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
37890|      0|            break;
37891|     12|        case JANET_STRUCT:
  ------------------
  |  Branch (37891:9): [True: 12, False: 333]
  ------------------
37892|     12|            value = janet_struct_get(janet_unwrap_struct(ds), janet_wrap_integer(index));
  ------------------
  |  |  857|     12|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
                          value = janet_struct_get(janet_unwrap_struct(ds), janet_wrap_integer(index));
  ------------------
  |  |  967|     12|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|     12|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
37893|     12|            break;
37894|     11|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (37894:9): [True: 11, False: 334]
  ------------------
37895|     11|            JanetAbstractType *type = (JanetAbstractType *)janet_abstract_type(janet_unwrap_abstract(ds));
  ------------------
  |  | 1899|     11|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|     11|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
37896|     11|            if (type->get) {
  ------------------
  |  Branch (37896:17): [True: 11, False: 0]
  ------------------
37897|     11|                if (!(type->get)(janet_unwrap_abstract(ds), janet_wrap_integer(index), &value))
  ------------------
  |  |  866|     11|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
                              if (!(type->get)(janet_unwrap_abstract(ds), janet_wrap_integer(index), &value))
  ------------------
  |  |  967|     11|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|     11|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
  |  Branch (37897:21): [True: 11, False: 0]
  ------------------
37898|     11|                    value = janet_wrap_nil();
  ------------------
  |  |  831|     11|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     11|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     11|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     11|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37899|     11|            } else {
37900|      0|                janet_panicf("no getter for %v", ds);
37901|      0|            }
37902|     11|            break;
37903|     11|        }
37904|     11|        case JANET_FIBER: {
  ------------------
  |  Branch (37904:9): [True: 4, False: 341]
  ------------------
37905|      4|            if (index == 0) {
  ------------------
  |  Branch (37905:17): [True: 2, False: 2]
  ------------------
37906|      2|                value = janet_unwrap_fiber(ds)->last_value;
  ------------------
  |  |  859|      2|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
37907|      2|            } else {
37908|      2|                value = janet_wrap_nil();
  ------------------
  |  |  831|      2|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      2|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37909|      2|            }
37910|      4|            break;
37911|     11|        }
37912|    345|    }
37913|    267|    return value;
37914|    345|}
janet_length:
37916|  17.0M|int32_t janet_length(Janet x) {
37917|  17.0M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  17.0M|    (isnan((x).number) \
  |  |  796|  17.0M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  17.0M|        : JANET_NUMBER)
  ------------------
  |  Branch (37917:13): [True: 17.0M, False: 0]
  ------------------
37918|      0|        default:
  ------------------
  |  Branch (37918:9): [True: 0, False: 17.0M]
  ------------------
37919|      0|            janet_panicf("expected %T, got %v", JANET_TFLAG_LENGTHABLE, x);
  ------------------
  |  |  615|      0|#define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  613|      0|#define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  602|      0|#define JANET_TFLAG_ARRAY (1 << JANET_ARRAY)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  603|      0|#define JANET_TFLAG_TUPLE (1 << JANET_TUPLE)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  614|      0|#define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|#define JANET_TFLAG_TABLE (1 << JANET_TABLE)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  605|      0|#define JANET_TFLAG_STRUCT (1 << JANET_STRUCT)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37920|   365k|        case JANET_STRING:
  ------------------
  |  Branch (37920:9): [True: 365k, False: 16.6M]
  ------------------
37921|   376k|        case JANET_SYMBOL:
  ------------------
  |  Branch (37921:9): [True: 10.1k, False: 17.0M]
  ------------------
37922|   377k|        case JANET_KEYWORD:
  ------------------
  |  Branch (37922:9): [True: 1.49k, False: 17.0M]
  ------------------
37923|   377k|            return janet_string_length(janet_unwrap_string(x));
  ------------------
  |  | 1813|   377k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|   377k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
37924|  2.64M|        case JANET_ARRAY:
  ------------------
  |  Branch (37924:9): [True: 2.64M, False: 14.3M]
  ------------------
37925|  2.64M|            return janet_unwrap_array(x)->count;
  ------------------
  |  |  860|  2.64M|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
37926|    293|        case JANET_BUFFER:
  ------------------
  |  Branch (37926:9): [True: 293, False: 17.0M]
  ------------------
37927|    293|            return janet_unwrap_buffer(x)->count;
  ------------------
  |  |  862|    293|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
37928|  14.0M|        case JANET_TUPLE:
  ------------------
  |  Branch (37928:9): [True: 14.0M, False: 3.02M]
  ------------------
37929|  14.0M|            return janet_tuple_length(janet_unwrap_tuple(x));
  ------------------
  |  | 1802|  14.0M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  14.0M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
37930|      0|        case JANET_STRUCT:
  ------------------
  |  Branch (37930:9): [True: 0, False: 17.0M]
  ------------------
37931|      0|            return janet_struct_length(janet_unwrap_struct(x));
  ------------------
  |  | 1848|      0|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|      0|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
37932|      0|        case JANET_TABLE:
  ------------------
  |  Branch (37932:9): [True: 0, False: 17.0M]
  ------------------
37933|      0|            return janet_unwrap_table(x)->count;
  ------------------
  |  |  861|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
37934|      0|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (37934:9): [True: 0, False: 17.0M]
  ------------------
37935|      0|            void *abst = janet_unwrap_abstract(x);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
37936|      0|            const JanetAbstractType *type = 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)))
  |  |  ------------------
  ------------------
37937|      0|            if (type->length != NULL) {
  ------------------
  |  Branch (37937:17): [True: 0, False: 0]
  ------------------
37938|      0|                size_t len = type->length(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)))
  |  |  ------------------
  ------------------
37939|      0|                if (len > INT32_MAX) {
  ------------------
  |  Branch (37939:21): [True: 0, False: 0]
  ------------------
37940|      0|                    janet_panicf("invalid integer length %u", len);
37941|      0|                }
37942|      0|                return (int32_t)(len);
37943|      0|            }
37944|      0|            Janet argv[1] = { x };
37945|      0|            Janet len = janet_mcall("length", 1, argv);
37946|      0|            if (!janet_checkint(len))
  ------------------
  |  Branch (37946:17): [True: 0, False: 0]
  ------------------
37947|      0|                janet_panicf("invalid integer length %v", len);
37948|      0|            return janet_unwrap_integer(len);
  ------------------
  |  |  966|      0|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
37949|      0|        }
37950|  17.0M|    }
37951|  17.0M|}
janet_lengthv:
37953|  50.7M|Janet janet_lengthv(Janet x) {
37954|  50.7M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  50.7M|    (isnan((x).number) \
  |  |  796|  50.7M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  50.7M|        : JANET_NUMBER)
  ------------------
  |  Branch (37954:13): [True: 50.7M, False: 0]
  ------------------
37955|      0|        default:
  ------------------
  |  Branch (37955:9): [True: 0, False: 50.7M]
  ------------------
37956|      0|            janet_panicf("expected %T, got %v", JANET_TFLAG_LENGTHABLE, x);
  ------------------
  |  |  615|      0|#define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  613|      0|#define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  602|      0|#define JANET_TFLAG_ARRAY (1 << JANET_ARRAY)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  603|      0|#define JANET_TFLAG_TUPLE (1 << JANET_TUPLE)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  614|      0|#define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|#define JANET_TFLAG_TABLE (1 << JANET_TABLE)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  605|      0|#define JANET_TFLAG_STRUCT (1 << JANET_STRUCT)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37957|   852k|        case JANET_STRING:
  ------------------
  |  Branch (37957:9): [True: 852k, False: 49.9M]
  ------------------
37958|   852k|        case JANET_SYMBOL:
  ------------------
  |  Branch (37958:9): [True: 329, False: 50.7M]
  ------------------
37959|   853k|        case JANET_KEYWORD:
  ------------------
  |  Branch (37959:9): [True: 65, False: 50.7M]
  ------------------
37960|   853k|            return janet_wrap_integer(janet_string_length(janet_unwrap_string(x)));
  ------------------
  |  |  967|   853k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|   853k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
37961|   871k|        case JANET_ARRAY:
  ------------------
  |  Branch (37961:9): [True: 871k, False: 49.8M]
  ------------------
37962|   871k|            return janet_wrap_integer(janet_unwrap_array(x)->count);
  ------------------
  |  |  967|   871k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|   871k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
37963|  6.44M|        case JANET_BUFFER:
  ------------------
  |  Branch (37963:9): [True: 6.44M, False: 44.3M]
  ------------------
37964|  6.44M|            return janet_wrap_integer(janet_unwrap_buffer(x)->count);
  ------------------
  |  |  967|  6.44M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  6.44M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
37965|  42.2M|        case JANET_TUPLE:
  ------------------
  |  Branch (37965:9): [True: 42.2M, False: 8.52M]
  ------------------
37966|  42.2M|            return janet_wrap_integer(janet_tuple_length(janet_unwrap_tuple(x)));
  ------------------
  |  |  967|  42.2M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  42.2M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
37967|  28.7k|        case JANET_STRUCT:
  ------------------
  |  Branch (37967:9): [True: 28.7k, False: 50.7M]
  ------------------
37968|  28.7k|            return janet_wrap_integer(janet_struct_length(janet_unwrap_struct(x)));
  ------------------
  |  |  967|  28.7k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  28.7k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
37969|   329k|        case JANET_TABLE:
  ------------------
  |  Branch (37969:9): [True: 329k, False: 50.4M]
  ------------------
37970|   329k|            return janet_wrap_integer(janet_unwrap_table(x)->count);
  ------------------
  |  |  967|   329k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|   329k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
37971|      0|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (37971:9): [True: 0, False: 50.7M]
  ------------------
37972|      0|            void *abst = janet_unwrap_abstract(x);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
37973|      0|            const JanetAbstractType *type = 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)))
  |  |  ------------------
  ------------------
37974|      0|            if (type->length != NULL) {
  ------------------
  |  Branch (37974:17): [True: 0, False: 0]
  ------------------
37975|      0|                size_t len = type->length(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)))
  |  |  ------------------
  ------------------
37976|       |                /* If len is always less then double, we can never overflow */
37977|       |#ifdef JANET_32
37978|       |                return janet_wrap_number(len);
37979|       |#else
37980|      0|                if (len < (size_t) JANET_INTMAX_INT64) {
  ------------------
  |  |  167|      0|#define JANET_INTMAX_INT64 9007199254740992
  ------------------
  |  Branch (37980:21): [True: 0, False: 0]
  ------------------
37981|      0|                    return janet_wrap_number((double) len);
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
37982|      0|                } else {
37983|      0|                    janet_panicf("integer length %u too large", len);
37984|      0|                }
37985|      0|#endif
37986|      0|            }
37987|      0|            Janet argv[1] = { x };
37988|      0|            return janet_mcall("length", 1, argv);
37989|      0|        }
37990|  50.7M|    }
37991|  50.7M|}
janet_putindex:
37993|      5|void janet_putindex(Janet ds, int32_t index, Janet value) {
37994|      5|    switch (janet_type(ds)) {
  ------------------
  |  |  795|      5|    (isnan((x).number) \
  |  |  796|      5|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|      5|        : JANET_NUMBER)
  ------------------
  |  Branch (37994:13): [True: 4, False: 1]
  ------------------
37995|      4|        default:
  ------------------
  |  Branch (37995:9): [True: 4, False: 1]
  ------------------
37996|      4|            janet_panicf("expected %T, got %v",
37997|      4|                         JANET_TFLAG_ARRAY | JANET_TFLAG_BUFFER | JANET_TFLAG_TABLE, ds);
  ------------------
  |  |  602|      4|#define JANET_TFLAG_ARRAY (1 << JANET_ARRAY)
  ------------------
                                       JANET_TFLAG_ARRAY | JANET_TFLAG_BUFFER | JANET_TFLAG_TABLE, ds);
  ------------------
  |  |  606|      4|#define JANET_TFLAG_BUFFER (1 << JANET_BUFFER)
  ------------------
                                       JANET_TFLAG_ARRAY | JANET_TFLAG_BUFFER | JANET_TFLAG_TABLE, ds);
  ------------------
  |  |  604|      4|#define JANET_TFLAG_TABLE (1 << JANET_TABLE)
  ------------------
37998|      0|        case JANET_ARRAY: {
  ------------------
  |  Branch (37998:9): [True: 0, False: 5]
  ------------------
37999|      0|            JanetArray *array = janet_unwrap_array(ds);
  ------------------
  |  |  860|      0|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
38000|      0|            if (index >= array->count) {
  ------------------
  |  Branch (38000:17): [True: 0, False: 0]
  ------------------
38001|      0|                janet_array_ensure(array, index + 1, 2);
38002|      0|                for (int32_t i = array->count; i < index + 1; i++) {
  ------------------
  |  Branch (38002:48): [True: 0, False: 0]
  ------------------
38003|      0|                    array->data[i] = 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
38004|      0|                }
38005|      0|                array->count = index + 1;
38006|      0|            }
38007|      0|            array->data[index] = value;
38008|      0|            break;
38009|      0|        }
38010|      0|        case JANET_BUFFER: {
  ------------------
  |  Branch (38010:9): [True: 0, False: 5]
  ------------------
38011|      0|            JanetBuffer *buffer = janet_unwrap_buffer(ds);
  ------------------
  |  |  862|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
38012|      0|            if (!janet_checkint(value))
  ------------------
  |  Branch (38012:17): [True: 0, False: 0]
  ------------------
38013|      0|                janet_panicf("can only put integers in buffers, got %v", value);
38014|      0|            if (index >= buffer->count) {
  ------------------
  |  Branch (38014:17): [True: 0, False: 0]
  ------------------
38015|      0|                janet_buffer_ensure(buffer, index + 1, 2);
38016|      0|                memset(buffer->data + buffer->count, 0, index + 1 - buffer->count);
38017|      0|                buffer->count = index + 1;
38018|      0|            }
38019|      0|            buffer->data[index] = (uint8_t)(janet_unwrap_integer(value) & 0xFF);
  ------------------
  |  |  966|      0|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
38020|      0|            break;
38021|      0|        }
38022|      0|        case JANET_TABLE: {
  ------------------
  |  Branch (38022:9): [True: 0, False: 5]
  ------------------
38023|      0|            JanetTable *table = janet_unwrap_table(ds);
  ------------------
  |  |  861|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
38024|      0|            janet_table_put(table, janet_wrap_integer(index), value);
  ------------------
  |  |  967|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
38025|      0|            break;
38026|      0|        }
38027|      1|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (38027:9): [True: 1, False: 4]
  ------------------
38028|      1|            JanetAbstractType *type = (JanetAbstractType *)janet_abstract_type(janet_unwrap_abstract(ds));
  ------------------
  |  | 1899|      1|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|      1|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
38029|      1|            if (type->put) {
  ------------------
  |  Branch (38029:17): [True: 0, False: 1]
  ------------------
38030|      0|                (type->put)(janet_unwrap_abstract(ds), janet_wrap_integer(index), value);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
                              (type->put)(janet_unwrap_abstract(ds), janet_wrap_integer(index), value);
  ------------------
  |  |  967|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
38031|      1|            } else {
38032|      1|                janet_panicf("no setter for %v ", ds);
38033|      1|            }
38034|      0|            break;
38035|      1|        }
38036|      5|    }
38037|      5|}
janet_put:
38039|  28.4M|void janet_put(Janet ds, Janet key, Janet value) {
38040|  28.4M|    JanetType type = janet_type(ds);
  ------------------
  |  |  795|  28.4M|    (isnan((x).number) \
  |  |  796|  28.4M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  28.4M|        : JANET_NUMBER)
  ------------------
  |  Branch (38040:22): [True: 28.4M, False: 5]
  ------------------
38041|  28.4M|    switch (type) {
38042|      8|        default:
  ------------------
  |  Branch (38042:9): [True: 8, False: 28.4M]
  ------------------
38043|      8|            janet_panicf("expected %T, got %v",
38044|      8|                         JANET_TFLAG_ARRAY | JANET_TFLAG_BUFFER | JANET_TFLAG_TABLE, ds);
  ------------------
  |  |  602|      8|#define JANET_TFLAG_ARRAY (1 << JANET_ARRAY)
  ------------------
                                       JANET_TFLAG_ARRAY | JANET_TFLAG_BUFFER | JANET_TFLAG_TABLE, ds);
  ------------------
  |  |  606|      8|#define JANET_TFLAG_BUFFER (1 << JANET_BUFFER)
  ------------------
                                       JANET_TFLAG_ARRAY | JANET_TFLAG_BUFFER | JANET_TFLAG_TABLE, ds);
  ------------------
  |  |  604|      8|#define JANET_TFLAG_TABLE (1 << JANET_TABLE)
  ------------------
38045|  20.0M|        case JANET_ARRAY: {
  ------------------
  |  Branch (38045:9): [True: 20.0M, False: 8.36M]
  ------------------
38046|  20.0M|            JanetArray *array = janet_unwrap_array(ds);
  ------------------
  |  |  860|  20.0M|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
38047|  20.0M|            int32_t index = getter_checkint(type, key, INT32_MAX - 1);
38048|  20.0M|            if (index >= array->count) {
  ------------------
  |  Branch (38048:17): [True: 0, False: 20.0M]
  ------------------
38049|      0|                janet_array_ensure(array, index + 1, 2);
38050|      0|                for (int32_t i = array->count; i < index + 1; i++) {
  ------------------
  |  Branch (38050:48): [True: 0, False: 0]
  ------------------
38051|      0|                    array->data[i] = 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
38052|      0|                }
38053|      0|                array->count = index + 1;
38054|      0|            }
38055|  20.0M|            array->data[index] = value;
38056|  20.0M|            break;
38057|      0|        }
38058|  2.25k|        case JANET_BUFFER: {
  ------------------
  |  Branch (38058:9): [True: 2.25k, False: 28.4M]
  ------------------
38059|  2.25k|            JanetBuffer *buffer = janet_unwrap_buffer(ds);
  ------------------
  |  |  862|  2.25k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
38060|  2.25k|            int32_t index = getter_checkint(type, key, INT32_MAX - 1);
38061|  2.25k|            if (!janet_checkint(value))
  ------------------
  |  Branch (38061:17): [True: 0, False: 2.25k]
  ------------------
38062|      0|                janet_panicf("can only put integers in buffers, got %v", value);
38063|  2.25k|            if (index >= buffer->count) {
  ------------------
  |  Branch (38063:17): [True: 0, False: 2.25k]
  ------------------
38064|      0|                janet_buffer_ensure(buffer, index + 1, 2);
38065|      0|                memset(buffer->data + buffer->count, 0, index + 1 - buffer->count);
38066|      0|                buffer->count = index + 1;
38067|      0|            }
38068|  2.25k|            buffer->data[index] = (uint8_t)(janet_unwrap_integer(value) & 0xFF);
  ------------------
  |  |  966|  2.25k|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|  2.25k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
38069|  2.25k|            break;
38070|  2.25k|        }
38071|  8.36M|        case JANET_TABLE:
  ------------------
  |  Branch (38071:9): [True: 8.36M, False: 20.0M]
  ------------------
38072|  8.36M|            janet_table_put(janet_unwrap_table(ds), key, value);
  ------------------
  |  |  861|  8.36M|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
38073|  8.36M|            break;
38074|      1|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (38074:9): [True: 1, False: 28.4M]
  ------------------
38075|      1|            JanetAbstractType *type = (JanetAbstractType *)janet_abstract_type(janet_unwrap_abstract(ds));
  ------------------
  |  | 1899|      1|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|      1|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
38076|      1|            if (type->put) {
  ------------------
  |  Branch (38076:17): [True: 0, False: 1]
  ------------------
38077|      0|                (type->put)(janet_unwrap_abstract(ds), key, value);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
38078|      1|            } else {
38079|      1|                janet_panicf("no setter for %v ", ds);
38080|      1|            }
38081|      0|            break;
38082|      1|        }
38083|  28.4M|    }
38084|  28.4M|}
janet_v_grow:
38119|  15.8M|void *janet_v_grow(void *v, int32_t increment, int32_t itemsize) {
38120|  15.8M|    int32_t dbl_cur = (NULL != v) ? 2 * janet_v__cap(v) : 0;
  ------------------
  |  |  742|  9.00M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  ------------------
  |  |  |  |  741|  9.00M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
  |  Branch (38120:23): [True: 9.00M, False: 6.83M]
  ------------------
38121|  15.8M|    int32_t min_needed = janet_v_count(v) + increment;
  ------------------
  |  |  736|  15.8M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  9.00M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  9.00M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 9.00M, False: 6.83M]
  |  |  ------------------
  ------------------
38122|  15.8M|    int32_t m = dbl_cur > min_needed ? dbl_cur : min_needed;
  ------------------
  |  Branch (38122:17): [True: 4.50M, False: 11.3M]
  ------------------
38123|  15.8M|    size_t newsize = ((size_t) itemsize) * m + sizeof(int32_t) * 2;
38124|  15.8M|    int32_t *p = (int32_t *) janet_srealloc(v ? janet_v__raw(v) : 0, newsize);
  ------------------
  |  |  741|  9.00M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  ------------------
  |  Branch (38124:45): [True: 9.00M, False: 6.83M]
  ------------------
38125|  15.8M|    if (!v) p[1] = 0;
  ------------------
  |  Branch (38125:9): [True: 6.83M, False: 9.00M]
  ------------------
38126|  15.8M|    p[0] = m;
38127|  15.8M|    return p + 2;
38128|  15.8M|}
janet_v_flattenmem:
38131|  1.77M|void *janet_v_flattenmem(void *v, int32_t itemsize) {
38132|  1.77M|    char *p;
38133|  1.77M|    if (NULL == v) return NULL;
  ------------------
  |  Branch (38133:9): [True: 1.14M, False: 629k]
  ------------------
38134|   629k|    size_t size = (size_t) itemsize * janet_v__cnt(v);
  ------------------
  |  |  743|   629k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  ------------------
  |  |  |  |  741|   629k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
38135|   629k|    p = janet_malloc(size);
  ------------------
  |  | 2406|   629k|#define janet_malloc(X) malloc((X))
  ------------------
38136|   629k|    if (NULL != p) {
  ------------------
  |  Branch (38136:9): [True: 629k, False: 0]
  ------------------
38137|   629k|        safe_memcpy(p, v, size);
38138|   629k|        return p;
38139|   629k|    } else {
38140|       |        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]
  |  |  ------------------
  ------------------
38141|      0|    }
38142|   629k|}
janet_call:
39613|    576|Janet janet_call(JanetFunction *fun, int32_t argc, const Janet *argv) {
39614|       |    /* Check entry conditions */
39615|    576|    if (!janet_vm.fiber)
  ------------------
  |  Branch (39615:9): [True: 0, False: 576]
  ------------------
39616|      0|        janet_panic("janet_call failed because there is no current fiber");
39617|    576|    if (janet_vm.stackn >= JANET_RECURSION_GUARD)
  ------------------
  |  |  296|    576|#define JANET_RECURSION_GUARD 1024
  ------------------
  |  Branch (39617:9): [True: 0, False: 576]
  ------------------
39618|      0|        janet_panic("C stack recursed too deeply");
39619|       |
39620|       |    /* Dirty stack */
39621|    576|    int32_t dirty_stack = janet_vm.fiber->stacktop - janet_vm.fiber->stackstart;
39622|    576|    if (dirty_stack) {
  ------------------
  |  Branch (39622:9): [True: 0, False: 576]
  ------------------
39623|      0|        janet_fiber_cframe(janet_vm.fiber, void_cfunction);
39624|      0|    }
39625|       |
39626|       |    /* Tracing */
39627|    576|    if (fun->gc.flags & JANET_FUNCFLAG_TRACE) {
  ------------------
  |  | 1164|    576|#define JANET_FUNCFLAG_TRACE (1 << 16)
  ------------------
  |  Branch (39627:9): [True: 0, False: 576]
  ------------------
39628|      0|        janet_vm.stackn++;
39629|      0|        vm_do_trace(fun, argc, argv);
  ------------------
  |  |38449|      0|#define vm_do_trace(func, argc, argv) do { \
  |  |38450|      0|    JanetFunction* _func = (func);\
  |  |38451|      0|    if (_func->def->name) {\
  |  |  ------------------
  |  |  |  Branch (38451:9): [True: 0, False: 0]
  |  |  ------------------
  |  |38452|      0|        janet_eprintf("trace (%S", _func->def->name);\
  |  |  ------------------
  |  |  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |38453|      0|    } else {\
  |  |38454|      0|        janet_eprintf("trace (%p", janet_wrap_function(_func));\
  |  |  ------------------
  |  |  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |38455|      0|    }\
  |  |38456|      0|    int32_t _argc = (argc);\
  |  |38457|      0|    for (int32_t i = 0; i < _argc; i++) {\
  |  |  ------------------
  |  |  |  Branch (38457:25): [True: 0, False: 0]
  |  |  ------------------
  |  |38458|      0|        janet_eprintf(" %p", (argv)[i]);\
  |  |  ------------------
  |  |  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |38459|      0|    }\
  |  |38460|      0|    janet_eprintf(")\n");\
  |  |  ------------------
  |  |  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |38461|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (38461:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
39630|      0|        janet_vm.stackn--;
39631|      0|    }
39632|       |
39633|       |    /* Push frame */
39634|    576|    janet_fiber_pushn(janet_vm.fiber, argv, argc);
39635|    576|    if (janet_fiber_funcframe(janet_vm.fiber, fun)) {
  ------------------
  |  Branch (39635:9): [True: 1, False: 575]
  ------------------
39636|      1|        int32_t min = fun->def->min_arity;
39637|      1|        int32_t max = fun->def->max_arity;
39638|      1|        Janet funv = janet_wrap_function(fun);
  ------------------
  |  |  852|      1|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  825|      1|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39639|      1|        if (min == max && min != argc)
  ------------------
  |  Branch (39639:13): [True: 1, False: 0]
  |  Branch (39639:27): [True: 1, False: 0]
  ------------------
39640|      1|            janet_panicf("arity mismatch in %v, expected %d, got %d", funv, min, argc);
39641|      0|        if (min >= 0 && argc < min)
  ------------------
  |  Branch (39641:13): [True: 0, False: 0]
  |  Branch (39641:25): [True: 0, False: 0]
  ------------------
39642|      0|            janet_panicf("arity mismatch in %v, expected at least %d, got %d", funv, min, argc);
39643|      0|        janet_panicf("arity mismatch in %v, expected at most %d, got %d", funv, max, argc);
39644|      0|    }
39645|    575|    janet_fiber_frame(janet_vm.fiber)->flags |= JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  |  832|    575|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  831|    575|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|    575|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_fiber_frame(janet_vm.fiber)->flags |= JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  | 1013|    575|#define JANET_STACKFRAME_ENTRANCE 2
  ------------------
39646|       |
39647|       |    /* Set up */
39648|    575|    int32_t oldn = janet_vm.stackn++;
39649|    575|    int handle = janet_gclock();
39650|       |
39651|       |    /* Run vm */
39652|    575|    janet_vm.fiber->flags |= JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  812|    575|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
                  janet_vm.fiber->flags |= JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  813|    575|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  ------------------
39653|    575|    int old_coerce_error = janet_vm.coerce_error;
39654|    575|    janet_vm.coerce_error = 1;
39655|    575|    JanetSignal signal = run_vm(janet_vm.fiber, janet_wrap_nil());
  ------------------
  |  |  831|    575|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    575|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    575|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    575|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39656|    575|    janet_vm.coerce_error = old_coerce_error;
39657|       |
39658|       |    /* Teardown */
39659|    575|    janet_vm.stackn = oldn;
39660|    575|    janet_gcunlock(handle);
39661|    575|    if (dirty_stack) {
  ------------------
  |  Branch (39661:9): [True: 0, False: 575]
  ------------------
39662|      0|        janet_fiber_popframe(janet_vm.fiber);
39663|      0|        janet_vm.fiber->stacktop += dirty_stack;
39664|      0|    }
39665|       |
39666|    575|    if (signal != JANET_SIGNAL_OK) {
  ------------------
  |  Branch (39666:9): [True: 1, False: 574]
  ------------------
39667|       |        /* Should match logic in janet_signalv */
39668|      1|#ifdef JANET_EV
39669|      1|        if (janet_vm.root_fiber != NULL && signal == JANET_SIGNAL_EVENT) {
  ------------------
  |  Branch (39669:13): [True: 1, False: 0]
  |  Branch (39669:44): [True: 0, False: 1]
  ------------------
39670|      0|            janet_vm.root_fiber->sched_id++;
39671|      0|        }
39672|      1|#endif
39673|      1|        if (signal != JANET_SIGNAL_ERROR) {
  ------------------
  |  Branch (39673:13): [True: 1, False: 0]
  ------------------
39674|      1|            *janet_vm.return_reg = janet_wrap_string(janet_formatc("%v coerced from %s to error", *janet_vm.return_reg, janet_signal_names[signal]));
  ------------------
  |  |  848|      1|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|      1|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39675|      1|        }
39676|      1|        janet_panicv(*janet_vm.return_reg);
39677|      1|    }
39678|       |
39679|    574|    return *janet_vm.return_reg;
39680|    575|}
janet_try_init:
39722|  1.97M|void janet_try_init(JanetTryState *state) {
39723|  1.97M|    state->stackn = janet_vm.stackn++;
39724|  1.97M|    state->gc_handle = janet_vm.gc_suspend;
39725|  1.97M|    state->vm_fiber = janet_vm.fiber;
39726|  1.97M|    state->vm_jmp_buf = janet_vm.signal_buf;
39727|  1.97M|    state->vm_return_reg = janet_vm.return_reg;
39728|  1.97M|    state->coerce_error = janet_vm.coerce_error;
39729|  1.97M|    janet_vm.return_reg = &(state->payload);
39730|  1.97M|    janet_vm.signal_buf = &(state->buf);
39731|  1.97M|    janet_vm.coerce_error = 0;
39732|  1.97M|}
janet_restore:
39734|  1.97M|void janet_restore(JanetTryState *state) {
39735|  1.97M|    janet_vm.stackn = state->stackn;
39736|  1.97M|    janet_vm.gc_suspend = state->gc_handle;
39737|  1.97M|    janet_vm.fiber = state->vm_fiber;
39738|  1.97M|    janet_vm.signal_buf = state->vm_jmp_buf;
39739|  1.97M|    janet_vm.return_reg = state->vm_return_reg;
39740|  1.97M|    janet_vm.coerce_error = state->coerce_error;
39741|  1.97M|}
janet_continue:
39838|  1.10M|JanetSignal janet_continue(JanetFiber *fiber, Janet in, Janet *out) {
39839|       |    /* Check conditions */
39840|  1.10M|    JanetSignal tmp_signal = janet_check_can_resume(fiber, out, 0);
39841|  1.10M|    if (tmp_signal) return tmp_signal;
  ------------------
  |  Branch (39841:9): [True: 0, False: 1.10M]
  ------------------
39842|  1.10M|    return janet_continue_no_check(fiber, in, out);
39843|  1.10M|}
janet_continue_signal:
39846|  4.14k|JanetSignal janet_continue_signal(JanetFiber *fiber, Janet in, Janet *out, JanetSignal sig) {
39847|  4.14k|    JanetSignal tmp_signal = janet_check_can_resume(fiber, out, sig != JANET_SIGNAL_OK);
39848|  4.14k|    if (tmp_signal) return tmp_signal;
  ------------------
  |  Branch (39848:9): [True: 277, False: 3.86k]
  ------------------
39849|  3.86k|    if (sig != JANET_SIGNAL_OK) {
  ------------------
  |  Branch (39849:9): [True: 12, False: 3.85k]
  ------------------
39850|     12|        JanetFiber *child = fiber;
39851|     24|        while (child->child) child = child->child;
  ------------------
  |  Branch (39851:16): [True: 12, False: 12]
  ------------------
39852|       |        /* NOTE: We are "smuggling" flags in for later use in an unusal place. This is odd but intentional and
39853|       |         * saves a bit of memory per fiber rather than creating a new field. There is likely a better way to do this. */
39854|     12|        child->gc.flags &= ~JANET_FIBER_STATUS_MASK;
  ------------------
  |  |  807|     12|#define JANET_FIBER_STATUS_MASK 0x3F0000
  ------------------
39855|     12|        child->gc.flags |= sig << JANET_FIBER_STATUS_OFFSET;
  ------------------
  |  |  809|     12|#define JANET_FIBER_STATUS_OFFSET 16
  ------------------
39856|     12|        child->flags |= JANET_FIBER_RESUME_SIGNAL;
  ------------------
  |  |  808|     12|#define JANET_FIBER_RESUME_SIGNAL 0x400000
  ------------------
39857|     12|    }
39858|  3.86k|    return janet_continue_no_check(fiber, in, out);
39859|  4.14k|}
janet_mcall:
39881|  1.09M|Janet janet_mcall(const char *name, int32_t argc, Janet *argv) {
39882|       |    /* At least 1 argument */
39883|  1.09M|    if (argc < 1) {
  ------------------
  |  Branch (39883:9): [True: 0, False: 1.09M]
  ------------------
39884|      0|        janet_panicf("method :%s expected at least 1 argument", name);
39885|      0|    }
39886|       |    /* Find method */
39887|  1.09M|    Janet method = janet_method_lookup(argv[0], name);
39888|  1.09M|    if (janet_checktype(method, JANET_NIL)) {
  ------------------
  |  |  806|  1.09M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 20, False: 1.09M]
  |  |  |  Branch (806:6): [Folded, False: 1.09M]
  |  |  ------------------
  |  |  807|  1.09M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.09M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.09M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.09M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.09M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.09M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39889|     20|        janet_panicf("could not find method :%s for %v", name, argv[0]);
39890|     20|    }
39891|       |    /* Invoke method */
39892|  1.09M|    return janet_method_invoke(method, argc, argv);
39893|  1.09M|}
janet_init:
39896|  10.3k|int janet_init(void) {
39897|       |
39898|       |    /* Garbage collection */
39899|  10.3k|    janet_vm.blocks = NULL;
39900|  10.3k|    janet_vm.weak_blocks = NULL;
39901|  10.3k|    janet_vm.next_collection = 0;
39902|  10.3k|    janet_vm.gc_interval = 0x400000;
39903|  10.3k|    janet_vm.block_count = 0;
39904|  10.3k|    janet_vm.gc_mark_phase = 0;
39905|       |
39906|  10.3k|    janet_symcache_init();
39907|       |
39908|       |    /* Initialize gc roots */
39909|  10.3k|    janet_vm.roots = NULL;
39910|  10.3k|    janet_vm.root_count = 0;
39911|  10.3k|    janet_vm.root_capacity = 0;
39912|       |
39913|       |    /* Scratch memory */
39914|  10.3k|    janet_vm.user = NULL;
39915|  10.3k|    janet_vm.scratch_mem = NULL;
39916|  10.3k|    janet_vm.scratch_len = 0;
39917|  10.3k|    janet_vm.scratch_cap = 0;
39918|       |
39919|       |    /* Sandbox flags */
39920|  10.3k|    janet_vm.sandbox_flags = 0;
39921|       |
39922|       |    /* Initialize registry */
39923|  10.3k|    janet_vm.registry = NULL;
39924|  10.3k|    janet_vm.registry_cap = 0;
39925|  10.3k|    janet_vm.registry_count = 0;
39926|  10.3k|    janet_vm.registry_dirty = 0;
39927|       |
39928|       |    /* Initialize abstract registry */
39929|  10.3k|    janet_vm.abstract_registry = janet_table(0);
39930|  10.3k|    janet_gcroot(janet_wrap_table(janet_vm.abstract_registry));
  ------------------
  |  |  846|  10.3k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|  10.3k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  10.3k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  10.3k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39931|       |
39932|       |    /* Traversal */
39933|  10.3k|    janet_vm.traversal = NULL;
39934|  10.3k|    janet_vm.traversal_base = NULL;
39935|  10.3k|    janet_vm.traversal_top = NULL;
39936|       |
39937|       |    /* Core env */
39938|  10.3k|    janet_vm.core_env = NULL;
39939|       |
39940|       |    /* Auto suspension */
39941|  10.3k|    janet_vm.auto_suspend = 0;
39942|       |
39943|       |    /* Dynamic bindings */
39944|  10.3k|    janet_vm.top_dyns = NULL;
39945|       |
39946|       |    /* Seed RNG */
39947|  10.3k|    janet_rng_seed(janet_default_rng(), 0);
39948|       |
39949|       |    /* Fibers */
39950|  10.3k|    janet_vm.fiber = NULL;
39951|  10.3k|    janet_vm.root_fiber = NULL;
39952|  10.3k|    janet_vm.stackn = 0;
39953|       |
39954|  10.3k|#ifdef JANET_EV
39955|  10.3k|    janet_ev_init();
39956|  10.3k|#endif
39957|  10.3k|#ifdef JANET_NET
39958|  10.3k|    janet_net_init();
39959|  10.3k|#endif
39960|  10.3k|    return 0;
39961|  10.3k|}
janet_sandbox_assert:
39969|  1.55M|void janet_sandbox_assert(uint32_t forbidden_flags) {
39970|  1.55M|    if (forbidden_flags & janet_vm.sandbox_flags) {
  ------------------
  |  Branch (39970:9): [True: 0, False: 1.55M]
  ------------------
39971|      0|        janet_panic("operation forbidden by sandbox");
39972|      0|    }
39973|  1.55M|}
janet_deinit:
39976|  10.3k|void janet_deinit(void) {
39977|  10.3k|    janet_clear_memory();
39978|  10.3k|    janet_symcache_deinit();
39979|  10.3k|    janet_free(janet_vm.roots);
  ------------------
  |  | 2415|  10.3k|#define janet_free(X) free((X))
  ------------------
39980|  10.3k|    janet_vm.roots = NULL;
39981|  10.3k|    janet_vm.root_count = 0;
39982|  10.3k|    janet_vm.root_capacity = 0;
39983|  10.3k|    janet_vm.abstract_registry = NULL;
39984|  10.3k|    janet_vm.core_env = NULL;
39985|  10.3k|    janet_vm.top_dyns = NULL;
39986|  10.3k|    janet_vm.user = NULL;
39987|  10.3k|    janet_free(janet_vm.traversal_base);
  ------------------
  |  | 2415|  10.3k|#define janet_free(X) free((X))
  ------------------
39988|  10.3k|    janet_vm.fiber = NULL;
39989|  10.3k|    janet_vm.root_fiber = NULL;
39990|  10.3k|    janet_free(janet_vm.registry);
  ------------------
  |  | 2415|  10.3k|#define janet_free(X) free((X))
  ------------------
39991|       |    janet_vm.registry = NULL;
39992|  10.3k|#ifdef JANET_EV
39993|  10.3k|    janet_ev_deinit();
39994|  10.3k|#endif
39995|  10.3k|#ifdef JANET_NET
39996|  10.3k|    janet_net_deinit();
39997|  10.3k|#endif
39998|  10.3k|}
janet_memalloc_empty:
40166|  22.1M|void *janet_memalloc_empty(int32_t count) {
40167|  22.1M|    int32_t i;
40168|  22.1M|    void *mem = array_allocate(sizeof(JanetKV), count);
40169|  22.1M|    janet_vm.next_collection += (size_t) count * sizeof(JanetKV);
40170|  22.1M|    if (NULL == mem) {
  ------------------
  |  Branch (40170:9): [True: 0, False: 22.1M]
  ------------------
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|  22.1M|    JanetKV *mmem = (JanetKV *)mem;
40174|   376M|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (40174:17): [True: 354M, False: 22.1M]
  ------------------
40175|   354M|        JanetKV *kv = mmem + i;
40176|   354M|        kv->key = janet_wrap_nil();
  ------------------
  |  |  831|   354M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   354M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   354M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   354M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
40177|   354M|        kv->value = janet_wrap_nil();
  ------------------
  |  |  831|   354M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   354M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   354M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   354M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
40178|   354M|    }
40179|  22.1M|    return mem;
40180|  22.1M|}
janet_memempty:
40182|  14.4M|void janet_memempty(JanetKV *mem, int32_t count) {
40183|  14.4M|    int32_t i;
40184|   398M|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (40184:17): [True: 384M, False: 14.4M]
  ------------------
40185|   384M|        mem[i].key = janet_wrap_nil();
  ------------------
  |  |  831|   384M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   384M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   384M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   384M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
40186|   384M|        mem[i].value = janet_wrap_nil();
  ------------------
  |  |  831|   384M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   384M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   384M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   384M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
40187|   384M|    }
40188|  14.4M|}
janet_wrap_number_safe:
40192|  94.2k|Janet janet_wrap_number_safe(double d) {
40193|  94.2k|    Janet ret;
40194|  94.2k|    ret.number = isnan(d) ? NAN : d;
  ------------------
  |  Branch (40194:18): [True: 9.93k, False: 84.3k]
  ------------------
40195|  94.2k|    return ret;
40196|  94.2k|}
janet_nanbox_to_pointer:
40198|  6.89G|void *janet_nanbox_to_pointer(Janet x) {
40199|  6.89G|    x.i64 &= JANET_NANBOX_PAYLOADBITS;
  ------------------
  |  |  791|  6.89G|#define JANET_NANBOX_PAYLOADBITS 0x00007FFFFFFFFFFFllu
  ------------------
40200|  6.89G|    x.u64 <<= JANET_NANBOX_64_POINTER_SHIFT; /* Alignment, usually 0 */
  ------------------
  |  |  341|  6.89G|#define JANET_NANBOX_64_POINTER_SHIFT 0
  ------------------
40201|  6.89G|    return x.pointer;
40202|  6.89G|}
janet_nanbox_from_pointer:
40204|  6.64G|Janet janet_nanbox_from_pointer(void *p, uint64_t tagmask) {
40205|  6.64G|    Janet ret;
40206|  6.64G|    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|  6.64G|    ret.u64 >>= JANET_NANBOX_64_POINTER_SHIFT; /* Alignment, usually 0 */
  ------------------
  |  |  341|  6.64G|#define JANET_NANBOX_64_POINTER_SHIFT 0
  ------------------
40212|  6.64G|    ret.u64 |= tagmask;
40213|  6.64G|    return ret;
40214|  6.64G|}
janet_nanbox_from_cpointer:
40216|   525M|Janet janet_nanbox_from_cpointer(const void *p, uint64_t tagmask) {
40217|   525M|    Janet ret;
40218|   525M|    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|   525M|    ret.u64 >>= JANET_NANBOX_64_POINTER_SHIFT; /* Alignment, usually 0 */
  ------------------
  |  |  341|   525M|#define JANET_NANBOX_64_POINTER_SHIFT 0
  ------------------
40224|   525M|    ret.u64 |= tagmask;
40225|   525M|    return ret;
40226|   525M|}
janet_nanbox_from_double:
40228|   944M|Janet janet_nanbox_from_double(double d) {
40229|   944M|    Janet ret;
40230|   944M|    ret.number = d;
40231|   944M|    return ret;
40232|   944M|}
janet_nanbox_from_bits:
40234|  11.7G|Janet janet_nanbox_from_bits(uint64_t bits) {
40235|  11.7G|    Janet ret;
40236|  11.7G|    ret.u64 = bits;
40237|  11.7G|    return ret;
40238|  11.7G|}
janet.c:janet_array_impl:
 1589|  1.72M|static void janet_array_impl(JanetArray *array, int32_t capacity) {
 1590|  1.72M|    Janet *data = NULL;
 1591|  1.72M|    if (capacity > 0) {
  ------------------
  |  Branch (1591:9): [True: 1.24M, False: 479k]
  ------------------
 1592|  1.24M|        janet_vm.next_collection += capacity * sizeof(Janet);
 1593|  1.24M|        data = (Janet *) array_allocate(sizeof(Janet), capacity);
 1594|  1.24M|        if (NULL == data) {
  ------------------
  |  Branch (1594:13): [True: 0, False: 1.24M]
  ------------------
 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|  1.24M|    }
 1598|  1.72M|    array->count = 0;
 1599|  1.72M|    array->capacity = capacity;
 1600|  1.72M|    array->data = data;
 1601|  1.72M|}
janet.c:janet_buffer_init_impl:
 3189|  23.2M|static JanetBuffer *janet_buffer_init_impl(JanetBuffer *buffer, int32_t capacity) {
 3190|  23.2M|    uint8_t *data = NULL;
 3191|  23.2M|    if (capacity < 4) capacity = 4;
  ------------------
  |  Branch (3191:9): [True: 14.5M, False: 8.68M]
  ------------------
 3192|  23.2M|    janet_gcpressure(capacity);
 3193|  23.2M|    data = array_allocate(sizeof(uint8_t), capacity);
 3194|  23.2M|    if (NULL == data) {
  ------------------
  |  Branch (3194:9): [True: 0, False: 23.2M]
  ------------------
 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|  23.2M|    buffer->count = 0;
 3198|  23.2M|    buffer->capacity = capacity;
 3199|  23.2M|    buffer->data = data;
 3200|  23.2M|    return buffer;
 3201|  23.2M|}
janet.c:janet_buffer_can_realloc:
 3182|  17.2M|static void janet_buffer_can_realloc(JanetBuffer *buffer) {
 3183|  17.2M|    if (buffer->gc.flags & JANET_BUFFER_FLAG_NO_REALLOC) {
  ------------------
  |  | 1780|  17.2M|#define JANET_BUFFER_FLAG_NO_REALLOC 0x10000
  ------------------
  |  Branch (3183:9): [True: 0, False: 17.2M]
  ------------------
 3184|      0|        janet_panic("buffer cannot reallocate pinned memory");
 3185|      0|    }
 3186|  17.2M|}
janet.c:buffer_push_impl:
 3606|  50.8M|static void buffer_push_impl(JanetBuffer *buffer, Janet *argv, int32_t argc_offset, int32_t argc) {
 3607|   101M|    for (int32_t i = argc_offset; i < argc; i++) {
  ------------------
  |  Branch (3607:35): [True: 50.8M, False: 50.8M]
  ------------------
 3608|  50.8M|        if (janet_checktype(argv[i], JANET_NUMBER)) {
  ------------------
  |  |  806|  50.8M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 37.2M, False: 13.6M]
  |  |  |  Branch (806:6): [True: 50.8M, Folded]
  |  |  ------------------
  |  |  807|  50.8M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|  50.8M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 37.2M, False: 13.6M]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 13.6M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  50.8M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3609|  37.2M|            janet_buffer_push_u8(buffer, (uint8_t)(janet_getinteger(argv, i) & 0xFF));
 3610|  37.2M|        } else {
 3611|  13.6M|            JanetByteView view = janet_getbytes(argv, i);
 3612|  13.6M|            if (view.bytes == buffer->data) {
  ------------------
  |  Branch (3612:17): [True: 0, False: 13.6M]
  ------------------
 3613|      0|                janet_buffer_ensure(buffer, buffer->count + view.len, 2);
 3614|      0|                view.bytes = buffer->data;
 3615|      0|            }
 3616|  13.6M|            janet_buffer_push_bytes(buffer, view.bytes, view.len);
 3617|  13.6M|        }
 3618|  50.8M|    }
 3619|  50.8M|}
janet.c:bitloc:
 3694|     20|static void bitloc(int32_t argc, Janet *argv, JanetBuffer **b, int32_t *index, int *bit) {
 3695|     20|    janet_fixarity(argc, 2);
 3696|     20|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3697|     20|    double x = janet_getnumber(argv, 1);
 3698|     20|    int64_t bitindex = (int64_t) x;
 3699|     20|    int64_t byteindex = bitindex >> 3;
 3700|     20|    int which_bit = bitindex & 7;
 3701|     20|    if (bitindex != x || bitindex < 0 || byteindex >= buffer->count)
  ------------------
  |  Branch (3701:9): [True: 5, False: 15]
  |  Branch (3701:26): [True: 1, False: 14]
  |  Branch (3701:42): [True: 12, False: 2]
  ------------------
 3702|     14|        janet_panicf("invalid bit index %v", argv[1]);
 3703|      6|    *b = buffer;
 3704|      6|    *index = (int32_t) byteindex;
 3705|      6|    *bit = which_bit;
 3706|      6|}
janet.c:bs_set_bit:
 3905|   501M|static void bs_set_bit(uint32_t *bitset, int32_t index) {
 3906|   501M|    bitset[bs_indx(index)] |= bs_mask(index);
 3907|   501M|}
janet.c:bs_mask:
 3899|  1.23G|static uint32_t bs_mask(int32_t index) {
 3900|  1.23G|    return ((uint32_t)1) << (index & 0x1F);
 3901|  1.23G|}
janet.c:bs_indx:
 3902|  1.23G|static uint32_t bs_indx(int32_t index) {
 3903|  1.23G|    return index >> 5;
 3904|  1.23G|}
janet.c:bs_read_bit:
 3911|   241M|static int bs_read_bit(uint32_t *bitset, int32_t index) {
 3912|   241M|    return (bitset[bs_indx(index)] & bs_mask(index)) ? 1 : 0;
  ------------------
  |  Branch (3912:12): [True: 7.03M, False: 234M]
  ------------------
 3913|   241M|}
janet.c:rewrite_symbolmap:
 4758|   777k|static void rewrite_symbolmap(JanetFuncDef *def, uint32_t *pc_map) {
 4759|   777k|    int32_t smout = 0;
 4760|   300M|    for (int32_t i = 0; i < def->symbolmap_length; i++) {
  ------------------
  |  Branch (4760:25): [True: 299M, False: 777k]
  ------------------
 4761|   299M|        JanetSymbolMap *sm = def->symbolmap + i;
 4762|   299M|        int keep = 1;
 4763|       |        /* Don't rewrite upvalue mappings */
 4764|   299M|        if (sm->birth_pc < UINT32_MAX) {
  ------------------
  |  Branch (4764:13): [True: 298M, False: 729k]
  ------------------
 4765|   298M|            sm->birth_pc = pc_map[sm->birth_pc];
 4766|   298M|            sm->death_pc = pc_map[sm->death_pc];
 4767|       |            /* entirely dead symbols can be removed from the symbol map. This can happen if a symbol is in dead code. */
 4768|   298M|            if (sm->death_pc > (uint32_t) def->bytecode_length) sm->death_pc = (uint32_t) def->bytecode_length;
  ------------------
  |  Branch (4768:17): [True: 0, False: 298M]
  ------------------
 4769|   298M|            if (sm->birth_pc >= sm->death_pc) keep = 0;
  ------------------
  |  Branch (4769:17): [True: 1.11k, False: 298M]
  ------------------
 4770|   298M|        }
 4771|       |        /* Now shift if needed */
 4772|   299M|        if (keep) def->symbolmap[smout++] = *sm;
  ------------------
  |  Branch (4772:13): [True: 299M, False: 1.11k]
  ------------------
 4773|   299M|    }
 4774|   777k|    def->symbolmap_length = smout;
 4775|   777k|}
janet.c:janet_bytecode_movopt_basic_block:
 5046|  3.67M|static void janet_bytecode_movopt_basic_block(JanetFuncDef *def, BytecodeBB bb, uint32_t *bitset, int mode) {
 5047|  3.67M|    if (bb.start >= bb.end) return; /* Degenerate block */
  ------------------
  |  Branch (5047:9): [True: 0, False: 3.67M]
  ------------------
 5048|  3.67M|    if (mode == 0) {
  ------------------
  |  Branch (5048:9): [True: 1.83M, False: 1.83M]
  ------------------
 5049|       |        /* Flip bits */
 5050|   129M|        for (int32_t word = 0; word < (((def->slotcount - 1) >> 5) + 1); word++) {
  ------------------
  |  Branch (5050:32): [True: 127M, False: 1.83M]
  ------------------
 5051|   127M|            bitset[word] = ~bitset[word];
 5052|   127M|        }
 5053|  1.83M|    } else {
 5054|  1.83M|        memset(bitset, 0x00, (def->slotcount + 7) / 8);
 5055|  1.83M|    }
 5056|   524M|    for (int32_t i = bb.end - 1; i >= bb.start; i--) {
  ------------------
  |  Branch (5056:34): [True: 521M, False: 3.67M]
  ------------------
 5057|   521M|        int32_t ins[3];
 5058|   521M|        int32_t out = -1;
 5059|   521M|        int nins = 0;
 5060|   521M|        int pin = 0; /* side effects, don't remove */
 5061|   521M|        uint32_t I = def->bytecode[i];
 5062|   521M|        uint32_t Iop = I & 0x7F;
 5063|   521M|        uint32_t Ia = (I >> 8) & 0xFF;
 5064|   521M|        uint32_t Ib = (I >> 16) & 0xFF;
 5065|   521M|        uint32_t Ic = (I >> 24);
 5066|   521M|        uint32_t Id = (I >> 8);
 5067|   521M|        uint32_t Ie = (I >> 16);
 5068|       |        /* Whenever we execute an instruction that can yield or await, clear the bitset.
 5069|       |         * Closures could read some slots that seem to be unused, and then control could
 5070|       |         * return to our function. */
 5071|   521M|        switch (Iop) {
 5072|      0|            default:
  ------------------
  |  Branch (5072:13): [True: 0, False: 521M]
  ------------------
 5073|      0|                janet_assert(0, "unhandled instruction");
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
 5074|      0|                continue;
 5075|   129k|            case JOP_JUMP:
  ------------------
  |  Branch (5075:13): [True: 129k, False: 520M]
  ------------------
 5076|   165k|            case JOP_NOOP:
  ------------------
  |  Branch (5076:13): [True: 36.2k, False: 521M]
  ------------------
 5077|   609k|            case JOP_RETURN_NIL:
  ------------------
  |  Branch (5077:13): [True: 443k, False: 520M]
  ------------------
 5078|   609k|                continue;
 5079|       |
 5080|       |            /* Side effects, don't remove */
 5081|       |
 5082|       |            /* Write A, Read E */
 5083|  1.07M|            case JOP_CALL:
  ------------------
  |  Branch (5083:13): [True: 1.07M, False: 520M]
  ------------------
 5084|       |                /* Similar logic applies to tail calls, but they are always at the end of blocks anyway */
 5085|  1.07M|                out = Ia;
 5086|  1.07M|                pin = 1;
 5087|  1.07M|                nins = 1;
 5088|  1.07M|                ins[0] = Ie;
 5089|  1.07M|                break;
 5090|       |            /* Write A, Read B */
 5091|     88|            case JOP_SIGNAL:
  ------------------
  |  Branch (5091:13): [True: 88, False: 521M]
  ------------------
 5092|     88|                out = Ia;
 5093|     88|                nins = 1;
 5094|     88|                ins[0] = Ib;
 5095|     88|                pin = 1;
 5096|     88|                break;
 5097|       |            /* Read A */
 5098|      0|            case JOP_TYPECHECK:
  ------------------
  |  Branch (5098:13): [True: 0, False: 521M]
  ------------------
 5099|  9.41k|            case JOP_JUMP_IF:
  ------------------
  |  Branch (5099:13): [True: 9.41k, False: 521M]
  ------------------
 5100|  1.10M|            case JOP_JUMP_IF_NOT:
  ------------------
  |  Branch (5100:13): [True: 1.09M, False: 520M]
  ------------------
 5101|  1.16M|            case JOP_JUMP_IF_NIL:
  ------------------
  |  Branch (5101:13): [True: 57.9k, False: 521M]
  ------------------
 5102|  1.47M|            case JOP_JUMP_IF_NOT_NIL:
  ------------------
  |  Branch (5102:13): [True: 317k, False: 520M]
  ------------------
 5103|  1.79M|            case JOP_SET_UPVALUE:
  ------------------
  |  Branch (5103:13): [True: 317k, False: 520M]
  ------------------
 5104|  1.79M|                nins = 1;
 5105|  1.79M|                pin = 1;
 5106|  1.79M|                ins[0] = Ia;
 5107|  1.79M|                break;
 5108|       |            /* Read D */
 5109|    126|            case JOP_ERROR:
  ------------------
  |  Branch (5109:13): [True: 126, False: 521M]
  ------------------
 5110|  1.06M|            case JOP_RETURN:
  ------------------
  |  Branch (5110:13): [True: 1.06M, False: 520M]
  ------------------
 5111|  2.42M|            case JOP_PUSH:
  ------------------
  |  Branch (5111:13): [True: 1.35M, False: 519M]
  ------------------
 5112|  2.96M|            case JOP_PUSH_ARRAY:
  ------------------
  |  Branch (5112:13): [True: 534k, False: 520M]
  ------------------
 5113|  3.31M|            case JOP_TAILCALL:
  ------------------
  |  Branch (5113:13): [True: 351k, False: 520M]
  ------------------
 5114|  3.31M|                pin = 1;
 5115|  3.31M|                nins = 1;
 5116|  3.31M|                ins[0] = Id;
 5117|  3.31M|                break;
 5118|  4.40k|            case JOP_PUT:
  ------------------
  |  Branch (5118:13): [True: 4.40k, False: 521M]
  ------------------
 5119|  1.25M|            case JOP_PUSH_3:
  ------------------
  |  Branch (5119:13): [True: 1.24M, False: 519M]
  ------------------
 5120|  1.25M|                nins = 3;
 5121|  1.25M|                pin = 1;
 5122|  1.25M|                ins[0] = Ia;
 5123|  1.25M|                ins[1] = Ib;
 5124|  1.25M|                ins[2] = Ic;
 5125|  1.25M|                break;
 5126|       |            /* Write A */
 5127|  75.2k|            case JOP_MAKE_ARRAY:
  ------------------
  |  Branch (5127:13): [True: 75.2k, False: 521M]
  ------------------
 5128|  79.0k|            case JOP_MAKE_BUFFER:
  ------------------
  |  Branch (5128:13): [True: 3.80k, False: 521M]
  ------------------
 5129|  79.0k|            case JOP_MAKE_STRING:
  ------------------
  |  Branch (5129:13): [True: 0, False: 521M]
  ------------------
 5130|  85.7k|            case JOP_MAKE_STRUCT:
  ------------------
  |  Branch (5130:13): [True: 6.67k, False: 521M]
  ------------------
 5131|  86.9k|            case JOP_MAKE_TABLE:
  ------------------
  |  Branch (5131:13): [True: 1.16k, False: 521M]
  ------------------
 5132|  17.2M|            case JOP_MAKE_TUPLE:
  ------------------
  |  Branch (5132:13): [True: 17.1M, False: 503M]
  ------------------
 5133|  17.3M|            case JOP_MAKE_BRACKET_TUPLE:
  ------------------
  |  Branch (5133:13): [True: 28.6k, False: 521M]
  ------------------
 5134|  17.3M|                out = Ia;
 5135|  17.3M|                pin = 1; /* TODO - we need an instruction (or psuedo instruction) that can clear the stack but do nothing */
 5136|  17.3M|                break;
 5137|  3.28M|            case JOP_LOAD_INTEGER:
  ------------------
  |  Branch (5137:13): [True: 3.28M, False: 517M]
  ------------------
 5138|  28.7M|            case JOP_LOAD_CONSTANT:
  ------------------
  |  Branch (5138:13): [True: 25.4M, False: 495M]
  ------------------
 5139|  30.5M|            case JOP_LOAD_UPVALUE:
  ------------------
  |  Branch (5139:13): [True: 1.78M, False: 519M]
  ------------------
 5140|  31.3M|            case JOP_CLOSURE:
  ------------------
  |  Branch (5140:13): [True: 832k, False: 520M]
  ------------------
 5141|  31.3M|                out = Ia;
 5142|  31.3M|                break;
 5143|       |            /* Read A, B */
 5144|  2.29k|            case JOP_PUT_INDEX:
  ------------------
  |  Branch (5144:13): [True: 2.29k, False: 521M]
  ------------------
 5145|  2.29k|                nins = 2;
 5146|  2.29k|                ins[0] = Ia;
 5147|  2.29k|                ins[1] = Ib;
 5148|  2.29k|                pin = 1;
 5149|  2.29k|                break;
 5150|       |            /* Read A, E */
 5151|  17.1M|            case JOP_PUSH_2:
  ------------------
  |  Branch (5151:13): [True: 17.1M, False: 503M]
  ------------------
 5152|  17.1M|                nins = 2;
 5153|  17.1M|                ins[0] = Ia;
 5154|  17.1M|                ins[1] = Ie;
 5155|  17.1M|                pin = 1;
 5156|  17.1M|                break;
 5157|       |            /* A = B op C */
 5158|  4.74k|            case JOP_PROPAGATE:
  ------------------
  |  Branch (5158:13): [True: 4.74k, False: 521M]
  ------------------
 5159|  9.49k|            case JOP_RESUME:
  ------------------
  |  Branch (5159:13): [True: 4.74k, False: 521M]
  ------------------
 5160|  9.56k|            case JOP_CANCEL:
  ------------------
  |  Branch (5160:13): [True: 72, False: 521M]
  ------------------
 5161|   498k|            case JOP_NEXT:
  ------------------
  |  Branch (5161:13): [True: 488k, False: 520M]
  ------------------
 5162|   498k|                pin = 1;
 5163|   498k|                out = Ia;
 5164|   498k|                nins = 2;
 5165|   498k|                ins[0] = Ib;
 5166|   498k|                ins[1] = Ic;
 5167|   498k|                break;
 5168|       |
 5169|       |            /* No side effects below, can remove.
 5170|       |             * Some of these instructions may have side effects if
 5171|       |             * the inputs are abstracts. */
 5172|       |
 5173|       |            /* Loads that write D */
 5174|   268k|            case JOP_LOAD_NIL:
  ------------------
  |  Branch (5174:13): [True: 268k, False: 520M]
  ------------------
 5175|   433k|            case JOP_LOAD_TRUE:
  ------------------
  |  Branch (5175:13): [True: 164k, False: 520M]
  ------------------
 5176|   433k|            case JOP_LOAD_FALSE:
  ------------------
  |  Branch (5176:13): [True: 82, False: 521M]
  ------------------
 5177|   795k|            case JOP_LOAD_SELF:
  ------------------
  |  Branch (5177:13): [True: 362k, False: 520M]
  ------------------
 5178|   795k|                out = Id;
 5179|   795k|                break;
 5180|       |
 5181|       |            /* Moves and similar */
 5182|   143M|            case JOP_MOVE_FAR:
  ------------------
  |  Branch (5182:13): [True: 143M, False: 377M]
  ------------------
 5183|   143M|                out = Ie;
 5184|   143M|                nins = 1;
 5185|   143M|                ins[0] = Ia;
 5186|   143M|                break;
 5187|   148M|            case JOP_MOVE_NEAR:
  ------------------
  |  Branch (5187:13): [True: 148M, False: 372M]
  ------------------
 5188|   148M|            case JOP_LENGTH:
  ------------------
  |  Branch (5188:13): [True: 1.05k, False: 521M]
  ------------------
 5189|   148M|            case JOP_BNOT:
  ------------------
  |  Branch (5189:13): [True: 0, False: 521M]
  ------------------
 5190|   148M|                out = Ia;
 5191|   148M|                nins = 1;
 5192|   148M|                ins[0] = Ie;
 5193|   148M|                break;
 5194|       |
 5195|       |            /* A = B op C */
 5196|      0|            case JOP_BAND:
  ------------------
  |  Branch (5196:13): [True: 0, False: 521M]
  ------------------
 5197|  1.08k|            case JOP_BOR:
  ------------------
  |  Branch (5197:13): [True: 1.08k, False: 521M]
  ------------------
 5198|  1.08k|            case JOP_BXOR:
  ------------------
  |  Branch (5198:13): [True: 0, False: 521M]
  ------------------
 5199|  64.2k|            case JOP_ADD:
  ------------------
  |  Branch (5199:13): [True: 63.2k, False: 521M]
  ------------------
 5200|  67.7k|            case JOP_SUBTRACT:
  ------------------
  |  Branch (5200:13): [True: 3.44k, False: 521M]
  ------------------
 5201|   203k|            case JOP_MULTIPLY:
  ------------------
  |  Branch (5201:13): [True: 135k, False: 520M]
  ------------------
 5202|   208k|            case JOP_DIVIDE:
  ------------------
  |  Branch (5202:13): [True: 5.18k, False: 521M]
  ------------------
 5203|   209k|            case JOP_DIVIDE_FLOOR:
  ------------------
  |  Branch (5203:13): [True: 1.10k, False: 521M]
  ------------------
 5204|   215k|            case JOP_MODULO:
  ------------------
  |  Branch (5204:13): [True: 6.19k, False: 521M]
  ------------------
 5205|   363k|            case JOP_REMAINDER:
  ------------------
  |  Branch (5205:13): [True: 147k, False: 520M]
  ------------------
 5206|   363k|            case JOP_SHIFT_LEFT:
  ------------------
  |  Branch (5206:13): [True: 0, False: 521M]
  ------------------
 5207|   363k|            case JOP_SHIFT_RIGHT:
  ------------------
  |  Branch (5207:13): [True: 0, False: 521M]
  ------------------
 5208|   363k|            case JOP_SHIFT_RIGHT_UNSIGNED:
  ------------------
  |  Branch (5208:13): [True: 0, False: 521M]
  ------------------
 5209|  1.29M|            case JOP_GREATER_THAN:
  ------------------
  |  Branch (5209:13): [True: 934k, False: 520M]
  ------------------
 5210|  1.36M|            case JOP_LESS_THAN:
  ------------------
  |  Branch (5210:13): [True: 65.1k, False: 521M]
  ------------------
 5211|  1.37M|            case JOP_EQUALS:
  ------------------
  |  Branch (5211:13): [True: 9.46k, False: 521M]
  ------------------
 5212|  1.37M|            case JOP_COMPARE:
  ------------------
  |  Branch (5212:13): [True: 2, False: 521M]
  ------------------
 5213|  4.26M|            case JOP_IN:
  ------------------
  |  Branch (5213:13): [True: 2.89M, False: 518M]
  ------------------
 5214|  4.26M|            case JOP_GET:
  ------------------
  |  Branch (5214:13): [True: 1.56k, False: 521M]
  ------------------
 5215|  4.46M|            case JOP_GREATER_THAN_EQUAL:
  ------------------
  |  Branch (5215:13): [True: 191k, False: 520M]
  ------------------
 5216|  4.46M|            case JOP_LESS_THAN_EQUAL:
  ------------------
  |  Branch (5216:13): [True: 5.05k, False: 521M]
  ------------------
 5217|  4.46M|            case JOP_NOT_EQUALS:
  ------------------
  |  Branch (5217:13): [True: 0, False: 521M]
  ------------------
 5218|  4.46M|                out = Ia;
 5219|  4.46M|                nins = 2;
 5220|  4.46M|                ins[0] = Ib;
 5221|  4.46M|                ins[1] = Ic;
 5222|  4.46M|                break;
 5223|       |
 5224|       |            /* A = op B imm */
 5225|  2.05k|            case JOP_ADD_IMMEDIATE:
  ------------------
  |  Branch (5225:13): [True: 2.05k, False: 521M]
  ------------------
 5226|  3.10k|            case JOP_SUBTRACT_IMMEDIATE:
  ------------------
  |  Branch (5226:13): [True: 1.05k, False: 521M]
  ------------------
 5227|  14.0k|            case JOP_MULTIPLY_IMMEDIATE:
  ------------------
  |  Branch (5227:13): [True: 10.9k, False: 521M]
  ------------------
 5228|  15.7k|            case JOP_DIVIDE_IMMEDIATE:
  ------------------
  |  Branch (5228:13): [True: 1.70k, False: 521M]
  ------------------
 5229|  15.7k|            case JOP_SHIFT_LEFT_IMMEDIATE:
  ------------------
  |  Branch (5229:13): [True: 0, False: 521M]
  ------------------
 5230|  15.7k|            case JOP_SHIFT_RIGHT_IMMEDIATE:
  ------------------
  |  Branch (5230:13): [True: 0, False: 521M]
  ------------------
 5231|  15.7k|            case JOP_SHIFT_RIGHT_UNSIGNED_IMMEDIATE:
  ------------------
  |  Branch (5231:13): [True: 0, False: 521M]
  ------------------
 5232|   462k|            case JOP_GREATER_THAN_IMMEDIATE:
  ------------------
  |  Branch (5232:13): [True: 447k, False: 520M]
  ------------------
 5233|   489k|            case JOP_LESS_THAN_IMMEDIATE:
  ------------------
  |  Branch (5233:13): [True: 27.0k, False: 521M]
  ------------------
 5234|   491k|            case JOP_EQUALS_IMMEDIATE:
  ------------------
  |  Branch (5234:13): [True: 1.23k, False: 521M]
  ------------------
 5235|   491k|            case JOP_NOT_EQUALS_IMMEDIATE:
  ------------------
  |  Branch (5235:13): [True: 0, False: 521M]
  ------------------
 5236|   149M|            case JOP_GET_INDEX:
  ------------------
  |  Branch (5236:13): [True: 148M, False: 372M]
  ------------------
 5237|   149M|                out = Ia;
 5238|   149M|                nins = 1;
 5239|   149M|                ins[0] = Ib;
 5240|   149M|                break;
 5241|   521M|        }
 5242|       |        /* Test and set output bit in bitmap. If already set, change to noop. */
 5243|       |        /* Add check to avoid messing with upvalues */
 5244|   520M|        if (mode == 0) {
  ------------------
  |  Branch (5244:13): [True: 260M, False: 260M]
  ------------------
 5245|   260M|            if (out != -1) {
  ------------------
  |  Branch (5245:17): [True: 248M, False: 11.7M]
  ------------------
 5246|   248M|                if (!pin && bs_read_bit(bitset, out) &&
  ------------------
  |  Branch (5246:21): [True: 239M, False: 9.44M]
  |  Branch (5246:29): [True: 6.00M, False: 233M]
  ------------------
 5247|  6.00M|                        (!def->closure_bitset || !bs_read_bit(def->closure_bitset, out))) {
  ------------------
  |  Branch (5247:26): [True: 5.19M, False: 813k]
  |  Branch (5247:50): [True: 704k, False: 108k]
  ------------------
 5248|  5.89M|                    def->bytecode[i] = JOP_NOOP;
 5249|  5.89M|                }
 5250|   248M|                bs_set_bit(bitset, out);
 5251|   248M|            }
 5252|       |            /* Clear input slots from bitmap */
 5253|   508M|            for (int j = 0; j < nins; j++) {
  ------------------
  |  Branch (5253:29): [True: 247M, False: 260M]
  ------------------
 5254|   247M|                bs_clear_bit(bitset, ins[j]);
 5255|   247M|            }
 5256|   260M|        } else if (mode == 1) {
  ------------------
  |  Branch (5256:20): [True: 260M, False: 0]
  ------------------
 5257|       |            /* Clear writes, set reads (in that order!) */
 5258|   260M|            if (out != -1) bs_clear_bit(bitset, out);
  ------------------
  |  Branch (5258:17): [True: 248M, False: 11.7M]
  ------------------
 5259|   508M|            for (int j = 0; j < nins; j++) {
  ------------------
  |  Branch (5259:29): [True: 247M, False: 260M]
  ------------------
 5260|   247M|                janet_assert(ins[j] < def->slotcount, "slot too big");
  ------------------
  |  |  389|   247M|#define janet_assert(c, m) do { \
  |  |  390|   247M|    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: 247M]
  |  |  ------------------
  |  |  391|   247M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 247M]
  |  |  ------------------
  ------------------
 5261|   247M|                bs_set_bit(bitset, ins[j]);
 5262|   247M|            }
 5263|   260M|        }
 5264|   520M|    }
 5265|  3.67M|}
janet.c:bs_clear_bit:
 3908|   496M|static void bs_clear_bit(uint32_t *bitset, int32_t index) {
 3909|   496M|    bitset[bs_indx(index)] &= ~(bs_mask(index));
 3910|   496M|}
janet.c:janet_bytecode_basic_blocks:
 4055|   777k|static BytecodeBB *janet_bytecode_basic_blocks(JanetFuncDef *def, int32_t *n_blocks) {
 4056|   777k|    uint32_t *code = def->bytecode;
 4057|   777k|    int32_t *codes = (int32_t *)code;
 4058|       |    /* Allocate array of blocks to return */
 4059|   777k|    uint32_t *bitmap = janet_bytecode_leader_bitmap(def);
 4060|   777k|    int32_t len = def->bytecode_length;
 4061|   777k|    int32_t words = ((len - 1) / 32) + 1;
 4062|   777k|    int32_t block_count = 0;
 4063|  9.52M|    for (int32_t i = 0; i < words; i++) {
  ------------------
  |  Branch (4063:25): [True: 8.74M, False: 777k]
  ------------------
 4064|       |#ifdef JANET_MSVC
 4065|       |        block_count += __popcnt(bitmap[i]);
 4066|       |#elif defined(__GNUC__)
 4067|       |        block_count += __builtin_popcount(bitmap[i]);
 4068|       |#else
 4069|       |        for (int j = 0; j < 32; j++) {
 4070|       |            uint32_t mask = ((uint32_t)1 << j);
 4071|       |            if (mask & bitmap[i]) block_count++;
 4072|       |        }
 4073|       |#endif
 4074|  8.74M|    }
 4075|   777k|    BytecodeBB *blocks = array_allocate(sizeof(BytecodeBB), block_count);
 4076|   777k|    int32_t next_block_i = 0;
 4077|   777k|    int32_t pc = 0;
 4078|  2.61M|    while (pc < len) {
  ------------------
  |  Branch (4078:12): [True: 1.83M, False: 777k]
  ------------------
 4079|  1.83M|        BytecodeBB bb;
 4080|  1.83M|        bb.start = pc;
 4081|  1.83M|        uint32_t done;
 4082|   260M|        do {
 4083|   260M|            pc++;
 4084|   260M|            done = (pc >= len) || (bitmap[pc >> 5] & (((uint32_t)1) << (pc & 0x1F)));
  ------------------
  |  Branch (4084:20): [True: 777k, False: 259M]
  |  Branch (4084:35): [True: 1.06M, False: 258M]
  ------------------
 4085|   260M|        } while (!done);
  ------------------
  |  Branch (4085:18): [True: 258M, False: 1.83M]
  ------------------
 4086|  1.83M|        janet_assert(pc <= len, "bad block end");
  ------------------
  |  |  389|  1.83M|#define janet_assert(c, m) do { \
  |  |  390|  1.83M|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 1.83M]
  |  |  ------------------
  |  |  391|  1.83M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 1.83M]
  |  |  ------------------
  ------------------
 4087|  1.83M|        bb.end = pc;
 4088|  1.83M|        bb.next[0] = -1;
 4089|  1.83M|        bb.next[1] = -1;
 4090|  1.83M|        blocks[next_block_i++] = bb;
 4091|  1.83M|    }
 4092|   777k|    janet_assert(next_block_i == block_count, "bad block count");
  ------------------
  |  |  389|   777k|#define janet_assert(c, m) do { \
  |  |  390|   777k|    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: 777k]
  |  |  ------------------
  |  |  391|   777k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 777k]
  |  |  ------------------
  ------------------
 4093|       |    /* add forward cfg edges */
 4094|  2.61M|    for (int32_t i = 0; i < block_count; i++) {
  ------------------
  |  Branch (4094:25): [True: 1.83M, False: 777k]
  ------------------
 4095|  1.83M|        int32_t target;
 4096|  1.83M|        janet_assert(blocks[i].end > blocks[i].start, "degenerate block start >= end");
  ------------------
  |  |  389|  1.83M|#define janet_assert(c, m) do { \
  |  |  390|  1.83M|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 1.83M]
  |  |  ------------------
  |  |  391|  1.83M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 1.83M]
  |  |  ------------------
  ------------------
 4097|  1.83M|        int32_t lastpc = blocks[i].end - 1;
 4098|  1.83M|        switch (code[lastpc] & 0x7F) {
 4099|   103k|            default:
  ------------------
  |  Branch (4099:13): [True: 103k, False: 1.73M]
  ------------------
 4100|   103k|                blocks[i].next[0] = i + 1; /* blocks sorted by increasing start */
 4101|   103k|                continue;
 4102|     63|            case JOP_ERROR:
  ------------------
  |  Branch (4102:13): [True: 63, False: 1.83M]
  ------------------
 4103|   533k|            case JOP_RETURN:
  ------------------
  |  Branch (4103:13): [True: 533k, False: 1.30M]
  ------------------
 4104|   755k|            case JOP_RETURN_NIL:
  ------------------
  |  Branch (4104:13): [True: 221k, False: 1.61M]
  ------------------
 4105|   931k|            case JOP_TAILCALL:
  ------------------
  |  Branch (4105:13): [True: 175k, False: 1.66M]
  ------------------
 4106|   931k|                continue;
 4107|  4.70k|            case JOP_JUMP_IF:
  ------------------
  |  Branch (4107:13): [True: 4.70k, False: 1.83M]
  ------------------
 4108|  33.6k|            case JOP_JUMP_IF_NIL:
  ------------------
  |  Branch (4108:13): [True: 28.9k, False: 1.80M]
  ------------------
 4109|   580k|            case JOP_JUMP_IF_NOT:
  ------------------
  |  Branch (4109:13): [True: 547k, False: 1.29M]
  ------------------
 4110|   739k|            case JOP_JUMP_IF_NOT_NIL:
  ------------------
  |  Branch (4110:13): [True: 158k, False: 1.68M]
  ------------------
 4111|   739k|                blocks[i].next[1] = i + 1; /* blocks sorted by increasing start */
 4112|   739k|                target = lastpc + (codes[lastpc] >> 16);
 4113|   739k|                break;
 4114|  64.6k|            case JOP_JUMP:
  ------------------
  |  Branch (4114:13): [True: 64.6k, False: 1.77M]
  ------------------
 4115|  64.6k|                target = lastpc + (codes[lastpc] >> 8);
 4116|  64.6k|                break;
 4117|  1.83M|        }
 4118|       |        /* Find block whose start = target */
 4119|   804k|        int32_t j;
 4120|  15.7M|        for (j = 0; j < block_count; j++) {
  ------------------
  |  Branch (4120:21): [True: 15.7M, False: 0]
  ------------------
 4121|  15.7M|            if (blocks[j].start == target) {
  ------------------
  |  Branch (4121:17): [True: 804k, False: 14.9M]
  ------------------
 4122|   804k|                blocks[i].next[0] = j;
 4123|   804k|                break;
 4124|   804k|            }
 4125|  15.7M|        }
 4126|   804k|        janet_assert(j < block_count, "did not find next block");
  ------------------
  |  |  389|   804k|#define janet_assert(c, m) do { \
  |  |  390|   804k|    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: 804k]
  |  |  ------------------
  |  |  391|   804k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 804k]
  |  |  ------------------
  ------------------
 4127|   804k|    }
 4128|   777k|    janet_free(bitmap);
  ------------------
  |  | 2415|   777k|#define janet_free(X) free((X))
  ------------------
 4129|   777k|    *n_blocks = block_count;
 4130|   777k|    return blocks;
 4131|   777k|}
janet.c:janet_bytecode_leader_bitmap:
 4014|   777k|static uint32_t *janet_bytecode_leader_bitmap(JanetFuncDef *def) {
 4015|   777k|    uint32_t *code = def->bytecode;
 4016|   777k|    int32_t *codes = (int32_t *)code;
 4017|   777k|    int32_t len = def->bytecode_length;
 4018|   777k|    int32_t words = ((len - 1) / 32) + 1;
 4019|   777k|    uint32_t *leaders = array_allocate(sizeof(uint32_t), words);
 4020|   777k|    janet_assert(words >= 0, "bad len");
  ------------------
  |  |  389|   777k|#define janet_assert(c, m) do { \
  |  |  390|   777k|    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: 777k]
  |  |  ------------------
  |  |  391|   777k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 777k]
  |  |  ------------------
  ------------------
 4021|   777k|    memset(leaders, 0, (size_t) words * sizeof(uint32_t));
 4022|   777k|    int did_jump = 1; /* pc=0 is a leader */
 4023|   777k|    uint32_t target = 0;
 4024|   261M|    for (int32_t pc = 0; pc < len; pc++) {
  ------------------
  |  Branch (4024:26): [True: 260M, False: 777k]
  ------------------
 4025|   260M|        if (did_jump) bs_set_bit(leaders, pc);
  ------------------
  |  Branch (4025:13): [True: 1.73M, False: 258M]
  ------------------
 4026|   260M|        did_jump = 0;
 4027|   260M|        switch (code[pc] & 0x7F) {
 4028|   258M|            default:
  ------------------
  |  Branch (4028:13): [True: 258M, False: 1.73M]
  ------------------
 4029|   258M|                continue;
 4030|   258M|            case JOP_RETURN_NIL:
  ------------------
  |  Branch (4030:13): [True: 221k, False: 260M]
  ------------------
 4031|   755k|            case JOP_RETURN:
  ------------------
  |  Branch (4031:13): [True: 533k, False: 260M]
  ------------------
 4032|   755k|            case JOP_ERROR:
  ------------------
  |  Branch (4032:13): [True: 63, False: 260M]
  ------------------
 4033|   931k|            case JOP_TAILCALL:
  ------------------
  |  Branch (4033:13): [True: 175k, False: 260M]
  ------------------
 4034|   931k|                did_jump = 1;
 4035|   931k|                continue;
 4036|  64.6k|            case JOP_JUMP:
  ------------------
  |  Branch (4036:13): [True: 64.6k, False: 260M]
  ------------------
 4037|  64.6k|                target = pc + (codes[pc] >> 8);
 4038|  64.6k|                bs_set_bit(leaders, target);
 4039|  64.6k|                did_jump = 1;
 4040|  64.6k|                continue;
 4041|  4.70k|            case JOP_JUMP_IF:
  ------------------
  |  Branch (4041:13): [True: 4.70k, False: 260M]
  ------------------
 4042|  33.6k|            case JOP_JUMP_IF_NIL:
  ------------------
  |  Branch (4042:13): [True: 28.9k, False: 260M]
  ------------------
 4043|   580k|            case JOP_JUMP_IF_NOT:
  ------------------
  |  Branch (4043:13): [True: 547k, False: 260M]
  ------------------
 4044|   739k|            case JOP_JUMP_IF_NOT_NIL:
  ------------------
  |  Branch (4044:13): [True: 158k, False: 260M]
  ------------------
 4045|   739k|                target = pc + (codes[pc] >> 16);
 4046|   739k|                bs_set_bit(leaders, target);
 4047|   739k|                did_jump = 1;
 4048|   739k|                continue;
 4049|   260M|        }
 4050|   260M|    }
 4051|   777k|    return leaders;
 4052|   777k|}
janet.c:janet_strlike_cmp:
 6112|   288M|static int janet_strlike_cmp(JanetType type, Janet x, const char *cstring) {
 6113|   288M|    if (janet_type(x) != type) return 0;
  ------------------
  |  |  795|   288M|    (isnan((x).number) \
  |  |  796|   288M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   288M|        : JANET_NUMBER)
  ------------------
  |  Branch (6113:9): [True: 288M, False: 1.31k]
  |  Branch (6113:9): [True: 69.9k, False: 288M]
  ------------------
 6114|   288M|    return !janet_cstrcmp(janet_unwrap_string(x), cstring);
  ------------------
  |  |  863|   288M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
 6115|   288M|}
janet.c:maxarity1:
 6522|     20|static int maxarity1(JanetFopts opts, JanetSlot *args) {
 6523|     20|    (void) opts;
 6524|       |    return janet_v_count(args) <= 1;
  ------------------
  |  |  736|     20|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|     20|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|     20|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 20, False: 0]
  |  |  ------------------
  ------------------
 6525|     20|}
janet.c:do_debug:
 6644|      7|static JanetSlot do_debug(JanetFopts opts, JanetSlot *args) {
 6645|      7|    (void)args;
 6646|      7|    int32_t len = janet_v_count(args);
  ------------------
  |  |  736|      7|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|      7|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|      7|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 7, False: 0]
  |  |  ------------------
  ------------------
 6647|      7|    JanetSlot t = janetc_gettarget(opts);
 6648|      7|    janetc_emit_ssu(opts.compiler, JOP_SIGNAL, t,
 6649|      7|                    (len == 1) ? args[0] : janetc_cslot(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 (6649:21): [True: 7, False: 0]
  ------------------
 6650|      7|                    JANET_SIGNAL_DEBUG,
 6651|      7|                    1);
 6652|      7|    return t;
 6653|      7|}
janet.c:fixarity1:
 6518|  1.55k|static int fixarity1(JanetFopts opts, JanetSlot *args) {
 6519|  1.55k|    (void) opts;
 6520|       |    return janet_v_count(args) == 1;
  ------------------
  |  |  736|  1.55k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  1.55k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.55k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 1.55k, False: 0]
  |  |  ------------------
  ------------------
 6521|  1.55k|}
janet.c:do_error:
 6640|     30|static JanetSlot do_error(JanetFopts opts, JanetSlot *args) {
 6641|     30|    janetc_emit_s(opts.compiler, JOP_ERROR, args[0], 0);
 6642|     30|    return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|     30|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     30|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     30|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     30|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6643|     30|}
janet.c:minarity2:
 6526|  2.49k|static int minarity2(JanetFopts opts, JanetSlot *args) {
 6527|  2.49k|    (void) opts;
 6528|       |    return janet_v_count(args) >= 2;
  ------------------
  |  |  736|  2.49k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  2.49k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  2.49k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 2.49k, False: 0]
  |  |  ------------------
  ------------------
 6529|  2.49k|}
janet.c:do_apply:
 6726|  2.49k|static JanetSlot do_apply(JanetFopts opts, JanetSlot *args) {
 6727|       |    /* Push phase */
 6728|  2.49k|    JanetCompiler *c = opts.compiler;
 6729|  2.49k|    int32_t i;
 6730|  2.49k|    for (i = 1; i < janet_v_count(args) - 3; i += 3)
  ------------------
  |  |  736|  2.49k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  2.49k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  2.49k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 2.49k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (6730:17): [True: 0, False: 2.49k]
  ------------------
 6731|      0|        janetc_emit_sss(c, JOP_PUSH_3, args[i], args[i + 1], args[i + 2], 0);
 6732|  2.49k|    if (i == janet_v_count(args) - 3)
  ------------------
  |  |  736|  2.49k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  2.49k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  2.49k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 2.49k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (6732:9): [True: 0, False: 2.49k]
  ------------------
 6733|      0|        janetc_emit_ss(c, JOP_PUSH_2, args[i], args[i + 1], 0);
 6734|  2.49k|    else if (i == janet_v_count(args) - 2)
  ------------------
  |  |  736|  2.49k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  2.49k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  2.49k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 2.49k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (6734:14): [True: 0, False: 2.49k]
  ------------------
 6735|      0|        janetc_emit_s(c, JOP_PUSH, args[i], 0);
 6736|       |    /* Push array phase */
 6737|  2.49k|    janetc_emit_s(c, JOP_PUSH_ARRAY, janet_v_last(args), 0);
  ------------------
  |  |  737|  2.49k|#define janet_v_last(v)         ((v)[janet_v__cnt(v) - 1])
  |  |  ------------------
  |  |  |  |  743|  2.49k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  2.49k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6738|       |    /* Call phase */
 6739|  2.49k|    JanetSlot target;
 6740|  2.49k|    if (opts.flags & JANET_FOPTS_TAIL) {
  ------------------
  |  | 1124|  2.49k|#define JANET_FOPTS_TAIL 0x10000
  ------------------
  |  Branch (6740:9): [True: 0, False: 2.49k]
  ------------------
 6741|      0|        janetc_emit_s(c, JOP_TAILCALL, args[0], 0);
 6742|      0|        target = janetc_cslot(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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6743|      0|        target.flags |= JANET_SLOT_RETURNED;
  ------------------
  |  | 1019|      0|#define JANET_SLOT_RETURNED 0x100000
  ------------------
 6744|  2.49k|    } else {
 6745|  2.49k|        target = janetc_gettarget(opts);
 6746|  2.49k|        janetc_emit_ss(c, JOP_CALL, target, args[0], 1);
 6747|  2.49k|    }
 6748|  2.49k|    return target;
 6749|  2.49k|}
janet.c:do_yield:
 6713|     11|static JanetSlot do_yield(JanetFopts opts, JanetSlot *args) {
 6714|     11|    if (janet_v_count(args) == 0) {
  ------------------
  |  |  736|     11|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|     11|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|     11|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 11, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (6714:9): [True: 0, False: 11]
  ------------------
 6715|      0|        return genericSSI(opts, JOP_SIGNAL, janetc_cslot(janet_wrap_nil()), 3);
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6716|     11|    } else {
 6717|     11|        return genericSSI(opts, JOP_SIGNAL, args[0], 3);
 6718|     11|    }
 6719|     11|}
janet.c:genericSSI:
 6551|     11|static JanetSlot genericSSI(JanetFopts opts, int op, JanetSlot s, int32_t imm) {
 6552|     11|    JanetSlot target = janetc_gettarget(opts);
 6553|     11|    janetc_emit_ssi(opts.compiler, op, target, s, imm, 1);
 6554|     11|    return target;
 6555|     11|}
janet.c:arity1or2:
 6508|  85.0k|static int arity1or2(JanetFopts opts, JanetSlot *args) {
 6509|  85.0k|    (void) opts;
 6510|  85.0k|    int32_t arity = janet_v_count(args);
  ------------------
  |  |  736|  85.0k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  85.0k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  85.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 85.0k, False: 0]
  |  |  ------------------
  ------------------
 6511|  85.0k|    return arity == 1 || arity == 2;
  ------------------
  |  Branch (6511:12): [True: 1.23k, False: 83.8k]
  |  Branch (6511:26): [True: 83.8k, False: 0]
  ------------------
 6512|  85.0k|}
janet.c:do_resume:
 6720|  1.23k|static JanetSlot do_resume(JanetFopts opts, JanetSlot *args) {
 6721|  1.23k|    return opfunction(opts, args, JOP_RESUME, janet_wrap_nil());
  ------------------
  |  |  831|  1.23k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.23k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.23k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.23k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6722|  1.23k|}
janet.c:opfunction:
 6562|  85.0k|    Janet defaultArg2) {
 6563|  85.0k|    JanetCompiler *c = opts.compiler;
 6564|  85.0k|    int32_t len;
 6565|  85.0k|    len = janet_v_count(args);
  ------------------
  |  |  736|  85.0k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  85.0k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  85.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 85.0k, False: 0]
  |  |  ------------------
  ------------------
 6566|  85.0k|    JanetSlot t;
 6567|  85.0k|    if (len == 1) {
  ------------------
  |  Branch (6567:9): [True: 1.23k, False: 83.8k]
  ------------------
 6568|  1.23k|        t = janetc_gettarget(opts);
 6569|  1.23k|        janetc_emit_sss(c, op, t, args[0], janetc_cslot(defaultArg2), 1);
 6570|  1.23k|        return t;
 6571|  83.8k|    } else {
 6572|       |        /* len == 2 */
 6573|  83.8k|        t = janetc_gettarget(opts);
 6574|  83.8k|        janetc_emit_sss(c, op, t, args[0], args[1], 1);
 6575|  83.8k|    }
 6576|  83.8k|    return t;
 6577|  85.0k|}
janet.c:fixarity2:
 6530|  55.8k|static int fixarity2(JanetFopts opts, JanetSlot *args) {
 6531|  55.8k|    (void) opts;
 6532|       |    return janet_v_count(args) == 2;
  ------------------
  |  |  736|  55.8k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  55.8k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  55.8k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 55.8k, False: 0]
  |  |  ------------------
  ------------------
 6533|  55.8k|}
janet.c:do_in:
 6654|  54.5k|static JanetSlot do_in(JanetFopts opts, JanetSlot *args) {
 6655|  54.5k|    return opreduce(opts, args, JOP_IN, 0, janet_wrap_nil(), janet_wrap_nil());
  ------------------
  |  |  831|  54.5k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  54.5k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  54.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  54.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  return opreduce(opts, args, JOP_IN, 0, janet_wrap_nil(), janet_wrap_nil());
  ------------------
  |  |  831|  54.5k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  54.5k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  54.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  54.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6656|  54.5k|}
janet.c:opreduce:
 6601|   127k|    Janet unary) {
 6602|   127k|    JanetCompiler *c = opts.compiler;
 6603|   127k|    int32_t i, len;
 6604|   127k|    int8_t imm = 0;
 6605|   127k|    len = janet_v_count(args);
  ------------------
  |  |  736|   127k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   126k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   126k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 126k, False: 1.07k]
  |  |  ------------------
  ------------------
 6606|   127k|    JanetSlot t;
 6607|   127k|    if (len == 0) {
  ------------------
  |  Branch (6607:9): [True: 1.07k, False: 126k]
  ------------------
 6608|  1.07k|        return janetc_cslot(nullary);
 6609|   126k|    } else if (len == 1) {
  ------------------
  |  Branch (6609:16): [True: 14.4k, False: 112k]
  ------------------
 6610|  14.4k|        t = janetc_gettarget(opts);
 6611|       |        /* Special case subtract to be times -1 */
 6612|  14.4k|        if (op == JOP_SUBTRACT) {
  ------------------
  |  Branch (6612:13): [True: 75, False: 14.3k]
  ------------------
 6613|     75|            janetc_emit_ssi(c, JOP_MULTIPLY_IMMEDIATE, t, args[0], -1, 1);
 6614|  14.3k|        } else {
 6615|  14.3k|            janetc_emit_sss(c, op, t, janetc_cslot(unary), args[0], 1);
 6616|  14.3k|        }
 6617|  14.4k|        return t;
 6618|  14.4k|    }
 6619|   112k|    t = janetc_gettarget(opts);
 6620|   112k|    if (opim && can_slot_be_imm(args[1], &imm)) {
  ------------------
  |  Branch (6620:9): [True: 14.0k, False: 98.0k]
  |  Branch (6620:17): [True: 2.13k, False: 11.8k]
  ------------------
 6621|  2.13k|        janetc_emit_ssi(c, opim, t, args[0], imm, 1);
 6622|   109k|    } else {
 6623|   109k|        janetc_emit_sss(c, op, t, args[0], args[1], 1);
 6624|   109k|    }
 6625|   178k|    for (i = 2; i < len; i++) {
  ------------------
  |  Branch (6625:17): [True: 66.6k, False: 112k]
  ------------------
 6626|  66.6k|        if (opim && can_slot_be_imm(args[i], &imm)) {
  ------------------
  |  Branch (6626:13): [True: 26.3k, False: 40.3k]
  |  Branch (6626:21): [True: 2.72k, False: 23.6k]
  ------------------
 6627|  2.72k|            janetc_emit_ssi(c, opim, t, t, imm, 1);
 6628|  63.9k|        } else {
 6629|  63.9k|            janetc_emit_sss(c, op, t, t, args[i], 1);
 6630|  63.9k|        }
 6631|  66.6k|    }
 6632|   112k|    return t;
 6633|   127k|}
janet.c:can_slot_be_imm:
 6589|   317k|static int can_slot_be_imm(JanetSlot s, int8_t *out) {
 6590|   317k|    if (!(s.flags & JANET_SLOT_CONSTANT)) return 0;
  ------------------
  |  | 1015|   317k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (6590:9): [True: 29.9k, False: 287k]
  ------------------
 6591|   287k|    return can_be_imm(s.constant, out);
 6592|   317k|}
janet.c:can_be_imm:
 6580|   287k|static int can_be_imm(Janet x, int8_t *out) {
 6581|   287k|    if (!janet_checkint(x)) return 0;
  ------------------
  |  Branch (6581:9): [True: 161k, False: 125k]
  ------------------
 6582|   125k|    int32_t integer = janet_unwrap_integer(x);
  ------------------
  |  |  966|   125k|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|   125k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
 6583|   125k|    if (integer > INT8_MAX || integer < INT8_MIN) return 0;
  ------------------
  |  Branch (6583:9): [True: 806, False: 124k]
  |  Branch (6583:31): [True: 1.75k, False: 123k]
  ------------------
 6584|   123k|    *out = (int8_t) integer;
 6585|   123k|    return 1;
 6586|   125k|}
janet.c:fixarity3:
 6534|    626|static int fixarity3(JanetFopts opts, JanetSlot *args) {
 6535|    626|    (void) opts;
 6536|       |    return janet_v_count(args) == 3;
  ------------------
  |  |  736|    626|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|    626|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    626|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 626, False: 0]
  |  |  ------------------
  ------------------
 6537|    626|}
janet.c:do_put:
 6684|    244|static JanetSlot do_put(JanetFopts opts, JanetSlot *args) {
 6685|    244|    int8_t inline_index = 0;
 6686|    244|    if (can_slot_be_imm(args[1], &inline_index)) {
  ------------------
  |  Branch (6686:9): [True: 92, False: 152]
  ------------------
 6687|       |        /* Use JOP_PUT_INDEX */
 6688|     92|        if (opts.flags & JANET_FOPTS_DROP) {
  ------------------
  |  | 1126|     92|#define JANET_FOPTS_DROP 0x40000
  ------------------
  |  Branch (6688:13): [True: 79, False: 13]
  ------------------
 6689|     79|            janetc_emit_ssi(opts.compiler, JOP_PUT_INDEX, args[0], args[2], inline_index, 0);
 6690|     79|            return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|     79|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     79|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     79|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     79|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6691|     79|        } else {
 6692|     13|            JanetSlot t = janetc_gettarget(opts);
 6693|     13|            janetc_copy(opts.compiler, t, args[0]);
 6694|     13|            janetc_emit_ssi(opts.compiler, JOP_PUT_INDEX, t, args[2], inline_index, 0);
 6695|     13|            return t;
 6696|     13|        }
 6697|    152|    } else {
 6698|       |        /* Use JOP_PUT */
 6699|    152|        if (opts.flags & JANET_FOPTS_DROP) {
  ------------------
  |  | 1126|    152|#define JANET_FOPTS_DROP 0x40000
  ------------------
  |  Branch (6699:13): [True: 15, False: 137]
  ------------------
 6700|     15|            janetc_emit_sss(opts.compiler, JOP_PUT, args[0], args[1], args[2], 0);
 6701|     15|            return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|     15|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     15|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     15|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     15|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6702|    137|        } else {
 6703|    137|            JanetSlot t = janetc_gettarget(opts);
 6704|    137|            janetc_copy(opts.compiler, t, args[0]);
 6705|    137|            janetc_emit_sss(opts.compiler, JOP_PUT, t, args[1], args[2], 0);
 6706|    137|            return t;
 6707|    137|        }
 6708|    152|    }
 6709|    244|}
janet.c:do_length:
 6710|  1.51k|static JanetSlot do_length(JanetFopts opts, JanetSlot *args) {
 6711|  1.51k|    return genericSS(opts, JOP_LENGTH, args[0]);
 6712|  1.51k|}
janet.c:genericSS:
 6544|  1.51k|static JanetSlot genericSS(JanetFopts opts, int op, JanetSlot s) {
 6545|  1.51k|    JanetSlot target = janetc_gettarget(opts);
 6546|  1.51k|    janetc_emit_ss(opts.compiler, op, target, s, 1);
 6547|  1.51k|    return target;
 6548|  1.51k|}
janet.c:do_add:
 6753|  1.06k|static JanetSlot do_add(JanetFopts opts, JanetSlot *args) {
 6754|  1.06k|    return opreduce(opts, args, JOP_ADD, JOP_ADD_IMMEDIATE, janet_wrap_integer(0), janet_wrap_integer(0));
  ------------------
  |  |  967|  1.06k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  1.06k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
                  return opreduce(opts, args, JOP_ADD, JOP_ADD_IMMEDIATE, janet_wrap_integer(0), janet_wrap_integer(0));
  ------------------
  |  |  967|  1.06k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  1.06k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 6755|  1.06k|}
janet.c:do_sub:
 6756|    478|static JanetSlot do_sub(JanetFopts opts, JanetSlot *args) {
 6757|    478|    return opreduce(opts, args, JOP_SUBTRACT, JOP_SUBTRACT_IMMEDIATE, janet_wrap_integer(0), janet_wrap_integer(0));
  ------------------
  |  |  967|    478|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|    478|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
                  return opreduce(opts, args, JOP_SUBTRACT, JOP_SUBTRACT_IMMEDIATE, janet_wrap_integer(0), janet_wrap_integer(0));
  ------------------
  |  |  967|    478|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|    478|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 6758|    478|}
janet.c:do_mul:
 6759|  26.9k|static JanetSlot do_mul(JanetFopts opts, JanetSlot *args) {
 6760|  26.9k|    return opreduce(opts, args, JOP_MULTIPLY, JOP_MULTIPLY_IMMEDIATE, janet_wrap_integer(1), janet_wrap_integer(1));
  ------------------
  |  |  967|  26.9k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  26.9k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
                  return opreduce(opts, args, JOP_MULTIPLY, JOP_MULTIPLY_IMMEDIATE, janet_wrap_integer(1), janet_wrap_integer(1));
  ------------------
  |  |  967|  26.9k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  26.9k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 6761|  26.9k|}
janet.c:do_div:
 6762|    483|static JanetSlot do_div(JanetFopts opts, JanetSlot *args) {
 6763|    483|    return opreduce(opts, args, JOP_DIVIDE, JOP_DIVIDE_IMMEDIATE, janet_wrap_integer(1), janet_wrap_integer(1));
  ------------------
  |  |  967|    483|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|    483|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
                  return opreduce(opts, args, JOP_DIVIDE, JOP_DIVIDE_IMMEDIATE, janet_wrap_integer(1), janet_wrap_integer(1));
  ------------------
  |  |  967|    483|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|    483|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 6764|    483|}
janet.c:do_bor:
 6777|     72|static JanetSlot do_bor(JanetFopts opts, JanetSlot *args) {
 6778|     72|    return opreduce(opts, args, JOP_BOR, 0, janet_wrap_integer(0), janet_wrap_integer(0));
  ------------------
  |  |  967|     72|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|     72|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
                  return opreduce(opts, args, JOP_BOR, 0, janet_wrap_integer(0), janet_wrap_integer(0));
  ------------------
  |  |  967|     72|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|     72|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 6779|     72|}
janet.c:prevent_huge:
 6538|   270k|static int prevent_huge(JanetFopts opts, JanetSlot *args) {
 6539|   270k|    (void) opts;
 6540|       |    return janet_v_count(args) < 1000;
  ------------------
  |  |  736|   270k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   257k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   257k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 257k, False: 12.9k]
  |  |  ------------------
  ------------------
 6541|   270k|}
janet.c:do_gt:
 6844|   157k|static JanetSlot do_gt(JanetFopts opts, JanetSlot *args) {
 6845|   157k|    return compreduce(opts, args, JOP_GREATER_THAN, JOP_GREATER_THAN_IMMEDIATE, 0);
 6846|   157k|}
janet.c:compreduce:
 6802|   270k|    int invert) {
 6803|   270k|    JanetCompiler *c = opts.compiler;
 6804|   270k|    int32_t i, len;
 6805|   270k|    int8_t imm = 0;
 6806|   270k|    len = janet_v_count(args);
  ------------------
  |  |  736|   270k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   257k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   257k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 257k, False: 12.9k]
  |  |  ------------------
  ------------------
 6807|   270k|    int32_t *labels = NULL;
 6808|   270k|    JanetSlot t;
 6809|   270k|    if (len < 2) {
  ------------------
  |  Branch (6809:9): [True: 25.5k, False: 244k]
  ------------------
 6810|  25.5k|        return invert
  ------------------
  |  Branch (6810:16): [True: 0, False: 25.5k]
  ------------------
 6811|  25.5k|               ? janetc_cslot(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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6812|  25.5k|               : janetc_cslot(janet_wrap_true());
  ------------------
  |  |  832|  25.5k|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  822|  25.5k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  25.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  25.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6813|  25.5k|    }
 6814|   244k|    t = janetc_gettarget(opts);
 6815|   619k|    for (i = 1; i < len; i++) {
  ------------------
  |  Branch (6815:17): [True: 374k, False: 244k]
  ------------------
 6816|   374k|        if (opim && can_slot_be_imm(args[i], &imm)) {
  ------------------
  |  Branch (6816:13): [True: 276k, False: 97.8k]
  |  Branch (6816:21): [True: 118k, False: 158k]
  ------------------
 6817|   118k|            janetc_emit_ssi(c, opim, t, args[i - 1], imm, 1);
 6818|   256k|        } else {
 6819|   256k|            janetc_emit_sss(c, op, t, args[i - 1], args[i], 1);
 6820|   256k|        }
 6821|   374k|        if (i != (len - 1)) {
  ------------------
  |  Branch (6821:13): [True: 129k, False: 244k]
  ------------------
 6822|   129k|            int32_t label = janetc_emit_si(c, invert ? JOP_JUMP_IF : JOP_JUMP_IF_NOT, t, 0, 1);
  ------------------
  |  Branch (6822:47): [True: 0, False: 129k]
  ------------------
 6823|   129k|            janet_v_push(labels, label);
  ------------------
  |  |  734|   129k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|   129k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|   129k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|   100k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|   100k|#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|   100k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|   100k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 29.5k, False: 100k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 60.8k, False: 39.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  90.4k|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  743|   129k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   129k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6824|   129k|        }
 6825|   374k|    }
 6826|   244k|    int bad_jump = 0;
 6827|   244k|    int32_t end = janet_v_count(c->buffer);
  ------------------
  |  |  736|   244k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   244k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   244k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 244k, False: 0]
  |  |  ------------------
  ------------------
 6828|   374k|    for (i = 0; i < janet_v_count(labels); i++) {
  ------------------
  |  |  736|   374k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   159k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   159k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 159k, False: 215k]
  |  |  ------------------
  ------------------
  |  Branch (6828:17): [True: 129k, False: 244k]
  ------------------
 6829|   129k|        int32_t label = labels[i];
 6830|   129k|        if (end - label > INT16_MAX) { /* Ideally we would just back out of the optimization */
  ------------------
  |  Branch (6830:13): [True: 0, False: 129k]
  ------------------
 6831|      0|            bad_jump = 1;
 6832|   129k|        } else {
 6833|   129k|            c->buffer[label] |= ((uint32_t)(end - label) << 16);
 6834|   129k|        }
 6835|   129k|    }
 6836|   244k|    janet_v_free(labels);
  ------------------
  |  |  733|   244k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|  29.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 29.5k, False: 215k]
  |  |  ------------------
  ------------------
 6837|   244k|    if (bad_jump) {
  ------------------
  |  Branch (6837:9): [True: 0, False: 244k]
  ------------------
 6838|      0|        janetc_error(c, janet_cstring("16-bit jump overflow"));
 6839|      0|        return janetc_cslot(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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6840|      0|    }
 6841|   244k|    return t;
 6842|   244k|}
janet.c:do_lt:
 6847|  9.24k|static JanetSlot do_lt(JanetFopts opts, JanetSlot *args) {
 6848|  9.24k|    return compreduce(opts, args, JOP_LESS_THAN, JOP_LESS_THAN_IMMEDIATE, 0);
 6849|  9.24k|}
janet.c:do_gte:
 6850|  23.9k|static JanetSlot do_gte(JanetFopts opts, JanetSlot *args) {
 6851|  23.9k|    return compreduce(opts, args, JOP_GREATER_THAN_EQUAL, 0, 0);
 6852|  23.9k|}
janet.c:do_lte:
 6853|  1.53k|static JanetSlot do_lte(JanetFopts opts, JanetSlot *args) {
 6854|  1.53k|    return compreduce(opts, args, JOP_LESS_THAN_EQUAL, 0, 0);
 6855|  1.53k|}
janet.c:do_eq:
 6856|  78.3k|static JanetSlot do_eq(JanetFopts opts, JanetSlot *args) {
 6857|  78.3k|    return compreduce(opts, args, JOP_EQUALS, JOP_EQUALS_IMMEDIATE, 0);
 6858|  78.3k|}
janet.c:do_propagate:
 6637|  1.23k|static JanetSlot do_propagate(JanetFopts opts, JanetSlot *args) {
 6638|  1.23k|    return opreduce(opts, args, JOP_PROPAGATE, 0, janet_wrap_nil(), janet_wrap_nil());
  ------------------
  |  |  831|  1.23k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.23k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.23k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.23k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  return opreduce(opts, args, JOP_PROPAGATE, 0, janet_wrap_nil(), janet_wrap_nil());
  ------------------
  |  |  831|  1.23k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.23k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.23k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.23k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6639|  1.23k|}
janet.c:arity2or3:
 6513|  41.7k|static int arity2or3(JanetFopts opts, JanetSlot *args) {
 6514|  41.7k|    (void) opts;
 6515|  41.7k|    int32_t arity = janet_v_count(args);
  ------------------
  |  |  736|  41.7k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  41.7k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  41.7k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 41.7k, False: 0]
  |  |  ------------------
  ------------------
 6516|  41.7k|    return arity == 2 || arity == 3;
  ------------------
  |  Branch (6516:12): [True: 41.6k, False: 104]
  |  Branch (6516:26): [True: 102, False: 2]
  ------------------
 6517|  41.7k|}
janet.c:do_get:
 6657|  41.7k|static JanetSlot do_get(JanetFopts opts, JanetSlot *args) {
 6658|  41.7k|    if (janet_v_count(args) == 3) {
  ------------------
  |  |  736|  41.7k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  41.7k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  41.7k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 41.7k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (6658:9): [True: 102, False: 41.6k]
  ------------------
 6659|    102|        JanetCompiler *c = opts.compiler;
 6660|    102|        JanetSlot t = janetc_gettarget(opts);
 6661|    102|        int target_is_default = janetc_sequal(t, args[2]);
 6662|    102|        JanetSlot dflt_slot = args[2];
 6663|    102|        if (target_is_default) {
  ------------------
  |  Branch (6663:13): [True: 0, False: 102]
  ------------------
 6664|      0|            dflt_slot = janetc_farslot(c);
 6665|      0|            janetc_copy(c, dflt_slot, t);
 6666|      0|        }
 6667|    102|        janetc_emit_sss(c, JOP_GET, t, args[0], args[1], 1);
 6668|    102|        int32_t label = janetc_emit_si(c, JOP_JUMP_IF_NOT_NIL, t, 0, 0);
 6669|    102|        janetc_copy(c, t, dflt_slot);
 6670|    102|        if (target_is_default) janetc_freeslot(c, dflt_slot);
  ------------------
  |  Branch (6670:13): [True: 0, False: 102]
  ------------------
 6671|    102|        int32_t current = janet_v_count(c->buffer);
  ------------------
  |  |  736|    102|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|    102|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    102|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 102, False: 0]
  |  |  ------------------
  ------------------
 6672|    102|        c->buffer[label] |= (uint32_t)(current - label) << 16;
 6673|    102|        return t;
 6674|  41.6k|    } else {
 6675|  41.6k|        return opreduce(opts, args, JOP_GET, 0, janet_wrap_nil(), janet_wrap_nil());
  ------------------
  |  |  831|  41.6k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  41.6k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  41.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  41.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      return opreduce(opts, args, JOP_GET, 0, janet_wrap_nil(), janet_wrap_nil());
  ------------------
  |  |  831|  41.6k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  41.6k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  41.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  41.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6676|  41.6k|    }
 6677|  41.7k|}
janet.c:do_next:
 6678|  83.8k|static JanetSlot do_next(JanetFopts opts, JanetSlot *args) {
 6679|  83.8k|    return opfunction(opts, args, JOP_NEXT, janet_wrap_nil());
  ------------------
  |  |  831|  83.8k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  83.8k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  83.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  83.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6680|  83.8k|}
janet.c:do_modulo:
 6768|    183|static JanetSlot do_modulo(JanetFopts opts, JanetSlot *args) {
 6769|    183|    return opreduce(opts, args, JOP_MODULO, 0, janet_wrap_integer(0), janet_wrap_integer(1));
  ------------------
  |  |  967|    183|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|    183|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
                  return opreduce(opts, args, JOP_MODULO, 0, janet_wrap_integer(0), janet_wrap_integer(1));
  ------------------
  |  |  967|    183|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|    183|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 6770|    183|}
janet.c:do_remainder:
 6771|    478|static JanetSlot do_remainder(JanetFopts opts, JanetSlot *args) {
 6772|    478|    return opreduce(opts, args, JOP_REMAINDER, 0, janet_wrap_integer(0), janet_wrap_integer(1));
  ------------------
  |  |  967|    478|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|    478|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
                  return opreduce(opts, args, JOP_REMAINDER, 0, janet_wrap_integer(0), janet_wrap_integer(1));
  ------------------
  |  |  967|    478|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|    478|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 6773|    478|}
janet.c:do_cmp:
 6681|      1|static JanetSlot do_cmp(JanetFopts opts, JanetSlot *args) {
 6682|      1|    return opreduce(opts, args, JOP_COMPARE, 0, janet_wrap_nil(), janet_wrap_nil());
  ------------------
  |  |  831|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  return opreduce(opts, args, JOP_COMPARE, 0, janet_wrap_nil(), janet_wrap_nil());
  ------------------
  |  |  831|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6683|      1|}
janet.c:do_cancel:
 6723|     39|static JanetSlot do_cancel(JanetFopts opts, JanetSlot *args) {
 6724|     39|    return opfunction(opts, args, JOP_CANCEL, janet_wrap_nil());
  ------------------
  |  |  831|     39|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     39|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     39|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     39|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6725|     39|}
janet.c:do_divf:
 6765|    334|static JanetSlot do_divf(JanetFopts opts, JanetSlot *args) {
 6766|    334|    return opreduce(opts, args, JOP_DIVIDE_FLOOR, 0, janet_wrap_integer(1), janet_wrap_integer(1));
  ------------------
  |  |  967|    334|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|    334|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
                  return opreduce(opts, args, JOP_DIVIDE_FLOOR, 0, janet_wrap_integer(1), janet_wrap_integer(1));
  ------------------
  |  |  967|    334|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|    334|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 6767|    334|}
janet.c:macroexpand1:
 7831|  5.72M|    const JanetSpecial **spec) {
 7832|  5.72M|    if (!janet_checktype(x, JANET_TUPLE))
  ------------------
  |  |  806|  5.72M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 5.72M]
  |  |  ------------------
  |  |  807|  5.72M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.72M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  5.72M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  5.72M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.72M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.72M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7832:9): [True: 2.11M, False: 3.60M]
  ------------------
 7833|  2.11M|        return 0;
 7834|  3.60M|    const Janet *form = janet_unwrap_tuple(x);
  ------------------
  |  |  858|  3.60M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
 7835|  3.60M|    if (janet_tuple_length(form) == 0)
  ------------------
  |  | 1802|  3.60M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  3.60M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (7835:9): [True: 204k, False: 3.40M]
  ------------------
 7836|   204k|        return 0;
 7837|       |    /* Source map - only set when we get a tuple */
 7838|  3.40M|    if (janet_tuple_sm_line(form) >= 0) {
  ------------------
  |  | 1804|  3.40M|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1800|  3.40M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (7838:9): [True: 2.04M, False: 1.35M]
  ------------------
 7839|  2.04M|        c->current_mapping.line = janet_tuple_sm_line(form);
  ------------------
  |  | 1804|  2.04M|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1800|  2.04M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
 7840|  2.04M|        c->current_mapping.column = janet_tuple_sm_column(form);
  ------------------
  |  | 1805|  2.04M|#define janet_tuple_sm_column(t) (janet_tuple_head(t)->sm_column)
  |  |  ------------------
  |  |  |  | 1800|  2.04M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
 7841|  2.04M|    }
 7842|       |    /* Bracketed tuples are not specials or macros! */
 7843|  3.40M|    if (janet_tuple_flag(form) & JANET_TUPLE_FLAG_BRACKETCTOR)
  ------------------
  |  | 1806|  3.40M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  3.40M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                  if (janet_tuple_flag(form) & JANET_TUPLE_FLAG_BRACKETCTOR)
  ------------------
  |  | 1798|  3.40M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (7843:9): [True: 1.45k, False: 3.40M]
  ------------------
 7844|  1.45k|        return 0;
 7845|  3.40M|    if (!janet_checktype(form[0], JANET_SYMBOL))
  ------------------
  |  |  806|  3.40M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 3.40M]
  |  |  ------------------
  |  |  807|  3.40M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  3.40M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  3.40M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  3.40M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.40M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.40M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7845:9): [True: 220k, False: 3.18M]
  ------------------
 7846|   220k|        return 0;
 7847|  3.18M|    const uint8_t *name = janet_unwrap_symbol(form[0]);
  ------------------
  |  |  864|  3.18M|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
 7848|  3.18M|    const JanetSpecial *s = janetc_special(name);
 7849|  3.18M|    if (s) {
  ------------------
  |  Branch (7849:9): [True: 2.39M, False: 785k]
  ------------------
 7850|  2.39M|        *spec = s;
 7851|  2.39M|        return 0;
 7852|  2.39M|    }
 7853|   785k|    Janet macroval;
 7854|   785k|    JanetBindingType btype = janet_resolve(c->env, name, &macroval);
 7855|   785k|    if (!(btype == JANET_BINDING_MACRO || btype == JANET_BINDING_DYNAMIC_MACRO) ||
  ------------------
  |  Branch (7855:11): [True: 304k, False: 481k]
  |  Branch (7855:43): [True: 0, False: 481k]
  ------------------
 7856|   304k|            !janet_checktype(macroval, JANET_FUNCTION))
  ------------------
  |  |  806|   304k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 304k]
  |  |  ------------------
  |  |  807|   304k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   304k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   304k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   304k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   304k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   304k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7856:13): [True: 0, False: 304k]
  ------------------
 7857|   481k|        return 0;
 7858|       |
 7859|       |    /* Evaluate macro */
 7860|   304k|    JanetFunction *macro = janet_unwrap_function(macroval);
  ------------------
  |  |  868|   304k|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
 7861|   304k|    int32_t arity = janet_tuple_length(form) - 1;
  ------------------
  |  | 1802|   304k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|   304k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
 7862|   304k|    JanetFiber *fiberp = janet_fiber(macro, 64, arity, form + 1);
 7863|   304k|    if (NULL == fiberp) {
  ------------------
  |  Branch (7863:9): [True: 15, False: 304k]
  ------------------
 7864|     15|        int32_t minar = macro->def->min_arity;
 7865|     15|        int32_t maxar = macro->def->max_arity;
 7866|     15|        const uint8_t *es = NULL;
 7867|     15|        if (minar >= 0 && arity < minar)
  ------------------
  |  Branch (7867:13): [True: 15, False: 0]
  |  Branch (7867:27): [True: 5, False: 10]
  ------------------
 7868|      5|            es = janet_formatc("macro arity mismatch, expected at least %d, got %d", minar, arity);
 7869|     15|        if (maxar >= 0 && arity > maxar)
  ------------------
  |  Branch (7869:13): [True: 15, False: 0]
  |  Branch (7869:27): [True: 10, False: 5]
  ------------------
 7870|     10|            es = janet_formatc("macro arity mismatch, expected at most %d, got %d", maxar, arity);
 7871|     15|        c->result.macrofiber = NULL;
 7872|     15|        janetc_error(c, es);
 7873|     15|        return 0;
 7874|     15|    }
 7875|       |    /* Set env */
 7876|   304k|    fiberp->env = c->env;
 7877|   304k|    int lock = janet_gclock();
 7878|   304k|    Janet mf_kw = janet_ckeywordv("macro-form");
  ------------------
  |  | 1843|   304k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|   304k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|   304k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   304k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   304k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7879|   304k|    janet_table_put(c->env, mf_kw, x);
 7880|   304k|    Janet ml_kw = janet_ckeywordv("macro-lints");
  ------------------
  |  | 1843|   304k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|   304k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|   304k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   304k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   304k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7881|   304k|    if (c->lints) {
  ------------------
  |  Branch (7881:9): [True: 0, False: 304k]
  ------------------
 7882|      0|        janet_table_put(c->env, ml_kw, janet_wrap_array(c->lints));
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7883|      0|    }
 7884|   304k|    Janet tempOut;
 7885|   304k|    JanetSignal status = janet_continue(fiberp, janet_wrap_nil(), &tempOut);
  ------------------
  |  |  831|   304k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   304k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   304k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   304k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7886|   304k|    janet_table_put(c->env, mf_kw, janet_wrap_nil());
  ------------------
  |  |  831|   304k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   304k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   304k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   304k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7887|   304k|    janet_table_put(c->env, ml_kw, janet_wrap_nil());
  ------------------
  |  |  831|   304k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   304k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   304k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   304k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7888|   304k|    janet_gcunlock(lock);
 7889|   304k|    if (status != JANET_SIGNAL_OK) {
  ------------------
  |  Branch (7889:9): [True: 130, False: 304k]
  ------------------
 7890|    130|        const uint8_t *es = janet_formatc("(macro) %V", tempOut);
 7891|    130|        c->result.macrofiber = fiberp;
 7892|    130|        janetc_error(c, es);
 7893|    130|        return 0;
 7894|   304k|    } else {
 7895|   304k|        *out = tempOut;
 7896|   304k|    }
 7897|       |
 7898|   304k|    return 1;
 7899|   304k|}
janet.c:janetc_tuple:
 7801|  1.45k|static JanetSlot janetc_tuple(JanetFopts opts, Janet x) {
 7802|  1.45k|    JanetCompiler *c = opts.compiler;
 7803|  1.45k|    const Janet *t = janet_unwrap_tuple(x);
  ------------------
  |  |  858|  1.45k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
 7804|  1.45k|    return janetc_maker(opts,
 7805|       |                        janetc_toslots(c, t, janet_tuple_length(t)),
  ------------------
  |  | 1802|  1.45k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  1.45k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
 7806|  1.45k|                        JOP_MAKE_TUPLE);
 7807|  1.45k|}
janet.c:janetc_maker:
 7753|  9.26k|static JanetSlot janetc_maker(JanetFopts opts, JanetSlot *slots, int op) {
 7754|  9.26k|    JanetCompiler *c = opts.compiler;
 7755|  9.26k|    JanetSlot retslot;
 7756|       |
 7757|       |    /* Check if this structure is composed entirely of constants */
 7758|  9.26k|    int can_inline = 1;
 7759|  80.2k|    for (int32_t i = 0; i < janet_v_count(slots); i++) {
  ------------------
  |  |  736|  80.2k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  77.8k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  77.8k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 77.8k, False: 2.43k]
  |  |  ------------------
  ------------------
  |  Branch (7759:25): [True: 73.0k, False: 7.14k]
  ------------------
 7760|  73.0k|        if (!(slots[i].flags & JANET_SLOT_CONSTANT) ||
  ------------------
  |  | 1015|  73.0k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (7760:13): [True: 2.11k, False: 70.9k]
  ------------------
 7761|  70.9k|                (slots[i].flags & JANET_SLOT_SPLICED)) {
  ------------------
  |  | 1023|  70.9k|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
  |  Branch (7761:17): [True: 5, False: 70.9k]
  ------------------
 7762|  2.11k|            can_inline = 0;
 7763|  2.11k|            break;
 7764|  2.11k|        }
 7765|  73.0k|    }
 7766|       |
 7767|  9.26k|    if (can_inline && (op == JOP_MAKE_STRUCT)) {
  ------------------
  |  Branch (7767:9): [True: 7.14k, False: 2.11k]
  |  Branch (7767:23): [True: 2.28k, False: 4.86k]
  ------------------
 7768|  2.28k|        JanetKV *st = janet_struct_begin(janet_v_count(slots) / 2);
  ------------------
  |  |  736|  2.28k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|    208|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    208|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 208, False: 2.07k]
  |  |  ------------------
  ------------------
 7769|  3.77k|        for (int32_t i = 0; i < janet_v_count(slots); i += 2) {
  ------------------
  |  |  736|  3.77k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  1.70k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.70k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 1.70k, False: 2.07k]
  |  |  ------------------
  ------------------
  |  Branch (7769:29): [True: 1.49k, False: 2.28k]
  ------------------
 7770|  1.49k|            Janet k = slots[i].constant;
 7771|  1.49k|            Janet v = slots[i + 1].constant;
 7772|  1.49k|            janet_struct_put(st, k, v);
 7773|  1.49k|        }
 7774|  2.28k|        retslot = janetc_cslot(janet_wrap_struct(janet_struct_end(st)));
  ------------------
  |  |  842|  2.28k|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|  2.28k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.28k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.28k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7775|  2.28k|        janetc_freeslots(c, slots);
 7776|  6.98k|    } else if (can_inline && (op == JOP_MAKE_TUPLE)) {
  ------------------
  |  Branch (7776:16): [True: 4.86k, False: 2.11k]
  |  Branch (7776:30): [True: 399, False: 4.47k]
  ------------------
 7777|    399|        Janet *tup = janet_tuple_begin(janet_v_count(slots));
  ------------------
  |  |  736|    399|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|    399|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    399|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 399, False: 0]
  |  |  ------------------
  ------------------
 7778|  63.8k|        for (int32_t i = 0; i < janet_v_count(slots); i++) {
  ------------------
  |  |  736|  63.8k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  63.8k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  63.8k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 63.8k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (7778:29): [True: 63.4k, False: 399]
  ------------------
 7779|  63.4k|            tup[i] = slots[i].constant;
 7780|  63.4k|        }
 7781|    399|        retslot = janetc_cslot(janet_wrap_tuple(janet_tuple_end(tup)));
  ------------------
  |  |  843|    399|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|    399|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    399|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    399|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7782|    399|        janetc_freeslots(c, slots);
 7783|  6.58k|    } else {
 7784|  6.58k|        janetc_pushslots(c, slots);
 7785|  6.58k|        janetc_freeslots(c, slots);
 7786|  6.58k|        retslot = janetc_gettarget(opts);
 7787|  6.58k|        janetc_emit_s(c, op, retslot, 1);
 7788|  6.58k|    }
 7789|       |
 7790|  9.26k|    return retslot;
 7791|  9.26k|}
janet.c:janetc_call:
 7550|   701k|static JanetSlot janetc_call(JanetFopts opts, JanetSlot *slots, JanetSlot fun, const Janet *form) {
 7551|   701k|    JanetSlot retslot;
 7552|   701k|    JanetCompiler *c = opts.compiler;
 7553|   701k|    int specialized = 0;
 7554|   701k|    if (fun.flags & JANET_SLOT_CONSTANT && !has_spliced(slots)) {
  ------------------
  |  | 1015|  1.40M|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (7554:9): [True: 661k, False: 40.0k]
  |  Branch (7554:44): [True: 532k, False: 129k]
  ------------------
 7555|   532k|        if (janet_checktype(fun.constant, JANET_FUNCTION)) {
  ------------------
  |  |  806|   532k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 490k, False: 41.3k]
  |  |  |  Branch (806:6): [Folded, False: 532k]
  |  |  ------------------
  |  |  807|   532k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   532k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   532k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   532k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   532k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   532k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7556|   490k|            JanetFunction *f = janet_unwrap_function(fun.constant);
  ------------------
  |  |  868|   490k|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
 7557|   490k|            const JanetFunOptimizer *o = janetc_funopt(f->def->flags);
 7558|   490k|            if (o && (!o->can_optimize || o->can_optimize(opts, slots))) {
  ------------------
  |  Branch (7558:17): [True: 487k, False: 3.01k]
  |  Branch (7558:23): [True: 30.0k, False: 457k]
  |  Branch (7558:43): [True: 457k, False: 418]
  ------------------
 7559|   487k|                specialized = 1;
 7560|   487k|                retslot = o->optimize(opts, slots);
 7561|   487k|            } else if (function_can_inline(opts, f, slots)) {
  ------------------
  |  Branch (7561:24): [True: 0, False: 3.43k]
  ------------------
 7562|       |                /* Function inlining */
 7563|      0|                int is_tail;
 7564|      0|                JanetSlot target;
 7565|      0|                if ((opts.flags & JANET_FOPTS_TAIL) &&
  ------------------
  |  | 1124|      0|#define JANET_FOPTS_TAIL 0x10000
  ------------------
  |  Branch (7565:21): [True: 0, False: 0]
  ------------------
 7566|       |                        /* Prevent top level tail calls for better errors */
 7567|      0|                        !(c->scope->flags & JANET_SCOPE_TOP)) {
  ------------------
  |  | 1037|      0|#define JANET_SCOPE_TOP 4
  ------------------
  |  Branch (7567:25): [True: 0, False: 0]
  ------------------
 7568|      0|                    is_tail = 1;
 7569|      0|                } else {
 7570|      0|                    is_tail = 0;
 7571|      0|                }
 7572|       |                /* contiguous chunk of fun->def->slotcount slots */
 7573|      0|                if (!is_tail) target = janetc_gettarget(opts);
  ------------------
  |  Branch (7573:21): [True: 0, False: 0]
  ------------------
 7574|      0|                int32_t nslots = f->def->slotcount;
 7575|      0|                int32_t slot_delta = janetc_regalloc_n(&c->scope->ra, nslots);
 7576|      0|                if (slot_delta + f->def->slotcount < 256) {
  ------------------
  |  Branch (7576:21): [True: 0, False: 0]
  ------------------
 7577|       |                    /*janet_eprintf("inlining %V\n", janet_wrap_function(f));*/
 7578|       |                    /* Limit inlining when too many slots */
 7579|      0|                    JanetScope *scope = c->scope;
 7580|      0|                    while (scope) {
  ------------------
  |  Branch (7580:28): [True: 0, False: 0]
  ------------------
 7581|      0|                        if (scope->flags & JANET_SCOPE_FUNCTION)
  ------------------
  |  | 1035|      0|#define JANET_SCOPE_FUNCTION 1
  ------------------
  |  Branch (7581:29): [True: 0, False: 0]
  ------------------
 7582|      0|                            break;
 7583|      0|                        scope = scope->parent;
 7584|      0|                    }
 7585|       |                    /* Setup the function parameters */
 7586|      0|                    JanetSlot dest;
 7587|      0|                    dest.envindex = -1;
 7588|      0|                    dest.flags = JANET_SLOTTYPE_ANY;
  ------------------
  |  | 1025|      0|#define JANET_SLOTTYPE_ANY 0xFFFF
  ------------------
 7589|      0|                    dest.constant = 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7590|      0|                    for (int32_t i = 0; i < janet_v_count(slots); i++) {
  ------------------
  |  |  736|      0|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (7590:41): [True: 0, False: 0]
  ------------------
 7591|      0|                        dest.index = slot_delta + i;
 7592|      0|                        janetc_copy(c, dest, slots[i]);
 7593|      0|                    }
 7594|       |
 7595|       |                    /* Initialize other slots to nil just like in a normal function call */
 7596|       |                    /* TODO - add pass to remove these if needed so we can add this back.
 7597|       |                     * The current compiler doesn't rely on nil-initialization behavior but might in the future
 7598|       |                     * (e.g. removing redundant ldn at the beginning of a function.
 7599|       |                    for (int32_t i = janet_v_count(slots); i < nslots; i++) {
 7600|       |                        janetc_emit(c, JOP_LOAD_NIL | ((uint32_t)(i + slot_delta) << 8));
 7601|       |                    }
 7602|       |                    */
 7603|       |
 7604|       |                    /* Do main inlining (patch the bytecode) */
 7605|      0|                    int32_t const_delta = janet_v_count(scope->consts); /* Get const delta _after_ moving slots. janetc_copy can add constants here! */
  ------------------
  |  |  736|      0|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 7606|      0|                    uint32_t *insert_code = janet_bytecode_inline_chunk(f->def, is_tail ? -1 : target.index, slot_delta, const_delta);
  ------------------
  |  Branch (7606:81): [True: 0, False: 0]
  ------------------
 7607|      0|                    for (int32_t i = 0; i < janet_v_count(insert_code); i++) {
  ------------------
  |  |  736|      0|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (7607:41): [True: 0, False: 0]
  ------------------
 7608|       |                        /* TODO - better match up source code mapping - e.g. if inlined function
 7609|       |                         * is from the same source file */
 7610|      0|                        janetc_emit(c, insert_code[i]);
 7611|      0|                    }
 7612|       |                    /* Copy constants into our constants buffer */
 7613|      0|                    for (int32_t i = 0; i < f->def->constants_length; i++) {
  ------------------
  |  Branch (7613:41): [True: 0, False: 0]
  ------------------
 7614|      0|                        janet_v_push(scope->consts, f->def->constants[i]);
  ------------------
  |  |  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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7615|      0|                    }
 7616|      0|                    janet_v_free(insert_code);
  ------------------
  |  |  733|      0|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 7617|      0|                    specialized = 1;
 7618|      0|                    if (is_tail) {
  ------------------
  |  Branch (7618:25): [True: 0, False: 0]
  ------------------
 7619|      0|                        retslot = janetc_cslot(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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7620|      0|                        retslot.flags = JANET_SLOT_RETURNED;
  ------------------
  |  | 1019|      0|#define JANET_SLOT_RETURNED 0x100000
  ------------------
 7621|      0|                    } else {
 7622|      0|                        retslot = target;
 7623|      0|                    }
 7624|      0|                } else {
 7625|       |                    /*janet_eprintf("inlining failed %V\n", janet_wrap_function(f));*/
 7626|      0|                    ;
 7627|      0|                }
 7628|      0|                janetc_regalloc_free_n(&c->scope->ra, slot_delta, nslots);
 7629|      0|            }
 7630|   490k|        }
 7631|   532k|    }
 7632|   701k|    if (!specialized) {
  ------------------
  |  Branch (7632:9): [True: 214k, False: 487k]
  ------------------
 7633|   214k|        int32_t min_arity = janetc_pushslots(c, slots);
 7634|       |        /* Check for provably incorrect function calls */
 7635|   214k|        if (fun.flags & JANET_SLOT_CONSTANT) {
  ------------------
  |  | 1015|   214k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (7635:13): [True: 173k, False: 40.0k]
  ------------------
 7636|       |
 7637|       |            /* Check for bad arity type if fun is a constant */
 7638|   173k|            switch (janet_type(fun.constant)) {
  ------------------
  |  |  795|   173k|    (isnan((x).number) \
  |  |  796|   173k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   173k|        : JANET_NUMBER)
  ------------------
  |  Branch (7638:21): [True: 158k, False: 15.1k]
  ------------------
 7639|   132k|                case JANET_FUNCTION: {
  ------------------
  |  Branch (7639:17): [True: 132k, False: 41.6k]
  ------------------
 7640|   132k|                    JanetFunction *f = janet_unwrap_function(fun.constant);
  ------------------
  |  |  868|   132k|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
 7641|   132k|                    int32_t min = f->def->min_arity;
 7642|   132k|                    int32_t max = f->def->max_arity;
 7643|   132k|                    int structarg = f->def->flags & JANET_FUNCDEF_FLAG_STRUCTARG;
  ------------------
  |  | 1105|   132k|#define JANET_FUNCDEF_FLAG_STRUCTARG 0x1000000
  ------------------
 7644|   132k|                    int namedarg = f->def->flags & JANET_FUNCDEF_FLAG_NAMEDARGS;
  ------------------
  |  | 1107|   132k|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
 7645|   132k|                    if (min_arity < 0) {
  ------------------
  |  Branch (7645:25): [True: 128k, False: 3.43k]
  ------------------
 7646|       |                        /* Call has splices */
 7647|   128k|                        min_arity = -1 - min_arity;
 7648|   128k|                        if (min_arity > max && max >= 0) {
  ------------------
  |  Branch (7648:29): [True: 12, False: 128k]
  |  Branch (7648:48): [True: 12, False: 0]
  ------------------
 7649|     12|                            const uint8_t *es = janet_formatc(
 7650|     12|                                                    "%v expects at most %d argument%s, got at least %d",
 7651|     12|                                                    fun.constant, max, max == 1 ? "" : "s", min_arity);
  ------------------
  |  Branch (7651:72): [True: 11, False: 1]
  ------------------
 7652|     12|                            janetc_error(c, es);
 7653|     12|                        }
 7654|   128k|                    } else {
 7655|       |                        /* Call has no splices */
 7656|  3.43k|                        if (min_arity > max && max >= 0) {
  ------------------
  |  Branch (7656:29): [True: 363, False: 3.07k]
  |  Branch (7656:48): [True: 363, False: 0]
  ------------------
 7657|    363|                            const uint8_t *es = janet_formatc(
 7658|    363|                                                    "%v expects at most %d argument%s, got %d",
 7659|    363|                                                    fun.constant, max, max == 1 ? "" : "s", min_arity);
  ------------------
  |  Branch (7659:72): [True: 23, False: 340]
  ------------------
 7660|    363|                            janetc_error(c, es);
 7661|    363|                        }
 7662|  3.43k|                        if (min_arity < min) {
  ------------------
  |  Branch (7662:29): [True: 50, False: 3.38k]
  ------------------
 7663|     50|                            const uint8_t *es = janet_formatc(
 7664|     50|                                                    "%v expects at least %d argument%s, got %d",
 7665|     50|                                                    fun.constant, min, min == 1 ? "" : "s", min_arity);
  ------------------
  |  Branch (7665:72): [True: 1, False: 49]
  ------------------
 7666|     50|                            janetc_error(c, es);
 7667|     50|                        }
 7668|  3.43k|                        if (structarg && (min_arity > f->def->arity) && ((min_arity - f->def->arity) & 1)) {
  ------------------
  |  Branch (7668:29): [True: 1.04k, False: 2.39k]
  |  Branch (7668:42): [True: 979, False: 62]
  |  Branch (7668:73): [True: 338, False: 641]
  ------------------
 7669|       |                            /* If we have an odd number of variadic arguments to a `&keys` function, that is almost certainly wrong. */
 7670|    338|                            if (namedarg) {
  ------------------
  |  Branch (7670:33): [True: 0, False: 338]
  ------------------
 7671|      0|                                janetc_lintf(c, JANET_C_LINT_NORMAL,
 7672|      0|                                             "odd number of named arguments to `&named` function %v", fun.constant);
 7673|    338|                            } else {
 7674|    338|                                janetc_lintf(c, JANET_C_LINT_NORMAL,
 7675|    338|                                             "odd number of named arguments to `&keys` function %v", fun.constant);
 7676|    338|                            }
 7677|    338|                        }
 7678|  3.43k|                        if (namedarg && f->def->named_args_count > 0) {
  ------------------
  |  Branch (7678:29): [True: 0, False: 3.43k]
  |  Branch (7678:41): [True: 0, False: 0]
  ------------------
 7679|       |                            /* For each argument passed in, check if it is one of the used named arguments
 7680|       |                             * by checking the list defined in the function def. If not, raise a normal compiler
 7681|       |                             * lint. We can also do a strict lint for _missing_ named arguments, although in many
 7682|       |                             * cases those are assumed to have some kind of default, or we have dynamic keys. */
 7683|      0|                            int32_t first_arg_key_index = f->def->arity + 1;
 7684|      0|                            for (int32_t i = first_arg_key_index; i < janet_tuple_length(form); i += 2) {
  ------------------
  |  | 1802|      0|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|      0|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (7684:67): [True: 0, False: 0]
  ------------------
 7685|      0|                                Janet argkey = form[i];
 7686|       |                                /* Assumption: The first N constants of a function are its named argument keys. This
 7687|       |                                 * may change if the compiler changes, but is true for all Janet generated functions. */
 7688|      0|                                int found = 0;
 7689|      0|                                if (janet_checktype(argkey, 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7690|      0|                                    for (int32_t j = 0; j < f->def->named_args_count && j < f->def->constants_length; j++) {
  ------------------
  |  Branch (7690:57): [True: 0, False: 0]
  |  Branch (7690:89): [True: 0, False: 0]
  ------------------
 7691|      0|                                        if (janet_equals(argkey, f->def->constants[j])) {
  ------------------
  |  Branch (7691:45): [True: 0, False: 0]
  ------------------
 7692|      0|                                            found = 1;
 7693|      0|                                            break;
 7694|      0|                                        }
 7695|      0|                                    }
 7696|      0|                                } else if (janet_checktype(argkey, JANET_TUPLE)) {
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7697|       |                                    /* Possible lint : too dynamic, be dumber
 7698|       |                                     * (defn f [&named x] [x])
 7699|       |                                     * (f (if (coin-flip) :x :w) 10)
 7700|       |                                     * A tuple could be a function call the evaluates to a valid key */
 7701|      0|                                    found = 1;
 7702|      0|                                }
 7703|      0|                                if (!found) {
  ------------------
  |  Branch (7703:37): [True: 0, False: 0]
  ------------------
 7704|      0|                                    janetc_lintf(c, JANET_C_LINT_NORMAL,
 7705|      0|                                                 "unused named argument %v to function %v", argkey, fun.constant);
 7706|      0|                                }
 7707|      0|                            }
 7708|      0|                        }
 7709|  3.43k|                    }
 7710|   132k|                }
 7711|   132k|                break;
 7712|  19.7k|                case JANET_CFUNCTION:
  ------------------
  |  Branch (7712:17): [True: 19.7k, False: 154k]
  ------------------
 7713|  21.2k|                case JANET_ABSTRACT:
  ------------------
  |  Branch (7713:17): [True: 1.48k, False: 172k]
  ------------------
 7714|  22.2k|                case JANET_NIL:
  ------------------
  |  Branch (7714:17): [True: 978, False: 172k]
  ------------------
 7715|  22.2k|                    break;
 7716|  1.79k|                case JANET_KEYWORD:
  ------------------
  |  Branch (7716:17): [True: 1.79k, False: 172k]
  ------------------
 7717|  1.79k|                    if (min_arity == 0) {
  ------------------
  |  Branch (7717:25): [True: 2, False: 1.79k]
  ------------------
 7718|      2|                        const uint8_t *es = janet_formatc("%v expects at least 1 argument, got 0",
 7719|      2|                                                          fun.constant);
 7720|      2|                        janetc_error(c, es);
 7721|      2|                    }
 7722|  1.79k|                    break;
 7723|  17.6k|                default:
  ------------------
  |  Branch (7723:17): [True: 17.6k, False: 156k]
  ------------------
 7724|  17.6k|                    if (min_arity > 1 || min_arity == 0) {
  ------------------
  |  Branch (7724:25): [True: 312, False: 17.3k]
  |  Branch (7724:42): [True: 43, False: 17.2k]
  ------------------
 7725|    355|                        const uint8_t *es = janet_formatc("%v expects 1 argument, got %d",
 7726|    355|                                                          fun.constant, min_arity);
 7727|    355|                        janetc_error(c, es);
 7728|    355|                    }
 7729|  17.6k|                    if (min_arity < -2) {
  ------------------
  |  Branch (7729:25): [True: 61, False: 17.5k]
  ------------------
 7730|     61|                        const uint8_t *es = janet_formatc("%v expects 1 argument, got at least %d",
 7731|     61|                                                          fun.constant, -1 - min_arity);
 7732|     61|                        janetc_error(c, es);
 7733|     61|                    }
 7734|  17.6k|                    break;
 7735|   173k|            }
 7736|   173k|        }
 7737|       |
 7738|   214k|        if ((opts.flags & JANET_FOPTS_TAIL) &&
  ------------------
  |  | 1124|   214k|#define JANET_FOPTS_TAIL 0x10000
  ------------------
  |  Branch (7738:13): [True: 12.4k, False: 201k]
  ------------------
 7739|       |                /* Prevent top level tail calls for better errors */
 7740|  12.4k|                !(c->scope->flags & JANET_SCOPE_TOP)) {
  ------------------
  |  | 1037|  12.4k|#define JANET_SCOPE_TOP 4
  ------------------
  |  Branch (7740:17): [True: 1.86k, False: 10.5k]
  ------------------
 7741|  1.86k|            janetc_emit_s(c, JOP_TAILCALL, fun, 0);
 7742|  1.86k|            retslot = janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|  1.86k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.86k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.86k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.86k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7743|  1.86k|            retslot.flags = JANET_SLOT_RETURNED;
  ------------------
  |  | 1019|  1.86k|#define JANET_SLOT_RETURNED 0x100000
  ------------------
 7744|   212k|        } else {
 7745|   212k|            retslot = janetc_gettarget(opts);
 7746|   212k|            janetc_emit_ss(c, JOP_CALL, retslot, fun, 1);
 7747|   212k|        }
 7748|   214k|    }
 7749|   701k|    janetc_freeslots(c, slots);
 7750|   701k|    return retslot;
 7751|   701k|}
janet.c:has_spliced:
 7494|   661k|static int has_spliced(JanetSlot *slots) {
 7495|   661k|    int32_t i;
 7496|  2.65M|    for (i = 0; i < janet_v_count(slots); i++) {
  ------------------
  |  |  736|  2.65M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  2.63M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  2.63M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 2.63M, False: 15.4k]
  |  |  ------------------
  ------------------
  |  Branch (7496:17): [True: 2.11M, False: 532k]
  ------------------
 7497|  2.11M|        if (slots[i].flags & JANET_SLOT_SPLICED)
  ------------------
  |  | 1023|  2.11M|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
  |  Branch (7497:13): [True: 129k, False: 1.98M]
  ------------------
 7498|   129k|            return 1;
 7499|  2.11M|    }
 7500|   532k|    return 0;
 7501|   661k|}
janet.c:function_can_inline:
 7531|  3.43k|static int function_can_inline(JanetFopts opts, JanetFunction *func, JanetSlot *slots) {
 7532|  3.43k|    JanetFuncDef *def = func->def;
 7533|       |    /* TODO - hoist this check to a flag on the func def */
 7534|  3.43k|    if (opts.compiler->optimize < 2) return 0;
  ------------------
  |  Branch (7534:9): [True: 3.43k, False: 0]
  ------------------
 7535|      0|    if (def->environments_length) return 0;
  ------------------
  |  Branch (7535:9): [True: 0, False: 0]
  ------------------
 7536|      0|    if (def->defs_length) return 0;
  ------------------
  |  Branch (7536:9): [True: 0, False: 0]
  ------------------
 7537|      0|    if (def->slotcount > 32) return 0;
  ------------------
  |  Branch (7537:9): [True: 0, False: 0]
  ------------------
 7538|      0|    if (def->bytecode_length > 40) return 0;
  ------------------
  |  Branch (7538:9): [True: 0, False: 0]
  ------------------
 7539|      0|    if (def->flags & (JANET_FUNCDEF_FLAG_NAMEDARGS | JANET_FUNCDEF_FLAG_STRUCTARG | JANET_FUNCDEF_FLAG_VARARG)) return 0;
  ------------------
  |  | 1107|      0|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
                  if (def->flags & (JANET_FUNCDEF_FLAG_NAMEDARGS | JANET_FUNCDEF_FLAG_STRUCTARG | JANET_FUNCDEF_FLAG_VARARG)) return 0;
  ------------------
  |  | 1105|      0|#define JANET_FUNCDEF_FLAG_STRUCTARG 0x1000000
  ------------------
                  if (def->flags & (JANET_FUNCDEF_FLAG_NAMEDARGS | JANET_FUNCDEF_FLAG_STRUCTARG | JANET_FUNCDEF_FLAG_VARARG)) return 0;
  ------------------
  |  | 1097|      0|#define JANET_FUNCDEF_FLAG_VARARG 0x10000
  ------------------
  |  Branch (7539:9): [True: 0, False: 0]
  ------------------
 7540|      0|    if (janet_v_count(slots) != def->min_arity) return 0; /* TODO - optional arguments */
  ------------------
  |  |  736|      0|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (7540:9): [True: 0, False: 0]
  ------------------
 7541|      0|    if (janet_v_count(slots) != def->max_arity) return 0;
  ------------------
  |  |  736|      0|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (7541:9): [True: 0, False: 0]
  ------------------
 7542|       |    /* Check for JOP_LOAD_SELF */
 7543|      0|    for (int32_t i = 0; i < def->bytecode_length; i++) {
  ------------------
  |  Branch (7543:25): [True: 0, False: 0]
  ------------------
 7544|      0|        if ((def->bytecode[i] & 0x7F) == JOP_LOAD_SELF) return 0;
  ------------------
  |  Branch (7544:13): [True: 0, False: 0]
  ------------------
 7545|      0|    }
 7546|      0|    return 1;
 7547|      0|}
janet.c:janetc_array:
 7793|  3.84k|static JanetSlot janetc_array(JanetFopts opts, Janet x) {
 7794|  3.84k|    JanetCompiler *c = opts.compiler;
 7795|  3.84k|    JanetArray *a = janet_unwrap_array(x);
  ------------------
  |  |  860|  3.84k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
 7796|  3.84k|    return janetc_maker(opts,
 7797|  3.84k|                        janetc_toslots(c, a->data, a->count),
 7798|  3.84k|                        JOP_MAKE_ARRAY);
 7799|  3.84k|}
janet.c:janetc_tablector:
 7809|  2.44k|static JanetSlot janetc_tablector(JanetFopts opts, Janet x, int op) {
 7810|  2.44k|    JanetCompiler *c = opts.compiler;
 7811|  2.44k|    return janetc_maker(opts,
 7812|  2.44k|                        janetc_toslotskv(c, x),
 7813|  2.44k|                        op);
 7814|  2.44k|}
janet.c:janetc_bufferctor:
 7816|  1.52k|static JanetSlot janetc_bufferctor(JanetFopts opts, Janet x) {
 7817|  1.52k|    JanetCompiler *c = opts.compiler;
 7818|  1.52k|    JanetBuffer *b = janet_unwrap_buffer(x);
  ------------------
  |  |  862|  1.52k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
 7819|  1.52k|    Janet onearg = janet_stringv(b->data, b->count);
  ------------------
  |  | 1827|  1.52k|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|  1.52k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.52k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.52k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.52k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7820|  1.52k|    return janetc_maker(opts,
 7821|  1.52k|                        janetc_toslots(c, &onearg, 1),
 7822|  1.52k|                        JOP_MAKE_BUFFER);
 7823|  1.52k|}
janet.c:janetc_init:
 8159|   243k|static void janetc_init(JanetCompiler *c, JanetTable *env, const uint8_t *where, JanetArray *lints) {
 8160|   243k|    c->scope = NULL;
 8161|   243k|    c->buffer = NULL;
 8162|   243k|    c->mapbuffer = NULL;
 8163|   243k|    c->recursion_guard = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|   243k|#define JANET_RECURSION_GUARD 1024
  ------------------
 8164|   243k|    c->env = env;
 8165|   243k|    c->source = where;
 8166|   243k|    c->current_mapping.line = -1;
 8167|   243k|    c->current_mapping.column = -1;
 8168|   243k|    c->lints = lints;
 8169|   243k|    c->is_redef = janet_truthy(janet_table_get_keyword(c->env, "redef"));
  ------------------
  |  |  818|   243k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|   486k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 243k]
  |  |  |  |  ------------------
  |  |  |  |  807|   486k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|   486k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|   243k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|   243k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   243k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   243k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 0, False: 243k]
  |  |  ------------------
  |  |  819|   243k|     (!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]
  |  |  ------------------
  ------------------
 8170|   243k|    c->optimize = to_optimization_level(janet_table_get_keyword(c->env, "optimize"));
 8171|       |    /* Init result */
 8172|   243k|    c->result.error = NULL;
 8173|   243k|    c->result.status = JANET_COMPILE_OK;
 8174|   243k|    c->result.funcdef = NULL;
 8175|       |    c->result.macrofiber = NULL;
 8176|   243k|    c->result.error_mapping.line = -1;
 8177|   243k|    c->result.error_mapping.column = -1;
 8178|   243k|}
janet.c:to_optimization_level:
 8152|   243k|static int32_t to_optimization_level(Janet x) {
 8153|   243k|    if (!janet_checkint(x)) return 0;
  ------------------
  |  Branch (8153:9): [True: 243k, False: 0]
  ------------------
 8154|      0|    int32_t int_level = janet_unwrap_integer(x);
  ------------------
  |  |  966|      0|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
 8155|      0|    return int_level;
 8156|   243k|}
janet.c:janetc_deinit:
 8181|   243k|static void janetc_deinit(JanetCompiler *c) {
 8182|   243k|    janet_v_free(c->buffer);
  ------------------
  |  |  733|   243k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|   242k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 242k, False: 868]
  |  |  ------------------
  ------------------
 8183|   243k|    janet_v_free(c->mapbuffer);
  ------------------
  |  |  733|   243k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|   242k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 242k, False: 868]
  |  |  ------------------
  ------------------
 8184|       |    c->env = NULL;
 8185|   243k|}
janet.c:janet_dyncstring:
 8377|  31.6k|static const char *janet_dyncstring(const char *name, const char *dflt) {
 8378|  31.6k|    Janet x = janet_dyn(name);
 8379|  31.6k|    if (janet_checktype(x, JANET_NIL)) return dflt;
  ------------------
  |  |  806|  31.6k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 16.7k, False: 14.9k]
  |  |  |  Branch (806:6): [Folded, False: 31.6k]
  |  |  ------------------
  |  |  807|  31.6k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  31.6k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  31.6k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  31.6k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  31.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  31.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8380|  14.9k|    if (!janet_checktype(x, JANET_STRING)) {
  ------------------
  |  |  806|  14.9k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 14.9k]
  |  |  ------------------
  |  |  807|  14.9k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  14.9k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  14.9k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  14.9k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  14.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  14.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (8380:9): [True: 0, False: 14.9k]
  ------------------
 8381|      0|        janet_panicf("expected string, got %v", x);
 8382|      0|    }
 8383|  14.9k|    const uint8_t *jstr = janet_unwrap_string(x);
  ------------------
  |  |  863|  14.9k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
 8384|  14.9k|    const char *cstr = (const char *)jstr;
 8385|  14.9k|    if (strlen(cstr) != (size_t) janet_string_length(jstr)) {
  ------------------
  |  | 1813|  14.9k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  14.9k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (8385:9): [True: 0, False: 14.9k]
  ------------------
 8386|      0|        janet_panicf("string %v contains embedded 0s", x);
 8387|      0|    }
 8388|  14.9k|    return cstr;
 8389|  14.9k|}
janet.c:is_path_sep:
 8391|  4.57M|static int is_path_sep(char c) {
 8392|       |#ifdef JANET_WINDOWS
 8393|       |    if (c == '\\') return 1;
 8394|       |#endif
 8395|  4.57M|    return c == '/';
 8396|  4.57M|}
janet.c:janet_load_libs:
 9395|  8.33k|static void janet_load_libs(JanetTable *env) {
 9396|  8.33k|    JanetRegExt corelib_cfuns[] = {
 9397|  8.33k|        JANET_CORE_REG("native", janet_core_native),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9398|  8.33k|        JANET_CORE_REG("describe", janet_core_describe),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9399|  8.33k|        JANET_CORE_REG("string", janet_core_string),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9400|  8.33k|        JANET_CORE_REG("symbol", janet_core_symbol),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9401|  8.33k|        JANET_CORE_REG("keyword", janet_core_keyword),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9402|  8.33k|        JANET_CORE_REG("buffer", janet_core_buffer),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9403|  8.33k|        JANET_CORE_REG("abstract?", janet_core_is_abstract),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9404|  8.33k|        JANET_CORE_REG("table", janet_core_table),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9405|  8.33k|        JANET_CORE_REG("array", janet_core_array),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9406|  8.33k|        JANET_CORE_REG("scan-number", janet_core_scannumber),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9407|  8.33k|        JANET_CORE_REG("tuple", janet_core_tuple),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9408|  8.33k|        JANET_CORE_REG("struct", janet_core_struct),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9409|  8.33k|        JANET_CORE_REG("gensym", janet_core_gensym),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9410|  8.33k|        JANET_CORE_REG("gccollect", janet_core_gccollect),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9411|  8.33k|        JANET_CORE_REG("gcsetinterval", janet_core_gcsetinterval),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9412|  8.33k|        JANET_CORE_REG("gcinterval", janet_core_gcinterval),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9413|  8.33k|        JANET_CORE_REG("type", janet_core_type),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9414|  8.33k|        JANET_CORE_REG("hash", janet_core_hash),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9415|  8.33k|        JANET_CORE_REG("getline", janet_core_getline),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9416|  8.33k|        JANET_CORE_REG("dyn", janet_core_dyn),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9417|  8.33k|        JANET_CORE_REG("setdyn", janet_core_setdyn),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9418|  8.33k|        JANET_CORE_REG("trace", janet_core_trace),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9419|  8.33k|        JANET_CORE_REG("untrace", janet_core_untrace),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9420|  8.33k|        JANET_CORE_REG("module/expand-path", janet_core_expand_path),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9421|  8.33k|        JANET_CORE_REG("int?", janet_core_check_int),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9422|  8.33k|        JANET_CORE_REG("nat?", janet_core_check_nat),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9423|  8.33k|        JANET_CORE_REG("bytes?", janet_core_is_bytes),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9424|  8.33k|        JANET_CORE_REG("indexed?", janet_core_is_indexed),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9425|  8.33k|        JANET_CORE_REG("dictionary?", janet_core_is_dictionary),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9426|  8.33k|        JANET_CORE_REG("lengthable?", janet_core_is_lengthable),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9427|  8.33k|        JANET_CORE_REG("slice", janet_core_slice),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9428|  8.33k|        JANET_CORE_REG("range", janet_core_range),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9429|  8.33k|        JANET_CORE_REG("signal", janet_core_signal),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9430|  8.33k|        JANET_CORE_REG("memcmp", janet_core_memcmp),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9431|  8.33k|        JANET_CORE_REG("getproto", janet_core_getproto),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9432|  8.33k|        JANET_CORE_REG("sandbox", janet_core_sandbox),
  ------------------
  |  |  489|  8.33k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2120|  8.33k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 9433|  8.33k|        JANET_REG_END
  ------------------
  |  | 2110|  8.33k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 9434|  8.33k|    };
 9435|       |    janet_core_cfuns_ext(env, NULL, corelib_cfuns);
 9436|  8.33k|    janet_lib_io(env);
 9437|  8.33k|    janet_lib_math(env);
 9438|  8.33k|    janet_lib_array(env);
 9439|  8.33k|    janet_lib_tuple(env);
 9440|  8.33k|    janet_lib_buffer(env);
 9441|  8.33k|    janet_lib_table(env);
 9442|  8.33k|    janet_lib_struct(env);
 9443|  8.33k|    janet_lib_fiber(env);
 9444|  8.33k|    janet_lib_os(env);
 9445|  8.33k|    janet_lib_parse(env);
 9446|  8.33k|    janet_lib_compile(env);
 9447|  8.33k|    janet_lib_debug(env);
 9448|  8.33k|    janet_lib_string(env);
 9449|  8.33k|    janet_lib_marsh(env);
 9450|  8.33k|#ifdef JANET_PEG
 9451|  8.33k|    janet_lib_peg(env);
 9452|  8.33k|#endif
 9453|  8.33k|#ifdef JANET_ASSEMBLER
 9454|  8.33k|    janet_lib_asm(env);
 9455|  8.33k|#endif
 9456|  8.33k|#ifdef JANET_INT_TYPES
 9457|  8.33k|    janet_lib_inttypes(env);
 9458|  8.33k|#endif
 9459|  8.33k|#ifdef JANET_EV
 9460|  8.33k|    janet_lib_ev(env);
 9461|  8.33k|#ifdef JANET_FILEWATCH
 9462|  8.33k|    janet_lib_filewatch(env);
 9463|  8.33k|#endif
 9464|  8.33k|#endif
 9465|  8.33k|#ifdef JANET_NET
 9466|  8.33k|    janet_lib_net(env);
 9467|  8.33k|#endif
 9468|  8.33k|#ifdef JANET_FFI
 9469|  8.33k|    janet_lib_ffi(env);
 9470|  8.33k|#endif
 9471|  8.33k|}
janet.c:helper_find_fun:
 9968|    161|static void helper_find_fun(int32_t argc, Janet *argv, JanetFuncDef **def, int32_t *bytecode_offset) {
 9969|    161|    janet_arity(argc, 1, 2);
 9970|    161|    JanetFunction *func = janet_getfunction(argv, 0);
 9971|    161|    int32_t offset = (argc == 2) ? janet_getinteger(argv, 1) : 0;
  ------------------
  |  Branch (9971:22): [True: 3, False: 158]
  ------------------
 9972|    161|    *def = func->def;
 9973|    161|    *bytecode_offset = offset;
 9974|    161|}
janet.c:janetc_movenear:
10339|  10.8M|                            JanetSlot src) {
10340|  10.8M|    janet_assert(dest <= 255, "dest slot index must be <= 255");
  ------------------
  |  |  389|  10.8M|#define janet_assert(c, m) do { \
  |  |  390|  10.8M|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 10.8M]
  |  |  ------------------
  |  |  391|  10.8M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 10.8M]
  |  |  ------------------
  ------------------
10341|  10.8M|    if (src.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF)) {
  ------------------
  |  | 1015|  10.8M|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
                  if (src.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF)) {
  ------------------
  |  | 1018|  10.8M|#define JANET_SLOT_REF 0x80000
  ------------------
  |  Branch (10341:9): [True: 4.92M, False: 5.97M]
  ------------------
10342|  4.92M|        janetc_loadconst(c, src.constant, dest);
10343|       |        /* If we also are a reference, deref the one element array */
10344|  4.92M|        if (src.flags & JANET_SLOT_REF) {
  ------------------
  |  | 1018|  4.92M|#define JANET_SLOT_REF 0x80000
  ------------------
  |  Branch (10344:13): [True: 373, False: 4.92M]
  ------------------
10345|    373|            janetc_emit(c,
10346|    373|                        ((uint32_t) dest << 16) |
10347|    373|                        ((uint32_t) dest << 8) |
10348|    373|                        JOP_GET_INDEX);
10349|    373|        }
10350|  5.97M|    } else if (src.envindex >= 0) {
  ------------------
  |  Branch (10350:16): [True: 265k, False: 5.70M]
  ------------------
10351|       |        /* Convert src to near reg */
10352|   265k|        if (src.index > 255) {
  ------------------
  |  Branch (10352:13): [True: 0, False: 265k]
  ------------------
10353|      0|            janet_assert(0, "upvalue index > 255, cannot load");
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
10354|      0|        }
10355|   265k|        janetc_emit(c,
10356|   265k|                    ((uint32_t)(src.index) << 24) |
10357|   265k|                    ((uint32_t)(src.envindex) << 16) |
10358|   265k|                    ((uint32_t)(dest) << 8) |
10359|   265k|                    JOP_LOAD_UPVALUE);
10360|  5.70M|    } else if (src.index != dest) {
  ------------------
  |  Branch (10360:16): [True: 5.70M, False: 0]
  ------------------
10361|  5.70M|        janet_assert(src.index >= 0, "bad slot");
  ------------------
  |  |  389|  5.70M|#define janet_assert(c, m) do { \
  |  |  390|  5.70M|    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.70M]
  |  |  ------------------
  |  |  391|  5.70M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 5.70M]
  |  |  ------------------
  ------------------
10362|  5.70M|        janetc_emit(c,
10363|  5.70M|                    ((uint32_t)(src.index) << 16) |
10364|  5.70M|                    ((uint32_t)(dest) << 8) |
10365|  5.70M|                    JOP_MOVE_NEAR);
10366|  5.70M|    }
10367|  10.8M|}
janet.c:janetc_loadconst:
10301|  4.92M|static void janetc_loadconst(JanetCompiler *c, Janet k, int32_t reg) {
10302|  4.92M|    switch (janet_type(k)) {
  ------------------
  |  |  795|  4.92M|    (isnan((x).number) \
  |  |  796|  4.92M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  4.92M|        : JANET_NUMBER)
  ------------------
  |  Branch (10302:13): [True: 4.45M, False: 470k]
  ------------------
10303|   303k|        case JANET_NIL:
  ------------------
  |  Branch (10303:9): [True: 303k, False: 4.62M]
  ------------------
10304|   303k|            janetc_emit(c, ((uint32_t) reg << 8) | JOP_LOAD_NIL);
10305|   303k|            break;
10306|  13.6k|        case JANET_BOOLEAN:
  ------------------
  |  Branch (10306:9): [True: 13.6k, False: 4.91M]
  ------------------
10307|  13.6k|            janetc_emit(c, ((uint32_t) reg << 8) |
10308|  13.6k|                        (janet_unwrap_boolean(k) ? JOP_LOAD_TRUE : JOP_LOAD_FALSE));
  ------------------
  |  |  838|  13.6k|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  |  |  ------------------
  |  |  |  Branch (838:33): [True: 13.6k, False: 42]
  |  |  ------------------
  ------------------
10309|  13.6k|            break;
10310|   470k|        case JANET_NUMBER: {
  ------------------
  |  Branch (10310:9): [True: 470k, False: 4.45M]
  ------------------
10311|   470k|            double dval = janet_unwrap_number(k);
  ------------------
  |  |  839|   470k|#define janet_unwrap_number(x) ((x).number)
  ------------------
10312|   470k|            if (dval < INT16_MIN || dval > INT16_MAX)
  ------------------
  |  Branch (10312:17): [True: 8.08k, False: 462k]
  |  Branch (10312:37): [True: 21.6k, False: 440k]
  ------------------
10313|  29.7k|                goto do_constant;
10314|   440k|            int32_t i = (int32_t) dval;
10315|   440k|            if (dval != i)
  ------------------
  |  Branch (10315:17): [True: 973, False: 439k]
  ------------------
10316|    973|                goto do_constant;
10317|   439k|            uint32_t iu = (uint32_t)i;
10318|   439k|            janetc_emit(c,
10319|   439k|                        ((uint32_t) iu << 16) |
10320|   439k|                        ((uint32_t) reg << 8) |
10321|   439k|                        JOP_LOAD_INTEGER);
10322|   439k|            break;
10323|   440k|        }
10324|  4.14M|        default:
  ------------------
  |  Branch (10324:9): [True: 4.14M, False: 787k]
  ------------------
10325|  4.17M|        do_constant: {
10326|  4.17M|                int32_t cindex = janetc_const(c, k);
10327|  4.17M|                janetc_emit(c,
10328|  4.17M|                            ((uint32_t) cindex << 16) |
10329|  4.17M|                            ((uint32_t) reg << 8) |
10330|  4.17M|                            JOP_LOAD_CONSTANT);
10331|  4.17M|                break;
10332|  4.14M|            }
10333|  4.92M|    }
10334|  4.92M|}
janet.c:janetc_const:
10276|  4.17M|static int32_t janetc_const(JanetCompiler *c, Janet x) {
10277|  4.17M|    JanetScope *scope = c->scope;
10278|  4.17M|    int32_t i, len;
10279|       |    /* Get the topmost function scope */
10280|  56.0M|    while (scope) {
  ------------------
  |  Branch (10280:12): [True: 56.0M, False: 0]
  ------------------
10281|  56.0M|        if (scope->flags & JANET_SCOPE_FUNCTION)
  ------------------
  |  | 1035|  56.0M|#define JANET_SCOPE_FUNCTION 1
  ------------------
  |  Branch (10281:13): [True: 4.17M, False: 51.9M]
  ------------------
10282|  4.17M|            break;
10283|  51.9M|        scope = scope->parent;
10284|  51.9M|    }
10285|       |    /* Check if already added */
10286|  4.17M|    len = janet_v_count(scope->consts);
  ------------------
  |  |  736|  4.17M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  3.89M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  3.89M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 3.89M, False: 273k]
  |  |  ------------------
  ------------------
10287|   227M|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (10287:17): [True: 227M, False: 776k]
  ------------------
10288|   227M|        if (janet_equals(x, scope->consts[i]))
  ------------------
  |  Branch (10288:13): [True: 3.39M, False: 223M]
  ------------------
10289|  3.39M|            return i;
10290|   227M|    }
10291|       |    /* Ensure not too many constants. */
10292|   776k|    if (len >= 0xFFFF) {
  ------------------
  |  Branch (10292:9): [True: 0, False: 776k]
  ------------------
10293|      0|        janetc_cerror(c, "too many constants");
10294|      0|        return 0;
10295|      0|    }
10296|   776k|    janet_v_push(scope->consts, x);
  ------------------
  |  |  734|   776k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|   776k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|   776k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|   502k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|   502k|#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|   502k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|   502k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 273k, False: 502k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 300k, False: 202k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|   574k|#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|   776k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   776k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10297|   776k|    return len;
10298|   776k|}
janet.c:janetc_moveback:
10372|  6.96M|                            int32_t src) {
10373|  6.96M|    if (dest.flags & JANET_SLOT_REF) {
  ------------------
  |  | 1018|  6.96M|#define JANET_SLOT_REF 0x80000
  ------------------
  |  Branch (10373:9): [True: 0, False: 6.96M]
  ------------------
10374|      0|        int32_t refreg = janetc_regalloc_temp(&c->scope->ra, JANETC_REGTEMP_5);
10375|      0|        janetc_loadconst(c, dest.constant, refreg);
10376|      0|        janetc_emit(c,
10377|      0|                    ((uint32_t) src << 16) |
10378|      0|                    ((uint32_t) refreg << 8) |
10379|      0|                    JOP_PUT_INDEX);
10380|      0|        janetc_regalloc_freetemp(&c->scope->ra, refreg, JANETC_REGTEMP_5);
10381|  6.96M|    } else if (dest.envindex >= 0) {
  ------------------
  |  Branch (10381:16): [True: 25.5k, False: 6.93M]
  ------------------
10382|       |        /* Convert src to near reg */
10383|  25.5k|        if (src > 255) {
  ------------------
  |  Branch (10383:13): [True: 0, False: 25.5k]
  ------------------
10384|      0|            int32_t newsrc = JANETC_REGTEMP_5 + 0xF0;
10385|      0|            janetc_emit(c, JOP_MOVE_NEAR | ((uint32_t)(src) << 16) | ((uint32_t) newsrc << 8));
10386|      0|            src = newsrc;
10387|      0|        }
10388|  25.5k|        if (dest.index > 255) {
  ------------------
  |  Branch (10388:13): [True: 0, False: 25.5k]
  ------------------
10389|      0|            janet_assert(0, "upvalue index > 255, cannot store");
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
10390|      0|        }
10391|  25.5k|        janetc_emit(c,
10392|  25.5k|                    ((uint32_t)(dest.index) << 24) |
10393|  25.5k|                    ((uint32_t)(dest.envindex) << 16) |
10394|  25.5k|                    ((uint32_t)(src) << 8) |
10395|  25.5k|                    JOP_SET_UPVALUE);
10396|  6.93M|    } else if (dest.index != src) {
  ------------------
  |  Branch (10396:16): [True: 3.17M, False: 3.76M]
  ------------------
10397|  3.17M|        janet_assert(dest.index >= 0, "bad slot");
  ------------------
  |  |  389|  3.17M|#define janet_assert(c, m) do { \
  |  |  390|  3.17M|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 3.17M]
  |  |  ------------------
  |  |  391|  3.17M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 3.17M]
  |  |  ------------------
  ------------------
10398|       |        /* Convert src to near reg */
10399|  3.17M|        if (src > 255) {
  ------------------
  |  Branch (10399:13): [True: 0, False: 3.17M]
  ------------------
10400|      0|            int32_t newsrc = JANETC_REGTEMP_5 + 0xF0;
10401|      0|            janetc_emit(c, JOP_MOVE_NEAR | ((uint32_t)(src) << 16) | ((uint32_t)newsrc << 8));
10402|      0|            src = newsrc;
10403|      0|        }
10404|  3.17M|        janetc_emit(c,
10405|  3.17M|                    ((uint32_t)(dest.index) << 16) |
10406|  3.17M|                    ((uint32_t)(src) << 8) |
10407|  3.17M|                    JOP_MOVE_FAR);
10408|  3.17M|    }
10409|  6.96M|}
janet.c:janetc_regfar:
10422|  5.37M|static int32_t janetc_regfar(JanetCompiler *c, JanetSlot s, JanetcRegisterTemp tag) {
10423|       |    /* check if already near register */
10424|  5.37M|    if (s.envindex < 0 && s.index >= 0) {
  ------------------
  |  Branch (10424:9): [True: 5.26M, False: 109k]
  |  Branch (10424:27): [True: 3.76M, False: 1.49M]
  ------------------
10425|  3.76M|        return s.index;
10426|  3.76M|    }
10427|  1.60M|    int32_t reg;
10428|  1.60M|    int32_t nearreg = janetc_regalloc_temp(&c->scope->ra, tag);
10429|  1.60M|    janetc_movenear(c, nearreg, s);
10430|  1.60M|    if (nearreg >= 0xF0) {
  ------------------
  |  Branch (10430:9): [True: 678k, False: 923k]
  ------------------
10431|   678k|        reg = janetc_allocfar(c);
10432|   678k|        janetc_emit(c, JOP_MOVE_FAR | ((uint32_t) nearreg << 8) | ((uint32_t) reg << 16));
10433|   678k|        janetc_regalloc_freetemp(&c->scope->ra, nearreg, tag);
10434|   923k|    } else {
10435|   923k|        reg = nearreg;
10436|   923k|        janetc_regalloc_freetemp(&c->scope->ra, nearreg, tag);
10437|   923k|        janetc_regalloc_touch(&c->scope->ra, reg);
10438|   923k|    }
10439|  1.60M|    return reg;
10440|  5.37M|}
janet.c:janetc_free_regnear:
10412|  15.9M|static void janetc_free_regnear(JanetCompiler *c, JanetSlot s, int32_t reg, JanetcRegisterTemp tag) {
10413|  15.9M|    if (reg != s.index ||
  ------------------
  |  Branch (10413:9): [True: 9.27M, False: 6.69M]
  ------------------
10414|  6.69M|            s.envindex >= 0 ||
  ------------------
  |  Branch (10414:13): [True: 13.7k, False: 6.67M]
  ------------------
10415|  9.28M|            s.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF)) {
  ------------------
  |  | 1015|  6.67M|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
                          s.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF)) {
  ------------------
  |  | 1018|  6.67M|#define JANET_SLOT_REF 0x80000
  ------------------
  |  Branch (10415:13): [True: 0, False: 6.67M]
  ------------------
10416|       |        /* We need to free the temporary slot */
10417|  9.28M|        janetc_regalloc_freetemp(&c->scope->ra, reg, tag);
10418|  9.28M|    }
10419|  15.9M|}
janet.c:emit1s:
10498|   605k|static int32_t emit1s(JanetCompiler *c, uint8_t op, JanetSlot s, int32_t rest, int wr) {
10499|   605k|    int32_t reg = janetc_regnear(c, s, JANETC_REGTEMP_0);
10500|   605k|    int32_t label = janet_v_count(c->buffer);
  ------------------
  |  |  736|   605k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   605k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   605k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 605k, False: 15]
  |  |  ------------------
  ------------------
10501|   605k|    janetc_emit(c, op | ((uint32_t) reg << 8) | ((uint32_t) rest << 16));
10502|   605k|    if (wr)
  ------------------
  |  Branch (10502:9): [True: 445k, False: 160k]
  ------------------
10503|   445k|        janetc_moveback(c, s, reg);
10504|   605k|    janetc_free_regnear(c, s, reg, JANETC_REGTEMP_0);
10505|   605k|    return label;
10506|   605k|}
janet.c:janetc_regnear:
10443|  10.5M|static int32_t janetc_regnear(JanetCompiler *c, JanetSlot s, JanetcRegisterTemp tag) {
10444|       |    /* check if already near register */
10445|  10.5M|    if (s.envindex < 0 && s.index >= 0 && s.index <= 0xFF) {
  ------------------
  |  Branch (10445:9): [True: 10.4M, False: 130k]
  |  Branch (10445:27): [True: 7.23M, False: 3.22M]
  |  Branch (10445:43): [True: 2.90M, False: 4.32M]
  ------------------
10446|  2.90M|        return s.index;
10447|  2.90M|    }
10448|  7.68M|    int32_t reg = janetc_regalloc_temp(&c->scope->ra, tag);
10449|  7.68M|    janetc_movenear(c, reg, s);
10450|  7.68M|    return reg;
10451|  10.5M|}
janet.c:emit2s:
10539|  2.19M|static int32_t emit2s(JanetCompiler *c, uint8_t op, JanetSlot s1, JanetSlot s2, int32_t rest, int wr) {
10540|  2.19M|    int32_t reg1 = janetc_regnear(c, s1, JANETC_REGTEMP_0);
10541|  2.19M|    int32_t reg2 = janetc_regnear(c, s2, JANETC_REGTEMP_1);
10542|  2.19M|    int32_t label = janet_v_count(c->buffer);
  ------------------
  |  |  736|  2.19M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  2.19M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  2.19M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 2.19M, False: 289]
  |  |  ------------------
  ------------------
10543|  2.19M|    janetc_emit(c, op | ((uint32_t) reg1 << 8) | ((uint32_t) reg2 << 16) | ((uint32_t)rest << 24));
10544|  2.19M|    janetc_free_regnear(c, s2, reg2, JANETC_REGTEMP_1);
10545|  2.19M|    if (wr)
  ------------------
  |  Branch (10545:9): [True: 2.19M, False: 3.76k]
  ------------------
10546|  2.19M|        janetc_moveback(c, s1, reg1);
10547|  2.19M|    janetc_free_regnear(c, s1, reg1, JANETC_REGTEMP_0);
10548|  2.19M|    return label;
10549|  2.19M|}
janet.c:janet_stream_close_impl:
10948|     33|static void janet_stream_close_impl(JanetStream *stream) {
10949|     33|    stream->flags |= JANET_STREAM_CLOSED;
  ------------------
  |  |  622|     33|#define JANET_STREAM_CLOSED 0x1
  ------------------
10950|     33|    int canclose = !(stream->flags & JANET_STREAM_NOT_CLOSEABLE);
  ------------------
  |  |  629|     33|#define JANET_STREAM_NOT_CLOSEABLE 0x2000
  ------------------
10951|       |    /* If we are positive that the stream is the last instance of the underlying file description (such that "dup" was never called on the file description)
10952|       |     * then skip unregister to save a syscall */
10953|       |#ifdef JANET_WINDOWS
10954|       |    if (stream->handle != INVALID_HANDLE_VALUE) {
10955|       |#ifdef JANET_NET
10956|       |        if (stream->flags & JANET_STREAM_SOCKET) {
10957|       |            if (canclose) closesocket((SOCKET) stream->handle);
10958|       |        } else
10959|       |#endif
10960|       |        {
10961|       |            if (canclose) CloseHandle(stream->handle);
10962|       |        }
10963|       |        stream->handle = INVALID_HANDLE_VALUE;
10964|       |    }
10965|       |#else
10966|     33|    int canunregister = !(stream->flags & JANET_STREAM_UNREGISTERED);
  ------------------
  |  |  624|     33|#define JANET_STREAM_UNREGISTERED 0x4
  ------------------
10967|     33|    if (stream->handle != -1) {
  ------------------
  |  Branch (10967:9): [True: 33, False: 0]
  ------------------
10968|     33|        if (canunregister) janet_unregister_stream(stream);
  ------------------
  |  Branch (10968:13): [True: 10, False: 23]
  ------------------
10969|     33|        if (canclose) close(stream->handle);
  ------------------
  |  Branch (10969:13): [True: 33, False: 0]
  ------------------
10970|     33|        stream->handle = -1;
10971|     33|    }
10972|     33|#endif
10973|     33|}
janet.c:janet_unregister_stream:
12445|     10|void janet_unregister_stream(JanetStream *stream) {
12446|     10|    if (stream->flags & JANET_STREAM_NODUPS) return;
  ------------------
  |  |  631|     10|#define JANET_STREAM_NODUPS 0x20000
  ------------------
  |  Branch (12446:9): [True: 10, False: 0]
  ------------------
12447|      0|    int status;
12448|      0|    do {
12449|      0|        status = epoll_ctl(janet_vm.epoll, EPOLL_CTL_DEL, stream->handle, NULL);
12450|      0|    } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (12450:14): [True: 0, False: 0]
  |  Branch (12450:30): [True: 0, False: 0]
  ------------------
12451|      0|    if (status == -1) {
  ------------------
  |  Branch (12451:9): [True: 0, False: 0]
  ------------------
12452|      0|        janet_panicv(janet_ev_lasterr());
12453|      0|    }
12454|      0|    stream->flags |= JANET_STREAM_UNREGISTERED;
  ------------------
  |  |  624|      0|#define JANET_STREAM_UNREGISTERED 0x4
  ------------------
12455|      0|}
janet.c:janet_stream_gc:
10990|     33|static int janet_stream_gc(void *p, size_t s) {
10991|     33|    (void) s;
10992|     33|    JanetStream *stream = (JanetStream *)p;
10993|     33|    janet_stream_close_impl(stream);
10994|     33|    return 0;
10995|     33|}
janet.c:janet_stream_getter:
11012|      9|static int janet_stream_getter(void *p, Janet key, Janet *out) {
11013|      9|    JanetStream *stream = (JanetStream *)p;
11014|      9|    if (!janet_checktype(key, JANET_KEYWORD)) return 0;
  ------------------
  |  |  806|      9|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 9]
  |  |  ------------------
  |  |  807|      9|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      9|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      9|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      9|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      9|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (11014:9): [True: 3, False: 6]
  ------------------
11015|      6|    const JanetMethod *stream_methods = stream->methods;
11016|      6|    return janet_getmethod(janet_unwrap_keyword(key), stream_methods, out);
  ------------------
  |  |  865|      6|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
11017|      9|}
janet.c:janet_stream_tostring:
11081|     10|static void janet_stream_tostring(void *p, JanetBuffer *buffer) {
11082|     10|    JanetStream *stream = p;
11083|       |    /* Let user print the file descriptor for debugging */
11084|     10|    janet_formatb(buffer, "[fd=%d]", stream->handle);
11085|     10|}
janet.c:janet_schedule_general:
11103|  6.53k|static void janet_schedule_general(JanetFiber *fiber, Janet value, JanetSignal sig, int soon) {
11104|  6.53k|    if (fiber->gc.flags & JANET_FIBER_EV_GCFLAG_CANCELED) return;
  ------------------
  |  |  819|  6.53k|#define JANET_FIBER_EV_GCFLAG_CANCELED 0x1000000
  ------------------
  |  Branch (11104:9): [True: 0, False: 6.53k]
  ------------------
11105|  6.53k|    if (!(fiber->gc.flags & JANET_FIBER_EV_GCFLAG_ROOT)) {
  ------------------
  |  |  821|  6.53k|#define JANET_FIBER_EV_GCFLAG_ROOT 0x4000000
  ------------------
  |  Branch (11105:9): [True: 5.28k, False: 1.24k]
  ------------------
11106|  5.28k|        fiber->gc.flags |= JANET_FIBER_EV_GCFLAG_ROOT;
  ------------------
  |  |  821|  5.28k|#define JANET_FIBER_EV_GCFLAG_ROOT 0x4000000
  ------------------
11107|  5.28k|        Janet task_element = janet_wrap_fiber(fiber);
  ------------------
  |  |  844|  5.28k|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|  5.28k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.28k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.28k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11108|  5.28k|        janet_table_put(&janet_vm.active_tasks, task_element, janet_wrap_true());
  ------------------
  |  |  832|  5.28k|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  822|  5.28k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.28k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.28k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11109|  5.28k|    }
11110|  6.53k|    JanetTask t = { fiber, value, sig, ++fiber->sched_id };
11111|  6.53k|    if (sig == JANET_SIGNAL_ERROR) fiber->gc.flags |= JANET_FIBER_EV_GCFLAG_CANCELED;
  ------------------
  |  |  819|    289|#define JANET_FIBER_EV_GCFLAG_CANCELED 0x1000000
  ------------------
  |  Branch (11111:9): [True: 289, False: 6.24k]
  ------------------
11112|  6.53k|    if (soon) {
  ------------------
  |  Branch (11112:9): [True: 0, False: 6.53k]
  ------------------
11113|      0|        janet_assert(!janet_q_push_head(&janet_vm.spawn, &t, sizeof(t)), "schedule queue overflow");
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
11114|  6.53k|    } else {
11115|       |        janet_assert(!janet_q_push(&janet_vm.spawn, &t, sizeof(t)), "schedule queue overflow");
  ------------------
  |  |  389|  6.53k|#define janet_assert(c, m) do { \
  |  |  390|  6.53k|    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: 6.53k]
  |  |  ------------------
  |  |  391|  6.53k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 6.53k]
  |  |  ------------------
  ------------------
11116|  6.53k|    }
11117|  6.53k|}
janet.c:janet_q_maybe_resize:
10732|  7.78k|static int janet_q_maybe_resize(JanetQueue *q, size_t itemsize) {
10733|  7.78k|    int32_t count = janet_q_count(q);
10734|       |    /* Resize if needed */
10735|  7.78k|    if (count + 1 >= q->capacity) {
  ------------------
  |  Branch (10735:9): [True: 2.46k, False: 5.32k]
  ------------------
10736|  2.46k|        if (count + 1 >= JANET_MAX_Q_CAPACITY) return 1;
  ------------------
  |  |10713|  2.46k|#define JANET_MAX_Q_CAPACITY 0x7FFFFFF
  ------------------
  |  Branch (10736:13): [True: 0, False: 2.46k]
  ------------------
10737|  2.46k|        int32_t newcap = (count + 2) * 2;
10738|  2.46k|        if (newcap > JANET_MAX_Q_CAPACITY) newcap = JANET_MAX_Q_CAPACITY;
  ------------------
  |  |10713|  2.46k|#define JANET_MAX_Q_CAPACITY 0x7FFFFFF
  ------------------
                      if (newcap > JANET_MAX_Q_CAPACITY) newcap = JANET_MAX_Q_CAPACITY;
  ------------------
  |  |10713|      0|#define JANET_MAX_Q_CAPACITY 0x7FFFFFF
  ------------------
  |  Branch (10738:13): [True: 0, False: 2.46k]
  ------------------
10739|  2.46k|        q->data = janet_realloc(q->data, itemsize * newcap);
  ------------------
  |  | 2409|  2.46k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
10740|  2.46k|        if (NULL == q->data) {
  ------------------
  |  Branch (10740:13): [True: 0, False: 2.46k]
  ------------------
10741|      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]
  |  |  ------------------
  ------------------
10742|      0|        }
10743|  2.46k|        if (q->head > q->tail) {
  ------------------
  |  Branch (10743:13): [True: 55, False: 2.40k]
  ------------------
10744|       |            /* Two segments, fix 2nd seg. */
10745|     55|            int32_t newhead = q->head + (newcap - q->capacity);
10746|     55|            size_t seg1 = (size_t)(q->capacity - q->head);
10747|     55|            if (seg1 > 0) {
  ------------------
  |  Branch (10747:17): [True: 55, False: 0]
  ------------------
10748|     55|                memmove((char *) q->data + (newhead * itemsize),
10749|     55|                        (char *) q->data + (q->head * itemsize),
10750|     55|                        seg1 * itemsize);
10751|     55|            }
10752|     55|            q->head = newhead;
10753|     55|        }
10754|  2.46k|        q->capacity = newcap;
10755|  2.46k|    }
10756|  7.78k|    return 0;
10757|  7.78k|}
janet.c:janet_q_push:
10759|  7.78k|static int janet_q_push(JanetQueue *q, void *item, size_t itemsize) {
10760|  7.78k|    if (janet_q_maybe_resize(q, itemsize)) return 1;
  ------------------
  |  Branch (10760:9): [True: 0, False: 7.78k]
  ------------------
10761|  7.78k|    memcpy((char *) q->data + itemsize * q->tail, item, itemsize);
10762|  7.78k|    q->tail = q->tail + 1 < q->capacity ? q->tail + 1 : 0;
  ------------------
  |  Branch (10762:15): [True: 7.70k, False: 78]
  ------------------
10763|  7.78k|    return 0;
10764|  7.78k|}
janet.c:janet_q_init:
10715|  11.7k|static void janet_q_init(JanetQueue *q) {
10716|       |    q->data = NULL;
10717|  11.7k|    q->head = 0;
10718|  11.7k|    q->tail = 0;
10719|  11.7k|    q->capacity = 0;
10720|  11.7k|}
janet.c:peek_timeout:
10797|  1.03M|static int peek_timeout(JanetTimeout *out) {
10798|  1.03M|    if (janet_vm.tq_count == 0) return 0;
  ------------------
  |  Branch (10798:9): [True: 12.4k, False: 1.02M]
  ------------------
10799|  1.02M|    *out = janet_vm.tq[0];
10800|  1.02M|    return 1;
10801|  1.03M|}
janet.c:handle_timeout_worker:
11207|  1.02M|static void handle_timeout_worker(JanetTimeout to, int cancel) {
11208|  1.02M|    if (!to.has_worker) return;
  ------------------
  |  Branch (11208:9): [True: 1.02M, False: 0]
  ------------------
11209|       |#ifdef JANET_WINDOWS
11210|       |    if (cancel && to.worker_event) {
11211|       |        SetEvent(to.worker_event);
11212|       |    }
11213|       |    WaitForSingleObject(to.worker, INFINITE);
11214|       |    CloseHandle(to.worker);
11215|       |    if (to.worker_event) {
11216|       |        CloseHandle(to.worker_event);
11217|       |    }
11218|       |#else
11219|       |#ifdef JANET_ANDROID
11220|       |    if (cancel) janet_assert(!pthread_kill(to.worker, SIGUSR1), "pthread_kill");
11221|       |#else
11222|      0|    if (cancel) janet_assert(!pthread_cancel(to.worker), "pthread_cancel");
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  |  Branch (11222:9): [True: 0, False: 0]
  ------------------
11223|      0|#endif
11224|      0|    void *res = NULL;
11225|       |    janet_assert(!pthread_join(to.worker, &res), "pthread_join");
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
11226|      0|#endif
11227|      0|}
janet.c:pop_timeout:
10804|  1.02M|static void pop_timeout(size_t index) {
10805|  1.02M|    if (janet_vm.tq_count <= index) return;
  ------------------
  |  Branch (10805:9): [True: 0, False: 1.02M]
  ------------------
10806|  1.02M|    janet_vm.tq[index] = janet_vm.tq[--janet_vm.tq_count];
10807|  11.6M|    for (;;) {
10808|  11.6M|        size_t left = (index << 1) + 1;
10809|  11.6M|        size_t right = left + 1;
10810|  11.6M|        size_t smallest = index;
10811|  11.6M|        if (left < janet_vm.tq_count &&
  ------------------
  |  Branch (10811:13): [True: 11.2M, False: 381k]
  ------------------
10812|  11.2M|                (janet_vm.tq[left].when < janet_vm.tq[smallest].when))
  ------------------
  |  Branch (10812:17): [True: 9.26M, False: 1.98M]
  ------------------
10813|  9.26M|            smallest = left;
10814|  11.6M|        if (right < janet_vm.tq_count &&
  ------------------
  |  Branch (10814:13): [True: 11.2M, False: 382k]
  ------------------
10815|  11.2M|                (janet_vm.tq[right].when < janet_vm.tq[smallest].when))
  ------------------
  |  Branch (10815:17): [True: 5.15M, False: 6.09M]
  ------------------
10816|  5.15M|            smallest = right;
10817|  11.6M|        if (smallest == index) return;
  ------------------
  |  Branch (10817:13): [True: 1.02M, False: 10.6M]
  ------------------
10818|  10.6M|        JanetTimeout temp = janet_vm.tq[index];
10819|  10.6M|        janet_vm.tq[index] = janet_vm.tq[smallest];
10820|  10.6M|        janet_vm.tq[smallest] = temp;
10821|  10.6M|        index = smallest;
10822|  10.6M|    }
10823|  1.02M|}
janet.c:janet_q_deinit:
10722|  11.7k|static void janet_q_deinit(JanetQueue *q) {
10723|  11.7k|    janet_free(q->data);
  ------------------
  |  | 2415|  11.7k|#define janet_free(X) free((X))
  ------------------
10724|  11.7k|}
janet.c:ts_delta:
10788|  1.02M|static JanetTimestamp ts_delta(JanetTimestamp ts, double delta) {
10789|  1.02M|    if (isinf(delta)) {
  ------------------
  |  Branch (10789:9): [True: 325k, False: 700k]
  ------------------
10790|   325k|        return delta < 0 ? ts : INT64_MAX;
  ------------------
  |  Branch (10790:16): [True: 1, False: 325k]
  ------------------
10791|   325k|    }
10792|   700k|    ts += (int64_t)round(delta * 1000);
10793|   700k|    return ts;
10794|  1.02M|}
janet.c:add_timeout:
10826|  1.02M|static void add_timeout(JanetTimeout to) {
10827|  1.02M|    size_t oldcount = janet_vm.tq_count;
10828|  1.02M|    size_t newcount = oldcount + 1;
10829|  1.02M|    if (newcount > janet_vm.tq_capacity) {
  ------------------
  |  Branch (10829:9): [True: 670, False: 1.02M]
  ------------------
10830|    670|        size_t newcap = 2 * newcount;
10831|    670|        JanetTimeout *tq = janet_realloc(janet_vm.tq, newcap * sizeof(JanetTimeout));
  ------------------
  |  | 2409|    670|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
10832|    670|        if (NULL == tq) {
  ------------------
  |  Branch (10832:13): [True: 0, False: 670]
  ------------------
10833|      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]
  |  |  ------------------
  ------------------
10834|      0|        }
10835|    670|        janet_vm.tq = tq;
10836|    670|        janet_vm.tq_capacity = newcap;
10837|    670|    }
10838|       |    /* Append */
10839|  1.02M|    janet_vm.tq_count = (int32_t) newcount;
10840|  1.02M|    janet_vm.tq[oldcount] = to;
10841|       |    /* Heapify */
10842|  1.02M|    size_t index = oldcount;
10843|  1.34M|    while (index > 0) {
  ------------------
  |  Branch (10843:12): [True: 1.34M, False: 270]
  ------------------
10844|  1.34M|        size_t parent = (index - 1) >> 1;
10845|  1.34M|        if (janet_vm.tq[parent].when <= janet_vm.tq[index].when) break;
  ------------------
  |  Branch (10845:13): [True: 1.02M, False: 319k]
  ------------------
10846|       |        /* Swap */
10847|   319k|        JanetTimeout tmp = janet_vm.tq[index];
10848|   319k|        janet_vm.tq[index] = janet_vm.tq[parent];
10849|   319k|        janet_vm.tq[parent] = tmp;
10850|       |        /* Next */
10851|   319k|        index = parent;
10852|   319k|    }
10853|  1.02M|}
janet.c:janet_channel_push:
11701|  1.17k|static int janet_channel_push(JanetChannel *channel, Janet x, int mode) {
11702|  1.17k|    janet_chan_lock(channel);
11703|  1.17k|    return janet_channel_push_with_lock(channel, x, mode);
11704|  1.17k|}
janet.c:janet_channel_pop:
11761|  1.00k|static int janet_channel_pop(JanetChannel *channel, Janet *item, int is_choice) {
11762|  1.00k|    janet_chan_lock(channel);
11763|  1.00k|    return janet_channel_pop_with_lock(channel, item, is_choice);
11764|  1.00k|}
janet.c:janet_chan_init:
11389|    475|static void janet_chan_init(JanetChannel *chan, int32_t limit, int threaded) {
11390|    475|    chan->limit = limit;
11391|    475|    chan->closed = 0;
11392|    475|    chan->is_threaded = threaded;
11393|    475|    janet_q_init(&chan->items);
11394|    475|    janet_q_init(&chan->read_pending);
11395|    475|    janet_q_init(&chan->write_pending);
11396|    475|    janet_os_mutex_init((JanetOSMutex *) &chan->lock);
11397|    475|}
janet.c:janet_chan_lock:
11399|  2.65k|static void janet_chan_lock(JanetChannel *chan) {
11400|  2.65k|    if (!janet_chan_is_threaded(chan)) return;
  ------------------
  |  Branch (11400:9): [True: 2.64k, False: 10]
  ------------------
11401|     10|    janet_os_mutex_lock((JanetOSMutex *) &chan->lock);
11402|     10|}
janet.c:janet_chan_unlock:
11404|  2.65k|static void janet_chan_unlock(JanetChannel *chan) {
11405|  2.65k|    if (!janet_chan_is_threaded(chan)) return;
  ------------------
  |  Branch (11405:9): [True: 2.64k, False: 10]
  ------------------
11406|     10|    janet_os_mutex_unlock((JanetOSMutex *) &chan->lock);
11407|     10|}
janet.c:janet_q_count:
10726|  8.89k|static int32_t janet_q_count(JanetQueue *q) {
10727|  8.89k|    return (q->head > q->tail)
  ------------------
  |  Branch (10727:12): [True: 1.26k, False: 7.63k]
  ------------------
10728|  8.89k|           ? (q->tail + q->capacity - q->head)
10729|  8.89k|           : (q->tail - q->head);
10730|  8.89k|}
janet.c:janet_channel_push_with_lock:
11625|  1.17k|static int janet_channel_push_with_lock(JanetChannel *channel, Janet x, int mode) {
11626|  1.17k|    JanetChannelPending reader;
11627|  1.17k|    int is_empty;
11628|  1.17k|    if (channel->closed) {
  ------------------
  |  Branch (11628:9): [True: 0, False: 1.17k]
  ------------------
11629|      0|        janet_chan_unlock(channel);
11630|      0|        janet_panic("cannot write to closed channel");
11631|      0|    }
11632|  1.17k|    if (janet_chan_pack(channel, &x)) {
  ------------------
  |  Branch (11632:9): [True: 0, False: 1.17k]
  ------------------
11633|      0|        janet_chan_unlock(channel);
11634|      0|        janet_panicf("failed to pack value for channel: %v", x);
11635|      0|    }
11636|  1.17k|    int is_threaded = janet_chan_is_threaded(channel);
11637|  1.17k|    if (is_threaded) {
  ------------------
  |  Branch (11637:9): [True: 0, False: 1.17k]
  ------------------
11638|       |        /* don't dereference fiber from another thread */
11639|      0|        is_empty = janet_q_pop(&channel->read_pending, &reader, sizeof(reader));
11640|  1.17k|    } else {
11641|  1.17k|        do {
11642|  1.17k|            is_empty = janet_q_pop(&channel->read_pending, &reader, sizeof(reader));
11643|  1.17k|        } while (!is_empty && (reader.sched_id != reader.fiber->sched_id));
  ------------------
  |  Branch (11643:18): [True: 57, False: 1.11k]
  |  Branch (11643:31): [True: 0, False: 57]
  ------------------
11644|  1.17k|    }
11645|  1.17k|    if (is_empty) {
  ------------------
  |  Branch (11645:9): [True: 1.11k, False: 57]
  ------------------
11646|       |        /* No pending reader */
11647|  1.11k|        if (janet_q_push(&channel->items, &x, sizeof(Janet))) {
  ------------------
  |  Branch (11647:13): [True: 0, False: 1.11k]
  ------------------
11648|      0|            janet_chan_unpack(channel, &x, 1);
11649|      0|            janet_chan_unlock(channel);
11650|      0|            janet_panicf("channel overflow: %v", x);
11651|  1.11k|        } else if (janet_q_count(&channel->items) > channel->limit) {
  ------------------
  |  Branch (11651:20): [True: 1.11k, False: 0]
  ------------------
11652|       |            /* No root fiber, we are in completion on a root fiber. Don't block. */
11653|  1.11k|            if (mode == 2) {
  ------------------
  |  Branch (11653:17): [True: 1.11k, False: 0]
  ------------------
11654|  1.11k|                janet_chan_unlock(channel);
11655|  1.11k|                return 1;
11656|  1.11k|            }
11657|       |            /* Pushed successfully, but should block. */
11658|      0|            JanetChannelPending pending;
11659|      0|            pending.thread = &janet_vm;
11660|      0|            pending.fiber = janet_vm.root_fiber,
11661|      0|            pending.sched_id = janet_vm.root_fiber->sched_id,
11662|      0|            pending.mode = mode ? JANET_CP_MODE_CHOICE_WRITE : JANET_CP_MODE_WRITE;
  ------------------
  |  Branch (11662:28): [True: 0, False: 0]
  ------------------
11663|      0|            if (is_threaded) {
  ------------------
  |  Branch (11663:17): [True: 0, False: 0]
  ------------------
11664|      0|                janet_chan_remove_stale(&channel->write_pending);
11665|      0|            }
11666|      0|            janet_q_push(&channel->write_pending, &pending, sizeof(pending));
11667|      0|            janet_chan_unlock(channel);
11668|      0|            if (is_threaded) {
  ------------------
  |  Branch (11668:17): [True: 0, False: 0]
  ------------------
11669|      0|                janet_gcroot(janet_wrap_fiber(pending.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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11670|      0|            }
11671|      0|            return 1;
11672|  1.11k|        }
11673|  1.11k|    } else {
11674|       |        /* Pending reader */
11675|     57|        if (is_threaded) {
  ------------------
  |  Branch (11675:13): [True: 0, False: 57]
  ------------------
11676|      0|            JanetVM *vm = reader.thread;
11677|      0|            JanetEVGenericMessage msg;
11678|      0|            msg.tag = reader.mode;
11679|      0|            msg.fiber = reader.fiber;
11680|      0|            msg.argi = (int32_t) reader.sched_id;
11681|      0|            msg.argp = channel;
11682|      0|            msg.argj = x;
11683|      0|            if (vm) {
  ------------------
  |  Branch (11683:17): [True: 0, False: 0]
  ------------------
11684|      0|                janet_ev_post_event(vm, janet_thread_chan_cb, msg);
11685|      0|            } else {
11686|       |                /* If no vm to send to, we must clean up (unpack) the packed payload to avoid leak */
11687|      0|                janet_chan_unpack(channel, &x, 1);
11688|      0|            }
11689|     57|        } else {
11690|     57|            if (reader.mode == JANET_CP_MODE_CHOICE_READ) {
  ------------------
  |  Branch (11690:17): [True: 0, False: 57]
  ------------------
11691|      0|                janet_schedule(reader.fiber, make_read_result(channel, x));
11692|     57|            } else {
11693|     57|                janet_schedule(reader.fiber, x);
11694|     57|            }
11695|     57|        }
11696|     57|    }
11697|     57|    janet_chan_unlock(channel);
11698|     57|    return 0;
11699|  1.17k|}
janet.c:janet_chan_pack:
11345|  1.17k|static int janet_chan_pack(JanetChannel *chan, Janet *x) {
11346|  1.17k|    if (!janet_chan_is_threaded(chan)) return 0;
  ------------------
  |  Branch (11346:9): [True: 1.17k, False: 0]
  ------------------
11347|      0|    switch (janet_type(*x)) {
  ------------------
  |  |  795|      0|    (isnan((x).number) \
  |  |  796|      0|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|      0|        : JANET_NUMBER)
  ------------------
  |  Branch (11347:13): [True: 0, False: 0]
  ------------------
11348|      0|        default: {
  ------------------
  |  Branch (11348:9): [True: 0, False: 0]
  ------------------
11349|      0|            JanetBuffer *buf = janet_malloc(sizeof(JanetBuffer));
  ------------------
  |  | 2406|      0|#define janet_malloc(X) malloc((X))
  ------------------
11350|      0|            if (NULL == buf) {
  ------------------
  |  Branch (11350:17): [True: 0, False: 0]
  ------------------
11351|      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]
  |  |  ------------------
  ------------------
11352|      0|            }
11353|      0|            janet_buffer_init(buf, 10);
11354|      0|            janet_marshal(buf, *x, NULL, JANET_MARSHAL_UNSAFE);
  ------------------
  |  | 1911|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
11355|      0|            *x = 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11356|      0|            return 0;
11357|      0|        }
11358|      0|        case JANET_NIL:
  ------------------
  |  Branch (11358:9): [True: 0, False: 0]
  ------------------
11359|      0|        case JANET_NUMBER:
  ------------------
  |  Branch (11359:9): [True: 0, False: 0]
  ------------------
11360|      0|        case JANET_POINTER:
  ------------------
  |  Branch (11360:9): [True: 0, False: 0]
  ------------------
11361|      0|        case JANET_BOOLEAN:
  ------------------
  |  Branch (11361:9): [True: 0, False: 0]
  ------------------
11362|      0|        case JANET_CFUNCTION:
  ------------------
  |  Branch (11362:9): [True: 0, False: 0]
  ------------------
11363|      0|            return 0;
11364|      0|    }
11365|      0|}
janet.c:janet_chan_unpack:
11367|    864|static int janet_chan_unpack(JanetChannel *chan, Janet *x, int is_cleanup) {
11368|    864|    if (!janet_chan_is_threaded(chan)) return 0;
  ------------------
  |  Branch (11368:9): [True: 864, False: 0]
  ------------------
11369|      0|    switch (janet_type(*x)) {
  ------------------
  |  |  795|      0|    (isnan((x).number) \
  |  |  796|      0|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|      0|        : JANET_NUMBER)
  ------------------
  |  Branch (11369:13): [True: 0, False: 0]
  ------------------
11370|      0|        default:
  ------------------
  |  Branch (11370:9): [True: 0, False: 0]
  ------------------
11371|      0|            return 1;
11372|      0|        case JANET_BUFFER: {
  ------------------
  |  Branch (11372:9): [True: 0, False: 0]
  ------------------
11373|      0|            JanetBuffer *buf = janet_unwrap_buffer(*x);
  ------------------
  |  |  862|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
11374|      0|            int flags = is_cleanup ? (JANET_MARSHAL_UNSAFE | JANET_MARSHAL_DECREF) : JANET_MARSHAL_UNSAFE;
  ------------------
  |  | 1911|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
                          int flags = is_cleanup ? (JANET_MARSHAL_UNSAFE | JANET_MARSHAL_DECREF) : JANET_MARSHAL_UNSAFE;
  ------------------
  |  |  387|      0|#define JANET_MARSHAL_DECREF 0x40000
  ------------------
                          int flags = is_cleanup ? (JANET_MARSHAL_UNSAFE | JANET_MARSHAL_DECREF) : JANET_MARSHAL_UNSAFE;
  ------------------
  |  | 1911|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (11374:25): [True: 0, False: 0]
  ------------------
11375|      0|            *x = janet_unmarshal(buf->data, buf->count, flags, NULL, NULL);
11376|      0|            janet_buffer_deinit(buf);
11377|      0|            janet_free(buf);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
11378|      0|            return 0;
11379|      0|        }
11380|      0|        case JANET_NIL:
  ------------------
  |  Branch (11380:9): [True: 0, False: 0]
  ------------------
11381|      0|        case JANET_NUMBER:
  ------------------
  |  Branch (11381:9): [True: 0, False: 0]
  ------------------
11382|      0|        case JANET_POINTER:
  ------------------
  |  Branch (11382:9): [True: 0, False: 0]
  ------------------
11383|      0|        case JANET_BOOLEAN:
  ------------------
  |  Branch (11383:9): [True: 0, False: 0]
  ------------------
11384|      0|        case JANET_CFUNCTION:
  ------------------
  |  Branch (11384:9): [True: 0, False: 0]
  ------------------
11385|      0|            return 0;
11386|      0|    }
11387|      0|}
janet.c:janet_channel_pop_with_lock:
11709|  1.00k|static int janet_channel_pop_with_lock(JanetChannel *channel, Janet *item, int is_choice) {
11710|  1.00k|    JanetChannelPending writer;
11711|  1.00k|    if (channel->closed) {
  ------------------
  |  Branch (11711:9): [True: 0, False: 1.00k]
  ------------------
11712|      0|        janet_chan_unlock(channel);
11713|      0|        *item = 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11714|      0|        return 1;
11715|      0|    }
11716|  1.00k|    int is_threaded = janet_chan_is_threaded(channel);
11717|  1.00k|    if (janet_q_pop(&channel->items, item, sizeof(Janet))) {
  ------------------
  |  Branch (11717:9): [True: 138, False: 864]
  ------------------
11718|       |        /* Queue empty */
11719|    138|        if (is_choice == 2) return 0; /* Skip pending read */
  ------------------
  |  Branch (11719:13): [True: 0, False: 138]
  ------------------
11720|    138|        JanetChannelPending pending;
11721|    138|        pending.thread = &janet_vm;
11722|    138|        pending.fiber = janet_vm.root_fiber,
11723|    138|        pending.sched_id = janet_vm.root_fiber->sched_id;
11724|    138|        pending.mode = is_choice ? JANET_CP_MODE_CHOICE_READ : JANET_CP_MODE_READ;
  ------------------
  |  Branch (11724:24): [True: 0, False: 138]
  ------------------
11725|    138|        if (is_threaded) {
  ------------------
  |  Branch (11725:13): [True: 0, False: 138]
  ------------------
11726|      0|            janet_chan_remove_stale(&channel->read_pending);
11727|      0|        }
11728|    138|        janet_q_push(&channel->read_pending, &pending, sizeof(pending));
11729|    138|        janet_chan_unlock(channel);
11730|    138|        if (is_threaded) {
  ------------------
  |  Branch (11730:13): [True: 0, False: 138]
  ------------------
11731|      0|            janet_gcroot(janet_wrap_fiber(pending.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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11732|      0|        }
11733|    138|        return 0;
11734|    138|    }
11735|    864|    janet_assert(!janet_chan_unpack(channel, item, 0), "bad channel packing");
  ------------------
  |  |  389|    864|#define janet_assert(c, m) do { \
  |  |  390|    864|    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: 864]
  |  |  ------------------
  |  |  391|    864|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 864]
  |  |  ------------------
  ------------------
11736|    864|    if (!janet_q_pop(&channel->write_pending, &writer, sizeof(writer))) {
  ------------------
  |  Branch (11736:9): [True: 0, False: 864]
  ------------------
11737|       |        /* Pending writer */
11738|      0|        if (is_threaded) {
  ------------------
  |  Branch (11738:13): [True: 0, False: 0]
  ------------------
11739|      0|            JanetVM *vm = writer.thread;
11740|      0|            JanetEVGenericMessage msg;
11741|      0|            msg.tag = writer.mode;
11742|      0|            msg.fiber = writer.fiber;
11743|      0|            msg.argi = (int32_t) writer.sched_id;
11744|      0|            msg.argp = channel;
11745|      0|            msg.argj = 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11746|      0|            if (vm) {
  ------------------
  |  Branch (11746:17): [True: 0, False: 0]
  ------------------
11747|      0|                janet_ev_post_event(vm, janet_thread_chan_cb, msg);
11748|      0|            }
11749|      0|        } else {
11750|      0|            if (writer.mode == JANET_CP_MODE_CHOICE_WRITE) {
  ------------------
  |  Branch (11750:17): [True: 0, False: 0]
  ------------------
11751|      0|                janet_schedule(writer.fiber, make_write_result(channel));
11752|      0|            } else {
11753|      0|                janet_schedule(writer.fiber, janet_wrap_abstract(channel));
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11754|      0|            }
11755|      0|        }
11756|      0|    }
11757|    864|    janet_chan_unlock(channel);
11758|    864|    return 1;
11759|    864|}
janet.c:fisher_yates_args:
11965|     12|static void fisher_yates_args(int32_t argc, Janet *argv) {
11966|    417|    for (int32_t i = argc; i > 1; i--) {
  ------------------
  |  Branch (11966:28): [True: 405, False: 12]
  ------------------
11967|    405|        int32_t swap_index = janet_rng_u32(&janet_vm.ev_rng) % i;
11968|    405|        Janet temp = argv[swap_index];
11969|    405|        argv[swap_index] = argv[i - 1];
11970|    405|        argv[i - 1] = temp;
11971|    405|    }
11972|     12|}
janet.c:janet_q_pop:
10777|  7.20k|static int janet_q_pop(JanetQueue *q, void *out, size_t itemsize) {
10778|  7.20k|    if (q->head == q->tail) return 1;
  ------------------
  |  Branch (10778:9): [True: 2.12k, False: 5.07k]
  ------------------
10779|  5.07k|    memcpy(out, (char *) q->data + itemsize * q->head, itemsize);
10780|  5.07k|    q->head = q->head + 1 < q->capacity ? q->head + 1 : 0;
  ------------------
  |  Branch (10780:15): [True: 5.00k, False: 69]
  ------------------
10781|  5.07k|    return 0;
10782|  7.20k|}
janet.c:janet_chan_is_threaded:
11341|  9.99k|static inline int janet_chan_is_threaded(JanetChannel *chan) {
11342|  9.99k|    return chan->is_threaded;
11343|  9.99k|}
janet.c:janet_chanat_gc:
11436|    475|static int janet_chanat_gc(void *p, size_t s) {
11437|    475|    (void) s;
11438|    475|    JanetChannel *channel = p;
11439|    475|    janet_chan_deinit(channel);
11440|    475|    return 0;
11441|    475|}
janet.c:janet_chan_deinit:
11409|    475|static void janet_chan_deinit(JanetChannel *chan) {
11410|    475|    if (janet_chan_is_threaded(chan)) {
  ------------------
  |  Branch (11410:9): [True: 5, False: 470]
  ------------------
11411|      5|        Janet item;
11412|      5|        janet_chan_lock(chan);
11413|      5|        janet_q_deinit(&chan->read_pending);
11414|      5|        janet_q_deinit(&chan->write_pending);
11415|      5|        while (!janet_q_pop(&chan->items, &item, sizeof(item))) {
  ------------------
  |  Branch (11415:16): [True: 0, False: 5]
  ------------------
11416|      0|            janet_chan_unpack(chan, &item, 1);
11417|      0|        }
11418|      5|        janet_q_deinit(&chan->items);
11419|      5|        janet_chan_unlock(chan);
11420|    470|    } else {
11421|    470|        janet_q_deinit(&chan->read_pending);
11422|    470|        janet_q_deinit(&chan->write_pending);
11423|    470|        janet_q_deinit(&chan->items);
11424|    470|    }
11425|    475|    janet_os_mutex_deinit((JanetOSMutex *) &chan->lock);
11426|    475|}
janet.c:janet_chanat_mark:
11491|     39|static int janet_chanat_mark(void *p, size_t s) {
11492|     39|    (void) s;
11493|     39|    JanetChannel *chan = p;
11494|     39|    janet_chanat_mark_fq(&chan->read_pending);
11495|     39|    janet_chanat_mark_fq(&chan->write_pending);
11496|     39|    JanetQueue *items = &chan->items;
11497|     39|    Janet *data = chan->items.data;
11498|     39|    if (items->head <= items->tail) {
  ------------------
  |  Branch (11498:9): [True: 39, False: 0]
  ------------------
11499|     39|        for (int32_t i = items->head; i < items->tail; i++)
  ------------------
  |  Branch (11499:39): [True: 0, False: 39]
  ------------------
11500|      0|            janet_mark(data[i]);
11501|     39|    } else {
11502|      0|        for (int32_t i = items->head; i < items->capacity; i++)
  ------------------
  |  Branch (11502:39): [True: 0, False: 0]
  ------------------
11503|      0|            janet_mark(data[i]);
11504|      0|        for (int32_t i = 0; i < items->tail; i++)
  ------------------
  |  Branch (11504:29): [True: 0, False: 0]
  ------------------
11505|      0|            janet_mark(data[i]);
11506|      0|    }
11507|     39|    return 0;
11508|     39|}
janet.c:janet_chanat_mark_fq:
11478|     78|static void janet_chanat_mark_fq(JanetQueue *fq) {
11479|     78|    JanetChannelPending *pending = fq->data;
11480|     78|    if (fq->head <= fq->tail) {
  ------------------
  |  Branch (11480:9): [True: 78, False: 0]
  ------------------
11481|    111|        for (int32_t i = fq->head; i < fq->tail; i++)
  ------------------
  |  Branch (11481:36): [True: 33, False: 78]
  ------------------
11482|     33|            janet_mark(janet_wrap_fiber(pending[i].fiber));
  ------------------
  |  |  844|     33|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|     33|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     33|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     33|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11483|     78|    } else {
11484|      0|        for (int32_t i = fq->head; i < fq->capacity; i++)
  ------------------
  |  Branch (11484:36): [True: 0, False: 0]
  ------------------
11485|      0|            janet_mark(janet_wrap_fiber(pending[i].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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11486|      0|        for (int32_t i = 0; i < fq->tail; i++)
  ------------------
  |  Branch (11486:29): [True: 0, False: 0]
  ------------------
11487|      0|            janet_mark(janet_wrap_fiber(pending[i].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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11488|      0|    }
11489|     78|}
janet.c:janet_chanat_get:
12081|     12|static int janet_chanat_get(void *p, Janet key, Janet *out) {
12082|     12|    (void) p;
12083|     12|    if (!janet_checktype(key, JANET_KEYWORD)) return 0;
  ------------------
  |  |  806|     12|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 12]
  |  |  ------------------
  |  |  807|     12|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     12|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     12|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     12|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     12|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     12|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (12083:9): [True: 1, False: 11]
  ------------------
12084|     11|    return janet_getmethod(janet_unwrap_keyword(key), ev_chanat_methods, out);
  ------------------
  |  |  865|     11|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
12085|     12|}
janet.c:janet_chanat_next:
12087|    360|static Janet janet_chanat_next(void *p, Janet key) {
12088|    360|    (void) p;
12089|    360|    return janet_nextmethod(ev_chanat_methods, key);
12090|    360|}
janet.c:janet_chanat_gcperthread:
11466|    475|static int janet_chanat_gcperthread(void *p, size_t s) {
11467|    475|    (void) s;
11468|    475|    JanetChannel *chan = p;
11469|    475|    janet_chan_lock(chan);
11470|       |    /* Make sure that the internals of the threaded channel no longer reference _this_ thread. Replace
11471|       |     * those references with NULL. */
11472|    475|    janet_chanat_remove_vmref(&chan->read_pending);
11473|    475|    janet_chanat_remove_vmref(&chan->write_pending);
11474|    475|    janet_chan_unlock(chan);
11475|    475|    return 0;
11476|    475|}
janet.c:janet_chanat_remove_vmref:
11450|    950|static void janet_chanat_remove_vmref(JanetQueue *fq) {
11451|    950|    JanetChannelPending *pending = fq->data;
11452|    950|    if (fq->head <= fq->tail) {
  ------------------
  |  Branch (11452:9): [True: 950, False: 0]
  ------------------
11453|  1.03k|        for (int32_t i = fq->head; i < fq->tail; i++) {
  ------------------
  |  Branch (11453:36): [True: 81, False: 950]
  ------------------
11454|     81|            janet_chanat_remove_vmref_one(pending + i);
11455|     81|        }
11456|    950|    } else {
11457|      0|        for (int32_t i = fq->head; i < fq->capacity; i++) {
  ------------------
  |  Branch (11457:36): [True: 0, False: 0]
  ------------------
11458|      0|            janet_chanat_remove_vmref_one(pending + i);
11459|      0|        }
11460|      0|        for (int32_t i = 0; i < fq->tail; i++) {
  ------------------
  |  Branch (11460:29): [True: 0, False: 0]
  ------------------
11461|      0|            janet_chanat_remove_vmref_one(pending + i);
11462|      0|        }
11463|      0|    }
11464|    950|}
janet.c:janet_chanat_remove_vmref_one:
11443|     81|static void janet_chanat_remove_vmref_one(JanetChannelPending *pending) {
11444|     81|    if (pending->thread == &janet_vm) {
  ------------------
  |  Branch (11444:9): [True: 81, False: 0]
  ------------------
11445|     81|        pending->thread = NULL;
11446|     81|        janet_gcunroot(janet_wrap_fiber(pending->fiber));
  ------------------
  |  |  844|     81|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|     81|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     81|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     81|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11447|     81|    }
11448|     81|}
janet.c:make_supervisor_event:
11171|  1.17k|static Janet make_supervisor_event(const char *name, JanetFiber *fiber, int threaded) {
11172|  1.17k|    Janet tup[3];
11173|  1.17k|    tup[0] = janet_ckeywordv(name);
  ------------------
  |  | 1843|  1.17k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  1.17k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.17k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.17k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.17k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11174|  1.17k|    tup[1] = threaded ? fiber->last_value : janet_wrap_fiber(fiber) ;
  ------------------
  |  |  844|  1.17k|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|  2.34k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.17k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.17k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (11174:14): [True: 0, False: 1.17k]
  ------------------
11175|  1.17k|    if (fiber->env != NULL) {
  ------------------
  |  Branch (11175:9): [True: 1.17k, False: 0]
  ------------------
11176|  1.17k|        tup[2] = janet_table_get(fiber->env, janet_ckeywordv("task-id"));
  ------------------
  |  | 1843|  1.17k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  1.17k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.17k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.17k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.17k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11177|  1.17k|    } else {
11178|      0|        tup[2] = 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11179|      0|    }
11180|  1.17k|    return janet_wrap_tuple(janet_tuple_n(tup, 3));
  ------------------
  |  |  843|  1.17k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  1.17k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.17k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.17k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11181|  1.17k|}
janet.c:ts_now:
12402|  1.02M|static JanetTimestamp ts_now(void) {
12403|  1.02M|    struct timespec now;
12404|  1.02M|    janet_assert(-1 != janet_gettime(&now, JANET_TIME_MONOTONIC), "failed to get time");
  ------------------
  |  |  389|  1.02M|#define janet_assert(c, m) do { \
  |  |  390|  1.02M|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 1.02M]
  |  |  ------------------
  |  |  391|  1.02M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 1.02M]
  |  |  ------------------
  ------------------
12405|  1.02M|    uint64_t res = 1000 * now.tv_sec;
12406|  1.02M|    res += now.tv_nsec / 1000000;
12407|  1.02M|    return res;
12408|  1.02M|}
janet.c:janet_register_stream:
12433|     33|static void janet_register_stream(JanetStream *stream) {
12434|     33|    janet_register_stream_impl(stream, 0, 1);
12435|     33|}
janet.c:janet_register_stream_impl:
12411|     33|static void janet_register_stream_impl(JanetStream *stream, int mod, int edge_trigger) {
12412|     33|    struct epoll_event ev;
12413|     33|    ev.events = edge_trigger ? EPOLLET : 0;
  ------------------
  |  Branch (12413:17): [True: 33, False: 0]
  ------------------
12414|     33|    if (stream->flags & (JANET_STREAM_READABLE | JANET_STREAM_ACCEPTABLE)) ev.events |= EPOLLIN;
  ------------------
  |  |  625|     33|#define JANET_STREAM_READABLE 0x200
  ------------------
                  if (stream->flags & (JANET_STREAM_READABLE | JANET_STREAM_ACCEPTABLE)) ev.events |= EPOLLIN;
  ------------------
  |  |  627|     33|#define JANET_STREAM_ACCEPTABLE 0x800
  ------------------
  |  Branch (12414:9): [True: 16, False: 17]
  ------------------
12415|     33|    if (stream->flags & JANET_STREAM_WRITABLE) ev.events |= EPOLLOUT;
  ------------------
  |  |  626|     33|#define JANET_STREAM_WRITABLE 0x400
  ------------------
  |  Branch (12415:9): [True: 12, False: 21]
  ------------------
12416|     33|    ev.data.ptr = stream;
12417|     33|    int status;
12418|     33|    do {
12419|     33|        status = epoll_ctl(janet_vm.epoll, mod ? EPOLL_CTL_MOD : EPOLL_CTL_ADD, stream->handle, &ev);
  ------------------
  |  Branch (12419:44): [True: 0, False: 33]
  ------------------
12420|     33|    } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (12420:14): [True: 23, False: 10]
  |  Branch (12420:30): [True: 0, False: 23]
  ------------------
12421|     33|    if (status == -1) {
  ------------------
  |  Branch (12421:9): [True: 23, False: 10]
  ------------------
12422|     23|        if (errno == EPERM) {
  ------------------
  |  Branch (12422:13): [True: 23, False: 0]
  ------------------
12423|       |            /* Couldn't add to event loop, so assume that it completes
12424|       |             * synchronously. */
12425|     23|            stream->flags |= JANET_STREAM_UNREGISTERED;
  ------------------
  |  |  624|     23|#define JANET_STREAM_UNREGISTERED 0x4
  ------------------
12426|     23|        } else {
12427|       |            /* Unexpected error */
12428|      0|            janet_panicv(janet_ev_lasterr());
12429|      0|        }
12430|     23|    }
12431|     33|}
janet.c:janet_ev_handle_selfpipe:
12292|     33|static void janet_ev_handle_selfpipe(void) {
12293|     33|    JanetSelfPipeEvent response;
12294|     33|    int status;
12295|     66|recur:
12296|     66|    do {
12297|     66|        status = read(janet_vm.selfpipe[0], &response, sizeof(response));
12298|     66|    } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (12298:14): [True: 33, False: 33]
  |  Branch (12298:30): [True: 0, False: 33]
  ------------------
12299|     66|    if (status > 0) {
  ------------------
  |  Branch (12299:9): [True: 33, False: 33]
  ------------------
12300|     33|        if (NULL != response.cb) {
  ------------------
  |  Branch (12300:13): [True: 33, False: 0]
  ------------------
12301|     33|            response.cb(response.msg);
12302|     33|            janet_ev_dec_refcount();
12303|     33|        }
12304|     33|        goto recur;
12305|     33|    }
12306|     66|}
janet.c:janet_ev_setup_selfpipe:
12285|  10.3k|static void janet_ev_setup_selfpipe(void) {
12286|  10.3k|    if (janet_make_pipe(janet_vm.selfpipe, 1)) {
  ------------------
  |  Branch (12286:9): [True: 0, False: 10.3k]
  ------------------
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|  10.3k|}
janet.c:janet_ev_cleanup_selfpipe:
12308|  10.3k|static void janet_ev_cleanup_selfpipe(void) {
12309|  10.3k|    close(janet_vm.selfpipe[0]);
12310|  10.3k|    close(janet_vm.selfpipe[1]);
12311|  10.3k|}
janet.c:janet_thread_body:
12967|  2.02k|static void *janet_thread_body(void *ptr) {
12968|  2.02k|    JanetEVThreadInit *init = (JanetEVThreadInit *)ptr;
12969|  2.02k|    JanetEVGenericMessage msg = init->msg;
12970|  2.02k|    JanetThreadedSubroutine subr = init->subr;
12971|  2.02k|    JanetThreadedCallback cb = init->cb;
12972|  2.02k|    int fd = init->write_pipe;
12973|  2.02k|    janet_free(init);
  ------------------
  |  | 2415|  2.02k|#define janet_free(X) free((X))
  ------------------
12974|  2.02k|    JanetSelfPipeEvent response;
12975|  2.02k|    memset(&response, 0, sizeof(response));
12976|  2.02k|    response.msg = subr(msg);
12977|  2.02k|    response.cb = cb;
12978|       |    /* handle a bit of back pressure before giving up. */
12979|  2.02k|    int tries = 4;
12980|  2.06k|    while (tries > 0) {
  ------------------
  |  Branch (12980:12): [True: 2.06k, False: 3]
  ------------------
12981|  2.06k|        int status;
12982|  2.06k|        do {
12983|  2.06k|            status = write(fd, &response, sizeof(response));
12984|  2.06k|        } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (12984:18): [True: 41, False: 2.02k]
  |  Branch (12984:34): [True: 0, False: 41]
  ------------------
12985|  2.06k|        if (status > 0) break;
  ------------------
  |  Branch (12985:13): [True: 2.02k, False: 41]
  ------------------
12986|     41|        sleep(1);
12987|     41|        tries--;
12988|     41|    }
12989|       |    return NULL;
12990|  2.02k|}
janet.c:janet_go_thread_subr:
13767|  2.01k|static JanetEVGenericMessage janet_go_thread_subr(JanetEVGenericMessage args) {
13768|  2.01k|    JanetBuffer *buffer = (JanetBuffer *) args.argp;
13769|  2.01k|    const uint8_t *nextbytes = buffer->data;
13770|  2.01k|    const uint8_t *endbytes = nextbytes + buffer->count;
13771|  2.01k|    uint32_t flags = args.tag;
13772|  2.01k|    args.tag = 0;
13773|  2.01k|    args.argp = NULL;
13774|  2.01k|    janet_init();
13775|  2.01k|    janet_vm.sandbox_flags = (uint32_t) args.argi;
13776|  2.01k|    JanetTryState tstate;
13777|  2.01k|    JanetSignal signal = janet_try(&tstate);
  ------------------
  |  | 1981|  2.01k|#define janet_try(state) (janet_try_init(state), (JanetSignal) setjmp((state)->buf))
  ------------------
13778|  2.01k|    if (!signal) {
  ------------------
  |  Branch (13778:9): [True: 2.01k, False: 0]
  ------------------
13779|       |
13780|       |        /* Set abstract registry */
13781|  2.01k|        if (!(flags & 0x2)) {
  ------------------
  |  Branch (13781:13): [True: 2.01k, False: 1]
  ------------------
13782|  2.01k|            Janet aregv = janet_unmarshal(nextbytes, endbytes - nextbytes,
13783|  2.01k|                                          JANET_MARSHAL_UNSAFE, NULL, &nextbytes);
  ------------------
  |  | 1911|  2.01k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
13784|  2.01k|            janet_assert(janet_checktype(aregv, JANET_TABLE), "expected table for abstract registry");
  ------------------
  |  |  389|  2.01k|#define janet_assert(c, m) do { \
  |  |  390|  4.03k|    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: 2.01k]
  |  |  |  Branch (390:11): [True: 0, False: 0]
  |  |  |  Branch (390:11): [True: 0, False: 0]
  |  |  |  Branch (390:11): [Folded, False: 2.01k]
  |  |  ------------------
  |  |  391|  2.01k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 2.01k]
  |  |  ------------------
  ------------------
13785|  2.01k|            janet_vm.abstract_registry = janet_unwrap_table(aregv);
  ------------------
  |  |  861|  2.01k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
13786|  2.01k|            janet_gcroot(janet_wrap_table(janet_vm.abstract_registry));
  ------------------
  |  |  846|  2.01k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|  2.01k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.01k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.01k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13787|  2.01k|        }
13788|       |
13789|       |        /* Get supervisor */
13790|  2.01k|        if (flags & JANET_THREAD_SUPERVISOR_FLAG) {
  ------------------
  |  |13764|  2.01k|#define JANET_THREAD_SUPERVISOR_FLAG 0x100
  ------------------
  |  Branch (13790:13): [True: 0, False: 2.01k]
  ------------------
13791|      0|            Janet sup =
13792|      0|                janet_unmarshal(nextbytes, endbytes - nextbytes,
13793|      0|                                JANET_MARSHAL_UNSAFE, NULL, &nextbytes);
  ------------------
  |  | 1911|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
13794|       |            /* Hack - use a global variable to avoid longjmp clobber */
13795|      0|            janet_vm.user = janet_unwrap_pointer(sup);
  ------------------
  |  |  867|      0|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
13796|      0|        }
13797|       |
13798|       |        /* Set cfunction registry */
13799|  2.01k|        if (!(flags & 0x4)) {
  ------------------
  |  Branch (13799:13): [True: 2.01k, False: 9]
  ------------------
13800|  2.01k|            uint32_t count1;
13801|  2.01k|            memcpy(&count1, nextbytes, sizeof(count1));
13802|  2.01k|            size_t count = (size_t) count1;
13803|       |            /* Use division to avoid overflowing size_t */
13804|  2.01k|            janet_assert(count <= (endbytes - nextbytes - sizeof(count1)) / sizeof(JanetCFunRegistry), "thread message invalid");
  ------------------
  |  |  389|  2.01k|#define janet_assert(c, m) do { \
  |  |  390|  2.01k|    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: 2.01k]
  |  |  ------------------
  |  |  391|  2.01k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 2.01k]
  |  |  ------------------
  ------------------
13805|  2.01k|            janet_vm.registry_count = count;
13806|  2.01k|            janet_vm.registry_cap = count;
13807|  2.01k|            janet_vm.registry = janet_malloc(count * sizeof(JanetCFunRegistry));
  ------------------
  |  | 2406|  2.01k|#define janet_malloc(X) malloc((X))
  ------------------
13808|  2.01k|            if (janet_vm.registry == NULL) {
  ------------------
  |  Branch (13808:17): [True: 0, False: 2.01k]
  ------------------
13809|      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]
  |  |  ------------------
  ------------------
13810|      0|            }
13811|  2.01k|            janet_vm.registry_dirty = 1;
13812|  2.01k|            nextbytes += sizeof(uint32_t);
13813|  2.01k|            memcpy(janet_vm.registry, nextbytes, count * sizeof(JanetCFunRegistry));
13814|  2.01k|            nextbytes += count * sizeof(JanetCFunRegistry);
13815|  2.01k|        }
13816|       |
13817|  2.01k|        Janet fiberv = janet_unmarshal(nextbytes, endbytes - nextbytes,
13818|  2.01k|                                       JANET_MARSHAL_UNSAFE, NULL, &nextbytes);
  ------------------
  |  | 1911|  2.01k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
13819|  2.01k|        Janet value = janet_unmarshal(nextbytes, endbytes - nextbytes,
13820|  2.01k|                                      JANET_MARSHAL_UNSAFE, NULL, &nextbytes);
  ------------------
  |  | 1911|  2.01k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
13821|  2.01k|        JanetFiber *fiber;
13822|  2.01k|        if (!janet_checktype(fiberv, JANET_FIBER)) {
  ------------------
  |  |  806|  2.01k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 2.01k]
  |  |  ------------------
  |  |  807|  2.01k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.01k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.01k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.01k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.01k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.01k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (13822:13): [True: 641, False: 1.37k]
  ------------------
13823|    641|            janet_assert(janet_checktype(fiberv, JANET_FUNCTION), "expected function or fiber");
  ------------------
  |  |  389|    641|#define janet_assert(c, m) do { \
  |  |  390|  1.28k|    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: 641]
  |  |  |  Branch (390:11): [True: 0, False: 0]
  |  |  |  Branch (390:11): [True: 0, False: 0]
  |  |  |  Branch (390:11): [Folded, False: 641]
  |  |  ------------------
  |  |  391|    641|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 641]
  |  |  ------------------
  ------------------
13824|    641|            JanetFunction *func = janet_unwrap_function(fiberv);
  ------------------
  |  |  868|    641|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
13825|       |            /* TODO - normal panics here do not seem to work correctly on Wine + Mingw. This needs to be investigated, and while it appears to be related to longjmp behavior
13826|       |             * on the platform not working correctly, it is not obvious the issue is. That said, we probably should assert and hard-exit anyway if there is an issue there. */
13827|    641|            janet_assert(func->def->min_arity >= 0 && func->def->min_arity <= 1, "thread function must accept 0 or 1 arguments");
  ------------------
  |  |  389|    641|#define janet_assert(c, m) do { \
  |  |  390|  1.28k|    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:11): [True: 641, False: 0]
  |  |  |  Branch (390:11): [True: 641, False: 0]
  |  |  ------------------
  |  |  391|    641|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 641]
  |  |  ------------------
  ------------------
13828|    641|            fiber = janet_fiber(func, 64, func->def->min_arity, &value);
13829|    641|            janet_assert(fiber != NULL, "bad fiber in thread setup");
  ------------------
  |  |  389|    641|#define janet_assert(c, m) do { \
  |  |  390|    641|    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: 641]
  |  |  ------------------
  |  |  391|    641|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 641]
  |  |  ------------------
  ------------------
13830|    641|            fiber->flags |=
13831|    641|                JANET_FIBER_MASK_ERROR |
  ------------------
  |  |  789|    641|#define JANET_FIBER_MASK_ERROR 2
  ------------------
13832|    641|                JANET_FIBER_MASK_USER0 |
  ------------------
  |  |  793|    641|#define JANET_FIBER_MASK_USER0 (16 << 0)
  ------------------
13833|    641|                JANET_FIBER_MASK_USER1 |
  ------------------
  |  |  794|    641|#define JANET_FIBER_MASK_USER1 (16 << 1)
  ------------------
13834|    641|                JANET_FIBER_MASK_USER2 |
  ------------------
  |  |  795|    641|#define JANET_FIBER_MASK_USER2 (16 << 2)
  ------------------
13835|    641|                JANET_FIBER_MASK_USER3 |
  ------------------
  |  |  796|    641|#define JANET_FIBER_MASK_USER3 (16 << 3)
  ------------------
13836|    641|                JANET_FIBER_MASK_USER4;
  ------------------
  |  |  797|    641|#define JANET_FIBER_MASK_USER4 (16 << 4)
  ------------------
13837|  1.37k|        } else {
13838|  1.37k|            fiber = janet_unwrap_fiber(fiberv);
  ------------------
  |  |  859|  1.37k|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
13839|  1.37k|        }
13840|  2.01k|        if (flags & 0x8) {
  ------------------
  |  Branch (13840:13): [True: 2, False: 2.01k]
  ------------------
13841|      2|            if (NULL == fiber->env) fiber->env = janet_table(0);
  ------------------
  |  Branch (13841:17): [True: 2, False: 0]
  ------------------
13842|      2|            janet_table_put(fiber->env, janet_ckeywordv("task-id"), value);
  ------------------
  |  | 1843|      2|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|      2|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|      2|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13843|      2|        }
13844|  2.01k|        fiber->supervisor_channel = janet_vm.user;
13845|  2.01k|        janet_schedule(fiber, value);
13846|  2.01k|        janet_loop();
13847|  2.01k|        args.tag = JANET_EV_TCTAG_NIL;
  ------------------
  |  | 1578|  2.01k|#define JANET_EV_TCTAG_NIL 0          /* resume with nil */
  ------------------
13848|  2.01k|        janet_restore(&tstate);
13849|  2.01k|    } else {
13850|      0|        janet_restore(&tstate);
13851|      0|        void *supervisor = janet_vm.user;
13852|      0|        if (NULL != supervisor) {
  ------------------
  |  Branch (13852:13): [True: 0, False: 0]
  ------------------
13853|       |            /* Got a supervisor, write error there */
13854|      0|            Janet pair[] = {
13855|      0|                janet_ckeywordv("error"),
  ------------------
  |  | 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13856|      0|                tstate.payload
13857|      0|            };
13858|      0|            janet_channel_push((JanetChannel *)supervisor,
13859|      0|                               janet_wrap_tuple(janet_tuple_n(pair, 2)), 2);
  ------------------
  |  |  843|      0|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13860|      0|        } else if (flags & 0x1) {
  ------------------
  |  Branch (13860:20): [True: 0, False: 0]
  ------------------
13861|       |            /* No wait, just print to stderr */
13862|      0|            janet_eprintf("thread start failure: %v\n", tstate.payload);
  ------------------
  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
13863|      0|        } else {
13864|       |            /* Make ev/thread call from parent thread error */
13865|      1|            if (janet_checktype(tstate.payload, JANET_STRING)) {
  ------------------
  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1, False: 18.4E]
  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13866|      1|                args.tag = JANET_EV_TCTAG_ERR_STRINGF;
  ------------------
  |  | 1584|      1|#define JANET_EV_TCTAG_ERR_STRINGF 6  /* cancel with janet_cstringv((const char *) argp), then call free on argp. */
  ------------------
13867|      1|                JanetString msg = janet_unwrap_string(tstate.payload);
  ------------------
  |  |  863|      1|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
13868|      1|                args.argp = janet_malloc(janet_string_length(msg) + 1);
  ------------------
  |  | 2406|      1|#define janet_malloc(X) malloc((X))
  ------------------
13869|      1|                memcpy(args.argp, msg, janet_string_length(msg) + 1);
  ------------------
  |  | 1813|      1|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|      1|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
13870|  18.4E|            } else {
13871|  18.4E|                args.tag = JANET_EV_TCTAG_ERR_STRING;
  ------------------
  |  | 1583|  18.4E|#define JANET_EV_TCTAG_ERR_STRING 5   /* cancel with janet_cstringv((const char *) argp) */
  ------------------
13872|  18.4E|                args.argp = "failed to start thread";
13873|  18.4E|            }
13874|      0|        }
13875|      0|    }
13876|  2.01k|    janet_buffer_deinit(buffer);
13877|  2.01k|    janet_free(buffer);
  ------------------
  |  | 2415|  2.01k|#define janet_free(X) free((X))
  ------------------
13878|  2.01k|    janet_deinit();
13879|  2.01k|    return args;
13880|  2.01k|}
janet.c:mutexgc:
14127|     37|static int mutexgc(void *p, size_t size) {
14128|     37|    (void) size;
14129|     37|    janet_os_mutex_deinit(p);
14130|     37|    return 0;
14131|     37|}
janet.c:rwlockgc:
14169|    316|static int rwlockgc(void *p, size_t size) {
14170|    316|    (void) size;
14171|    316|    janet_os_rwlock_deinit(p);
14172|    316|    return 0;
14173|    316|}
janet.c:janet_ffijit_gc:
14582|   347k|static int janet_ffijit_gc(void *p, size_t s) {
14583|   347k|    (void) s;
14584|   347k|    JanetFFIJittedFn *fn = p;
14585|   347k|    if (fn->function_pointer == NULL) return 0;
  ------------------
  |  Branch (14585:9): [True: 0, False: 347k]
  ------------------
14586|   347k|#ifdef JANET_FFI_JIT
14587|       |#ifdef JANET_WINDOWS
14588|       |    VirtualFree(fn->function_pointer, fn->size, MEM_RELEASE);
14589|       |#else
14590|   347k|    munmap(fn->function_pointer, fn->size);
14591|   347k|#endif
14592|   347k|#endif
14593|   347k|    return 0;
14594|   347k|}
janet.c:build_struct_type:
14738|  3.81k|static JanetFFIStruct *build_struct_type(int32_t argc, const Janet *argv) {
14739|       |    /* Use :pack to indicate a single packed struct member and :pack-all
14740|       |     * to pack the remaining members */
14741|  3.81k|    int32_t member_count = argc;
14742|  3.81k|    int all_packed = 0;
14743|  10.1k|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (14743:25): [True: 6.34k, False: 3.81k]
  ------------------
14744|  6.34k|        if (janet_keyeq(argv[i], "pack")) {
  ------------------
  |  Branch (14744:13): [True: 136, False: 6.20k]
  ------------------
14745|    136|            member_count--;
14746|  6.20k|        } else if (janet_keyeq(argv[i], "pack-all")) {
  ------------------
  |  Branch (14746:20): [True: 0, False: 6.20k]
  ------------------
14747|      0|            member_count--;
14748|      0|            all_packed = 1;
14749|      0|        }
14750|  6.34k|    }
14751|       |
14752|  3.81k|    JanetFFIStruct *st = janet_abstract(&janet_struct_type,
14753|  3.81k|                                        sizeof(JanetFFIStruct) + argc * sizeof(JanetFFIStructMember));
14754|  3.81k|    st->field_count = 0;
14755|  3.81k|    st->size = 0;
14756|  3.81k|    st->align = 1;
14757|  3.81k|    if (argc == 0) {
  ------------------
  |  Branch (14757:9): [True: 1, False: 3.81k]
  ------------------
14758|      1|        janet_panic("invalid empty struct");
14759|      1|    }
14760|  3.81k|    uint32_t is_aligned = 1;
14761|  3.81k|    int32_t i = 0;
14762|  7.60k|    for (int32_t j = 0; j < argc; j++) {
  ------------------
  |  Branch (14762:25): [True: 3.90k, False: 3.70k]
  ------------------
14763|  3.90k|        int pack_one = 0;
14764|  3.90k|        if (janet_keyeq(argv[j], "pack") || janet_keyeq(argv[j], "pack-all")) {
  ------------------
  |  Branch (14764:13): [True: 112, False: 3.79k]
  |  Branch (14764:45): [True: 0, False: 3.79k]
  ------------------
14765|    112|            pack_one = 1;
14766|    112|            j++;
14767|    112|            if (j == argc) break;
  ------------------
  |  Branch (14767:17): [True: 109, False: 3]
  ------------------
14768|    112|        }
14769|  3.79k|        st->fields[i].type = decode_ffi_type(argv[j]);
14770|  3.79k|        size_t el_size = type_size(st->fields[i].type);
14771|  3.79k|        size_t el_align = type_align(st->fields[i].type);
14772|  3.79k|        if (el_align <= 0) janet_panicf("bad field type %V", argv[j]);
  ------------------
  |  Branch (14772:13): [True: 0, False: 3.79k]
  ------------------
14773|  3.79k|        if (all_packed || pack_one) {
  ------------------
  |  Branch (14773:13): [True: 100, False: 3.69k]
  |  Branch (14773:27): [True: 0, False: 3.69k]
  ------------------
14774|      0|            if (st->size % el_align != 0) is_aligned = 0;
  ------------------
  |  Branch (14774:17): [True: 0, False: 0]
  ------------------
14775|      0|            st->fields[i].offset = st->size;
14776|      0|            st->size = check_type_size((int64_t) st->size + (int64_t) el_size);
14777|  3.79k|        } else {
14778|  3.79k|            if (el_align > st->align) st->align = (uint32_t) el_align;
  ------------------
  |  Branch (14778:17): [True: 3.63k, False: 167]
  ------------------
14779|  3.79k|            st->fields[i].offset = (((size_t) st->size + el_align - 1) / el_align) * el_align;
14780|  3.79k|            st->size = check_type_size((int64_t) el_size + (int64_t) st->fields[i].offset);
14781|  3.79k|        }
14782|  3.79k|        i++;
14783|  3.79k|    }
14784|  3.81k|    st->is_aligned = is_aligned;
14785|  3.81k|    st->size = check_type_size((((int64_t) st->size + st->align - 1) / st->align) * st->align);
14786|  3.81k|    st->field_count = member_count;
14787|  3.81k|    return st;
14788|  3.81k|}
janet.c:check_type_size:
14655|  7.42k|static uint32_t check_type_size(int64_t size) {
14656|  7.42k|    if (size > INT32_MAX) janet_panic("ffi type too large");
  ------------------
  |  Branch (14656:9): [True: 0, False: 7.42k]
  ------------------
14657|  7.42k|    return (uint32_t) size;
14658|  7.42k|}
janet.c:type_size:
14637|  3.71k|static size_t type_size(JanetFFIType t) {
14638|  3.71k|    size_t count = t.array_count < 0 ? 1 : (size_t) t.array_count;
  ------------------
  |  Branch (14638:20): [True: 3.70k, False: 10]
  ------------------
14639|  3.71k|    if (t.prim == JANET_FFI_TYPE_STRUCT) {
  ------------------
  |  Branch (14639:9): [True: 13, False: 3.70k]
  ------------------
14640|     13|        return t.st->size * count;
14641|  3.70k|    } else {
14642|  3.70k|        return janet_ffi_type_info[t.prim].size * count;
14643|  3.70k|    }
14644|  3.71k|}
janet.c:decode_ffi_type:
14790|  3.82k|static JanetFFIType decode_ffi_type(Janet x) {
14791|  3.82k|    if (janet_checktype(x, JANET_KEYWORD)) {
  ------------------
  |  |  806|  3.82k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 3.76k, False: 63]
  |  |  |  Branch (806:6): [Folded, False: 3.82k]
  |  |  ------------------
  |  |  807|  3.82k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  3.82k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  3.82k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  3.82k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.82k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.82k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14792|  3.76k|        return prim_type(decode_ffi_prim(janet_unwrap_keyword(x)));
  ------------------
  |  |  865|  3.76k|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
14793|  3.76k|    }
14794|     63|    JanetFFIType ret;
14795|     63|    ret.array_count = -1;
14796|     63|    ret.prim = JANET_FFI_TYPE_STRUCT;
14797|     63|    if (janet_checkabstract(x, &janet_struct_type)) {
  ------------------
  |  Branch (14797:9): [True: 13, False: 50]
  ------------------
14798|     13|        ret.st = janet_unwrap_abstract(x);
  ------------------
  |  |  866|     13|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
14799|     13|        return ret;
14800|     13|    }
14801|     50|    int32_t len;
14802|     50|    const Janet *els;
14803|     50|    if (janet_indexed_view(x, &els, &len)) {
  ------------------
  |  Branch (14803:9): [True: 34, False: 16]
  ------------------
14804|     34|        if (janet_checktype(x, JANET_ARRAY)) {
  ------------------
  |  |  806|     34|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 31, False: 3]
  |  |  |  Branch (806:6): [Folded, False: 34]
  |  |  ------------------
  |  |  807|     34|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     34|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     34|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     34|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     34|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     34|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14805|     31|            if (len != 2 && len != 1) janet_panicf("array type must be of form @[type count], got %v", x);
  ------------------
  |  Branch (14805:17): [True: 17, False: 14]
  |  Branch (14805:29): [True: 2, False: 15]
  ------------------
14806|     29|            ret = decode_ffi_type(els[0]);
14807|     29|            ret.array_count = -1;
14808|     29|            int32_t array_count = len == 1 ? 0 : janet_getnat(els, 1);
  ------------------
  |  Branch (14808:35): [True: 12, False: 17]
  ------------------
14809|     29|            check_type_size((int64_t) type_size(ret) * array_count);
14810|     29|            ret.array_count = array_count;
14811|     29|        } else {
14812|      3|            ret.st = build_struct_type(len, els);
14813|      3|        }
14814|     32|        return ret;
14815|     34|    } else {
14816|     16|        janet_panicf("bad native type %v", x);
14817|     16|    }
14818|     50|}
janet.c:prim_type:
14629|  3.69k|static JanetFFIType prim_type(JanetFFIPrimType pt) {
14630|  3.69k|    JanetFFIType t;
14631|  3.69k|    t.prim = pt;
14632|       |    t.st = NULL;
14633|  3.69k|    t.array_count = -1;
14634|  3.69k|    return t;
14635|  3.69k|}
janet.c:decode_ffi_prim:
14675|  3.76k|static JanetFFIPrimType decode_ffi_prim(const uint8_t *name) {
14676|  3.76k|    if (!janet_cstrcmp(name, "void")) return JANET_FFI_TYPE_VOID;
  ------------------
  |  Branch (14676:9): [True: 0, False: 3.76k]
  ------------------
14677|  3.76k|    if (!janet_cstrcmp(name, "bool")) return JANET_FFI_TYPE_BOOL;
  ------------------
  |  Branch (14677:9): [True: 0, False: 3.76k]
  ------------------
14678|  3.76k|    if (!janet_cstrcmp(name, "ptr")) return JANET_FFI_TYPE_PTR;
  ------------------
  |  Branch (14678:9): [True: 15, False: 3.74k]
  ------------------
14679|  3.74k|    if (!janet_cstrcmp(name, "pointer")) return JANET_FFI_TYPE_PTR;
  ------------------
  |  Branch (14679:9): [True: 0, False: 3.74k]
  ------------------
14680|  3.74k|    if (!janet_cstrcmp(name, "string")) return JANET_FFI_TYPE_STRING;
  ------------------
  |  Branch (14680:9): [True: 2, False: 3.74k]
  ------------------
14681|  3.74k|    if (!janet_cstrcmp(name, "float")) return JANET_FFI_TYPE_FLOAT;
  ------------------
  |  Branch (14681:9): [True: 0, False: 3.74k]
  ------------------
14682|  3.74k|    if (!janet_cstrcmp(name, "double")) return JANET_FFI_TYPE_DOUBLE;
  ------------------
  |  Branch (14682:9): [True: 0, False: 3.74k]
  ------------------
14683|  3.74k|    if (!janet_cstrcmp(name, "int8")) return JANET_FFI_TYPE_INT8;
  ------------------
  |  Branch (14683:9): [True: 3, False: 3.74k]
  ------------------
14684|  3.74k|    if (!janet_cstrcmp(name, "uint8")) return JANET_FFI_TYPE_UINT8;
  ------------------
  |  Branch (14684:9): [True: 10, False: 3.73k]
  ------------------
14685|  3.73k|    if (!janet_cstrcmp(name, "int16")) return JANET_FFI_TYPE_INT16;
  ------------------
  |  Branch (14685:9): [True: 4, False: 3.73k]
  ------------------
14686|  3.73k|    if (!janet_cstrcmp(name, "uint16")) return JANET_FFI_TYPE_UINT16;
  ------------------
  |  Branch (14686:9): [True: 6, False: 3.72k]
  ------------------
14687|  3.72k|    if (!janet_cstrcmp(name, "int32")) return JANET_FFI_TYPE_INT32;
  ------------------
  |  Branch (14687:9): [True: 10, False: 3.71k]
  ------------------
14688|  3.71k|    if (!janet_cstrcmp(name, "uint32")) return JANET_FFI_TYPE_UINT32;
  ------------------
  |  Branch (14688:9): [True: 6, False: 3.70k]
  ------------------
14689|  3.70k|    if (!janet_cstrcmp(name, "int64")) return JANET_FFI_TYPE_INT64;
  ------------------
  |  Branch (14689:9): [True: 1, False: 3.70k]
  ------------------
14690|  3.70k|    if (!janet_cstrcmp(name, "uint64")) return JANET_FFI_TYPE_UINT64;
  ------------------
  |  Branch (14690:9): [True: 0, False: 3.70k]
  ------------------
14691|  3.70k|#ifdef JANET_64
14692|  3.70k|    if (!janet_cstrcmp(name, "size")) return JANET_FFI_TYPE_UINT64;
  ------------------
  |  Branch (14692:9): [True: 0, False: 3.70k]
  ------------------
14693|  3.70k|    if (!janet_cstrcmp(name, "ssize")) return JANET_FFI_TYPE_INT64;
  ------------------
  |  Branch (14693:9): [True: 0, False: 3.70k]
  ------------------
14694|       |#else
14695|       |    if (!janet_cstrcmp(name, "size")) return JANET_FFI_TYPE_UINT32;
14696|       |    if (!janet_cstrcmp(name, "ssize")) return JANET_FFI_TYPE_INT32;
14697|       |#endif
14698|       |    /* aliases */
14699|  3.70k|    if (!janet_cstrcmp(name, "r32")) return JANET_FFI_TYPE_FLOAT;
  ------------------
  |  Branch (14699:9): [True: 3.39k, False: 311]
  ------------------
14700|    311|    if (!janet_cstrcmp(name, "r64")) return JANET_FFI_TYPE_DOUBLE;
  ------------------
  |  Branch (14700:9): [True: 3, False: 308]
  ------------------
14701|    308|    if (!janet_cstrcmp(name, "s8")) return JANET_FFI_TYPE_INT8;
  ------------------
  |  Branch (14701:9): [True: 4, False: 304]
  ------------------
14702|    304|    if (!janet_cstrcmp(name, "u8")) return JANET_FFI_TYPE_UINT8;
  ------------------
  |  Branch (14702:9): [True: 0, False: 304]
  ------------------
14703|    304|    if (!janet_cstrcmp(name, "s16")) return JANET_FFI_TYPE_INT16;
  ------------------
  |  Branch (14703:9): [True: 2, False: 302]
  ------------------
14704|    302|    if (!janet_cstrcmp(name, "u16")) return JANET_FFI_TYPE_UINT16;
  ------------------
  |  Branch (14704:9): [True: 2, False: 300]
  ------------------
14705|    300|    if (!janet_cstrcmp(name, "s32")) return JANET_FFI_TYPE_INT32;
  ------------------
  |  Branch (14705:9): [True: 174, False: 126]
  ------------------
14706|    126|    if (!janet_cstrcmp(name, "u32")) return JANET_FFI_TYPE_UINT32;
  ------------------
  |  Branch (14706:9): [True: 6, False: 120]
  ------------------
14707|    120|    if (!janet_cstrcmp(name, "s64")) return JANET_FFI_TYPE_INT64;
  ------------------
  |  Branch (14707:9): [True: 5, False: 115]
  ------------------
14708|    115|    if (!janet_cstrcmp(name, "u64")) return JANET_FFI_TYPE_UINT64;
  ------------------
  |  Branch (14708:9): [True: 1, False: 114]
  ------------------
14709|    114|    if (!janet_cstrcmp(name, "char")) return JANET_FFI_TYPE_INT8;
  ------------------
  |  Branch (14709:9): [True: 0, False: 114]
  ------------------
14710|    114|    if (!janet_cstrcmp(name, "short")) return JANET_FFI_TYPE_INT16;
  ------------------
  |  Branch (14710:9): [True: 0, False: 114]
  ------------------
14711|    114|    if (!janet_cstrcmp(name, "int")) return JANET_FFI_TYPE_INT32;
  ------------------
  |  Branch (14711:9): [True: 3, False: 111]
  ------------------
14712|    111|    if (!janet_cstrcmp(name, "long")) return JANET_FFI_TYPE_INT64;
  ------------------
  |  Branch (14712:9): [True: 0, False: 111]
  ------------------
14713|    111|    if (!janet_cstrcmp(name, "byte")) return JANET_FFI_TYPE_UINT8;
  ------------------
  |  Branch (14713:9): [True: 0, False: 111]
  ------------------
14714|    111|    if (!janet_cstrcmp(name, "uchar")) return JANET_FFI_TYPE_UINT8;
  ------------------
  |  Branch (14714:9): [True: 0, False: 111]
  ------------------
14715|    111|    if (!janet_cstrcmp(name, "ushort")) return JANET_FFI_TYPE_UINT16;
  ------------------
  |  Branch (14715:9): [True: 0, False: 111]
  ------------------
14716|    111|    if (!janet_cstrcmp(name, "uint")) return JANET_FFI_TYPE_UINT32;
  ------------------
  |  Branch (14716:9): [True: 37, False: 74]
  ------------------
14717|     74|    if (!janet_cstrcmp(name, "ulong")) return JANET_FFI_TYPE_UINT64;
  ------------------
  |  Branch (14717:9): [True: 0, False: 74]
  ------------------
14718|     74|    janet_panicf("unknown machine type %s", name);
14719|     74|}
janet.c:type_align:
14646|  3.69k|static size_t type_align(JanetFFIType t) {
14647|  3.69k|    if (t.prim == JANET_FFI_TYPE_STRUCT) {
  ------------------
  |  Branch (14647:9): [True: 13, False: 3.68k]
  ------------------
14648|     13|        return t.st->align;
14649|  3.68k|    } else {
14650|  3.68k|        return janet_ffi_type_info[t.prim].align;
14651|  3.68k|    }
14652|  3.69k|}
janet.c:janet_ffi_get_callable_pointer:
14867|      4|static void *janet_ffi_get_callable_pointer(const Janet *argv, int32_t n) {
14868|      4|    switch (janet_type(argv[n])) {
  ------------------
  |  |  795|      4|    (isnan((x).number) \
  |  |  796|      4|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|      4|        : JANET_NUMBER)
  ------------------
  |  Branch (14868:13): [True: 3, False: 1]
  ------------------
14869|      2|        default:
  ------------------
  |  Branch (14869:9): [True: 2, False: 2]
  ------------------
14870|      2|            break;
14871|      2|        case JANET_POINTER:
  ------------------
  |  Branch (14871:9): [True: 0, False: 4]
  ------------------
14872|      0|            return janet_unwrap_pointer(argv[n]);
  ------------------
  |  |  867|      0|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
14873|      2|        case JANET_ABSTRACT:
  ------------------
  |  Branch (14873:9): [True: 2, False: 2]
  ------------------
14874|      2|            if (!janet_checkabstract(argv[n], &janet_type_ffijit)) break;
  ------------------
  |  Branch (14874:17): [True: 2, False: 0]
  ------------------
14875|      0|            return ((JanetFFIJittedFn *)janet_unwrap_abstract(argv[n]))->function_pointer;
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
14876|      4|    }
14877|      4|    janet_panicf("bad slot #%d, expected ffi callable pointer type, got %v", n, argv[n]);
14878|      4|}
janet.c:fiber_reset:
16334|  2.01M|static void fiber_reset(JanetFiber *fiber) {
16335|  2.01M|    fiber->maxstack = JANET_STACK_MAX;
  ------------------
  |  |  307|  2.01M|#define JANET_STACK_MAX 0x7fffffff
  ------------------
16336|  2.01M|    fiber->frame = 0;
16337|  2.01M|    fiber->stackstart = JANET_FRAME_SIZE;
  ------------------
  |  | 1026|  2.01M|#define JANET_FRAME_SIZE 4
  ------------------
16338|  2.01M|    fiber->stacktop = JANET_FRAME_SIZE;
  ------------------
  |  | 1026|  2.01M|#define JANET_FRAME_SIZE 4
  ------------------
16339|  2.01M|    fiber->child = NULL;
16340|  2.01M|    fiber->flags = JANET_FIBER_MASK_YIELD | JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  791|  2.01M|#define JANET_FIBER_MASK_YIELD 8
  ------------------
                  fiber->flags = JANET_FIBER_MASK_YIELD | JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  812|  2.01M|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
                  fiber->flags = JANET_FIBER_MASK_YIELD | JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  813|  2.01M|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  ------------------
16341|  2.01M|    fiber->env = NULL;
16342|  2.01M|    fiber->last_value = janet_wrap_nil();
  ------------------
  |  |  831|  2.01M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  2.01M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16343|  2.01M|#ifdef JANET_EV
16344|  2.01M|    fiber->sched_id = 0;
16345|  2.01M|    fiber->ev_callback = NULL;
16346|  2.01M|    fiber->ev_state = NULL;
16347|  2.01M|    fiber->ev_stream = NULL;
16348|  2.01M|    fiber->supervisor_channel = NULL;
16349|  2.01M|#endif
16350|  2.01M|    janet_fiber_set_status(fiber, JANET_STATUS_NEW);
  ------------------
  |  |  826|  2.01M|#define janet_fiber_set_status(f, s) do {\
  |  |  827|  2.01M|    (f)->flags &= ~JANET_FIBER_STATUS_MASK;\
  |  |  ------------------
  |  |  |  |  807|  2.01M|#define JANET_FIBER_STATUS_MASK 0x3F0000
  |  |  ------------------
  |  |  828|  2.01M|    (f)->flags |= (s) << JANET_FIBER_STATUS_OFFSET;\
  |  |  ------------------
  |  |  |  |  809|  2.01M|#define JANET_FIBER_STATUS_OFFSET 16
  |  |  ------------------
  |  |  829|  2.01M|} while (0)
  |  |  ------------------
  |  |  |  Branch (829:10): [Folded, False: 2.01M]
  |  |  ------------------
  ------------------
16351|  2.01M|}
janet.c:fiber_alloc:
16353|  2.01M|static JanetFiber *fiber_alloc(int32_t capacity) {
16354|  2.01M|    Janet *data;
16355|  2.01M|    JanetFiber *fiber = janet_gcalloc(JANET_MEMORY_FIBER, sizeof(JanetFiber));
16356|  2.01M|    if (capacity < 32) {
  ------------------
  |  Branch (16356:9): [True: 0, False: 2.01M]
  ------------------
16357|      0|        capacity = 32;
16358|      0|    }
16359|  2.01M|    fiber->capacity = capacity;
16360|  2.01M|    data = array_allocate(sizeof(Janet), capacity);
16361|  2.01M|    if (NULL == data) {
  ------------------
  |  Branch (16361:9): [True: 0, False: 2.01M]
  ------------------
16362|      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]
  |  |  ------------------
  ------------------
16363|      0|    }
16364|  2.01M|    janet_vm.next_collection += sizeof(Janet) * capacity;
16365|  2.01M|    fiber->data = data;
16366|  2.01M|    return fiber;
16367|  2.01M|}
janet.c:janet_fiber_grow:
16432|  7.48k|static void janet_fiber_grow(JanetFiber *fiber, int32_t needed) {
16433|  7.48k|    int32_t cap = needed > (INT32_MAX / 2) ? INT32_MAX : 2 * needed;
  ------------------
  |  Branch (16433:19): [True: 0, False: 7.48k]
  ------------------
16434|  7.48k|    janet_fiber_setcapacity(fiber, cap);
16435|  7.48k|}
janet.c:make_struct_n:
16483|  1.63M|static Janet make_struct_n(const Janet *args, int32_t n) {
16484|  1.63M|    int32_t i = 0;
16485|  1.63M|    if (n & 1) n--;
  ------------------
  |  Branch (16485:9): [True: 353k, False: 1.28M]
  ------------------
16486|  1.63M|    JanetKV *st = janet_struct_begin(n);
16487|  5.35M|    for (; i < n; i += 2) {
  ------------------
  |  Branch (16487:12): [True: 3.71M, False: 1.63M]
  ------------------
16488|  3.71M|        janet_struct_put(st, args[i], args[i + 1]);
16489|  3.71M|    }
16490|  1.63M|    return janet_wrap_struct(janet_struct_end(st));
  ------------------
  |  |  842|  1.63M|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16491|  1.63M|}
janet.c:janet_env_detach:
16557|  3.44G|static void janet_env_detach(JanetFuncEnv *env) {
16558|       |    /* Check for closure environment */
16559|  3.44G|    if (env) {
  ------------------
  |  Branch (16559:9): [True: 14.5M, False: 3.43G]
  ------------------
16560|  14.5M|        janet_env_valid(env);
16561|  14.5M|        int32_t len = env->length; /* Maximum is 256 */
16562|  14.5M|        size_t s = sizeof(Janet) * (size_t) len;
16563|  14.5M|        Janet *vmem = janet_malloc(s);
  ------------------
  |  | 2406|  14.5M|#define janet_malloc(X) malloc((X))
  ------------------
16564|  14.5M|        janet_vm.next_collection += (uint32_t) s;
16565|  14.5M|        if (NULL == vmem) {
  ------------------
  |  Branch (16565:13): [True: 0, False: 14.5M]
  ------------------
16566|      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]
  |  |  ------------------
  ------------------
16567|      0|        }
16568|  14.5M|        Janet *values = env->as.fiber->data + env->offset;
16569|  14.5M|        safe_memcpy(vmem, values, s);
16570|  14.5M|        uint32_t *bitset = janet_stack_frame(values)->func->def->closure_bitset;
  ------------------
  |  |  831|  14.5M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1026|  14.5M|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
16571|  14.5M|        if (bitset) {
  ------------------
  |  Branch (16571:13): [True: 14.5M, False: 0]
  ------------------
16572|       |            /* Clear unneeded references in closure environment */
16573|  30.8M|            for (int32_t i = 0; i < len; i += 32) {
  ------------------
  |  Branch (16573:33): [True: 16.3M, False: 14.5M]
  ------------------
16574|  16.3M|                uint32_t mask = ~(bitset[i >> 5]);
16575|  16.3M|                int32_t maxj = i + 32 > len ? len : i + 32;
  ------------------
  |  Branch (16575:32): [True: 14.5M, False: 1.75M]
  ------------------
16576|   418M|                for (int32_t j = i; j < maxj; j++) {
  ------------------
  |  Branch (16576:37): [True: 401M, False: 16.3M]
  ------------------
16577|   401M|                    if (mask & 1) vmem[j] = janet_wrap_nil();
  ------------------
  |  |  831|   319M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   319M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   319M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   319M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (16577:25): [True: 319M, False: 82.4M]
  ------------------
16578|   401M|                    mask >>= 1;
16579|   401M|                }
16580|  16.3M|            }
16581|  14.5M|        }
16582|  14.5M|        env->offset = 0;
16583|  14.5M|        env->as.values = vmem;
16584|  14.5M|    }
16585|  3.44G|}
janet.c:janet_mark_string:
18102|   115M|static void janet_mark_string(const uint8_t *str) {
18103|   115M|    janet_gc_mark(janet_string_head(str));
  ------------------
  |  |  659|   115M|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|   115M|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|   115M|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
18104|   115M|}
janet.c:janet_mark_buffer:
18106|  21.0k|static void janet_mark_buffer(JanetBuffer *buffer) {
18107|  21.0k|    janet_gc_mark(buffer);
  ------------------
  |  |  659|  21.0k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|  21.0k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|  21.0k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
18108|  21.0k|}
janet.c:janet_mark_abstract:
18110|   171k|static void janet_mark_abstract(void *adata) {
18111|   171k|#ifdef JANET_EV
18112|       |    /* Check if abstract type is a threaded abstract type. If it is, marking means
18113|       |     * updating the threaded_abstract table. */
18114|   171k|    if ((janet_abstract_head(adata)->gc.flags & JANET_MEM_TYPEBITS) == JANET_MEMORY_THREADED_ABSTRACT) {
  ------------------
  |  | 1897|   171k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
                  if ((janet_abstract_head(adata)->gc.flags & JANET_MEM_TYPEBITS) == JANET_MEMORY_THREADED_ABSTRACT) {
  ------------------
  |  |  652|   171k|#define JANET_MEM_TYPEBITS 0xFF
  ------------------
  |  Branch (18114:9): [True: 234, False: 170k]
  ------------------
18115|    234|        janet_table_put(&janet_vm.threaded_abstracts, janet_wrap_abstract(adata), janet_wrap_true());
  ------------------
  |  |  851|    234|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|    234|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    234|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    234|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      janet_table_put(&janet_vm.threaded_abstracts, janet_wrap_abstract(adata), janet_wrap_true());
  ------------------
  |  |  832|    234|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  822|    234|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    234|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    234|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18116|    234|        return;
18117|    234|    }
18118|   170k|#endif
18119|   170k|    if (janet_gc_reachable(janet_abstract_head(adata)))
  ------------------
  |  |  660|   170k|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|   170k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|   170k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (660:31): [True: 123k, False: 47.4k]
  |  |  ------------------
  ------------------
18120|   123k|        return;
18121|  47.4k|    janet_gc_mark(janet_abstract_head(adata));
  ------------------
  |  |  659|  47.4k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|  47.4k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|  47.4k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
18122|  47.4k|    if (janet_abstract_head(adata)->type->gcmark) {
  ------------------
  |  | 1897|  47.4k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
  |  Branch (18122:9): [True: 9.27k, False: 38.1k]
  ------------------
18123|  9.27k|        janet_abstract_head(adata)->type->gcmark(adata, janet_abstract_size(adata));
  ------------------
  |  | 1897|  9.27k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
                      janet_abstract_head(adata)->type->gcmark(adata, janet_abstract_size(adata));
  ------------------
  |  | 1900|  9.27k|#define janet_abstract_size(u) (janet_abstract_head(u)->size)
  |  |  ------------------
  |  |  |  | 1897|  9.27k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
18124|  9.27k|    }
18125|  47.4k|}
janet.c:janet_mark_array:
18166|  83.2k|static void janet_mark_array(JanetArray *array) {
18167|  83.2k|    if (janet_gc_reachable(array))
  ------------------
  |  |  660|  83.2k|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|  83.2k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|  83.2k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (660:31): [True: 52.9k, False: 30.2k]
  |  |  ------------------
  ------------------
18168|  52.9k|        return;
18169|  30.2k|    janet_gc_mark(array);
  ------------------
  |  |  659|  30.2k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|  30.2k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|  30.2k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
18170|  30.2k|    if (janet_gc_type((JanetGCObject *) array) == JANET_MEMORY_ARRAY) {
  ------------------
  |  |  657|  30.2k|#define janet_gc_type(m) (janet_gc_header(m)->flags & 0xFF)
  |  |  ------------------
  |  |  |  |  650|  30.2k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
  |  Branch (18170:9): [True: 29.9k, False: 335]
  ------------------
18171|  29.9k|        janet_mark_many(array->data, array->count);
18172|  29.9k|    }
18173|  30.2k|}
janet.c:janet_mark_many:
18128|  12.0M|static void janet_mark_many(const Janet *values, int32_t n) {
18129|  12.0M|    if (values == NULL)
  ------------------
  |  Branch (18129:9): [True: 1.17M, False: 10.9M]
  ------------------
18130|  1.17M|        return;
18131|  10.9M|    const Janet *end = values + n;
18132|   131M|    while (values < end) {
  ------------------
  |  Branch (18132:12): [True: 120M, False: 10.9M]
  ------------------
18133|   120M|        janet_mark(*values);
18134|   120M|        values += 1;
18135|   120M|    }
18136|  10.9M|}
janet.c:janet_mark_table:
18175|  6.56M|static void janet_mark_table(JanetTable *table) {
18176|  6.57M|recur: /* Manual tail recursion */
18177|  6.57M|    if (janet_gc_reachable(table))
  ------------------
  |  |  660|  6.57M|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|  6.57M|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|  6.57M|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (660:31): [True: 291k, False: 6.27M]
  |  |  ------------------
  ------------------
18178|   291k|        return;
18179|  6.27M|    janet_gc_mark(table);
  ------------------
  |  |  659|  6.27M|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|  6.27M|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|  6.27M|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
18180|  6.27M|    enum JanetMemoryType memtype = janet_gc_type(table);
  ------------------
  |  |  657|  6.27M|#define janet_gc_type(m) (janet_gc_header(m)->flags & 0xFF)
  |  |  ------------------
  |  |  |  |  650|  6.27M|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
18181|  6.27M|    if (memtype == JANET_MEMORY_TABLE_WEAKK) {
  ------------------
  |  Branch (18181:9): [True: 119, False: 6.27M]
  ------------------
18182|    119|        janet_mark_values(table->data, table->capacity);
18183|  6.27M|    } else if (memtype == JANET_MEMORY_TABLE_WEAKV) {
  ------------------
  |  Branch (18183:16): [True: 444, False: 6.27M]
  ------------------
18184|    444|        janet_mark_keys(table->data, table->capacity);
18185|  6.27M|    } else if (memtype == JANET_MEMORY_TABLE) {
  ------------------
  |  Branch (18185:16): [True: 6.27M, False: 248]
  ------------------
18186|  6.27M|        janet_mark_kvs(table->data, table->capacity);
18187|  6.27M|    }
18188|       |    /* do nothing for JANET_MEMORY_TABLE_WEAKKV */
18189|  6.27M|    if (table->proto) {
  ------------------
  |  Branch (18189:9): [True: 2.77k, False: 6.27M]
  ------------------
18190|  2.77k|        table = table->proto;
18191|  2.77k|        goto recur;
18192|  2.77k|    }
18193|  6.27M|}
janet.c:janet_mark_values:
18148|    119|static void janet_mark_values(const JanetKV *kvs, int32_t n) {
18149|    119|    const JanetKV *end = kvs + n;
18150|  23.8M|    while (kvs < end) {
  ------------------
  |  Branch (18150:12): [True: 23.8M, False: 119]
  ------------------
18151|  23.8M|        janet_mark(kvs->value);
18152|  23.8M|        kvs++;
18153|  23.8M|    }
18154|    119|}
janet.c:janet_mark_keys:
18139|    444|static void janet_mark_keys(const JanetKV *kvs, int32_t n) {
18140|    444|    const JanetKV *end = kvs + n;
18141|  15.8k|    while (kvs < end) {
  ------------------
  |  Branch (18141:12): [True: 15.4k, False: 444]
  ------------------
18142|  15.4k|        janet_mark(kvs->key);
18143|  15.4k|        kvs++;
18144|  15.4k|    }
18145|    444|}
janet.c:janet_mark_kvs:
18157|  6.34M|static void janet_mark_kvs(const JanetKV *kvs, int32_t n) {
18158|  6.34M|    const JanetKV *end = kvs + n;
18159|   110M|    while (kvs < end) {
  ------------------
  |  Branch (18159:12): [True: 104M, False: 6.34M]
  ------------------
18160|   104M|        janet_mark(kvs->key);
18161|   104M|        janet_mark(kvs->value);
18162|   104M|        kvs++;
18163|   104M|    }
18164|  6.34M|}
janet.c:janet_mark_struct:
18195|  72.5k|static void janet_mark_struct(const JanetKV *st) {
18196|  72.5k|recur:
18197|  72.5k|    if (janet_gc_reachable(janet_struct_head(st)))
  ------------------
  |  |  660|  72.5k|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|  72.5k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|  72.5k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (660:31): [True: 10.1k, False: 62.3k]
  |  |  ------------------
  ------------------
18198|  10.1k|        return;
18199|  62.3k|    janet_gc_mark(janet_struct_head(st));
  ------------------
  |  |  659|  62.3k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|  62.3k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|  62.3k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
18200|  62.3k|    janet_mark_kvs(st, janet_struct_capacity(st));
  ------------------
  |  | 1849|  62.3k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  62.3k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
18201|  62.3k|    st = janet_struct_proto(st);
  ------------------
  |  | 1851|  62.3k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|  62.3k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
18202|  62.3k|    if (st) goto recur;
  ------------------
  |  Branch (18202:9): [True: 0, False: 62.3k]
  ------------------
18203|  62.3k|}
janet.c:janet_mark_tuple:
18205|  7.34M|static void janet_mark_tuple(const Janet *tuple) {
18206|  7.34M|    if (janet_gc_reachable(janet_tuple_head(tuple)))
  ------------------
  |  |  660|  7.34M|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|  7.34M|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|  7.34M|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (660:31): [True: 155k, False: 7.19M]
  |  |  ------------------
  ------------------
18207|   155k|        return;
18208|  7.19M|    janet_gc_mark(janet_tuple_head(tuple));
  ------------------
  |  |  659|  7.19M|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|  7.19M|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|  7.19M|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
18209|       |    janet_mark_many(tuple, janet_tuple_length(tuple));
  ------------------
  |  | 1802|  7.19M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  7.19M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
18210|  7.19M|}
janet.c:janet_mark_function:
18251|  12.2M|static void janet_mark_function(JanetFunction *func) {
18252|  12.2M|    int32_t i;
18253|  12.2M|    int32_t numenvs;
18254|  12.2M|    if (janet_gc_reachable(func))
  ------------------
  |  |  660|  12.2M|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|  12.2M|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|  12.2M|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (660:31): [True: 8.89M, False: 3.36M]
  |  |  ------------------
  ------------------
18255|  8.89M|        return;
18256|  3.36M|    janet_gc_mark(func);
  ------------------
  |  |  659|  3.36M|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|  3.36M|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|  3.36M|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
18257|  3.36M|    if (NULL != func->def) {
  ------------------
  |  Branch (18257:9): [True: 3.36M, False: 18.4E]
  ------------------
18258|       |        /* this should always be true, except if function is only partially constructed */
18259|  3.36M|        numenvs = func->def->environments_length;
18260|  3.75M|        for (i = 0; i < numenvs; ++i) {
  ------------------
  |  Branch (18260:21): [True: 393k, False: 3.36M]
  ------------------
18261|   393k|            janet_mark_funcenv(func->envs[i]);
18262|   393k|        }
18263|  3.36M|        janet_mark_funcdef(func->def);
18264|  3.36M|    }
18265|  3.36M|}
janet.c:janet_mark_funcenv:
18213|   407k|static void janet_mark_funcenv(JanetFuncEnv *env) {
18214|   407k|    if (janet_gc_reachable(env))
  ------------------
  |  |  660|   407k|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|   407k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|   407k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (660:31): [True: 325k, False: 82.2k]
  |  |  ------------------
  ------------------
18215|   325k|        return;
18216|  82.2k|    janet_gc_mark(env);
  ------------------
  |  |  659|  82.2k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|  82.2k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|  82.2k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
18217|       |    /* If closure env references a dead fiber, we can just copy out the stack frame we need so
18218|       |     * we don't need to keep around the whole dead fiber. */
18219|  82.2k|    janet_env_maybe_detach(env);
18220|  82.2k|    if (env->offset > 0) {
  ------------------
  |  Branch (18220:9): [True: 13.8k, False: 68.4k]
  ------------------
18221|       |        /* On stack */
18222|  13.8k|        janet_mark_fiber(env->as.fiber);
18223|  68.4k|    } else {
18224|       |        /* Not on stack */
18225|  68.4k|        janet_mark_many(env->as.values, env->length);
18226|  68.4k|    }
18227|  82.2k|}
janet.c:janet_mark_funcdef:
18230|  4.79M|static void janet_mark_funcdef(JanetFuncDef *def) {
18231|  4.79M|    int32_t i;
18232|  4.79M|    if (janet_gc_reachable(def))
  ------------------
  |  |  660|  4.79M|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|  4.79M|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|  4.79M|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (660:31): [True: 102k, False: 4.69M]
  |  |  ------------------
  ------------------
18233|   102k|        return;
18234|  4.69M|    janet_gc_mark(def);
  ------------------
  |  |  659|  4.69M|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|  4.69M|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|  4.69M|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
18235|  4.69M|    janet_mark_many(def->constants, def->constants_length);
18236|  6.13M|    for (i = 0; i < def->defs_length; ++i) {
  ------------------
  |  Branch (18236:17): [True: 1.43M, False: 4.69M]
  ------------------
18237|  1.43M|        janet_mark_funcdef(def->defs[i]);
18238|  1.43M|    }
18239|  4.69M|    if (def->source)
  ------------------
  |  Branch (18239:9): [True: 4.41M, False: 281k]
  ------------------
18240|  4.41M|        janet_mark_string(def->source);
18241|  4.69M|    if (def->name)
  ------------------
  |  Branch (18241:9): [True: 4.40M, False: 289k]
  ------------------
18242|  4.40M|        janet_mark_string(def->name);
18243|  4.69M|    if (def->symbolmap) {
  ------------------
  |  Branch (18243:9): [True: 4.25M, False: 439k]
  ------------------
18244|  48.9M|        for (int i = 0; i < def->symbolmap_length; i++) {
  ------------------
  |  Branch (18244:25): [True: 44.6M, False: 4.25M]
  ------------------
18245|  44.6M|            janet_mark_string(def->symbolmap[i].symbol);
18246|  44.6M|        }
18247|  4.25M|    }
18248|       |
18249|  4.69M|}
janet.c:janet_mark_fiber:
18267|  52.3M|static void janet_mark_fiber(JanetFiber *fiber) {
18268|  52.3M|    int32_t i, j;
18269|  52.3M|    JanetStackFrame *frame;
18270|  52.3M|recur:
18271|  52.3M|    if (janet_gc_reachable(fiber))
  ------------------
  |  |  660|  52.3M|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|  52.3M|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|  52.3M|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (660:31): [True: 52.2M, False: 34.1k]
  |  |  ------------------
  ------------------
18272|  52.2M|        return;
18273|  34.1k|    janet_gc_mark(fiber);
  ------------------
  |  |  659|  34.1k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|  34.1k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|  34.1k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
18274|       |
18275|  34.1k|    janet_mark(fiber->last_value);
18276|       |
18277|       |    /* Mark values on the argument stack */
18278|  34.1k|    janet_mark_many(fiber->data + fiber->stackstart,
18279|  34.1k|                    fiber->stacktop - fiber->stackstart);
18280|       |
18281|  34.1k|    i = fiber->frame;
18282|  34.1k|    j = fiber->stackstart - JANET_FRAME_SIZE;
  ------------------
  |  | 1026|  34.1k|#define JANET_FRAME_SIZE 4
  ------------------
18283|   106k|    while (i > 0) {
  ------------------
  |  Branch (18283:12): [True: 72.2k, False: 34.1k]
  ------------------
18284|  72.2k|        frame = (JanetStackFrame *)(fiber->data + i - JANET_FRAME_SIZE);
  ------------------
  |  | 1026|  72.2k|#define JANET_FRAME_SIZE 4
  ------------------
18285|  72.2k|        if (NULL != frame->func)
  ------------------
  |  Branch (18285:13): [True: 66.8k, False: 5.38k]
  ------------------
18286|  66.8k|            janet_mark_function(frame->func);
18287|  72.2k|        if (NULL != frame->env)
  ------------------
  |  Branch (18287:13): [True: 13.9k, False: 58.3k]
  ------------------
18288|  13.9k|            janet_mark_funcenv(frame->env);
18289|       |        /* Mark all values in the stack frame */
18290|  72.2k|        janet_mark_many(fiber->data + i, j - i);
18291|  72.2k|        j = i - JANET_FRAME_SIZE;
  ------------------
  |  | 1026|  72.2k|#define JANET_FRAME_SIZE 4
  ------------------
18292|  72.2k|        i = frame->prevframe;
18293|  72.2k|    }
18294|       |
18295|  34.1k|    if (fiber->env)
  ------------------
  |  Branch (18295:9): [True: 15.9k, False: 18.2k]
  ------------------
18296|  15.9k|        janet_mark_table(fiber->env);
18297|       |
18298|  34.1k|#ifdef JANET_EV
18299|  34.1k|    if (fiber->supervisor_channel) {
  ------------------
  |  Branch (18299:9): [True: 1.22k, False: 32.9k]
  ------------------
18300|  1.22k|        janet_mark_abstract(fiber->supervisor_channel);
18301|  1.22k|    }
18302|  34.1k|    if (fiber->ev_stream) {
  ------------------
  |  Branch (18302:9): [True: 0, False: 34.1k]
  ------------------
18303|      0|        janet_mark_abstract(fiber->ev_stream);
18304|      0|    }
18305|  34.1k|    if (fiber->ev_callback) {
  ------------------
  |  Branch (18305:9): [True: 0, False: 34.1k]
  ------------------
18306|      0|        fiber->ev_callback(fiber, JANET_ASYNC_EVENT_MARK);
18307|      0|    }
18308|  34.1k|#endif
18309|       |
18310|       |    /* Explicit tail recursion */
18311|  34.1k|    if (fiber->child) {
  ------------------
  |  Branch (18311:9): [True: 1.15k, False: 33.0k]
  ------------------
18312|  1.15k|        fiber = fiber->child;
18313|  1.15k|        goto recur;
18314|  1.15k|    }
18315|  34.1k|}
janet.c:janet_check_liveref:
18384|  30.2M|static int janet_check_liveref(Janet x) {
18385|  30.2M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  30.2M|    (isnan((x).number) \
  |  |  796|  30.2M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  30.2M|        : JANET_NUMBER)
  ------------------
  |  Branch (18385:13): [True: 30.1M, False: 25.8k]
  ------------------
18386|  30.2M|        default:
  ------------------
  |  Branch (18386:9): [True: 30.2M, False: 819]
  ------------------
18387|  30.2M|            return 1;
18388|    192|        case JANET_ARRAY:
  ------------------
  |  Branch (18388:9): [True: 192, False: 30.2M]
  ------------------
18389|    525|        case JANET_TABLE:
  ------------------
  |  Branch (18389:9): [True: 333, False: 30.2M]
  ------------------
18390|    525|        case JANET_FUNCTION:
  ------------------
  |  Branch (18390:9): [True: 0, False: 30.2M]
  ------------------
18391|    566|        case JANET_BUFFER:
  ------------------
  |  Branch (18391:9): [True: 41, False: 30.2M]
  ------------------
18392|    574|        case JANET_FIBER:
  ------------------
  |  Branch (18392:9): [True: 8, False: 30.2M]
  ------------------
18393|    574|            return janet_gc_reachable(janet_unwrap_pointer(x));
  ------------------
  |  |  660|    574|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|    574|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|    574|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
18394|     25|        case JANET_STRING:
  ------------------
  |  Branch (18394:9): [True: 25, False: 30.2M]
  ------------------
18395|    139|        case JANET_SYMBOL:
  ------------------
  |  Branch (18395:9): [True: 114, False: 30.2M]
  ------------------
18396|    158|        case JANET_KEYWORD:
  ------------------
  |  Branch (18396:9): [True: 19, False: 30.2M]
  ------------------
18397|    158|            return janet_gc_reachable(janet_string_head(janet_unwrap_string(x)));
  ------------------
  |  |  660|    158|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|    158|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|    158|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
18398|      0|        case JANET_ABSTRACT:
  ------------------
  |  Branch (18398:9): [True: 0, False: 30.2M]
  ------------------
18399|      0|            return janet_gc_reachable(janet_abstract_head(janet_unwrap_abstract(x)));
  ------------------
  |  |  660|      0|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|      0|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|      0|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
18400|     31|        case JANET_TUPLE:
  ------------------
  |  Branch (18400:9): [True: 31, False: 30.2M]
  ------------------
18401|     31|            return janet_gc_reachable(janet_tuple_head(janet_unwrap_tuple(x)));
  ------------------
  |  |  660|     31|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|     31|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|     31|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
18402|     56|        case JANET_STRUCT:
  ------------------
  |  Branch (18402:9): [True: 56, False: 30.2M]
  ------------------
18403|     56|            return janet_gc_reachable(janet_struct_head(janet_unwrap_struct(x)));
  ------------------
  |  |  660|     56|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  650|     56|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  653|     56|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
18404|  30.2M|    }
18405|  30.2M|}
janet.c:janet_deinit_block:
18318|  3.64G|static void janet_deinit_block(JanetGCObject *mem) {
18319|  3.64G|    switch (mem->flags & JANET_MEM_TYPEBITS) {
  ------------------
  |  |  652|  3.64G|#define JANET_MEM_TYPEBITS 0xFF
  ------------------
18320|   297M|        default:
  ------------------
  |  Branch (18320:9): [True: 297M, False: 3.35G]
  ------------------
18321|  3.58G|        case JANET_MEMORY_FUNCTION:
  ------------------
  |  Branch (18321:9): [True: 3.28G, False: 361M]
  ------------------
18322|  3.58G|            break; /* Do nothing for non gc types */
18323|  23.9M|        case JANET_MEMORY_SYMBOL:
  ------------------
  |  Branch (18323:9): [True: 23.9M, False: 3.62G]
  ------------------
18324|  23.9M|            janet_symbol_deinit(((JanetStringHead *) mem)->data);
18325|  23.9M|            break;
18326|  14.6M|        case JANET_MEMORY_ARRAY:
  ------------------
  |  Branch (18326:9): [True: 14.6M, False: 3.63G]
  ------------------
18327|  15.5M|        case JANET_MEMORY_ARRAY_WEAK:
  ------------------
  |  Branch (18327:9): [True: 933k, False: 3.64G]
  ------------------
18328|  15.5M|            janet_free(((JanetArray *) mem)->data);
  ------------------
  |  | 2415|  15.5M|#define janet_free(X) free((X))
  ------------------
18329|  15.5M|            break;
18330|  11.9M|        case JANET_MEMORY_TABLE:
  ------------------
  |  Branch (18330:9): [True: 11.9M, False: 3.63G]
  ------------------
18331|  12.1M|        case JANET_MEMORY_TABLE_WEAKK:
  ------------------
  |  Branch (18331:9): [True: 244k, False: 3.64G]
  ------------------
18332|  12.6M|        case JANET_MEMORY_TABLE_WEAKV:
  ------------------
  |  Branch (18332:9): [True: 459k, False: 3.64G]
  ------------------
18333|  12.8M|        case JANET_MEMORY_TABLE_WEAKKV:
  ------------------
  |  Branch (18333:9): [True: 217k, False: 3.64G]
  ------------------
18334|  12.8M|            janet_free(((JanetTable *) mem)->data);
  ------------------
  |  | 2415|  12.8M|#define janet_free(X) free((X))
  ------------------
18335|  12.8M|            break;
18336|  2.02M|        case JANET_MEMORY_FIBER: {
  ------------------
  |  Branch (18336:9): [True: 2.02M, False: 3.64G]
  ------------------
18337|  2.02M|            JanetFiber *f = (JanetFiber *)mem;
18338|  2.02M|#ifdef JANET_EV
18339|  2.02M|            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: 2.02M]
  |  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|  2.02M|            } else if (f->gc.flags & JANET_FIBER_EV_GCFLAG_SUSPENDED) {
  ------------------
  |  |  820|  2.02M|#define JANET_FIBER_EV_GCFLAG_SUSPENDED 0x2000000
  ------------------
  |  Branch (18342:24): [True: 0, False: 2.02M]
  ------------------
18343|      0|                janet_ev_dec_refcount();
18344|      0|            }
18345|  2.02M|#endif
18346|  2.02M|            janet_free(f->data);
  ------------------
  |  | 2415|  2.02M|#define janet_free(X) free((X))
  ------------------
18347|  2.02M|        }
18348|  2.02M|        break;
18349|  13.4M|        case JANET_MEMORY_BUFFER:
  ------------------
  |  Branch (18349:9): [True: 13.4M, False: 3.63G]
  ------------------
18350|  13.4M|            janet_buffer_deinit((JanetBuffer *) mem);
18351|  13.4M|            break;
18352|  4.09M|        case JANET_MEMORY_ABSTRACT: {
  ------------------
  |  Branch (18352:9): [True: 4.09M, False: 3.64G]
  ------------------
18353|  4.09M|            JanetAbstractHead *head = (JanetAbstractHead *)mem;
18354|  4.09M|            if (head->type->gcperthread) {
  ------------------
  |  Branch (18354:17): [True: 470, False: 4.09M]
  ------------------
18355|    470|                janet_assert(!head->type->gcperthread(head->data, head->size), "per-thread finalizer failed");
  ------------------
  |  |  389|    470|#define janet_assert(c, m) do { \
  |  |  390|    470|    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: 470]
  |  |  ------------------
  |  |  391|    470|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 470]
  |  |  ------------------
  ------------------
18356|    470|            }
18357|  4.09M|            if (head->type->gc) {
  ------------------
  |  Branch (18357:17): [True: 728k, False: 3.36M]
  ------------------
18358|   728k|                janet_assert(!head->type->gc(head->data, head->size), "finalizer failed");
  ------------------
  |  |  389|   728k|#define janet_assert(c, m) do { \
  |  |  390|   728k|    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: 728k]
  |  |  ------------------
  |  |  391|   728k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 728k]
  |  |  ------------------
  ------------------
18359|   728k|            }
18360|  4.09M|        }
18361|  4.09M|        break;
18362|  15.1M|        case JANET_MEMORY_FUNCENV: {
  ------------------
  |  Branch (18362:9): [True: 15.1M, False: 3.63G]
  ------------------
18363|  15.1M|            JanetFuncEnv *env = (JanetFuncEnv *)mem;
18364|  15.1M|            if (0 == env->offset)
  ------------------
  |  Branch (18364:17): [True: 14.6M, False: 513k]
  ------------------
18365|  14.6M|                janet_free(env->as.values);
  ------------------
  |  | 2415|  14.6M|#define janet_free(X) free((X))
  ------------------
18366|  15.1M|        }
18367|  15.1M|        break;
18368|  5.93M|        case JANET_MEMORY_FUNCDEF: {
  ------------------
  |  Branch (18368:9): [True: 5.93M, False: 3.64G]
  ------------------
18369|  5.93M|            JanetFuncDef *def = (JanetFuncDef *)mem;
18370|       |            /* TODO - get this all with one alloc and one free */
18371|  5.93M|            janet_free(def->defs);
  ------------------
  |  | 2415|  5.93M|#define janet_free(X) free((X))
  ------------------
18372|  5.93M|            janet_free(def->environments);
  ------------------
  |  | 2415|  5.93M|#define janet_free(X) free((X))
  ------------------
18373|  5.93M|            janet_free(def->constants);
  ------------------
  |  | 2415|  5.93M|#define janet_free(X) free((X))
  ------------------
18374|  5.93M|            janet_free(def->bytecode);
  ------------------
  |  | 2415|  5.93M|#define janet_free(X) free((X))
  ------------------
18375|  5.93M|            janet_free(def->sourcemap);
  ------------------
  |  | 2415|  5.93M|#define janet_free(X) free((X))
  ------------------
18376|  5.93M|            janet_free(def->closure_bitset);
  ------------------
  |  | 2415|  5.93M|#define janet_free(X) free((X))
  ------------------
18377|  5.93M|            janet_free(def->symbolmap);
  ------------------
  |  | 2415|  5.93M|#define janet_free(X) free((X))
  ------------------
18378|  5.93M|        }
18379|  5.93M|        break;
18380|  3.64G|    }
18381|  3.64G|}
janet.c:janet_free_all_scratch:
18568|  37.1k|static void janet_free_all_scratch(void) {
18569|   183k|    for (size_t i = 0; i < janet_vm.scratch_len; i++) {
  ------------------
  |  Branch (18569:24): [True: 145k, False: 37.1k]
  ------------------
18570|   145k|        free_one_scratch(janet_vm.scratch_mem[i]);
18571|   145k|    }
18572|  37.1k|    janet_vm.scratch_len = 0;
18573|  37.1k|}
janet.c:janet_gc_idequals:
18634|  1.39M|static int janet_gc_idequals(Janet lhs, Janet rhs) {
18635|  1.39M|    if (janet_type(lhs) != janet_type(rhs))
  ------------------
  |  |  795|  1.39M|    (isnan((x).number) \
  |  |  796|  1.39M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  1.39M|        : JANET_NUMBER)
  ------------------
                  if (janet_type(lhs) != janet_type(rhs))
  ------------------
  |  |  795|  1.39M|    (isnan((x).number) \
  |  |  796|  1.39M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  1.39M|        : JANET_NUMBER)
  ------------------
  |  Branch (18635:9): [True: 1.39M, False: 0]
  |  Branch (18635:9): [True: 4.15k, False: 1.39M]
  |  Branch (18635:28): [True: 1.39M, False: 0]
  ------------------
18636|  4.15k|        return 0;
18637|  1.39M|    switch (janet_type(lhs)) {
  ------------------
  |  |  795|  1.39M|    (isnan((x).number) \
  |  |  796|  1.39M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  1.39M|        : JANET_NUMBER)
  ------------------
  |  Branch (18637:13): [True: 1.39M, False: 0]
  ------------------
18638|      0|        case JANET_BOOLEAN:
  ------------------
  |  Branch (18638:9): [True: 0, False: 1.39M]
  ------------------
18639|      0|        case JANET_NIL:
  ------------------
  |  Branch (18639:9): [True: 0, False: 1.39M]
  ------------------
18640|      0|        case JANET_NUMBER:
  ------------------
  |  Branch (18640:9): [True: 0, False: 1.39M]
  ------------------
18641|       |            /* These values don't really matter to the gc so returning 1 all the time is fine. */
18642|      0|            return 1;
18643|  1.39M|        default:
  ------------------
  |  Branch (18643:9): [True: 1.39M, False: 0]
  ------------------
18644|  1.39M|            return janet_unwrap_pointer(lhs) == janet_unwrap_pointer(rhs);
  ------------------
  |  |  867|  1.39M|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
                          return janet_unwrap_pointer(lhs) == janet_unwrap_pointer(rhs);
  ------------------
  |  |  867|  1.39M|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
18645|  1.39M|    }
18646|  1.39M|}
janet.c:janet_mem2scratch:
18575|  17.2M|static JanetScratch *janet_mem2scratch(void *mem) {
18576|  17.2M|    JanetScratch *s = (JanetScratch *)mem;
18577|  17.2M|    return s - 1;
18578|  17.2M|}
janet.c:free_one_scratch:
18560|  8.42M|static void free_one_scratch(JanetScratch *s) {
18561|  8.42M|    if (NULL != s->finalize) {
  ------------------
  |  Branch (18561:9): [True: 0, False: 8.42M]
  ------------------
18562|      0|        s->finalize((char *) s->mem);
18563|      0|    }
18564|  8.42M|    janet_free(s);
  ------------------
  |  | 2415|  8.42M|#define janet_free(X) free((X))
  ------------------
18565|  8.42M|}
janet.c:int64_marshal:
18850|     87|static void int64_marshal(void *p, JanetMarshalContext *ctx) {
18851|     87|    janet_marshal_abstract(ctx, p);
18852|     87|    janet_marshal_int64(ctx, *((int64_t *)p));
18853|     87|}
janet.c:int64_unmarshal:
18855|     86|static void *int64_unmarshal(JanetMarshalContext *ctx) {
18856|     86|    int64_t *p = janet_unmarshal_abstract(ctx, sizeof(int64_t));
18857|     86|    p[0] = janet_unmarshal_int64(ctx);
18858|     86|    return p;
18859|     86|}
janet.c:it_s64_tostring:
18861|    658|static void it_s64_tostring(void *p, JanetBuffer *buffer) {
18862|    658|    char str[32];
18863|       |    snprintf(str, sizeof(str), "%" PRId64, *((int64_t *)p));
18864|    658|    janet_buffer_push_cstring(buffer, str);
18865|    658|}
janet.c:janet_int64_compare:
18838|  89.0k|static int janet_int64_compare(void *p1, void *p2) {
18839|  89.0k|    int64_t x = *((int64_t *)p1);
18840|  89.0k|    int64_t y = *((int64_t *)p2);
18841|  89.0k|    return x == y ? 0 : x < y ? -1 : 1;
  ------------------
  |  Branch (18841:12): [True: 7.41k, False: 81.6k]
  |  Branch (18841:25): [True: 47.7k, False: 33.8k]
  ------------------
18842|  89.0k|}
janet.c:janet_int64_hash:
18832|  5.48M|static int32_t janet_int64_hash(void *p1, size_t size) {
18833|  5.48M|    (void) size;
18834|  5.48M|    int32_t *words = p1;
18835|  5.48M|    return words[0] ^ words[1];
18836|  5.48M|}
janet.c:it_u64_tostring:
18867|  1.63k|static void it_u64_tostring(void *p, JanetBuffer *buffer) {
18868|  1.63k|    char str[32];
18869|       |    snprintf(str, sizeof(str), "%" PRIu64, *((uint64_t *)p));
18870|  1.63k|    janet_buffer_push_cstring(buffer, str);
18871|  1.63k|}
janet.c:janet_uint64_compare:
18844|  17.9k|static int janet_uint64_compare(void *p1, void *p2) {
18845|  17.9k|    uint64_t x = *((uint64_t *)p1);
18846|  17.9k|    uint64_t y = *((uint64_t *)p2);
18847|  17.9k|    return x == y ? 0 : x < y ? -1 : 1;
  ------------------
  |  Branch (18847:12): [True: 15.0k, False: 2.89k]
  |  Branch (18847:25): [True: 1.23k, False: 1.66k]
  ------------------
18848|  17.9k|}
janet.c:janet_int64_next:
19440|  8.87k|static Janet janet_int64_next(void *p, Janet key) {
19441|  8.87k|    (void) p;
19442|  8.87k|    return janet_nextmethod(it_s64_methods, key);
19443|  8.87k|}
janet.c:cfun_it_s64_add:
19209|  3.79k|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
19210|  3.79k|    janet_arity(argc, 2, -1); \
19211|  3.79k|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
19212|  3.79k|    *box = janet_unwrap_##type(argv[0]); \
19213|  7.60k|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (19213:25): [True: 3.80k, False: 3.79k]
  ------------------
19214|  3.79k|        /* This avoids undefined behavior. See above for why. */ \
19215|  3.80k|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
19216|  3.79k|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|  3.79k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  3.79k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.79k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.79k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19217|  3.79k|} \
janet.c:cfun_it_s64_sub:
19209|  2.42k|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
19210|  2.42k|    janet_arity(argc, 2, -1); \
19211|  2.42k|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
19212|  2.42k|    *box = janet_unwrap_##type(argv[0]); \
19213|  7.08k|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (19213:25): [True: 4.65k, False: 2.42k]
  ------------------
19214|  2.42k|        /* This avoids undefined behavior. See above for why. */ \
19215|  4.65k|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
19216|  2.42k|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|  2.42k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  2.42k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.42k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.42k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19217|  2.42k|} \
janet.c:cfun_it_s64_subi:
19220|      5|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name##i(int32_t argc, Janet *argv) { \
19221|      5|    janet_fixarity(argc, 2); \
19222|      5|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
19223|      5|    *box = janet_unwrap_##type(argv[1]); \
19224|      5|    /* This avoids undefined behavior. See above for why. */ \
19225|      5|    *box = (T) ((uint64_t) *box) oper ((uint64_t) janet_unwrap_##type(argv[0])); \
19226|      5|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|      5|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|      5|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      5|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      5|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19227|      5|} \
janet.c:cfun_it_s64_mul:
19209|    313|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
19210|    313|    janet_arity(argc, 2, -1); \
19211|    313|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
19212|    313|    *box = janet_unwrap_##type(argv[0]); \
19213|    659|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (19213:25): [True: 346, False: 313]
  ------------------
19214|    313|        /* This avoids undefined behavior. See above for why. */ \
19215|    346|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
19216|    313|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|    313|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|    313|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    313|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    313|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19217|    313|} \
janet.c:cfun_it_s64_divf:
19292|    153|static JANET_CFUNCTION_ALIGN Janet cfun_it_s64_divf(int32_t argc, Janet *argv) {
19293|    153|    janet_fixarity(argc, 2);
19294|    153|    int64_t *box = janet_abstract(&janet_s64_type, sizeof(int64_t));
19295|    153|    int64_t op1 = janet_unwrap_s64(argv[0]);
19296|    153|    int64_t op2 = janet_unwrap_s64(argv[1]);
19297|    153|    if (op2 == 0) janet_panic("division by zero");
  ------------------
  |  Branch (19297:9): [True: 4, False: 149]
  ------------------
19298|    149|    if (op2 == -1 && op1 == INT64_MIN) janet_panic("INT64_MIN divided by -1");
  ------------------
  |  Branch (19298:9): [True: 1, False: 148]
  |  Branch (19298:22): [True: 0, False: 1]
  ------------------
19299|    149|    int64_t x = op1 / op2;
19300|    149|    *box = x - (((op1 ^ op2) < 0) && (x * op2 != op1));
  ------------------
  |  Branch (19300:17): [True: 82, False: 67]
  |  Branch (19300:38): [True: 58, False: 24]
  ------------------
19301|    149|    return janet_wrap_abstract(box);
  ------------------
  |  |  851|    149|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|    149|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    149|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    149|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19302|    149|}
janet.c:cfun_it_s64_divfi:
19304|   492k|static JANET_CFUNCTION_ALIGN Janet cfun_it_s64_divfi(int32_t argc, Janet *argv) {
19305|   492k|    janet_fixarity(argc, 2);
19306|   492k|    int64_t *box = janet_abstract(&janet_s64_type, sizeof(int64_t));
19307|   492k|    int64_t op2 = janet_unwrap_s64(argv[0]);
19308|   492k|    int64_t op1 = janet_unwrap_s64(argv[1]);
19309|   492k|    if (op2 == 0) janet_panic("division by zero");
  ------------------
  |  Branch (19309:9): [True: 2, False: 492k]
  ------------------
19310|   492k|    if (op2 == -1 && op1 == INT64_MIN) janet_panic("INT64_MIN divided by -1");
  ------------------
  |  Branch (19310:9): [True: 3, False: 492k]
  |  Branch (19310:22): [True: 0, False: 3]
  ------------------
19311|   492k|    int64_t x = op1 / op2;
19312|   492k|    *box = x - (((op1 ^ op2) < 0) && (x * op2 != op1));
  ------------------
  |  Branch (19312:17): [True: 246k, False: 246k]
  |  Branch (19312:38): [True: 246k, False: 3]
  ------------------
19313|   492k|    return janet_wrap_abstract(box);
  ------------------
  |  |  851|   492k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|   492k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   492k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   492k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19314|   492k|}
janet.c:cfun_it_s64_mod:
19316|  1.00k|static JANET_CFUNCTION_ALIGN Janet cfun_it_s64_mod(int32_t argc, Janet *argv) {
19317|  1.00k|    janet_fixarity(argc, 2);
19318|  1.00k|    int64_t *box = janet_abstract(&janet_s64_type, sizeof(int64_t));
19319|  1.00k|    int64_t op1 = janet_unwrap_s64(argv[0]);
19320|  1.00k|    int64_t op2 = janet_unwrap_s64(argv[1]);
19321|  1.00k|    if (op2 == 0) {
  ------------------
  |  Branch (19321:9): [True: 201, False: 805]
  ------------------
19322|    201|        *box = op1;
19323|    805|    } else if (op2 == -1) {
  ------------------
  |  Branch (19323:16): [True: 1, False: 804]
  ------------------
19324|      1|        *box = 0;
19325|    804|    } else {
19326|    804|        int64_t x = op1 % op2;
19327|    804|        *box = (((op1 ^ op2) < 0) && (x != 0)) ? x + op2 : x;
  ------------------
  |  Branch (19327:17): [True: 274, False: 530]
  |  Branch (19327:38): [True: 180, False: 94]
  ------------------
19328|    804|    }
19329|  1.00k|    return janet_wrap_abstract(box);
  ------------------
  |  |  851|  1.00k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  1.00k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.00k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.00k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19330|  1.00k|}
janet.c:cfun_it_s64_modi:
19332|     55|static JANET_CFUNCTION_ALIGN Janet cfun_it_s64_modi(int32_t argc, Janet *argv) {
19333|     55|    janet_fixarity(argc, 2);
19334|     55|    int64_t *box = janet_abstract(&janet_s64_type, sizeof(int64_t));
19335|     55|    int64_t op2 = janet_unwrap_s64(argv[0]);
19336|     55|    int64_t op1 = janet_unwrap_s64(argv[1]);
19337|     55|    if (op2 == 0) {
  ------------------
  |  Branch (19337:9): [True: 19, False: 36]
  ------------------
19338|     19|        *box = op1;
19339|     36|    } else if (op2 == -1) {
  ------------------
  |  Branch (19339:16): [True: 2, False: 34]
  ------------------
19340|      2|        *box = 0;
19341|     34|    } else {
19342|     34|        int64_t x = op1 % op2;
19343|     34|        *box = (((op1 ^ op2) < 0) && (x != 0)) ? x + op2 : x;
  ------------------
  |  Branch (19343:17): [True: 10, False: 24]
  |  Branch (19343:38): [True: 8, False: 2]
  ------------------
19344|     34|    }
19345|     55|    return janet_wrap_abstract(box);
  ------------------
  |  |  851|     55|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|     55|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     55|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     55|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19346|     55|}
janet.c:cfun_it_s64_and:
19209|    305|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
19210|    305|    janet_arity(argc, 2, -1); \
19211|    305|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
19212|    305|    *box = janet_unwrap_##type(argv[0]); \
19213|    708|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (19213:25): [True: 403, False: 305]
  ------------------
19214|    305|        /* This avoids undefined behavior. See above for why. */ \
19215|    403|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
19216|    305|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|    305|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|    305|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    305|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    305|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19217|    305|} \
janet.c:cfun_it_s64_or:
19209|     61|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
19210|     61|    janet_arity(argc, 2, -1); \
19211|     61|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
19212|     61|    *box = janet_unwrap_##type(argv[0]); \
19213|    122|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (19213:25): [True: 61, False: 61]
  ------------------
19214|     61|        /* This avoids undefined behavior. See above for why. */ \
19215|     61|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
19216|     61|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|     61|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|     61|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     61|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     61|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19217|     61|} \
janet.c:cfun_it_s64_xor:
19209|   739k|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
19210|   739k|    janet_arity(argc, 2, -1); \
19211|   739k|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
19212|   739k|    *box = janet_unwrap_##type(argv[0]); \
19213|  1.72M|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (19213:25): [True: 986k, False: 739k]
  ------------------
19214|   739k|        /* This avoids undefined behavior. See above for why. */ \
19215|   986k|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
19216|   739k|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|   739k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|   739k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   739k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   739k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19217|   739k|} \
janet.c:cfun_it_s64_not:
19230|      2|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
19231|      2|    janet_fixarity(argc, 1); \
19232|      2|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
19233|      2|    *box = oper(janet_unwrap_##type(argv[0])); \
19234|      2|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|      2|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|      2|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19235|      2|} \
janet.c:cfun_it_s64_rshift:
19209|     89|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
19210|     89|    janet_arity(argc, 2, -1); \
19211|     89|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
19212|     89|    *box = janet_unwrap_##type(argv[0]); \
19213|    192|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (19213:25): [True: 103, False: 89]
  ------------------
19214|     89|        /* This avoids undefined behavior. See above for why. */ \
19215|    103|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
19216|     89|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|     89|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|     89|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     89|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     89|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19217|     89|} \
janet.c:cfun_it_s64_compare:
19126|  1.08k|static JANET_CFUNCTION_ALIGN Janet cfun_it_s64_compare(int32_t argc, Janet *argv) {
19127|  1.08k|    janet_fixarity(argc, 2);
19128|  1.08k|    if (janet_is_int(argv[0]) != JANET_INT_S64) {
  ------------------
  |  Branch (19128:9): [True: 0, False: 1.08k]
  ------------------
19129|      0|        janet_panic("compare method requires int/s64 as first argument");
19130|      0|    }
19131|  1.08k|    int64_t x = janet_unwrap_s64(argv[0]);
19132|  1.08k|    switch (janet_type(argv[1])) {
  ------------------
  |  |  795|  1.08k|    (isnan((x).number) \
  |  |  796|  1.08k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  1.08k|        : JANET_NUMBER)
  ------------------
  |  Branch (19132:13): [True: 508, False: 574]
  ------------------
19133|     24|        default:
  ------------------
  |  Branch (19133:9): [True: 24, False: 1.05k]
  ------------------
19134|     24|            break;
19135|    574|        case JANET_NUMBER : {
  ------------------
  |  Branch (19135:9): [True: 574, False: 508]
  ------------------
19136|    574|            double y = janet_unwrap_number(argv[1]);
  ------------------
  |  |  839|    574|#define janet_unwrap_number(x) ((x).number)
  ------------------
19137|    574|            return janet_wrap_number(compare_int64_double(x, y));
  ------------------
  |  |  835|    574|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
19138|      0|        }
19139|    484|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (19139:9): [True: 484, False: 598]
  ------------------
19140|    484|            void *abst = janet_unwrap_abstract(argv[1]);
  ------------------
  |  |  866|    484|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
19141|    484|            if (janet_abstract_type(abst) == &janet_s64_type) {
  ------------------
  |  | 1899|    484|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|    484|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (19141:17): [True: 11, False: 473]
  ------------------
19142|     11|                int64_t y = *(int64_t *)abst;
19143|     11|                return janet_wrap_number((x < y) ? -1 : (x > y ? 1 : 0));
  ------------------
  |  |  835|     28|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |  |  Branch (835:55): [True: 3, False: 0]
  |  |  |  Branch (835:55): [True: 8, False: 3]
  |  |  ------------------
  ------------------
19144|    473|            } else if (janet_abstract_type(abst) == &janet_u64_type) {
  ------------------
  |  | 1899|    473|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|    473|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (19144:24): [True: 473, False: 0]
  ------------------
19145|    473|                uint64_t y = *(uint64_t *)abst;
19146|    473|                if (x < 0) {
  ------------------
  |  Branch (19146:21): [True: 0, False: 473]
  ------------------
19147|      0|                    return janet_wrap_number(-1);
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
19148|    473|                } else if (y > INT64_MAX) {
  ------------------
  |  Branch (19148:28): [True: 1, False: 472]
  ------------------
19149|      1|                    return janet_wrap_number(-1);
  ------------------
  |  |  835|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
19150|    472|                } else {
19151|    472|                    int64_t y2 = (int64_t) y;
19152|    472|                    return janet_wrap_number((x < y2) ? -1 : (x > y2 ? 1 : 0));
  ------------------
  |  |  835|  1.10k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |  |  Branch (835:55): [True: 80, False: 0]
  |  |  |  Branch (835:55): [True: 392, False: 80]
  |  |  ------------------
  ------------------
19153|    472|                }
19154|    473|            }
19155|      0|            break;
19156|    484|        }
19157|  1.08k|    }
19158|     24|    return janet_wrap_nil();
  ------------------
  |  |  831|     24|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     24|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     24|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     24|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19159|  1.08k|}
janet.c:compare_int64_double:
19094|    574|static int compare_int64_double(int64_t x, double y) {
19095|    574|    if (isnan(y)) {
  ------------------
  |  Branch (19095:9): [True: 0, False: 574]
  ------------------
19096|      0|        return 0;
19097|    574|    } else if ((y > JANET_INTMIN_DOUBLE) && (y < JANET_INTMAX_DOUBLE)) {
  ------------------
  |  |  166|    574|#define JANET_INTMIN_DOUBLE (-9007199254740992.0)
  ------------------
                  } else if ((y > JANET_INTMIN_DOUBLE) && (y < JANET_INTMAX_DOUBLE)) {
  ------------------
  |  |  165|    571|#define JANET_INTMAX_DOUBLE 9007199254740992.0
  ------------------
  |  Branch (19097:16): [True: 571, False: 3]
  |  Branch (19097:45): [True: 210, False: 361]
  ------------------
19098|    210|        double dx = (double) x;
19099|    210|        return compare_double_double(dx, y);
19100|    364|    } else if (y > ((double) INT64_MAX)) {
  ------------------
  |  Branch (19100:16): [True: 90, False: 274]
  ------------------
19101|     90|        return -1;
19102|    274|    } else if (y < ((double) INT64_MIN)) {
  ------------------
  |  Branch (19102:16): [True: 1, False: 273]
  ------------------
19103|      1|        return 1;
19104|    273|    } else {
19105|    273|        int64_t yi = (int64_t) y;
19106|    273|        return (x < yi) ? -1 : ((x > yi) ? 1 : 0);
  ------------------
  |  Branch (19106:16): [True: 271, False: 2]
  |  Branch (19106:33): [True: 2, False: 0]
  ------------------
19107|    273|    }
19108|    574|}
janet.c:compare_double_double:
19090|  11.4k|static int compare_double_double(double x, double y) {
19091|  11.4k|    return (x < y) ? -1 : ((x > y) ? 1 : 0);
  ------------------
  |  Branch (19091:12): [True: 11.2k, False: 256]
  |  Branch (19091:28): [True: 242, False: 14]
  ------------------
19092|  11.4k|}
janet.c:janet_uint64_next:
19445|  24.0M|static Janet janet_uint64_next(void *p, Janet key) {
19446|  24.0M|    (void) p;
19447|  24.0M|    return janet_nextmethod(it_u64_methods, key);
19448|  24.0M|}
janet.c:cfun_it_u64_add:
19209|  1.29M|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
19210|  1.29M|    janet_arity(argc, 2, -1); \
19211|  1.29M|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
19212|  1.29M|    *box = janet_unwrap_##type(argv[0]); \
19213|  2.58M|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (19213:25): [True: 1.29M, False: 1.29M]
  ------------------
19214|  1.29M|        /* This avoids undefined behavior. See above for why. */ \
19215|  1.29M|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
19216|  1.29M|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|  1.29M|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  1.29M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.29M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.29M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19217|  1.29M|} \
janet.c:cfun_it_u64_sub:
19209|   550k|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
19210|   550k|    janet_arity(argc, 2, -1); \
19211|   550k|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
19212|   550k|    *box = janet_unwrap_##type(argv[0]); \
19213|  1.10M|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (19213:25): [True: 550k, False: 550k]
  ------------------
19214|   550k|        /* This avoids undefined behavior. See above for why. */ \
19215|   550k|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
19216|   550k|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|   550k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|   550k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   550k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   550k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19217|   550k|} \
janet.c:cfun_it_u64_subi:
19220|     21|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name##i(int32_t argc, Janet *argv) { \
19221|     21|    janet_fixarity(argc, 2); \
19222|     21|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
19223|     21|    *box = janet_unwrap_##type(argv[1]); \
19224|     21|    /* This avoids undefined behavior. See above for why. */ \
19225|     21|    *box = (T) ((uint64_t) *box) oper ((uint64_t) janet_unwrap_##type(argv[0])); \
19226|     21|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|     21|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|     21|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     21|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     21|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19227|     21|} \
janet.c:cfun_it_u64_mul:
19209|    309|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
19210|    309|    janet_arity(argc, 2, -1); \
19211|    309|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
19212|    309|    *box = janet_unwrap_##type(argv[0]); \
19213|    714|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (19213:25): [True: 405, False: 309]
  ------------------
19214|    309|        /* This avoids undefined behavior. See above for why. */ \
19215|    405|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
19216|    309|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|    309|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|    309|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    309|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    309|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19217|    309|} \
janet.c:cfun_it_u64_div:
19243|    355|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
19244|    355|    janet_arity(argc, 2, -1);                       \
19245|    355|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
19246|    355|    *box = janet_unwrap_##type(argv[0]); \
19247|    730|    for (int32_t i = 1; i < argc; i++) { \
  ------------------
  |  Branch (19247:25): [True: 381, False: 349]
  ------------------
19248|    381|      T value = janet_unwrap_##type(argv[i]); \
19249|    381|      if (value == 0) DIVZERO(name); \
  ------------------
  |  |19237|      6|#define DIVZERO(name) DIVZERO_##name
  |  |  ------------------
  |  |  |  |19238|      6|#define DIVZERO_div janet_panic("division by zero")
  |  |  ------------------
  ------------------
  |  Branch (19249:11): [True: 6, False: 375]
  ------------------
19250|    381|      *box oper##= value; \
19251|    375|    } \
19252|    355|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|    349|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|    349|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    349|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    349|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19253|    355|} \
janet.c:cfun_it_u64_divi:
19256|      1|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name##i(int32_t argc, Janet *argv) { \
19257|      1|    janet_fixarity(argc, 2);                       \
19258|      1|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
19259|      1|    *box = janet_unwrap_##type(argv[1]); \
19260|      1|    T value = janet_unwrap_##type(argv[0]); \
19261|      1|    if (value == 0) DIVZERO(name); \
  ------------------
  |  |19237|      0|#define DIVZERO(name) DIVZERO_##name
  |  |  ------------------
  |  |  |  |19238|      0|#define DIVZERO_div janet_panic("division by zero")
  |  |  ------------------
  ------------------
  |  Branch (19261:9): [True: 0, False: 1]
  ------------------
19262|      1|    *box oper##= value; \
19263|      1|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|      1|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|      1|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19264|      1|} \
janet.c:cfun_it_u64_mod:
19243|    132|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
19244|    132|    janet_arity(argc, 2, -1);                       \
19245|    132|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
19246|    132|    *box = janet_unwrap_##type(argv[0]); \
19247|    234|    for (int32_t i = 1; i < argc; i++) { \
  ------------------
  |  Branch (19247:25): [True: 132, False: 102]
  ------------------
19248|    132|      T value = janet_unwrap_##type(argv[i]); \
19249|    132|      if (value == 0) DIVZERO(name); \
  ------------------
  |  |19237|     30|#define DIVZERO(name) DIVZERO_##name
  |  |  ------------------
  |  |  |  |19240|     30|#define DIVZERO_mod return janet_wrap_abstract(box)
  |  |  |  |  ------------------
  |  |  |  |  |  |  851|     30|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  825|     30|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  793|     30|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  792|     30|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (19249:11): [True: 30, False: 102]
  ------------------
19250|    132|      *box oper##= value; \
19251|    102|    } \
19252|    132|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|    102|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|    102|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    102|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    102|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19253|    132|} \
janet.c:cfun_it_u64_modi:
19256|     19|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name##i(int32_t argc, Janet *argv) { \
19257|     19|    janet_fixarity(argc, 2);                       \
19258|     19|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
19259|     19|    *box = janet_unwrap_##type(argv[1]); \
19260|     19|    T value = janet_unwrap_##type(argv[0]); \
19261|     19|    if (value == 0) DIVZERO(name); \
  ------------------
  |  |19237|     11|#define DIVZERO(name) DIVZERO_##name
  |  |  ------------------
  |  |  |  |19240|     11|#define DIVZERO_mod return janet_wrap_abstract(box)
  |  |  |  |  ------------------
  |  |  |  |  |  |  851|     11|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  825|     11|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  793|     11|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  792|     11|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (19261:9): [True: 11, False: 8]
  ------------------
19262|     19|    *box oper##= value; \
19263|      8|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|      8|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|      8|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      8|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      8|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19264|     19|} \
janet.c:cfun_it_u64_rem:
19243|    829|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
19244|    829|    janet_arity(argc, 2, -1);                       \
19245|    829|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
19246|    829|    *box = janet_unwrap_##type(argv[0]); \
19247|  6.32k|    for (int32_t i = 1; i < argc; i++) { \
  ------------------
  |  Branch (19247:25): [True: 5.49k, False: 829]
  ------------------
19248|  5.49k|      T value = janet_unwrap_##type(argv[i]); \
19249|  5.49k|      if (value == 0) DIVZERO(name); \
  ------------------
  |  |19237|      0|#define DIVZERO(name) DIVZERO_##name
  |  |  ------------------
  |  |  |  |19239|      0|#define DIVZERO_rem janet_panic("division by zero")
  |  |  ------------------
  ------------------
  |  Branch (19249:11): [True: 0, False: 5.49k]
  ------------------
19250|  5.49k|      *box oper##= value; \
19251|  5.49k|    } \
19252|    829|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|    829|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|    829|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    829|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    829|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19253|    829|} \
janet.c:cfun_it_u64_remi:
19256|     24|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name##i(int32_t argc, Janet *argv) { \
19257|     24|    janet_fixarity(argc, 2);                       \
19258|     24|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
19259|     24|    *box = janet_unwrap_##type(argv[1]); \
19260|     24|    T value = janet_unwrap_##type(argv[0]); \
19261|     24|    if (value == 0) DIVZERO(name); \
  ------------------
  |  |19237|      0|#define DIVZERO(name) DIVZERO_##name
  |  |  ------------------
  |  |  |  |19239|      0|#define DIVZERO_rem janet_panic("division by zero")
  |  |  ------------------
  ------------------
  |  Branch (19261:9): [True: 0, False: 24]
  ------------------
19262|     24|    *box oper##= value; \
19263|     24|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|     24|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|     24|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     24|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     24|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19264|     24|} \
janet.c:cfun_it_u64_and:
19209|    440|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
19210|    440|    janet_arity(argc, 2, -1); \
19211|    440|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
19212|    440|    *box = janet_unwrap_##type(argv[0]); \
19213|    905|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (19213:25): [True: 465, False: 440]
  ------------------
19214|    440|        /* This avoids undefined behavior. See above for why. */ \
19215|    465|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
19216|    440|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|    440|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|    440|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    440|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    440|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19217|    440|} \
janet.c:cfun_it_u64_or:
19209|    262|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
19210|    262|    janet_arity(argc, 2, -1); \
19211|    262|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
19212|    262|    *box = janet_unwrap_##type(argv[0]); \
19213|    524|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (19213:25): [True: 262, False: 262]
  ------------------
19214|    262|        /* This avoids undefined behavior. See above for why. */ \
19215|    262|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
19216|    262|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|    262|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|    262|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    262|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    262|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19217|    262|} \
janet.c:cfun_it_u64_xor:
19209|    620|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
19210|    620|    janet_arity(argc, 2, -1); \
19211|    620|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
19212|    620|    *box = janet_unwrap_##type(argv[0]); \
19213|  2.49k|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (19213:25): [True: 1.87k, False: 620]
  ------------------
19214|    620|        /* This avoids undefined behavior. See above for why. */ \
19215|  1.87k|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
19216|    620|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|    620|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|    620|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    620|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    620|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19217|    620|} \
janet.c:cfun_it_u64_rshift:
19209|    442|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
19210|    442|    janet_arity(argc, 2, -1); \
19211|    442|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
19212|    442|    *box = janet_unwrap_##type(argv[0]); \
19213|    981|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (19213:25): [True: 539, False: 442]
  ------------------
19214|    442|        /* This avoids undefined behavior. See above for why. */ \
19215|    539|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
19216|    442|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|    442|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|    442|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    442|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    442|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19217|    442|} \
janet.c:cfun_it_u64_compare:
19161|  12.7k|static JANET_CFUNCTION_ALIGN Janet cfun_it_u64_compare(int32_t argc, Janet *argv) {
19162|  12.7k|    janet_fixarity(argc, 2);
19163|  12.7k|    if (janet_is_int(argv[0]) != JANET_INT_U64) {
  ------------------
  |  Branch (19163:9): [True: 0, False: 12.7k]
  ------------------
19164|      0|        janet_panic("compare method requires int/u64 as first argument");
19165|      0|    }
19166|  12.7k|    uint64_t x = janet_unwrap_u64(argv[0]);
19167|  12.7k|    switch (janet_type(argv[1])) {
  ------------------
  |  |  795|  12.7k|    (isnan((x).number) \
  |  |  796|  12.7k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  12.7k|        : JANET_NUMBER)
  ------------------
  |  Branch (19167:13): [True: 1.04k, False: 11.7k]
  ------------------
19168|    488|        default:
  ------------------
  |  Branch (19168:9): [True: 488, False: 12.3k]
  ------------------
19169|    488|            break;
19170|  11.7k|        case JANET_NUMBER : {
  ------------------
  |  Branch (19170:9): [True: 11.7k, False: 1.04k]
  ------------------
19171|  11.7k|            double y = janet_unwrap_number(argv[1]);
  ------------------
  |  |  839|  11.7k|#define janet_unwrap_number(x) ((x).number)
  ------------------
19172|  11.7k|            return janet_wrap_number(compare_uint64_double(x, y));
  ------------------
  |  |  835|  11.7k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
19173|      0|        }
19174|    553|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (19174:9): [True: 553, False: 12.2k]
  ------------------
19175|    553|            void *abst = janet_unwrap_abstract(argv[1]);
  ------------------
  |  |  866|    553|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
19176|    553|            if (janet_abstract_type(abst) == &janet_u64_type) {
  ------------------
  |  | 1899|    553|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|    553|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (19176:17): [True: 524, False: 29]
  ------------------
19177|    524|                uint64_t y = *(uint64_t *)abst;
19178|    524|                return janet_wrap_number((x < y) ? -1 : (x > y ? 1 : 0));
  ------------------
  |  |  835|  1.83k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |  |  Branch (835:55): [True: 85, False: 307]
  |  |  |  Branch (835:55): [True: 132, False: 392]
  |  |  ------------------
  ------------------
19179|    524|            } else if (janet_abstract_type(abst) == &janet_s64_type) {
  ------------------
  |  | 1899|     29|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|     29|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (19179:24): [True: 24, False: 5]
  ------------------
19180|     24|                int64_t y = *(int64_t *)abst;
19181|     24|                if (y < 0) {
  ------------------
  |  Branch (19181:21): [True: 1, False: 23]
  ------------------
19182|      1|                    return janet_wrap_number(1);
  ------------------
  |  |  835|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
19183|     23|                } else if (x > INT64_MAX) {
  ------------------
  |  Branch (19183:28): [True: 0, False: 23]
  ------------------
19184|      0|                    return janet_wrap_number(1);
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
19185|     23|                } else {
19186|     23|                    int64_t x2 = (int64_t) x;
19187|     23|                    return janet_wrap_number((x2 < y) ? -1 : (x2 > y ? 1 : 0));
  ------------------
  |  |  835|     54|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |  |  Branch (835:55): [True: 4, False: 0]
  |  |  |  Branch (835:55): [True: 19, False: 4]
  |  |  ------------------
  ------------------
19188|     23|                }
19189|     24|            }
19190|      5|            break;
19191|    553|        }
19192|  12.7k|    }
19193|    493|    return janet_wrap_nil();
  ------------------
  |  |  831|    493|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    493|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    493|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    493|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19194|  12.7k|}
janet.c:compare_uint64_double:
19110|  11.7k|static int compare_uint64_double(uint64_t x, double y) {
19111|  11.7k|    if (isnan(y)) {
  ------------------
  |  Branch (19111:9): [True: 0, False: 11.7k]
  ------------------
19112|      0|        return 0;
19113|  11.7k|    } else if (y < 0) {
  ------------------
  |  Branch (19113:16): [True: 274, False: 11.4k]
  ------------------
19114|    274|        return 1;
19115|  11.4k|    } else if ((y >= 0) && (y < JANET_INTMAX_DOUBLE)) {
  ------------------
  |  |  165|  11.4k|#define JANET_INTMAX_DOUBLE 9007199254740992.0
  ------------------
  |  Branch (19115:16): [True: 11.4k, False: 0]
  |  Branch (19115:28): [True: 11.2k, False: 206]
  ------------------
19116|  11.2k|        double dx = (double) x;
19117|  11.2k|        return compare_double_double(dx, y);
19118|  11.2k|    } else if (y > ((double) UINT64_MAX)) {
  ------------------
  |  Branch (19118:16): [True: 117, False: 89]
  ------------------
19119|    117|        return -1;
19120|    117|    } else {
19121|     89|        uint64_t yi = (uint64_t) y;
19122|     89|        return (x < yi) ? -1 : ((x > yi) ? 1 : 0);
  ------------------
  |  Branch (19122:16): [True: 89, False: 0]
  |  Branch (19122:33): [True: 0, False: 0]
  ------------------
19123|     89|    }
19124|  11.7k|}
janet.c:it_s64_get:
19450|  1.24M|static int it_s64_get(void *p, Janet key, Janet *out) {
19451|  1.24M|    (void) p;
19452|  1.24M|    if (!janet_checktype(key, JANET_KEYWORD))
  ------------------
  |  |  806|  1.24M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 1.24M]
  |  |  ------------------
  |  |  807|  1.24M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.24M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.24M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.24M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.24M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.24M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (19452:9): [True: 9, False: 1.24M]
  ------------------
19453|      9|        return 0;
19454|  1.24M|    return janet_getmethod(janet_unwrap_keyword(key), it_s64_methods, out);
  ------------------
  |  |  865|  1.24M|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
19455|  1.24M|}
janet.c:it_u64_get:
19457|  2.88M|static int it_u64_get(void *p, Janet key, Janet *out) {
19458|  2.88M|    (void) p;
19459|  2.88M|    if (!janet_checktype(key, JANET_KEYWORD))
  ------------------
  |  |  806|  2.88M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 2.88M]
  |  |  ------------------
  |  |  807|  2.88M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.88M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.88M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.88M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.88M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.88M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (19459:9): [True: 7, False: 2.88M]
  ------------------
19460|      7|        return 0;
19461|  2.88M|    return janet_getmethod(janet_unwrap_keyword(key), it_u64_methods, out);
  ------------------
  |  |  865|  2.88M|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
19462|  2.88M|}
janet.c:checkflags:
19550|   497k|static int32_t checkflags(const uint8_t *str) {
19551|   497k|    int32_t flags = 0;
19552|   497k|    int32_t i;
19553|   497k|    int32_t len = janet_string_length(str);
  ------------------
  |  | 1813|   497k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|   497k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
19554|   497k|    if (!len || len > 10)
  ------------------
  |  Branch (19554:9): [True: 0, False: 497k]
  |  Branch (19554:17): [True: 0, False: 497k]
  ------------------
19555|      0|        janet_panic("file mode must have a length between 1 and 10");
19556|   497k|    switch (*str) {
19557|      0|        default:
  ------------------
  |  Branch (19557:9): [True: 0, False: 497k]
  ------------------
19558|      0|            janet_panicf("invalid flag %c, expected w, a, or r", *str);
19559|      0|            break;
19560|      4|        case 'w':
  ------------------
  |  Branch (19560:9): [True: 4, False: 497k]
  ------------------
19561|      4|            flags |= JANET_FILE_WRITE;
  ------------------
  |  | 2274|      4|#define JANET_FILE_WRITE 1
  ------------------
19562|      4|            janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2028|      4|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
19563|      4|            break;
19564|      0|        case 'a':
  ------------------
  |  Branch (19564:9): [True: 0, False: 497k]
  ------------------
19565|      0|            flags |= JANET_FILE_APPEND;
  ------------------
  |  | 2276|      0|#define JANET_FILE_APPEND 4
  ------------------
19566|      0|            janet_sandbox_assert(JANET_SANDBOX_FS);
  ------------------
  |  | 2039|      0|#define JANET_SANDBOX_FS (JANET_SANDBOX_FS_WRITE | JANET_SANDBOX_FS_READ | JANET_SANDBOX_FS_TEMP)
  |  |  ------------------
  |  |  |  | 2028|      0|#define JANET_SANDBOX_FS_WRITE 32
  |  |  ------------------
  |  |               #define JANET_SANDBOX_FS (JANET_SANDBOX_FS_WRITE | JANET_SANDBOX_FS_READ | JANET_SANDBOX_FS_TEMP)
  |  |  ------------------
  |  |  |  | 2029|      0|#define JANET_SANDBOX_FS_READ 64
  |  |  ------------------
  |  |               #define JANET_SANDBOX_FS (JANET_SANDBOX_FS_WRITE | JANET_SANDBOX_FS_READ | JANET_SANDBOX_FS_TEMP)
  |  |  ------------------
  |  |  |  | 2033|      0|#define JANET_SANDBOX_FS_TEMP 1024
  |  |  ------------------
  ------------------
19567|      0|            break;
19568|   497k|        case 'r':
  ------------------
  |  Branch (19568:9): [True: 497k, False: 4]
  ------------------
19569|   497k|            flags |= JANET_FILE_READ;
  ------------------
  |  | 2275|   497k|#define JANET_FILE_READ 2
  ------------------
19570|   497k|            janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2029|   497k|#define JANET_SANDBOX_FS_READ 64
  ------------------
19571|   497k|            break;
19572|   497k|    }
19573|   994k|    for (i = 1; i < len; i++) {
  ------------------
  |  Branch (19573:17): [True: 497k, False: 497k]
  ------------------
19574|   497k|        switch (str[i]) {
19575|      0|            default:
  ------------------
  |  Branch (19575:13): [True: 0, False: 497k]
  ------------------
19576|      0|                janet_panicf("invalid flag %c, expected +, b, or n", str[i]);
19577|      0|                break;
19578|      2|            case '+':
  ------------------
  |  Branch (19578:13): [True: 2, False: 497k]
  ------------------
19579|      2|                if (flags & JANET_FILE_UPDATE) return -1;
  ------------------
  |  | 2277|      2|#define JANET_FILE_UPDATE 8
  ------------------
  |  Branch (19579:21): [True: 1, False: 1]
  ------------------
19580|      1|                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2028|      1|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
19581|      1|                flags |= JANET_FILE_UPDATE;
  ------------------
  |  | 2277|      1|#define JANET_FILE_UPDATE 8
  ------------------
19582|      1|                break;
19583|   497k|            case 'b':
  ------------------
  |  Branch (19583:13): [True: 497k, False: 4]
  ------------------
19584|   497k|                if (flags & JANET_FILE_BINARY) return -1;
  ------------------
  |  | 2280|   497k|#define JANET_FILE_BINARY 64
  ------------------
  |  Branch (19584:21): [True: 0, False: 497k]
  ------------------
19585|   497k|                flags |= JANET_FILE_BINARY;
  ------------------
  |  | 2280|   497k|#define JANET_FILE_BINARY 64
  ------------------
19586|   497k|                break;
19587|      2|            case 'n':
  ------------------
  |  Branch (19587:13): [True: 2, False: 497k]
  ------------------
19588|      2|                if (flags & JANET_FILE_NONIL) return -1;
  ------------------
  |  | 2282|      2|#define JANET_FILE_NONIL 512
  ------------------
  |  Branch (19588:21): [True: 1, False: 1]
  ------------------
19589|      1|                flags |= JANET_FILE_NONIL;
  ------------------
  |  | 2282|      1|#define JANET_FILE_NONIL 512
  ------------------
19590|      1|                break;
19591|   497k|        }
19592|   497k|    }
19593|   497k|    return flags;
19594|   497k|}
janet.c:makef:
19596|  28.0k|static void *makef(FILE *f, int32_t flags, size_t bufsize) {
19597|  28.0k|    JanetFile *iof = (JanetFile *) janet_abstract(&janet_file_type, sizeof(JanetFile));
19598|  28.0k|    iof->file = f;
19599|  28.0k|    iof->flags = flags;
19600|  28.0k|    iof->vbufsize = bufsize;
19601|  28.0k|#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|  28.0k|    if (!(flags & JANET_FILE_NOT_CLOSEABLE))
  ------------------
  |  | 2278|  28.0k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
  |  Branch (19604:9): [True: 3.05k, False: 25.0k]
  ------------------
19605|  3.05k|        fcntl(fileno(f), F_SETFD, FD_CLOEXEC);
19606|  28.0k|#endif
19607|  28.0k|    return iof;
19608|  28.0k|}
janet.c:read_chunk:
19681|   319k|static void read_chunk(JanetFile *iof, JanetBuffer *buffer, int32_t nBytesMax) {
19682|   319k|    if (!(iof->flags & (JANET_FILE_READ | JANET_FILE_UPDATE)))
  ------------------
  |  | 2275|   319k|#define JANET_FILE_READ 2
  ------------------
                  if (!(iof->flags & (JANET_FILE_READ | JANET_FILE_UPDATE)))
  ------------------
  |  | 2277|   319k|#define JANET_FILE_UPDATE 8
  ------------------
  |  Branch (19682:9): [True: 0, False: 319k]
  ------------------
19683|      0|        janet_panic("file is not readable");
19684|   319k|    janet_buffer_extra(buffer, nBytesMax);
19685|   319k|    size_t ntoread = nBytesMax;
19686|   319k|    size_t nread = fread((char *)(buffer->data + buffer->count), 1, ntoread, iof->file);
19687|   319k|    if (nread != ntoread && ferror(iof->file))
  ------------------
  |  Branch (19687:9): [True: 319k, False: 0]
  |  Branch (19687:29): [True: 0, False: 319k]
  ------------------
19688|      0|        janet_panic("could not read file");
19689|   319k|    buffer->count += (int32_t) nread;
19690|   319k|}
janet.c:cfun_io_gc:
19804|  32.8k|static int cfun_io_gc(void *p, size_t len) {
19805|  32.8k|    (void) len;
19806|  32.8k|    JanetFile *iof = (JanetFile *)p;
19807|  32.8k|    janet_file_close(iof);
19808|  32.8k|    return 0;
19809|  32.8k|}
janet.c:io_file_get:
19886|   321k|static int io_file_get(void *p, Janet key, Janet *out) {
19887|   321k|    (void) p;
19888|   321k|    if (!janet_checktype(key, JANET_KEYWORD))
  ------------------
  |  |  806|   321k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 321k]
  |  |  ------------------
  |  |  807|   321k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   321k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   321k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   321k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   321k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   321k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (19888:9): [True: 2, False: 321k]
  ------------------
19889|      2|        return 0;
19890|   321k|    return janet_getmethod(janet_unwrap_keyword(key), io_file_methods, out);
  ------------------
  |  |  865|   321k|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
19891|   321k|}
janet.c:io_file_next:
19893|      7|static Janet io_file_next(void *p, Janet key) {
19894|      7|    (void) p;
19895|      7|    return janet_nextmethod(io_file_methods, key);
19896|      7|}
janet.c:io_file_marshal:
19898|  4.78k|static void io_file_marshal(void *p, JanetMarshalContext *ctx) {
19899|  4.78k|    JanetFile *iof = (JanetFile *)p;
19900|  4.78k|    if (janet_marshal_flags(ctx) & JANET_MARSHAL_UNSAFE) {
  ------------------
  |  | 1911|  4.78k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (19900:9): [True: 4.78k, False: 0]
  ------------------
19901|  4.78k|        janet_marshal_abstract(ctx, p);
19902|  4.78k|        int fno = -1;
19903|       |#ifdef JANET_WINDOWS
19904|       |        if (iof->flags & JANET_FILE_NOT_CLOSEABLE) {
19905|       |            fno = _fileno(iof->file);
19906|       |        } else {
19907|       |            fno = _dup(_fileno(iof->file));
19908|       |        }
19909|       |#else
19910|  4.78k|        if (iof->flags & JANET_FILE_NOT_CLOSEABLE) {
  ------------------
  |  | 2278|  4.78k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
  |  Branch (19910:13): [True: 4.78k, False: 0]
  ------------------
19911|  4.78k|            fno = fileno(iof->file);
19912|  4.78k|        } else {
19913|       |#ifdef JANET_PLAN9
19914|       |            fno = dup(fileno(iof->file), -1);
19915|       |#else
19916|      0|            fno = dup(fileno(iof->file));
19917|      0|#endif
19918|      0|        }
19919|  4.78k|#endif
19920|  4.78k|        janet_marshal_int(ctx, fno);
19921|  4.78k|        janet_marshal_int(ctx, iof->flags);
19922|  4.78k|        janet_marshal_size(ctx, iof->vbufsize);
19923|  4.78k|    } else {
19924|      0|        janet_panic("cannot marshal file in safe mode");
19925|      0|    }
19926|  4.78k|}
janet.c:io_file_unmarshal:
19928|  4.78k|static void *io_file_unmarshal(JanetMarshalContext *ctx) {
19929|  4.78k|    if (janet_unmarshal_flags(ctx) & JANET_MARSHAL_UNSAFE) {
  ------------------
  |  | 1911|  4.78k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (19929:9): [True: 4.78k, False: 0]
  ------------------
19930|  4.78k|        JanetFile *iof = janet_unmarshal_abstract(ctx, sizeof(JanetFile));
19931|  4.78k|        int32_t fd = janet_unmarshal_int(ctx);
19932|  4.78k|        int32_t flags = janet_unmarshal_int(ctx);
19933|  4.78k|        char fmt[4] = {0};
19934|  4.78k|        int index = 0;
19935|  4.78k|        if (flags & JANET_FILE_READ) fmt[index++] = 'r';
  ------------------
  |  | 2275|  4.78k|#define JANET_FILE_READ 2
  ------------------
  |  Branch (19935:13): [True: 1.59k, False: 3.19k]
  ------------------
19936|  4.78k|        if (flags & JANET_FILE_APPEND) {
  ------------------
  |  | 2276|  4.78k|#define JANET_FILE_APPEND 4
  ------------------
  |  Branch (19936:13): [True: 3.19k, False: 1.59k]
  ------------------
19937|  3.19k|            fmt[index++] = 'a';
19938|  3.19k|        } else if (flags & JANET_FILE_WRITE) {
  ------------------
  |  | 2274|  1.59k|#define JANET_FILE_WRITE 1
  ------------------
  |  Branch (19938:20): [True: 0, False: 1.59k]
  ------------------
19939|      0|            fmt[index++] = 'w';
19940|      0|        }
19941|       |#ifdef JANET_WINDOWS
19942|       |        iof->file = _fdopen(fd, fmt);
19943|       |#else
19944|  4.78k|        iof->file = fdopen(fd, fmt);
19945|  4.78k|#endif
19946|  4.78k|        if (iof->file == NULL) {
  ------------------
  |  Branch (19946:13): [True: 0, False: 4.78k]
  ------------------
19947|      0|            iof->flags = JANET_FILE_CLOSED;
  ------------------
  |  | 2279|      0|#define JANET_FILE_CLOSED 32
  ------------------
19948|  4.78k|        } else {
19949|  4.78k|            iof->flags = flags;
19950|  4.78k|        }
19951|  4.78k|        iof->vbufsize = janet_unmarshal_size(ctx);
19952|  4.78k|        if (iof->vbufsize != BUFSIZ) {
  ------------------
  |  Branch (19952:13): [True: 0, False: 4.78k]
  ------------------
19953|      0|            int result = setvbuf(iof->file, NULL, iof->vbufsize ? _IOFBF : _IONBF, iof->vbufsize);
  ------------------
  |  Branch (19953:51): [True: 0, False: 0]
  ------------------
19954|      0|            janet_assert(!result, "unmarshal setvbuf");
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
19955|      0|        }
19956|  4.78k|        return iof;
19957|  4.78k|    } else {
19958|      0|        janet_panic("cannot unmarshal file in safe mode");
19959|      0|    }
19960|  4.78k|}
janet.c:cfun_io_print_impl:
20041|   199k|                                int newline, const char *name, FILE *dflt_file) {
20042|   199k|    Janet x = janet_dyn(name);
20043|   199k|    return cfun_io_print_impl_x(argc, argv, newline, dflt_file, 0, x);
20044|   199k|}
janet.c:cfun_io_print_impl_x:
19972|   276k|                                  FILE *dflt_file, int32_t offset, Janet x) {
19973|   276k|    FILE *f;
19974|   276k|    switch (janet_type(x)) {
  ------------------
  |  |  795|   276k|    (isnan((x).number) \
  |  |  796|   276k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   276k|        : JANET_NUMBER)
  ------------------
  |  Branch (19974:13): [True: 276k, False: 0]
  ------------------
19975|      0|        default:
  ------------------
  |  Branch (19975:9): [True: 0, False: 276k]
  ------------------
19976|      0|            janet_panicf("cannot print to %v", x);
19977|  76.3k|        case JANET_BUFFER: {
  ------------------
  |  Branch (19977:9): [True: 76.3k, False: 199k]
  ------------------
19978|       |            /* Special case buffer */
19979|  76.3k|            JanetBuffer *buf = janet_unwrap_buffer(x);
  ------------------
  |  |  862|  76.3k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
19980|   611k|            for (int32_t i = offset; i < argc; ++i) {
  ------------------
  |  Branch (19980:38): [True: 534k, False: 76.3k]
  ------------------
19981|   534k|                janet_to_string_b(buf, argv[i]);
19982|   534k|            }
19983|  76.3k|            if (newline)
  ------------------
  |  Branch (19983:17): [True: 0, False: 76.3k]
  ------------------
19984|      0|                janet_buffer_push_u8(buf, '\n');
19985|  76.3k|            return janet_wrap_nil();
  ------------------
  |  |  831|  76.3k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  76.3k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  76.3k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  76.3k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19986|      0|        }
19987|    392|        case JANET_FUNCTION: {
  ------------------
  |  Branch (19987:9): [True: 392, False: 275k]
  ------------------
19988|       |            /* Special case function */
19989|    392|            JanetFunction *fun = janet_unwrap_function(x);
  ------------------
  |  |  868|    392|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
19990|    392|            JanetBuffer *buf = janet_buffer(0);
19991|   172k|            for (int32_t i = offset; i < argc; ++i) {
  ------------------
  |  Branch (19991:38): [True: 172k, False: 392]
  ------------------
19992|   172k|                janet_to_string_b(buf, argv[i]);
19993|   172k|            }
19994|    392|            if (newline)
  ------------------
  |  Branch (19994:17): [True: 1, False: 391]
  ------------------
19995|      1|                janet_buffer_push_u8(buf, '\n');
19996|    392|            Janet args[1] = { janet_wrap_buffer(buf) };
  ------------------
  |  |  847|    392|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|    392|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    392|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    392|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19997|    392|            janet_call(fun, 1, args);
19998|    392|            return janet_wrap_nil();
  ------------------
  |  |  831|    392|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    392|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    392|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    392|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19999|      0|        }
20000|   199k|        case JANET_NIL:
  ------------------
  |  Branch (20000:9): [True: 199k, False: 76.7k]
  ------------------
20001|   199k|            f = dflt_file;
20002|   199k|            if (f == NULL) janet_panic("cannot print to nil");
  ------------------
  |  Branch (20002:17): [True: 0, False: 199k]
  ------------------
20003|   199k|            break;
20004|   199k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (20004:9): [True: 0, False: 276k]
  ------------------
20005|      0|            void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
20006|      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 (20006:17): [True: 0, False: 0]
  ------------------
20007|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20008|      0|            JanetFile *iofile = abstract;
20009|      0|            io_assert_writeable(iofile);
20010|      0|            f = iofile->file;
20011|      0|            break;
20012|      0|        }
20013|   276k|    }
20014|  1.26M|    for (int32_t i = offset; i < argc; ++i) {
  ------------------
  |  Branch (20014:30): [True: 1.06M, False: 199k]
  ------------------
20015|  1.06M|        int32_t len;
20016|  1.06M|        const uint8_t *vstr;
20017|  1.06M|        if (janet_checktype(argv[i], JANET_BUFFER)) {
  ------------------
  |  |  806|  1.06M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 183k, False: 883k]
  |  |  |  Branch (806:6): [Folded, False: 1.06M]
  |  |  ------------------
  |  |  807|  1.06M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  1.06M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.06M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.06M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.06M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.06M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20018|   183k|            JanetBuffer *b = janet_unwrap_buffer(argv[i]);
  ------------------
  |  |  862|   183k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
20019|   183k|            vstr = b->data;
20020|   183k|            len = b->count;
20021|   883k|        } else {
20022|   883k|            vstr = janet_to_string(argv[i]);
20023|   883k|            len = janet_string_length(vstr);
  ------------------
  |  | 1813|   883k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|   883k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
20024|   883k|        }
20025|  1.06M|        if (len) {
  ------------------
  |  Branch (20025:13): [True: 717k, False: 349k]
  ------------------
20026|   717k|            if (1 != fwrite(vstr, len, 1, f)) {
  ------------------
  |  Branch (20026:17): [True: 0, False: 717k]
  ------------------
20027|      0|                if (f == dflt_file) {
  ------------------
  |  Branch (20027:21): [True: 0, False: 0]
  ------------------
20028|      0|                    janet_panicf("cannot print %d bytes", len);
20029|      0|                } else {
20030|      0|                    janet_panicf("cannot print %d bytes to %v", len, x);
20031|      0|                }
20032|      0|            }
20033|   717k|        }
20034|  1.06M|    }
20035|   199k|    if (newline)
  ------------------
  |  Branch (20035:9): [True: 198k, False: 419]
  ------------------
20036|   198k|        putc('\n', f);
20037|   199k|    return janet_wrap_nil();
  ------------------
  |  |  831|   199k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   199k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   199k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   199k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20038|   199k|}
janet.c:cfun_io_printf_impl:
20149|  11.6k|                                 const char *name, FILE *dflt_file) {
20150|  11.6k|    janet_arity(argc, 1, -1);
20151|  11.6k|    Janet x = janet_dyn(name);
20152|  11.6k|    return cfun_io_printf_impl_x(argc, argv, newline, dflt_file, 0, x);
20153|       |
20154|  11.6k|}
janet.c:cfun_io_printf_impl_x:
20092|  11.6k|                                   FILE *dflt_file, int32_t offset, Janet x) {
20093|  11.6k|    FILE *f;
20094|  11.6k|    const char *fmt = janet_getcstring(argv, offset);
20095|  11.6k|    switch (janet_type(x)) {
  ------------------
  |  |  795|  11.6k|    (isnan((x).number) \
  |  |  796|  11.6k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  11.6k|        : JANET_NUMBER)
  ------------------
  |  Branch (20095:13): [True: 11.6k, False: 3]
  ------------------
20096|      2|        default:
  ------------------
  |  Branch (20096:9): [True: 2, False: 11.6k]
  ------------------
20097|      2|            janet_panicf("cannot print to %v", x);
20098|      1|        case JANET_BUFFER: {
  ------------------
  |  Branch (20098:9): [True: 1, False: 11.6k]
  ------------------
20099|       |            /* Special case buffer */
20100|      1|            JanetBuffer *buf = janet_unwrap_buffer(x);
  ------------------
  |  |  862|      1|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
20101|      1|            janet_buffer_format(buf, fmt, offset, argc, argv);
20102|      1|            if (newline) janet_buffer_push_u8(buf, '\n');
  ------------------
  |  Branch (20102:17): [True: 0, False: 1]
  ------------------
20103|      1|            return janet_wrap_nil();
  ------------------
  |  |  831|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20104|      0|        }
20105|      3|        case JANET_FUNCTION: {
  ------------------
  |  Branch (20105:9): [True: 3, False: 11.6k]
  ------------------
20106|       |            /* Special case function */
20107|      3|            JanetFunction *fun = janet_unwrap_function(x);
  ------------------
  |  |  868|      3|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
20108|      3|            JanetBuffer *buf = janet_buffer(0);
20109|      3|            janet_buffer_format(buf, fmt, offset, argc, argv);
20110|      3|            if (newline) janet_buffer_push_u8(buf, '\n');
  ------------------
  |  Branch (20110:17): [True: 0, False: 3]
  ------------------
20111|      3|            Janet args[1] = { janet_wrap_buffer(buf) };
  ------------------
  |  |  847|      3|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|      3|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20112|      3|            janet_call(fun, 1, args);
20113|      3|            return janet_wrap_nil();
  ------------------
  |  |  831|      3|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      3|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20114|      0|        }
20115|  11.6k|        case JANET_NIL:
  ------------------
  |  Branch (20115:9): [True: 11.6k, False: 8]
  ------------------
20116|  11.6k|            f = dflt_file;
20117|  11.6k|            if (f == NULL) janet_panic("cannot print to nil");
  ------------------
  |  Branch (20117:17): [True: 0, False: 11.6k]
  ------------------
20118|  11.6k|            break;
20119|  11.6k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (20119:9): [True: 0, False: 11.6k]
  ------------------
20120|      0|            void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
20121|      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 (20121:17): [True: 0, False: 0]
  ------------------
20122|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20123|      0|            JanetFile *iofile = abstract;
20124|      0|            if (iofile->flags & JANET_FILE_CLOSED) {
  ------------------
  |  | 2279|      0|#define JANET_FILE_CLOSED 32
  ------------------
  |  Branch (20124:17): [True: 0, False: 0]
  ------------------
20125|      0|                janet_panic("cannot print to closed file");
20126|      0|            }
20127|      0|            io_assert_writeable(iofile);
20128|      0|            f = iofile->file;
20129|      0|            break;
20130|      0|        }
20131|  11.6k|    }
20132|  11.6k|    JanetBuffer *buf = janet_buffer(10);
20133|  11.6k|    janet_buffer_format(buf, fmt, offset, argc, argv);
20134|  11.6k|    if (newline) janet_buffer_push_u8(buf, '\n');
  ------------------
  |  Branch (20134:9): [True: 249, False: 11.4k]
  ------------------
20135|  11.6k|    if (buf->count) {
  ------------------
  |  Branch (20135:9): [True: 11.6k, False: 68]
  ------------------
20136|  11.6k|        if (1 != fwrite(buf->data, buf->count, 1, f)) {
  ------------------
  |  Branch (20136:13): [True: 0, False: 11.6k]
  ------------------
20137|      0|            janet_panicf("could not print %d bytes to file", buf->count);
20138|      0|        }
20139|  11.6k|    }
20140|       |    /* Clear buffer to make things easier for GC */
20141|  11.6k|    buf->count = 0;
20142|  11.6k|    buf->capacity = 0;
20143|  11.6k|    janet_free(buf->data);
  ------------------
  |  | 2415|  11.6k|#define janet_free(X) free((X))
  ------------------
20144|  11.6k|    buf->data = NULL;
20145|  11.6k|    return janet_wrap_nil();
  ------------------
  |  |  831|  11.6k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  11.6k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  11.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  11.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20146|  11.6k|}
janet.c:janet_flusher:
20194|    246|static void janet_flusher(const char *name, FILE *dflt_file) {
20195|    246|    Janet x = janet_dyn(name);
20196|    246|    switch (janet_type(x)) {
  ------------------
  |  |  795|    246|    (isnan((x).number) \
  |  |  796|    246|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|    246|        : JANET_NUMBER)
  ------------------
  |  Branch (20196:13): [True: 246, False: 0]
  ------------------
20197|      0|        default:
  ------------------
  |  Branch (20197:9): [True: 0, False: 246]
  ------------------
20198|      0|            break;
20199|    246|        case JANET_NIL:
  ------------------
  |  Branch (20199:9): [True: 246, False: 0]
  ------------------
20200|    246|            fflush(dflt_file);
20201|    246|            break;
20202|      0|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (20202:9): [True: 0, False: 246]
  ------------------
20203|      0|            void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
20204|      0|            if (janet_abstract_type(abstract) != &janet_file_type) break;
  ------------------
  |  | 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 (20204:17): [True: 0, False: 0]
  ------------------
20205|      0|            JanetFile *iofile = abstract;
20206|      0|            fflush(iofile->file);
20207|      0|            break;
20208|      0|        }
20209|    246|    }
20210|    246|}
janet.c:push64:
20531|  4.87k|static void push64(MarshalState *st, uint64_t x) {
20532|  4.87k|    if (x <= 0xF0) {
  ------------------
  |  Branch (20532:9): [True: 61, False: 4.81k]
  ------------------
20533|       |        /* Single byte */
20534|     61|        pushbyte(st, (uint8_t) x);
20535|  4.81k|    } else {
20536|       |        /* Multibyte, little endian */
20537|  4.81k|        uint8_t bytes[9];
20538|  4.81k|        int nbytes = 0;
20539|  14.5k|        while (x) {
  ------------------
  |  Branch (20539:16): [True: 9.71k, False: 4.81k]
  ------------------
20540|  9.71k|            bytes[++nbytes] = x & 0xFF;
20541|  9.71k|            x >>= 8;
20542|  9.71k|        }
20543|  4.81k|        bytes[0] = 0xF0 + nbytes;
20544|  4.81k|        pushbytes(st, bytes, nbytes + 1);
20545|  4.81k|    }
20546|  4.87k|}
janet.c:pushint:
20499|   118M|static void pushint(MarshalState *st, int32_t x) {
20500|   118M|    if (x >= 0 && x < 128) {
  ------------------
  |  Branch (20500:9): [True: 113M, False: 5.32M]
  |  Branch (20500:19): [True: 94.4M, False: 18.5M]
  ------------------
20501|  94.4M|        janet_buffer_push_u8(st->buf, x);
20502|  94.4M|    } else if (x <= 8191 && x >= -8192) {
  ------------------
  |  Branch (20502:16): [True: 22.2M, False: 1.65M]
  |  Branch (20502:29): [True: 22.2M, False: 1.62k]
  ------------------
20503|  22.2M|        uint8_t intbuf[2];
20504|  22.2M|        intbuf[0] = ((x >> 8) & 0x3F) | 0x80;
20505|  22.2M|        intbuf[1] = x & 0xFF;
20506|  22.2M|        janet_buffer_push_bytes(st->buf, intbuf, 2);
20507|  22.2M|    } else {
20508|  1.65M|        uint8_t intbuf[5];
20509|  1.65M|        intbuf[0] = LB_INTEGER;
20510|  1.65M|        intbuf[1] = (x >> 24) & 0xFF;
20511|  1.65M|        intbuf[2] = (x >> 16) & 0xFF;
20512|  1.65M|        intbuf[3] = (x >> 8) & 0xFF;
20513|  1.65M|        intbuf[4] = x & 0xFF;
20514|  1.65M|        janet_buffer_push_bytes(st->buf, intbuf, 5);
20515|  1.65M|    }
20516|   118M|}
janet.c:pushpointer:
20526|  18.1k|static void pushpointer(MarshalState *st, const void *ptr) {
20527|  18.1k|    janet_buffer_push_bytes(st->buf, (const uint8_t *) &ptr, sizeof(ptr));
20528|  18.1k|}
janet.c:pushbyte:
20518|   130M|static void pushbyte(MarshalState *st, uint8_t b) {
20519|   130M|    janet_buffer_push_u8(st->buf, b);
20520|   130M|}
janet.c:pushbytes:
20522|  6.64M|static void pushbytes(MarshalState *st, const uint8_t *bytes, int32_t len) {
20523|  6.64M|    janet_buffer_push_bytes(st->buf, bytes, len);
20524|  6.64M|}
janet.c:marshal_one:
20832|  32.5M|static void marshal_one(MarshalState *st, Janet x, int flags) {
20833|  32.5M|    MARSH_STACKCHECK;
  ------------------
  |  |20555|  32.5M|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  296|  32.5M|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (20555:30): [True: 1, False: 32.5M]
  |  |  ------------------
  ------------------
20834|  32.5M|    JanetType type = janet_type(x);
  ------------------
  |  |  795|  32.5M|    (isnan((x).number) \
  |  |  796|  32.5M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  32.5M|        : JANET_NUMBER)
  ------------------
  |  Branch (20834:22): [True: 30.2M, False: 2.30M]
  ------------------
20835|       |
20836|       |    /* Check simple primitives (non reference types, no benefit from memoization) */
20837|  32.5M|    switch (type) {
20838|  29.8M|        default:
  ------------------
  |  Branch (20838:9): [True: 29.8M, False: 2.67M]
  ------------------
20839|  29.8M|            break;
20840|  29.8M|        case JANET_NIL:
  ------------------
  |  Branch (20840:9): [True: 152k, False: 32.3M]
  ------------------
20841|   152k|            pushbyte(st, LB_NIL);
20842|   152k|            return;
20843|   212k|        case JANET_BOOLEAN:
  ------------------
  |  Branch (20843:9): [True: 212k, False: 32.3M]
  ------------------
20844|   212k|            pushbyte(st, janet_unwrap_boolean(x) ? LB_TRUE : LB_FALSE);
  ------------------
  |  |  838|   212k|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  |  |  ------------------
  |  |  |  Branch (838:33): [True: 212k, False: 9]
  |  |  ------------------
  ------------------
20845|   212k|            return;
20846|  2.30M|        case JANET_NUMBER: {
  ------------------
  |  Branch (20846:9): [True: 2.30M, False: 30.2M]
  ------------------
20847|  2.30M|            double xval = janet_unwrap_number(x);
  ------------------
  |  |  839|  2.30M|#define janet_unwrap_number(x) ((x).number)
  ------------------
20848|  2.30M|            if (janet_checkintrange(xval)) {
  ------------------
  |  |  962|  2.30M|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  ------------------
  |  |  |  Branch (962:33): [True: 2.30M, False: 4.80k]
  |  |  |  Branch (962:53): [True: 2.21M, False: 91.2k]
  |  |  |  Branch (962:73): [True: 2.21M, False: 3.20k]
  |  |  ------------------
  ------------------
20849|  2.21M|                pushint(st, (int32_t) xval);
20850|  2.21M|                return;
20851|  2.21M|            }
20852|  99.2k|            break;
20853|  2.30M|        }
20854|  32.5M|    }
20855|       |
20856|       |    /* Check reference and registry value */
20857|  29.9M|    {
20858|  29.9M|        Janet check;
20859|  29.9M|        if (st->maybe_cycles) {
  ------------------
  |  Branch (20859:13): [True: 29.9M, False: 1.06k]
  ------------------
20860|  29.9M|            check = janet_table_get(&st->seen, x);
20861|  29.9M|            if (janet_checkint(check)) {
  ------------------
  |  Branch (20861:17): [True: 20.1M, False: 9.78M]
  ------------------
20862|  20.1M|                pushbyte(st, LB_REFERENCE);
20863|  20.1M|                pushint(st, janet_unwrap_integer(check));
  ------------------
  |  |  966|  20.1M|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|  20.1M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
20864|  20.1M|                return;
20865|  20.1M|            }
20866|  29.9M|        }
20867|  9.78M|        if (st->rreg) {
  ------------------
  |  Branch (20867:13): [True: 1.23k, False: 9.78M]
  ------------------
20868|  1.23k|            check = janet_table_get(st->rreg, x);
20869|  1.23k|            if (janet_checktype(check, JANET_SYMBOL)) {
  ------------------
  |  |  806|  1.23k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 1.23k]
  |  |  |  Branch (806:6): [Folded, False: 1.23k]
  |  |  ------------------
  |  |  807|  1.23k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  1.23k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.23k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.23k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.23k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.23k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20870|      0|                MARK_SEEN();
  ------------------
  |  |20787|      0|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (20787:14): [True: 0, False: 0]
  |  |  ------------------
  |  |20788|      0|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |20789|      0|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (20789:16): [Folded, False: 0]
  |  |  ------------------
  ------------------
20871|      0|                const uint8_t *regname = janet_unwrap_symbol(check);
  ------------------
  |  |  864|      0|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
20872|      0|                pushbyte(st, LB_REGISTRY);
20873|      0|                pushint(st, janet_string_length(regname));
  ------------------
  |  | 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)))
  |  |  ------------------
  ------------------
20874|      0|                pushbytes(st, regname, janet_string_length(regname));
  ------------------
  |  | 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)))
  |  |  ------------------
  ------------------
20875|      0|                return;
20876|      0|            }
20877|  1.23k|        }
20878|  9.78M|    }
20879|       |
20880|       |    /* Reference types */
20881|  9.78M|    switch (type) {
20882|  92.8k|        case JANET_NUMBER: {
  ------------------
  |  Branch (20882:9): [True: 92.8k, False: 9.69M]
  ------------------
20883|  92.8k|            union {
20884|  92.8k|                double d;
20885|  92.8k|                uint8_t bytes[8];
20886|  92.8k|            } u;
20887|  92.8k|            u.d = janet_unwrap_number(x);
  ------------------
  |  |  839|  92.8k|#define janet_unwrap_number(x) ((x).number)
  ------------------
20888|       |#ifdef JANET_BIG_ENDIAN
20889|       |            /* Swap byte order */
20890|       |            uint8_t temp;
20891|       |            temp = u.bytes[7];
20892|       |            u.bytes[7] = u.bytes[0];
20893|       |            u.bytes[0] = temp;
20894|       |            temp = u.bytes[6];
20895|       |            u.bytes[6] = u.bytes[1];
20896|       |            u.bytes[1] = temp;
20897|       |            temp = u.bytes[5];
20898|       |            u.bytes[5] = u.bytes[2];
20899|       |            u.bytes[2] = temp;
20900|       |            temp = u.bytes[4];
20901|       |            u.bytes[4] = u.bytes[3];
20902|       |            u.bytes[3] = temp;
20903|       |#endif
20904|  92.8k|            pushbyte(st, LB_REAL);
20905|  92.8k|            pushbytes(st, u.bytes, 8);
20906|  92.8k|            MARK_SEEN();
  ------------------
  |  |20787|  92.8k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (20787:14): [True: 92.8k, False: 0]
  |  |  ------------------
  |  |20788|  92.8k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|  92.8k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|  92.8k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |20789|  92.8k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (20789:16): [Folded, False: 92.8k]
  |  |  ------------------
  ------------------
20907|  92.8k|            return;
20908|      0|        }
20909|  2.55M|        case JANET_STRING:
  ------------------
  |  Branch (20909:9): [True: 2.55M, False: 7.22M]
  ------------------
20910|  5.58M|        case JANET_SYMBOL:
  ------------------
  |  Branch (20910:9): [True: 3.03M, False: 6.75M]
  ------------------
20911|  5.96M|        case JANET_KEYWORD: {
  ------------------
  |  Branch (20911:9): [True: 380k, False: 9.40M]
  ------------------
20912|  5.96M|            const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  863|  5.96M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
20913|  5.96M|            int32_t length = janet_string_length(str);
  ------------------
  |  | 1813|  5.96M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  5.96M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
20914|       |            /* Record reference */
20915|  5.96M|            MARK_SEEN();
  ------------------
  |  |20787|  5.96M|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (20787:14): [True: 5.96M, False: 803]
  |  |  ------------------
  |  |20788|  5.96M|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|  5.96M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|  5.96M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |20789|  5.96M|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (20789:16): [Folded, False: 5.96M]
  |  |  ------------------
  ------------------
20916|  5.96M|            uint8_t lb = (type == JANET_STRING) ? LB_STRING :
  ------------------
  |  Branch (20916:26): [True: 2.55M, False: 3.41M]
  ------------------
20917|  5.96M|                         (type == JANET_SYMBOL) ? LB_SYMBOL :
  ------------------
  |  Branch (20917:26): [True: 3.03M, False: 380k]
  ------------------
20918|  3.41M|                         LB_KEYWORD;
20919|  5.96M|            pushbyte(st, lb);
20920|  5.96M|            pushint(st, length);
20921|  5.96M|            pushbytes(st, str, length);
20922|  5.96M|            return;
20923|  5.58M|        }
20924|  14.7k|        case JANET_BUFFER: {
  ------------------
  |  Branch (20924:9): [True: 14.7k, False: 9.77M]
  ------------------
20925|  14.7k|            JanetBuffer *buffer = janet_unwrap_buffer(x);
  ------------------
  |  |  862|  14.7k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
20926|       |            /* Record reference */
20927|  14.7k|            MARK_SEEN();
  ------------------
  |  |20787|  14.7k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (20787:14): [True: 14.7k, False: 0]
  |  |  ------------------
  |  |20788|  14.7k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|  14.7k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|  14.7k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |20789|  14.7k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (20789:16): [Folded, False: 14.7k]
  |  |  ------------------
  ------------------
20928|  14.7k|#ifdef JANET_EV
20929|  14.7k|            if ((flags & JANET_MARSHAL_UNSAFE) &&
  ------------------
  |  | 1911|  14.7k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (20929:17): [True: 2.70k, False: 12.0k]
  ------------------
20930|  2.70k|                    (buffer->gc.flags & JANET_BUFFER_FLAG_NO_REALLOC)) {
  ------------------
  |  | 1780|  2.70k|#define JANET_BUFFER_FLAG_NO_REALLOC 0x10000
  ------------------
  |  Branch (20930:21): [True: 0, False: 2.70k]
  ------------------
20931|      0|                pushbyte(st, LB_POINTER_BUFFER);
20932|      0|                pushint(st, buffer->count);
20933|      0|                pushint(st, buffer->capacity);
20934|      0|                pushpointer(st, buffer->data);
20935|      0|                return;
20936|      0|            }
20937|  14.7k|#endif
20938|  14.7k|            pushbyte(st, LB_BUFFER);
20939|  14.7k|            pushint(st, buffer->count);
20940|  14.7k|            pushbytes(st, buffer->data, buffer->count);
20941|  14.7k|            return;
20942|  14.7k|        }
20943|  4.80k|        case JANET_ARRAY: {
  ------------------
  |  Branch (20943:9): [True: 4.80k, False: 9.78M]
  ------------------
20944|  4.80k|            int32_t i;
20945|  4.80k|            JanetArray *a = janet_unwrap_array(x);
  ------------------
  |  |  860|  4.80k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
20946|  4.80k|            MARK_SEEN();
  ------------------
  |  |20787|  4.80k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (20787:14): [True: 4.80k, False: 0]
  |  |  ------------------
  |  |20788|  4.80k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|  4.80k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|  4.80k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |20789|  4.80k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (20789:16): [Folded, False: 4.80k]
  |  |  ------------------
  ------------------
20947|  4.80k|            enum JanetMemoryType memtype = janet_gc_type(a);
  ------------------
  |  |  657|  4.80k|#define janet_gc_type(m) (janet_gc_header(m)->flags & 0xFF)
  |  |  ------------------
  |  |  |  |  650|  4.80k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
20948|  4.80k|            pushbyte(st, memtype == JANET_MEMORY_ARRAY_WEAK ? LB_ARRAY_WEAK : LB_ARRAY);
  ------------------
  |  Branch (20948:26): [True: 0, False: 4.80k]
  ------------------
20949|  4.80k|            pushint(st, a->count);
20950|  41.6k|            for (i = 0; i < a->count; i++)
  ------------------
  |  Branch (20950:25): [True: 36.8k, False: 4.80k]
  ------------------
20951|  36.8k|                marshal_one(st, a->data[i], flags + 1);
20952|  4.80k|            return;
20953|  14.7k|        }
20954|  1.22M|        case JANET_TUPLE: {
  ------------------
  |  Branch (20954:9): [True: 1.22M, False: 8.55M]
  ------------------
20955|  1.22M|            int32_t i, count, flag;
20956|  1.22M|            const Janet *tup = janet_unwrap_tuple(x);
  ------------------
  |  |  858|  1.22M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
20957|  1.22M|            count = janet_tuple_length(tup);
  ------------------
  |  | 1802|  1.22M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  1.22M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
20958|  1.22M|            flag = janet_tuple_flag(tup) >> 16;
  ------------------
  |  | 1806|  1.22M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  1.22M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
20959|  1.22M|            pushbyte(st, LB_TUPLE);
20960|  1.22M|            pushint(st, count);
20961|  1.22M|            pushint(st, flag);
20962|  4.78M|            for (i = 0; i < count; i++)
  ------------------
  |  Branch (20962:25): [True: 3.55M, False: 1.22M]
  ------------------
20963|  3.55M|                marshal_one(st, tup[i], flags + 1);
20964|       |            /* Mark as seen AFTER marshaling */
20965|  1.22M|            MARK_SEEN();
  ------------------
  |  |20787|  1.22M|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (20787:14): [True: 1.22M, False: 1.28k]
  |  |  ------------------
  |  |20788|  1.22M|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|  1.22M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|  1.22M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |20789|  1.22M|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (20789:16): [Folded, False: 1.22M]
  |  |  ------------------
  ------------------
20966|  1.22M|            return;
20967|  14.7k|        }
20968|  1.16M|        case JANET_TABLE: {
  ------------------
  |  Branch (20968:9): [True: 1.16M, False: 8.61M]
  ------------------
20969|  1.16M|            JanetTable *t = janet_unwrap_table(x);
  ------------------
  |  |  861|  1.16M|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
20970|  1.16M|            MARK_SEEN();
  ------------------
  |  |20787|  1.16M|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (20787:14): [True: 1.16M, False: 0]
  |  |  ------------------
  |  |20788|  1.16M|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|  1.16M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|  1.16M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |20789|  1.16M|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (20789:16): [Folded, False: 1.16M]
  |  |  ------------------
  ------------------
20971|  1.16M|            enum JanetMemoryType memtype = janet_gc_type(t);
  ------------------
  |  |  657|  1.16M|#define janet_gc_type(m) (janet_gc_header(m)->flags & 0xFF)
  |  |  ------------------
  |  |  |  |  650|  1.16M|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
20972|  1.16M|            if (memtype == JANET_MEMORY_TABLE_WEAKK) {
  ------------------
  |  Branch (20972:17): [True: 0, False: 1.16M]
  ------------------
20973|      0|                pushbyte(st, t->proto ? LB_TABLE_WEAKK_PROTO : LB_TABLE_WEAKK);
  ------------------
  |  Branch (20973:30): [True: 0, False: 0]
  ------------------
20974|  1.16M|            } else if (memtype == JANET_MEMORY_TABLE_WEAKV) {
  ------------------
  |  Branch (20974:24): [True: 0, False: 1.16M]
  ------------------
20975|      0|                pushbyte(st, t->proto ? LB_TABLE_WEAKV_PROTO : LB_TABLE_WEAKV);
  ------------------
  |  Branch (20975:30): [True: 0, False: 0]
  ------------------
20976|  1.16M|            } else if (memtype == JANET_MEMORY_TABLE_WEAKKV) {
  ------------------
  |  Branch (20976:24): [True: 0, False: 1.16M]
  ------------------
20977|      0|                pushbyte(st, t->proto ? LB_TABLE_WEAKKV_PROTO : LB_TABLE_WEAKKV);
  ------------------
  |  Branch (20977:30): [True: 0, False: 0]
  ------------------
20978|  1.16M|            } else {
20979|  1.16M|                pushbyte(st, t->proto ? LB_TABLE_PROTO : LB_TABLE);
  ------------------
  |  Branch (20979:30): [True: 0, False: 1.16M]
  ------------------
20980|  1.16M|            }
20981|  1.16M|            pushint(st, t->count);
20982|  1.16M|            if (t->proto)
  ------------------
  |  Branch (20982:17): [True: 0, False: 1.16M]
  ------------------
20983|      0|                marshal_one(st, janet_wrap_table(t->proto), flags + 1);
  ------------------
  |  |  846|      0|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20984|  20.4M|            for (int32_t i = 0; i < t->capacity; i++) {
  ------------------
  |  Branch (20984:33): [True: 19.2M, False: 1.16M]
  ------------------
20985|  19.2M|                if (janet_checktype(t->data[i].key, JANET_NIL))
  ------------------
  |  |  806|  19.2M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 12.2M, False: 6.94M]
  |  |  |  Branch (806:6): [Folded, False: 19.2M]
  |  |  ------------------
  |  |  807|  19.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|  19.2M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  19.2M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  19.2M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  19.2M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  19.2M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20986|  12.2M|                    continue;
20987|  6.94M|                marshal_one(st, t->data[i].key, flags + 1);
20988|  6.94M|                marshal_one(st, t->data[i].value, flags + 1);
20989|  6.94M|            }
20990|  1.16M|            return;
20991|  14.7k|        }
20992|  11.2k|        case JANET_STRUCT: {
  ------------------
  |  Branch (20992:9): [True: 11.2k, False: 9.77M]
  ------------------
20993|  11.2k|            int32_t count;
20994|  11.2k|            const JanetKV *struct_ = janet_unwrap_struct(x);
  ------------------
  |  |  857|  11.2k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
20995|  11.2k|            count = janet_struct_length(struct_);
  ------------------
  |  | 1848|  11.2k|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|  11.2k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
20996|  11.2k|            pushbyte(st, janet_struct_proto(struct_) ? LB_STRUCT_PROTO : LB_STRUCT);
  ------------------
  |  | 1851|  11.2k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|  11.2k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1851:31): [True: 0, False: 11.2k]
  |  |  ------------------
  ------------------
20997|  11.2k|            pushint(st, count);
20998|  11.2k|            if (janet_struct_proto(struct_))
  ------------------
  |  | 1851|  11.2k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|  11.2k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1851:31): [True: 0, False: 11.2k]
  |  |  ------------------
  ------------------
20999|      0|                marshal_one(st, janet_wrap_struct(janet_struct_proto(struct_)), flags + 1);
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21000|   204k|            for (int32_t i = 0; i < janet_struct_capacity(struct_); i++) {
  ------------------
  |  | 1849|   204k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|   204k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (21000:33): [True: 193k, False: 11.2k]
  ------------------
21001|   193k|                if (janet_checktype(struct_[i].key, JANET_NIL))
  ------------------
  |  |  806|   193k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 118k, False: 75.0k]
  |  |  |  Branch (806:6): [Folded, False: 193k]
  |  |  ------------------
  |  |  807|   193k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   193k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   193k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   193k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   193k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   193k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21002|   118k|                    continue;
21003|  75.0k|                marshal_one(st, struct_[i].key, flags + 1);
21004|  75.0k|                marshal_one(st, struct_[i].value, flags + 1);
21005|  75.0k|            }
21006|       |            /* Mark as seen AFTER marshaling */
21007|  11.2k|            MARK_SEEN();
  ------------------
  |  |20787|  11.2k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (20787:14): [True: 11.2k, False: 1]
  |  |  ------------------
  |  |20788|  11.2k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|  11.2k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|  11.2k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |20789|  11.2k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (20789:16): [Folded, False: 11.2k]
  |  |  ------------------
  ------------------
21008|  11.2k|            return;
21009|  14.7k|        }
21010|  4.87k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (21010:9): [True: 4.87k, False: 9.78M]
  ------------------
21011|  4.87k|            marshal_one_abstract(st, x, flags);
21012|  4.87k|            return;
21013|  14.7k|        }
21014|   708k|        case JANET_FUNCTION: {
  ------------------
  |  Branch (21014:9): [True: 708k, False: 9.07M]
  ------------------
21015|   708k|            pushbyte(st, LB_FUNCTION);
21016|   708k|            JanetFunction *func = janet_unwrap_function(x);
  ------------------
  |  |  868|   708k|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
21017|   708k|            pushint(st, func->def->environments_length);
21018|       |            /* Mark seen before reading def */
21019|   708k|            MARK_SEEN();
  ------------------
  |  |20787|   708k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (20787:14): [True: 708k, False: 6]
  |  |  ------------------
  |  |20788|   708k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|   708k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|   708k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |20789|   708k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (20789:16): [Folded, False: 708k]
  |  |  ------------------
  ------------------
21020|   708k|            marshal_one_def(st, func->def, flags);
21021|   777k|            for (int32_t i = 0; i < func->def->environments_length; i++)
  ------------------
  |  Branch (21021:33): [True: 68.6k, False: 708k]
  ------------------
21022|  68.6k|                marshal_one_env(st, func->envs[i], flags + 1);
21023|   708k|            return;
21024|  14.7k|        }
21025|  1.59k|        case JANET_FIBER: {
  ------------------
  |  Branch (21025:9): [True: 1.59k, False: 9.78M]
  ------------------
21026|  1.59k|            MARK_SEEN();
  ------------------
  |  |20787|  1.59k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (20787:14): [True: 1.59k, False: 0]
  |  |  ------------------
  |  |20788|  1.59k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|  1.59k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|  1.59k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |20789|  1.59k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (20789:16): [Folded, False: 1.59k]
  |  |  ------------------
  ------------------
21027|  1.59k|            pushbyte(st, LB_FIBER);
21028|  1.59k|            marshal_one_fiber(st, janet_unwrap_fiber(x), flags + 1);
  ------------------
  |  |  859|  1.59k|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
21029|  1.59k|            return;
21030|  14.7k|        }
21031|   562k|        case JANET_CFUNCTION: {
  ------------------
  |  Branch (21031:9): [True: 562k, False: 9.22M]
  ------------------
21032|   562k|            if (!(flags & JANET_MARSHAL_UNSAFE)) goto no_registry;
  ------------------
  |  | 1911|   562k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (21032:17): [True: 1, False: 562k]
  ------------------
21033|   562k|            MARK_SEEN();
  ------------------
  |  |20787|   562k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (20787:14): [True: 562k, False: 0]
  |  |  ------------------
  |  |20788|   562k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|   562k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|   562k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |20789|   562k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (20789:16): [Folded, False: 562k]
  |  |  ------------------
  ------------------
21034|   562k|            pushbyte(st, LB_UNSAFE_CFUNCTION);
21035|   562k|            JanetCFunction cfn = janet_unwrap_cfunction(x);
  ------------------
  |  |  869|   562k|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
21036|   562k|            pushbytes(st, (uint8_t *) &cfn, sizeof(JanetCFunction));
21037|   562k|            return;
21038|   562k|        }
21039|  18.1k|        case JANET_POINTER: {
  ------------------
  |  Branch (21039:9): [True: 18.1k, False: 9.76M]
  ------------------
21040|  18.1k|            if (!(flags & JANET_MARSHAL_UNSAFE)) goto no_registry;
  ------------------
  |  | 1911|  18.1k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (21040:17): [True: 0, False: 18.1k]
  ------------------
21041|  18.1k|            MARK_SEEN();
  ------------------
  |  |20787|  18.1k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (20787:14): [True: 18.1k, False: 0]
  |  |  ------------------
  |  |20788|  18.1k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|  18.1k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|  18.1k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |20789|  18.1k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (20789:16): [Folded, False: 18.1k]
  |  |  ------------------
  ------------------
21042|  18.1k|            pushbyte(st, LB_UNSAFE_POINTER);
21043|  18.1k|            pushpointer(st, janet_unwrap_pointer(x));
  ------------------
  |  |  867|  18.1k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
21044|  18.1k|            return;
21045|  18.1k|        }
21046|      1|    no_registry:
21047|      1|        default: {
  ------------------
  |  Branch (21047:9): [True: 0, False: 9.78M]
  ------------------
21048|      1|            janet_panicf("no registry value and cannot marshal %p", x);
21049|      1|        }
21050|  9.78M|    }
21051|  9.78M|#undef MARK_SEEN
21052|  9.78M|}
janet.c:marshal_one_abstract:
20802|  4.87k|static void marshal_one_abstract(MarshalState *st, Janet x, int flags) {
20803|  4.87k|    void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  866|  4.87k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
20804|  4.87k|#ifdef JANET_EV
20805|       |    /* Threaded abstract types get passed through as pointers in the unsafe mode */
20806|  4.87k|    if ((flags & JANET_MARSHAL_UNSAFE) &&
  ------------------
  |  | 1911|  4.87k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (20806:9): [True: 4.87k, False: 1]
  ------------------
20807|  4.87k|            (JANET_MEMORY_THREADED_ABSTRACT == (janet_abstract_head(abstract)->gc.flags & JANET_MEM_TYPEBITS))) {
  ------------------
  |  | 1897|  4.87k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
                          (JANET_MEMORY_THREADED_ABSTRACT == (janet_abstract_head(abstract)->gc.flags & JANET_MEM_TYPEBITS))) {
  ------------------
  |  |  652|  4.87k|#define JANET_MEM_TYPEBITS 0xFF
  ------------------
  |  Branch (20807:13): [True: 0, False: 4.87k]
  ------------------
20808|       |
20809|       |        /* Increment refcount before sending message. This prevents a "death in transit" problem
20810|       |         * where a message is garbage collected while in transit between two threads - i.e., the sending threads
20811|       |         * loses the reference and runs a garbage collection before the receiving thread gets the message. */
20812|      0|        janet_abstract_incref(abstract);
20813|      0|        pushbyte(st, LB_THREADED_ABSTRACT);
20814|      0|        pushbytes(st, (uint8_t *) &abstract, sizeof(abstract));
20815|      0|        MARK_SEEN();
  ------------------
  |  |20787|      0|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (20787:14): [True: 0, False: 0]
  |  |  ------------------
  |  |20788|      0|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |20789|      0|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (20789:16): [Folded, False: 0]
  |  |  ------------------
  ------------------
20816|      0|        return;
20817|      0|    }
20818|  4.87k|#endif
20819|  4.87k|    const JanetAbstractType *at = janet_abstract_type(abstract);
  ------------------
  |  | 1899|  4.87k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|  4.87k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
20820|  4.87k|    if (at->marshal) {
  ------------------
  |  Branch (20820:9): [True: 4.87k, False: 0]
  ------------------
20821|  4.87k|        pushbyte(st, LB_ABSTRACT);
20822|  4.87k|        marshal_one(st, janet_csymbolv(at->name), flags + 1);
  ------------------
  |  | 1837|  4.87k|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  4.87k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  4.87k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  4.87k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  4.87k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20823|  4.87k|        JanetMarshalContext context = {st, NULL, flags + 1, NULL, at};
20824|  4.87k|        at->marshal(abstract, &context);
20825|  4.87k|    } else {
20826|      0|        janet_panicf("cannot marshal %p", x);
20827|      0|    }
20828|  4.87k|}
janet.c:marshal_one_def:
20622|  1.37M|static void marshal_one_def(MarshalState *st, JanetFuncDef *def, int flags) {
20623|  1.37M|    MARSH_STACKCHECK;
  ------------------
  |  |20555|  1.37M|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  296|  1.37M|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (20555:30): [True: 0, False: 1.37M]
  |  |  ------------------
  ------------------
20624|   236M|    for (int32_t i = 0; i < janet_v_count(st->seen_defs); i++) {
  ------------------
  |  |  736|   236M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   236M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   236M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 236M, False: 96.7k]
  |  |  ------------------
  ------------------
  |  Branch (20624:25): [True: 235M, False: 1.36M]
  ------------------
20625|   235M|        if (st->seen_defs[i] == def) {
  ------------------
  |  Branch (20625:13): [True: 6.40k, False: 235M]
  ------------------
20626|  6.40k|            pushbyte(st, LB_FUNCDEF_REF);
20627|  6.40k|            pushint(st, i);
20628|  6.40k|            return;
20629|  6.40k|        }
20630|   235M|    }
20631|       |    /* Add to lookup */
20632|  1.36M|    janet_v_push(st->seen_defs, def);
  ------------------
  |  |  734|  1.36M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  1.36M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  1.36M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  1.26M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  1.26M|#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.26M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  1.26M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 96.7k, False: 1.26M]
  |  |  |  |  |  |  |  Branch (745:50): [True: 300k, False: 969k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|   396k|#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.36M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.36M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20633|       |
20634|  1.36M|    pushint(st, def->flags);
20635|  1.36M|    pushint(st, def->slotcount);
20636|  1.36M|    pushint(st, def->arity);
20637|  1.36M|    pushint(st, def->min_arity);
20638|  1.36M|    pushint(st, def->max_arity);
20639|  1.36M|    pushint(st, def->constants_length);
20640|  1.36M|    pushint(st, def->bytecode_length);
20641|  1.36M|    if (def->flags & JANET_FUNCDEF_FLAG_NAMEDARGS)
  ------------------
  |  | 1107|  1.36M|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (20641:9): [True: 3.19k, False: 1.36M]
  ------------------
20642|  3.19k|        pushint(st, def->named_args_count);
20643|  1.36M|    if (def->flags & JANET_FUNCDEF_FLAG_HASENVS)
  ------------------
  |  | 1103|  1.36M|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (20643:9): [True: 1.31M, False: 53.0k]
  ------------------
20644|  1.31M|        pushint(st, def->environments_length);
20645|  1.36M|    if (def->flags & JANET_FUNCDEF_FLAG_HASDEFS)
  ------------------
  |  | 1102|  1.36M|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (20645:9): [True: 524k, False: 841k]
  ------------------
20646|   524k|        pushint(st, def->defs_length);
20647|  1.36M|    if (def->flags & JANET_FUNCDEF_FLAG_HASSYMBOLMAP)
  ------------------
  |  | 1099|  1.36M|#define JANET_FUNCDEF_FLAG_HASSYMBOLMAP 0x40000
  ------------------
  |  Branch (20647:9): [True: 794k, False: 571k]
  ------------------
20648|   794k|        pushint(st, def->symbolmap_length);
20649|  1.36M|    if (def->flags & JANET_FUNCDEF_FLAG_HASNAME)
  ------------------
  |  | 1100|  1.36M|#define JANET_FUNCDEF_FLAG_HASNAME 0x80000
  ------------------
  |  Branch (20649:9): [True: 1.31M, False: 54.2k]
  ------------------
20650|  1.31M|        marshal_one(st, janet_wrap_string(def->name), flags);
  ------------------
  |  |  848|  1.31M|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  1.31M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.31M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.31M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20651|  1.36M|    if (def->flags & JANET_FUNCDEF_FLAG_HASSOURCE)
  ------------------
  |  | 1101|  1.36M|#define JANET_FUNCDEF_FLAG_HASSOURCE 0x100000
  ------------------
  |  Branch (20651:9): [True: 1.31M, False: 53.0k]
  ------------------
20652|  1.31M|        marshal_one(st, janet_wrap_string(def->source), flags);
  ------------------
  |  |  848|  1.31M|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  1.31M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.31M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.31M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20653|       |
20654|       |    /* marshal constants */
20655|  5.11M|    for (int32_t i = 0; i < def->constants_length; i++)
  ------------------
  |  Branch (20655:25): [True: 3.74M, False: 1.36M]
  ------------------
20656|  3.74M|        marshal_one(st, def->constants[i], flags + 1);
20657|       |
20658|       |    /* Marshal symbol map, if needed */
20659|  9.52M|    for (int32_t i = 0; i < def->symbolmap_length; i++) {
  ------------------
  |  Branch (20659:25): [True: 8.15M, False: 1.36M]
  ------------------
20660|  8.15M|        pushint(st, (int32_t) def->symbolmap[i].birth_pc);
20661|  8.15M|        pushint(st, (int32_t) def->symbolmap[i].death_pc);
20662|  8.15M|        pushint(st, (int32_t) def->symbolmap[i].slot_index);
20663|  8.15M|        marshal_one(st, janet_wrap_symbol(def->symbolmap[i].symbol), flags + 1);
  ------------------
  |  |  849|  8.15M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|  8.15M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.15M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.15M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20664|  8.15M|    }
20665|       |
20666|       |    /* marshal the bytecode */
20667|  1.36M|    janet_marshal_u32s(st, def->bytecode, def->bytecode_length);
20668|       |
20669|       |    /* marshal the environments if needed */
20670|  1.68M|    for (int32_t i = 0; i < def->environments_length; i++)
  ------------------
  |  Branch (20670:25): [True: 317k, False: 1.36M]
  ------------------
20671|   317k|        pushint(st, def->environments[i]);
20672|       |
20673|       |    /* marshal the sub funcdefs if needed */
20674|  2.02M|    for (int32_t i = 0; i < def->defs_length; i++)
  ------------------
  |  Branch (20674:25): [True: 663k, False: 1.36M]
  ------------------
20675|   663k|        marshal_one_def(st, def->defs[i], flags + 1);
20676|       |
20677|       |    /* marshal source maps if needed */
20678|  1.36M|    if (def->flags & JANET_FUNCDEF_FLAG_HASSOURCEMAP) {
  ------------------
  |  | 1104|  1.36M|#define JANET_FUNCDEF_FLAG_HASSOURCEMAP 0x800000
  ------------------
  |  Branch (20678:9): [True: 1.31M, False: 53.0k]
  ------------------
20679|  1.31M|        int32_t current = 0;
20680|  25.5M|        for (int32_t i = 0; i < def->bytecode_length; i++) {
  ------------------
  |  Branch (20680:29): [True: 24.2M, False: 1.31M]
  ------------------
20681|  24.2M|            JanetSourceMapping map = def->sourcemap[i];
20682|  24.2M|            pushint(st, map.line - current);
20683|  24.2M|            pushint(st, map.column);
20684|  24.2M|            current = map.line;
20685|  24.2M|        }
20686|  1.31M|    }
20687|       |
20688|       |    /* Marshal closure bitset, if needed */
20689|  1.36M|    if (def->flags & JANET_FUNCDEF_FLAG_HASCLOBITSET) {
  ------------------
  |  | 1106|  1.36M|#define JANET_FUNCDEF_FLAG_HASCLOBITSET 0x2000000
  ------------------
  |  Branch (20689:9): [True: 97.4k, False: 1.26M]
  ------------------
20690|  97.4k|        janet_marshal_u32s(st, def->closure_bitset, ((def->slotcount - 1) >> 5) + 1);
20691|  97.4k|    }
20692|  1.36M|}
janet.c:janet_marshal_u32s:
20612|  1.46M|static void janet_marshal_u32s(MarshalState *st, const uint32_t *u32s, int32_t n) {
20613|  26.4M|    for (int32_t i = 0; i < n; i++) {
  ------------------
  |  Branch (20613:25): [True: 25.0M, False: 1.46M]
  ------------------
20614|  25.0M|        pushbyte(st, u32s[i] & 0xFF);
20615|  25.0M|        pushbyte(st, (u32s[i] >> 8) & 0xFF);
20616|  25.0M|        pushbyte(st, (u32s[i] >> 16) & 0xFF);
20617|  25.0M|        pushbyte(st, (u32s[i] >> 24) & 0xFF);
20618|  25.0M|    }
20619|  1.46M|}
janet.c:marshal_one_env:
20571|  68.6k|static void marshal_one_env(MarshalState *st, JanetFuncEnv *env, int flags) {
20572|  68.6k|    MARSH_STACKCHECK;
  ------------------
  |  |20555|  68.6k|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  296|  68.6k|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (20555:30): [True: 0, False: 68.6k]
  |  |  ------------------
  ------------------
20573|   393k|    for (int32_t i = 0; i < janet_v_count(st->seen_envs); i++) {
  ------------------
  |  |  736|   393k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   392k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   392k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 392k, False: 1.60k]
  |  |  ------------------
  ------------------
  |  Branch (20573:25): [True: 381k, False: 12.7k]
  ------------------
20574|   381k|        if (st->seen_envs[i] == env) {
  ------------------
  |  Branch (20574:13): [True: 55.8k, False: 325k]
  ------------------
20575|  55.8k|            pushbyte(st, LB_FUNCENV_REF);
20576|  55.8k|            pushint(st, i);
20577|  55.8k|            return;
20578|  55.8k|        }
20579|   381k|    }
20580|  12.7k|    janet_env_valid(env);
20581|  12.7k|    janet_v_push(st->seen_envs, env);
  ------------------
  |  |  734|  12.7k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  12.7k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  12.7k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  11.1k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  11.1k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|  11.1k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  11.1k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 1.60k, False: 11.1k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 6.40k, False: 4.78k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  8.00k|#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|  12.7k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  12.7k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20582|       |
20583|       |    /* Special case for early detachment */
20584|  12.7k|    if (env->offset > 0 && fiber_cannot_be_marshalled(env->as.fiber)) {
  ------------------
  |  Branch (20584:9): [True: 0, False: 12.7k]
  |  Branch (20584:28): [True: 0, False: 0]
  ------------------
20585|      0|        pushint(st, 0);
20586|      0|        pushint(st, env->length);
20587|      0|        Janet *values = env->as.fiber->data + env->offset;
20588|      0|        uint32_t *bitset = janet_stack_frame(values)->func->def->closure_bitset;
  ------------------
  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
20589|      0|        for (int32_t i = 0; i < env->length; i++) {
  ------------------
  |  Branch (20589:29): [True: 0, False: 0]
  ------------------
20590|      0|            if (1 & (bitset[i >> 5] >> (i & 0x1F))) {
  ------------------
  |  Branch (20590:17): [True: 0, False: 0]
  ------------------
20591|      0|                marshal_one(st, values[i], flags + 1);
20592|      0|            } else {
20593|      0|                pushbyte(st, LB_NIL);
20594|      0|            }
20595|      0|        }
20596|  12.7k|    } else {
20597|  12.7k|        janet_env_maybe_detach(env);
20598|  12.7k|        pushint(st, env->offset);
20599|  12.7k|        pushint(st, env->length);
20600|  12.7k|        if (env->offset > 0) {
  ------------------
  |  Branch (20600:13): [True: 0, False: 12.7k]
  ------------------
20601|       |            /* On stack variant */
20602|      0|            marshal_one(st, janet_wrap_fiber(env->as.fiber), flags + 1);
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20603|  12.7k|        } else {
20604|       |            /* Off stack variant */
20605|   158k|            for (int32_t i = 0; i < env->length; i++)
  ------------------
  |  Branch (20605:33): [True: 145k, False: 12.7k]
  ------------------
20606|   145k|                marshal_one(st, env->as.values[i], flags + 1);
20607|  12.7k|        }
20608|  12.7k|    }
20609|  12.7k|}
janet.c:marshal_one_fiber:
20699|  1.59k|static void marshal_one_fiber(MarshalState *st, JanetFiber *fiber, int flags) {
20700|  1.59k|    MARSH_STACKCHECK;
  ------------------
  |  |20555|  1.59k|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  296|  1.59k|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (20555:30): [True: 0, False: 1.59k]
  |  |  ------------------
  ------------------
20701|  1.59k|    int32_t fflags = fiber->flags;
20702|  1.59k|    if (fiber->child) fflags |= JANET_FIBER_FLAG_HASCHILD;
  ------------------
  |  |20694|      0|#define JANET_FIBER_FLAG_HASCHILD (1 << 29)
  ------------------
  |  Branch (20702:9): [True: 0, False: 1.59k]
  ------------------
20703|  1.59k|    if (fiber->env) fflags |= JANET_FIBER_FLAG_HASENV;
  ------------------
  |  |20695|  1.59k|#define JANET_FIBER_FLAG_HASENV   (1 << 30)
  ------------------
  |  Branch (20703:9): [True: 1.59k, False: 0]
  ------------------
20704|  1.59k|    if (janet_fiber_status(fiber) == JANET_STATUS_ALIVE)
  ------------------
  |  Branch (20704:9): [True: 1, False: 1.59k]
  ------------------
20705|      1|        janet_panic("cannot marshal alive fiber");
20706|  1.59k|    pushint(st, fflags);
20707|  1.59k|    pushint(st, fiber->frame);
20708|  1.59k|    pushint(st, fiber->stackstart);
20709|  1.59k|    pushint(st, fiber->stacktop);
20710|  1.59k|    pushint(st, fiber->maxstack);
20711|       |    /* Do frames */
20712|  1.59k|    int32_t i = fiber->frame;
20713|  1.59k|    int32_t j = fiber->stackstart - JANET_FRAME_SIZE;
  ------------------
  |  | 1026|  1.59k|#define JANET_FRAME_SIZE 4
  ------------------
20714|  3.19k|    while (i > 0) {
  ------------------
  |  Branch (20714:12): [True: 1.59k, False: 1.59k]
  ------------------
20715|  1.59k|        JanetStackFrame *frame = (JanetStackFrame *)(fiber->data + i - JANET_FRAME_SIZE);
  ------------------
  |  | 1026|  1.59k|#define JANET_FRAME_SIZE 4
  ------------------
20716|  1.59k|        if (frame->env) frame->flags |= JANET_STACKFRAME_HASENV;
  ------------------
  |  |20696|      0|#define JANET_STACKFRAME_HASENV   (INT32_MIN)
  ------------------
  |  Branch (20716:13): [True: 0, False: 1.59k]
  ------------------
20717|  1.59k|        if (!frame->func) janet_panicf("cannot marshal fiber with c stackframe (%v)", janet_wrap_cfunction((JanetCFunction) frame->pc));
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (20717:13): [True: 0, False: 1.59k]
  ------------------
20718|  1.59k|        pushint(st, frame->flags);
20719|  1.59k|        pushint(st, frame->prevframe);
20720|  1.59k|        int32_t pcdiff = (int32_t)(frame->pc - frame->func->def->bytecode);
20721|  1.59k|        pushint(st, pcdiff);
20722|  1.59k|        marshal_one(st, janet_wrap_function(frame->func), flags + 1);
  ------------------
  |  |  852|  1.59k|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  825|  1.59k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.59k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.59k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20723|  1.59k|        if (frame->env) marshal_one_env(st, frame->env, flags + 1);
  ------------------
  |  Branch (20723:13): [True: 0, False: 1.59k]
  ------------------
20724|       |        /* Marshal all values in the stack frame */
20725|  63.2k|        for (int32_t k = i; k < j; k++)
  ------------------
  |  Branch (20725:29): [True: 61.6k, False: 1.59k]
  ------------------
20726|  61.6k|            marshal_one(st, fiber->data[k], flags + 1);
20727|  1.59k|        j = i - JANET_FRAME_SIZE;
  ------------------
  |  | 1026|  1.59k|#define JANET_FRAME_SIZE 4
  ------------------
20728|  1.59k|        i = frame->prevframe;
20729|  1.59k|    }
20730|  1.59k|    if (fiber->env) {
  ------------------
  |  Branch (20730:9): [True: 1.59k, False: 0]
  ------------------
20731|  1.59k|        marshal_one(st, janet_wrap_table(fiber->env), flags + 1);
  ------------------
  |  |  846|  1.59k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|  1.59k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.59k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.59k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20732|  1.59k|    }
20733|  1.59k|    if (fiber->child)
  ------------------
  |  Branch (20733:9): [True: 0, False: 1.59k]
  ------------------
20734|      0|        marshal_one(st, janet_wrap_fiber(fiber->child), flags + 1);
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20735|  1.59k|    marshal_one(st, fiber->last_value, flags + 1);
20736|  1.59k|}
janet.c:readint:
21088|   879M|static int32_t readint(UnmarshalState *st, const uint8_t **atdata) {
21089|   879M|    const uint8_t *data = *atdata;
21090|   879M|    int32_t ret;
21091|   879M|    MARSH_EOS(st, data);
  ------------------
  |  |21083|   879M|#define MARSH_EOS(st, data) do { \
  |  |21084|   879M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 0, False: 879M]
  |  |  ------------------
  |  |21085|   879M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 879M]
  |  |  ------------------
  ------------------
21092|   879M|    if (*data < 128) {
  ------------------
  |  Branch (21092:9): [True: 740M, False: 139M]
  ------------------
21093|   740M|        ret = *data++;
21094|   740M|    } else if (*data < 192) {
  ------------------
  |  Branch (21094:16): [True: 132M, False: 6.69M]
  ------------------
21095|   132M|        MARSH_EOS(st, data + 1);
  ------------------
  |  |21083|   132M|#define MARSH_EOS(st, data) do { \
  |  |21084|   132M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 1, False: 132M]
  |  |  ------------------
  |  |21085|   132M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 132M]
  |  |  ------------------
  ------------------
21096|   132M|        uint32_t uret = ((data[0] & 0x3F) << 8) + data[1];
21097|       |        /* Sign extend 18 MSBs */
21098|   132M|        uret |= (uret >> 13) ? 0xFFFFC000 : 0;
  ------------------
  |  Branch (21098:17): [True: 33.2M, False: 99.3M]
  ------------------
21099|   132M|        ret = (int32_t)uret;
21100|   132M|        data += 2;
21101|   132M|    } else if (*data == LB_INTEGER) {
  ------------------
  |  Branch (21101:16): [True: 7.06M, False: 18.4E]
  ------------------
21102|  7.06M|        MARSH_EOS(st, data + 4);
  ------------------
  |  |21083|  7.06M|#define MARSH_EOS(st, data) do { \
  |  |21084|  7.06M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 0, False: 7.06M]
  |  |  ------------------
  |  |21085|  7.06M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 7.06M]
  |  |  ------------------
  ------------------
21103|  7.06M|        uint32_t ui = ((uint32_t)(data[1]) << 24) |
21104|  7.06M|                      ((uint32_t)(data[2]) << 16) |
21105|  7.06M|                      ((uint32_t)(data[3]) << 8) |
21106|  7.06M|                      (uint32_t)(data[4]);
21107|  7.06M|        ret = (int32_t)ui;
21108|  7.06M|        data += 5;
21109|  18.4E|    } else {
21110|  18.4E|        janet_panicf("expected integer, got byte %x at index %d",
21111|  18.4E|                     *data,
21112|  18.4E|                     data - st->start);
21113|      0|        ret = 0;
21114|      0|    }
21115|   879M|    *atdata = data;
21116|   879M|    return ret;
21117|   879M|}
janet.c:read64:
21129|  4.87k|static uint64_t read64(UnmarshalState *st, const uint8_t **atdata) {
21130|  4.87k|    uint64_t ret;
21131|  4.87k|    const uint8_t *data = *atdata;
21132|  4.87k|    MARSH_EOS(st, data);
  ------------------
  |  |21083|  4.87k|#define MARSH_EOS(st, data) do { \
  |  |21084|  4.87k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 0, False: 4.87k]
  |  |  ------------------
  |  |21085|  4.87k|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 4.87k]
  |  |  ------------------
  ------------------
21133|  4.87k|    if (*data <= 0xF0) {
  ------------------
  |  Branch (21133:9): [True: 61, False: 4.81k]
  ------------------
21134|       |        /* Single byte */
21135|     61|        ret = *data;
21136|     61|        *atdata = data + 1;
21137|  4.81k|    } else {
21138|       |        /* Multibyte, little endian */
21139|  4.81k|        int nbytes = *data - 0xF0;
21140|  4.81k|        ret = 0;
21141|  4.81k|        if (nbytes > 8) janet_panic("invalid 64 bit integer");
  ------------------
  |  Branch (21141:13): [True: 0, False: 4.81k]
  ------------------
21142|  4.81k|        MARSH_EOS(st, data + nbytes);
  ------------------
  |  |21083|  4.81k|#define MARSH_EOS(st, data) do { \
  |  |21084|  4.81k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 0, False: 4.81k]
  |  |  ------------------
  |  |21085|  4.81k|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 4.81k]
  |  |  ------------------
  ------------------
21143|  14.5k|        for (int i = nbytes; i > 0; i--)
  ------------------
  |  Branch (21143:30): [True: 9.70k, False: 4.81k]
  ------------------
21144|  9.70k|            ret = (ret << 8) + data[i];
21145|  4.81k|        *atdata = data + nbytes + 1;
21146|  4.81k|    }
21147|  4.87k|    return ret;
21148|  4.87k|}
janet.c:unmarshal_one:
21710|   408M|    int flags) {
21711|   408M|    uint8_t lead;
21712|   408M|    MARSH_STACKCHECK;
  ------------------
  |  |20555|   408M|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  296|   408M|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (20555:30): [True: 1, False: 408M]
  |  |  ------------------
  ------------------
21713|   408M|    MARSH_EOS(st, data);
  ------------------
  |  |21083|   408M|#define MARSH_EOS(st, data) do { \
  |  |21084|   408M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 14, False: 408M]
  |  |  ------------------
  |  |21085|   408M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 408M]
  |  |  ------------------
  ------------------
21714|   408M|    lead = data[0];
21715|   408M|    if (lead < LB_REAL) {
  ------------------
  |  Branch (21715:9): [True: 213M, False: 195M]
  ------------------
21716|   213M|        *out = janet_wrap_integer(readint(st, &data));
  ------------------
  |  |  967|   213M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|   213M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
21717|   213M|        return data;
21718|   213M|    }
21719|   195M|    switch (lead) {
21720|   615k|        case LB_NIL:
  ------------------
  |  Branch (21720:9): [True: 615k, False: 195M]
  ------------------
21721|   615k|            *out = janet_wrap_nil();
  ------------------
  |  |  831|   615k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   615k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   615k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   615k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21722|   615k|            return data + 1;
21723|  23.3M|        case LB_FALSE:
  ------------------
  |  Branch (21723:9): [True: 23.3M, False: 172M]
  ------------------
21724|  23.3M|            *out = janet_wrap_false();
  ------------------
  |  |  833|  23.3M|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|  23.3M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  23.3M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  23.3M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21725|  23.3M|            return data + 1;
21726|  1.58M|        case LB_TRUE:
  ------------------
  |  Branch (21726:9): [True: 1.58M, False: 194M]
  ------------------
21727|  1.58M|            *out = janet_wrap_true();
  ------------------
  |  |  832|  1.58M|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  822|  1.58M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.58M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.58M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21728|  1.58M|            return data + 1;
21729|  40.6k|        case LB_INTEGER:
  ------------------
  |  Branch (21729:9): [True: 40.6k, False: 195M]
  ------------------
21730|       |            /* Long integer */
21731|  40.6k|            MARSH_EOS(st, data + 4);
  ------------------
  |  |21083|  40.6k|#define MARSH_EOS(st, data) do { \
  |  |21084|  40.6k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 0, False: 40.6k]
  |  |  ------------------
  |  |21085|  40.6k|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 40.6k]
  |  |  ------------------
  ------------------
21732|  40.6k|            uint32_t ui = ((uint32_t)(data[4])) |
21733|  40.6k|                          ((uint32_t)(data[3]) << 8) |
21734|  40.6k|                          ((uint32_t)(data[2]) << 16) |
21735|  40.6k|                          ((uint32_t)(data[1]) << 24);
21736|  40.6k|            int32_t si = (int32_t)ui;
21737|  40.6k|            *out = janet_wrap_integer(si);
  ------------------
  |  |  967|  40.6k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  40.6k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
21738|  40.6k|            return data + 5;
21739|  94.2k|        case LB_REAL:
  ------------------
  |  Branch (21739:9): [True: 94.2k, False: 195M]
  ------------------
21740|       |            /* Real */
21741|  94.2k|        {
21742|  94.2k|            union {
21743|  94.2k|                double d;
21744|  94.2k|                uint8_t bytes[8];
21745|  94.2k|            } u;
21746|  94.2k|            MARSH_EOS(st, data + 8);
  ------------------
  |  |21083|  94.2k|#define MARSH_EOS(st, data) do { \
  |  |21084|  94.2k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 5, False: 94.2k]
  |  |  ------------------
  |  |21085|  94.2k|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 94.2k]
  |  |  ------------------
  ------------------
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|  94.2k|            memcpy(&u.bytes, data + 1, sizeof(double));
21758|  94.2k|#endif
21759|  94.2k|            *out = janet_wrap_number_safe(u.d);
21760|  94.2k|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  734|  94.2k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  94.2k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  94.2k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  91.5k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  91.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|  91.5k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  91.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 2.68k, False: 91.5k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 7.85k, False: 83.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  10.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|  94.2k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  94.2k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21761|  94.2k|            return data + 9;
21762|  94.2k|        }
21763|  14.7M|        case LB_STRING:
  ------------------
  |  Branch (21763:9): [True: 14.7M, False: 181M]
  ------------------
21764|  33.5M|        case LB_SYMBOL:
  ------------------
  |  Branch (21764:9): [True: 18.8M, False: 177M]
  ------------------
21765|  33.6M|        case LB_BUFFER:
  ------------------
  |  Branch (21765:9): [True: 72.4k, False: 195M]
  ------------------
21766|  36.0M|        case LB_KEYWORD:
  ------------------
  |  Branch (21766:9): [True: 2.38M, False: 193M]
  ------------------
21767|  39.0M|        case LB_REGISTRY: {
  ------------------
  |  Branch (21767:9): [True: 2.96M, False: 192M]
  ------------------
21768|  39.0M|            data++;
21769|  39.0M|            int32_t len = readnat(st, &data);
21770|  39.0M|            MARSH_EOS(st, data - 1 + len);
  ------------------
  |  |21083|  39.0M|#define MARSH_EOS(st, data) do { \
  |  |21084|  39.0M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 5, False: 39.0M]
  |  |  ------------------
  |  |21085|  39.0M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 39.0M]
  |  |  ------------------
  ------------------
21771|  39.0M|            if (lead == LB_STRING) {
  ------------------
  |  Branch (21771:17): [True: 14.7M, False: 24.2M]
  ------------------
21772|  14.7M|                const uint8_t *str = janet_string(data, len);
21773|  14.7M|                *out = janet_wrap_string(str);
  ------------------
  |  |  848|  14.7M|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  14.7M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  14.7M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  14.7M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21774|  24.2M|            } else if (lead == LB_SYMBOL) {
  ------------------
  |  Branch (21774:24): [True: 18.8M, False: 5.42M]
  ------------------
21775|  18.8M|                const uint8_t *str = janet_symbol(data, len);
21776|  18.8M|                *out = janet_wrap_symbol(str);
  ------------------
  |  |  849|  18.8M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|  18.8M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  18.8M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  18.8M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21777|  18.8M|            } else if (lead == LB_KEYWORD) {
  ------------------
  |  Branch (21777:24): [True: 2.38M, False: 3.03M]
  ------------------
21778|  2.38M|                const uint8_t *str = janet_keyword(data, len);
  ------------------
  |  | 1840|  2.38M|#define janet_keyword janet_symbol
  ------------------
21779|  2.38M|                *out = janet_wrap_keyword(str);
  ------------------
  |  |  850|  2.38M|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  ------------------
  |  |  |  |  828|  2.38M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.38M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.38M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21780|  3.03M|            } else if (lead == LB_REGISTRY) {
  ------------------
  |  Branch (21780:24): [True: 2.96M, False: 71.4k]
  ------------------
21781|  2.96M|                if (st->reg) {
  ------------------
  |  Branch (21781:21): [True: 2.95M, False: 4.80k]
  ------------------
21782|  2.95M|                    Janet regkey = janet_symbolv(data, len);
  ------------------
  |  | 1836|  2.95M|#define janet_symbolv(str, len) janet_wrap_symbol(janet_symbol((str), (len)))
  |  |  ------------------
  |  |  |  |  849|  2.95M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  2.95M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  2.95M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  2.95M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21783|  2.95M|                    *out = janet_table_get(st->reg, regkey);
21784|  2.95M|                } else {
21785|  4.80k|                    *out = janet_wrap_nil();
  ------------------
  |  |  831|  4.80k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  4.80k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.80k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.80k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21786|  4.80k|                }
21787|  2.96M|            } else { /* (lead == LB_BUFFER) */
21788|  71.4k|                JanetBuffer *buffer = janet_buffer(len);
21789|  71.4k|                buffer->count = len;
21790|  71.4k|                safe_memcpy(buffer->data, data, len);
21791|  71.4k|                *out = janet_wrap_buffer(buffer);
  ------------------
  |  |  847|  71.4k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|  71.4k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  71.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  71.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21792|  71.4k|            }
21793|  39.0M|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  734|  39.0M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  39.0M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  39.0M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  39.0M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  39.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|  39.0M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  39.0M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 3.71k, False: 39.0M]
  |  |  |  |  |  |  |  Branch (745:50): [True: 255k, False: 38.7M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|   255k|#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|  39.0M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  39.0M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21794|  39.0M|            return data + len;
21795|  39.0M|        }
21796|  12.7k|        case LB_FIBER: {
  ------------------
  |  Branch (21796:9): [True: 12.7k, False: 195M]
  ------------------
21797|  12.7k|            JanetFiber *fiber;
21798|  12.7k|            data = unmarshal_one_fiber(st, data + 1, &fiber, flags + 1);
21799|  12.7k|            *out = janet_wrap_fiber(fiber);
  ------------------
  |  |  844|  12.7k|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|  12.7k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  12.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  12.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21800|  12.7k|            return data;
21801|  39.0M|        }
21802|  3.80M|        case LB_FUNCTION: {
  ------------------
  |  Branch (21802:9): [True: 3.80M, False: 192M]
  ------------------
21803|  3.80M|            JanetFunction *func;
21804|  3.80M|            JanetFuncDef *def;
21805|  3.80M|            data++;
21806|  3.80M|            int32_t len = readnat(st, &data);
21807|  3.80M|            if (len > 255) {
  ------------------
  |  Branch (21807:17): [True: 0, False: 3.80M]
  ------------------
21808|      0|                janet_panicf("invalid function - too many environments (%d)", len);
21809|      0|            }
21810|  3.80M|            func = janet_gcalloc(JANET_MEMORY_FUNCTION, sizeof(JanetFunction) +
21811|  3.80M|                                 len * sizeof(JanetFuncEnv));
21812|  3.80M|            func->def = NULL;
21813|  4.23M|            for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21813:33): [True: 428k, False: 3.80M]
  ------------------
21814|   428k|                func->envs[i] = NULL;
21815|   428k|            }
21816|  3.80M|            *out = janet_wrap_function(func);
  ------------------
  |  |  852|  3.80M|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  825|  3.80M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.80M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.80M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21817|  3.80M|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  734|  3.80M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  3.80M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  3.80M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  3.80M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  3.80M|#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.80M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  3.80M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 795, False: 3.80M]
  |  |  |  |  |  |  |  Branch (745:50): [True: 2.47k, False: 3.80M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  3.30k|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  743|  3.80M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  3.80M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21818|  3.80M|            data = unmarshal_one_def(st, data, &def, flags + 1);
21819|  3.80M|            if (def->environments_length != len) {
  ------------------
  |  Branch (21819:17): [True: 0, False: 3.80M]
  ------------------
21820|      0|                janet_panicf("invalid function - env count %d does not match funcdef (%d)",
21821|      0|                             len, def->environments_length);
21822|      0|            }
21823|  3.80M|            func->def = def;
21824|  4.23M|            for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21824:33): [True: 427k, False: 3.80M]
  ------------------
21825|   427k|                data = unmarshal_one_env(st, data, &(func->envs[i]), flags + 1);
21826|   427k|            }
21827|  3.80M|            return data;
21828|  3.80M|        }
21829|  5.13k|        case LB_ABSTRACT: {
  ------------------
  |  Branch (21829:9): [True: 5.13k, False: 195M]
  ------------------
21830|  5.13k|            data++;
21831|  5.13k|            return unmarshal_one_abstract(st, data, out, flags);
21832|  3.80M|        }
21833|   109M|        case LB_REFERENCE:
  ------------------
  |  Branch (21833:9): [True: 109M, False: 86.6M]
  ------------------
21834|   109M|        case LB_ARRAY:
  ------------------
  |  Branch (21834:9): [True: 36.3k, False: 195M]
  ------------------
21835|   110M|        case LB_ARRAY_WEAK:
  ------------------
  |  Branch (21835:9): [True: 1.07M, False: 194M]
  ------------------
21836|   117M|        case LB_TUPLE:
  ------------------
  |  Branch (21836:9): [True: 7.51M, False: 188M]
  ------------------
21837|   117M|        case LB_STRUCT:
  ------------------
  |  Branch (21837:9): [True: 139k, False: 195M]
  ------------------
21838|   117M|        case LB_STRUCT_PROTO:
  ------------------
  |  Branch (21838:9): [True: 531, False: 195M]
  ------------------
21839|   125M|        case LB_TABLE:
  ------------------
  |  Branch (21839:9): [True: 8.01M, False: 187M]
  ------------------
21840|   125M|        case LB_TABLE_PROTO:
  ------------------
  |  Branch (21840:9): [True: 2.50k, False: 195M]
  ------------------
21841|   126M|        case LB_TABLE_WEAKK:
  ------------------
  |  Branch (21841:9): [True: 102k, False: 195M]
  ------------------
21842|   126M|        case LB_TABLE_WEAKV:
  ------------------
  |  Branch (21842:9): [True: 516k, False: 195M]
  ------------------
21843|   126M|        case LB_TABLE_WEAKKV:
  ------------------
  |  Branch (21843:9): [True: 258k, False: 195M]
  ------------------
21844|   126M|        case LB_TABLE_WEAKK_PROTO:
  ------------------
  |  Branch (21844:9): [True: 37.5k, False: 195M]
  ------------------
21845|   126M|        case LB_TABLE_WEAKV_PROTO:
  ------------------
  |  Branch (21845:9): [True: 1.31k, False: 195M]
  ------------------
21846|   126M|        case LB_TABLE_WEAKKV_PROTO:
  ------------------
  |  Branch (21846:9): [True: 1.32k, False: 195M]
  ------------------
21847|       |            /* Things that open with integers */
21848|   126M|        {
21849|   126M|            data++;
21850|   126M|            int32_t len = readnat(st, &data);
21851|       |            /* DOS check */
21852|   126M|            if (lead != LB_REFERENCE) {
  ------------------
  |  Branch (21852:17): [True: 17.6M, False: 109M]
  ------------------
21853|  17.6M|                MARSH_EOS(st, data - 1 + len);
  ------------------
  |  |21083|  17.6M|#define MARSH_EOS(st, data) do { \
  |  |21084|  17.6M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 11, False: 17.6M]
  |  |  ------------------
  |  |21085|  17.6M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 17.6M]
  |  |  ------------------
  ------------------
21854|  17.6M|            }
21855|   126M|            if (lead == LB_ARRAY || lead == LB_ARRAY_WEAK) {
  ------------------
  |  Branch (21855:17): [True: 49.5k, False: 126M]
  |  Branch (21855:37): [True: 1.07M, False: 125M]
  ------------------
21856|       |                /* Array */
21857|  1.10M|                JanetArray *array = (lead == LB_ARRAY_WEAK) ? janet_array_weak(len) : janet_array(len);
  ------------------
  |  Branch (21857:37): [True: 1.07M, False: 36.3k]
  ------------------
21858|  1.10M|                array->count = len;
21859|  1.10M|                *out = janet_wrap_array(array);
  ------------------
  |  |  845|  1.10M|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  1.10M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.10M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.10M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21860|  1.10M|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  734|  1.10M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  1.10M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  1.10M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  1.10M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  1.10M|#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.10M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  1.10M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 7.22k, False: 1.10M]
  |  |  |  |  |  |  |  Branch (745:50): [True: 612k, False: 488k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|   619k|#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.10M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.10M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21861|  76.5M|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21861:37): [True: 75.4M, False: 1.10M]
  ------------------
21862|  75.4M|                    data = unmarshal_one(st, data, array->data + i, flags + 1);
21863|  75.4M|                }
21864|   125M|            } else if (lead == LB_TUPLE) {
  ------------------
  |  Branch (21864:24): [True: 7.51M, False: 118M]
  ------------------
21865|       |                /* Tuple */
21866|  7.51M|                Janet *tup = janet_tuple_begin(len);
21867|  7.51M|                int32_t flag = readint(st, &data);
21868|  7.51M|                janet_tuple_flag(tup) |= (int32_t)(((uint32_t) flag) << 16);  /* Avoid left shift of negative value */
  ------------------
  |  | 1806|  7.51M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  7.51M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
21869|  32.0M|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21869:37): [True: 24.5M, False: 7.51M]
  ------------------
21870|  24.5M|                    data = unmarshal_one(st, data, tup + i, flags + 1);
21871|  24.5M|                }
21872|  7.51M|                *out = janet_wrap_tuple(janet_tuple_end(tup));
  ------------------
  |  |  843|  7.51M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  7.51M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.51M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.51M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21873|  7.51M|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  734|  7.51M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  7.51M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  7.51M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  7.51M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  7.51M|#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|  7.51M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  7.51M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 18.4E, False: 7.51M]
  |  |  |  |  |  |  |  Branch (745:50): [True: 6.07k, False: 7.51M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  6.11k|#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|  7.51M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  7.51M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21874|   118M|            } else if (lead == LB_STRUCT || lead == LB_STRUCT_PROTO) {
  ------------------
  |  Branch (21874:24): [True: 142k, False: 118M]
  |  Branch (21874:45): [True: 188, False: 118M]
  ------------------
21875|       |                /* Struct */
21876|   140k|                JanetKV *struct_ = janet_struct_begin(len);
21877|   140k|                if (lead == LB_STRUCT_PROTO) {
  ------------------
  |  Branch (21877:21): [True: 531, False: 139k]
  ------------------
21878|    531|                    Janet proto;
21879|    531|                    data = unmarshal_one(st, data, &proto, flags + 1);
21880|    531|                    janet_asserttype(proto, JANET_STRUCT, st);
21881|    531|                    janet_struct_proto(struct_) = janet_unwrap_struct(proto);
  ------------------
  |  | 1851|    531|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|    531|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                                  janet_struct_proto(struct_) = janet_unwrap_struct(proto);
  ------------------
  |  |  857|    531|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
21882|    531|                }
21883|  2.86M|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21883:37): [True: 2.72M, False: 140k]
  ------------------
21884|  2.72M|                    Janet key, value;
21885|  2.72M|                    data = unmarshal_one(st, data, &key, flags + 1);
21886|  2.72M|                    data = unmarshal_one(st, data, &value, flags + 1);
21887|  2.72M|                    janet_struct_put(struct_, key, value);
21888|  2.72M|                }
21889|   140k|                *out = janet_wrap_struct(janet_struct_end(struct_));
  ------------------
  |  |  842|   140k|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|   140k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   140k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   140k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21890|   140k|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  734|   140k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|   140k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|   140k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|   140k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|   140k|#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|   140k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|   140k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 96, False: 140k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 39.1k, False: 101k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  39.2k|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  743|   140k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   140k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21891|   118M|            } else if (lead == LB_REFERENCE) {
  ------------------
  |  Branch (21891:24): [True: 109M, False: 8.92M]
  ------------------
21892|   109M|                if (len >= janet_v_count(st->lookup))
  ------------------
  |  |  736|  18.4E|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   109M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   109M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 109M, False: 18.4E]
  |  |  ------------------
  ------------------
  |  Branch (21892:21): [True: 3, False: 109M]
  ------------------
21893|      3|                    janet_panicf("invalid reference %d", len);
21894|   109M|                *out = st->lookup[len];
21895|   109M|            } else {
21896|       |                /* Table */
21897|  8.92M|                JanetTable *t;
21898|  8.92M|                if (lead == LB_TABLE_WEAKK_PROTO || lead == LB_TABLE_WEAKK) {
  ------------------
  |  Branch (21898:21): [True: 28.9k, False: 8.89M]
  |  Branch (21898:53): [True: 102k, False: 8.79M]
  ------------------
21899|   139k|                    t = janet_table_weakk(len);
21900|  8.79M|                } else if (lead == LB_TABLE_WEAKV_PROTO || lead == LB_TABLE_WEAKV) {
  ------------------
  |  Branch (21900:28): [True: 18.4E, False: 8.79M]
  |  Branch (21900:60): [True: 516k, False: 8.27M]
  ------------------
21901|   517k|                    t = janet_table_weakv(len);
21902|  8.27M|                } else if (lead == LB_TABLE_WEAKKV_PROTO || lead == LB_TABLE_WEAKKV) {
  ------------------
  |  Branch (21902:28): [True: 18.4E, False: 8.27M]
  |  Branch (21902:61): [True: 258k, False: 8.01M]
  ------------------
21903|   259k|                    t = janet_table_weakkv(len);
21904|  8.00M|                } else {
21905|  8.00M|                    t = janet_table(len);
21906|  8.00M|                }
21907|  8.92M|                *out = janet_wrap_table(t);
  ------------------
  |  |  846|  8.92M|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|  8.92M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.92M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.92M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21908|  8.92M|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  734|  8.92M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  8.92M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  8.92M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  8.35M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  8.35M|#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|  8.35M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  8.35M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 566k, False: 8.35M]
  |  |  |  |  |  |  |  Branch (745:50): [True: 901k, False: 7.45M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  1.47M|#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|  8.92M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  8.92M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21909|  8.92M|                if (lead == LB_TABLE_PROTO || lead == LB_TABLE_WEAKK_PROTO || lead == LB_TABLE_WEAKV_PROTO || lead == LB_TABLE_WEAKKV_PROTO) {
  ------------------
  |  Branch (21909:21): [True: 18.4E, False: 8.92M]
  |  Branch (21909:47): [True: 37.5k, False: 8.89M]
  |  Branch (21909:79): [True: 1.30k, False: 8.88M]
  |  Branch (21909:111): [True: 1.31k, False: 8.88M]
  ------------------
21910|  42.6k|                    Janet proto;
21911|  42.6k|                    data = unmarshal_one(st, data, &proto, flags + 1);
21912|  42.6k|                    janet_asserttype(proto, JANET_TABLE, st);
21913|  42.6k|                    t->proto = janet_unwrap_table(proto);
  ------------------
  |  |  861|  42.6k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
21914|  42.6k|                }
21915|   118M|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (21915:37): [True: 109M, False: 8.92M]
  ------------------
21916|   109M|                    Janet key, value;
21917|   109M|                    data = unmarshal_one(st, data, &key, flags + 1);
21918|   109M|                    data = unmarshal_one(st, data, &value, flags + 1);
21919|   109M|                    janet_table_put(t, key, value);
21920|   109M|                }
21921|  8.92M|            }
21922|   126M|            return data;
21923|   126M|        }
21924|  18.1k|        case LB_UNSAFE_POINTER: {
  ------------------
  |  Branch (21924:9): [True: 18.1k, False: 195M]
  ------------------
21925|  18.1k|            MARSH_EOS(st, data + sizeof(void *));
  ------------------
  |  |21083|  18.1k|#define MARSH_EOS(st, data) do { \
  |  |21084|  18.1k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 2, False: 18.1k]
  |  |  ------------------
  |  |21085|  18.1k|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 18.1k]
  |  |  ------------------
  ------------------
21926|  18.1k|            data++;
21927|  18.1k|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1911|  18.1k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (21927:17): [True: 0, False: 18.1k]
  ------------------
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|  18.1k|            union {
21933|  18.1k|                void *ptr;
21934|  18.1k|                uint8_t bytes[sizeof(void *)];
21935|  18.1k|            } u;
21936|  18.1k|            memcpy(u.bytes, data, sizeof(void *));
21937|  18.1k|            data += sizeof(void *);
21938|  18.1k|            *out = janet_wrap_pointer(u.ptr);
  ------------------
  |  |  854|  18.1k|#define janet_wrap_pointer(s) janet_nanbox_wrap_((s), JANET_POINTER)
  |  |  ------------------
  |  |  |  |  825|  18.1k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  18.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  18.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21939|  18.1k|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  734|  18.1k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  18.1k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  18.1k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|  18.1k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  18.1k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 0, False: 18.1k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 2.01k, False: 16.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  2.01k|#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|  18.1k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  18.1k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21940|  18.1k|            return data;
21941|  18.1k|        }
21942|      0|#ifdef JANET_EV
21943|      2|        case LB_POINTER_BUFFER: {
  ------------------
  |  Branch (21943:9): [True: 2, False: 195M]
  ------------------
21944|      2|            data++;
21945|      2|            int32_t count = readnat(st, &data);
21946|      2|            int32_t capacity = readnat(st, &data);
21947|      2|            MARSH_EOS(st, data + sizeof(void *));
  ------------------
  |  |21083|      2|#define MARSH_EOS(st, data) do { \
  |  |21084|      2|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 0, False: 2]
  |  |  ------------------
  |  |21085|      2|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 2]
  |  |  ------------------
  ------------------
21948|      2|            union {
21949|      2|                void *ptr;
21950|      2|                uint8_t bytes[sizeof(void *)];
21951|      2|            } u;
21952|      2|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1911|      2|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (21952:17): [True: 1, False: 1]
  ------------------
21953|      1|                janet_panicf("unsafe flag not given, "
21954|      1|                             "will not unmarshal raw pointer at index %d",
21955|      1|                             (int)(data - st->start));
21956|      1|            }
21957|      1|            memcpy(u.bytes, data, sizeof(void *));
21958|      1|            data += sizeof(void *);
21959|      1|            JanetBuffer *buffer = janet_pointer_buffer_unsafe(u.ptr, capacity, count);
21960|      1|            *out = janet_wrap_buffer(buffer);
  ------------------
  |  |  847|      1|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|      1|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21961|      1|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  734|      1|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|      1|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|      1|#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: 1, 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|      1|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|      1|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21962|      1|            return data;
21963|      2|        }
21964|      0|#endif
21965|   562k|        case LB_UNSAFE_CFUNCTION: {
  ------------------
  |  Branch (21965:9): [True: 562k, False: 195M]
  ------------------
21966|   562k|            MARSH_EOS(st, data + sizeof(JanetCFunction));
  ------------------
  |  |21083|   562k|#define MARSH_EOS(st, data) do { \
  |  |21084|   562k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 1, False: 562k]
  |  |  ------------------
  |  |21085|   562k|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 562k]
  |  |  ------------------
  ------------------
21967|   562k|            data++;
21968|   562k|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1911|   562k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (21968:17): [True: 0, False: 562k]
  ------------------
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|   562k|            union {
21974|   562k|                JanetCFunction ptr;
21975|   562k|                uint8_t bytes[sizeof(JanetCFunction)];
21976|   562k|            } u;
21977|   562k|            memcpy(u.bytes, data, sizeof(JanetCFunction));
21978|   562k|            data += sizeof(JanetCFunction);
21979|   562k|            *out = janet_wrap_cfunction(u.ptr);
  ------------------
  |  |  853|   562k|#define janet_wrap_cfunction(s) janet_nanbox_wrap_((s), JANET_CFUNCTION)
  |  |  ------------------
  |  |  |  |  825|   562k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   562k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   562k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21980|   562k|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  734|   562k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|   562k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|   562k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|   562k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|   562k|#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|   562k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|   562k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 7, False: 562k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 2.64k, False: 559k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  2.65k|#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|   562k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   562k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21981|   562k|            return data;
21982|   562k|        }
21983|      0|#ifdef JANET_EV
21984|      1|        case LB_THREADED_ABSTRACT: {
  ------------------
  |  Branch (21984:9): [True: 1, False: 195M]
  ------------------
21985|      1|            MARSH_EOS(st, data + sizeof(void *));
  ------------------
  |  |21083|      1|#define MARSH_EOS(st, data) do { \
  |  |21084|      1|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 0, False: 1]
  |  |  ------------------
  |  |21085|      1|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 1]
  |  |  ------------------
  ------------------
21986|      1|            data++;
21987|      1|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1911|      1|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (21987:17): [True: 1, False: 0]
  ------------------
21988|      1|                janet_panicf("unsafe flag not given, "
21989|      1|                             "will not unmarshal threaded abstract pointer at index %d",
21990|      1|                             (int)(data - st->start));
21991|      1|            }
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|      1|        }
22018|      0|#endif
22019|     25|        default: {
  ------------------
  |  Branch (22019:9): [True: 25, False: 195M]
  ------------------
22020|     25|            janet_panicf("unknown byte %x at index %d",
22021|     25|                         *data,
22022|     25|                         (int)(data - st->start));
22023|      0|            return NULL;
22024|      1|        }
22025|   195M|    }
22026|   195M|}
janet.c:readnat:
21120|   212M|static int32_t readnat(UnmarshalState *st, const uint8_t **atdata) {
21121|   212M|    int32_t ret = readint(st, atdata);
21122|   212M|    if (ret < 0) {
  ------------------
  |  Branch (21122:9): [True: 41, False: 212M]
  ------------------
21123|     41|        janet_panicf("expected integer >= 0, got %d", ret);
21124|     41|    }
21125|   212M|    return ret;
21126|   212M|}
janet.c:unmarshal_one_fiber:
21444|  12.7k|    int flags) {
21445|       |
21446|       |    /* Initialize a new fiber with gc friendly defaults */
21447|  12.7k|    JanetFiber *fiber = janet_gcalloc(JANET_MEMORY_FIBER, sizeof(JanetFiber));
21448|  12.7k|    fiber->flags = 0;
21449|  12.7k|    fiber->frame = 0;
21450|  12.7k|    fiber->stackstart = 0;
21451|  12.7k|    fiber->stacktop = 0;
21452|  12.7k|    fiber->capacity = 0;
21453|  12.7k|    fiber->maxstack = 0;
21454|  12.7k|    fiber->data = NULL;
21455|  12.7k|    fiber->child = NULL;
21456|  12.7k|    fiber->env = NULL;
21457|  12.7k|    fiber->last_value = janet_wrap_nil();
  ------------------
  |  |  831|  12.7k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  12.7k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  12.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  12.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21458|  12.7k|#ifdef JANET_EV
21459|  12.7k|    fiber->sched_id = 0;
21460|  12.7k|    fiber->supervisor_channel = NULL;
21461|  12.7k|    fiber->ev_state = NULL;
21462|  12.7k|    fiber->ev_callback = NULL;
21463|  12.7k|    fiber->ev_stream = NULL;
21464|  12.7k|#endif
21465|       |
21466|       |    /* Push fiber to seen stack */
21467|  12.7k|    janet_v_push(st->lookup, janet_wrap_fiber(fiber));
  ------------------
  |  |  734|  12.7k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  12.7k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  12.7k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  11.1k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  11.1k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|  11.1k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  11.1k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 1.60k, False: 11.1k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 3.11k, False: 8.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  4.71k|#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|  12.7k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  12.7k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21468|       |
21469|       |    /* Read ints */
21470|  12.7k|    int32_t fiber_flags = readint(st, &data);
21471|  12.7k|    int32_t frame = readnat(st, &data);
21472|  12.7k|    int32_t fiber_stackstart = readnat(st, &data);
21473|  12.7k|    int32_t fiber_stacktop = readnat(st, &data);
21474|  12.7k|    int32_t fiber_maxstack = readnat(st, &data);
21475|  12.7k|    JanetTable *fiber_env = NULL;
21476|       |
21477|       |    /* Check for bad flags and ints */
21478|  12.7k|    if ((int32_t)(frame + JANET_FRAME_SIZE) > fiber_stackstart ||
  ------------------
  |  | 1026|  12.7k|#define JANET_FRAME_SIZE 4
  ------------------
  |  Branch (21478:9): [True: 7, False: 12.7k]
  ------------------
21479|  12.7k|            fiber_stackstart > fiber_stacktop ||
  ------------------
  |  Branch (21479:13): [True: 2, False: 12.7k]
  ------------------
21480|  12.7k|            fiber_stacktop > fiber_maxstack) {
  ------------------
  |  Branch (21480:13): [True: 1, False: 12.7k]
  ------------------
21481|      4|        janet_panic("fiber has incorrect stack setup");
21482|      4|    }
21483|       |
21484|       |    /* Allocate stack memory */
21485|  12.7k|    if (fiber_stacktop < INT32_MAX - 10) {
  ------------------
  |  Branch (21485:9): [True: 12.7k, False: 6]
  ------------------
21486|  12.7k|        fiber->capacity = fiber_stacktop + 10;
21487|  12.7k|    } else {
21488|       |        /* Extra capacity is usually nice to avoid immediately reallocing on pushed arguments, but not needed */
21489|      6|        fiber->capacity = INT32_MAX;
21490|      6|    }
21491|  12.7k|    fiber->data = array_allocate(sizeof(Janet), fiber->capacity);
21492|  12.7k|    if (!fiber->data) {
  ------------------
  |  Branch (21492:9): [True: 0, False: 12.7k]
  ------------------
21493|      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]
  |  |  ------------------
  ------------------
21494|      0|    }
21495|  1.21M|    for (int32_t i = 0; i < fiber->capacity; i++) {
  ------------------
  |  Branch (21495:25): [True: 1.20M, False: 12.7k]
  ------------------
21496|  1.20M|        fiber->data[i] = janet_wrap_nil();
  ------------------
  |  |  831|  1.20M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.20M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.20M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.20M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21497|  1.20M|    }
21498|       |
21499|       |    /* get frames */
21500|  12.7k|    int32_t stack = frame;
21501|  12.7k|    int32_t stacktop = fiber_stackstart - JANET_FRAME_SIZE;
  ------------------
  |  | 1026|  12.7k|#define JANET_FRAME_SIZE 4
  ------------------
21502|  14.3k|    while (stack > 0) {
  ------------------
  |  Branch (21502:12): [True: 1.60k, False: 12.7k]
  ------------------
21503|  1.60k|        JanetFunction *func = NULL;
21504|  1.60k|        JanetFuncDef *def = NULL;
21505|  1.60k|        JanetFuncEnv *env = NULL;
21506|  1.60k|        int32_t frameflags = readint(st, &data);
21507|  1.60k|        int32_t prevframe = readnat(st, &data);
21508|  1.60k|        int32_t pcdiff = readnat(st, &data);
21509|       |
21510|       |        /* Get frame items */
21511|  1.60k|        Janet *framestack = fiber->data + stack;
21512|  1.60k|        JanetStackFrame *framep = janet_stack_frame(framestack);
  ------------------
  |  |  831|  1.60k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1026|  1.60k|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
21513|       |
21514|       |        /* Get function */
21515|  1.60k|        Janet funcv;
21516|  1.60k|        data = unmarshal_one(st, data, &funcv, flags + 1);
21517|  1.60k|        janet_asserttype(funcv, JANET_FUNCTION, st);
21518|  1.60k|        func = janet_unwrap_function(funcv);
  ------------------
  |  |  868|  1.60k|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
21519|  1.60k|        def = func->def;
21520|       |
21521|       |        /* Check env */
21522|  1.60k|        if (frameflags & JANET_STACKFRAME_HASENV) {
  ------------------
  |  |20696|  1.60k|#define JANET_STACKFRAME_HASENV   (INT32_MIN)
  ------------------
  |  Branch (21522:13): [True: 0, False: 1.60k]
  ------------------
21523|      0|            frameflags &= ~JANET_STACKFRAME_HASENV;
  ------------------
  |  |20696|      0|#define JANET_STACKFRAME_HASENV   (INT32_MIN)
  ------------------
21524|      0|            data = unmarshal_one_env(st, data, &env, flags + 1);
21525|      0|        }
21526|       |
21527|       |        /* Error checking */
21528|  1.60k|        int32_t expected_framesize = def->slotcount;
21529|  1.60k|        if (expected_framesize != stacktop - stack) {
  ------------------
  |  Branch (21529:13): [True: 0, False: 1.60k]
  ------------------
21530|      0|            janet_panic("fiber stackframe size mismatch");
21531|      0|        }
21532|  1.60k|        if (pcdiff >= def->bytecode_length) {
  ------------------
  |  Branch (21532:13): [True: 0, False: 1.60k]
  ------------------
21533|      0|            janet_panic("fiber stackframe has invalid pc");
21534|      0|        }
21535|  1.60k|        if ((int32_t)(prevframe + JANET_FRAME_SIZE) > stack) {
  ------------------
  |  | 1026|  1.60k|#define JANET_FRAME_SIZE 4
  ------------------
  |  Branch (21535:13): [True: 0, False: 1.60k]
  ------------------
21536|      0|            janet_panic("fiber stackframe does not align with previous frame");
21537|      0|        }
21538|       |
21539|       |        /* Get stack items */
21540|  63.2k|        for (int32_t i = stack; i < stacktop; i++)
  ------------------
  |  Branch (21540:33): [True: 61.6k, False: 1.60k]
  ------------------
21541|  61.6k|            data = unmarshal_one(st, data, fiber->data + i, flags + 1);
21542|       |
21543|       |        /* Set frame */
21544|  1.60k|        framep->env = env;
21545|  1.60k|        framep->pc = def->bytecode + pcdiff;
21546|  1.60k|        framep->prevframe = prevframe;
21547|  1.60k|        framep->flags = frameflags;
21548|  1.60k|        framep->func = func;
21549|       |
21550|       |        /* Goto previous frame */
21551|  1.60k|        stacktop = stack - JANET_FRAME_SIZE;
  ------------------
  |  | 1026|  1.60k|#define JANET_FRAME_SIZE 4
  ------------------
21552|  1.60k|        stack = prevframe;
21553|  1.60k|    }
21554|  12.7k|    if (stack < 0) {
  ------------------
  |  Branch (21554:9): [True: 0, False: 12.7k]
  ------------------
21555|      0|        janet_panic("fiber has too many stackframes");
21556|      0|    }
21557|       |
21558|       |    /* Check for fiber env */
21559|  12.7k|    if (fiber_flags & JANET_FIBER_FLAG_HASENV) {
  ------------------
  |  |20695|  12.7k|#define JANET_FIBER_FLAG_HASENV   (1 << 30)
  ------------------
  |  Branch (21559:9): [True: 1.59k, False: 11.1k]
  ------------------
21560|  1.59k|        Janet envv;
21561|  1.59k|        fiber_flags &= ~JANET_FIBER_FLAG_HASENV;
  ------------------
  |  |20695|  1.59k|#define JANET_FIBER_FLAG_HASENV   (1 << 30)
  ------------------
21562|  1.59k|        data = unmarshal_one(st, data, &envv, flags + 1);
21563|  1.59k|        janet_asserttype(envv, JANET_TABLE, st);
21564|  1.59k|        fiber_env = janet_unwrap_table(envv);
  ------------------
  |  |  861|  1.59k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
21565|  1.59k|    }
21566|       |
21567|       |    /* Check for child fiber */
21568|  12.7k|    if (fiber_flags & JANET_FIBER_FLAG_HASCHILD) {
  ------------------
  |  |20694|  12.7k|#define JANET_FIBER_FLAG_HASCHILD (1 << 29)
  ------------------
  |  Branch (21568:9): [True: 0, False: 12.7k]
  ------------------
21569|      0|        Janet fiberv;
21570|      0|        fiber_flags &= ~JANET_FIBER_FLAG_HASCHILD;
  ------------------
  |  |20694|      0|#define JANET_FIBER_FLAG_HASCHILD (1 << 29)
  ------------------
21571|      0|        data = unmarshal_one(st, data, &fiberv, flags + 1);
21572|      0|        janet_asserttype(fiberv, JANET_FIBER, st);
21573|      0|        fiber->child = janet_unwrap_fiber(fiberv);
  ------------------
  |  |  859|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
21574|      0|    }
21575|       |
21576|       |    /* Get the fiber last value */
21577|  12.7k|    data = unmarshal_one(st, data, &fiber->last_value, flags + 1);
21578|       |
21579|       |    /* We have valid fiber, finally construct remaining fields. */
21580|  12.7k|    fiber->frame = frame;
21581|  12.7k|    fiber->flags = fiber_flags;
21582|  12.7k|    fiber->stackstart = fiber_stackstart;
21583|  12.7k|    fiber->stacktop = fiber_stacktop;
21584|  12.7k|    fiber->maxstack = fiber_maxstack;
21585|  12.7k|    fiber->env = fiber_env;
21586|       |
21587|  12.7k|    int status = janet_fiber_status(fiber);
21588|  12.7k|    if (status < 0 || status > JANET_STATUS_ALIVE) {
  ------------------
  |  Branch (21588:9): [True: 9, False: 12.7k]
  |  Branch (21588:23): [True: 0, False: 12.7k]
  ------------------
21589|      0|        janet_panic("invalid fiber status");
21590|      0|    }
21591|       |
21592|       |    /* A fiber with no stack frames must not be resumable, or the VM reads the frame header before fiber->data */
21593|  12.7k|    if (frame == 0 &&
  ------------------
  |  Branch (21593:9): [True: 11.1k, False: 1.60k]
  ------------------
21594|  11.1k|            status != JANET_STATUS_DEAD &&
  ------------------
  |  Branch (21594:13): [True: 0, False: 11.1k]
  ------------------
21595|      0|            status != JANET_STATUS_ERROR &&
  ------------------
  |  Branch (21595:13): [True: 0, False: 0]
  ------------------
21596|      0|            status != JANET_STATUS_ALIVE &&
  ------------------
  |  Branch (21596:13): [True: 0, False: 0]
  ------------------
21597|      0|            !(status >= JANET_STATUS_USER0 && status <= JANET_STATUS_USER4)) {
  ------------------
  |  Branch (21597:15): [True: 0, False: 0]
  |  Branch (21597:47): [True: 0, False: 0]
  ------------------
21598|      0|        janet_panic("fiber with no stack frames cannot be resumable");
21599|      0|    }
21600|       |
21601|       |    /* Return data */
21602|  12.7k|    *out = fiber;
21603|  12.7k|    return data;
21604|  12.7k|}
janet.c:unmarshal_one_def:
21259|  5.38M|    int flags) {
21260|  5.38M|    MARSH_STACKCHECK;
  ------------------
  |  |20555|  5.38M|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  296|  5.38M|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (20555:30): [True: 0, False: 5.38M]
  |  |  ------------------
  ------------------
21261|  5.38M|    MARSH_EOS(st, data);
  ------------------
  |  |21083|  5.38M|#define MARSH_EOS(st, data) do { \
  |  |21084|  5.38M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 0, False: 5.38M]
  |  |  ------------------
  |  |21085|  5.38M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 5.38M]
  |  |  ------------------
  ------------------
21262|  5.38M|    if (*data == LB_FUNCDEF_REF) {
  ------------------
  |  Branch (21262:9): [True: 39.7k, False: 5.34M]
  ------------------
21263|  39.7k|        data++;
21264|  39.7k|        int32_t index = readint(st, &data);
21265|  39.7k|        if (index < 0 || index >= janet_v_count(st->lookup_defs) || NULL == st->lookup_defs[index])
  ------------------
  |  |  736|  79.5k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  39.7k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  39.7k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 39.7k, False: 1]
  |  |  ------------------
  ------------------
  |  Branch (21265:13): [True: 3, False: 39.7k]
  |  Branch (21265:26): [True: 1, False: 39.7k]
  |  Branch (21265:69): [True: 0, False: 39.7k]
  ------------------
21266|      4|            janet_panicf("invalid funcdef reference %d", index);
21267|  39.7k|        *out = st->lookup_defs[index];
21268|  5.34M|    } else {
21269|       |        /* Initialize with values that will not break garbage collection
21270|       |         * if unmarshalling fails. */
21271|  5.34M|        JanetFuncDef *def = janet_gcalloc(JANET_MEMORY_FUNCDEF, sizeof(JanetFuncDef));
21272|  5.34M|        def->environments_length = 0;
21273|  5.34M|        def->defs_length = 0;
21274|  5.34M|        def->constants_length = 0;
21275|  5.34M|        def->bytecode_length = 0;
21276|  5.34M|        def->name = NULL;
21277|  5.34M|        def->source = NULL;
21278|  5.34M|        def->closure_bitset = NULL;
21279|  5.34M|        def->defs = NULL;
21280|  5.34M|        def->environments = NULL;
21281|  5.34M|        def->constants = NULL;
21282|  5.34M|        def->bytecode = NULL;
21283|  5.34M|        def->sourcemap = NULL;
21284|  5.34M|        def->symbolmap = NULL;
21285|  5.34M|        def->symbolmap_length = 0;
21286|  5.34M|        def->named_args_count = 0;
21287|       |        /* Not referenceable until fully unmarshalled */
21288|  5.34M|        int32_t def_index = janet_v_count(st->lookup_defs);
  ------------------
  |  |  736|  5.34M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  5.33M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  5.33M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 5.33M, False: 10.7k]
  |  |  ------------------
  ------------------
21289|  5.34M|        janet_v_push(st->lookup_defs, NULL);
  ------------------
  |  |  734|  5.34M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  5.34M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  5.34M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  5.33M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  5.33M|#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.33M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  5.33M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 10.7k, False: 5.33M]
  |  |  |  |  |  |  |  Branch (745:50): [True: 100k, False: 5.23M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|   111k|#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.34M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  5.34M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21290|       |
21291|       |        /* Set default lengths to zero */
21292|  5.34M|        int32_t bytecode_length = 0;
21293|  5.34M|        int32_t constants_length = 0;
21294|  5.34M|        int32_t environments_length = 0;
21295|  5.34M|        int32_t defs_length = 0;
21296|  5.34M|        int32_t symbolmap_length = 0;
21297|       |
21298|       |        /* Read flags and other fixed values */
21299|  5.34M|        def->flags = readint(st, &data);
21300|  5.34M|        def->slotcount = readnat(st, &data);
21301|  5.34M|        def->arity = readnat(st, &data);
21302|  5.34M|        def->min_arity = readnat(st, &data);
21303|  5.34M|        def->max_arity = readnat(st, &data);
21304|       |
21305|       |        /* Read some lengths */
21306|  5.34M|        constants_length = readnat(st, &data);
21307|  5.34M|        bytecode_length = readnat(st, &data);
21308|  5.34M|        if (def->flags & JANET_FUNCDEF_FLAG_NAMEDARGS)
  ------------------
  |  | 1107|  5.34M|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (21308:13): [True: 19.8k, False: 5.32M]
  ------------------
21309|  19.8k|            def->named_args_count = readnat(st, &data);
21310|  5.34M|        if (def->flags & JANET_FUNCDEF_FLAG_HASENVS)
  ------------------
  |  | 1103|  5.34M|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (21310:13): [True: 5.01M, False: 328k]
  ------------------
21311|  5.01M|            environments_length = readnat(st, &data);
21312|  5.34M|        if (def->flags & JANET_FUNCDEF_FLAG_HASDEFS)
  ------------------
  |  | 1102|  5.34M|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (21312:13): [True: 722k, False: 4.62M]
  ------------------
21313|   722k|            defs_length = readnat(st, &data);
21314|  5.34M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSYMBOLMAP)
  ------------------
  |  | 1099|  5.34M|#define JANET_FUNCDEF_FLAG_HASSYMBOLMAP 0x40000
  ------------------
  |  Branch (21314:13): [True: 4.93M, False: 408k]
  ------------------
21315|  4.93M|            symbolmap_length = readnat(st, &data);
21316|       |
21317|       |        /* Check name and source (optional) */
21318|  5.34M|        if (def->flags & JANET_FUNCDEF_FLAG_HASNAME) {
  ------------------
  |  | 1100|  5.34M|#define JANET_FUNCDEF_FLAG_HASNAME 0x80000
  ------------------
  |  Branch (21318:13): [True: 5.00M, False: 337k]
  ------------------
21319|  5.00M|            Janet x;
21320|  5.00M|            data = unmarshal_one(st, data, &x, flags + 1);
21321|  5.00M|            janet_asserttype(x, JANET_STRING, st);
21322|  5.00M|            def->name = janet_unwrap_string(x);
  ------------------
  |  |  863|  5.00M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
21323|  5.00M|        }
21324|  5.34M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSOURCE) {
  ------------------
  |  | 1101|  5.34M|#define JANET_FUNCDEF_FLAG_HASSOURCE 0x100000
  ------------------
  |  Branch (21324:13): [True: 5.01M, False: 328k]
  ------------------
21325|  5.01M|            Janet x;
21326|  5.01M|            data = unmarshal_one(st, data, &x, flags + 1);
21327|  5.01M|            janet_asserttype(x, JANET_STRING, st);
21328|  5.01M|            def->source = janet_unwrap_string(x);
  ------------------
  |  |  863|  5.01M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
21329|  5.01M|        }
21330|       |
21331|       |        /* Unmarshal constants */
21332|  5.34M|        if (constants_length) {
  ------------------
  |  Branch (21332:13): [True: 4.07M, False: 1.27M]
  ------------------
21333|  4.07M|            def->constants = array_allocate(sizeof(Janet), constants_length);
21334|  4.07M|            if (!def->constants) {
  ------------------
  |  Branch (21334:17): [True: 0, False: 4.07M]
  ------------------
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|  26.7M|            for (int32_t i = 0; i < constants_length; i++)
  ------------------
  |  Branch (21337:33): [True: 22.6M, False: 4.07M]
  ------------------
21338|  22.6M|                data = unmarshal_one(st, data, def->constants + i, flags + 1);
21339|  4.07M|        } else {
21340|  1.27M|            def->constants = NULL;
21341|  1.27M|        }
21342|  5.34M|        def->constants_length = constants_length;
21343|       |
21344|       |        /* Unmarshal symbol map, if needed */
21345|  5.34M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSYMBOLMAP) {
  ------------------
  |  | 1099|  5.34M|#define JANET_FUNCDEF_FLAG_HASSYMBOLMAP 0x40000
  ------------------
  |  Branch (21345:13): [True: 4.93M, False: 408k]
  ------------------
21346|  4.93M|            def->symbolmap = array_allocate(sizeof(JanetSymbolMap), symbolmap_length);
21347|  4.93M|            if (def->symbolmap == NULL) {
  ------------------
  |  Branch (21347:17): [True: 0, False: 4.93M]
  ------------------
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|  55.5M|            for (int32_t i = 0; i < symbolmap_length; i++) {
  ------------------
  |  Branch (21350:33): [True: 50.6M, False: 4.93M]
  ------------------
21351|  50.6M|                def->symbolmap[i].birth_pc = (uint32_t) readint(st, &data);
21352|  50.6M|                def->symbolmap[i].death_pc = (uint32_t) readint(st, &data);
21353|  50.6M|                def->symbolmap[i].slot_index = (uint32_t) readint(st, &data);
21354|  50.6M|                Janet value;
21355|  50.6M|                data = unmarshal_one(st, data, &value, flags + 1);
21356|  50.6M|                if (!janet_checktype(value, JANET_SYMBOL)) {
  ------------------
  |  |  806|  50.6M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 50.6M]
  |  |  ------------------
  |  |  807|  50.6M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  50.6M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  50.6M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  50.6M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  50.6M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  50.6M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (21356:21): [True: 0, False: 50.6M]
  ------------------
21357|      0|                    janet_panicf("corrupted symbolmap when unmarshalling debug info, got %v", value);
21358|      0|                }
21359|  50.6M|                def->symbolmap[i].symbol = janet_unwrap_symbol(value);
  ------------------
  |  |  864|  50.6M|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
21360|  50.6M|            }
21361|  4.93M|            def->symbolmap_length = (uint32_t) symbolmap_length;
21362|  4.93M|        }
21363|       |
21364|       |        /* Unmarshal bytecode */
21365|  5.34M|        def->bytecode = array_allocate(sizeof(uint32_t), bytecode_length);
21366|  5.34M|        if (!def->bytecode) {
  ------------------
  |  Branch (21366:13): [True: 0, False: 5.34M]
  ------------------
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|  5.34M|        data = janet_unmarshal_u32s(st, data, def->bytecode, bytecode_length);
21370|  5.34M|        def->bytecode_length = bytecode_length;
21371|       |
21372|       |        /* Unmarshal environments */
21373|  5.34M|        if (def->flags & JANET_FUNCDEF_FLAG_HASENVS) {
  ------------------
  |  | 1103|  5.34M|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (21373:13): [True: 5.01M, False: 328k]
  ------------------
21374|  5.01M|            def->environments = janet_calloc(1, sizeof(int32_t) * (size_t) environments_length);
  ------------------
  |  | 2412|  5.01M|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
21375|  5.01M|            if (!def->environments) {
  ------------------
  |  Branch (21375:17): [True: 0, False: 5.01M]
  ------------------
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|  6.99M|            for (int32_t i = 0; i < environments_length; i++) {
  ------------------
  |  Branch (21378:33): [True: 1.97M, False: 5.01M]
  ------------------
21379|  1.97M|                def->environments[i] = readint(st, &data);
21380|  1.97M|            }
21381|  5.01M|        } else {
21382|   328k|            def->environments = NULL;
21383|   328k|        }
21384|  5.34M|        def->environments_length = environments_length;
21385|       |
21386|       |        /* Unmarshal sub funcdefs */
21387|  5.34M|        if (def->flags & JANET_FUNCDEF_FLAG_HASDEFS) {
  ------------------
  |  | 1102|  5.34M|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (21387:13): [True: 722k, False: 4.62M]
  ------------------
21388|   722k|            def->defs = janet_calloc(1, sizeof(JanetFuncDef *) * (size_t) defs_length);
  ------------------
  |  | 2412|   722k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
21389|   722k|            if (!def->defs) {
  ------------------
  |  Branch (21389:17): [True: 0, False: 722k]
  ------------------
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|  2.30M|            for (int32_t i = 0; i < defs_length; i++) {
  ------------------
  |  Branch (21392:33): [True: 1.57M, False: 722k]
  ------------------
21393|  1.57M|                data = unmarshal_one_def(st, data, def->defs + i, flags + 1);
21394|  1.57M|            }
21395|  4.62M|        } else {
21396|  4.62M|            def->defs = NULL;
21397|  4.62M|        }
21398|  5.34M|        def->defs_length = defs_length;
21399|       |
21400|       |        /* Unmarshal source maps if needed */
21401|  5.34M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSOURCEMAP) {
  ------------------
  |  | 1104|  5.34M|#define JANET_FUNCDEF_FLAG_HASSOURCEMAP 0x800000
  ------------------
  |  Branch (21401:13): [True: 5.01M, False: 328k]
  ------------------
21402|  5.01M|            int32_t current = 0;
21403|  5.01M|            def->sourcemap = array_allocate(sizeof(JanetSourceMapping), bytecode_length);
21404|  5.01M|            if (!def->sourcemap) {
  ------------------
  |  Branch (21404:17): [True: 0, False: 5.01M]
  ------------------
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|   148M|            for (int32_t i = 0; i < bytecode_length; i++) {
  ------------------
  |  Branch (21407:33): [True: 143M, False: 5.01M]
  ------------------
21408|   143M|                current += readint(st, &data);
21409|   143M|                def->sourcemap[i].line = current;
21410|   143M|                def->sourcemap[i].column = readint(st, &data);
21411|   143M|            }
21412|  5.01M|        } else {
21413|   328k|            def->sourcemap = NULL;
21414|   328k|        }
21415|       |
21416|       |        /* Unmarshal closure bitset if needed */
21417|  5.34M|        if (def->flags & JANET_FUNCDEF_FLAG_HASCLOBITSET) {
  ------------------
  |  | 1106|  5.34M|#define JANET_FUNCDEF_FLAG_HASCLOBITSET 0x2000000
  ------------------
  |  Branch (21417:13): [True: 606k, False: 4.74M]
  ------------------
21418|   606k|            int32_t n = ((def->slotcount - 1) >> 5) + 1;
21419|   606k|            def->closure_bitset = array_allocate(sizeof(uint32_t), n);
21420|   606k|            if (NULL == def->closure_bitset) {
  ------------------
  |  Branch (21420:17): [True: 0, False: 606k]
  ------------------
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|   606k|            data = janet_unmarshal_u32s(st, data, def->closure_bitset, n);
21424|   606k|        }
21425|       |
21426|       |        /* Validate */
21427|  5.34M|        int status;
21428|  5.34M|        if ((status = janet_verify(def))) {
  ------------------
  |  Branch (21428:13): [True: 55, False: 5.34M]
  ------------------
21429|     55|            janet_panicf("funcdef has invalid bytecode: %d", status);
21430|     55|        }
21431|       |
21432|       |        /* Set def */
21433|  5.34M|        st->lookup_defs[def_index] = def;
21434|  5.34M|        *out = def;
21435|  5.34M|    }
21436|  5.38M|    return data;
21437|  5.38M|}
janet.c:janet_unmarshal_u32s:
21241|  5.95M|static const uint8_t *janet_unmarshal_u32s(UnmarshalState *st, const uint8_t *data, uint32_t *into, int32_t n) {
21242|   154M|    for (int32_t i = 0; i < n; i++) {
  ------------------
  |  Branch (21242:25): [True: 148M, False: 5.95M]
  ------------------
21243|   148M|        MARSH_EOS(st, data + 3);
  ------------------
  |  |21083|   148M|#define MARSH_EOS(st, data) do { \
  |  |21084|   148M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 1, False: 148M]
  |  |  ------------------
  |  |21085|   148M|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 148M]
  |  |  ------------------
  ------------------
21244|   148M|        into[i] =
21245|   148M|            (uint32_t)(data[0]) |
21246|   148M|            ((uint32_t)(data[1]) << 8) |
21247|   148M|            ((uint32_t)(data[2]) << 16) |
21248|   148M|            ((uint32_t)(data[3]) << 24);
21249|   148M|        data += 4;
21250|   148M|    }
21251|  5.95M|    return data;
21252|  5.95M|}
janet.c:unmarshal_one_env:
21197|   427k|    int flags) {
21198|   427k|    MARSH_EOS(st, data);
  ------------------
  |  |21083|   427k|#define MARSH_EOS(st, data) do { \
  |  |21084|   427k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (21084:9): [True: 0, False: 427k]
  |  |  ------------------
  |  |21085|   427k|} while (0)
  |  |  ------------------
  |  |  |  Branch (21085:10): [Folded, False: 427k]
  |  |  ------------------
  ------------------
21199|   427k|    if (*data == LB_FUNCENV_REF) {
  ------------------
  |  Branch (21199:9): [True: 347k, False: 79.4k]
  ------------------
21200|   347k|        data++;
21201|   347k|        int32_t index = readint(st, &data);
21202|   347k|        if (index < 0 || index >= janet_v_count(st->lookup_envs))
  ------------------
  |  |  736|   347k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   347k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   347k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 347k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (21202:13): [True: 0, False: 347k]
  |  Branch (21202:26): [True: 0, False: 347k]
  ------------------
21203|      0|            janet_panicf("invalid funcenv reference %d", index);
21204|   347k|        *out = st->lookup_envs[index];
21205|   347k|    } else {
21206|  79.4k|        JanetFuncEnv *env = janet_gcalloc(JANET_MEMORY_FUNCENV, sizeof(JanetFuncEnv));
21207|  79.4k|        env->length = 0;
21208|  79.4k|        env->offset = 0;
21209|  79.4k|        env->as.values = NULL;
21210|  79.4k|        janet_v_push(st->lookup_envs, env);
  ------------------
  |  |  734|  79.4k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  79.4k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  79.4k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  69.5k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  69.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|  69.5k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  69.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 9.94k, False: 69.5k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 39.7k, False: 29.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  49.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|  79.4k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  79.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21211|  79.4k|        int32_t offset = readnat(st, &data);
21212|  79.4k|        int32_t length = readnat(st, &data);
21213|  79.4k|        if (offset > 0) {
  ------------------
  |  Branch (21213:13): [True: 0, False: 79.4k]
  ------------------
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|  79.4k|        } else {
21222|       |            /* Off stack variant */
21223|  79.4k|            if (length == 0) {
  ------------------
  |  Branch (21223:17): [True: 0, False: 79.4k]
  ------------------
21224|      0|                janet_panic("invalid funcenv length");
21225|      0|            }
21226|  79.4k|            env->as.values = array_allocate(sizeof(Janet), length);
21227|  79.4k|            if (!env->as.values) {
  ------------------
  |  Branch (21227:17): [True: 0, False: 79.4k]
  ------------------
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|  79.4k|            env->offset = 0;
21231|   983k|            for (int32_t i = 0; i < length; i++)
  ------------------
  |  Branch (21231:33): [True: 904k, False: 79.4k]
  ------------------
21232|   904k|                data = unmarshal_one(st, data, env->as.values + i, flags);
21233|  79.4k|        }
21234|  79.4k|        env->length = length;
21235|  79.4k|        *out = env;
21236|  79.4k|    }
21237|   427k|    return data;
21238|   427k|}
janet.c:unmarshal_one_abstract:
21688|  5.13k|static const uint8_t *unmarshal_one_abstract(UnmarshalState *st, const uint8_t *data, Janet *out, int flags) {
21689|  5.13k|    Janet key;
21690|  5.13k|    data = unmarshal_one(st, data, &key, flags + 1);
21691|  5.13k|    const JanetAbstractType *at = janet_get_abstract_type(key);
21692|  5.13k|    if (at == NULL) janet_panic("unknown abstract type");
  ------------------
  |  Branch (21692:9): [True: 3, False: 5.13k]
  ------------------
21693|  5.13k|    if (at->unmarshal) {
  ------------------
  |  Branch (21693:9): [True: 4.87k, False: 257]
  ------------------
21694|  4.87k|        JanetMarshalContext context = {NULL, st, flags, data, at};
21695|  4.87k|        void *abst = at->unmarshal(&context);
21696|  4.87k|        janet_assert(abst != NULL, "null pointer abstract");
  ------------------
  |  |  389|  4.87k|#define janet_assert(c, m) do { \
  |  |  390|  4.87k|    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: 4.87k]
  |  |  ------------------
  |  |  391|  4.87k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 4.87k]
  |  |  ------------------
  ------------------
21697|  4.87k|        *out = janet_wrap_abstract(abst);
  ------------------
  |  |  851|  4.87k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  4.87k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.87k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.87k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21698|  4.87k|        if (context.at != NULL) {
  ------------------
  |  Branch (21698:13): [True: 0, False: 4.87k]
  ------------------
21699|      0|            janet_panic("janet_unmarshal_abstract not called");
21700|      0|        }
21701|  4.87k|        return context.data;
21702|  4.87k|    }
21703|    257|    janet_panic("invalid abstract type - no unmarshal function pointer");
21704|  5.13k|}
janet.c:janet_asserttype:
21159|  10.0M|static void janet_asserttype(Janet x, JanetType t, UnmarshalState *st) {
21160|  10.0M|    if (!janet_checktype(x, t)) {
  ------------------
  |  |  806|  10.0M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [True: 0, False: 10.0M]
  |  |  ------------------
  |  |  807|  10.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|  10.0M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  10.0M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  10.0M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  10.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  10.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (21160:9): [True: 20, False: 10.0M]
  ------------------
21161|       |#ifdef JANET_MARSHAL_DEBUG
21162|       |        dump_reference_table(st);
21163|       |#else
21164|     20|        (void) st;
21165|     20|#endif
21166|     20|        janet_panicf("expected type %T, got %v", 1 << t, x);
21167|     20|    }
21168|  10.0M|}
janet.c:janet_rng_get:
22343|      3|static int janet_rng_get(void *p, Janet key, Janet *out) {
22344|      3|    (void) p;
22345|      3|    if (!janet_checktype(key, JANET_KEYWORD)) return 0;
  ------------------
  |  |  806|      3|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 3]
  |  |  ------------------
  |  |  807|      3|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      3|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      3|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      3|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (22345:9): [True: 0, False: 3]
  ------------------
22346|      3|    return janet_getmethod(janet_unwrap_keyword(key), rng_methods, out);
  ------------------
  |  |  865|      3|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
22347|      3|}
janet.c:janet_rng_next:
22349|    336|static Janet janet_rng_next(void *p, Janet key) {
22350|    336|    (void) p;
22351|    336|    return janet_nextmethod(rng_methods, key);
22352|    336|}
janet.c:janet_gcd:
22442|    906|static double janet_gcd(double x, double y) {
22443|    906|    if (isnan(x) || isnan(y)) {
  ------------------
  |  Branch (22443:9): [True: 0, False: 906]
  |  Branch (22443:21): [True: 0, False: 906]
  ------------------
22444|      0|#ifdef NAN
22445|      0|        return NAN;
22446|       |#else
22447|       |        return 0.0 / 0.0;
22448|       |#endif
22449|      0|    }
22450|    906|    if (isinf(x) || isinf(y)) return INFINITY;
  ------------------
  |  Branch (22450:9): [True: 0, False: 906]
  |  Branch (22450:21): [True: 0, False: 906]
  ------------------
22451|  5.18k|    while (y != 0) {
  ------------------
  |  Branch (22451:12): [True: 4.27k, False: 906]
  ------------------
22452|  4.27k|        double temp = y;
22453|  4.27k|        y = fmod(x, y);
22454|  4.27k|        x = temp;
22455|  4.27k|    }
22456|    906|    return x;
22457|    906|}
janet.c:janet_lcm:
22459|    906|static double janet_lcm(double x, double y) {
22460|    906|    return (x / janet_gcd(x, y)) * y;
22461|    906|}
janet.c:janet_net_socknoblock:
22686|     10|static void janet_net_socknoblock(JSock s) {
22687|       |#ifdef JANET_WINDOWS
22688|       |    unsigned long arg = 1;
22689|       |    ioctlsocket(s, FIONBIO, &arg);
22690|       |#else
22691|       |#if !defined(SOCK_CLOEXEC) && defined(O_CLOEXEC)
22692|       |    int extra = O_CLOEXEC;
22693|       |#else
22694|     10|    int extra = 0;
22695|     10|#endif
22696|     10|    fcntl(s, F_SETFL, fcntl(s, F_GETFL, 0) | O_NONBLOCK | extra);
22697|       |#ifdef SO_NOSIGPIPE
22698|       |    int enable = 1;
22699|       |    setsockopt(s, SOL_SOCKET, SO_NOSIGPIPE, &enable, sizeof(int));
22700|       |#endif
22701|     10|#endif
22702|     10|}
janet.c:janet_get_sockettype:
22969|     27|static int janet_get_sockettype(Janet *argv, int32_t argc, int32_t n) {
22970|     27|    JanetKeyword stype = janet_optkeyword(argv, argc, n, NULL);
22971|     27|    int socktype = SOCK_DGRAM;
22972|     27|    if ((NULL == stype) || !janet_cstrcmp(stype, "stream")) {
  ------------------
  |  Branch (22972:9): [True: 17, False: 10]
  |  Branch (22972:28): [True: 0, False: 10]
  ------------------
22973|     17|        socktype = SOCK_STREAM;
22974|     17|    } else if (janet_cstrcmp(stype, "datagram")) {
  ------------------
  |  Branch (22974:16): [True: 10, False: 0]
  ------------------
22975|     10|        janet_panicf("expected socket type as :stream or :datagram, got %v", argv[n]);
22976|     10|    }
22977|     17|    return socktype;
22978|     27|}
janet.c:janet_get_addrinfo:
22992|      8|static struct addrinfo *janet_get_addrinfo(Janet *argv, int32_t offset, int socktype, int passive, int *is_unix, socklen_t *sizeout) {
22993|       |    /* Unix socket support - not yet supported on windows. */
22994|      8|#ifndef JANET_WINDOWS
22995|      8|    if (janet_keyeq(argv[offset], "unix")) {
  ------------------
  |  Branch (22995:9): [True: 0, False: 8]
  ------------------
22996|      0|        const char *path = janet_getcstring(argv, offset + 1);
22997|      0|        struct sockaddr_un *saddr = janet_calloc(1, sizeof(struct sockaddr_un));
  ------------------
  |  | 2412|      0|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
22998|      0|        if (saddr == NULL) {
  ------------------
  |  Branch (22998:13): [True: 0, False: 0]
  ------------------
22999|      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]
  |  |  ------------------
  ------------------
23000|      0|        }
23001|      0|        saddr->sun_family = AF_UNIX;
23002|      0|        size_t path_size = sizeof(saddr->sun_path);
23003|      0|        snprintf(saddr->sun_path, path_size, "%s", path);
23004|      0|        *sizeout = sizeof(struct sockaddr_un);
23005|      0|#ifdef JANET_LINUX
23006|      0|        if (path[0] == '@') {
  ------------------
  |  Branch (23006:13): [True: 0, False: 0]
  ------------------
23007|      0|            saddr->sun_path[0] = '\0';
23008|      0|            size_t len = (size_t) janet_string_length(path);
  ------------------
  |  | 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)))
  |  |  ------------------
  ------------------
23009|      0|            if (len > path_size) len = path_size; /* truncate too long addresses */
  ------------------
  |  Branch (23009:17): [True: 0, False: 0]
  ------------------
23010|      0|            *sizeout = offsetof(struct sockaddr_un, sun_path) + len;
23011|      0|        }
23012|      0|#endif
23013|      0|        *is_unix = 1;
23014|      0|        return (struct addrinfo *) saddr;
23015|      0|    }
23016|      8|#endif
23017|       |    /* Get host and port */
23018|      8|    char *host = (char *)janet_getcstring(argv, offset);
23019|      8|    char *port = NULL;
23020|      8|    if (janet_checkint(argv[offset + 1])) {
  ------------------
  |  Branch (23020:9): [True: 1, False: 7]
  ------------------
23021|      1|        port = (char *)janet_to_string(argv[offset + 1]);
23022|      7|    } else {
23023|      7|        port = (char *)janet_optcstring(argv, offset + 2, offset + 1, NULL);
23024|      7|    }
23025|       |    /* getaddrinfo */
23026|      8|    struct addrinfo *ai = NULL;
23027|      8|    struct addrinfo hints;
23028|      8|    memset(&hints, 0, sizeof(hints));
23029|      8|    hints.ai_family = AF_UNSPEC;
23030|      8|    hints.ai_socktype = socktype;
23031|      8|    hints.ai_flags = passive ? AI_PASSIVE : 0;
  ------------------
  |  Branch (23031:22): [True: 0, False: 8]
  ------------------
23032|      8|    int status = getaddrinfo(host, port, &hints, &ai);
23033|      8|    if (status) {
  ------------------
  |  Branch (23033:9): [True: 1, False: 7]
  ------------------
23034|      1|        janet_panicf("could not get address info: %s", gai_strerror(status));
23035|      1|    }
23036|      7|    *is_unix = 0;
23037|       |#ifdef JANET_WINDOWS
23038|       |    *sizeout = 0;
23039|       |#else
23040|      7|    *sizeout = sizeof(struct sockaddr_un);
23041|      7|#endif
23042|      7|    return ai;
23043|      8|}
janet.c:janet_freeaddrinfo:
22980|      1|static void janet_freeaddrinfo(struct addrinfo *info, int is_unix) {
22981|       |    /* Our unix addresses are allocated normally instead of with getaddrinfo */
22982|      1|    if (is_unix) {
  ------------------
  |  Branch (22982:9): [True: 0, False: 1]
  ------------------
22983|      0|        janet_free(info);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
22984|      1|    } else {
22985|      1|        freeaddrinfo(info);
22986|      1|    }
22987|      1|}
janet.c:net_sched_connect:
22800|      1|static JANET_NO_RETURN void net_sched_connect(JanetStream *stream, void *state) {
22801|      1|    janet_async_start(stream, JANET_ASYNC_LISTEN_WRITE, net_callback_connect, state);
22802|      1|}
janet.c:make_stream:
23857|     10|static JanetStream *make_stream(JSock handle, uint32_t flags) {
23858|     10|    return janet_stream((JanetHandle) handle, flags | JANET_STREAM_SOCKET | JANET_STREAM_NODUPS, net_stream_methods);
  ------------------
  |  |  623|     10|#define JANET_STREAM_SOCKET 0x2
  ------------------
                  return janet_stream((JanetHandle) handle, flags | JANET_STREAM_SOCKET | JANET_STREAM_NODUPS, net_stream_methods);
  ------------------
  |  |  631|     10|#define JANET_STREAM_NODUPS 0x20000
  ------------------
23859|     10|}
janet.c:get_signal_kw:
24694|      1|static int get_signal_kw(const Janet *argv, int32_t n) {
24695|      1|    JanetKeyword signal_kw = janet_getkeyword(argv, n);
24696|      1|    const struct keyword_signal *ptr = signal_keywords;
24697|     29|    while (ptr->keyword) {
  ------------------
  |  Branch (24697:12): [True: 28, False: 1]
  ------------------
24698|     28|        if (!janet_cstrcmp(signal_kw, ptr->keyword)) {
  ------------------
  |  Branch (24698:13): [True: 0, False: 28]
  ------------------
24699|      0|            return ptr->signal;
24700|      0|        }
24701|     28|        ptr++;
24702|     28|    }
24703|      1|    janet_panicf("undefined signal %v", argv[n]);
24704|      1|}
janet.c:os_execute_impl:
25093|      8|static Janet os_execute_impl(int32_t argc, Janet *argv, JanetExecuteMode mode) {
25094|      8|    janet_sandbox_assert(JANET_SANDBOX_SUBPROCESS);
  ------------------
  |  | 2024|      8|#define JANET_SANDBOX_SUBPROCESS 2
  ------------------
25095|      8|    janet_arity(argc, 1, 3);
25096|       |
25097|       |    /* Get flags */
25098|      8|    int is_spawn = mode == JANET_EXECUTE_SPAWN;
25099|      8|    uint64_t flags = 0;
25100|      8|    if (argc > 1) {
  ------------------
  |  Branch (25100:9): [True: 0, False: 8]
  ------------------
25101|      0|        flags = janet_getflags(argv, 1, "epxd");
25102|      0|    }
25103|       |
25104|       |    /* Get environment */
25105|      8|    int use_environ = !janet_flag_at(flags, 0);
  ------------------
  |  | 1996|      8|#define janet_flag_at(F, I) ((F) & ((1ULL) << (I)))
  ------------------
25106|      8|    EnvBlock envp = os_execute_env(argc, argv);
25107|       |
25108|       |    /* Get arguments */
25109|      8|    JanetView exargs = janet_getindexed(argv, 0);
25110|      8|    if (exargs.len < 1) {
  ------------------
  |  Branch (25110:9): [True: 0, False: 8]
  ------------------
25111|      0|        janet_panic("expected at least 1 command line argument");
25112|      0|    }
25113|       |
25114|       |    /* Optional stdio redirections */
25115|      8|    JanetAbstract orig_in = NULL, orig_out = NULL, orig_err = NULL;
25116|      8|    JanetHandle new_in = JANET_HANDLE_NONE, new_out = JANET_HANDLE_NONE, new_err = JANET_HANDLE_NONE;
  ------------------
  |  |  438|      8|#define JANET_HANDLE_NONE (-1)
  ------------------
                  JanetHandle new_in = JANET_HANDLE_NONE, new_out = JANET_HANDLE_NONE, new_err = JANET_HANDLE_NONE;
  ------------------
  |  |  438|      8|#define JANET_HANDLE_NONE (-1)
  ------------------
                  JanetHandle new_in = JANET_HANDLE_NONE, new_out = JANET_HANDLE_NONE, new_err = JANET_HANDLE_NONE;
  ------------------
  |  |  438|      8|#define JANET_HANDLE_NONE (-1)
  ------------------
25117|      8|    JanetHandle pipe_in = JANET_HANDLE_NONE, pipe_out = JANET_HANDLE_NONE, pipe_err = JANET_HANDLE_NONE;
  ------------------
  |  |  438|      8|#define JANET_HANDLE_NONE (-1)
  ------------------
                  JanetHandle pipe_in = JANET_HANDLE_NONE, pipe_out = JANET_HANDLE_NONE, pipe_err = JANET_HANDLE_NONE;
  ------------------
  |  |  438|      8|#define JANET_HANDLE_NONE (-1)
  ------------------
                  JanetHandle pipe_in = JANET_HANDLE_NONE, pipe_out = JANET_HANDLE_NONE, pipe_err = JANET_HANDLE_NONE;
  ------------------
  |  |  438|      8|#define JANET_HANDLE_NONE (-1)
  ------------------
25118|      8|    int stderr_is_stdout = 0;
25119|      8|    int pipe_errflag = 0; /* Track errors setting up pipes */
25120|      8|    int pipe_owner_flags = (is_spawn && (flags & 0x8)) ? JANET_PROC_ALLOW_ZOMBIE : 0;
  ------------------
  |  |24431|      0|#define JANET_PROC_ALLOW_ZOMBIE 128
  ------------------
  |  Branch (25120:29): [True: 0, False: 8]
  |  Branch (25120:41): [True: 0, False: 0]
  ------------------
25121|       |
25122|       |    /* Get optional redirections */
25123|      8|    if (argc > 2 && (mode != JANET_EXECUTE_EXEC)) {
  ------------------
  |  Branch (25123:9): [True: 0, False: 8]
  |  Branch (25123:21): [True: 0, False: 0]
  ------------------
25124|      0|        JanetDictView tab = janet_getdictionary(argv, 2);
25125|      0|        Janet maybe_stdin = janet_dictionary_get(tab.kvs, tab.cap, janet_ckeywordv("in"));
  ------------------
  |  | 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25126|      0|        Janet maybe_stdout = janet_dictionary_get(tab.kvs, tab.cap, janet_ckeywordv("out"));
  ------------------
  |  | 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25127|      0|        Janet maybe_stderr = janet_dictionary_get(tab.kvs, tab.cap, janet_ckeywordv("err"));
  ------------------
  |  | 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25128|      0|        if (is_spawn && janet_keyeq(maybe_stdin, "pipe")) {
  ------------------
  |  Branch (25128:13): [True: 0, False: 0]
  |  Branch (25128:25): [True: 0, False: 0]
  ------------------
25129|      0|            new_in = make_pipes(&pipe_in, 1, &pipe_errflag);
25130|      0|            pipe_owner_flags |= JANET_PROC_OWNS_STDIN;
  ------------------
  |  |24428|      0|#define JANET_PROC_OWNS_STDIN 16
  ------------------
25131|      0|        } else if (!janet_checktype(maybe_stdin, 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 (25131:20): [True: 0, False: 0]
  ------------------
25132|      0|            new_in = janet_getjstream(&maybe_stdin, 0, &orig_in);
25133|      0|        }
25134|      0|        if (is_spawn && janet_keyeq(maybe_stdout, "pipe")) {
  ------------------
  |  Branch (25134:13): [True: 0, False: 0]
  |  Branch (25134:25): [True: 0, False: 0]
  ------------------
25135|      0|            new_out = make_pipes(&pipe_out, 0, &pipe_errflag);
25136|      0|            pipe_owner_flags |= JANET_PROC_OWNS_STDOUT;
  ------------------
  |  |24429|      0|#define JANET_PROC_OWNS_STDOUT 32
  ------------------
25137|      0|        } else if (!janet_checktype(maybe_stdout, 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 (25137:20): [True: 0, False: 0]
  ------------------
25138|      0|            new_out = janet_getjstream(&maybe_stdout, 0, &orig_out);
25139|      0|        }
25140|      0|        if (is_spawn && janet_keyeq(maybe_stderr, "pipe")) {
  ------------------
  |  Branch (25140:13): [True: 0, False: 0]
  |  Branch (25140:25): [True: 0, False: 0]
  ------------------
25141|      0|            new_err = make_pipes(&pipe_err, 0, &pipe_errflag);
25142|      0|            pipe_owner_flags |= JANET_PROC_OWNS_STDERR;
  ------------------
  |  |24430|      0|#define JANET_PROC_OWNS_STDERR 64
  ------------------
25143|      0|        } else if (janet_keyeq(maybe_stderr, "out")) {
  ------------------
  |  Branch (25143:20): [True: 0, False: 0]
  ------------------
25144|      0|            stderr_is_stdout = 1;
25145|      0|        } else if (!janet_checktype(maybe_stderr, 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 (25145:20): [True: 0, False: 0]
  ------------------
25146|      0|            new_err = janet_getjstream(&maybe_stderr, 0, &orig_err);
25147|      0|        }
25148|      0|    }
25149|       |
25150|       |    /* Optional working directory. Available for both os/execute and os/spawn. */
25151|      8|    const char *chdir_path = NULL;
25152|      8|    if (argc > 2) {
  ------------------
  |  Branch (25152:9): [True: 0, False: 8]
  ------------------
25153|      0|        JanetDictView tab = janet_getdictionary(argv, 2);
25154|      0|        Janet workdir = janet_dictionary_get(tab.kvs, tab.cap, janet_ckeywordv("cd"));
  ------------------
  |  | 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25155|      0|        if (janet_checktype(workdir, JANET_STRING)) {
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25156|      0|            chdir_path = (const char *) janet_unwrap_string(workdir);
  ------------------
  |  |  863|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
25157|       |#ifndef JANET_SPAWN_CHDIR
25158|       |            janet_panicf(":cd argument not supported on this system - %s", chdir_path);
25159|       |#endif
25160|      0|        } else if (!janet_checktype(workdir, 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 (25160:20): [True: 0, False: 0]
  ------------------
25161|      0|            janet_panicf("expected string for :cd argumnet, got %v", workdir);
25162|      0|        }
25163|      0|    }
25164|       |
25165|       |    /* Clean up if any of the pipes have any issues */
25166|      8|    if (pipe_errflag) {
  ------------------
  |  Branch (25166:9): [True: 0, False: 8]
  ------------------
25167|      0|        if (pipe_in != JANET_HANDLE_NONE) close_handle(pipe_in);
  ------------------
  |  |  438|      0|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (25167:13): [True: 0, False: 0]
  ------------------
25168|      0|        if (pipe_out != JANET_HANDLE_NONE) close_handle(pipe_out);
  ------------------
  |  |  438|      0|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (25168:13): [True: 0, False: 0]
  ------------------
25169|      0|        if (pipe_err != JANET_HANDLE_NONE) close_handle(pipe_err);
  ------------------
  |  |  438|      0|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (25169:13): [True: 0, False: 0]
  ------------------
25170|      0|        janet_panic("failed to create pipes");
25171|      0|    }
25172|       |
25173|       |#ifdef JANET_WINDOWS
25174|       |
25175|       |    HANDLE pHandle, tHandle;
25176|       |    SECURITY_ATTRIBUTES saAttr;
25177|       |    PROCESS_INFORMATION processInfo;
25178|       |    STARTUPINFO startupInfo;
25179|       |    LPCSTR lpCurrentDirectory = NULL;
25180|       |    memset(&saAttr, 0, sizeof(saAttr));
25181|       |    memset(&processInfo, 0, sizeof(processInfo));
25182|       |    memset(&startupInfo, 0, sizeof(startupInfo));
25183|       |    startupInfo.cb = sizeof(startupInfo);
25184|       |    startupInfo.dwFlags |= STARTF_USESTDHANDLES;
25185|       |    saAttr.nLength = sizeof(saAttr);
25186|       |
25187|       |    JanetBuffer *buf = os_exec_escape(exargs);
25188|       |    if (buf->count > 8191) {
25189|       |        if (pipe_in != JANET_HANDLE_NONE) CloseHandle(pipe_in);
25190|       |        if (pipe_out != JANET_HANDLE_NONE) CloseHandle(pipe_out);
25191|       |        if (pipe_err != JANET_HANDLE_NONE) CloseHandle(pipe_err);
25192|       |        janet_panic("command line string too long (max 8191 characters)");
25193|       |    }
25194|       |    const char *path = (const char *) janet_unwrap_string(exargs.items[0]);
25195|       |
25196|       |    if (chdir_path != NULL) {
25197|       |        lpCurrentDirectory = chdir_path;
25198|       |    }
25199|       |
25200|       |    /* Do IO redirection */
25201|       |
25202|       |    if (pipe_in != JANET_HANDLE_NONE) {
25203|       |        startupInfo.hStdInput = pipe_in;
25204|       |    } else if (new_in != JANET_HANDLE_NONE) {
25205|       |        startupInfo.hStdInput = new_in;
25206|       |    } else {
25207|       |        startupInfo.hStdInput = (HANDLE) _get_osfhandle(_fileno(stdin));
25208|       |    }
25209|       |
25210|       |    if (pipe_out != JANET_HANDLE_NONE) {
25211|       |        startupInfo.hStdOutput = pipe_out;
25212|       |    } else if (new_out != JANET_HANDLE_NONE) {
25213|       |        startupInfo.hStdOutput = new_out;
25214|       |    } else {
25215|       |        startupInfo.hStdOutput = (HANDLE) _get_osfhandle(_fileno(stdout));
25216|       |    }
25217|       |
25218|       |    if (pipe_err != JANET_HANDLE_NONE) {
25219|       |        startupInfo.hStdError = pipe_err;
25220|       |    } else if (new_err != NULL) {
25221|       |        startupInfo.hStdError = new_err;
25222|       |    } else if (stderr_is_stdout) {
25223|       |        startupInfo.hStdError = startupInfo.hStdOutput;
25224|       |    } else {
25225|       |        startupInfo.hStdError = (HANDLE) _get_osfhandle(_fileno(stderr));
25226|       |    }
25227|       |
25228|       |    int cp_failed = 0;
25229|       |    DWORD cp_error_code = 0;
25230|       |    if (!CreateProcess(janet_flag_at(flags, 1) ? NULL : path,
25231|       |                       (char *) buf->data, /* Single CLI argument */
25232|       |                       &saAttr, /* no proc inheritance */
25233|       |                       &saAttr, /* no thread inheritance */
25234|       |                       TRUE, /* handle inheritance */
25235|       |                       0, /* flags */
25236|       |                       use_environ ? NULL : envp, /* pass in environment */
25237|       |                       lpCurrentDirectory,
25238|       |                       &startupInfo,
25239|       |                       &processInfo)) {
25240|       |        cp_failed = 1;
25241|       |        cp_error_code = GetLastError();
25242|       |    }
25243|       |
25244|       |    if (pipe_in != JANET_HANDLE_NONE) CloseHandle(pipe_in);
25245|       |    if (pipe_out != JANET_HANDLE_NONE) CloseHandle(pipe_out);
25246|       |    if (pipe_err != JANET_HANDLE_NONE) CloseHandle(pipe_err);
25247|       |
25248|       |    os_execute_cleanup(envp, NULL);
25249|       |
25250|       |    if (cp_failed)  {
25251|       |        char msgbuf[256];
25252|       |        msgbuf[0] = '\0';
25253|       |        FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
25254|       |                       NULL,
25255|       |                       cp_error_code,
25256|       |                       MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
25257|       |                       msgbuf,
25258|       |                       sizeof(msgbuf),
25259|       |                       NULL);
25260|       |        if (!*msgbuf) snprintf(msgbuf, sizeof(msgbuf), "%" PRIu32, (uint32_t) cp_error_code);
25261|       |        char *c = msgbuf;
25262|       |        while (*c) {
25263|       |            if (*c == '\n' || *c == '\r') {
25264|       |                *c = '\0';
25265|       |                break;
25266|       |            }
25267|       |            c++;
25268|       |        }
25269|       |        janet_panicf("failed to create process: %V", janet_cstringv(msgbuf));
25270|       |    }
25271|       |
25272|       |    pHandle = processInfo.hProcess;
25273|       |    tHandle = processInfo.hThread;
25274|       |
25275|       |#else
25276|       |
25277|       |    /* Result */
25278|      8|    int status = 0;
25279|       |
25280|      8|    const char **child_argv = janet_smalloc(sizeof(char *) * ((size_t) exargs.len + 1));
25281|     37|    for (int32_t i = 0; i < exargs.len; i++)
  ------------------
  |  Branch (25281:25): [True: 29, False: 8]
  ------------------
25282|     29|        child_argv[i] = janet_getcstring(exargs.items, i);
25283|      8|    child_argv[exargs.len] = NULL;
25284|       |    /* Coerce to form that works for spawn. I'm fairly confident no implementation
25285|       |     * of posix_spawn would modify the argv array passed in. */
25286|      8|    char *const *cargv = (char *const *)child_argv;
25287|       |
25288|      8|    if (use_environ) {
  ------------------
  |  Branch (25288:9): [True: 3, False: 5]
  ------------------
25289|      3|        janet_lock_environ();
25290|      3|    }
25291|       |
25292|       |    /* exec mode */
25293|      8|    if (mode == JANET_EXECUTE_EXEC) {
  ------------------
  |  Branch (25293:9): [True: 3, False: 5]
  ------------------
25294|      3|        int status;
25295|       |#ifdef JANET_PLAN9
25296|       |        status = exec(cargv[0], cargv);
25297|       |#else
25298|      3|        if (!use_environ) {
  ------------------
  |  Branch (25298:13): [True: 0, False: 3]
  ------------------
25299|      0|            environ = envp;
25300|      0|        }
25301|      3|        do {
25302|      3|            if (janet_flag_at(flags, 1)) {
  ------------------
  |  | 1996|      3|#define janet_flag_at(F, I) ((F) & ((1ULL) << (I)))
  |  |  ------------------
  |  |  |  Branch (1996:29): [True: 0, False: 3]
  |  |  ------------------
  ------------------
25303|      0|                status = execvp(cargv[0], cargv);
25304|      3|            } else {
25305|      3|                status = execv(cargv[0], cargv);
25306|      3|            }
25307|      3|        } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (25307:18): [True: 3, False: 0]
  |  Branch (25307:34): [True: 0, False: 3]
  ------------------
25308|      3|#endif
25309|      3|        janet_panicf("%p: %s", cargv[0], janet_strerror(errno ? errno : ENOENT));
  ------------------
  |  Branch (25309:57): [True: 3, False: 0]
  ------------------
25310|      3|    }
25311|       |
25312|      5|#ifndef JANET_NO_SPAWN
25313|       |    /* Use posix_spawn to spawn new process */
25314|       |
25315|       |    /* Posix spawn setup */
25316|      5|    posix_spawn_file_actions_t actions;
25317|      5|    posix_spawn_file_actions_init(&actions);
25318|      5|#ifdef JANET_SPAWN_CHDIR
25319|      5|    if (chdir_path != NULL) {
  ------------------
  |  Branch (25319:9): [True: 0, False: 5]
  ------------------
25320|       |#ifdef JANET_SPAWN_CHDIR_NO_NP
25321|       |        posix_spawn_file_actions_addchdir(&actions, chdir_path);
25322|       |#else
25323|      0|        posix_spawn_file_actions_addchdir_np(&actions, chdir_path);
25324|      0|#endif
25325|      0|    }
25326|      5|#endif
25327|      5|    if (pipe_in != JANET_HANDLE_NONE) {
  ------------------
  |  |  438|      5|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (25327:9): [True: 0, False: 5]
  ------------------
25328|      0|        posix_spawn_file_actions_adddup2(&actions, pipe_in, 0);
25329|      0|        posix_spawn_file_actions_addclose(&actions, pipe_in);
25330|      5|    } else if (new_in != JANET_HANDLE_NONE && new_in != 0) {
  ------------------
  |  |  438|     10|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (25330:16): [True: 0, False: 5]
  |  Branch (25330:47): [True: 0, False: 0]
  ------------------
25331|      0|        posix_spawn_file_actions_adddup2(&actions, new_in, 0);
25332|      0|        if (new_in != new_out && new_in != new_err)
  ------------------
  |  Branch (25332:13): [True: 0, False: 0]
  |  Branch (25332:34): [True: 0, False: 0]
  ------------------
25333|      0|            posix_spawn_file_actions_addclose(&actions, new_in);
25334|      0|    }
25335|      5|    if (pipe_out != JANET_HANDLE_NONE) {
  ------------------
  |  |  438|      5|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (25335:9): [True: 0, False: 5]
  ------------------
25336|      0|        posix_spawn_file_actions_adddup2(&actions, pipe_out, 1);
25337|      0|        posix_spawn_file_actions_addclose(&actions, pipe_out);
25338|      5|    } else if (new_out != JANET_HANDLE_NONE && new_out != 1) {
  ------------------
  |  |  438|     10|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (25338:16): [True: 0, False: 5]
  |  Branch (25338:48): [True: 0, False: 0]
  ------------------
25339|      0|        posix_spawn_file_actions_adddup2(&actions, new_out, 1);
25340|      0|        if (new_out != new_err)
  ------------------
  |  Branch (25340:13): [True: 0, False: 0]
  ------------------
25341|      0|            posix_spawn_file_actions_addclose(&actions, new_out);
25342|      0|    }
25343|      5|    if (pipe_err != JANET_HANDLE_NONE) {
  ------------------
  |  |  438|      5|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (25343:9): [True: 0, False: 5]
  ------------------
25344|      0|        posix_spawn_file_actions_adddup2(&actions, pipe_err, 2);
25345|      0|        posix_spawn_file_actions_addclose(&actions, pipe_err);
25346|      5|    } else if (new_err != JANET_HANDLE_NONE && new_err != 2) {
  ------------------
  |  |  438|     10|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (25346:16): [True: 0, False: 5]
  |  Branch (25346:48): [True: 0, False: 0]
  ------------------
25347|      0|        posix_spawn_file_actions_adddup2(&actions, new_err, 2);
25348|      0|        posix_spawn_file_actions_addclose(&actions, new_err);
25349|      5|    } else if (stderr_is_stdout) {
  ------------------
  |  Branch (25349:16): [True: 0, False: 5]
  ------------------
25350|      0|        posix_spawn_file_actions_adddup2(&actions, 1, 2);
25351|      0|    }
25352|       |
25353|      5|    pid_t pid;
25354|      5|    if (janet_flag_at(flags, 1)) {
  ------------------
  |  | 1996|      5|#define janet_flag_at(F, I) ((F) & ((1ULL) << (I)))
  |  |  ------------------
  |  |  |  Branch (1996:29): [True: 0, False: 5]
  |  |  ------------------
  ------------------
25355|      0|        status = posix_spawnp(&pid,
25356|      0|                              child_argv[0], &actions, NULL, cargv,
25357|      0|                              use_environ ? environ : envp);
  ------------------
  |  Branch (25357:31): [True: 0, False: 0]
  ------------------
25358|      5|    } else {
25359|      5|        status = posix_spawn(&pid,
25360|      5|                             child_argv[0], &actions, NULL, cargv,
25361|      5|                             use_environ ? environ : envp);
  ------------------
  |  Branch (25361:30): [True: 0, False: 5]
  ------------------
25362|      5|    }
25363|       |
25364|      5|    posix_spawn_file_actions_destroy(&actions);
25365|       |
25366|      5|    if (pipe_in != JANET_HANDLE_NONE) close(pipe_in);
  ------------------
  |  |  438|      5|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (25366:9): [True: 0, False: 5]
  ------------------
25367|      5|    if (pipe_out != JANET_HANDLE_NONE) close(pipe_out);
  ------------------
  |  |  438|      5|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (25367:9): [True: 0, False: 5]
  ------------------
25368|      5|    if (pipe_err != JANET_HANDLE_NONE) close(pipe_err);
  ------------------
  |  |  438|      5|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (25368:9): [True: 0, False: 5]
  ------------------
25369|       |
25370|      5|    if (use_environ) {
  ------------------
  |  Branch (25370:9): [True: 0, False: 5]
  ------------------
25371|      0|        janet_unlock_environ();
25372|      0|    }
25373|       |
25374|      5|    os_execute_cleanup(envp, child_argv);
25375|      5|    if (status) {
  ------------------
  |  Branch (25375:9): [True: 0, False: 5]
  ------------------
25376|       |        /* correct for macos bug where errno is not set */
25377|      0|        janet_panicf("%p: %s", argv[0], janet_strerror(errno ? errno : ENOENT));
  ------------------
  |  Branch (25377:56): [True: 0, False: 0]
  ------------------
25378|      0|    }
25379|       |
25380|      5|#endif
25381|      5|#endif
25382|      5|#ifndef JANET_NO_SPAWN
25383|      5|    JanetProc *proc = janet_abstract(&ProcAT, sizeof(JanetProc));
25384|      5|    proc->return_code = -1;
25385|       |#ifdef JANET_WINDOWS
25386|       |    proc->pHandle = pHandle;
25387|       |    proc->tHandle = tHandle;
25388|       |#else
25389|      5|    proc->pid = pid;
25390|      5|#endif
25391|      5|    proc->in = NULL;
25392|      5|    proc->out = NULL;
25393|      5|    proc->err = NULL;
25394|      5|    proc->flags = pipe_owner_flags;
25395|      5|    if (janet_flag_at(flags, 2)) {
  ------------------
  |  | 1996|      5|#define janet_flag_at(F, I) ((F) & ((1ULL) << (I)))
  |  |  ------------------
  |  |  |  Branch (1996:29): [True: 0, False: 5]
  |  |  ------------------
  ------------------
25396|      0|        proc->flags |= JANET_PROC_ERROR_NONZERO;
  ------------------
  |  |24427|      0|#define JANET_PROC_ERROR_NONZERO 8
  ------------------
25397|      0|    }
25398|      5|    if (is_spawn) {
  ------------------
  |  Branch (25398:9): [True: 0, False: 5]
  ------------------
25399|       |        /* Only set up pointers to stdin, stdout, and stderr if os/spawn. */
25400|      0|        if (new_in != JANET_HANDLE_NONE) {
  ------------------
  |  |  438|      0|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (25400:13): [True: 0, False: 0]
  ------------------
25401|      0|            proc->in = get_stdio_for_handle(new_in, orig_in, 1);
25402|      0|            if (NULL == proc->in) janet_panic("failed to construct proc");
  ------------------
  |  Branch (25402:17): [True: 0, False: 0]
  ------------------
25403|      0|        }
25404|      0|        if (new_out != JANET_HANDLE_NONE) {
  ------------------
  |  |  438|      0|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (25404:13): [True: 0, False: 0]
  ------------------
25405|      0|            proc->out = get_stdio_for_handle(new_out, orig_out, 0);
25406|      0|            if (NULL == proc->out) janet_panic("failed to construct proc");
  ------------------
  |  Branch (25406:17): [True: 0, False: 0]
  ------------------
25407|      0|        }
25408|      0|        if (new_err != JANET_HANDLE_NONE) {
  ------------------
  |  |  438|      0|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (25408:13): [True: 0, False: 0]
  ------------------
25409|      0|            proc->err = get_stdio_for_handle(new_err, orig_err, 0);
25410|      0|            if (NULL == proc->err) janet_panic("failed to construct proc");
  ------------------
  |  Branch (25410:17): [True: 0, False: 0]
  ------------------
25411|      0|        }
25412|      0|        return janet_wrap_abstract(proc);
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25413|      5|    } else {
25414|      5|#ifdef JANET_EV
25415|      5|        os_proc_wait_impl(proc);
25416|       |#else
25417|       |        return os_proc_wait_impl(proc);
25418|       |#endif
25419|      5|    }
25420|      5|#endif
25421|      5|}
janet.c:os_execute_env:
24282|      7|static EnvBlock os_execute_env(int32_t argc, const Janet *argv) {
24283|      7|    if (argc <= 2) return NULL;
  ------------------
  |  Branch (24283:9): [True: 7, False: 0]
  ------------------
24284|      0|    JanetDictView dict = janet_getdictionary(argv, 2);
24285|       |#ifdef JANET_WINDOWS
24286|       |    JanetBuffer *temp = janet_buffer(10);
24287|       |    for (int32_t i = 0; i < dict.cap; i++) {
24288|       |        const JanetKV *kv = dict.kvs + i;
24289|       |        if (!janet_checktype(kv->key, JANET_STRING)) continue;
24290|       |        if (!janet_checktype(kv->value, JANET_STRING)) continue;
24291|       |        const uint8_t *keys = janet_unwrap_string(kv->key);
24292|       |        const uint8_t *vals = janet_unwrap_string(kv->value);
24293|       |        if (os_env_bad_key(keys)) continue;
24294|       |        janet_buffer_push_bytes(temp, keys, janet_string_length(keys));
24295|       |        janet_buffer_push_u8(temp, '=');
24296|       |        janet_buffer_push_cstring(temp, (const char *) vals);
24297|       |        janet_buffer_push_u8(temp, '\0');
24298|       |    }
24299|       |    /* Windows environment blocks must be double-NULL terminated */
24300|       |    if (temp->count == 0) janet_buffer_push_u8(temp, '\0');
24301|       |    janet_buffer_push_u8(temp, '\0');
24302|       |    char *ret = janet_smalloc(temp->count);
24303|       |    memcpy(ret, temp->data, temp->count);
24304|       |    return ret;
24305|       |#else
24306|      0|    char **envp = janet_smalloc(sizeof(char *) * ((size_t)dict.len + 1));
24307|      0|    int32_t j = 0;
24308|      0|    for (int32_t i = 0; i < dict.cap; i++) {
  ------------------
  |  Branch (24308:25): [True: 0, False: 0]
  ------------------
24309|      0|        const JanetKV *kv = dict.kvs + i;
24310|      0|        if (!janet_checktype(kv->key, JANET_STRING)) continue;
  ------------------
  |  |  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 (24310:13): [True: 0, False: 0]
  ------------------
24311|      0|        if (!janet_checktype(kv->value, JANET_STRING)) continue;
  ------------------
  |  |  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 (24311:13): [True: 0, False: 0]
  ------------------
24312|      0|        const uint8_t *keys = janet_unwrap_string(kv->key);
  ------------------
  |  |  863|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
24313|      0|        const uint8_t *vals = janet_unwrap_string(kv->value);
  ------------------
  |  |  863|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
24314|      0|        if (os_env_bad_key(keys)) continue;
  ------------------
  |  Branch (24314:13): [True: 0, False: 0]
  ------------------
24315|      0|        int32_t klen = janet_string_length(keys);
  ------------------
  |  | 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)))
  |  |  ------------------
  ------------------
24316|      0|        int32_t vlen = janet_string_length(vals);
  ------------------
  |  | 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)))
  |  |  ------------------
  ------------------
24317|      0|        char *envitem = janet_smalloc((size_t) klen + (size_t) vlen + 2);
24318|      0|        memcpy(envitem, keys, klen);
24319|      0|        envitem[klen] = '=';
24320|      0|        memcpy(envitem + klen + 1, vals, vlen);
24321|      0|        envitem[klen + vlen + 1] = 0;
24322|      0|        envp[j++] = envitem;
24323|      0|    }
24324|       |    envp[j] = NULL;
24325|      0|    return envp;
24326|      7|#endif
24327|      7|}
janet.c:os_shell_subr:
25534|      9|static JanetEVGenericMessage os_shell_subr(JanetEVGenericMessage args) {
25535|      9|    int stat = system((const char *) args.argp);
25536|      9|    janet_free(args.argp);
  ------------------
  |  | 2415|      9|#define janet_free(X) free((X))
  ------------------
25537|      9|    args.argp = NULL;
25538|      9|    if (args.argi) {
  ------------------
  |  Branch (25538:9): [True: 0, False: 9]
  ------------------
25539|      0|        args.tag = JANET_EV_TCTAG_INTEGER;
  ------------------
  |  | 1579|      0|#define JANET_EV_TCTAG_INTEGER 1      /* resume with janet_wrap_integer(argi) */
  ------------------
25540|      9|    } else {
25541|      9|        args.tag = JANET_EV_TCTAG_BOOLEAN;
  ------------------
  |  | 1586|      9|#define JANET_EV_TCTAG_BOOLEAN 8      /* resume with janet_wrap_boolean(argi) */
  ------------------
25542|      9|    }
25543|      9|    args.argi = stat;
25544|      9|    return args;
25545|      9|}
janet.c:janet_lock_environ:
24040|  81.9k|static void janet_lock_environ(void) {
24041|  81.9k|}
janet.c:janet_unlock_environ:
24042|  81.9k|static void janet_unlock_environ(void) {
24043|  81.9k|}
janet.c:time_to_tm:
25803|  1.78k|static struct tm *time_to_tm(const Janet *argv, int32_t argc, int32_t n, struct tm *t_infos) {
25804|  1.78k|    time_t t;
25805|  1.78k|    if (argc > n && !janet_checktype(argv[n], JANET_NIL)) {
  ------------------
  |  |  806|  1.52k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 1.52k]
  |  |  ------------------
  |  |  807|  1.52k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.52k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.52k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.52k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.52k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.52k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (25805:9): [True: 1.52k, False: 257]
  |  Branch (25805:21): [True: 1.52k, False: 0]
  ------------------
25806|  1.52k|        int64_t integer = janet_getinteger64(argv, n);
25807|  1.52k|        t = (time_t) integer;
25808|  1.52k|    } else {
25809|    257|        time(&t);
25810|    257|    }
25811|  1.78k|    struct tm *t_info = NULL;
25812|  1.78k|    if (argc > n + 1 && janet_truthy(argv[n + 1])) {
  ------------------
  |  |  818|  1.52k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|  3.04k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 1.52k]
  |  |  |  |  ------------------
  |  |  |  |  807|  3.04k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|  3.04k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  1.52k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  1.52k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.52k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.52k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 1.51k, False: 1]
  |  |  ------------------
  |  |  819|  1.52k|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|  3.03k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 1.51k]
  |  |  |  |  ------------------
  |  |  |  |  807|  3.03k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|  3.03k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  1.51k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  1.51k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.51k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.51k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 1.51k, False: 0]
  |  |  |  Branch (819:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (25812:9): [True: 1.52k, False: 260]
  ------------------
25813|       |        /* local time */
25814|       |#ifdef JANET_WINDOWS
25815|       |        _tzset();
25816|       |        localtime_s(t_infos, &t);
25817|       |        t_info = t_infos;
25818|       |#elif defined(JANET_PLAN9)
25819|       |        t_info = localtime(&t);
25820|       |#else
25821|  1.51k|        tzset();
25822|  1.51k|        t_info = localtime_r(&t, t_infos);
25823|  1.51k|#endif
25824|  1.51k|    } else {
25825|       |        /* utc time */
25826|       |#ifdef JANET_WINDOWS
25827|       |        gmtime_s(t_infos, &t);
25828|       |        t_info = t_infos;
25829|       |#elif defined(JANET_PLAN9)
25830|       |        t_info = gmtime(&t);
25831|       |#else
25832|    261|        t_info = gmtime_r(&t, t_infos);
25833|    261|#endif
25834|    261|    }
25835|  1.78k|    return t_info;
25836|  1.78k|}
janet.c:entry_getint:
25935|     78|static timeint_t entry_getint(Janet env_entry, char *field) {
25936|     78|    Janet i;
25937|     78|    if (janet_checktype(env_entry, JANET_TABLE)) {
  ------------------
  |  |  806|     78|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 12, False: 66]
  |  |  |  Branch (806:6): [Folded, False: 78]
  |  |  ------------------
  |  |  807|     78|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     78|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     78|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     78|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     78|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     78|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25938|     12|        JanetTable *entry = janet_unwrap_table(env_entry);
  ------------------
  |  |  861|     12|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
25939|     12|        i = janet_table_get_keyword(entry, field);
25940|     66|    } else if (janet_checktype(env_entry, JANET_STRUCT)) {
  ------------------
  |  |  806|     66|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 66, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 66]
  |  |  ------------------
  |  |  807|     66|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     66|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     66|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     66|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     66|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     66|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25941|     66|        const JanetKV *entry = janet_unwrap_struct(env_entry);
  ------------------
  |  |  857|     66|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
25942|     66|        i = janet_struct_get(entry, janet_ckeywordv(field));
  ------------------
  |  | 1843|     66|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|     66|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|     66|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     66|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     66|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25943|     66|    } else {
25944|      0|        return 0;
25945|      0|    }
25946|       |
25947|     78|    if (janet_checktype(i, JANET_NIL)) {
  ------------------
  |  |  806|     78|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 78, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 78]
  |  |  ------------------
  |  |  807|     78|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     78|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     78|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     78|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     78|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     78|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25948|     78|        return 0;
25949|     78|    }
25950|       |
25951|       |#ifdef JANET_WINDOWS
25952|       |    if (!janet_checkint(i)) {
25953|       |        janet_panicf("bad slot #%s, expected 32 bit signed integer, got %v",
25954|       |                     field, i);
25955|       |    }
25956|       |#else
25957|      0|    if (!janet_checkint64(i)) {
  ------------------
  |  Branch (25957:9): [True: 0, False: 0]
  ------------------
25958|      0|        janet_panicf("bad slot #%s, expected 64 bit signed integer, got %v",
25959|      0|                     field, i);
25960|      0|    }
25961|      0|#endif
25962|       |
25963|      0|    return (timeint_t)janet_unwrap_number(i);
  ------------------
  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  ------------------
25964|      0|}
janet.c:entry_getdst:
25911|     13|static int entry_getdst(Janet env_entry) {
25912|     13|    Janet v;
25913|     13|    if (janet_checktype(env_entry, JANET_TABLE)) {
  ------------------
  |  |  806|     13|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 2, False: 11]
  |  |  |  Branch (806:6): [Folded, False: 13]
  |  |  ------------------
  |  |  807|     13|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     13|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     13|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     13|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     13|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     13|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25914|      2|        JanetTable *entry = janet_unwrap_table(env_entry);
  ------------------
  |  |  861|      2|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
25915|      2|        v = janet_table_get_keyword(entry, "dst");
25916|     11|    } else if (janet_checktype(env_entry, JANET_STRUCT)) {
  ------------------
  |  |  806|     11|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 11, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 11]
  |  |  ------------------
  |  |  807|     11|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     11|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     11|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     11|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     11|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25917|     11|        const JanetKV *entry = janet_unwrap_struct(env_entry);
  ------------------
  |  |  857|     11|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
25918|     11|        v = janet_struct_get(entry, janet_ckeywordv("dst"));
  ------------------
  |  | 1843|     11|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|     11|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|     11|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     11|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     11|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25919|     11|    } else {
25920|      0|        v = 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25921|      0|    }
25922|     13|    if (janet_checktype(v, JANET_NIL)) {
  ------------------
  |  |  806|     13|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 13, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 13]
  |  |  ------------------
  |  |  807|     13|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     13|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     13|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     13|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     13|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     13|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25923|     13|        return -1;
25924|     13|    } else {
25925|       |        return janet_truthy(v);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
25926|      0|    }
25927|     13|}
janet.c:os_stat_or_lstat:
26409|  7.90k|static Janet os_stat_or_lstat(int do_lstat, int32_t argc, Janet *argv) {
26410|  7.90k|    janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2029|  7.90k|#define JANET_SANDBOX_FS_READ 64
  ------------------
26411|  7.90k|    janet_arity(argc, 1, 2);
26412|  7.90k|    const char *path = janet_getcstring(argv, 0);
26413|  7.90k|    JanetTable *tab = NULL;
26414|  7.90k|    const uint8_t *key = NULL;
26415|  7.90k|    if (argc == 2) {
  ------------------
  |  Branch (26415:9): [True: 7.90k, False: 0]
  ------------------
26416|  7.90k|        if (janet_checktype(argv[1], JANET_KEYWORD)) {
  ------------------
  |  |  806|  7.90k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 7.90k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 7.90k]
  |  |  ------------------
  |  |  807|  7.90k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  7.90k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  7.90k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  7.90k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.90k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.90k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26417|  7.90k|            key = janet_getkeyword(argv, 1);
26418|  7.90k|        } else {
26419|      0|            tab = janet_gettable(argv, 1);
26420|      0|        }
26421|  7.90k|    } else {
26422|      0|        tab = janet_table(0);
26423|      0|    }
26424|       |
26425|       |    /* Build result */
26426|  7.90k|    jstat_t st;
26427|       |#ifdef JANET_WINDOWS
26428|       |    (void) do_lstat;
26429|       |    int res = _stat(path, &st);
26430|       |#elif defined(JANET_PLAN9)
26431|       |    (void)do_lstat;
26432|       |    int res = stat(path, &st);
26433|       |#else
26434|  7.90k|    int res;
26435|  7.90k|    if (do_lstat) {
  ------------------
  |  Branch (26435:9): [True: 0, False: 7.90k]
  ------------------
26436|      0|        res = lstat(path, &st);
26437|  7.90k|    } else {
26438|  7.90k|        res = stat(path, &st);
26439|  7.90k|    }
26440|  7.90k|#endif
26441|  7.90k|    if (-1 == res) {
  ------------------
  |  Branch (26441:9): [True: 7.90k, False: 0]
  ------------------
26442|  7.90k|        return janet_wrap_nil();
  ------------------
  |  |  831|  7.90k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  7.90k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.90k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.90k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26443|  7.90k|    }
26444|       |
26445|      0|    if (NULL == key) {
  ------------------
  |  Branch (26445:9): [True: 0, False: 0]
  ------------------
26446|       |        /* Put results in table */
26447|      0|        for (const struct OsStatGetter *sg = os_stat_getters; sg->name != NULL; sg++) {
  ------------------
  |  Branch (26447:63): [True: 0, False: 0]
  ------------------
26448|      0|            janet_table_put(tab, janet_ckeywordv(sg->name), sg->fn(&st));
  ------------------
  |  | 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26449|      0|        }
26450|      0|        return janet_wrap_table(tab);
  ------------------
  |  |  846|      0|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26451|      0|    } else {
26452|       |        /* Get one result */
26453|      0|        for (const struct OsStatGetter *sg = os_stat_getters; sg->name != NULL; sg++) {
  ------------------
  |  Branch (26453:63): [True: 0, False: 0]
  ------------------
26454|      0|            if (janet_cstrcmp(key, sg->name)) continue;
  ------------------
  |  Branch (26454:17): [True: 0, False: 0]
  ------------------
26455|      0|            return sg->fn(&st);
26456|      0|        }
26457|      0|        janet_panicf("unexpected keyword %v", janet_wrap_keyword(key));
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26458|      0|    }
26459|      0|}
janet.c:os_getmode:
26323|      5|static jmode_t os_getmode(const Janet *argv, int32_t n) {
26324|      5|    return janet_perm_from_unix(os_get_unix_mode(argv, n));
26325|      5|}
janet.c:janet_perm_from_unix:
26251|     61|static mode_t janet_perm_from_unix(int32_t x) {
26252|     61|    return (mode_t) x;
26253|     61|}
janet.c:os_make_permstring:
26289|  1.96k|static Janet os_make_permstring(int32_t permissions) {
26290|  1.96k|    uint8_t bytes[9] = {0};
26291|  1.96k|    bytes[0] = (permissions & 0400) ? 'r' : '-';
  ------------------
  |  Branch (26291:16): [True: 565, False: 1.40k]
  ------------------
26292|  1.96k|    bytes[1] = (permissions & 0200) ? 'w' : '-';
  ------------------
  |  Branch (26292:16): [True: 88, False: 1.88k]
  ------------------
26293|  1.96k|    bytes[2] = (permissions & 0100) ? 'x' : '-';
  ------------------
  |  Branch (26293:16): [True: 911, False: 1.05k]
  ------------------
26294|  1.96k|    bytes[3] = (permissions & 0040) ? 'r' : '-';
  ------------------
  |  Branch (26294:16): [True: 506, False: 1.46k]
  ------------------
26295|  1.96k|    bytes[4] = (permissions & 0020) ? 'w' : '-';
  ------------------
  |  Branch (26295:16): [True: 435, False: 1.53k]
  ------------------
26296|  1.96k|    bytes[5] = (permissions & 0010) ? 'x' : '-';
  ------------------
  |  Branch (26296:16): [True: 1.12k, False: 841]
  ------------------
26297|  1.96k|    bytes[6] = (permissions & 0004) ? 'r' : '-';
  ------------------
  |  Branch (26297:16): [True: 1.04k, False: 929]
  ------------------
26298|  1.96k|    bytes[7] = (permissions & 0002) ? 'w' : '-';
  ------------------
  |  Branch (26298:16): [True: 999, False: 970]
  ------------------
26299|  1.96k|    bytes[8] = (permissions & 0001) ? 'x' : '-';
  ------------------
  |  Branch (26299:16): [True: 1.08k, False: 886]
  ------------------
26300|  1.96k|    return janet_stringv(bytes, sizeof(bytes));
  ------------------
  |  | 1827|  1.96k|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|  1.96k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.96k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.96k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.96k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26301|  1.96k|}
janet.c:os_get_unix_mode:
26303|  3.47k|static int32_t os_get_unix_mode(const Janet *argv, int32_t n) {
26304|  3.47k|    int32_t unix_mode;
26305|  3.47k|    if (janet_checkint(argv[n])) {
  ------------------
  |  Branch (26305:9): [True: 2.28k, False: 1.19k]
  ------------------
26306|       |        /* Integer mode */
26307|  2.28k|        int32_t x = janet_unwrap_integer(argv[n]);
  ------------------
  |  |  966|  2.28k|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|  2.28k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
26308|  2.28k|        if (x < 0 || x > 0777) {
  ------------------
  |  Branch (26308:13): [True: 1, False: 2.28k]
  |  Branch (26308:22): [True: 2, False: 2.27k]
  ------------------
26309|      3|            janet_panicf("bad slot #%d, expected integer in range [0, 8r777], got %v", n, argv[n]);
26310|      3|        }
26311|  2.27k|        unix_mode = x;
26312|  2.27k|    } else {
26313|       |        /* Bytes mode */
26314|  1.19k|        JanetByteView bytes = janet_getbytes(argv, n);
26315|  1.19k|        if (bytes.len != 9) {
  ------------------
  |  Branch (26315:13): [True: 1, False: 1.19k]
  ------------------
26316|      1|            janet_panicf("bad slot #%d: expected byte sequence of length 9, got %v", n, argv[n]);
26317|      1|        }
26318|  1.19k|        unix_mode = os_parse_permstring(bytes.bytes);
26319|  1.19k|    }
26320|  3.47k|    return unix_mode;
26321|  3.47k|}
janet.c:os_parse_permstring:
26275|  1.19k|static int32_t os_parse_permstring(const uint8_t *perm) {
26276|  1.19k|    int32_t m = 0;
26277|  1.19k|    if (perm[0] == 'r') m |= 0400;
  ------------------
  |  Branch (26277:9): [True: 359, False: 831]
  ------------------
26278|  1.19k|    if (perm[1] == 'w') m |= 0200;
  ------------------
  |  Branch (26278:9): [True: 64, False: 1.12k]
  ------------------
26279|  1.19k|    if (perm[2] == 'x') m |= 0100;
  ------------------
  |  Branch (26279:9): [True: 596, False: 594]
  ------------------
26280|  1.19k|    if (perm[3] == 'r') m |= 0040;
  ------------------
  |  Branch (26280:9): [True: 348, False: 842]
  ------------------
26281|  1.19k|    if (perm[4] == 'w') m |= 0020;
  ------------------
  |  Branch (26281:9): [True: 259, False: 931]
  ------------------
26282|  1.19k|    if (perm[5] == 'x') m |= 0010;
  ------------------
  |  Branch (26282:9): [True: 622, False: 568]
  ------------------
26283|  1.19k|    if (perm[6] == 'r') m |= 0004;
  ------------------
  |  Branch (26283:9): [True: 590, False: 600]
  ------------------
26284|  1.19k|    if (perm[7] == 'w') m |= 0002;
  ------------------
  |  Branch (26284:9): [True: 640, False: 550]
  ------------------
26285|  1.19k|    if (perm[8] == 'x') m |= 0001;
  ------------------
  |  Branch (26285:9): [True: 657, False: 533]
  ------------------
26286|  1.19k|    return m;
26287|  1.19k|}
janet.c:os_optmode:
26651|     64|static jmode_t os_optmode(int32_t argc, const Janet *argv, int32_t n, int32_t dflt) {
26652|     64|    if (argc > n) return os_getmode(argv, n);
  ------------------
  |  Branch (26652:9): [True: 5, False: 59]
  ------------------
26653|     59|    return janet_perm_from_unix(dflt);
26654|     64|}
janet.c:janet_parser_checkdead:
27711|  25.5M|static void janet_parser_checkdead(JanetParser *parser) {
27712|  25.5M|    if (parser->flag) janet_panic("parser is dead, cannot consume");
  ------------------
  |  Branch (27712:9): [True: 0, False: 25.5M]
  ------------------
27713|  25.5M|    if (parser->error) janet_panic("parser has unchecked error, cannot consume");
  ------------------
  |  Branch (27713:9): [True: 0, False: 25.5M]
  ------------------
27714|  25.5M|}
janet.c:delim_error:
27221|  2.34k|static void delim_error(JanetParser *parser, size_t stack_index, char c, const char *msg) {
27222|  2.34k|    JanetParseState *s = parser->states + stack_index;
27223|  2.34k|    JanetBuffer *buffer = janet_buffer(40);
27224|  2.34k|    if (msg) {
  ------------------
  |  Branch (27224:9): [True: 2.34k, False: 0]
  ------------------
27225|  2.34k|        janet_buffer_push_cstring(buffer, msg);
27226|  2.34k|    }
27227|  2.34k|    if (c) {
  ------------------
  |  Branch (27227:9): [True: 1.12k, False: 1.21k]
  ------------------
27228|  1.12k|        janet_buffer_push_u8(buffer, c);
27229|  1.12k|    }
27230|  2.34k|    if (stack_index > 0) {
  ------------------
  |  Branch (27230:9): [True: 1.26k, False: 1.08k]
  ------------------
27231|  1.26k|        janet_buffer_push_cstring(buffer, ", ");
27232|  1.26k|        if (s->flags & PFLAG_PARENS) {
  ------------------
  |  |27157|  1.26k|#define PFLAG_PARENS 0x400
  ------------------
  |  Branch (27232:13): [True: 380, False: 881]
  ------------------
27233|    380|            janet_buffer_push_u8(buffer, '(');
27234|    881|        } else if (s->flags & PFLAG_SQRBRACKETS) {
  ------------------
  |  |27158|    881|#define PFLAG_SQRBRACKETS 0x800
  ------------------
  |  Branch (27234:20): [True: 43, False: 838]
  ------------------
27235|     43|            janet_buffer_push_u8(buffer, '[');
27236|    838|        } else if (s->flags & PFLAG_CURLYBRACKETS) {
  ------------------
  |  |27159|    838|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
  |  Branch (27236:20): [True: 43, False: 795]
  ------------------
27237|     43|            janet_buffer_push_u8(buffer, '{');
27238|    795|        } else if (s->flags & PFLAG_STRING) {
  ------------------
  |  |27160|    795|#define PFLAG_STRING 0x2000
  ------------------
  |  Branch (27238:20): [True: 147, False: 648]
  ------------------
27239|    147|            janet_buffer_push_u8(buffer, '"');
27240|    648|        } else if (s->flags & PFLAG_LONGSTRING) {
  ------------------
  |  |27161|    648|#define PFLAG_LONGSTRING 0x4000
  ------------------
  |  Branch (27240:20): [True: 132, False: 516]
  ------------------
27241|    132|            int32_t i;
27242|  2.68k|            for (i = 0; i < s->argn; i++) {
  ------------------
  |  Branch (27242:25): [True: 2.55k, False: 132]
  ------------------
27243|  2.55k|                janet_buffer_push_u8(buffer, '`');
27244|  2.55k|            }
27245|    132|        }
27246|  1.26k|        janet_formatb(buffer, " opened at line %d, column %d", (int32_t) s->line, (int32_t) s->column);
27247|  1.26k|    }
27248|  2.34k|    parser->error = (const char *) janet_string(buffer->data, buffer->count);
27249|  2.34k|    parser->flag |= JANET_PARSER_GENERATED_ERROR;
  ------------------
  |  |27051|  2.34k|#define JANET_PARSER_GENERATED_ERROR 0x2
  ------------------
27250|  2.34k|}
janet.c:pushstate:
27167|  10.1M|static void pushstate(JanetParser *p, Consumer consumer, int flags) {
27168|  10.1M|    JanetParseState s;
27169|  10.1M|    s.counter = 0;
27170|  10.1M|    s.argn = 0;
27171|  10.1M|    s.flags = flags;
27172|  10.1M|    s.consumer = consumer;
27173|  10.1M|    s.line = p->line;
27174|  10.1M|    s.column = p->column;
27175|  10.1M|    _pushstate(p, s);
27176|  10.1M|}
janet.c:root:
27638|  11.1M|static int root(JanetParser *p, JanetParseState *state, uint8_t c) {
27639|  11.1M|    switch (c) {
27640|  4.54M|        default:
  ------------------
  |  Branch (27640:9): [True: 4.54M, False: 6.65M]
  ------------------
27641|  4.54M|            if (is_whitespace(c)) return 1;
  ------------------
  |  Branch (27641:17): [True: 1.73M, False: 2.80M]
  ------------------
27642|  2.80M|            if (!janet_is_symbol_char(c)) {
  ------------------
  |  Branch (27642:17): [True: 333, False: 2.80M]
  ------------------
27643|    333|                p->error = "unexpected character";
27644|    333|                return 1;
27645|    333|            }
27646|  2.80M|            pushstate(p, tokenchar, PFLAG_TOKEN);
  ------------------
  |  |27165|  2.80M|#define PFLAG_TOKEN 0x40000
  ------------------
27647|  2.80M|            return 0;
27648|   248k|        case '\'':
  ------------------
  |  Branch (27648:9): [True: 248k, False: 10.9M]
  ------------------
27649|   851k|        case ',':
  ------------------
  |  Branch (27649:9): [True: 602k, False: 10.5M]
  ------------------
27650|   866k|        case ';':
  ------------------
  |  Branch (27650:9): [True: 14.9k, False: 11.1M]
  ------------------
27651|  4.65M|        case '~':
  ------------------
  |  Branch (27651:9): [True: 3.78M, False: 7.40M]
  ------------------
27652|  5.91M|        case '|':
  ------------------
  |  Branch (27652:9): [True: 1.26M, False: 9.93M]
  ------------------
27653|  5.91M|            pushstate(p, root, PFLAG_READERMAC | c);
  ------------------
  |  |27162|  5.91M|#define PFLAG_READERMAC 0x8000
  ------------------
27654|  5.91M|            return 1;
27655|  28.2k|        case '"':
  ------------------
  |  Branch (27655:9): [True: 28.2k, False: 11.1M]
  ------------------
27656|  28.2k|            pushstate(p, stringchar, PFLAG_STRING);
  ------------------
  |  |27160|  28.2k|#define PFLAG_STRING 0x2000
  ------------------
27657|  28.2k|            return 1;
27658|    356|        case '#':
  ------------------
  |  Branch (27658:9): [True: 356, False: 11.1M]
  ------------------
27659|    356|            pushstate(p, comment, PFLAG_COMMENT);
  ------------------
  |  |27164|    356|#define PFLAG_COMMENT 0x20000
  ------------------
27660|    356|            return 1;
27661|   125k|        case '@':
  ------------------
  |  Branch (27661:9): [True: 125k, False: 11.0M]
  ------------------
27662|   125k|            pushstate(p, atsign, PFLAG_ATSYM);
  ------------------
  |  |27163|   125k|#define PFLAG_ATSYM 0x10000
  ------------------
27663|   125k|            return 1;
27664|  8.28k|        case '`':
  ------------------
  |  Branch (27664:9): [True: 8.28k, False: 11.1M]
  ------------------
27665|  8.28k|            pushstate(p, longstring, PFLAG_LONGSTRING);
  ------------------
  |  |27161|  8.28k|#define PFLAG_LONGSTRING 0x4000
  ------------------
27666|  8.28k|            return 1;
27667|  86.6k|        case ')':
  ------------------
  |  Branch (27667:9): [True: 86.6k, False: 11.1M]
  ------------------
27668|  91.8k|        case ']':
  ------------------
  |  Branch (27668:9): [True: 5.19k, False: 11.1M]
  ------------------
27669|   104k|        case '}': {
  ------------------
  |  Branch (27669:9): [True: 12.3k, False: 11.1M]
  ------------------
27670|   104k|            Janet ds;
27671|   104k|            if (p->statecount == 1) {
  ------------------
  |  Branch (27671:17): [True: 1.08k, False: 103k]
  ------------------
27672|  1.08k|                delim_error(p, 0, c, "unexpected closing delimiter ");
27673|  1.08k|                return 1;
27674|  1.08k|            }
27675|   103k|            if ((c == ')' && (state->flags & PFLAG_PARENS)) ||
  ------------------
  |  |27157|  85.6k|#define PFLAG_PARENS 0x400
  ------------------
  |  Branch (27675:18): [True: 85.6k, False: 17.5k]
  |  Branch (27675:30): [True: 85.5k, False: 23]
  ------------------
27676|  90.7k|                    (c == ']' && (state->flags & PFLAG_SQRBRACKETS))) {
  ------------------
  |  |27158|  5.18k|#define PFLAG_SQRBRACKETS 0x800
  ------------------
  |  Branch (27676:22): [True: 5.18k, False: 12.3k]
  |  Branch (27676:34): [True: 5.17k, False: 6]
  ------------------
27677|  90.7k|                if (state->flags & PFLAG_ATSYM) {
  ------------------
  |  |27163|  90.7k|#define PFLAG_ATSYM 0x10000
  ------------------
  |  Branch (27677:21): [True: 2.06k, False: 88.7k]
  ------------------
27678|  2.06k|                    ds = close_array(p, state);
27679|  88.7k|                } else {
27680|  88.7k|                    ds = close_tuple(p, state, c == ']' ? JANET_TUPLE_FLAG_BRACKETCTOR : 0);
  ------------------
  |  | 1798|  4.82k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (27680:48): [True: 4.82k, False: 83.8k]
  ------------------
27681|  88.7k|                }
27682|  90.7k|            } else if (c == '}' && (state->flags & PFLAG_CURLYBRACKETS)) {
  ------------------
  |  |27159|  12.3k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
  |  Branch (27682:24): [True: 12.3k, False: 29]
  |  Branch (27682:36): [True: 12.3k, False: 13]
  ------------------
27683|  12.3k|                if (state->argn & 1) {
  ------------------
  |  Branch (27683:21): [True: 4, False: 12.3k]
  ------------------
27684|      4|                    p->error = "struct and table literals expect even number of arguments";
27685|      4|                    return 1;
27686|      4|                }
27687|  12.3k|                if (state->flags & PFLAG_ATSYM) {
  ------------------
  |  |27163|  12.3k|#define PFLAG_ATSYM 0x10000
  ------------------
  |  Branch (27687:21): [True: 812, False: 11.4k]
  ------------------
27688|    812|                    ds = close_table(p, state);
27689|  11.4k|                } else {
27690|  11.4k|                    ds = close_struct(p, state);
27691|  11.4k|                }
27692|  12.3k|            } else {
27693|     42|                delim_error(p, p->statecount - 1, c, "mismatched delimiter ");
27694|     42|                return 1;
27695|     42|            }
27696|   103k|            popstate(p, ds);
27697|   103k|        }
27698|      0|        return 1;
27699|   424k|        case '(':
  ------------------
  |  Branch (27699:9): [True: 424k, False: 10.7M]
  ------------------
27700|   424k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS);
  ------------------
  |  |27155|   424k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS);
  ------------------
  |  |27157|   424k|#define PFLAG_PARENS 0x400
  ------------------
27701|   424k|            return 1;
27702|  25.8k|        case '[':
  ------------------
  |  Branch (27702:9): [True: 25.8k, False: 11.1M]
  ------------------
27703|  25.8k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS);
  ------------------
  |  |27155|  25.8k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS);
  ------------------
  |  |27158|  25.8k|#define PFLAG_SQRBRACKETS 0x800
  ------------------
27704|  25.8k|            return 1;
27705|  17.9k|        case '{':
  ------------------
  |  Branch (27705:9): [True: 17.9k, False: 11.1M]
  ------------------
27706|  17.9k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS);
  ------------------
  |  |27155|  17.9k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS);
  ------------------
  |  |27159|  17.9k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
27707|  17.9k|            return 1;
27708|  11.1M|    }
27709|  11.1M|}
janet.c:is_whitespace:
27054|  4.54M|static int is_whitespace(uint8_t c) {
27055|  4.54M|    return c == ' '
  ------------------
  |  Branch (27055:12): [True: 13.8k, False: 4.52M]
  ------------------
27056|  4.52M|           || c == '\t'
  ------------------
  |  Branch (27056:15): [True: 25.6k, False: 4.50M]
  ------------------
27057|  4.50M|           || c == '\n'
  ------------------
  |  Branch (27057:15): [True: 940k, False: 3.56M]
  ------------------
27058|  3.56M|           || c == '\r'
  ------------------
  |  Branch (27058:15): [True: 8.13k, False: 3.55M]
  ------------------
27059|  3.55M|           || c == '\0'
  ------------------
  |  Branch (27059:15): [True: 702k, False: 2.85M]
  ------------------
27060|  2.85M|           || c == '\v'
  ------------------
  |  Branch (27060:15): [True: 2.61k, False: 2.84M]
  ------------------
27061|  2.84M|           || c == '\f';
  ------------------
  |  Branch (27061:15): [True: 44.9k, False: 2.80M]
  ------------------
27062|  4.54M|}
janet.c:stringchar:
27433|  2.16M|static int stringchar(JanetParser *p, JanetParseState *state, uint8_t c) {
27434|       |    /* Enter escape */
27435|  2.16M|    if (c == '\\') {
  ------------------
  |  Branch (27435:9): [True: 7.24k, False: 2.15M]
  ------------------
27436|  7.24k|        state->consumer = escape1;
27437|  7.24k|        return 1;
27438|  7.24k|    }
27439|       |    /* String end */
27440|  2.15M|    if (c == '"') {
  ------------------
  |  Branch (27440:9): [True: 29.8k, False: 2.12M]
  ------------------
27441|  29.8k|        return stringend(p, state);
27442|  29.8k|    }
27443|       |    /* normal char */
27444|  2.12M|    if (c != '\n' && c != '\r')
  ------------------
  |  Branch (27444:9): [True: 2.11M, False: 12.7k]
  |  Branch (27444:22): [True: 2.10M, False: 7.21k]
  ------------------
27445|  2.10M|        push_buf(p, c);
27446|  2.12M|    return 1;
27447|  2.15M|}
janet.c:escape1:
27348|  7.24k|static int escape1(JanetParser *p, JanetParseState *state, uint8_t c) {
27349|  7.24k|    int e = checkescape(c);
27350|  7.24k|    if (e < 0) {
  ------------------
  |  Branch (27350:9): [True: 27, False: 7.21k]
  ------------------
27351|     27|        p->error = "invalid string escape sequence";
27352|     27|        return 1;
27353|     27|    }
27354|  7.21k|    if (c == 'x') {
  ------------------
  |  Branch (27354:9): [True: 300, False: 6.91k]
  ------------------
27355|    300|        state->counter = 2;
27356|    300|        state->argn = 0;
27357|    300|        state->consumer = escapeh;
27358|  6.91k|    } else if (c == 'u' || c == 'U') {
  ------------------
  |  Branch (27358:16): [True: 1.25k, False: 5.66k]
  |  Branch (27358:28): [True: 403, False: 5.25k]
  ------------------
27359|  1.65k|        state->counter = c == 'u' ? 4 : 6;
  ------------------
  |  Branch (27359:26): [True: 1.25k, False: 403]
  ------------------
27360|  1.65k|        state->argn = 0;
27361|  1.65k|        state->consumer = escapeu;
27362|  5.25k|    } else {
27363|  5.25k|        push_buf(p, (uint8_t) e);
27364|  5.25k|        state->consumer = stringchar;
27365|  5.25k|    }
27366|  7.21k|    return 1;
27367|  7.24k|}
janet.c:checkescape:
27252|  7.24k|static int checkescape(uint8_t c) {
27253|  7.24k|    switch (c) {
27254|     27|        default:
  ------------------
  |  Branch (27254:9): [True: 27, False: 7.21k]
  ------------------
27255|     27|            return -1;
27256|    300|        case 'x':
  ------------------
  |  Branch (27256:9): [True: 300, False: 6.94k]
  ------------------
27257|  1.55k|        case 'u':
  ------------------
  |  Branch (27257:9): [True: 1.25k, False: 5.98k]
  ------------------
27258|  1.95k|        case 'U':
  ------------------
  |  Branch (27258:9): [True: 403, False: 6.83k]
  ------------------
27259|  1.95k|            return 1;
27260|    277|        case 'n':
  ------------------
  |  Branch (27260:9): [True: 277, False: 6.96k]
  ------------------
27261|    277|            return '\n';
27262|  1.76k|        case 't':
  ------------------
  |  Branch (27262:9): [True: 1.76k, False: 5.48k]
  ------------------
27263|  1.76k|            return '\t';
27264|    560|        case 'r':
  ------------------
  |  Branch (27264:9): [True: 560, False: 6.68k]
  ------------------
27265|    560|            return '\r';
27266|    128|        case '0':
  ------------------
  |  Branch (27266:9): [True: 128, False: 7.11k]
  ------------------
27267|    128|            return '\0';
27268|    220|        case 'z':
  ------------------
  |  Branch (27268:9): [True: 220, False: 7.02k]
  ------------------
27269|    220|            return '\0';
27270|    253|        case 'f':
  ------------------
  |  Branch (27270:9): [True: 253, False: 6.98k]
  ------------------
27271|    253|            return '\f';
27272|     90|        case 'v':
  ------------------
  |  Branch (27272:9): [True: 90, False: 7.15k]
  ------------------
27273|     90|            return '\v';
27274|    225|        case 'a':
  ------------------
  |  Branch (27274:9): [True: 225, False: 7.01k]
  ------------------
27275|    225|            return '\a';
27276|    222|        case 'b':
  ------------------
  |  Branch (27276:9): [True: 222, False: 7.02k]
  ------------------
27277|    222|            return '\b';
27278|     69|        case '\'':
  ------------------
  |  Branch (27278:9): [True: 69, False: 7.17k]
  ------------------
27279|     69|            return '\'';
27280|    255|        case '?':
  ------------------
  |  Branch (27280:9): [True: 255, False: 6.98k]
  ------------------
27281|    255|            return '?';
27282|     59|        case 'e':
  ------------------
  |  Branch (27282:9): [True: 59, False: 7.18k]
  ------------------
27283|     59|            return 27;
27284|    408|        case '"':
  ------------------
  |  Branch (27284:9): [True: 408, False: 6.83k]
  ------------------
27285|    408|            return '"';
27286|    731|        case '\\':
  ------------------
  |  Branch (27286:9): [True: 731, False: 6.51k]
  ------------------
27287|    731|            return '\\';
27288|  7.24k|    }
27289|  7.24k|}
janet.c:escapeh:
27312|    597|static int escapeh(JanetParser *p, JanetParseState *state, uint8_t c) {
27313|    597|    int digit = to_hex(c);
27314|    597|    if (digit < 0) {
  ------------------
  |  Branch (27314:9): [True: 4, False: 593]
  ------------------
27315|      4|        p->error = "invalid hex digit in hex escape";
27316|      4|        return 1;
27317|      4|    }
27318|    593|    state->argn = (state->argn << 4) + digit;
27319|    593|    state->counter--;
27320|    593|    if (!state->counter) {
  ------------------
  |  Branch (27320:9): [True: 296, False: 297]
  ------------------
27321|    296|        push_buf(p, (uint8_t)(state->argn & 0xFF));
27322|    296|        state->argn = 0;
27323|    296|        state->consumer = stringchar;
27324|    296|    }
27325|    593|    return 1;
27326|    597|}
janet.c:to_hex:
27117|  7.98k|static int to_hex(uint8_t c) {
27118|  7.98k|    if (c >= '0' && c <= '9') {
  ------------------
  |  Branch (27118:9): [True: 7.96k, False: 15]
  |  Branch (27118:21): [True: 5.27k, False: 2.69k]
  ------------------
27119|  5.27k|        return c - '0';
27120|  5.27k|    } else if (c >= 'A' && c <= 'F') {
  ------------------
  |  Branch (27120:16): [True: 2.68k, False: 17]
  |  Branch (27120:28): [True: 1.84k, False: 841]
  ------------------
27121|  1.84k|        return 10 + c - 'A';
27122|  1.84k|    } else if (c >= 'a' && c <= 'f') {
  ------------------
  |  Branch (27122:16): [True: 835, False: 23]
  |  Branch (27122:28): [True: 827, False: 8]
  ------------------
27123|    827|        return 10 + c - 'a';
27124|    827|    } else {
27125|     31|        return -1;
27126|     31|    }
27127|  7.98k|}
janet.c:escapeu:
27328|  7.38k|static int escapeu(JanetParser *p, JanetParseState *state, uint8_t c) {
27329|  7.38k|    int digit = to_hex(c);
27330|  7.38k|    if (digit < 0) {
  ------------------
  |  Branch (27330:9): [True: 27, False: 7.35k]
  ------------------
27331|     27|        p->error = "invalid hex digit in unicode escape";
27332|     27|        return 1;
27333|     27|    }
27334|  7.35k|    state->argn = (state->argn << 4) + digit;
27335|  7.35k|    state->counter--;
27336|  7.35k|    if (!state->counter) {
  ------------------
  |  Branch (27336:9): [True: 1.63k, False: 5.72k]
  ------------------
27337|  1.63k|        if (state->argn > 0x10FFFF) {
  ------------------
  |  Branch (27337:13): [True: 0, False: 1.63k]
  ------------------
27338|      0|            p->error = "invalid unicode codepoint";
27339|      0|            return 1;
27340|      0|        }
27341|  1.63k|        write_codepoint(p, state->argn);
27342|  1.63k|        state->argn = 0;
27343|  1.63k|        state->consumer = stringchar;
27344|  1.63k|    }
27345|  7.35k|    return 1;
27346|  7.35k|}
janet.c:write_codepoint:
27294|  1.63k|static void write_codepoint(JanetParser *p, int32_t codepoint) {
27295|  1.63k|    if (codepoint <= 0x7F) {
  ------------------
  |  Branch (27295:9): [True: 80, False: 1.55k]
  ------------------
27296|     80|        push_buf(p, (uint8_t) codepoint);
27297|  1.55k|    } else if (codepoint <= 0x7FF) {
  ------------------
  |  Branch (27297:16): [True: 399, False: 1.15k]
  ------------------
27298|    399|        push_buf(p, (uint8_t)((codepoint >>  6) & 0x1F) | 0xC0);
27299|    399|        push_buf(p, (uint8_t)((codepoint >>  0) & 0x3F) | 0x80);
27300|  1.15k|    } else if (codepoint <= 0xFFFF) {
  ------------------
  |  Branch (27300:16): [True: 755, False: 397]
  ------------------
27301|    755|        push_buf(p, (uint8_t)((codepoint >> 12) & 0x0F) | 0xE0);
27302|    755|        push_buf(p, (uint8_t)((codepoint >>  6) & 0x3F) | 0x80);
27303|    755|        push_buf(p, (uint8_t)((codepoint >>  0) & 0x3F) | 0x80);
27304|    755|    } else {
27305|    397|        push_buf(p, (uint8_t)((codepoint >> 18) & 0x07) | 0xF0);
27306|    397|        push_buf(p, (uint8_t)((codepoint >> 12) & 0x3F) | 0x80);
27307|    397|        push_buf(p, (uint8_t)((codepoint >>  6) & 0x3F) | 0x80);
27308|    397|        push_buf(p, (uint8_t)((codepoint >>  0) & 0x3F) | 0x80);
27309|    397|    }
27310|  1.63k|}
janet.c:stringend:
27369|  74.7k|static int stringend(JanetParser *p, JanetParseState *state) {
27370|  74.7k|    Janet ret;
27371|  74.7k|    uint8_t *bufstart = p->buf;
27372|  74.7k|    int32_t buflen = (int32_t) p->bufcount;
27373|  74.7k|    if (state->flags & PFLAG_LONGSTRING) {
  ------------------
  |  |27161|  74.7k|#define PFLAG_LONGSTRING 0x4000
  ------------------
  |  Branch (27373:9): [True: 44.8k, False: 29.8k]
  ------------------
27374|       |        /* Post process to remove leading whitespace */
27375|  44.8k|        JanetParseState top = p->states[p->statecount - 1];
27376|  44.8k|        int32_t indent_col = (int32_t) top.column - 1;
27377|  44.8k|        uint8_t *r = bufstart, *end = r + buflen;
27378|       |        /* Unless there are only spaces before EOLs, disable reindenting */
27379|  44.8k|        int reindent = 1;
27380|  1.00M|        while (reindent && (r < end)) {
  ------------------
  |  Branch (27380:16): [True: 1.00M, False: 1.32k]
  |  Branch (27380:28): [True: 961k, False: 43.5k]
  ------------------
27381|   961k|            if (*r++ == '\n') {
  ------------------
  |  Branch (27381:17): [True: 6.59k, False: 955k]
  ------------------
27382|  7.12k|                for (int32_t j = 0; (r < end) && (*r != '\n') && (j < indent_col); j++, r++) {
  ------------------
  |  Branch (27382:37): [True: 5.83k, False: 1.29k]
  |  Branch (27382:50): [True: 3.60k, False: 2.22k]
  |  Branch (27382:66): [True: 1.86k, False: 1.73k]
  ------------------
27383|  1.86k|                    if (*r != ' ') {
  ------------------
  |  Branch (27383:25): [True: 1.33k, False: 537]
  ------------------
27384|  1.33k|                        reindent = 0;
27385|  1.33k|                        break;
27386|  1.33k|                    }
27387|  1.86k|                }
27388|  6.59k|                if ((r + 1) < end && *r == '\r' && *(r + 1) == '\n') reindent = 1;
  ------------------
  |  Branch (27388:21): [True: 5.13k, False: 1.45k]
  |  Branch (27388:38): [True: 187, False: 4.94k]
  |  Branch (27388:52): [True: 144, False: 43]
  ------------------
27389|  6.59k|            }
27390|   961k|        }
27391|       |        /* Now reindent if able */
27392|  44.8k|        if (reindent) {
  ------------------
  |  Branch (27392:13): [True: 43.5k, False: 1.32k]
  ------------------
27393|  43.5k|            uint8_t *w = bufstart;
27394|  43.5k|            r = bufstart;
27395|   988k|            while (r < end) {
  ------------------
  |  Branch (27395:20): [True: 944k, False: 43.5k]
  ------------------
27396|   944k|                if (*r == '\n') {
  ------------------
  |  Branch (27396:21): [True: 4.50k, False: 940k]
  ------------------
27397|  4.50k|                    *w++ = *r++;
27398|  4.99k|                    for (int32_t j = 0; (r < end) && (*r != '\n') && (j < indent_col); j++, r++);
  ------------------
  |  Branch (27398:41): [True: 3.69k, False: 1.29k]
  |  Branch (27398:54): [True: 2.22k, False: 1.47k]
  |  Branch (27398:70): [True: 488, False: 1.73k]
  ------------------
27399|  4.50k|                    if ((r + 1) < end && *r == '\r' && *(r + 1) == '\n') *w++ = *r++;
  ------------------
  |  Branch (27399:25): [True: 3.17k, False: 1.33k]
  |  Branch (27399:42): [True: 177, False: 2.99k]
  |  Branch (27399:56): [True: 141, False: 36]
  ------------------
27400|   940k|                } else {
27401|   940k|                    *w++ = *r++;
27402|   940k|                }
27403|   944k|            }
27404|  43.5k|            buflen = (int32_t)(w - bufstart);
27405|  43.5k|        }
27406|       |        /* Check for leading EOL so we can remove it */
27407|  44.8k|        if (buflen > 1 && bufstart[0] == '\r' && bufstart[1] == '\n') { /* Windows EOL */
  ------------------
  |  Branch (27407:13): [True: 43.3k, False: 1.53k]
  |  Branch (27407:27): [True: 615, False: 42.7k]
  |  Branch (27407:50): [True: 491, False: 124]
  ------------------
27408|    491|            buflen = buflen - 2;
27409|    491|            bufstart = bufstart + 2;
27410|  44.4k|        } else if (buflen > 0 && bufstart[0] == '\n') { /* Unix EOL */
  ------------------
  |  Branch (27410:20): [True: 44.4k, False: 0]
  |  Branch (27410:34): [True: 1.04k, False: 43.3k]
  ------------------
27411|  1.04k|            buflen--;
27412|  1.04k|            bufstart++;
27413|  1.04k|        }
27414|       |        /* Check for trailing EOL so we can remove it */
27415|  44.8k|        if (buflen > 1 && bufstart[buflen - 2] == '\r' && bufstart[buflen - 1] == '\n') { /* Windows EOL */
  ------------------
  |  Branch (27415:13): [True: 43.0k, False: 1.88k]
  |  Branch (27415:27): [True: 342, False: 42.6k]
  |  Branch (27415:59): [True: 237, False: 105]
  ------------------
27416|    237|            buflen = buflen - 2;
27417|  44.6k|        } else if (buflen > 0 && bufstart[buflen - 1] == '\n') { /* Unix EOL */
  ------------------
  |  Branch (27417:20): [True: 44.2k, False: 370]
  |  Branch (27417:34): [True: 720, False: 43.5k]
  ------------------
27418|    720|            buflen--;
27419|    720|        }
27420|  44.8k|    }
27421|  74.7k|    if (state->flags & PFLAG_BUFFER) {
  ------------------
  |  |27156|  74.7k|#define PFLAG_BUFFER 0x200
  ------------------
  |  Branch (27421:9): [True: 38.5k, False: 36.2k]
  ------------------
27422|  38.5k|        JanetBuffer *b = janet_buffer(buflen);
27423|  38.5k|        janet_buffer_push_bytes(b, bufstart, buflen);
27424|  38.5k|        ret = janet_wrap_buffer(b);
  ------------------
  |  |  847|  38.5k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|  38.5k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  38.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  38.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27425|  38.5k|    } else {
27426|  36.2k|        ret = janet_wrap_string(janet_string(bufstart, buflen));
  ------------------
  |  |  848|  36.2k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  36.2k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  36.2k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  36.2k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27427|  36.2k|    }
27428|  74.7k|    p->bufcount = 0;
27429|  74.7k|    popstate(p, ret);
27430|  74.7k|    return 1;
27431|  74.7k|}
janet.c:comment:
27515|  1.06M|static int comment(JanetParser *p, JanetParseState *state, uint8_t c) {
27516|  1.06M|    (void) state;
27517|  1.06M|    if (c == '\n') {
  ------------------
  |  Branch (27517:9): [True: 319, False: 1.06M]
  ------------------
27518|    319|        p->statecount--;
27519|    319|        p->bufcount = 0;
27520|  1.06M|    } else {
27521|  1.06M|        push_buf(p, c);
27522|  1.06M|    }
27523|  1.06M|    return 1;
27524|  1.06M|}
janet.c:atsign:
27610|   125k|static int atsign(JanetParser *p, JanetParseState *state, uint8_t c) {
27611|   125k|    (void) state;
27612|   125k|    p->statecount--;
27613|   125k|    switch (c) {
27614|    908|        case '{':
  ------------------
  |  Branch (27614:9): [True: 908, False: 124k]
  ------------------
27615|    908|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27155|    908|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27159|    908|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27163|    908|#define PFLAG_ATSYM 0x10000
  ------------------
27616|    908|            return 1;
27617|  1.77k|        case '"':
  ------------------
  |  Branch (27617:9): [True: 1.77k, False: 123k]
  ------------------
27618|  1.77k|            pushstate(p, stringchar, PFLAG_BUFFER | PFLAG_STRING);
  ------------------
  |  |27156|  1.77k|#define PFLAG_BUFFER 0x200
  ------------------
                          pushstate(p, stringchar, PFLAG_BUFFER | PFLAG_STRING);
  ------------------
  |  |27160|  1.77k|#define PFLAG_STRING 0x2000
  ------------------
27619|  1.77k|            return 1;
27620|  36.7k|        case '`':
  ------------------
  |  Branch (27620:9): [True: 36.7k, False: 88.4k]
  ------------------
27621|  36.7k|            pushstate(p, longstring, PFLAG_BUFFER | PFLAG_LONGSTRING);
  ------------------
  |  |27156|  36.7k|#define PFLAG_BUFFER 0x200
  ------------------
                          pushstate(p, longstring, PFLAG_BUFFER | PFLAG_LONGSTRING);
  ------------------
  |  |27161|  36.7k|#define PFLAG_LONGSTRING 0x4000
  ------------------
27622|  36.7k|            return 1;
27623|    370|        case '[':
  ------------------
  |  Branch (27623:9): [True: 370, False: 124k]
  ------------------
27624|    370|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27155|    370|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27158|    370|#define PFLAG_SQRBRACKETS 0x800
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |27163|    370|#define PFLAG_ATSYM 0x10000
  ------------------
27625|    370|            return 1;
27626|  7.56k|        case '(':
  ------------------
  |  Branch (27626:9): [True: 7.56k, False: 117k]
  ------------------
27627|  7.56k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS | PFLAG_ATSYM);
  ------------------
  |  |27155|  7.56k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS | PFLAG_ATSYM);
  ------------------
  |  |27157|  7.56k|#define PFLAG_PARENS 0x400
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS | PFLAG_ATSYM);
  ------------------
  |  |27163|  7.56k|#define PFLAG_ATSYM 0x10000
  ------------------
27628|  7.56k|            return 1;
27629|  77.8k|        default:
  ------------------
  |  Branch (27629:9): [True: 77.8k, False: 47.3k]
  ------------------
27630|  77.8k|            break;
27631|   125k|    }
27632|  77.8k|    pushstate(p, tokenchar, PFLAG_TOKEN);
  ------------------
  |  |27165|  77.8k|#define PFLAG_TOKEN 0x40000
  ------------------
27633|  77.8k|    push_buf(p, '@'); /* Push the leading at-sign that was dropped */
27634|  77.8k|    return 0;
27635|   125k|}
janet.c:longstring:
27566|  2.92M|static int longstring(JanetParser *p, JanetParseState *state, uint8_t c) {
27567|  2.92M|    if (state->flags & PFLAG_INSTRING) {
  ------------------
  |  |27564|  2.92M|#define PFLAG_INSTRING 0x100000
  ------------------
  |  Branch (27567:9): [True: 2.81M, False: 110k]
  ------------------
27568|       |        /* We are inside the long string */
27569|  2.81M|        if (c == '`') {
  ------------------
  |  Branch (27569:13): [True: 46.2k, False: 2.77M]
  ------------------
27570|  46.2k|            state->flags |= PFLAG_END_CANDIDATE;
  ------------------
  |  |27565|  46.2k|#define PFLAG_END_CANDIDATE 0x200000
  ------------------
27571|  46.2k|            state->flags &= ~PFLAG_INSTRING;
  ------------------
  |  |27564|  46.2k|#define PFLAG_INSTRING 0x100000
  ------------------
27572|  46.2k|            state->counter = 1; /* Use counter to keep track of number of '=' seen */
27573|  46.2k|            return 1;
27574|  46.2k|        }
27575|  2.77M|        push_buf(p, c);
27576|  2.77M|        return 1;
27577|  2.81M|    } else if (state->flags & PFLAG_END_CANDIDATE) {
  ------------------
  |  |27565|   110k|#define PFLAG_END_CANDIDATE 0x200000
  ------------------
  |  Branch (27577:16): [True: 57.2k, False: 53.1k]
  ------------------
27578|  57.2k|        int i;
27579|       |        /* We are checking a potential end of the string */
27580|  57.2k|        if (state->counter == state->argn) {
  ------------------
  |  Branch (27580:13): [True: 44.8k, False: 12.3k]
  ------------------
27581|  44.8k|            stringend(p, state);
27582|  44.8k|            return 0;
27583|  44.8k|        }
27584|  12.3k|        if (c == '`' && state->counter < state->argn) {
  ------------------
  |  Branch (27584:13): [True: 10.9k, False: 1.37k]
  |  Branch (27584:25): [True: 10.9k, False: 0]
  ------------------
27585|  10.9k|            state->counter++;
27586|  10.9k|            return 1;
27587|  10.9k|        }
27588|       |        /* Failed end candidate */
27589|  8.05k|        for (i = 0; i < state->counter; i++) {
  ------------------
  |  Branch (27589:21): [True: 6.67k, False: 1.37k]
  ------------------
27590|  6.67k|            push_buf(p, '`');
27591|  6.67k|        }
27592|  1.37k|        push_buf(p, c);
27593|  1.37k|        state->counter = 0;
27594|  1.37k|        state->flags &= ~PFLAG_END_CANDIDATE;
  ------------------
  |  |27565|  1.37k|#define PFLAG_END_CANDIDATE 0x200000
  ------------------
27595|  1.37k|        state->flags |= PFLAG_INSTRING;
  ------------------
  |  |27564|  1.37k|#define PFLAG_INSTRING 0x100000
  ------------------
27596|  1.37k|        return 1;
27597|  53.1k|    } else {
27598|       |        /* We are at beginning of string */
27599|  53.1k|        state->argn++;
27600|  53.1k|        if (c != '`') {
  ------------------
  |  Branch (27600:13): [True: 45.0k, False: 8.11k]
  ------------------
27601|  45.0k|            state->flags |= PFLAG_INSTRING;
  ------------------
  |  |27564|  45.0k|#define PFLAG_INSTRING 0x100000
  ------------------
27602|  45.0k|            push_buf(p, c);
27603|  45.0k|        }
27604|  53.1k|        return 1;
27605|  53.1k|    }
27606|  2.92M|}
janet.c:close_array:
27534|  2.06k|static Janet close_array(JanetParser *p, JanetParseState *state) {
27535|  2.06k|    JanetArray *array = janet_array(state->argn);
27536|  58.0k|    for (int32_t i = state->argn - 1; i >= 0; i--)
  ------------------
  |  Branch (27536:39): [True: 56.0k, False: 2.06k]
  ------------------
27537|  56.0k|        array->data[i] = p->args[--p->argcount];
27538|  2.06k|    array->count = state->argn;
27539|  2.06k|    return janet_wrap_array(array);
  ------------------
  |  |  845|  2.06k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  2.06k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.06k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.06k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27540|  2.06k|}
janet.c:close_tuple:
27526|  88.7k|static Janet close_tuple(JanetParser *p, JanetParseState *state, int32_t flag) {
27527|  88.7k|    Janet *ret = janet_tuple_begin(state->argn);
27528|  88.7k|    janet_tuple_flag(ret) |= flag;
  ------------------
  |  | 1806|  88.7k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  88.7k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27529|  2.07M|    for (int32_t i = state->argn - 1; i >= 0; i--)
  ------------------
  |  Branch (27529:39): [True: 1.98M, False: 88.7k]
  ------------------
27530|  1.98M|        ret[i] = p->args[--p->argcount];
27531|  88.7k|    return janet_wrap_tuple(janet_tuple_end(ret));
  ------------------
  |  |  843|  88.7k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  88.7k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  88.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  88.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27532|  88.7k|}
janet.c:close_table:
27553|    812|static Janet close_table(JanetParser *p, JanetParseState *state) {
27554|    812|    JanetTable *table = janet_table(state->argn >> 1);
27555|  2.38k|    for (size_t i = p->argcount - state->argn; i < p->argcount; i += 2) {
  ------------------
  |  Branch (27555:48): [True: 1.56k, False: 812]
  ------------------
27556|  1.56k|        Janet key = p->args[i];
27557|  1.56k|        Janet value = p->args[i + 1];
27558|  1.56k|        janet_table_put(table, key, value);
27559|  1.56k|    }
27560|    812|    p->argcount -= state->argn;
27561|    812|    return janet_wrap_table(table);
  ------------------
  |  |  846|    812|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|    812|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    812|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    812|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27562|    812|}
janet.c:close_struct:
27542|  11.4k|static Janet close_struct(JanetParser *p, JanetParseState *state) {
27543|  11.4k|    JanetKV *st = janet_struct_begin(state->argn >> 1);
27544|  39.7k|    for (size_t i = p->argcount - state->argn; i < p->argcount; i += 2) {
  ------------------
  |  Branch (27544:48): [True: 28.2k, False: 11.4k]
  ------------------
27545|  28.2k|        Janet key = p->args[i];
27546|  28.2k|        Janet value = p->args[i + 1];
27547|  28.2k|        janet_struct_put(st, key, value);
27548|  28.2k|    }
27549|  11.4k|    p->argcount -= state->argn;
27550|  11.4k|    return janet_wrap_struct(janet_struct_end(st));
  ------------------
  |  |  842|  11.4k|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|  11.4k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  11.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  11.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27551|  11.4k|}
janet.c:popstate:
27178|  3.05M|static void popstate(JanetParser *p, Janet val) {
27179|  8.94M|    for (;;) {
27180|  8.94M|        JanetParseState top = p->states[--p->statecount];
27181|  8.94M|        JanetParseState *newtop = p->states + p->statecount - 1;
27182|       |        /* Source mapping info */
27183|  8.94M|        if (janet_checktype(val, JANET_TUPLE)) {
  ------------------
  |  |  806|  8.94M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 5.97M, False: 2.96M]
  |  |  |  Branch (806:6): [Folded, False: 8.94M]
  |  |  ------------------
  |  |  807|  8.94M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  8.94M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  8.94M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  8.94M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.94M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.94M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27184|  5.97M|            janet_tuple_sm_line(janet_unwrap_tuple(val)) = (int32_t) top.line;
  ------------------
  |  | 1804|  5.97M|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1800|  5.97M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27185|  5.97M|            janet_tuple_sm_column(janet_unwrap_tuple(val)) = (int32_t) top.column;
  ------------------
  |  | 1805|  5.97M|#define janet_tuple_sm_column(t) (janet_tuple_head(t)->sm_column)
  |  |  ------------------
  |  |  |  | 1800|  5.97M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27186|  5.97M|        }
27187|  8.94M|        if (newtop->flags & PFLAG_CONTAINER) {
  ------------------
  |  |27155|  8.94M|#define PFLAG_CONTAINER 0x100
  ------------------
  |  Branch (27187:13): [True: 3.05M, False: 5.88M]
  ------------------
27188|  3.05M|            newtop->argn++;
27189|       |            /* Keep track of number of values in the root state */
27190|  3.05M|            if (p->statecount == 1) {
  ------------------
  |  Branch (27190:17): [True: 243k, False: 2.81M]
  ------------------
27191|   243k|                p->pending++;
27192|       |                /* Root items are always wrapped in a tuple for source map info. */
27193|   243k|                const Janet *tup = janet_tuple_n(&val, 1);
27194|   243k|                janet_tuple_sm_line(tup) = (int32_t) top.line;
  ------------------
  |  | 1804|   243k|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1800|   243k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27195|   243k|                janet_tuple_sm_column(tup) = (int32_t) top.column;
  ------------------
  |  | 1805|   243k|#define janet_tuple_sm_column(t) (janet_tuple_head(t)->sm_column)
  |  |  ------------------
  |  |  |  | 1800|   243k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27196|   243k|                val = janet_wrap_tuple(tup);
  ------------------
  |  |  843|   243k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|   243k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   243k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   243k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27197|   243k|            }
27198|  3.05M|            push_arg(p, val);
27199|  3.05M|            return;
27200|  5.88M|        } else if (newtop->flags & PFLAG_READERMAC) {
  ------------------
  |  |27162|  5.88M|#define PFLAG_READERMAC 0x8000
  ------------------
  |  Branch (27200:20): [True: 5.88M, False: 0]
  ------------------
27201|  5.88M|            Janet *t = janet_tuple_begin(2);
27202|  5.88M|            int c = newtop->flags & 0xFF;
27203|  5.88M|            const char *which =
27204|  5.88M|                (c == '\'') ? "quote" :
  ------------------
  |  Branch (27204:17): [True: 248k, False: 5.63M]
  ------------------
27205|  5.88M|                (c == ',') ? "unquote" :
  ------------------
  |  Branch (27205:17): [True: 602k, False: 5.03M]
  ------------------
27206|  5.63M|                (c == ';') ? "splice" :
  ------------------
  |  Branch (27206:17): [True: 14.8k, False: 5.01M]
  ------------------
27207|  5.03M|                (c == '|') ? "short-fn" :
  ------------------
  |  Branch (27207:17): [True: 1.25M, False: 3.75M]
  ------------------
27208|  5.01M|                (c == '~') ? "quasiquote" : "<unknown>";
  ------------------
  |  Branch (27208:17): [True: 3.75M, False: 0]
  ------------------
27209|  5.88M|            t[0] = janet_csymbolv(which);
  ------------------
  |  | 1837|  5.88M|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  5.88M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  5.88M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  5.88M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  5.88M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27210|  5.88M|            t[1] = val;
27211|       |            /* Quote source mapping info */
27212|  5.88M|            janet_tuple_sm_line(t) = (int32_t) newtop->line;
  ------------------
  |  | 1804|  5.88M|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1800|  5.88M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27213|  5.88M|            janet_tuple_sm_column(t) = (int32_t) newtop->column;
  ------------------
  |  | 1805|  5.88M|#define janet_tuple_sm_column(t) (janet_tuple_head(t)->sm_column)
  |  |  ------------------
  |  |  |  | 1800|  5.88M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27214|  5.88M|            val = janet_wrap_tuple(janet_tuple_end(t));
  ------------------
  |  |  843|  5.88M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  5.88M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.88M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.88M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27215|  5.88M|        } else {
27216|      0|            return;
27217|      0|        }
27218|  8.94M|    }
27219|  3.05M|}
janet.c:parsergc:
27895|   695k|static int parsergc(void *p, size_t size) {
27896|   695k|    JanetParser *parser = (JanetParser *)p;
27897|   695k|    (void) size;
27898|   695k|    janet_parser_deinit(parser);
27899|   695k|    return 0;
27900|   695k|}
janet.c:parsermark:
27882|  9.23k|static int parsermark(void *p, size_t size) {
27883|  9.23k|    size_t i;
27884|  9.23k|    JanetParser *parser = (JanetParser *)p;
27885|  9.23k|    (void) size;
27886|  9.23k|    for (i = 0; i < parser->argcount; i++) {
  ------------------
  |  Branch (27886:17): [True: 0, False: 9.23k]
  ------------------
27887|      0|        janet_mark(parser->args[i]);
27888|      0|    }
27889|  9.23k|    if (parser->flag & JANET_PARSER_GENERATED_ERROR) {
  ------------------
  |  |27051|  9.23k|#define JANET_PARSER_GENERATED_ERROR 0x2
  ------------------
  |  Branch (27889:9): [True: 0, False: 9.23k]
  ------------------
27890|      0|        janet_mark(janet_wrap_string((const uint8_t *) parser->error));
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27891|      0|    }
27892|  9.23k|    return 0;
27893|  9.23k|}
janet.c:tokenchar:
27462|  13.1M|static int tokenchar(JanetParser *p, JanetParseState *state, uint8_t c) {
27463|  13.1M|    Janet ret;
27464|  13.1M|    double numval;
27465|  13.1M|    int32_t blen;
27466|  13.1M|    if (janet_is_symbol_char(c)) {
  ------------------
  |  Branch (27466:9): [True: 10.3M, False: 2.88M]
  ------------------
27467|  10.3M|        push_buf(p, (uint8_t) c);
27468|  10.3M|        if (c > 127) state->argn = 1; /* Use to indicate non ascii */
  ------------------
  |  Branch (27468:13): [True: 22.1k, False: 10.2M]
  ------------------
27469|  10.3M|        return 1;
27470|  10.3M|    }
27471|       |    /* Token finished */
27472|  2.88M|    blen = (int32_t) p->bufcount;
27473|  2.88M|    int start_dig = p->buf[0] >= '0' && p->buf[0] <= '9';
  ------------------
  |  Branch (27473:21): [True: 1.33M, False: 1.54M]
  |  Branch (27473:41): [True: 674k, False: 660k]
  ------------------
27474|  2.88M|    int start_num = start_dig || p->buf[0] == '-' || p->buf[0] == '+' || p->buf[0] == '.';
  ------------------
  |  Branch (27474:21): [True: 674k, False: 2.20M]
  |  Branch (27474:34): [True: 161k, False: 2.04M]
  |  Branch (27474:54): [True: 421k, False: 1.62M]
  |  Branch (27474:74): [True: 3.98k, False: 1.62M]
  ------------------
27475|  2.88M|    if (p->buf[0] == ':') {
  ------------------
  |  Branch (27475:9): [True: 71.6k, False: 2.80M]
  ------------------
27476|       |        /* Don't do full utf-8 check unless we have seen non ascii characters. */
27477|  71.6k|        int valid = (!state->argn) || janet_valid_utf8(p->buf + 1, blen - 1);
  ------------------
  |  Branch (27477:21): [True: 71.0k, False: 623]
  |  Branch (27477:39): [True: 601, False: 22]
  ------------------
27478|  71.6k|        if (!valid) {
  ------------------
  |  Branch (27478:13): [True: 22, False: 71.6k]
  ------------------
27479|     22|            p->error = "invalid utf-8 in keyword";
27480|     22|            return 0;
27481|     22|        }
27482|  71.6k|        ret = janet_keywordv(p->buf + 1, blen - 1);
  ------------------
  |  | 1842|  71.6k|#define janet_keywordv(str, len) janet_wrap_keyword(janet_keyword((str), (len)))
  |  |  ------------------
  |  |  |  |  850|  71.6k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  71.6k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  71.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  71.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27483|  71.6k|#ifdef JANET_INT_TYPES
27484|  2.80M|    } else if (start_num && !janet_scan_numeric(p->buf, blen, &ret)) {
  ------------------
  |  Branch (27484:16): [True: 1.26M, False: 1.54M]
  |  Branch (27484:29): [True: 681k, False: 579k]
  ------------------
27485|   681k|        (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|  2.12M|    } else if (!check_str_const("nil", p->buf, blen)) {
  ------------------
  |  Branch (27490:16): [True: 774, False: 2.12M]
  ------------------
27491|    774|        ret = janet_wrap_nil();
  ------------------
  |  |  831|    774|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    774|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    774|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    774|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27492|  2.12M|    } else if (!check_str_const("false", p->buf, blen)) {
  ------------------
  |  Branch (27492:16): [True: 505, False: 2.12M]
  ------------------
27493|    505|        ret = janet_wrap_false();
  ------------------
  |  |  833|    505|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|    505|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    505|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    505|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27494|  2.12M|    } else if (!check_str_const("true", p->buf, blen)) {
  ------------------
  |  Branch (27494:16): [True: 79, False: 2.12M]
  ------------------
27495|     79|        ret = janet_wrap_true();
  ------------------
  |  |  832|     79|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  822|     79|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     79|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     79|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27496|  2.12M|    } else {
27497|  2.12M|        if (start_dig) {
  ------------------
  |  Branch (27497:13): [True: 289, False: 2.12M]
  ------------------
27498|    289|            p->error = "symbol literal cannot start with a digit";
27499|    289|            return 0;
27500|  2.12M|        } else {
27501|       |            /* Don't do full utf-8 check unless we have seen non ascii characters. */
27502|  2.12M|            int valid = (!state->argn) || janet_valid_utf8(p->buf, blen);
  ------------------
  |  Branch (27502:25): [True: 2.12M, False: 4.96k]
  |  Branch (27502:43): [True: 4.04k, False: 925]
  ------------------
27503|  2.12M|            if (!valid) {
  ------------------
  |  Branch (27503:17): [True: 925, False: 2.12M]
  ------------------
27504|    925|                p->error = "invalid utf-8 in symbol";
27505|    925|                return 0;
27506|    925|            }
27507|  2.12M|            ret = janet_symbolv(p->buf, blen);
  ------------------
  |  | 1836|  2.12M|#define janet_symbolv(str, len) janet_wrap_symbol(janet_symbol((str), (len)))
  |  |  ------------------
  |  |  |  |  849|  2.12M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  2.12M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  2.12M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  2.12M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27508|  2.12M|        }
27509|  2.12M|    }
27510|  2.87M|    p->bufcount = 0;
27511|  2.87M|    popstate(p, ret);
27512|  2.87M|    return 0;
27513|  2.88M|}
janet.c:check_str_const:
27450|  6.38M|static int check_str_const(const char *cstr, const uint8_t *str, int32_t len) {
27451|  6.38M|    int32_t index;
27452|  6.40M|    for (index = 0; index < len; index++) {
  ------------------
  |  Branch (27452:21): [True: 6.39M, False: 12.9k]
  ------------------
27453|  6.39M|        uint8_t c = str[index];
27454|  6.39M|        uint8_t k = ((const uint8_t *)cstr)[index];
27455|  6.39M|        if (c < k) return -1;
  ------------------
  |  Branch (27455:13): [True: 5.97M, False: 417k]
  ------------------
27456|   417k|        if (c > k) return 1;
  ------------------
  |  Branch (27456:13): [True: 394k, False: 22.9k]
  ------------------
27457|  22.9k|        if (k == '\0') break;
  ------------------
  |  Branch (27457:13): [True: 0, False: 22.9k]
  ------------------
27458|  22.9k|    }
27459|  12.9k|    return (cstr[index] == '\0') ? 0 : -1;
  ------------------
  |  Branch (27459:12): [True: 1.35k, False: 11.6k]
  ------------------
27460|  6.38M|}
janet.c:parser_state_delimiters:
28200|   366k|static Janet parser_state_delimiters(const JanetParser *_p) {
28201|   366k|    JanetParser *p = (JanetParser *)_p;
28202|   366k|    size_t i;
28203|   366k|    const uint8_t *str;
28204|   366k|    size_t oldcount;
28205|   366k|    oldcount = p->bufcount;
28206|   733k|    for (i = 0; i < p->statecount; i++) {
  ------------------
  |  Branch (28206:17): [True: 366k, False: 366k]
  ------------------
28207|   366k|        JanetParseState *s = p->states + i;
28208|   366k|        if (s->flags & PFLAG_PARENS) {
  ------------------
  |  |27157|   366k|#define PFLAG_PARENS 0x400
  ------------------
  |  Branch (28208:13): [True: 0, False: 366k]
  ------------------
28209|      0|            push_buf(p, '(');
28210|   366k|        } else if (s->flags & PFLAG_SQRBRACKETS) {
  ------------------
  |  |27158|   366k|#define PFLAG_SQRBRACKETS 0x800
  ------------------
  |  Branch (28210:20): [True: 0, False: 366k]
  ------------------
28211|      0|            push_buf(p, '[');
28212|   366k|        } else if (s->flags & PFLAG_CURLYBRACKETS) {
  ------------------
  |  |27159|   366k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
  |  Branch (28212:20): [True: 0, False: 366k]
  ------------------
28213|      0|            push_buf(p, '{');
28214|   366k|        } else if (s->flags & PFLAG_STRING) {
  ------------------
  |  |27160|   366k|#define PFLAG_STRING 0x2000
  ------------------
  |  Branch (28214:20): [True: 0, False: 366k]
  ------------------
28215|      0|            push_buf(p, '"');
28216|   366k|        } else if (s->flags & PFLAG_LONGSTRING) {
  ------------------
  |  |27161|   366k|#define PFLAG_LONGSTRING 0x4000
  ------------------
  |  Branch (28216:20): [True: 0, False: 366k]
  ------------------
28217|      0|            int32_t i;
28218|      0|            for (i = 0; i < s->argn; i++) {
  ------------------
  |  Branch (28218:25): [True: 0, False: 0]
  ------------------
28219|      0|                push_buf(p, '`');
28220|      0|            }
28221|      0|        }
28222|   366k|    }
28223|       |    /* avoid ptr arithmetic on NULL */
28224|   366k|    str = janet_string(oldcount ? p->buf + oldcount : p->buf, (int32_t)(p->bufcount - oldcount));
  ------------------
  |  Branch (28224:24): [True: 0, False: 366k]
  ------------------
28225|   366k|    p->bufcount = oldcount;
28226|   366k|    return janet_wrap_string(str);
  ------------------
  |  |  848|   366k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|   366k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   366k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   366k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28227|   366k|}
janet.c:parserget:
28318|  4.16M|static int parserget(void *p, Janet key, Janet *out) {
28319|  4.16M|    (void) p;
28320|  4.16M|    if (!janet_checktype(key, JANET_KEYWORD)) return 0;
  ------------------
  |  |  806|  4.16M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 4.16M]
  |  |  ------------------
  |  |  807|  4.16M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.16M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  4.16M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  4.16M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.16M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.16M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (28320:9): [True: 0, False: 4.16M]
  ------------------
28321|  4.16M|    return janet_getmethod(janet_unwrap_keyword(key), parser_methods, out);
  ------------------
  |  |  865|  4.16M|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
28322|  4.16M|}
janet.c:size_padded:
29988|   270k|static size_t size_padded(size_t offset, size_t size) {
29989|   270k|    size_t x = size + offset - 1;
29990|   270k|    return x - (x % size);
29991|   270k|}
janet.c:compile_peg:
30263|   135k|static JanetPeg *compile_peg(Janet x) {
30264|   135k|    Builder builder;
30265|   135k|    builder.grammar = janet_table(0);
30266|   135k|    builder.default_grammar = NULL;
30267|   135k|    {
30268|   135k|        Janet default_grammarv = janet_dyn("peg-grammar");
30269|   135k|        if (janet_checktype(default_grammarv, JANET_TABLE)) {
  ------------------
  |  |  806|   135k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 135k, False: 284]
  |  |  |  Branch (806:6): [Folded, False: 135k]
  |  |  ------------------
  |  |  807|   135k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   135k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   135k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   135k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   135k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   135k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30270|   135k|            builder.default_grammar = janet_unwrap_table(default_grammarv);
  ------------------
  |  |  861|   135k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
30271|   135k|        }
30272|   135k|    }
30273|   135k|    builder.tags = janet_table(0);
30274|   135k|    builder.constants = NULL;
30275|   135k|    builder.bytecode = NULL;
30276|   135k|    builder.nexttag = 1;
30277|   135k|    builder.form = x;
30278|   135k|    builder.depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|   135k|#define JANET_RECURSION_GUARD 1024
  ------------------
30279|   135k|    builder.has_backref = 0;
30280|   135k|    peg_compile1(&builder, x);
30281|   135k|    JanetPeg *peg = make_peg(&builder);
30282|   135k|    builder_cleanup(&builder);
30283|   135k|    return peg;
30284|   135k|}
janet.c:peg_compile1:
29799|   852k|static uint32_t peg_compile1(Builder *b, Janet peg) {
29800|       |
29801|       |    /* Keep track of the form being compiled for error purposes */
29802|   852k|    Janet old_form = b->form;
29803|   852k|    JanetTable *old_grammar = b->grammar;
29804|   852k|    b->form = peg;
29805|       |
29806|       |    /* Resolve keyword references */
29807|   852k|    int i = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|   852k|#define JANET_RECURSION_GUARD 1024
  ------------------
29808|   852k|    JanetTable *grammar = old_grammar;
29809|   861k|    for (; i > 0 && janet_checktype(peg, JANET_KEYWORD); --i) {
  ------------------
  |  |  806|   861k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 8.86k, False: 852k]
  |  |  |  Branch (806:6): [Folded, False: 861k]
  |  |  ------------------
  |  |  807|   861k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   861k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   861k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   861k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   861k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   861k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29809:12): [True: 861k, False: 0]
  ------------------
29810|  8.86k|        Janet nextPeg = janet_table_get_ex(grammar, peg, &grammar);
29811|  8.86k|        if (!grammar || janet_checktype(nextPeg, JANET_NIL)) {
  ------------------
  |  |  806|  8.86k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 8.86k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 8.86k]
  |  |  ------------------
  |  |  807|  8.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|  8.86k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  8.86k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  8.86k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.86k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.86k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29811:13): [True: 0, False: 8.86k]
  ------------------
29812|  8.86k|            nextPeg = (b->default_grammar == NULL)
  ------------------
  |  Branch (29812:23): [True: 3, False: 8.85k]
  ------------------
29813|  8.86k|                      ? janet_wrap_nil()
  ------------------
  |  |  831|      3|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      3|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29814|  8.86k|                      : janet_table_get(b->default_grammar, peg);
29815|  8.86k|            if (janet_checktype(nextPeg, JANET_NIL)) {
  ------------------
  |  |  806|  8.86k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 6, False: 8.85k]
  |  |  |  Branch (806:6): [Folded, False: 8.86k]
  |  |  ------------------
  |  |  807|  8.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|  8.86k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  8.86k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  8.86k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.86k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.86k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29816|      6|                peg_panic(b, "unknown rule");
29817|      6|            }
29818|  8.86k|        }
29819|  8.85k|        peg = nextPeg;
29820|  8.85k|        b->form = peg;
29821|  8.85k|        b->grammar = grammar;
29822|  8.85k|    }
29823|   852k|    if (i == 0)
  ------------------
  |  Branch (29823:9): [True: 0, False: 852k]
  ------------------
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|   852k|    Janet check = janet_checktype(peg, JANET_TUPLE)
  ------------------
  |  |  806|   852k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 720k, False: 131k]
  |  |  |  Branch (806:6): [Folded, False: 852k]
  |  |  ------------------
  |  |  807|   852k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   852k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   852k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   852k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   852k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   852k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29830|   852k|                  ? janet_table_rawget(grammar, peg)
29831|   852k|                  : janet_table_get(grammar, peg);
29832|   852k|    if (!janet_checktype(check, JANET_NIL)) {
  ------------------
  |  |  806|   852k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 852k]
  |  |  ------------------
  |  |  807|   852k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   852k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   852k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   852k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   852k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   852k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29832:9): [True: 751, False: 851k]
  ------------------
29833|    751|        b->form = old_form;
29834|    751|        b->grammar = old_grammar;
29835|    751|        return (uint32_t) janet_unwrap_number(check);
  ------------------
  |  |  839|    751|#define janet_unwrap_number(x) ((x).number)
  ------------------
29836|    751|    }
29837|       |
29838|       |    /* Check depth */
29839|   851k|    if (b->depth-- == 0)
  ------------------
  |  Branch (29839:9): [True: 1, False: 851k]
  ------------------
29840|      1|        peg_panic(b, "peg grammar recursed too deeply");
29841|       |
29842|       |    /* The final rule to return */
29843|   851k|    uint32_t rule = janet_v_count(b->bytecode);
  ------------------
  |  |  736|   851k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   715k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   715k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 715k, False: 135k]
  |  |  ------------------
  ------------------
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|   851k|    if (!janet_checktype(peg, JANET_STRUCT)) {
  ------------------
  |  |  806|   851k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 851k]
  |  |  ------------------
  |  |  807|   851k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   851k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   851k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   851k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   851k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   851k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29848:9): [True: 851k, False: 16]
  ------------------
29849|   851k|        JanetTable *which_grammar = grammar;
29850|       |        /* If we are a primitive pattern, add to the global cache (root grammar table) */
29851|   851k|        if (!janet_checktype(peg, JANET_TUPLE)) {
  ------------------
  |  |  806|   851k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 851k]
  |  |  ------------------
  |  |  807|   851k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   851k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   851k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   851k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   851k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   851k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29851:13): [True: 131k, False: 720k]
  ------------------
29852|   131k|            while (which_grammar->proto)
  ------------------
  |  Branch (29852:20): [True: 0, False: 131k]
  ------------------
29853|      0|                which_grammar = which_grammar->proto;
29854|   131k|        }
29855|   851k|        janet_table_put(which_grammar, peg, janet_wrap_number(rule));
  ------------------
  |  |  835|   851k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
29856|   851k|    }
29857|       |
29858|   851k|    switch (janet_type(peg)) {
  ------------------
  |  |  795|   851k|    (isnan((x).number) \
  |  |  796|   851k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   851k|        : JANET_NUMBER)
  ------------------
  |  Branch (29858:13): [True: 848k, False: 2.80k]
  ------------------
29859|     16|        default:
  ------------------
  |  Branch (29859:9): [True: 16, False: 851k]
  ------------------
29860|     16|            peg_panic(b, "unexpected peg source");
29861|      0|            return 0;
29862|       |
29863|    624|        case JANET_BOOLEAN: {
  ------------------
  |  Branch (29863:9): [True: 624, False: 850k]
  ------------------
29864|    624|            int n = janet_unwrap_boolean(peg);
  ------------------
  |  |  838|    624|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
29865|    624|            Reserve r = reserve(b, 2);
29866|    624|            emit_1(r, n ? RULE_NCHAR : RULE_NOTNCHAR, 0);
  ------------------
  |  Branch (29866:23): [True: 4, False: 620]
  ------------------
29867|    624|            break;
29868|      0|        }
29869|  2.80k|        case JANET_NUMBER: {
  ------------------
  |  Branch (29869:9): [True: 2.80k, False: 848k]
  ------------------
29870|  2.80k|            int32_t n = peg_getinteger(b, peg);
29871|  2.80k|            Reserve r = reserve(b, 2);
29872|  2.80k|            if (n < 0) {
  ------------------
  |  Branch (29872:17): [True: 576, False: 2.22k]
  ------------------
29873|    576|                if (n == INT32_MIN) {
  ------------------
  |  Branch (29873:21): [True: 0, False: 576]
  ------------------
29874|       |                    /* Since buffers can't hold this many characters, will
29875|       |                     * always match. Avoid undefined behavior negating INT32_MIN. */
29876|      0|                    emit_1(r, RULE_NCHAR, 0);
29877|    576|                } else {
29878|    576|                    emit_1(r, RULE_NOTNCHAR, -n);
29879|    576|                }
29880|  2.22k|            } else {
29881|  2.22k|                emit_1(r, RULE_NCHAR, n);
29882|  2.22k|            }
29883|  2.80k|            break;
29884|      0|        }
29885|  81.1k|        case JANET_STRING: {
  ------------------
  |  Branch (29885:9): [True: 81.1k, False: 770k]
  ------------------
29886|  81.1k|            const uint8_t *str = janet_unwrap_string(peg);
  ------------------
  |  |  863|  81.1k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
29887|  81.1k|            int32_t len = janet_string_length(str);
  ------------------
  |  | 1813|  81.1k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  81.1k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
29888|  81.1k|            emit_bytes(b, RULE_LITERAL, len, str);
29889|  81.1k|            break;
29890|      0|        }
29891|  46.5k|        case JANET_BUFFER: {
  ------------------
  |  Branch (29891:9): [True: 46.5k, False: 804k]
  ------------------
29892|  46.5k|            const JanetBuffer *buf = janet_unwrap_buffer(peg);
  ------------------
  |  |  862|  46.5k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
29893|  46.5k|            emit_bytes(b, RULE_LITERAL, buf->count, buf->data);
29894|  46.5k|            break;
29895|      0|        }
29896|      4|        case JANET_TABLE: {
  ------------------
  |  Branch (29896:9): [True: 4, False: 851k]
  ------------------
29897|       |            /* Build grammar table */
29898|      4|            JanetTable *new_grammar = janet_table_clone(janet_unwrap_table(peg));
  ------------------
  |  |  861|      4|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
29899|      4|            new_grammar->proto = grammar;
29900|      4|            b->grammar = grammar = new_grammar;
29901|       |            /* Run the main rule */
29902|      4|            Janet main_rule = janet_table_rawget(grammar, janet_ckeywordv("main"));
  ------------------
  |  | 1843|      4|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|      4|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|      4|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      4|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29903|      4|            if (janet_checktype(main_rule, JANET_NIL))
  ------------------
  |  |  806|      4|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 4, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 4]
  |  |  ------------------
  |  |  807|      4|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      4|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      4|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      4|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29904|      4|                peg_panic(b, "grammar requires :main rule");
29905|      0|            rule = peg_compile1(b, main_rule);
29906|      0|            break;
29907|      4|        }
29908|     16|        case JANET_STRUCT: {
  ------------------
  |  Branch (29908:9): [True: 16, False: 851k]
  ------------------
29909|       |            /* Build grammar table */
29910|     16|            const JanetKV *st = janet_unwrap_struct(peg);
  ------------------
  |  |  857|     16|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
29911|     16|            JanetTable *new_grammar = janet_table(2 * janet_struct_capacity(st));
  ------------------
  |  | 1849|     16|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|     16|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
29912|    581|            for (int32_t i = 0; i < janet_struct_capacity(st); i++) {
  ------------------
  |  | 1849|    581|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|    581|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (29912:33): [True: 565, False: 16]
  ------------------
29913|    565|                if (janet_checktype(st[i].key, JANET_KEYWORD)) {
  ------------------
  |  |  806|    565|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 19, False: 546]
  |  |  |  Branch (806:6): [Folded, False: 565]
  |  |  ------------------
  |  |  807|    565|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    565|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    565|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    565|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    565|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    565|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29914|     19|                    janet_table_put(new_grammar, st[i].key, st[i].value);
29915|     19|                }
29916|    565|            }
29917|     16|            new_grammar->proto = grammar;
29918|     16|            b->grammar = grammar = new_grammar;
29919|       |            /* Run the main rule */
29920|     16|            Janet main_rule = janet_table_rawget(grammar, janet_ckeywordv("main"));
  ------------------
  |  | 1843|     16|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|     16|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|     16|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     16|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     16|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29921|     16|            if (janet_checktype(main_rule, JANET_NIL))
  ------------------
  |  |  806|     16|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 16, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 16]
  |  |  ------------------
  |  |  807|     16|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     16|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     16|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     16|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     16|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     16|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29922|     16|                peg_panic(b, "grammar requires :main rule");
29923|      0|            rule = peg_compile1(b, main_rule);
29924|      0|            break;
29925|     16|        }
29926|   720k|        case JANET_TUPLE: {
  ------------------
  |  Branch (29926:9): [True: 720k, False: 131k]
  ------------------
29927|   720k|            const Janet *tup = janet_unwrap_tuple(peg);
  ------------------
  |  |  858|   720k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
29928|   720k|            int32_t len = janet_tuple_length(tup);
  ------------------
  |  | 1802|   720k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|   720k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
29929|   720k|            if (len == 0) peg_panic(b, "tuple in grammar must have non-zero length");
  ------------------
  |  Branch (29929:17): [True: 2, False: 720k]
  ------------------
29930|   720k|            if (janet_checkint(tup[0])) {
  ------------------
  |  Branch (29930:17): [True: 6.18k, False: 714k]
  ------------------
29931|  6.18k|                int32_t n = janet_unwrap_integer(tup[0]);
  ------------------
  |  |  966|  6.18k|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|  6.18k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
29932|  6.18k|                if (n < 0) {
  ------------------
  |  Branch (29932:21): [True: 2, False: 6.18k]
  ------------------
29933|      2|                    peg_panicf(b, "expected non-negative integer, got %d", n);
  ------------------
  |  |29240|      2|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29934|      2|                }
29935|  6.18k|                spec_repeat(b, len, tup);
29936|  6.18k|                break;
29937|  6.18k|            }
29938|   714k|            if (!janet_checktype(tup[0], JANET_SYMBOL))
  ------------------
  |  |  806|   714k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 714k]
  |  |  ------------------
  |  |  807|   714k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   714k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   714k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   714k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   714k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   714k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29938:17): [True: 13, False: 713k]
  ------------------
29939|     13|                peg_panicf(b, "expected grammar command, found %v", tup[0]);
  ------------------
  |  |29240|     13|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29940|   713k|            const uint8_t *sym = janet_unwrap_symbol(tup[0]);
  ------------------
  |  |  864|   713k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
29941|   713k|            const SpecialPair *sp = janet_strbinsearch(
29942|   713k|                                        &peg_specials,
29943|   713k|                                        sizeof(peg_specials) / sizeof(SpecialPair),
29944|   713k|                                        sizeof(SpecialPair),
29945|   713k|                                        sym);
29946|   713k|            if (sp) {
  ------------------
  |  Branch (29946:17): [True: 713k, False: 46]
  ------------------
29947|   713k|                sp->special(b, len - 1, tup + 1);
29948|   713k|            } else {
29949|     46|                peg_panicf(b, "unknown special %S", sym);
  ------------------
  |  |29240|     46|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29950|     46|            }
29951|   713k|            break;
29952|   713k|        }
29953|   851k|    }
29954|       |
29955|       |    /* Increase depth again */
29956|   849k|    b->depth++;
29957|   849k|    b->form = old_form;
29958|   849k|    b->grammar = old_grammar;
29959|   849k|    return rule;
29960|   851k|}
janet.c:peg_panic:
29235|    168|JANET_NO_RETURN static void peg_panic(Builder *b, const char *msg) {
29236|    168|    builder_cleanup(b);
29237|    168|    janet_panicf("grammar error in %p, %s", b->form, msg);
29238|    168|}
janet.c:reserve:
29326|   721k|static Reserve reserve(Builder *b, int32_t size) {
29327|   721k|    Reserve r;
29328|   721k|    r.index = janet_v_count(b->bytecode);
  ------------------
  |  |  736|   721k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   589k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   589k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 589k, False: 132k]
  |  |  ------------------
  ------------------
29329|   721k|    r.builder = b;
29330|   721k|    r.size = size;
29331|  2.88M|    for (int32_t i = 0; i < size; i++)
  ------------------
  |  Branch (29331:25): [True: 2.16M, False: 721k]
  ------------------
29332|       |        janet_v_push(b->bytecode, 0);
  ------------------
  |  |  734|  2.16M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  2.16M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  2.16M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  2.03M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  2.03M|#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.03M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  2.03M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 132k, False: 2.03M]
  |  |  |  |  |  |  |  Branch (745:50): [True: 443k, False: 1.58M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|   575k|#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.16M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  2.16M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29333|   721k|    return r;
29334|   721k|}
janet.c:emit_1:
29355|  17.6k|static void emit_1(Reserve r, uint32_t op, uint32_t arg) {
29356|  17.6k|    emit_rule(r, op, 1, &arg);
29357|  17.6k|}
janet.c:emit_rule:
29337|   720k|static void emit_rule(Reserve r, int32_t op, int32_t n, const uint32_t *body) {
29338|   720k|    janet_assert(r.size == n + 1, "bad reserve");
  ------------------
  |  |  389|   720k|#define janet_assert(c, m) do { \
  |  |  390|   720k|    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: 720k]
  |  |  ------------------
  |  |  391|   720k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 720k]
  |  |  ------------------
  ------------------
29339|   720k|    r.builder->bytecode[r.index] = op;
29340|   720k|    memcpy(r.builder->bytecode + r.index + 1, body, n * sizeof(uint32_t));
29341|   720k|}
janet.c:peg_getinteger:
29276|  76.6k|static int32_t peg_getinteger(Builder *b, Janet x) {
29277|  76.6k|    if (!janet_checkint(x))
  ------------------
  |  Branch (29277:9): [True: 10, False: 76.6k]
  ------------------
29278|     10|        peg_panicf(b, "expected integer, got %v", x);
  ------------------
  |  |29240|     10|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29279|  76.6k|    return janet_unwrap_integer(x);
  ------------------
  |  |  966|  76.6k|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|  76.6k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
29280|  76.6k|}
janet.c:emit_bytes:
29344|   127k|static void emit_bytes(Builder *b, uint32_t op, int32_t len, const uint8_t *bytes) {
29345|   127k|    uint32_t next_rule = janet_v_count(b->bytecode);
  ------------------
  |  |  736|   127k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   126k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   126k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 126k, False: 1.45k]
  |  |  ------------------
  ------------------
29346|   127k|    janet_v_push(b->bytecode, op);
  ------------------
  |  |  734|   127k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|   127k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|   127k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|   126k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|   126k|#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|   126k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|   126k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 1.45k, False: 126k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 69.9k, False: 56.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  71.4k|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  743|   127k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   127k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29347|   127k|    janet_v_push(b->bytecode, len);
  ------------------
  |  |  734|   127k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|   127k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|   127k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|   127k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|   127k|#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|   127k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|   127k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 0, False: 127k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 3.27k, False: 124k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  3.27k|#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|   127k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   127k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29348|   127k|    int32_t words = ((len + 3) >> 2);
29349|  2.22M|    for (int32_t i = 0; i < words; i++)
  ------------------
  |  Branch (29349:25): [True: 2.09M, False: 127k]
  ------------------
29350|       |        janet_v_push(b->bytecode, 0);
  ------------------
  |  |  734|  2.09M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  2.09M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  2.09M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  2.09M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  2.09M|#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.09M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  2.09M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 0, False: 2.09M]
  |  |  |  |  |  |  |  Branch (745:50): [True: 212k, False: 1.88M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|   212k|#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.09M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  2.09M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29351|   127k|    memcpy(b->bytecode + next_rule + 2, bytes, len);
29352|   127k|}
janet.c:spec_repeat:
29499|  6.18k|static void spec_repeat(Builder *b, int32_t argc, const Janet *argv) {
29500|  6.18k|    peg_fixarity(b, argc, 2);
29501|  6.18k|    Reserve r = reserve(b, 4);
29502|  6.18k|    int32_t n = peg_getnat(b, argv[0]);
29503|  6.18k|    uint32_t subrule = peg_compile1(b, argv[1]);
29504|  6.18k|    emit_3(r, RULE_BETWEEN, n, n, subrule);
29505|  6.18k|}
janet.c:peg_fixarity:
29242|  13.1k|static void peg_fixarity(Builder *b, int32_t argc, int32_t arity) {
29243|  13.1k|    if (argc != arity) {
  ------------------
  |  Branch (29243:9): [True: 4, False: 13.1k]
  ------------------
29244|      4|        peg_panicf(b, "expected %d argument%s, got %d",
  ------------------
  |  |29240|      8|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  |  |  ------------------
  |  |  |  Branch (29240:71): [True: 3, False: 1]
  |  |  ------------------
  ------------------
29245|      4|                   arity,
29246|      4|                   arity == 1 ? "" : "s",
29247|      4|                   argc);
29248|      4|    }
29249|  13.1k|}
janet.c:peg_getnat:
29282|  6.18k|static int32_t peg_getnat(Builder *b, Janet x) {
29283|  6.18k|    int32_t i = peg_getinteger(b, x);
29284|  6.18k|    if (i < 0)
  ------------------
  |  Branch (29284:9): [True: 0, False: 6.18k]
  ------------------
29285|      0|        peg_panicf(b, "expected non-negative integer, got %v", x);
  ------------------
  |  |29240|      0|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29286|  6.18k|    return i;
29287|  6.18k|}
janet.c:emit_3:
29362|  14.5k|static void emit_3(Reserve r, uint32_t op, uint32_t arg1, uint32_t arg2, uint32_t arg3) {
29363|  14.5k|    uint32_t arr[3] = {arg1, arg2, arg3};
29364|  14.5k|    emit_rule(r, op, 3, arr);
29365|  14.5k|}
janet.c:spec_not:
29515|  6.20k|static void spec_not(Builder *b, int32_t argc, const Janet *argv) {
29516|  6.20k|    spec_onerule(b, argc, argv, RULE_NOT);
29517|  6.20k|}
janet.c:spec_onerule:
29508|  6.23k|static void spec_onerule(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
29509|  6.23k|    peg_fixarity(b, argc, 1);
29510|  6.23k|    Reserve r = reserve(b, 2);
29511|  6.23k|    uint32_t rule = peg_compile1(b, argv[0]);
29512|  6.23k|    emit_1(r, op, rule);
29513|  6.23k|}
janet.c:spec_position:
29607|     53|static void spec_position(Builder *b, int32_t argc, const Janet *argv) {
29608|     53|    spec_tag1(b, argc, argv, RULE_POSITION);
29609|     53|}
janet.c:spec_tag1:
29599|     53|static void spec_tag1(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
29600|     53|    peg_arity(b, argc, 0, 1);
29601|     53|    Reserve r = reserve(b, 2);
29602|     53|    uint32_t tag = (argc) ? emit_tag(b, argv[0]) : 0;
  ------------------
  |  Branch (29602:20): [True: 0, False: 53]
  ------------------
29603|     53|    (void) argv;
29604|     53|    emit_1(r, op, tag);
29605|     53|}
janet.c:peg_arity:
29251|   704k|static void peg_arity(Builder *b, int32_t arity, int32_t min, int32_t max) {
29252|   704k|    if (min >= 0 && arity < min)
  ------------------
  |  Branch (29252:9): [True: 704k, False: 0]
  |  Branch (29252:21): [True: 13, False: 704k]
  ------------------
29253|     13|        peg_panicf(b, "arity mismatch, expected at least %d, got %d", min, arity);
  ------------------
  |  |29240|     13|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29254|   704k|    if (max >= 0 && arity > max)
  ------------------
  |  Branch (29254:9): [True: 696k, False: 8.65k]
  |  Branch (29254:21): [True: 25, False: 696k]
  ------------------
29255|     25|        peg_panicf(b, "arity mismatch, expected at most %d, got %d", max, arity);
  ------------------
  |  |29240|     25|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29256|   704k|}
janet.c:emit_tag:
29299|      7|static uint32_t emit_tag(Builder *b, Janet t) {
29300|      7|    if (!janet_checktype(t, JANET_KEYWORD))
  ------------------
  |  |  806|      7|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 7]
  |  |  ------------------
  |  |  807|      7|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      7|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      7|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      7|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      7|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      7|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29300:9): [True: 6, False: 1]
  ------------------
29301|      6|        peg_panicf(b, "expected keyword for capture tag, got %v", t);
  ------------------
  |  |29240|      6|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29302|      1|    Janet check = janet_table_get(b->tags, t);
29303|      1|    if (janet_checktype(check, JANET_NIL)) {
  ------------------
  |  |  806|      1|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 1]
  |  |  ------------------
  |  |  807|      1|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      1|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      1|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      1|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29304|      1|        uint32_t tag = b->nexttag++;
29305|      1|        if (tag > 255) {
  ------------------
  |  Branch (29305:13): [True: 0, False: 1]
  ------------------
29306|      0|            peg_panic(b, "too many tags - up to 255 tags are supported per peg");
29307|      0|        }
29308|      1|        Janet val = janet_wrap_number(tag);
  ------------------
  |  |  835|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
29309|      1|        janet_table_put(b->tags, t, val);
29310|      1|        return tag;
29311|      1|    } else {
29312|      0|        return (uint32_t) janet_unwrap_number(check);
  ------------------
  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  ------------------
29313|      0|    }
29314|      1|}
janet.c:spec_accumulate:
29552|  38.7k|static void spec_accumulate(Builder *b, int32_t argc, const Janet *argv) {
29553|  38.7k|    spec_cap1(b, argc, argv, RULE_ACCUMULATE);
29554|  38.7k|}
janet.c:spec_cap1:
29541|   619k|static void spec_cap1(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
29542|   619k|    peg_arity(b, argc, 1, 2);
29543|   619k|    Reserve r = reserve(b, 3);
29544|   619k|    uint32_t tag = (argc == 2) ? emit_tag(b, argv[1]) : 0;
  ------------------
  |  Branch (29544:20): [True: 1, False: 619k]
  ------------------
29545|   619k|    uint32_t rule = peg_compile1(b, argv[0]);
29546|   619k|    emit_2(r, op, rule, tag);
29547|   619k|}
janet.c:emit_2:
29358|   687k|static void emit_2(Reserve r, uint32_t op, uint32_t arg1, uint32_t arg2) {
29359|   687k|    uint32_t arr[2] = {arg1, arg2};
29360|   687k|    emit_rule(r, op, 2, arr);
29361|   687k|}
janet.c:spec_sequence:
29430|    904|static void spec_sequence(Builder *b, int32_t argc, const Janet *argv) {
29431|    904|    spec_variadic(b, argc, argv, RULE_SEQUENCE);
29432|    904|}
janet.c:spec_variadic:
29415|  2.22k|static void spec_variadic(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
29416|  2.22k|    uint32_t rule = janet_v_count(b->bytecode);
  ------------------
  |  |  736|  2.22k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|    305|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    305|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 305, False: 1.91k]
  |  |  ------------------
  ------------------
29417|  2.22k|    janet_v_push(b->bytecode, op);
  ------------------
  |  |  734|  2.22k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  2.22k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  2.22k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|    305|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|    305|#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|    305|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|    305|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 1.91k, False: 305]
  |  |  |  |  |  |  |  Branch (745:50): [True: 7, False: 298]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  1.92k|#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.22k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  2.22k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29418|  2.22k|    janet_v_push(b->bytecode, argc);
  ------------------
  |  |  734|  2.22k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  2.22k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  2.22k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  2.22k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  2.22k|#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.22k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  2.22k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 0, False: 2.22k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 1.92k, False: 302]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  1.92k|#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.22k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  2.22k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29419|  12.2k|    for (int32_t i = 0; i < argc; i++)
  ------------------
  |  Branch (29419:25): [True: 9.97k, False: 2.22k]
  ------------------
29420|  9.97k|        janet_v_push(b->bytecode, 0);
  ------------------
  |  |  734|  9.97k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  9.97k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  9.97k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  9.97k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  9.97k|#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|  9.97k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  9.97k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 0, False: 9.97k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 3.86k, False: 6.11k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  3.86k|#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|  9.97k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  9.97k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29421|  9.51k|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (29421:25): [True: 7.29k, False: 2.22k]
  ------------------
29422|  7.29k|        uint32_t rulei = peg_compile1(b, argv[i]);
29423|  7.29k|        b->bytecode[rule + 2 + i] = rulei;
29424|  7.29k|    }
29425|  2.22k|}
janet.c:spec_choice:
29427|  1.32k|static void spec_choice(Builder *b, int32_t argc, const Janet *argv) {
29428|  1.32k|    spec_variadic(b, argc, argv, RULE_CHOICE);
29429|  1.32k|}
janet.c:spec_reference:
29590|      6|static void spec_reference(Builder *b, int32_t argc, const Janet *argv) {
29591|      6|    peg_arity(b, argc, 1, 2);
29592|      6|    Reserve r = reserve(b, 3);
29593|      6|    uint32_t search = emit_tag(b, argv[0]);
29594|      6|    uint32_t tag = (argc == 2) ? emit_tag(b, argv[1]) : 0;
  ------------------
  |  Branch (29594:20): [True: 1, False: 5]
  ------------------
29595|      6|    b->has_backref = 1;
29596|      6|    emit_2(r, RULE_GETTAG, search, tag);
29597|      6|}
janet.c:spec_replace:
29645|  7.88k|static void spec_replace(Builder *b, int32_t argc, const Janet *argv) {
29646|  7.88k|    peg_arity(b, argc, 2, 3);
29647|  7.88k|    Reserve r = reserve(b, 4);
29648|  7.88k|    uint32_t subrule = peg_compile1(b, argv[0]);
29649|  7.88k|    uint32_t constant = emit_constant(b, argv[1]);
29650|  7.88k|    uint32_t tag = (argc == 3) ? emit_tag(b, argv[2]) : 0;
  ------------------
  |  Branch (29650:20): [True: 1, False: 7.88k]
  ------------------
29651|  7.88k|    emit_3(r, RULE_REPLACE, subrule, constant, tag);
29652|  7.88k|}
janet.c:emit_constant:
29293|  7.86k|static uint32_t emit_constant(Builder *b, Janet c) {
29294|  7.86k|    uint32_t cindex = (uint32_t) janet_v_count(b->constants);
  ------------------
  |  |  736|  7.86k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 0, False: 7.86k]
  |  |  ------------------
  ------------------
29295|       |    janet_v_push(b->constants, c);
  ------------------
  |  |  734|  7.86k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  7.86k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  7.86k|#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: 7.86k, 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|  7.86k|#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|  7.86k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  7.86k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29296|  7.86k|    return cindex;
29297|  7.86k|}
janet.c:spec_capture:
29549|   580k|static void spec_capture(Builder *b, int32_t argc, const Janet *argv) {
29550|   580k|    spec_cap1(b, argc, argv, RULE_CAPTURE);
29551|   580k|}
janet.c:spec_look:
29405|  68.7k|static void spec_look(Builder *b, int32_t argc, const Janet *argv) {
29406|  68.7k|    peg_arity(b, argc, 1, 2);
29407|  68.7k|    Reserve r = reserve(b, 3);
29408|  68.7k|    int32_t rulearg = argc == 2 ? 1 : 0;
  ------------------
  |  Branch (29408:23): [True: 67.6k, False: 1.09k]
  ------------------
29409|  68.7k|    int32_t offset = argc == 2 ? peg_getinteger(b, argv[0]) : 0;
  ------------------
  |  Branch (29409:22): [True: 67.6k, False: 1.09k]
  ------------------
29410|  68.7k|    uint32_t subrule = peg_compile1(b, argv[rulearg]);
29411|  68.7k|    emit_2(r, RULE_LOOK, (uint32_t) offset, subrule);
29412|  68.7k|}
janet.c:spec_opt:
29492|    526|static void spec_opt(Builder *b, int32_t argc, const Janet *argv) {
29493|    526|    peg_fixarity(b, argc, 1);
29494|    526|    Reserve r = reserve(b, 4);
29495|    526|    uint32_t subrule = peg_compile1(b, argv[0]);
29496|    526|    emit_3(r, RULE_BETWEEN, 0, 1, subrule);
29497|    526|}
janet.c:spec_debug:
29637|      1|static void spec_debug(Builder *b, int32_t argc, const Janet *argv) {
29638|      1|    peg_arity(b, argc, 0, 0);
29639|      1|    Reserve r = reserve(b, 1);
29640|      1|    uint32_t empty = 0;
29641|      1|    (void) argv;
29642|      1|    emit_rule(r, RULE_DEBUG, 0, &empty);
29643|      1|}
janet.c:spec_any:
29472|      6|static void spec_any(Builder *b, int32_t argc, const Janet *argv) {
29473|      6|    spec_repeater(b, argc, argv, 0);
29474|      6|}
janet.c:spec_repeater:
29462|     21|static void spec_repeater(Builder *b, int32_t argc, const Janet *argv, int32_t min) {
29463|     21|    peg_fixarity(b, argc, 1);
29464|     21|    Reserve r = reserve(b, 4);
29465|     21|    uint32_t subrule = peg_compile1(b, argv[0]);
29466|       |    emit_3(r, RULE_BETWEEN, min, UINT32_MAX, subrule);
29467|     21|}
janet.c:spec_error:
29518|     35|static void spec_error(Builder *b, int32_t argc, const Janet *argv) {
29519|     35|    if (argc == 0) {
  ------------------
  |  Branch (29519:9): [True: 5, False: 30]
  ------------------
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|     30|    } else {
29524|     30|        spec_onerule(b, argc, argv, RULE_ERROR);
29525|     30|    }
29526|     35|}
janet.c:spec_branch:
29435|    161|static void spec_branch(Builder *b, int32_t argc, const Janet *argv, uint32_t rule) {
29436|    161|    peg_fixarity(b, argc, 2);
29437|    161|    Reserve r = reserve(b, 3);
29438|    161|    uint32_t rule_a = peg_compile1(b, argv[0]);
29439|    161|    uint32_t rule_b = peg_compile1(b, argv[1]);
29440|    161|    emit_2(r, rule, rule_a, rule_b);
29441|    161|}
janet.c:spec_ifnot:
29446|    161|static void spec_ifnot(Builder *b, int32_t argc, const Janet *argv) {
29447|    161|    spec_branch(b, argc, argv, RULE_IFNOT);
29448|    161|}
janet.c:spec_range:
29375|  8.65k|static void spec_range(Builder *b, int32_t argc, const Janet *argv) {
29376|  8.65k|    peg_arity(b, argc, 1, -1);
29377|  8.65k|    if (argc == 1) {
  ------------------
  |  Branch (29377:9): [True: 7.99k, False: 654]
  ------------------
29378|  7.99k|        Reserve r = reserve(b, 2);
29379|  7.99k|        const uint8_t *str = peg_getrange(b, argv[0]);
29380|  7.99k|        uint32_t arg = str[0] | (str[1] << 16);
29381|  7.99k|        emit_1(r, RULE_RANGE, arg);
29382|  7.99k|    } else {
29383|       |        /* Compile as a set */
29384|    654|        Reserve r = reserve(b, 9);
29385|    654|        uint32_t bitmap[8] = {0};
29386|  1.95k|        for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (29386:29): [True: 1.30k, False: 654]
  ------------------
29387|  1.30k|            const uint8_t *str = peg_getrange(b, argv[i]);
29388|  35.1k|            for (uint32_t c = str[0]; c <= str[1]; c++)
  ------------------
  |  Branch (29388:39): [True: 33.8k, False: 1.30k]
  ------------------
29389|  33.8k|                bitmap_set(bitmap, c);
29390|  1.30k|        }
29391|    654|        emit_rule(r, RULE_SET, 8, bitmap);
29392|    654|    }
29393|  8.65k|}
janet.c:peg_getrange:
29265|  9.30k|static const uint8_t *peg_getrange(Builder *b, Janet x) {
29266|  9.30k|    if (!janet_checktype(x, JANET_STRING))
  ------------------
  |  |  806|  9.30k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 9.30k]
  |  |  ------------------
  |  |  807|  9.30k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.30k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  9.30k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  9.30k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  9.30k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  9.30k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29266:9): [True: 2, False: 9.30k]
  ------------------
29267|      2|        peg_panic(b, "expected string for character range");
29268|  9.30k|    const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  863|  9.30k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
29269|  9.30k|    if (janet_string_length(str) != 2)
  ------------------
  |  | 1813|  9.30k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|  9.30k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (29269:9): [True: 2, False: 9.30k]
  ------------------
29270|      2|        peg_panicf(b, "expected string to have length 2, got %v", x);
  ------------------
  |  |29240|      2|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29271|  9.30k|    if (str[1] < str[0])
  ------------------
  |  Branch (29271:9): [True: 0, False: 9.30k]
  ------------------
29272|      0|        peg_panicf(b, "range %v is empty", x);
  ------------------
  |  |29240|      0|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
29273|  9.30k|    return str;
29274|  9.30k|}
janet.c:bitmap_set:
29371|  34.0k|static void bitmap_set(uint32_t *bitmap, uint8_t c) {
29372|  34.0k|    bitmap[c >> 5] |= ((uint32_t)1) << (c & 0x1F);
29373|  34.0k|}
janet.c:spec_set:
29395|     24|static void spec_set(Builder *b, int32_t argc, const Janet *argv) {
29396|     24|    peg_fixarity(b, argc, 1);
29397|     24|    Reserve r = reserve(b, 9);
29398|     24|    const uint8_t *str = peg_getset(b, argv[0]);
29399|     24|    uint32_t bitmap[8] = {0};
29400|    192|    for (int32_t i = 0; i < janet_string_length(str); i++)
  ------------------
  |  | 1813|    192|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|    192|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (29400:25): [True: 168, False: 24]
  ------------------
29401|    168|        bitmap_set(bitmap, str[i]);
29402|     24|    emit_rule(r, RULE_SET, 8, bitmap);
29403|     24|}
janet.c:peg_getset:
29258|     24|static const uint8_t *peg_getset(Builder *b, Janet x) {
29259|     24|    if (!janet_checktype(x, JANET_STRING))
  ------------------
  |  |  806|     24|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 24]
  |  |  ------------------
  |  |  807|     24|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     24|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     24|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     24|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     24|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     24|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (29259:9): [True: 0, False: 24]
  ------------------
29260|      0|        peg_panic(b, "expected string for character set");
29261|     24|    const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  863|     24|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
29262|     24|    return str;
29263|     24|}
janet.c:spec_some:
29469|     15|static void spec_some(Builder *b, int32_t argc, const Janet *argv) {
29470|     15|    spec_repeater(b, argc, argv, 1);
29471|     15|}
janet.c:make_peg:
30244|   135k|static JanetPeg *make_peg(Builder *b) {
30245|   135k|    size_t bytecode_start = size_padded(sizeof(JanetPeg), sizeof(uint32_t));
30246|   135k|    size_t bytecode_size = janet_v_count(b->bytecode) * sizeof(uint32_t);
  ------------------
  |  |  736|   135k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   135k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   135k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 135k, False: 0]
  |  |  ------------------
  ------------------
30247|   135k|    size_t constants_start = size_padded(bytecode_start + bytecode_size, sizeof(Janet));
30248|   135k|    size_t constants_size = janet_v_count(b->constants) * sizeof(Janet);
  ------------------
  |  |  736|   135k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  7.86k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  7.86k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 7.86k, False: 127k]
  |  |  ------------------
  ------------------
30249|   135k|    size_t total_size = constants_start + constants_size;
30250|   135k|    char *mem = janet_abstract(&janet_peg_type, total_size);
30251|   135k|    JanetPeg *peg = (JanetPeg *)mem;
30252|   135k|    peg->bytecode = (uint32_t *)(mem + bytecode_start);
30253|   135k|    peg->constants = (Janet *)(mem + constants_start);
30254|   135k|    peg->num_constants = janet_v_count(b->constants);
  ------------------
  |  |  736|   135k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  7.86k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  7.86k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 7.86k, False: 127k]
  |  |  ------------------
  ------------------
30255|   135k|    safe_memcpy(peg->bytecode, b->bytecode, bytecode_size);
30256|   135k|    safe_memcpy(peg->constants, b->constants, constants_size);
30257|       |    peg->bytecode_len = janet_v_count(b->bytecode);
  ------------------
  |  |  736|   135k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   135k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   135k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 135k, False: 0]
  |  |  ------------------
  ------------------
30258|   135k|    peg->has_backref = b->has_backref;
30259|   135k|    return peg;
30260|   135k|}
janet.c:builder_cleanup:
29230|   135k|static void builder_cleanup(Builder *b) {
29231|   135k|    janet_v_free(b->constants);
  ------------------
  |  |  733|   135k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|  7.86k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 7.86k, False: 127k]
  |  |  ------------------
  ------------------
29232|       |    janet_v_free(b->bytecode);
  ------------------
  |  |  733|   135k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|   135k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 135k, False: 123]
  |  |  ------------------
  ------------------
29233|   135k|}
janet.c:peg_cfun_init:
30312|   135k|static PegCall peg_cfun_init(int32_t argc, Janet *argv, int get_replace) {
30313|   135k|    PegCall ret;
30314|   135k|    int32_t min = get_replace ? 3 : 2;
  ------------------
  |  Branch (30314:19): [True: 124k, False: 11.4k]
  ------------------
30315|   135k|    janet_arity(argc, min, -1);
30316|   135k|    if (janet_checktype(argv[0], JANET_ABSTRACT) &&
  ------------------
  |  |  806|   271k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1, False: 135k]
  |  |  |  Branch (806:6): [Folded, False: 135k]
  |  |  ------------------
  |  |  807|   271k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   271k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   135k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   135k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   135k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   135k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30317|      1|            janet_abstract_type(janet_unwrap_abstract(argv[0])) == &janet_peg_type) {
  ------------------
  |  | 1899|      1|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|      1|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (30317:13): [True: 0, False: 1]
  ------------------
30318|      0|        ret.peg = janet_unwrap_abstract(argv[0]);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
30319|   135k|    } else {
30320|   135k|        ret.peg = compile_peg(argv[0]);
30321|   135k|    }
30322|   135k|    int input_loc = 1;
30323|   135k|    if (get_replace) {
  ------------------
  |  Branch (30323:9): [True: 123k, False: 11.6k]
  ------------------
30324|   123k|        ret.subst = argv[1];
30325|   123k|        input_loc = 2;
30326|   123k|    }
30327|   135k|    ret.bytes = janet_getbytes(argv, input_loc);
30328|   135k|    if (janet_checktype(argv[input_loc], JANET_BUFFER)) {
  ------------------
  |  |  806|   135k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 45.3k, False: 90.2k]
  |  |  |  Branch (806:6): [Folded, False: 135k]
  |  |  ------------------
  |  |  807|   135k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   135k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   135k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   135k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   135k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   135k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30329|  45.3k|        ret.input_buffer = janet_unwrap_buffer(argv[input_loc]);
  ------------------
  |  |  862|  45.3k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
30330|  45.3k|        ret.old_flags = ret.input_buffer->gc.flags;
30331|  45.3k|        ret.input_buffer->gc.flags |= JANET_BUFFER_FLAG_NO_REALLOC;
  ------------------
  |  | 1780|  45.3k|#define JANET_BUFFER_FLAG_NO_REALLOC 0x10000
  ------------------
30332|  90.2k|    } else {
30333|  90.2k|        ret.input_buffer = NULL;
30334|  90.2k|    }
30335|   135k|    if (argc > min) {
  ------------------
  |  Branch (30335:9): [True: 10.9k, False: 124k]
  ------------------
30336|  10.9k|        ret.start = janet_gethalfrange(argv, min, ret.bytes.len, "offset");
30337|  10.9k|        ret.s.extrac = argc - min - 1;
30338|  10.9k|        ret.s.extrav = janet_tuple_n(argv + min + 1, argc - min - 1);
30339|   124k|    } else {
30340|   124k|        ret.start = 0;
30341|   124k|        ret.s.extrac = 0;
30342|   124k|        ret.s.extrav = NULL;
30343|   124k|    }
30344|   135k|    ret.s.mode = PEG_MODE_NORMAL;
30345|   135k|    ret.s.text_start = ret.bytes.bytes;
30346|   135k|    ret.s.text_end = ret.bytes.bytes + ret.bytes.len;
30347|   135k|    ret.s.outer_text_end = ret.s.text_end;
30348|   135k|    ret.s.depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|   135k|#define JANET_RECURSION_GUARD 1024
  ------------------
30349|   135k|    ret.s.captures = janet_array(0);
30350|   135k|    ret.s.tagged_captures = janet_array(0);
30351|   135k|    ret.s.scratch = janet_buffer(10);
30352|   135k|    ret.s.tags = janet_buffer(10);
30353|   135k|    ret.s.constants = ret.peg->constants;
30354|   135k|    ret.s.bytecode = ret.peg->bytecode;
30355|       |    ret.s.linemap = NULL;
30356|   135k|    ret.s.linemaplen = -1;
30357|   135k|    ret.s.has_backref = ret.peg->has_backref;
30358|   135k|    return ret;
30359|   135k|}
janet.c:peg_rule:
28538|  4.83M|    const uint8_t *text) {
28539|  4.83M|tail:
28540|  4.83M|    switch (*rule) {
28541|      0|        default:
  ------------------
  |  Branch (28541:9): [True: 0, False: 4.83M]
  ------------------
28542|      0|            janet_panic("unexpected opcode");
28543|      0|            return NULL;
28544|       |
28545|  1.39M|        case RULE_LITERAL: {
  ------------------
  |  Branch (28545:9): [True: 1.39M, False: 3.44M]
  ------------------
28546|  1.39M|            uint32_t len = rule[1];
28547|  1.39M|            if (text + len > s->text_end) return NULL;
  ------------------
  |  Branch (28547:17): [True: 114k, False: 1.27M]
  ------------------
28548|  1.27M|            return memcmp(text, rule + 2, len) ? NULL : text + len;
  ------------------
  |  Branch (28548:20): [True: 1.23M, False: 44.8k]
  ------------------
28549|  1.39M|        }
28550|       |
28551|      0|        case RULE_DEBUG: {
  ------------------
  |  Branch (28551:9): [True: 0, False: 4.83M]
  ------------------
28552|      0|            char buffer[32] = {0};
28553|      0|            size_t len = (size_t)(s->outer_text_end - text);
28554|      0|            memcpy(buffer, text, (len > 31 ? 31 : len));
  ------------------
  |  Branch (28554:35): [True: 0, False: 0]
  ------------------
28555|      0|            janet_eprintf("?? at [%s] (index %d)\n", buffer, (int32_t)(text - s->text_start));
  ------------------
  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28556|      0|            int has_color = janet_truthy(janet_dyn("err-color"));
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
28557|       |            /* Accumulate buffer */
28558|      0|            if (s->scratch->count) {
  ------------------
  |  Branch (28558:17): [True: 0, False: 0]
  ------------------
28559|      0|                janet_eprintf("accumulate buffer: %v\n", janet_wrap_buffer(s->scratch));
  ------------------
  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28560|      0|            }
28561|       |            /* Normal captures */
28562|      0|            if (s->captures->count) {
  ------------------
  |  Branch (28562:17): [True: 0, False: 0]
  ------------------
28563|      0|                janet_eprintf("stack [%d]:\n", s->captures->count);
  ------------------
  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28564|      0|                for (int32_t i = 0; i < s->captures->count; i++) {
  ------------------
  |  Branch (28564:37): [True: 0, False: 0]
  ------------------
28565|      0|                    if (has_color) {
  ------------------
  |  Branch (28565:25): [True: 0, False: 0]
  ------------------
28566|      0|                        janet_eprintf("  [%d]: %M\n", i, s->captures->data[i]);
  ------------------
  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28567|      0|                    } else {
28568|      0|                        janet_eprintf("  [%d]: %m\n", i, s->captures->data[i]);
  ------------------
  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28569|      0|                    }
28570|      0|                }
28571|      0|            }
28572|       |            /* Tagged captures */
28573|      0|            if (s->tagged_captures->count) {
  ------------------
  |  Branch (28573:17): [True: 0, False: 0]
  ------------------
28574|      0|                janet_eprintf("tag stack [%d]:\n", s->tagged_captures->count);
  ------------------
  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
28575|      0|                for (int32_t i = 0; i < s->tagged_captures->count; i++) {
  ------------------
  |  Branch (28575:37): [True: 0, False: 0]
  ------------------
28576|      0|                    if (has_color) {
  ------------------
  |  Branch (28576:25): [True: 0, False: 0]
  ------------------
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|      0|                    } else {
28579|      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__)
  ------------------
28580|      0|                    }
28581|      0|                }
28582|      0|            }
28583|      0|            return text;
28584|  1.39M|        }
28585|       |
28586|  8.42k|        case RULE_NCHAR: {
  ------------------
  |  Branch (28586:9): [True: 8.42k, False: 4.83M]
  ------------------
28587|  8.42k|            uint32_t n = rule[1];
28588|  8.42k|            return (text + n > s->text_end) ? NULL : text + n;
  ------------------
  |  Branch (28588:20): [True: 1.94k, False: 6.48k]
  ------------------
28589|  1.39M|        }
28590|       |
28591|  10.5k|        case RULE_NOTNCHAR: {
  ------------------
  |  Branch (28591:9): [True: 10.5k, False: 4.82M]
  ------------------
28592|  10.5k|            uint32_t n = rule[1];
28593|  10.5k|            return (text + n > s->text_end) ? text : NULL;
  ------------------
  |  Branch (28593:20): [True: 608, False: 9.97k]
  ------------------
28594|  1.39M|        }
28595|       |
28596|   796k|        case RULE_RANGE: {
  ------------------
  |  Branch (28596:9): [True: 796k, False: 4.04M]
  ------------------
28597|   796k|            uint8_t lo = rule[1] & 0xFF;
28598|   796k|            uint8_t hi = (rule[1] >> 16) & 0xFF;
28599|   796k|            return (text < s->text_end &&
  ------------------
  |  Branch (28599:21): [True: 796k, False: 1]
  ------------------
28600|   796k|                    text[0] >= lo &&
  ------------------
  |  Branch (28600:21): [True: 788k, False: 8.26k]
  ------------------
28601|   788k|                    text[0] <= hi)
  ------------------
  |  Branch (28601:21): [True: 7.11k, False: 781k]
  ------------------
28602|   796k|                   ? text + 1
28603|   796k|                   : NULL;
28604|  1.39M|        }
28605|       |
28606|  1.31k|        case RULE_SET: {
  ------------------
  |  Branch (28606:9): [True: 1.31k, False: 4.83M]
  ------------------
28607|  1.31k|            if (text >= s->text_end) return NULL;
  ------------------
  |  Branch (28607:17): [True: 4, False: 1.31k]
  ------------------
28608|  1.31k|            uint32_t word = rule[1 + (text[0] >> 5)];
28609|  1.31k|            uint32_t mask = (uint32_t)1 << (text[0] & 0x1F);
28610|  1.31k|            return (word & mask)
  ------------------
  |  Branch (28610:20): [True: 782, False: 529]
  ------------------
28611|  1.31k|                   ? text + 1
28612|  1.31k|                   : NULL;
28613|  1.31k|        }
28614|       |
28615|   479k|        case RULE_LOOK: {
  ------------------
  |  Branch (28615:9): [True: 479k, False: 4.35M]
  ------------------
28616|   479k|            text += ((int32_t *)rule)[1];
28617|   479k|            if (text < s->text_start || text > s->text_end) return NULL;
  ------------------
  |  Branch (28617:17): [True: 473k, False: 5.82k]
  |  Branch (28617:41): [True: 101, False: 5.72k]
  ------------------
28618|  5.72k|            down1(s);
  ------------------
  |  |28523|  5.72k|#define down1(s) do { \
  |  |28524|  5.72k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 5.72k]
  |  |  ------------------
  |  |28525|  5.72k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 5.72k]
  |  |  ------------------
  ------------------
28619|  5.72k|            const uint8_t *result = peg_rule(s, s->bytecode + rule[2], text);
28620|  5.72k|            up1(s);
  ------------------
  |  |28526|  5.72k|#define up1(s) ((s)->depth++)
  ------------------
28621|  5.72k|            text -= ((int32_t *)rule)[1];
28622|  5.72k|            return result ? text : NULL;
  ------------------
  |  Branch (28622:20): [True: 2.15k, False: 3.56k]
  ------------------
28623|  5.72k|        }
28624|       |
28625|  5.43k|        case RULE_CHOICE: {
  ------------------
  |  Branch (28625:9): [True: 5.43k, False: 4.83M]
  ------------------
28626|  5.43k|            uint32_t len = rule[1];
28627|  5.43k|            const uint32_t *args = rule + 2;
28628|  5.43k|            if (len == 0) return NULL;
  ------------------
  |  Branch (28628:17): [True: 1.21k, False: 4.22k]
  ------------------
28629|  4.22k|            down1(s);
  ------------------
  |  |28523|  4.22k|#define down1(s) do { \
  |  |28524|  4.22k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 4.22k]
  |  |  ------------------
  |  |28525|  4.22k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 4.22k]
  |  |  ------------------
  ------------------
28630|  4.22k|            CapState cs = cap_save(s);
28631|  10.1k|            for (uint32_t i = 0; i < len - 1; i++) {
  ------------------
  |  Branch (28631:34): [True: 6.12k, False: 3.98k]
  ------------------
28632|  6.12k|                const uint8_t *result = peg_rule(s, s->bytecode + args[i], text);
28633|  6.12k|                if (result) {
  ------------------
  |  Branch (28633:21): [True: 237, False: 5.88k]
  ------------------
28634|    237|                    up1(s);
  ------------------
  |  |28526|    237|#define up1(s) ((s)->depth++)
  ------------------
28635|    237|                    return result;
28636|    237|                }
28637|  5.88k|                cap_load(s, cs);
28638|  5.88k|            }
28639|  3.98k|            up1(s);
  ------------------
  |  |28526|  3.98k|#define up1(s) ((s)->depth++)
  ------------------
28640|  3.98k|            rule = s->bytecode + args[len - 1];
28641|  3.98k|            goto tail;
28642|  4.22k|        }
28643|       |
28644|  6.06k|        case RULE_SEQUENCE: {
  ------------------
  |  Branch (28644:9): [True: 6.06k, False: 4.83M]
  ------------------
28645|  6.06k|            uint32_t len = rule[1];
28646|  6.06k|            const uint32_t *args = rule + 2;
28647|  6.06k|            if (len == 0) return text;
  ------------------
  |  Branch (28647:17): [True: 1.85k, False: 4.21k]
  ------------------
28648|  4.21k|            down1(s);
  ------------------
  |  |28523|  4.21k|#define down1(s) do { \
  |  |28524|  4.21k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 4.21k]
  |  |  ------------------
  |  |28525|  4.21k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 4.21k]
  |  |  ------------------
  ------------------
28649|  8.47k|            for (uint32_t i = 0; text && i < len - 1; i++)
  ------------------
  |  Branch (28649:34): [True: 4.62k, False: 3.84k]
  |  Branch (28649:42): [True: 4.25k, False: 369]
  ------------------
28650|  4.25k|                text = peg_rule(s, s->bytecode + args[i], text);
28651|  4.21k|            up1(s);
  ------------------
  |  |28526|  4.21k|#define up1(s) ((s)->depth++)
  ------------------
28652|  4.21k|            if (!text) return NULL;
  ------------------
  |  Branch (28652:17): [True: 3.84k, False: 369]
  ------------------
28653|    369|            rule = s->bytecode + args[len - 1];
28654|    369|            goto tail;
28655|  4.21k|        }
28656|       |
28657|      0|        case RULE_IF: {
  ------------------
  |  Branch (28657:9): [True: 0, False: 4.83M]
  ------------------
28658|      0|            const uint32_t *rule_a = s->bytecode + rule[1];
28659|      0|            const uint32_t *rule_b = s->bytecode + rule[2];
28660|      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]
  |  |  ------------------
  ------------------
28661|      0|            const uint8_t *result = peg_rule(s, rule_a, text);
28662|      0|            up1(s);
  ------------------
  |  |28526|      0|#define up1(s) ((s)->depth++)
  ------------------
28663|      0|            if (!result) return NULL;
  ------------------
  |  Branch (28663:17): [True: 0, False: 0]
  ------------------
28664|      0|            rule = rule_b;
28665|      0|            goto tail;
28666|      0|        }
28667|    770|        case RULE_IFNOT: {
  ------------------
  |  Branch (28667:9): [True: 770, False: 4.83M]
  ------------------
28668|    770|            const uint32_t *rule_a = s->bytecode + rule[1];
28669|    770|            const uint32_t *rule_b = s->bytecode + rule[2];
28670|    770|            down1(s);
  ------------------
  |  |28523|    770|#define down1(s) do { \
  |  |28524|    770|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 770]
  |  |  ------------------
  |  |28525|    770|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 770]
  |  |  ------------------
  ------------------
28671|    770|            CapState cs = cap_save(s);
28672|    770|            const uint8_t *result = peg_rule(s, rule_a, text);
28673|    770|            if (!!result) {
  ------------------
  |  Branch (28673:17): [True: 339, False: 431]
  ------------------
28674|    339|                up1(s);
  ------------------
  |  |28526|    339|#define up1(s) ((s)->depth++)
  ------------------
28675|    339|                return NULL;
28676|    431|            } else {
28677|    431|                cap_load(s, cs);
28678|    431|                up1(s);
  ------------------
  |  |28526|    431|#define up1(s) ((s)->depth++)
  ------------------
28679|    431|                rule = rule_b;
28680|    431|                goto tail;
28681|    431|            }
28682|    770|        }
28683|       |
28684|  23.3k|        case RULE_NOT: {
  ------------------
  |  Branch (28684:9): [True: 23.3k, False: 4.81M]
  ------------------
28685|  23.3k|            const uint32_t *rule_a = s->bytecode + rule[1];
28686|  23.3k|            down1(s);
  ------------------
  |  |28523|  23.3k|#define down1(s) do { \
  |  |28524|  23.3k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 23.3k]
  |  |  ------------------
  |  |28525|  23.3k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 23.3k]
  |  |  ------------------
  ------------------
28687|  23.3k|            CapState cs = cap_save(s);
28688|  23.3k|            const uint8_t *result = peg_rule(s, rule_a, text);
28689|  23.3k|            if (result) {
  ------------------
  |  Branch (28689:17): [True: 11.5k, False: 11.7k]
  ------------------
28690|  11.5k|                up1(s);
  ------------------
  |  |28526|  11.5k|#define up1(s) ((s)->depth++)
  ------------------
28691|  11.5k|                return NULL;
28692|  11.7k|            } else {
28693|  11.7k|                cap_load(s, cs);
28694|  11.7k|                up1(s);
  ------------------
  |  |28526|  11.7k|#define up1(s) ((s)->depth++)
  ------------------
28695|  11.7k|                return text;
28696|  11.7k|            }
28697|  23.3k|        }
28698|       |
28699|      0|        case RULE_THRU:
  ------------------
  |  Branch (28699:9): [True: 0, False: 4.83M]
  ------------------
28700|      0|        case RULE_TO: {
  ------------------
  |  Branch (28700:9): [True: 0, False: 4.83M]
  ------------------
28701|      0|            const uint32_t *rule_a = s->bytecode + rule[1];
28702|      0|            const uint8_t *next_text = NULL;
28703|      0|            CapState cs = cap_save(s);
28704|      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]
  |  |  ------------------
  ------------------
28705|      0|            while (text <= s->text_end) {
  ------------------
  |  Branch (28705:20): [True: 0, False: 0]
  ------------------
28706|      0|                CapState cs2 = cap_save(s);
28707|      0|                next_text = peg_rule(s, rule_a, text);
28708|      0|                if (next_text) {
  ------------------
  |  Branch (28708:21): [True: 0, False: 0]
  ------------------
28709|      0|                    if (rule[0] == RULE_TO) cap_load(s, cs2);
  ------------------
  |  Branch (28709:25): [True: 0, False: 0]
  ------------------
28710|      0|                    break;
28711|      0|                }
28712|      0|                cap_load(s, cs2);
28713|      0|                text++;
28714|      0|            }
28715|      0|            up1(s);
  ------------------
  |  |28526|      0|#define up1(s) ((s)->depth++)
  ------------------
28716|      0|            if (text > s->text_end) {
  ------------------
  |  Branch (28716:17): [True: 0, False: 0]
  ------------------
28717|      0|                cap_load(s, cs);
28718|      0|                return NULL;
28719|      0|            }
28720|      0|            return rule[0] == RULE_TO ? text : next_text;
  ------------------
  |  Branch (28720:20): [True: 0, False: 0]
  ------------------
28721|      0|        }
28722|       |
28723|  16.1k|        case RULE_BETWEEN: {
  ------------------
  |  Branch (28723:9): [True: 16.1k, False: 4.82M]
  ------------------
28724|  16.1k|            uint32_t lo = rule[1];
28725|  16.1k|            uint32_t hi = rule[2];
28726|  16.1k|            const uint32_t *rule_a = s->bytecode + rule[3];
28727|  16.1k|            uint32_t captured = 0;
28728|  16.1k|            const uint8_t *next_text;
28729|  16.1k|            CapState cs = cap_save(s);
28730|  16.1k|            down1(s);
  ------------------
  |  |28523|  16.1k|#define down1(s) do { \
  |  |28524|  16.1k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 16.1k]
  |  |  ------------------
  |  |28525|  16.1k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 16.1k]
  |  |  ------------------
  ------------------
28731|  31.0k|            while (captured < hi) {
  ------------------
  |  Branch (28731:20): [True: 29.4k, False: 1.61k]
  ------------------
28732|  29.4k|                CapState cs2 = cap_save(s);
28733|  29.4k|                next_text = peg_rule(s, rule_a, text);
28734|  29.4k|                if (!next_text || ((next_text == text) && (hi == UINT32_MAX))) {
  ------------------
  |  Branch (28734:21): [True: 14.5k, False: 14.9k]
  |  Branch (28734:36): [True: 8.86k, False: 6.11k]
  |  Branch (28734:59): [True: 0, False: 8.86k]
  ------------------
28735|  14.4k|                    cap_load(s, cs2);
28736|  14.4k|                    break;
28737|  14.4k|                }
28738|  14.9k|                captured++;
28739|  14.9k|                text = next_text;
28740|  14.9k|            }
28741|  16.1k|            up1(s);
  ------------------
  |  |28526|  16.1k|#define up1(s) ((s)->depth++)
  ------------------
28742|  16.1k|            if (captured < lo) {
  ------------------
  |  Branch (28742:17): [True: 13.7k, False: 2.39k]
  ------------------
28743|  13.7k|                cap_load(s, cs);
28744|  13.7k|                return NULL;
28745|  13.7k|            }
28746|  2.39k|            return text;
28747|  16.1k|        }
28748|       |
28749|       |        /* Capturing rules */
28750|       |
28751|      0|        case RULE_GETTAG: {
  ------------------
  |  Branch (28751:9): [True: 0, False: 4.83M]
  ------------------
28752|      0|            uint32_t search = rule[1];
28753|      0|            uint32_t tag = rule[2];
28754|      0|            for (int32_t i = s->tags->count - 1; i >= 0; i--) {
  ------------------
  |  Branch (28754:50): [True: 0, False: 0]
  ------------------
28755|      0|                if (s->tags->data[i] == search) {
  ------------------
  |  Branch (28755:21): [True: 0, False: 0]
  ------------------
28756|      0|                    pushcap(s, s->tagged_captures->data[i], tag);
28757|      0|                    return text;
28758|      0|                }
28759|      0|            }
28760|      0|            return NULL;
28761|      0|        }
28762|       |
28763|  4.64k|        case RULE_POSITION: {
  ------------------
  |  Branch (28763:9): [True: 4.64k, False: 4.83M]
  ------------------
28764|  4.64k|            pushcap(s, janet_wrap_number((double)(text - s->text_start)), rule[1]);
  ------------------
  |  |  835|  4.64k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
28765|  4.64k|            return text;
28766|      0|        }
28767|       |
28768|      0|        case RULE_LINE: {
  ------------------
  |  Branch (28768:9): [True: 0, False: 4.83M]
  ------------------
28769|      0|            LineCol lc = get_linecol_from_position(s, (int32_t)(text - s->text_start));
28770|      0|            pushcap(s, janet_wrap_number((double)(lc.line)), rule[1]);
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
28771|      0|            return text;
28772|      0|        }
28773|       |
28774|      0|        case RULE_COLUMN: {
  ------------------
  |  Branch (28774:9): [True: 0, False: 4.83M]
  ------------------
28775|      0|            LineCol lc = get_linecol_from_position(s, (int32_t)(text - s->text_start));
28776|      0|            pushcap(s, janet_wrap_number((double)(lc.col)), rule[1]);
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
28777|      0|            return text;
28778|      0|        }
28779|       |
28780|      0|        case RULE_ARGUMENT: {
  ------------------
  |  Branch (28780:9): [True: 0, False: 4.83M]
  ------------------
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|      0|        }
28786|       |
28787|      0|        case RULE_CONSTANT: {
  ------------------
  |  Branch (28787:9): [True: 0, False: 4.83M]
  ------------------
28788|      0|            pushcap(s, s->constants[rule[1]], rule[2]);
28789|      0|            return text;
28790|      0|        }
28791|       |
28792|   735k|        case RULE_CAPTURE: {
  ------------------
  |  Branch (28792:9): [True: 735k, False: 4.10M]
  ------------------
28793|   735k|            down1(s);
  ------------------
  |  |28523|   735k|#define down1(s) do { \
  |  |28524|   735k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 735k]
  |  |  ------------------
  |  |28525|   735k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 735k]
  |  |  ------------------
  ------------------
28794|   735k|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28795|   735k|            up1(s);
  ------------------
  |  |28526|   735k|#define up1(s) ((s)->depth++)
  ------------------
28796|   735k|            if (!result) return NULL;
  ------------------
  |  Branch (28796:17): [True: 155k, False: 580k]
  ------------------
28797|       |            /* Specialized pushcap - avoid intermediate string creation */
28798|   580k|            if (!s->has_backref && s->mode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (28798:17): [True: 580k, False: 0]
  |  Branch (28798:36): [True: 505k, False: 74.9k]
  ------------------
28799|   505k|                janet_buffer_push_bytes(s->scratch, text, (int32_t)(result - text));
28800|   505k|            } else {
28801|  74.9k|                uint32_t tag = rule[2];
28802|  74.9k|                pushcap(s, janet_stringv(text, (int32_t)(result - text)), tag);
  ------------------
  |  | 1827|  74.9k|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|  74.9k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  74.9k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  74.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  74.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28803|  74.9k|            }
28804|   580k|            return result;
28805|   735k|        }
28806|       |
28807|      0|        case RULE_CAPTURE_NUM: {
  ------------------
  |  Branch (28807:9): [True: 0, False: 4.83M]
  ------------------
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|  40.3k|        case RULE_ACCUMULATE: {
  ------------------
  |  Branch (28826:9): [True: 40.3k, False: 4.79M]
  ------------------
28827|  40.3k|            uint32_t tag = rule[2];
28828|  40.3k|            int oldmode = s->mode;
28829|  40.3k|            if (!tag && oldmode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (28829:17): [True: 40.3k, False: 0]
  |  Branch (28829:25): [True: 766, False: 39.5k]
  ------------------
28830|    766|                rule = s->bytecode + rule[1];
28831|    766|                goto tail;
28832|    766|            }
28833|  39.5k|            CapState cs = cap_save(s);
28834|  39.5k|            s->mode = PEG_MODE_ACCUMULATE;
28835|  39.5k|            down1(s);
  ------------------
  |  |28523|  39.5k|#define down1(s) do { \
  |  |28524|  39.5k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 39.5k]
  |  |  ------------------
  |  |28525|  39.5k|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 39.5k]
  |  |  ------------------
  ------------------
28836|  39.5k|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
28837|  39.5k|            up1(s);
  ------------------
  |  |28526|  39.5k|#define up1(s) ((s)->depth++)
  ------------------
28838|  39.5k|            s->mode = oldmode;
28839|  39.5k|            if (!result) return NULL;
  ------------------
  |  Branch (28839:17): [True: 242, False: 39.3k]
  ------------------
28840|  39.3k|            Janet cap = janet_stringv(s->scratch->data + cs.scratch,
  ------------------
  |  | 1827|  39.3k|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|  39.3k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  39.3k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  39.3k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  39.3k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28841|  39.3k|                                      s->scratch->count - cs.scratch);
28842|  39.3k|            cap_load_keept(s, cs);
28843|  39.3k|            pushcap(s, cap, tag);
28844|  39.3k|            return result;
28845|  39.5k|        }
28846|       |
28847|      0|        case RULE_DROP: {
  ------------------
  |  Branch (28847:9): [True: 0, False: 4.83M]
  ------------------
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: 4.83M]
  ------------------
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: 4.83M]
  ------------------
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|      0|        case RULE_NTH: {
  ------------------
  |  Branch (28888:9): [True: 0, False: 4.83M]
  ------------------
28889|      0|            uint32_t nth = rule[1];
28890|      0|            if (nth > INT32_MAX) nth = INT32_MAX;
  ------------------
  |  Branch (28890:17): [True: 0, False: 0]
  ------------------
28891|      0|            uint32_t tag = rule[3];
28892|      0|            int oldmode = s->mode;
28893|      0|            CapState cs = cap_save(s);
28894|      0|            s->mode = PEG_MODE_NORMAL;
28895|      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]
  |  |  ------------------
  ------------------
28896|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[2], text);
28897|      0|            up1(s);
  ------------------
  |  |28526|      0|#define up1(s) ((s)->depth++)
  ------------------
28898|      0|            s->mode = oldmode;
28899|      0|            if (!result) return NULL;
  ------------------
  |  Branch (28899:17): [True: 0, False: 0]
  ------------------
28900|      0|            int32_t num_sub_captures = s->captures->count - cs.cap;
28901|      0|            Janet cap;
28902|      0|            if (num_sub_captures > (int32_t) nth) {
  ------------------
  |  Branch (28902:17): [True: 0, False: 0]
  ------------------
28903|      0|                cap = s->captures->data[cs.cap + nth];
28904|      0|            } else {
28905|      0|                return NULL;
28906|      0|            }
28907|      0|            cap_load_keept(s, cs);
28908|      0|            pushcap(s, cap, tag);
28909|      0|            return result;
28910|      0|        }
28911|       |
28912|      0|        case RULE_SUB: {
  ------------------
  |  Branch (28912:9): [True: 0, False: 4.83M]
  ------------------
28913|      0|            const uint8_t *text_start = text;
28914|      0|            const uint32_t *rule_window = s->bytecode + rule[1];
28915|      0|            const uint32_t *rule_subpattern = s->bytecode + rule[2];
28916|      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]
  |  |  ------------------
  ------------------
28917|      0|            const uint8_t *window_end = peg_rule(s, rule_window, text);
28918|      0|            up1(s);
  ------------------
  |  |28526|      0|#define up1(s) ((s)->depth++)
  ------------------
28919|      0|            if (!window_end) {
  ------------------
  |  Branch (28919:17): [True: 0, False: 0]
  ------------------
28920|      0|                return NULL;
28921|      0|            }
28922|      0|            const uint8_t *saved_end = s->text_end;
28923|      0|            s->text_end = window_end;
28924|      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]
  |  |  ------------------
  ------------------
28925|      0|            const uint8_t *next_text = peg_rule(s, rule_subpattern, text_start);
28926|      0|            up1(s);
  ------------------
  |  |28526|      0|#define up1(s) ((s)->depth++)
  ------------------
28927|      0|            s->text_end = saved_end;
28928|       |
28929|      0|            if (!next_text) {
  ------------------
  |  Branch (28929:17): [True: 0, False: 0]
  ------------------
28930|      0|                return NULL;
28931|      0|            }
28932|       |
28933|      0|            return window_end;
28934|      0|        }
28935|       |
28936|      0|        case RULE_TIL: {
  ------------------
  |  Branch (28936:9): [True: 0, False: 4.83M]
  ------------------
28937|      0|            const uint32_t *rule_terminus = s->bytecode + rule[1];
28938|      0|            const uint32_t *rule_subpattern = s->bytecode + rule[2];
28939|       |
28940|      0|            const uint8_t *terminus_start = text;
28941|      0|            const uint8_t *terminus_end = NULL;
28942|      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]
  |  |  ------------------
  ------------------
28943|      0|            while (terminus_start <= s->text_end) {
  ------------------
  |  Branch (28943:20): [True: 0, False: 0]
  ------------------
28944|      0|                CapState cs2 = cap_save(s);
28945|      0|                terminus_end = peg_rule(s, rule_terminus, terminus_start);
28946|      0|                cap_load(s, cs2);
28947|      0|                if (terminus_end) {
  ------------------
  |  Branch (28947:21): [True: 0, False: 0]
  ------------------
28948|      0|                    break;
28949|      0|                }
28950|      0|                terminus_start++;
28951|      0|            }
28952|      0|            up1(s);
  ------------------
  |  |28526|      0|#define up1(s) ((s)->depth++)
  ------------------
28953|       |
28954|      0|            if (!terminus_end) {
  ------------------
  |  Branch (28954:17): [True: 0, False: 0]
  ------------------
28955|      0|                return NULL;
28956|      0|            }
28957|       |
28958|      0|            const uint8_t *saved_end = s->text_end;
28959|      0|            s->text_end = terminus_start;
28960|      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]
  |  |  ------------------
  ------------------
28961|      0|            const uint8_t *matched = peg_rule(s, rule_subpattern, text);
28962|      0|            up1(s);
  ------------------
  |  |28526|      0|#define up1(s) ((s)->depth++)
  ------------------
28963|      0|            s->text_end = saved_end;
28964|       |
28965|      0|            if (!matched) {
  ------------------
  |  Branch (28965:17): [True: 0, False: 0]
  ------------------
28966|      0|                return NULL;
28967|      0|            }
28968|       |
28969|      0|            return terminus_end;
28970|      0|        }
28971|       |
28972|      0|        case RULE_SPLIT: {
  ------------------
  |  Branch (28972:9): [True: 0, False: 4.83M]
  ------------------
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|  1.31M|        case RULE_REPLACE:
  ------------------
  |  Branch (29013:9): [True: 1.31M, False: 3.52M]
  ------------------
29014|  1.31M|        case RULE_MATCHSPLICE:
  ------------------
  |  Branch (29014:9): [True: 0, False: 4.83M]
  ------------------
29015|  1.31M|        case RULE_MATCHTIME: {
  ------------------
  |  Branch (29015:9): [True: 0, False: 4.83M]
  ------------------
29016|  1.31M|            uint32_t tag = rule[3];
29017|  1.31M|            int oldmode = s->mode;
29018|  1.31M|            CapState cs = cap_save(s);
29019|  1.31M|            s->mode = PEG_MODE_NORMAL;
29020|  1.31M|            down1(s);
  ------------------
  |  |28523|  1.31M|#define down1(s) do { \
  |  |28524|  1.31M|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 1.31M]
  |  |  ------------------
  |  |28525|  1.31M|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 1.31M]
  |  |  ------------------
  ------------------
29021|  1.31M|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
29022|  1.31M|            up1(s);
  ------------------
  |  |28526|  1.31M|#define up1(s) ((s)->depth++)
  ------------------
29023|  1.31M|            s->mode = oldmode;
29024|  1.31M|            if (!result) return NULL;
  ------------------
  |  Branch (29024:17): [True: 1.31M, False: 1]
  ------------------
29025|       |
29026|      1|            Janet cap = janet_wrap_nil();
  ------------------
  |  |  831|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29027|      1|            Janet constant = s->constants[rule[2]];
29028|      1|            switch (janet_type(constant)) {
  ------------------
  |  |  795|      1|    (isnan((x).number) \
  |  |  796|      1|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|      1|        : JANET_NUMBER)
  ------------------
  |  Branch (29028:21): [True: 1, False: 0]
  ------------------
29029|      1|                default:
  ------------------
  |  Branch (29029:17): [True: 1, False: 0]
  ------------------
29030|      1|                    cap = constant;
29031|      1|                    break;
29032|      0|                case JANET_STRUCT:
  ------------------
  |  Branch (29032:17): [True: 0, False: 1]
  ------------------
29033|      0|                    if (s->captures->count) {
  ------------------
  |  Branch (29033:25): [True: 0, False: 0]
  ------------------
29034|      0|                        cap = janet_struct_get(janet_unwrap_struct(constant),
  ------------------
  |  |  857|      0|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
29035|      0|                                               s->captures->data[s->captures->count - 1]);
29036|      0|                    }
29037|      0|                    break;
29038|      0|                case JANET_TABLE:
  ------------------
  |  Branch (29038:17): [True: 0, False: 1]
  ------------------
29039|      0|                    if (s->captures->count) {
  ------------------
  |  Branch (29039:25): [True: 0, False: 0]
  ------------------
29040|      0|                        cap = janet_table_get(janet_unwrap_table(constant),
  ------------------
  |  |  861|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
29041|      0|                                              s->captures->data[s->captures->count - 1]);
29042|      0|                    }
29043|      0|                    break;
29044|      0|                case JANET_CFUNCTION:
  ------------------
  |  Branch (29044:17): [True: 0, False: 1]
  ------------------
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: 1]
  ------------------
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|      1|            }
29054|      1|            cap_load_keept(s, cs);
29055|      1|            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: 1]
  ------------------
29056|      1|            const Janet *elements = NULL;
29057|      1|            int32_t len = 0;
29058|      1|            if ((rule[0] == RULE_MATCHSPLICE) && janet_indexed_view(cap, &elements, &len)) {
  ------------------
  |  Branch (29058:17): [True: 0, False: 1]
  |  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|      1|            } else {
29064|      1|                pushcap(s, cap, tag);
29065|      1|            }
29066|      1|            return result;
29067|      1|        }
29068|       |
29069|    486|        case RULE_ERROR: {
  ------------------
  |  Branch (29069:9): [True: 486, False: 4.83M]
  ------------------
29070|    486|            int oldmode = s->mode;
29071|    486|            s->mode = PEG_MODE_NORMAL;
29072|    486|            int32_t old_cap = s->captures->count;
29073|    486|            down1(s);
  ------------------
  |  |28523|    486|#define down1(s) do { \
  |  |28524|    486|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (28524:9): [True: 0, False: 486]
  |  |  ------------------
  |  |28525|    486|} while (0)
  |  |  ------------------
  |  |  |  Branch (28525:10): [Folded, False: 486]
  |  |  ------------------
  ------------------
29074|    486|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
29075|    486|            up1(s);
  ------------------
  |  |28526|    486|#define up1(s) ((s)->depth++)
  ------------------
29076|    486|            s->mode = oldmode;
29077|    486|            if (!result) return NULL;
  ------------------
  |  Branch (29077:17): [True: 471, False: 15]
  ------------------
29078|     15|            if (s->captures->count > old_cap) {
  ------------------
  |  Branch (29078:17): [True: 1, False: 14]
  ------------------
29079|       |                /* Throw last capture */
29080|      1|                janet_panicv(s->captures->data[s->captures->count - 1]);
29081|     14|            } else {
29082|       |                /* Throw generic error */
29083|     14|                int32_t start = (int32_t)(text - s->text_start);
29084|     14|                LineCol lc = get_linecol_from_position(s, start);
29085|     14|                janet_panicf("match error at line %d, column %d", lc.line, lc.col);
29086|     14|            }
29087|      0|            return NULL;
29088|     15|        }
29089|       |
29090|      0|        case RULE_BACKMATCH: {
  ------------------
  |  Branch (29090:9): [True: 0, False: 4.83M]
  ------------------
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: 4.83M]
  ------------------
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|      0|        case RULE_READINT: {
  ------------------
  |  Branch (29139:9): [True: 0, False: 4.83M]
  ------------------
29140|      0|            uint32_t tag = rule[2];
29141|      0|            uint32_t signedness = rule[1] & 0x10;
29142|      0|            uint32_t endianness = rule[1] & 0x20;
29143|      0|            int width = (int)(rule[1] & 0xF);
29144|      0|            if (text + width > s->text_end) return NULL;
  ------------------
  |  Branch (29144:17): [True: 0, False: 0]
  ------------------
29145|      0|            uint64_t accum = 0;
29146|      0|            if (endianness) {
  ------------------
  |  Branch (29146:17): [True: 0, False: 0]
  ------------------
29147|       |                /* BE */
29148|      0|                for (int i = 0; i < width; i++) accum = (accum << 8) | text[i];
  ------------------
  |  Branch (29148:33): [True: 0, False: 0]
  ------------------
29149|      0|            } else {
29150|       |                /* LE */
29151|      0|                for (int i = width - 1; i >= 0; i--) accum = (accum << 8) | text[i];
  ------------------
  |  Branch (29151:41): [True: 0, False: 0]
  ------------------
29152|      0|            }
29153|       |
29154|      0|            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|      0|#ifdef JANET_INT_TYPES
29158|      0|            if (width > 6) {
  ------------------
  |  Branch (29158:17): [True: 0, False: 0]
  ------------------
29159|      0|                if (signedness) {
  ------------------
  |  Branch (29159:21): [True: 0, False: 0]
  ------------------
29160|      0|                    capture_value = janet_wrap_s64(peg_convert_u64_s64(accum, width));
29161|      0|                } else {
29162|      0|                    capture_value = janet_wrap_u64(accum);
29163|      0|                }
29164|      0|            } else
29165|      0|#endif
29166|      0|            {
29167|      0|                double double_value;
29168|      0|                if (signedness) {
  ------------------
  |  Branch (29168:21): [True: 0, False: 0]
  ------------------
29169|      0|                    double_value = (double)(peg_convert_u64_s64(accum, width));
29170|      0|                } else {
29171|      0|                    double_value = (double)accum;
29172|      0|                }
29173|      0|                capture_value = janet_wrap_number(double_value);
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
29174|      0|            }
29175|       |
29176|      0|            pushcap(s, capture_value, tag);
29177|      0|            return text + width;
29178|      0|        }
29179|       |
29180|      0|        case RULE_UNREF: {
  ------------------
  |  Branch (29180:9): [True: 0, False: 4.83M]
  ------------------
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|  4.83M|    }
29205|  4.83M|}
janet.c:cap_save:
28427|  1.42M|static CapState cap_save(PegState *s) {
28428|  1.42M|    CapState cs;
28429|  1.42M|    cs.scratch = s->scratch->count;
28430|  1.42M|    cs.cap = s->captures->count;
28431|  1.42M|    cs.tcap = s->tagged_captures->count;
28432|  1.42M|    return cs;
28433|  1.42M|}
janet.c:cap_load:
28436|  46.1k|static void cap_load(PegState *s, CapState cs) {
28437|  46.1k|    s->scratch->count = cs.scratch;
28438|  46.1k|    s->captures->count = cs.cap;
28439|  46.1k|    s->tags->count = cs.tcap;
28440|  46.1k|    s->tagged_captures->count = cs.tcap;
28441|  46.1k|}
janet.c:pushcap:
28451|   118k|static void pushcap(PegState *s, Janet capture, uint32_t tag) {
28452|   118k|    if (s->mode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (28452:9): [True: 644, False: 118k]
  ------------------
28453|    644|        janet_to_string_b(s->scratch, capture);
28454|    644|    }
28455|   118k|    if (s->mode == PEG_MODE_NORMAL) {
  ------------------
  |  Branch (28455:9): [True: 118k, False: 644]
  ------------------
28456|   118k|        janet_array_push(s->captures, capture);
28457|   118k|    }
28458|   118k|    if (s->has_backref) {
  ------------------
  |  Branch (28458:9): [True: 0, False: 118k]
  ------------------
28459|      0|        janet_array_push(s->tagged_captures, capture);
28460|      0|        janet_buffer_push_u8(s->tags, tag);
28461|      0|    }
28462|   118k|}
janet.c:get_linecol_from_position:
28470|     14|static LineCol get_linecol_from_position(PegState *s, int32_t position) {
28471|       |    /* Generate if not made yet */
28472|     14|    if (s->linemaplen < 0) {
  ------------------
  |  Branch (28472:9): [True: 14, False: 0]
  ------------------
28473|     14|        int32_t newline_count = 0;
28474|    709|        for (const uint8_t *c = s->text_start; c < s->outer_text_end; c++) {
  ------------------
  |  Branch (28474:48): [True: 695, False: 14]
  ------------------
28475|    695|            if (*c == '\n') newline_count++;
  ------------------
  |  Branch (28475:17): [True: 84, False: 611]
  ------------------
28476|    695|        }
28477|     14|        int32_t *mem = janet_smalloc(sizeof(int32_t) * newline_count);
28478|     14|        size_t index = 0;
28479|    709|        for (const uint8_t *c = s->text_start; c < s->outer_text_end; c++) {
  ------------------
  |  Branch (28479:48): [True: 695, False: 14]
  ------------------
28480|    695|            if (*c == '\n') mem[index++] = (int32_t)(c - s->text_start);
  ------------------
  |  Branch (28480:17): [True: 84, False: 611]
  ------------------
28481|    695|        }
28482|     14|        s->linemaplen = newline_count;
28483|     14|        s->linemap = mem;
28484|     14|    }
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|     14|    int32_t hi = s->linemaplen; /* hi is greater than the actual line */
28494|     14|    int32_t lo = 0; /* lo is less than or equal to the actual line */
28495|     14|    LineCol ret;
28496|     31|    while (lo + 1 < hi) {
  ------------------
  |  Branch (28496:12): [True: 17, False: 14]
  ------------------
28497|     17|        int32_t mid = lo + (hi - lo) / 2;
28498|     17|        if (s->linemap[mid] >= position) {
  ------------------
  |  Branch (28498:13): [True: 17, False: 0]
  ------------------
28499|     17|            hi = mid;
28500|     17|        } else {
28501|      0|            lo = mid;
28502|      0|        }
28503|     17|    }
28504|       |    /* first line case */
28505|     14|    if (s->linemaplen == 0 || (lo == 0 && s->linemap[0] >= position)) {
  ------------------
  |  Branch (28505:9): [True: 6, False: 8]
  |  Branch (28505:32): [True: 8, False: 0]
  |  Branch (28505:43): [True: 8, False: 0]
  ------------------
28506|     14|        ret.line = 1;
28507|     14|        ret.col = position + 1;
28508|     14|    } else {
28509|      0|        ret.line = lo + 2;
28510|      0|        ret.col = position - s->linemap[lo];
28511|      0|    }
28512|     14|    return ret;
28513|     14|}
janet.c:cap_load_keept:
28445|  39.3k|static void cap_load_keept(PegState *s, CapState cs) {
28446|  39.3k|    s->scratch->count = cs.scratch;
28447|  39.3k|    s->captures->count = cs.cap;
28448|  39.3k|}
janet.c:peg_call_reset:
30361|  2.67M|static void peg_call_reset(PegCall *c) {
30362|  2.67M|    c->s.depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|  2.67M|#define JANET_RECURSION_GUARD 1024
  ------------------
30363|  2.67M|    c->s.captures->count = 0;
30364|  2.67M|    c->s.tagged_captures->count = 0;
30365|  2.67M|    c->s.scratch->count = 0;
30366|  2.67M|    c->s.tags->count = 0;
30367|  2.67M|}
janet.c:cfun_peg_replace_generic:
30427|   124k|static Janet cfun_peg_replace_generic(int32_t argc, Janet *argv, int only_one) {
30428|   124k|    PegCall c = peg_cfun_init(argc, argv, 1);
30429|   124k|    PEG_TRY_SETUP
  ------------------
  |  |30370|   124k|    JanetTryState tstate; \
  |  |30371|   124k|    if (c.input_buffer && janet_try(&tstate)) { \
  |  |  ------------------
  |  |  |  | 1981|  45.3k|#define janet_try(state) (janet_try_init(state), (JanetSignal) setjmp((state)->buf))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1981:26): [True: 0, False: 45.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (30371:9): [True: 45.3k, False: 78.7k]
  |  |  ------------------
  |  |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|    }
  ------------------
30430|   124k|    JanetBuffer *ret = janet_buffer(0);
30431|   124k|    int32_t trail = 0;
30432|  1.95M|    for (int32_t i = c.start; i < c.bytes.len;) {
  ------------------
  |  Branch (30432:31): [True: 1.86M, False: 84.0k]
  ------------------
30433|  1.86M|        peg_call_reset(&c);
30434|  1.86M|        const uint8_t *result = peg_rule(&c.s, c.s.bytecode, c.bytes.bytes + i);
30435|  1.86M|        if (NULL != result) {
  ------------------
  |  Branch (30435:13): [True: 43.1k, False: 1.82M]
  ------------------
30436|  43.1k|            if (trail < i) {
  ------------------
  |  Branch (30436:17): [True: 3.39k, False: 39.7k]
  ------------------
30437|  3.39k|                janet_buffer_push_bytes(ret, c.bytes.bytes + trail, (i - trail));
30438|  3.39k|                trail = i;
30439|  3.39k|            }
30440|  43.1k|            int32_t nexti = (int32_t)(result - c.bytes.bytes);
30441|  43.1k|            JanetByteView subst = janet_text_substitution(&c.subst, c.bytes.bytes + i, nexti - i, c.s.captures);
30442|  43.1k|            janet_buffer_push_bytes(ret, subst.bytes, subst.len);
30443|  43.1k|            trail = nexti;
30444|  43.1k|            if (nexti == i) nexti++;
  ------------------
  |  Branch (30444:17): [True: 4.34k, False: 38.8k]
  ------------------
30445|  43.1k|            i = nexti;
30446|  43.1k|            if (only_one) break;
  ------------------
  |  Branch (30446:17): [True: 40.0k, False: 3.08k]
  ------------------
30447|  1.82M|        } else {
30448|  1.82M|            i++;
30449|  1.82M|        }
30450|  1.86M|    }
30451|   124k|    if (trail < c.bytes.len) {
  ------------------
  |  Branch (30451:9): [True: 85.1k, False: 38.9k]
  ------------------
30452|  85.1k|        janet_buffer_push_bytes(ret, c.bytes.bytes + trail, (c.bytes.len - trail));
30453|  85.1k|    }
30454|   124k|    PEG_TRY_TEARDOWN
  ------------------
  |  |30379|   124k|    if (c.input_buffer) { \
  |  |  ------------------
  |  |  |  Branch (30379:9): [True: 45.3k, False: 78.7k]
  |  |  ------------------
  |  |30380|  45.3k|        janet_restore(&tstate); \
  |  |30381|  45.3k|        c.input_buffer->gc.flags = c.old_flags; \
  |  |30382|  45.3k|    }
  ------------------
30455|   124k|    return janet_wrap_buffer(ret);
  ------------------
  |  |  847|   124k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|   124k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   124k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   124k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30456|   124k|}
janet.c:number_to_string_b:
30564|  4.27M|static void number_to_string_b(JanetBuffer *buffer, double x) {
30565|  4.27M|    janet_buffer_extra(buffer, BUFSIZE);
  ------------------
  |  |30558|  4.27M|#define BUFSIZE 64
  ------------------
30566|  4.27M|    const char *fmt = (x == floor(x) &&
  ------------------
  |  Branch (30566:24): [True: 4.27M, False: 138]
  ------------------
30567|  4.27M|                       x <= JANET_INTMAX_DOUBLE &&
  ------------------
  |  |  165|  8.55M|#define JANET_INTMAX_DOUBLE 9007199254740992.0
  ------------------
  |  Branch (30567:24): [True: 4.27M, False: 1.06k]
  ------------------
30568|  4.27M|                       x >= JANET_INTMIN_DOUBLE) ? "%.0f" : ("%." STR(DBL_DIG) "g");
  ------------------
  |  |  166|  4.27M|#define JANET_INTMIN_DOUBLE (-9007199254740992.0)
  ------------------
  |  Branch (30568:24): [True: 4.27M, False: 61]
  ------------------
30569|  4.27M|    int count;
30570|  4.27M|    if (x == 0.0) {
  ------------------
  |  Branch (30570:9): [True: 106k, False: 4.16M]
  ------------------
30571|       |        /* Prevent printing of '-0' */
30572|   106k|        count = 1;
30573|   106k|        buffer->data[buffer->count] = '0';
30574|  4.16M|    } else {
30575|  4.16M|        count = snprintf((char *) buffer->data + buffer->count, BUFSIZE, fmt, x);
  ------------------
  |  |30558|  4.16M|#define BUFSIZE 64
  ------------------
30576|  4.16M|    }
30577|  4.27M|    buffer->count += count;
30578|  4.27M|}
janet.c:string_description_b:
30624|   486k|static void string_description_b(JanetBuffer *buffer, const char *title, void *pointer) {
30625|   486k|    janet_buffer_extra(buffer, BUFSIZE);
  ------------------
  |  |30558|   486k|#define BUFSIZE 64
  ------------------
30626|   486k|    uint8_t *c = buffer->data + buffer->count;
30627|   486k|    int32_t i;
30628|   486k|    union {
30629|   486k|        uint8_t bytes[sizeof(void *)];
30630|   486k|        void *p;
30631|   486k|    } pbuf;
30632|       |
30633|   486k|    pbuf.p = pointer;
30634|   486k|    *c++ = '<';
30635|       |    /* Maximum of 32 bytes for abstract type name */
30636|  4.19M|    for (i = 0; i < 32 && title[i]; ++i)
  ------------------
  |  Branch (30636:17): [True: 4.19M, False: 0]
  |  Branch (30636:27): [True: 3.70M, False: 486k]
  ------------------
30637|  3.70M|        *c++ = ((uint8_t *)title) [i];
30638|   486k|    *c++ = ' ';
30639|   486k|    *c++ = '0';
30640|   486k|    *c++ = 'x';
30641|   486k|#if defined(JANET_NANBOX_64)
30642|   486k|#define POINTSIZE 6
30643|       |#else
30644|       |#define POINTSIZE (sizeof(void *))
30645|       |#endif
30646|  3.40M|    for (i = POINTSIZE; i > 0; --i) {
  ------------------
  |  |30642|   486k|#define POINTSIZE 6
  ------------------
  |  Branch (30646:25): [True: 2.91M, False: 486k]
  ------------------
30647|  2.91M|        uint8_t byte = pbuf.bytes[i - 1];
30648|  2.91M|        *c++ = HEX(byte >> 4);
  ------------------
  |  |30620|  2.91M|#define HEX(i) (((uint8_t *) janet_base64)[(i)])
  ------------------
30649|  2.91M|        *c++ = HEX(byte & 0xF);
  ------------------
  |  |30620|  2.91M|#define HEX(i) (((uint8_t *) janet_base64)[(i)])
  ------------------
30650|  2.91M|    }
30651|   486k|    *c++ = '>';
30652|   486k|    buffer->count = (int32_t)(c - buffer->data);
30653|   486k|#undef POINTSIZE
30654|   486k|}
janet.c:janet_escape_string_b:
30726|   145k|static void janet_escape_string_b(JanetBuffer *buffer, const uint8_t *str) {
30727|       |    janet_escape_string_impl(buffer, str, janet_string_length(str));
  ------------------
  |  | 1813|   145k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|   145k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
30728|   145k|}
janet.c:janet_escape_string_impl:
30656|   233k|static int janet_escape_string_impl(JanetBuffer *buffer, const uint8_t *str, int32_t len) {
30657|   233k|    janet_buffer_push_u8(buffer, '"');
30658|   233k|    int align = 1;
30659|  5.13M|    for (int32_t i = 0; i < len; ++i) {
  ------------------
  |  Branch (30659:25): [True: 4.90M, False: 233k]
  ------------------
30660|  4.90M|        uint8_t c = str[i];
30661|  4.90M|        switch (c) {
30662|  1.09k|            case '"':
  ------------------
  |  Branch (30662:13): [True: 1.09k, False: 4.90M]
  ------------------
30663|  1.09k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\\"", 2);
30664|  1.09k|                align += 2;
30665|  1.09k|                break;
30666|  3.91k|            case '\n':
  ------------------
  |  Branch (30666:13): [True: 3.91k, False: 4.89M]
  ------------------
30667|  3.91k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\n", 2);
30668|  3.91k|                align += 2;
30669|  3.91k|                break;
30670|    324|            case '\r':
  ------------------
  |  Branch (30670:13): [True: 324, False: 4.90M]
  ------------------
30671|    324|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\r", 2);
30672|    324|                align += 2;
30673|    324|                break;
30674|  1.37M|            case '\0':
  ------------------
  |  Branch (30674:13): [True: 1.37M, False: 3.52M]
  ------------------
30675|  1.37M|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\0", 2);
30676|  1.37M|                align += 2;
30677|  1.37M|                break;
30678|  2.05k|            case '\f':
  ------------------
  |  Branch (30678:13): [True: 2.05k, False: 4.90M]
  ------------------
30679|  2.05k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\f", 2);
30680|  2.05k|                align += 2;
30681|  2.05k|                break;
30682|  2.94k|            case '\v':
  ------------------
  |  Branch (30682:13): [True: 2.94k, False: 4.89M]
  ------------------
30683|  2.94k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\v", 2);
30684|  2.94k|                align += 2;
30685|  2.94k|                break;
30686|    227|            case '\a':
  ------------------
  |  Branch (30686:13): [True: 227, False: 4.90M]
  ------------------
30687|    227|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\a", 2);
30688|    227|                align += 2;
30689|    227|                break;
30690|  8.62k|            case '\b':
  ------------------
  |  Branch (30690:13): [True: 8.62k, False: 4.89M]
  ------------------
30691|  8.62k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\b", 2);
30692|  8.62k|                align += 2;
30693|  8.62k|                break;
30694|   115k|            case 27:
  ------------------
  |  Branch (30694:13): [True: 115k, False: 4.78M]
  ------------------
30695|   115k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\e", 2);
30696|   115k|                align += 2;
30697|   115k|                break;
30698|    563|            case '\\':
  ------------------
  |  Branch (30698:13): [True: 563, False: 4.90M]
  ------------------
30699|    563|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\\\", 2);
30700|    563|                align += 2;
30701|    563|                break;
30702|    475|            case '\t':
  ------------------
  |  Branch (30702:13): [True: 475, False: 4.90M]
  ------------------
30703|    475|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\t", 2);
30704|    475|                align += 2;
30705|    475|                break;
30706|  3.38M|            default:
  ------------------
  |  Branch (30706:13): [True: 3.38M, False: 1.51M]
  ------------------
30707|  3.38M|                if (c < 32 || c > 126) {
  ------------------
  |  Branch (30707:21): [True: 440k, False: 2.94M]
  |  Branch (30707:31): [True: 316k, False: 2.63M]
  ------------------
30708|   757k|                    uint8_t buf[4];
30709|   757k|                    buf[0] = '\\';
30710|   757k|                    buf[1] = 'x';
30711|   757k|                    buf[2] = janet_base64[(c >> 4) & 0xF];
30712|   757k|                    buf[3] = janet_base64[c & 0xF];
30713|   757k|                    janet_buffer_push_bytes(buffer, buf, 4);
30714|   757k|                    align += 4;
30715|  2.63M|                } else {
30716|  2.63M|                    janet_buffer_push_u8(buffer, c);
30717|  2.63M|                    align++;
30718|  2.63M|                }
30719|  3.38M|                break;
30720|  4.90M|        }
30721|  4.90M|    }
30722|   233k|    janet_buffer_push_u8(buffer, '"');
30723|   233k|    return align + 1;
30724|   233k|}
janet.c:janet_escape_buffer_b:
30730|  87.3k|static void janet_escape_buffer_b(JanetBuffer *buffer, JanetBuffer *bx) {
30731|  87.3k|    if (bx == buffer) {
  ------------------
  |  Branch (30731:9): [True: 0, False: 87.3k]
  ------------------
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|  87.3k|    janet_buffer_push_u8(buffer, '@');
30738|  87.3k|    janet_escape_string_impl(buffer, bx->data, bx->count);
30739|  87.3k|}
janet.c:janet_pretty_:
31353|  26.9k|                                  int flags, Janet x, int32_t startlen, int32_t lookback_barrier) {
31354|  26.9k|    struct pretty S;
31355|  26.9k|    if (NULL == buffer) {
  ------------------
  |  Branch (31355:9): [True: 0, False: 26.9k]
  ------------------
31356|      0|        buffer = janet_buffer(0);
31357|      0|    }
31358|  26.9k|    S.buffer = buffer;
31359|  26.9k|    S.depth = depth;
31360|  26.9k|    S.width = width;
31361|  26.9k|    S.align = 0;
31362|  26.9k|    S.flags = flags;
31363|  26.9k|    S.bufstartlen = startlen;
31364|  26.9k|    S.lookback_barrier = lookback_barrier;
31365|  26.9k|    S.keysort_capacity = 0;
31366|       |    S.keysort_buffer = NULL;
31367|  26.9k|    S.keysort_start = 0;
31368|  26.9k|    janet_table_init(&S.seen, 10);
31369|  26.9k|    janet_pretty_one(&S, x);
31370|  26.9k|    backtrack_newlines(&S);
31371|  26.9k|    janet_table_deinit(&S.seen);
31372|  26.9k|    return S.buffer;
31373|  26.9k|}
janet.c:janet_pretty_one:
31120|  3.35M|static void janet_pretty_one(struct pretty *S, Janet x) {
31121|       |    /* Add to seen */
31122|  3.35M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  3.35M|    (isnan((x).number) \
  |  |  796|  3.35M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  3.35M|        : JANET_NUMBER)
  ------------------
  |  Branch (31122:13): [True: 3.08M, False: 269k]
  ------------------
31123|    144|        case JANET_NIL:
  ------------------
  |  Branch (31123:9): [True: 144, False: 3.35M]
  ------------------
31124|   270k|        case JANET_NUMBER:
  ------------------
  |  Branch (31124:9): [True: 269k, False: 3.08M]
  ------------------
31125|  1.94M|        case JANET_SYMBOL:
  ------------------
  |  Branch (31125:9): [True: 1.67M, False: 1.68M]
  ------------------
31126|  1.94M|        case JANET_BOOLEAN:
  ------------------
  |  Branch (31126:9): [True: 1.10k, False: 3.35M]
  ------------------
31127|  1.94M|            break;
31128|  1.41M|        default: {
  ------------------
  |  Branch (31128:9): [True: 1.41M, False: 1.94M]
  ------------------
31129|  1.41M|            Janet seenid = janet_table_get(&S->seen, x);
31130|  1.41M|            if (janet_checktype(seenid, JANET_NUMBER)) {
  ------------------
  |  |  806|  1.41M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 12, False: 1.41M]
  |  |  |  Branch (806:6): [True: 1.41M, Folded]
  |  |  ------------------
  |  |  807|  1.41M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|  1.41M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 12, False: 1.41M]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 1.41M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  1.41M|        : 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|     12|                if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|     12|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31131:21): [True: 0, False: 12]
  ------------------
31132|      0|                    janet_buffer_push_cstring(S->buffer, janet_cycle_color);
31133|      0|                }
31134|     12|                janet_buffer_push_cstring(S->buffer, "<cycle ");
31135|     12|                S->align += 8 + integer_to_string_b(S->buffer, janet_unwrap_integer(seenid));
  ------------------
  |  |  966|     12|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|     12|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
31136|     12|                janet_buffer_push_u8(S->buffer, '>');
31137|     12|                if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1967|     12|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31137:21): [True: 0, False: 12]
  ------------------
31138|      0|                    janet_buffer_push_cstring(S->buffer, "\x1B[0m");
31139|      0|                }
31140|     12|                return;
31141|  1.41M|            } else {
31142|  1.41M|                janet_table_put(&S->seen, x, janet_wrap_integer(S->seen.count));
  ------------------
  |  |  967|  1.41M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  1.41M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
31143|  1.41M|                break;
31144|  1.41M|            }
31145|  1.41M|        }
31146|  3.35M|    }
31147|       |
31148|  3.35M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  3.35M|    (isnan((x).number) \
  |  |  796|  3.35M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  3.35M|        : JANET_NUMBER)
  ------------------
  |  Branch (31148:13): [True: 3.08M, False: 269k]
  ------------------
31149|  2.17M|        default: {
  ------------------
  |  Branch (31149:9): [True: 2.17M, False: 1.17M]
  ------------------
31150|  2.17M|            const char *color = janet_pretty_colors[janet_type(x)];
  ------------------
  |  |  795|  2.17M|    (isnan((x).number) \
  |  |  796|  2.17M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  2.17M|        : JANET_NUMBER)
  ------------------
  |  Branch (31150:53): [True: 1.90M, False: 269k]
  ------------------
31151|  2.17M|            if (color && (S->flags & JANET_PRETTY_COLOR)) {
  ------------------
  |  | 1967|  2.17M|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31151:17): [True: 2.17M, False: 0]
  |  Branch (31151:26): [True: 1.90M, False: 273k]
  ------------------
31152|  1.90M|                janet_buffer_push_cstring(S->buffer, color);
31153|  1.90M|            }
31154|  2.17M|            if (janet_checktype(x, JANET_BUFFER) && janet_unwrap_buffer(x) == S->buffer) {
  ------------------
  |  |  806|  4.35M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 81.7k, False: 2.09M]
  |  |  |  Branch (806:6): [Folded, False: 2.17M]
  |  |  ------------------
  |  |  807|  4.35M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.35M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.17M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.17M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.17M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.17M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          if (janet_checktype(x, JANET_BUFFER) && janet_unwrap_buffer(x) == S->buffer) {
  ------------------
  |  |  862|  81.7k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (31154:53): [True: 0, False: 81.7k]
  ------------------
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|  2.17M|            } else {
31162|  2.17M|                S->align -= S->buffer->count;
31163|  2.17M|                janet_description_b(S->buffer, x);
31164|  2.17M|                S->align += S->buffer->count;
31165|  2.17M|            }
31166|  2.17M|            if (color && (S->flags & JANET_PRETTY_COLOR)) {
  ------------------
  |  | 1967|  2.17M|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31166:17): [True: 2.17M, False: 0]
  |  Branch (31166:26): [True: 1.90M, False: 273k]
  ------------------
31167|  1.90M|                janet_buffer_push_cstring(S->buffer, "\x1B[0m");
31168|  1.90M|            }
31169|  2.17M|            break;
31170|  2.17M|        }
31171|    376|        case JANET_ARRAY:
  ------------------
  |  Branch (31171:9): [True: 376, False: 3.35M]
  ------------------
31172|  1.16M|        case JANET_TUPLE: {
  ------------------
  |  Branch (31172:9): [True: 1.16M, False: 2.18M]
  ------------------
31173|  1.16M|            int32_t i = 0, len = 0;
31174|  1.16M|            const Janet *arr = NULL;
31175|  1.16M|            int isarray = janet_checktype(x, JANET_ARRAY);
  ------------------
  |  |  806|  1.16M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 1.16M]
  |  |  ------------------
  |  |  807|  1.16M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.16M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.16M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.16M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.16M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.16M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31176|  1.16M|            janet_indexed_view(x, &arr, &len);
31177|  1.16M|            int hasbrackets = !isarray && (janet_tuple_flag(arr) & JANET_TUPLE_FLAG_BRACKETCTOR);
  ------------------
  |  | 1806|  1.16M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  1.16M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                          int hasbrackets = !isarray && (janet_tuple_flag(arr) & JANET_TUPLE_FLAG_BRACKETCTOR);
  ------------------
  |  | 1798|  1.16M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (31177:31): [True: 1.16M, False: 376]
  |  Branch (31177:43): [True: 302, False: 1.16M]
  ------------------
31178|  1.16M|            const char *startstr = isarray ? "@[" : hasbrackets ? "[" : "(";
  ------------------
  |  Branch (31178:36): [True: 376, False: 1.16M]
  |  Branch (31178:53): [True: 302, False: 1.16M]
  ------------------
31179|  1.16M|            const char endchar = isarray ? ']' : hasbrackets ? ']' : ')';
  ------------------
  |  Branch (31179:34): [True: 376, False: 1.16M]
  |  Branch (31179:50): [True: 302, False: 1.16M]
  ------------------
31180|  1.16M|            janet_buffer_push_cstring(S->buffer, startstr);
31181|  1.16M|            S->align += (int32_t) strlen(startstr);
31182|  1.16M|            const int align = S->leaf_align = S->align;
31183|  1.16M|            S->depth--;
31184|  1.16M|            if (S->depth == 0) {
  ------------------
  |  Branch (31184:17): [True: 50, False: 1.16M]
  ------------------
31185|     50|                janet_buffer_push_cstring(S->buffer, "...");
31186|     50|                S->align += 3;
31187|  1.16M|            } else {
31188|  1.16M|                if (len > JANET_PRETTY_ARRAY_LIMIT && !(S->flags & JANET_PRETTY_NOTRUNC)) {
  ------------------
  |  |31117|  2.33M|#define JANET_PRETTY_ARRAY_LIMIT 160
  ------------------
                              if (len > JANET_PRETTY_ARRAY_LIMIT && !(S->flags & JANET_PRETTY_NOTRUNC)) {
  ------------------
  |  | 1969|    494|#define JANET_PRETTY_NOTRUNC 4
  ------------------
  |  Branch (31188:21): [True: 494, False: 1.16M]
  |  Branch (31188:55): [True: 58, False: 436]
  ------------------
31189|    232|                    for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (31189:33): [True: 174, False: 58]
  ------------------
31190|    174|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (31190:29): [True: 116, False: 58]
  ------------------
31191|    174|                        janet_pretty_one(S, arr[i]);
31192|    174|                    }
31193|     58|                    print_newline(S, align);
31194|     58|                    janet_buffer_push_cstring(S->buffer, "...");
31195|     58|                    S->align += 3;
31196|    232|                    for (i = len - 3; i < len; i++) {
  ------------------
  |  Branch (31196:39): [True: 174, False: 58]
  ------------------
31197|    174|                        print_newline(S, align);
31198|    174|                        janet_pretty_one(S, arr[i]);
31199|    174|                    }
31200|  1.16M|                } else {
31201|  4.47M|                    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (31201:33): [True: 3.30M, False: 1.16M]
  ------------------
31202|  3.30M|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (31202:29): [True: 2.13M, False: 1.16M]
  ------------------
31203|  3.30M|                        janet_pretty_one(S, arr[i]);
31204|  3.30M|                    }
31205|  1.16M|                }
31206|  1.16M|            }
31207|  1.16M|            S->depth++;
31208|  1.16M|            janet_buffer_push_u8(S->buffer, endchar);
31209|  1.16M|            S->align++;
31210|  1.16M|            break;
31211|    376|        }
31212|  6.25k|        case JANET_STRUCT:
  ------------------
  |  Branch (31212:9): [True: 6.25k, False: 3.34M]
  ------------------
31213|  7.01k|        case JANET_TABLE: {
  ------------------
  |  Branch (31213:9): [True: 760, False: 3.35M]
  ------------------
31214|  7.01k|            int istable = janet_checktype(x, JANET_TABLE);
  ------------------
  |  |  806|  7.01k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 7.01k]
  |  |  ------------------
  |  |  807|  7.01k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  7.01k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  7.01k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  7.01k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.01k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.01k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31215|       |
31216|       |            /* For object-like tables, print class name */
31217|  7.01k|            if (istable) {
  ------------------
  |  Branch (31217:17): [True: 760, False: 6.25k]
  ------------------
31218|    760|                JanetTable *t = janet_unwrap_table(x);
  ------------------
  |  |  861|    760|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
31219|    760|                JanetTable *proto = t->proto;
31220|    760|                S->align++;
31221|    760|                janet_buffer_push_cstring(S->buffer, "@");
31222|    760|                if (NULL != proto) {
  ------------------
  |  Branch (31222:21): [True: 3, False: 757]
  ------------------
31223|      3|                    Janet name = janet_table_get(proto, janet_ckeywordv("_name"));
  ------------------
  |  | 1843|      3|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|      3|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|      3|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31224|      3|                    const uint8_t *n;
31225|      3|                    int32_t len;
31226|      3|                    if (janet_bytes_view(name, &n, &len)) {
  ------------------
  |  Branch (31226:25): [True: 0, False: 3]
  ------------------
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|      3|                }
31237|  6.25k|            } else {
31238|  6.25k|                JanetStruct st = janet_unwrap_struct(x);
  ------------------
  |  |  857|  6.25k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
31239|  6.25k|                JanetStruct proto = janet_struct_proto(st);
  ------------------
  |  | 1851|  6.25k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|  6.25k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
31240|  6.25k|                if (NULL != proto) {
  ------------------
  |  Branch (31240:21): [True: 0, False: 6.25k]
  ------------------
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|  6.25k|            }
31256|  7.01k|            janet_buffer_push_u8(S->buffer, '{');
31257|  7.01k|            const int align = S->leaf_align = ++S->align;
31258|       |
31259|  7.01k|            S->depth--;
31260|  7.01k|            if (S->depth == 0) {
  ------------------
  |  Branch (31260:17): [True: 1, False: 7.01k]
  ------------------
31261|      1|                janet_buffer_push_cstring(S->buffer, "...");
31262|      1|                S->align += 3;
31263|  7.01k|            } else {
31264|  7.01k|                int32_t len = 0, cap = 0;
31265|  7.01k|                const JanetKV *kvs = NULL;
31266|  7.01k|                janet_dictionary_view(x, &kvs, &len, &cap);
31267|  7.01k|                int32_t ks_start = S->keysort_start;
31268|  7.01k|                int truncated = 0;
31269|       |
31270|       |                /* Shortcut for huge dictionaries, don't bother sorting keys */
31271|  7.01k|                if (len > JANET_PRETTY_DICT_KEYSORT_LIMIT) {
  ------------------
  |  |31116|  7.01k|#define JANET_PRETTY_DICT_KEYSORT_LIMIT 2000
  ------------------
  |  Branch (31271:21): [True: 0, False: 7.01k]
  ------------------
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|  7.01k|                } else {
31292|       |                    /* Sorted keys dictionaries */
31293|       |
31294|       |                    /* Ensure buffer is large enough to sort keys. */
31295|  7.01k|                    int64_t mincap = (int64_t) len + (int64_t) ks_start;
31296|  7.01k|                    if (mincap > INT32_MAX) {
  ------------------
  |  Branch (31296:25): [True: 0, False: 7.01k]
  ------------------
31297|      0|                        truncated = 1;
31298|      0|                        len = 0;
31299|      0|                        mincap = ks_start;
31300|      0|                    }
31301|       |
31302|  7.01k|                    if (S->keysort_capacity < mincap) {
  ------------------
  |  Branch (31302:25): [True: 536, False: 6.47k]
  ------------------
31303|    536|                        if (mincap >= INT32_MAX / 2) {
  ------------------
  |  Branch (31303:29): [True: 0, False: 536]
  ------------------
31304|      0|                            S->keysort_capacity = INT32_MAX;
31305|    536|                        } else {
31306|    536|                            S->keysort_capacity = (int32_t)(mincap * 2);
31307|    536|                        }
31308|    536|                        S->keysort_buffer = janet_srealloc(S->keysort_buffer, sizeof(int32_t) * S->keysort_capacity);
31309|    536|                        if (NULL == S->keysort_buffer) {
  ------------------
  |  Branch (31309:29): [True: 0, False: 536]
  ------------------
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|    536|                    }
31313|       |
31314|  7.01k|                    janet_sorted_keys(kvs, cap, S->keysort_buffer == NULL ? NULL : S->keysort_buffer + ks_start);
  ------------------
  |  Branch (31314:49): [True: 2.44k, False: 4.56k]
  ------------------
31315|  7.01k|                    S->keysort_start += len;
31316|  7.01k|                    if (!(S->flags & JANET_PRETTY_NOTRUNC) && (len > JANET_PRETTY_DICT_LIMIT)) {
  ------------------
  |  | 1969|  7.01k|#define JANET_PRETTY_NOTRUNC 4
  ------------------
                                  if (!(S->flags & JANET_PRETTY_NOTRUNC) && (len > JANET_PRETTY_DICT_LIMIT)) {
  ------------------
  |  |31115|  2.70k|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
  |  Branch (31316:25): [True: 2.70k, False: 4.31k]
  |  Branch (31316:63): [True: 38, False: 2.66k]
  ------------------
31317|     38|                        len = JANET_PRETTY_DICT_LIMIT;
  ------------------
  |  |31115|     38|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
31318|     38|                        truncated = 1;
31319|     38|                    }
31320|       |
31321|  18.3k|                    for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (31321:41): [True: 11.3k, False: 7.01k]
  ------------------
31322|  11.3k|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (31322:29): [True: 8.37k, False: 2.93k]
  ------------------
31323|  11.3k|                        int32_t j = S->keysort_buffer[i + ks_start];
31324|  11.3k|                        janet_pretty_one(S, kvs[j].key);
31325|  11.3k|                        janet_buffer_push_u8(S->buffer, ' ');
31326|  11.3k|                        S->align++;
31327|  11.3k|                        janet_pretty_one(S, kvs[j].value);
31328|  11.3k|                    }
31329|       |
31330|  7.01k|                    if (truncated) {
  ------------------
  |  Branch (31330:25): [True: 38, False: 6.97k]
  ------------------
31331|     38|                        print_newline(S, align);
31332|     38|                        janet_buffer_push_cstring(S->buffer, "...");
31333|     38|                        S->align += 3;
31334|     38|                    }
31335|       |
31336|  7.01k|                }
31337|  7.01k|                S->keysort_start = ks_start;
31338|  7.01k|            }
31339|  7.01k|            S->depth++;
31340|  7.01k|            janet_buffer_push_u8(S->buffer, '}');
31341|  7.01k|            S->align++;
31342|  7.01k|            break;
31343|  7.01k|        }
31344|  3.35M|    }
31345|       |    /* Remove from seen */
31346|  3.35M|    janet_table_remove(&S->seen, x);
31347|  3.35M|    return;
31348|  3.35M|}
janet.c:integer_to_string_b:
30593|     12|static int32_t integer_to_string_b(JanetBuffer *buffer, int32_t x) {
30594|     12|    janet_buffer_extra(buffer, BUFSIZE);
  ------------------
  |  |30558|     12|#define BUFSIZE 64
  ------------------
30595|     12|    uint8_t *buf = buffer->data + buffer->count;
30596|     12|    int32_t neg = 0;
30597|     12|    int32_t len = 0;
30598|     12|    if (x == 0) {
  ------------------
  |  Branch (30598:9): [True: 12, False: 0]
  ------------------
30599|     12|        buf[0] = '0';
30600|     12|        buffer->count++;
30601|     12|        return 1;
30602|     12|    }
30603|      0|    if (x > 0) {
  ------------------
  |  Branch (30603:9): [True: 0, False: 0]
  ------------------
30604|      0|        x = -x;
30605|      0|    } else {
30606|      0|        neg = 1;
30607|      0|        *buf++ = '-';
30608|      0|    }
30609|      0|    len = count_dig10(x);
30610|      0|    buf += len;
30611|      0|    while (x) {
  ------------------
  |  Branch (30611:12): [True: 0, False: 0]
  ------------------
30612|      0|        uint8_t digit = (uint8_t) - (x % 10);
30613|      0|        *(--buf) = '0' + digit;
30614|      0|        x /= 10;
30615|      0|    }
30616|      0|    buffer->count += len + neg;
30617|      0|    return len + neg;
30618|     12|}
janet.c:print_newline:
31079|  2.14M|static void print_newline(struct pretty *S, int align) {
31080|  2.14M|    int i;
31081|  2.14M|    if (S->flags & JANET_PRETTY_ONELINE) {
  ------------------
  |  | 1968|  2.14M|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (31081:9): [True: 153k, False: 1.99M]
  ------------------
31082|   153k|        janet_buffer_push_u8(S->buffer, ' ');
31083|   153k|        return;
31084|   153k|    }
31085|  1.99M|    backtrack_newlines(S);
31086|  1.99M|    janet_buffer_push_u8(S->buffer, '\n');
31087|  1.99M|    S->leaf_align = S->align = align;
31088|  33.3M|    for (i = 0; i < S->align; i++) {
  ------------------
  |  Branch (31088:17): [True: 31.3M, False: 1.99M]
  ------------------
31089|  31.3M|        janet_buffer_push_u8(S->buffer, ' ');
31090|  31.3M|    }
31091|  1.99M|}
janet.c:backtrack_newlines:
31019|  2.02M|static void backtrack_newlines(const struct pretty *S) {
31020|  2.02M|    if (S->flags & JANET_PRETTY_ONELINE || S->buffer->count <= 0)
  ------------------
  |  | 1968|  4.04M|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (31020:9): [True: 12.6k, False: 2.00M]
  |  Branch (31020:44): [True: 0, False: 2.00M]
  ------------------
31021|  12.6k|        return;
31022|  2.00M|    switch (S->buffer->data[S->buffer->count - 1]) {
31023|   653k|        case ')':
  ------------------
  |  Branch (31023:9): [True: 653k, False: 1.35M]
  ------------------
31024|   658k|        case '}':
  ------------------
  |  Branch (31024:9): [True: 4.92k, False: 2.00M]
  ------------------
31025|   658k|        case ']':
  ------------------
  |  Branch (31025:9): [True: 167, False: 2.00M]
  ------------------
31026|   658k|            break;
31027|  1.34M|        default:
  ------------------
  |  Branch (31027:9): [True: 1.34M, False: 658k]
  ------------------
31028|  1.34M|            return;
31029|  2.00M|    }
31030|   658k|    int32_t removed = 0;
31031|   658k|    int32_t old_count = S->buffer->count;
31032|   658k|    int32_t offset = old_count;
31033|   658k|    int32_t b0 = S->lookback_barrier;
31034|   658k|    int32_t columns = S->width;
31035|   658k|    int32_t align = 0;
31036|  17.1M|    while (--offset >= b0) {
  ------------------
  |  Branch (31036:12): [True: 17.1M, False: 1.13k]
  ------------------
31037|  17.1M|        const char *s = (const char *)S->buffer->data + offset;
31038|  17.1M|        if (*s == '\n') {
  ------------------
  |  Branch (31038:13): [True: 1.31M, False: 15.7M]
  ------------------
31039|  1.31M|            if (align < S->leaf_align) {
  ------------------
  |  Branch (31039:17): [True: 654k, False: 657k]
  ------------------
31040|   654k|                break;
31041|   654k|            }
31042|   657k|            columns += align;
31043|   657k|            removed += align;
31044|   657k|            align = 0;
31045|  15.7M|        } else if (*s == ' ') {
  ------------------
  |  Branch (31045:20): [True: 4.30M, False: 11.4M]
  ------------------
31046|  4.30M|            align++;
31047|  11.4M|        } else {
31048|  11.4M|            align = 0;
31049|       |            /* Don't count color sequences: \x1B(0|3\d)m */
31050|  11.4M|            if (S->flags & JANET_PRETTY_COLOR && *s == 'm') {
  ------------------
  |  | 1967|  22.9M|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (31050:17): [True: 11.2M, False: 273k]
  |  Branch (31050:50): [True: 2.59M, False: 8.63M]
  ------------------
31051|  2.59M|                if (offset >= (3 + b0) && strncmp("\x1B[0m", s - 3, 4) == 0) {
  ------------------
  |  Branch (31051:21): [True: 2.59M, False: 0]
  |  Branch (31051:43): [True: 1.29M, False: 1.29M]
  ------------------
31052|  1.29M|                    offset -= 3;
31053|  1.29M|                    columns++;
31054|  1.29M|                } else if (offset >= (4 + b0) && strncmp("\x1B[3", s - 4, 3) == 0) {
  ------------------
  |  Branch (31054:28): [True: 1.29M, False: 0]
  |  Branch (31054:50): [True: 1.29M, False: 6.74k]
  ------------------
31055|  1.29M|                    offset -= 4;
31056|  1.29M|                    columns++;
31057|  1.29M|                }
31058|  2.59M|            }
31059|  11.4M|        }
31060|  16.4M|        if (--columns <= 0) {
  ------------------
  |  Branch (31060:13): [True: 3.44k, False: 16.4M]
  ------------------
31061|  3.44k|            return;
31062|  3.44k|        }
31063|  16.4M|    }
31064|   655k|    offset++; /* Don't mess with the last newline we found */
31065|   655k|    janet_assert(offset >= b0, "bad buffer index");
  ------------------
  |  |  389|   655k|#define janet_assert(c, m) do { \
  |  |  390|   655k|    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: 655k]
  |  |  ------------------
  |  |  391|   655k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 655k]
  |  |  ------------------
  ------------------
31066|   655k|    S->buffer->count -= removed;
31067|  23.3M|    for (int32_t i = offset; i < S->buffer->count; i++) {
  ------------------
  |  Branch (31067:30): [True: 22.6M, False: 655k]
  ------------------
31068|  22.6M|        if (S->buffer->data[offset] == '\n') {
  ------------------
  |  Branch (31068:13): [True: 650k, False: 22.0M]
  ------------------
31069|   650k|            S->buffer->data[i] = ' ';
31070|  3.04M|            while (S->buffer->data[++offset] == ' ') {
  ------------------
  |  Branch (31070:20): [True: 2.39M, False: 650k]
  ------------------
31071|  2.39M|                janet_assert(offset < old_count, "bad replacement of newline");
  ------------------
  |  |  389|  2.39M|#define janet_assert(c, m) do { \
  |  |  390|  2.39M|    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: 2.39M]
  |  |  ------------------
  |  |  391|  2.39M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 2.39M]
  |  |  ------------------
  ------------------
31072|  2.39M|            }
31073|  22.0M|        } else {
31074|  22.0M|            S->buffer->data[i] = S->buffer->data[offset++];
31075|  22.0M|        }
31076|  22.6M|    }
31077|   655k|}
janet.c:janet_jdn_:
31382|  1.19k|static JanetBuffer *janet_jdn_(JanetBuffer *buffer, int depth, Janet x, int32_t startlen, int32_t lookback_barrier) {
31383|  1.19k|    struct pretty S;
31384|  1.19k|    if (NULL == buffer) {
  ------------------
  |  Branch (31384:9): [True: 0, False: 1.19k]
  ------------------
31385|      0|        buffer = janet_buffer(0);
31386|      0|    }
31387|  1.19k|    S.buffer = buffer;
31388|  1.19k|    S.depth = depth;
31389|  1.19k|    S.align = 0;
31390|  1.19k|    S.flags = 0;
31391|  1.19k|    S.bufstartlen = startlen;
31392|  1.19k|    S.lookback_barrier = lookback_barrier;
31393|  1.19k|    S.keysort_capacity = 0;
31394|  1.19k|    S.keysort_buffer = NULL;
31395|  1.19k|    S.keysort_start = 0;
31396|  1.19k|    janet_table_init(&S.seen, 10);
31397|  1.19k|    int res = print_jdn_one(&S, x, depth);
31398|  1.19k|    janet_table_deinit(&S.seen);
31399|  1.19k|    if (res) {
  ------------------
  |  Branch (31399:9): [True: 13, False: 1.18k]
  ------------------
31400|     13|        janet_panic("could not print to jdn format");
31401|     13|    }
31402|  1.18k|    return S.buffer;
31403|  1.19k|}
janet.c:print_jdn_one:
30910|   663k|static int print_jdn_one(struct pretty *S, Janet x, int depth) {
30911|   663k|    if (depth == 0) return 1;
  ------------------
  |  Branch (30911:9): [True: 3, False: 663k]
  ------------------
30912|   663k|    switch (janet_type(x)) {
  ------------------
  |  |  795|   663k|    (isnan((x).number) \
  |  |  796|   663k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   663k|        : JANET_NUMBER)
  ------------------
  |  Branch (30912:13): [True: 660k, False: 2.88k]
  ------------------
30913|     67|        case JANET_NIL:
  ------------------
  |  Branch (30913:9): [True: 67, False: 663k]
  ------------------
30914|    238|        case JANET_BOOLEAN:
  ------------------
  |  Branch (30914:9): [True: 171, False: 663k]
  ------------------
30915|  1.19k|        case JANET_BUFFER:
  ------------------
  |  Branch (30915:9): [True: 959, False: 662k]
  ------------------
30916|  2.17k|        case JANET_STRING:
  ------------------
  |  Branch (30916:9): [True: 981, False: 662k]
  ------------------
30917|  2.17k|            janet_description_b(S->buffer, x);
30918|  2.17k|            break;
30919|  2.88k|        case JANET_NUMBER:
  ------------------
  |  Branch (30919:9): [True: 2.88k, False: 660k]
  ------------------
30920|  2.88k|            janet_buffer_extra(S->buffer, BUFSIZE);
  ------------------
  |  |30558|  2.88k|#define BUFSIZE 64
  ------------------
30921|  2.88k|            double num = janet_unwrap_number(x);
  ------------------
  |  |  839|  2.88k|#define janet_unwrap_number(x) ((x).number)
  ------------------
30922|  2.88k|            if (isnan(num)) return 1;
  ------------------
  |  Branch (30922:17): [True: 0, False: 2.88k]
  ------------------
30923|  2.88k|            if (isinf(num)) return 1;
  ------------------
  |  Branch (30923:17): [True: 9, False: 2.87k]
  ------------------
30924|  2.87k|            janet_buffer_dtostr(S->buffer, num);
30925|  2.87k|            break;
30926|   385k|        case JANET_SYMBOL:
  ------------------
  |  Branch (30926:9): [True: 385k, False: 277k]
  ------------------
30927|   394k|        case JANET_KEYWORD:
  ------------------
  |  Branch (30927:9): [True: 8.34k, False: 655k]
  ------------------
30928|   394k|            if (contains_bad_chars(janet_unwrap_keyword(x), janet_type(x) == JANET_SYMBOL)) return 1;
  ------------------
  |  |  865|   394k|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
                          if (contains_bad_chars(janet_unwrap_keyword(x), janet_type(x) == JANET_SYMBOL)) return 1;
  ------------------
  |  |  795|   394k|    (isnan((x).number) \
  |  |  796|   394k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   394k|        : JANET_NUMBER)
  ------------------
  |  Branch (30928:17): [True: 0, False: 394k]
  |  Branch (30928:61): [True: 394k, False: 0]
  ------------------
30929|   394k|            janet_description_b(S->buffer, x);
30930|   394k|            break;
30931|   263k|        case JANET_TUPLE: {
  ------------------
  |  Branch (30931:9): [True: 263k, False: 400k]
  ------------------
30932|   263k|            JanetTuple t = janet_unwrap_tuple(x);
  ------------------
  |  |  858|   263k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
30933|   263k|            int isb = janet_tuple_flag(t) & JANET_TUPLE_FLAG_BRACKETCTOR;
  ------------------
  |  | 1806|   263k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|   263k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                          int isb = janet_tuple_flag(t) & JANET_TUPLE_FLAG_BRACKETCTOR;
  ------------------
  |  | 1798|   263k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
30934|   263k|            janet_buffer_push_u8(S->buffer, isb ? '[' : '(');
  ------------------
  |  Branch (30934:45): [True: 100, False: 263k]
  ------------------
30935|   882k|            for (int32_t i = 0; i < janet_tuple_length(t); i++) {
  ------------------
  |  | 1802|   882k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|   882k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (30935:33): [True: 622k, False: 260k]
  ------------------
30936|   622k|                if (i) janet_buffer_push_u8(S->buffer, ' ');
  ------------------
  |  Branch (30936:21): [True: 359k, False: 262k]
  ------------------
30937|   622k|                if (print_jdn_one(S, t[i], depth - 1)) return 1;
  ------------------
  |  Branch (30937:21): [True: 3.17k, False: 618k]
  ------------------
30938|   622k|            }
30939|   260k|            janet_buffer_push_u8(S->buffer, isb ? ']' : ')');
  ------------------
  |  Branch (30939:45): [True: 100, False: 260k]
  ------------------
30940|   260k|        }
30941|      0|        break;
30942|    240|        case JANET_ARRAY: {
  ------------------
  |  Branch (30942:9): [True: 240, False: 663k]
  ------------------
30943|    240|            janet_table_put(&S->seen, x, janet_wrap_true());
  ------------------
  |  |  832|    240|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  822|    240|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    240|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    240|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30944|    240|            JanetArray *a = janet_unwrap_array(x);
  ------------------
  |  |  860|    240|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
30945|    240|            janet_buffer_push_cstring(S->buffer, "@[");
30946|  38.5k|            for (int32_t i = 0; i < a->count; i++) {
  ------------------
  |  Branch (30946:33): [True: 38.2k, False: 233]
  ------------------
30947|  38.2k|                if (i) janet_buffer_push_u8(S->buffer, ' ');
  ------------------
  |  Branch (30947:21): [True: 38.1k, False: 132]
  ------------------
30948|  38.2k|                if (print_jdn_one(S, a->data[i], depth - 1)) return 1;
  ------------------
  |  Branch (30948:21): [True: 7, False: 38.2k]
  ------------------
30949|  38.2k|            }
30950|    233|            janet_buffer_push_u8(S->buffer, ']');
30951|    233|        }
30952|      0|        break;
30953|     55|        case JANET_TABLE: {
  ------------------
  |  Branch (30953:9): [True: 55, False: 663k]
  ------------------
30954|     55|            janet_table_put(&S->seen, x, janet_wrap_true());
  ------------------
  |  |  832|     55|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  822|     55|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     55|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     55|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30955|     55|            JanetTable *tab = janet_unwrap_table(x);
  ------------------
  |  |  861|     55|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
30956|     55|            janet_buffer_push_cstring(S->buffer, "@{");
30957|     55|            int isFirst = 1;
30958|    261|            for (int32_t i = 0; i < tab->capacity; i++) {
  ------------------
  |  Branch (30958:33): [True: 206, False: 55]
  ------------------
30959|    206|                const JanetKV *kv = tab->data + i;
30960|    206|                if (janet_checktype(kv->key, JANET_NIL)) continue;
  ------------------
  |  |  806|    206|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 145, False: 61]
  |  |  |  Branch (806:6): [Folded, False: 206]
  |  |  ------------------
  |  |  807|    206|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    206|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    206|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    206|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    206|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    206|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30961|     61|                if (!isFirst) janet_buffer_push_u8(S->buffer, ' ');
  ------------------
  |  Branch (30961:21): [True: 44, False: 17]
  ------------------
30962|     61|                isFirst = 0;
30963|     61|                if (print_jdn_one(S, kv->key, depth - 1)) return 1;
  ------------------
  |  Branch (30963:21): [True: 0, False: 61]
  ------------------
30964|     61|                janet_buffer_push_u8(S->buffer, ' ');
30965|     61|                if (print_jdn_one(S, kv->value, depth - 1)) return 1;
  ------------------
  |  Branch (30965:21): [True: 0, False: 61]
  ------------------
30966|     61|            }
30967|     55|            janet_buffer_push_u8(S->buffer, '}');
30968|     55|        }
30969|      0|        break;
30970|    504|        case JANET_STRUCT: {
  ------------------
  |  Branch (30970:9): [True: 504, False: 663k]
  ------------------
30971|    504|            JanetStruct st = janet_unwrap_struct(x);
  ------------------
  |  |  857|    504|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
30972|    504|            janet_buffer_push_u8(S->buffer, '{');
30973|    504|            int isFirst = 1;
30974|  3.61k|            for (int32_t i = 0; i < janet_struct_capacity(st); i++) {
  ------------------
  |  | 1849|  3.61k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1846|  3.61k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (30974:33): [True: 3.11k, False: 504]
  ------------------
30975|  3.11k|                const JanetKV *kv = st + i;
30976|  3.11k|                if (janet_checktype(kv->key, JANET_NIL)) continue;
  ------------------
  |  |  806|  3.11k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 2.05k, False: 1.05k]
  |  |  |  Branch (806:6): [Folded, False: 3.11k]
  |  |  ------------------
  |  |  807|  3.11k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  3.11k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  3.11k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  3.11k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.11k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.11k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30977|  1.05k|                if (!isFirst) janet_buffer_push_u8(S->buffer, ' ');
  ------------------
  |  Branch (30977:21): [True: 700, False: 355]
  ------------------
30978|  1.05k|                isFirst = 0;
30979|  1.05k|                if (print_jdn_one(S, kv->key, depth - 1)) return 1;
  ------------------
  |  Branch (30979:21): [True: 0, False: 1.05k]
  ------------------
30980|  1.05k|                janet_buffer_push_u8(S->buffer, ' ');
30981|  1.05k|                if (print_jdn_one(S, kv->value, depth - 1)) return 1;
  ------------------
  |  Branch (30981:21): [True: 0, False: 1.05k]
  ------------------
30982|  1.05k|            }
30983|    504|            janet_buffer_push_u8(S->buffer, '}');
30984|    504|        }
30985|      0|        break;
30986|      0|#ifdef JANET_INT_TYPES
30987|    272|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (30987:9): [True: 272, False: 663k]
  ------------------
30988|    272|            void *abst = janet_unwrap_abstract(x);
  ------------------
  |  |  866|    272|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
30989|    272|            if (janet_abstract_type(abst) == &janet_s64_type) {
  ------------------
  |  | 1899|    272|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|    272|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (30989:17): [True: 142, False: 130]
  ------------------
30990|    142|                janet_buffer_ensure(S->buffer, S->buffer->count + BUFSIZE, 2);
  ------------------
  |  |30558|    142|#define BUFSIZE 64
  ------------------
30991|    142|                int64_t s64 = janet_unwrap_s64(x);
30992|    142|                int count = snprintf((char *)S->buffer->data + S->buffer->count,
30993|    142|                                     BUFSIZE, "%" PRId64 ":s", s64);
  ------------------
  |  |30558|    142|#define BUFSIZE 64
  ------------------
30994|    142|                if (count < 0) {
  ------------------
  |  Branch (30994:21): [True: 0, False: 142]
  ------------------
30995|      0|                    return 1;
30996|      0|                }
30997|    142|                S->buffer->count += count;
30998|    142|            } else if (janet_abstract_type(abst) == &janet_u64_type) {
  ------------------
  |  | 1899|    130|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|    130|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (30998:24): [True: 130, False: 0]
  ------------------
30999|    130|                janet_buffer_ensure(S->buffer, S->buffer->count + BUFSIZE, 2);
  ------------------
  |  |30558|    130|#define BUFSIZE 64
  ------------------
31000|    130|                uint64_t u64 = janet_unwrap_u64(x);
31001|    130|                int count = snprintf((char *)S->buffer->data + S->buffer->count,
31002|    130|                                     BUFSIZE, "%" PRIu64 ":u", u64);
  ------------------
  |  |30558|    130|#define BUFSIZE 64
  ------------------
31003|    130|                if (count < 0) {
  ------------------
  |  Branch (31003:21): [True: 0, False: 130]
  ------------------
31004|      0|                    return 1;
31005|      0|                }
31006|    130|                S->buffer->count += count;
31007|    130|            } else {
31008|      0|                return 1;
31009|      0|            }
31010|    272|        }
31011|    272|        break;
31012|    272|#endif
31013|    272|        default:
  ------------------
  |  Branch (31013:9): [True: 1, False: 663k]
  ------------------
31014|      1|            return 1;
31015|   663k|    }
31016|   660k|    return 0;
31017|   663k|}
janet.c:contains_bad_chars:
30817|   394k|static int contains_bad_chars(const uint8_t *sym, int issym) {
30818|   394k|    int32_t len = janet_string_length(sym);
  ------------------
  |  | 1813|   394k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|   394k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
30819|   394k|    if (len && issym && sym[0] >= '0' && sym[0] <= '9') return 1;
  ------------------
  |  Branch (30819:9): [True: 387k, False: 6.27k]
  |  Branch (30819:16): [True: 385k, False: 2.07k]
  |  Branch (30819:25): [True: 266k, False: 119k]
  |  Branch (30819:42): [True: 0, False: 266k]
  ------------------
30820|   394k|    if (!janet_valid_utf8(sym, len)) return 1;
  ------------------
  |  Branch (30820:9): [True: 0, False: 394k]
  ------------------
30821|  3.02M|    for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (30821:25): [True: 2.63M, False: 394k]
  ------------------
30822|  2.63M|        if (!janet_is_symbol_char(sym[i])) return 1;
  ------------------
  |  Branch (30822:13): [True: 0, False: 2.63M]
  ------------------
30823|  2.63M|    }
30824|   394k|    return 0;
30825|   394k|}
janet.c:scanformat:
31472|  3.84M|    char precision[3]) {
31473|  3.84M|    const char *p = strfrmt;
31474|       |
31475|       |    /* Parse strfrmt */
31476|  3.84M|    memset(width, '\0', 3);
31477|  3.84M|    memset(precision, '\0', 3);
31478|  3.84M|    while (*p != '\0' && strchr(FMT_FLAGS, *p) != NULL)
  ------------------
  |  |31438|  3.84M|#define FMT_FLAGS "-+ #0"
  ------------------
  |  Branch (31478:12): [True: 3.84M, False: 0]
  |  Branch (31478:26): [True: 152, False: 3.84M]
  ------------------
31479|    152|        p++; /* skip flags */
31480|  3.84M|    if ((size_t)(p - strfrmt) >= sizeof(FMT_FLAGS)) janet_panic("invalid format (repeated flags)");
  ------------------
  |  |31438|  3.84M|#define FMT_FLAGS "-+ #0"
  ------------------
  |  Branch (31480:9): [True: 2, False: 3.84M]
  ------------------
31481|  3.84M|    if (isdigit((int)(*p)))
  ------------------
  |  Branch (31481:9): [True: 507, False: 3.84M]
  ------------------
31482|    507|        width[0] = *p++; /* skip width */
31483|  3.84M|    if (isdigit((int)(*p)))
  ------------------
  |  Branch (31483:9): [True: 132, False: 3.84M]
  ------------------
31484|    132|        width[1] = *p++; /* (2 digits at most) */
31485|  3.84M|    if (*p == '.') {
  ------------------
  |  Branch (31485:9): [True: 14, False: 3.84M]
  ------------------
31486|     14|        p++;
31487|     14|        if (isdigit((int)(*p)))
  ------------------
  |  Branch (31487:13): [True: 11, False: 3]
  ------------------
31488|     11|            precision[0] = *p++; /* skip precision */
31489|     14|        if (isdigit((int)(*p)))
  ------------------
  |  Branch (31489:13): [True: 1, False: 13]
  ------------------
31490|      1|            precision[1] = *p++; /* (2 digits at most) */
31491|     14|    }
31492|  3.84M|    if (isdigit((int)(*p)))
  ------------------
  |  Branch (31492:9): [True: 2, False: 3.84M]
  ------------------
31493|      2|        janet_panic("invalid format (width or precision too long)");
31494|       |
31495|       |    /* Write to form - replace characters with fixed size stuff */
31496|  3.84M|    *(form++) = '%';
31497|  3.84M|    const char *p2 = strfrmt;
31498|  7.69M|    while (p2 <= p) {
  ------------------
  |  Branch (31498:12): [True: 3.85M, False: 3.84M]
  ------------------
31499|  3.85M|        char *loc = strchr(FMT_REPLACE_INTTYPES, *p2);
  ------------------
  |  |31439|  3.85M|#define FMT_REPLACE_INTTYPES "diouxX"
  ------------------
31500|  3.85M|        if (loc != NULL && *loc != '\0') {
  ------------------
  |  Branch (31500:13): [True: 1.12M, False: 2.72M]
  |  Branch (31500:28): [True: 1.12M, False: 0]
  ------------------
31501|  1.12M|            const char *mapping = get_fmt_mapping(*p2++);
31502|  1.12M|            size_t len = strlen(mapping);
31503|  1.12M|            memcpy(form, mapping, len);
31504|  1.12M|            form += len;
31505|  2.72M|        } else {
31506|  2.72M|            *(form++) = *(p2++);
31507|  2.72M|        }
31508|  3.85M|    }
31509|  3.84M|    *form = '\0';
31510|       |
31511|  3.84M|    return p;
31512|  3.84M|}
janet.c:get_fmt_mapping:
31460|  1.12M|static const char *get_fmt_mapping(char c) {
31461|  3.37M|    for (size_t i = 0; i < (sizeof(format_mappings) / sizeof(struct FmtMapping)); i++) {
  ------------------
  |  Branch (31461:24): [True: 3.37M, False: 0]
  ------------------
31462|  3.37M|        if (format_mappings[i].c == c)
  ------------------
  |  Branch (31462:13): [True: 1.12M, False: 2.24M]
  ------------------
31463|  1.12M|            return format_mappings[i].mapping;
31464|  3.37M|    }
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:typestr:
31409|    926|static const char *typestr(Janet x) {
31410|    926|    JanetType t = janet_type(x);
  ------------------
  |  |  795|    926|    (isnan((x).number) \
  |  |  796|    926|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|    926|        : JANET_NUMBER)
  ------------------
  |  Branch (31410:19): [True: 897, False: 29]
  ------------------
31411|    926|    return (t == JANET_ABSTRACT)
  ------------------
  |  Branch (31411:12): [True: 10, False: 916]
  ------------------
31412|    926|           ? janet_abstract_type(janet_unwrap_abstract(x))->name
  ------------------
  |  | 1899|     10|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|     10|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
31413|    926|           : janet_type_names[t];
31414|    926|}
janet.c:pushtypes:
31416|  1.70k|static void pushtypes(JanetBuffer *buffer, int types) {
31417|  1.70k|    int first = 1;
31418|  1.70k|    int i = 0;
31419|  11.9k|    while (types) {
  ------------------
  |  Branch (31419:12): [True: 10.2k, False: 1.70k]
  ------------------
31420|  10.2k|        if (1 & types) {
  ------------------
  |  Branch (31420:13): [True: 2.61k, False: 7.65k]
  ------------------
31421|  2.61k|            if (first) {
  ------------------
  |  Branch (31421:17): [True: 1.70k, False: 906]
  ------------------
31422|  1.70k|                first = 0;
31423|  1.70k|            } else {
31424|    906|                janet_buffer_push_cstring(buffer, (types == 1) ? " or " : ", ");
  ------------------
  |  Branch (31424:51): [True: 204, False: 702]
  ------------------
31425|    906|            }
31426|  2.61k|            janet_buffer_push_cstring(buffer, janet_type_names[i]);
31427|  2.61k|        }
31428|  10.2k|        i++;
31429|  10.2k|        types >>= 1;
31430|  10.2k|    }
31431|  1.70k|}
janet.c:pushchunk:
31913|  1.07M|static void pushchunk(JanetcRegisterAllocator *ra) {
31914|       |    /* Registers 240-255 are always allocated (reserved) */
31915|  1.07M|    uint32_t chunk = ra->count == 7 ? 0xFFFF0000 : 0;
  ------------------
  |  Branch (31915:22): [True: 2.25k, False: 1.07M]
  ------------------
31916|  1.07M|    int32_t newcount = ra->count + 1;
31917|  1.07M|    if (newcount > ra->capacity) {
  ------------------
  |  Branch (31917:9): [True: 615k, False: 461k]
  ------------------
31918|   615k|        int32_t newcapacity = newcount * 2;
31919|   615k|        ra->chunks = janet_realloc(ra->chunks, (size_t) newcapacity * sizeof(uint32_t));
  ------------------
  |  | 2409|   615k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
31920|   615k|        if (!ra->chunks) {
  ------------------
  |  Branch (31920:13): [True: 0, False: 615k]
  ------------------
31921|      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]
  |  |  ------------------
  ------------------
31922|      0|        }
31923|   615k|        ra->capacity = newcapacity;
31924|   615k|    }
31925|  1.07M|    ra->chunks[ra->count] = chunk;
31926|  1.07M|    ra->count = newcount;
31927|  1.07M|}
janet.c:janetc_break:
33010|    126|static JanetSlot janetc_break(JanetFopts opts, int32_t argn, const Janet *argv) {
33011|    126|    JanetCompiler *c = opts.compiler;
33012|    126|    JanetScope *scope = c->scope;
33013|    126|    if (argn > 1) {
  ------------------
  |  Branch (33013:9): [True: 1, False: 125]
  ------------------
33014|      1|        janetc_cerror(c, "expected at most 1 argument");
33015|      1|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33016|      1|    }
33017|       |
33018|       |    /* Find scope to break from */
33019|    559|    while (scope) {
  ------------------
  |  Branch (33019:12): [True: 559, False: 0]
  ------------------
33020|    559|        if (scope->flags & (JANET_SCOPE_FUNCTION | JANET_SCOPE_WHILE))
  ------------------
  |  | 1035|    559|#define JANET_SCOPE_FUNCTION 1
  ------------------
                      if (scope->flags & (JANET_SCOPE_FUNCTION | JANET_SCOPE_WHILE))
  ------------------
  |  | 1040|    559|#define JANET_SCOPE_WHILE 32
  ------------------
  |  Branch (33020:13): [True: 125, False: 434]
  ------------------
33021|    125|            break;
33022|    434|        scope = scope->parent;
33023|    434|    }
33024|    125|    if (NULL == scope) {
  ------------------
  |  Branch (33024:9): [True: 0, False: 125]
  ------------------
33025|      0|        janetc_cerror(c, "break must occur in while loop or closure");
33026|      0|        return janetc_cslot(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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33027|      0|    }
33028|       |
33029|       |    /* Emit code to break from that scope */
33030|    125|    JanetFopts subopts = janetc_fopts_default(c);
33031|    125|    if (scope->flags & JANET_SCOPE_FUNCTION) {
  ------------------
  |  | 1035|    125|#define JANET_SCOPE_FUNCTION 1
  ------------------
  |  Branch (33031:9): [True: 66, False: 59]
  ------------------
33032|     66|        if (!(scope->flags & JANET_SCOPE_WHILE) && argn) {
  ------------------
  |  | 1040|     66|#define JANET_SCOPE_WHILE 32
  ------------------
  |  Branch (33032:13): [True: 66, False: 0]
  |  Branch (33032:52): [True: 24, False: 42]
  ------------------
33033|       |            /* Closure body with return argument */
33034|     24|            subopts.flags |= JANET_FOPTS_TAIL;
  ------------------
  |  | 1124|     24|#define JANET_FOPTS_TAIL 0x10000
  ------------------
33035|     24|            janetc_value(subopts, argv[0]);
33036|     24|            return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|     24|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     24|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     24|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     24|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33037|     42|        } else {
33038|       |            /* while loop IIFE or no argument */
33039|     42|            if (argn) {
  ------------------
  |  Branch (33039:17): [True: 0, False: 42]
  ------------------
33040|      0|                subopts.flags |= JANET_FOPTS_DROP;
  ------------------
  |  | 1126|      0|#define JANET_FOPTS_DROP 0x40000
  ------------------
33041|      0|                janetc_value(subopts, argv[0]);
33042|      0|            }
33043|     42|            janetc_emit(c, JOP_RETURN_NIL);
33044|     42|            return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|     42|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     42|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     42|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     42|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33045|     42|        }
33046|     66|    } else {
33047|     59|        if (argn) {
  ------------------
  |  Branch (33047:13): [True: 16, False: 43]
  ------------------
33048|     16|            subopts.flags |= JANET_FOPTS_DROP;
  ------------------
  |  | 1126|     16|#define JANET_FOPTS_DROP 0x40000
  ------------------
33049|     16|            janetc_value(subopts, argv[0]);
33050|     16|        }
33051|       |        /* Tag the instruction so the while special can turn it into a proper jump */
33052|     59|        janetc_emit(c, 0x80 | JOP_JUMP);
33053|     59|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|     59|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     59|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     59|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     59|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33054|     59|    }
33055|    125|}
janet.c:janetc_def:
32787|   199k|static JanetSlot janetc_def(JanetFopts opts, int32_t argn, const Janet *argv) {
32788|   199k|    JanetCompiler *c = opts.compiler;
32789|   199k|    JanetTable *attr_table = handleattr(c, "def", argn, argv);
32790|   199k|    if (c->result.status == JANET_COMPILE_ERROR) {
  ------------------
  |  Branch (32790:9): [True: 17, False: 199k]
  ------------------
32791|     17|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|     17|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     17|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     17|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     17|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32792|     17|    }
32793|   199k|    check_metadata_lint(c, attr_table);
32794|   199k|    opts.flags &= ~JANET_FOPTS_HINT;
  ------------------
  |  | 1125|   199k|#define JANET_FOPTS_HINT 0x20000
  ------------------
32795|   199k|    SlotHeadPair *into = NULL;
32796|   199k|    into = dohead_destructure(c, into, opts, argv[0], argv[argn - 1]);
32797|   199k|    if (c->result.status == JANET_COMPILE_ERROR) {
  ------------------
  |  Branch (32797:9): [True: 258, False: 199k]
  ------------------
32798|    258|        janet_v_free(into);
  ------------------
  |  |  733|    258|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|    258|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 258, False: 0]
  |  |  ------------------
  ------------------
32799|    258|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|    258|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    258|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    258|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    258|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32800|    258|    }
32801|   199k|    JanetSlot ret = janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|   199k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   199k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   199k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   199k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32802|   459k|    for (int32_t i = 0; i < janet_v_count(into); i++) {
  ------------------
  |  |  736|   459k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   459k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   459k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 459k, False: 19]
  |  |  ------------------
  ------------------
  |  Branch (32802:25): [True: 260k, False: 199k]
  ------------------
32803|   260k|        destructure(c, into[i].lhs, into[i].rhs, defleaf, attr_table);
32804|   260k|        ret = into[i].rhs;
32805|   260k|    }
32806|       |    janet_v_free(into);
  ------------------
  |  |  733|   199k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|   199k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 199k, False: 19]
  |  |  ------------------
  ------------------
32807|   199k|    return ret;
32808|   199k|}
janet.c:handleattr:
32539|   229k|static JanetTable *handleattr(JanetCompiler *c, const char *kind, int32_t argn, const Janet *argv) {
32540|   229k|    int32_t i;
32541|   229k|    if (argn < 2) {
  ------------------
  |  Branch (32541:9): [True: 0, False: 229k]
  ------------------
32542|      0|        janetc_error(c, janet_formatc("expected at least 2 arguments to %s", kind));
32543|      0|        return NULL;
32544|      0|    }
32545|   229k|    JanetTable *tab = janet_table(2);
32546|   229k|    const char *binding_name = janet_type(argv[0]) == JANET_SYMBOL
  ------------------
  |  |  795|   229k|    (isnan((x).number) \
  |  |  796|   229k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   229k|        : JANET_NUMBER)
  ------------------
  |  Branch (32546:32): [True: 229k, False: 5]
  |  Branch (32546:32): [True: 177k, False: 51.8k]
  ------------------
32547|   229k|                               ? ((const char *)janet_unwrap_symbol(argv[0]))
  ------------------
  |  |  864|   177k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
32548|   229k|                               : "<multiple bindings>";
32549|   242k|    for (i = 1; i < argn - 1; i++) {
  ------------------
  |  Branch (32549:17): [True: 13.2k, False: 229k]
  ------------------
32550|  13.2k|        Janet attr = argv[i];
32551|  13.2k|        switch (janet_type(attr)) {
  ------------------
  |  |  795|  13.2k|    (isnan((x).number) \
  |  |  796|  13.2k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  13.2k|        : JANET_NUMBER)
  ------------------
  |  Branch (32551:17): [True: 13.1k, False: 166]
  ------------------
32552|    397|            case JANET_TUPLE:
  ------------------
  |  Branch (32552:13): [True: 397, False: 12.8k]
  ------------------
32553|    397|                janetc_cerror(c, "unexpected form - did you intend to use defn?");
32554|    397|                break;
32555|    276|            default:
  ------------------
  |  Branch (32555:13): [True: 276, False: 13.0k]
  ------------------
32556|    276|                janetc_error(c, janet_formatc("cannot add metadata %v to binding %s", attr, binding_name));
32557|    276|                break;
32558|  12.1k|            case JANET_KEYWORD:
  ------------------
  |  Branch (32558:13): [True: 12.1k, False: 1.10k]
  ------------------
32559|  12.1k|                janet_table_put(tab, attr, janet_wrap_true());
  ------------------
  |  |  832|  12.1k|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  822|  12.1k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  12.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  12.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32560|  12.1k|                break;
32561|    340|            case JANET_STRING:
  ------------------
  |  Branch (32561:13): [True: 340, False: 12.9k]
  ------------------
32562|    340|                janet_table_put(tab, janet_ckeywordv("doc"), attr);
  ------------------
  |  | 1843|    340|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|    340|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|    340|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    340|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    340|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32563|    340|                break;
32564|     90|            case JANET_STRUCT:
  ------------------
  |  Branch (32564:13): [True: 90, False: 13.1k]
  ------------------
32565|     90|                janet_table_merge_struct(tab, janet_unwrap_struct(attr));
  ------------------
  |  |  857|     90|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
32566|     90|                break;
32567|  13.2k|        }
32568|  13.2k|    }
32569|   229k|    return tab;
32570|   229k|}
janet.c:check_metadata_lint:
32710|   229k|static void check_metadata_lint(JanetCompiler *c, JanetTable *attr_table) {
32711|   229k|    if (!(c->scope->flags & JANET_SCOPE_TOP) && attr_table && attr_table->count) {
  ------------------
  |  | 1037|   229k|#define JANET_SCOPE_TOP 4
  ------------------
  |  Branch (32711:9): [True: 229k, False: 316]
  |  Branch (32711:49): [True: 229k, False: 0]
  |  Branch (32711:63): [True: 12.0k, False: 217k]
  ------------------
32712|       |        /* A macro is a normal lint, other metadata is a strict lint */
32713|  12.0k|        if (janet_truthy(janet_table_get_keyword(attr_table, "macro"))) {
  ------------------
  |  |  818|  12.0k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|  24.0k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 12.0k]
  |  |  |  |  ------------------
  |  |  |  |  807|  24.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|  24.0k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  12.0k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  12.0k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  12.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  12.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:5): [True: 0, False: 12.0k]
  |  |  |  Branch (818:6): [True: 0, False: 12.0k]
  |  |  ------------------
  |  |  819|  12.0k|     (!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]
  |  |  ------------------
  ------------------
32714|      0|            janetc_lintf(c, JANET_C_LINT_NORMAL, "macro tag is ignored in inner scopes");
32715|      0|        }
32716|  12.0k|    }
32717|   229k|}
janet.c:destructure:
32370|  2.62M|                       JanetTable *attr) {
32371|  2.62M|    if (c->recursion_guard <= 0) {
  ------------------
  |  Branch (32371:9): [True: 674, False: 2.62M]
  ------------------
32372|    674|        janetc_error(c, janet_cstring("C stack recursed too deeply"));
32373|    674|        return 1;
32374|    674|    }
32375|  2.62M|    switch (janet_type(left)) {
  ------------------
  |  |  795|  2.62M|    (isnan((x).number) \
  |  |  796|  2.62M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  2.62M|        : JANET_NUMBER)
  ------------------
  |  Branch (32375:13): [True: 2.61M, False: 9.56k]
  ------------------
32376|  50.7k|        default:
  ------------------
  |  Branch (32376:9): [True: 50.7k, False: 2.57M]
  ------------------
32377|  50.7k|            janetc_error(c, janet_formatc("unexpected type in destructuring, got %v", left));
32378|  50.7k|            return 1;
32379|  1.54M|        case JANET_SYMBOL:
  ------------------
  |  Branch (32379:9): [True: 1.54M, False: 1.07M]
  ------------------
32380|       |            /* Leaf, assign right to left */
32381|  1.54M|            return leaf(c, janet_unwrap_symbol(left), right, attr);
  ------------------
  |  |  864|  1.54M|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
32382|  1.01M|        case JANET_TUPLE:
  ------------------
  |  Branch (32382:9): [True: 1.01M, False: 1.60M]
  ------------------
32383|  1.01M|        case JANET_ARRAY: {
  ------------------
  |  Branch (32383:9): [True: 445, False: 2.62M]
  ------------------
32384|  1.01M|            int32_t len = 0;
32385|  1.01M|            const Janet *values = NULL;
32386|  1.01M|            janet_indexed_view(left, &values, &len);
32387|  3.24M|            for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (32387:33): [True: 2.22M, False: 1.01M]
  ------------------
32388|  2.22M|                JanetSlot nextright = janetc_farslot(c);
32389|  2.22M|                Janet subval = values[i];
32390|       |
32391|  2.22M|                if (janet_checktype(subval, JANET_SYMBOL) && !janet_cstrcmp(janet_unwrap_symbol(subval), "&")) {
  ------------------
  |  |  806|  4.45M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1.27M, False: 951k]
  |  |  |  Branch (806:6): [Folded, False: 2.22M]
  |  |  ------------------
  |  |  807|  4.45M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.45M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.22M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.22M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.22M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.22M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                              if (janet_checktype(subval, JANET_SYMBOL) && !janet_cstrcmp(janet_unwrap_symbol(subval), "&")) {
  ------------------
  |  |  864|  1.27M|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (32391:62): [True: 1.88k, False: 1.27M]
  ------------------
32392|  1.88k|                    if (i + 1 >= len) {
  ------------------
  |  Branch (32392:25): [True: 1.53k, False: 354]
  ------------------
32393|  1.53k|                        janetc_cerror(c, "expected symbol following '& in destructuring pattern");
32394|  1.53k|                        return 1;
32395|  1.53k|                    }
32396|       |
32397|    354|                    if (i + 2 < len) {
  ------------------
  |  Branch (32397:25): [True: 90, False: 264]
  ------------------
32398|     90|                        int32_t num_extra = len - i - 1;
32399|     90|                        Janet *extra = janet_tuple_begin(num_extra);
32400|     90|                        janet_tuple_flag(extra) |= JANET_TUPLE_FLAG_BRACKETCTOR;
  ------------------
  |  | 1806|     90|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|     90|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                                      janet_tuple_flag(extra) |= JANET_TUPLE_FLAG_BRACKETCTOR;
  ------------------
  |  | 1798|     90|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
32401|       |
32402|  86.0k|                        for (int32_t j = 0; j < num_extra; ++j) {
  ------------------
  |  Branch (32402:45): [True: 85.9k, False: 90]
  ------------------
32403|  85.9k|                            extra[j] = values[j + i + 1];
32404|  85.9k|                        }
32405|       |
32406|     90|                        janetc_error(c, janet_formatc("expected a single symbol follow '& in destructuring pattern, found %q", janet_wrap_tuple(janet_tuple_end(extra))));
  ------------------
  |  |  843|     90|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|     90|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     90|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     90|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32407|     90|                        return 1;
32408|     90|                    }
32409|       |
32410|    264|                    if (!janet_checktype(values[i + 1], JANET_SYMBOL)) {
  ------------------
  |  |  806|    264|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 264]
  |  |  ------------------
  |  |  807|    264|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    264|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    264|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    264|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    264|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    264|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (32410:25): [True: 8, False: 256]
  ------------------
32411|      8|                        janetc_error(c, janet_formatc("expected symbol following '& in destructuring pattern, found %q", values[i + 1]));
32412|      8|                        return 1;
32413|      8|                    }
32414|       |
32415|    256|                    JanetSlot argi = janetc_farslot(c);
32416|    256|                    JanetSlot arg  = janetc_farslot(c);
32417|    256|                    JanetSlot len  = janetc_farslot(c);
32418|       |
32419|    256|                    janetc_emit_si(c, JOP_LOAD_INTEGER, argi, i, 0);
32420|    256|                    janetc_emit_ss(c, JOP_LENGTH, len, right, 0);
32421|       |
32422|       |                    /* loop condition - reuse arg slot for the condition result */
32423|    256|                    int32_t label_loop_start = janetc_emit_sss(c, JOP_LESS_THAN, arg, argi, len, 0);
32424|    256|                    int32_t label_loop_cond_jump = janetc_emit_si(c, JOP_JUMP_IF_NOT, arg, 0, 0);
32425|       |
32426|       |                    /* loop body */
32427|    256|                    janetc_emit_sss(c, JOP_GET, arg, right, argi, 0);
32428|    256|                    janetc_emit_s(c, JOP_PUSH, arg, 0);
32429|    256|                    janetc_emit_ssi(c, JOP_ADD_IMMEDIATE, argi, argi, 1, 0);
32430|       |
32431|       |                    /* loop - jump back to the start of the loop */
32432|    256|                    int32_t label_loop_loop = janet_v_count(c->buffer);
  ------------------
  |  |  736|    256|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|    256|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    256|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 256, False: 0]
  |  |  ------------------
  ------------------
32433|    256|                    janetc_emit(c, JOP_JUMP);
32434|    256|                    int32_t label_loop_exit = janet_v_count(c->buffer);
  ------------------
  |  |  736|    256|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|    256|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    256|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 256, False: 0]
  |  |  ------------------
  ------------------
32435|       |
32436|       |                    /* avoid shifting negative numbers */
32437|    256|                    check_16bit_jump(c, label_loop_cond_jump, label_loop_exit);
32438|    256|                    check_24bit_jump(c, label_loop_start, label_loop_loop);
32439|    256|                    c->buffer[label_loop_cond_jump] |= (uint32_t)(label_loop_exit - label_loop_cond_jump) << 16;
32440|    256|                    c->buffer[label_loop_loop] |= (uint32_t)(label_loop_start - label_loop_loop) << 8;
32441|       |
32442|    256|                    janetc_freeslot(c, argi);
32443|    256|                    janetc_freeslot(c, arg);
32444|    256|                    janetc_freeslot(c, len);
32445|       |
32446|    256|                    janetc_emit_s(c, JOP_MAKE_TUPLE, nextright, 1);
32447|       |
32448|    256|                    leaf(c, janet_unwrap_symbol(values[i + 1]), nextright, attr);
  ------------------
  |  |  864|    256|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
32449|    256|                    janetc_freeslot(c, nextright);
32450|    256|                    break;
32451|    264|                }
32452|       |
32453|  2.22M|                if (i < 0x100) {
  ------------------
  |  Branch (32453:21): [True: 2.06M, False: 159k]
  ------------------
32454|  2.06M|                    janetc_emit_ssu(c, JOP_GET_INDEX, nextright, right, (uint8_t) i, 1);
32455|  2.06M|                } else {
32456|   159k|                    JanetSlot k = janetc_cslot(janet_wrap_integer(i));
  ------------------
  |  |  967|   159k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|   159k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
32457|   159k|                    janetc_emit_sss(c, JOP_IN, nextright, right, k, 1);
32458|   159k|                }
32459|  2.22M|                c->recursion_guard--;
32460|  2.22M|                if (destructure(c, subval, nextright, leaf, attr))
  ------------------
  |  Branch (32460:21): [True: 2.22M, False: 0]
  ------------------
32461|  2.22M|                    janetc_freeslot(c, nextright);
32462|  2.22M|                c->recursion_guard++;
32463|  2.22M|            }
32464|  1.01M|        }
32465|  1.01M|        return 1;
32466|     85|        case JANET_TABLE:
  ------------------
  |  Branch (32466:9): [True: 85, False: 2.62M]
  ------------------
32467|  3.12k|        case JANET_STRUCT: {
  ------------------
  |  Branch (32467:9): [True: 3.03k, False: 2.62M]
  ------------------
32468|  3.12k|            const JanetKV *kvs = NULL;
32469|  3.12k|            int32_t cap = 0, len = 0;
32470|  3.12k|            janet_dictionary_view(left, &kvs, &len, &cap);
32471|  31.5k|            for (int32_t i = 0; i < cap; i++) {
  ------------------
  |  Branch (32471:33): [True: 28.4k, False: 3.12k]
  ------------------
32472|  28.4k|                if (janet_checktype(kvs[i].key, JANET_NIL)) continue;
  ------------------
  |  |  806|  28.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 21.0k, False: 7.39k]
  |  |  |  Branch (806:6): [Folded, False: 28.4k]
  |  |  ------------------
  |  |  807|  28.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|  28.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  28.4k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  28.4k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  28.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  28.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32473|  7.39k|                JanetSlot nextright = janetc_farslot(c);
32474|  7.39k|                JanetSlot k = janetc_value(janetc_fopts_default(c), kvs[i].key);
32475|  7.39k|                janetc_emit_sss(c, JOP_IN, nextright, right, k, 1);
32476|  7.39k|                c->recursion_guard--;
32477|  7.39k|                if (destructure(c, kvs[i].value, nextright, leaf, attr))
  ------------------
  |  Branch (32477:21): [True: 7.39k, False: 0]
  ------------------
32478|  7.39k|                    janetc_freeslot(c, nextright);
32479|  7.39k|                c->recursion_guard++;
32480|  7.39k|            }
32481|  3.12k|        }
32482|  3.12k|        return 1;
32483|  2.62M|    }
32484|  2.62M|}
janet.c:check_16bit_jump:
32235|   100k|static void check_16bit_jump(JanetCompiler *c, int32_t lab1, int32_t lab2) {
32236|   100k|    if (bad_16bit_jump(lab1, lab2)) {
  ------------------
  |  Branch (32236:9): [True: 38, False: 100k]
  ------------------
32237|     38|        janetc_cerror(c, "bad 16-bit jump, too large");
32238|     38|    }
32239|   100k|}
janet.c:bad_16bit_jump:
32229|   100k|static int bad_16bit_jump(int32_t lab1, int32_t lab2) {
32230|   100k|    if (lab2 - lab1 > INT16_MAX) return 1;
  ------------------
  |  Branch (32230:9): [True: 38, False: 100k]
  ------------------
32231|   100k|    if (lab2 - lab1 < INT16_MIN) return 1;
  ------------------
  |  Branch (32231:9): [True: 0, False: 100k]
  ------------------
32232|   100k|    return 0;
32233|   100k|}
janet.c:check_24bit_jump:
32247|   100k|static void check_24bit_jump(JanetCompiler *c, int32_t lab1, int32_t lab2) {
32248|   100k|    if (bad_24bit_jump(lab1, lab2)) {
  ------------------
  |  Branch (32248:9): [True: 0, False: 100k]
  ------------------
32249|      0|        janetc_cerror(c, "bad 24-bit jump, too large");
32250|      0|    }
32251|   100k|}
janet.c:bad_24bit_jump:
32241|   100k|static int bad_24bit_jump(int32_t lab1, int32_t lab2) {
32242|   100k|    if (lab2 - lab1 > 0xFFFFFF) return 1;
  ------------------
  |  Branch (32242:9): [True: 0, False: 100k]
  ------------------
32243|   100k|    if (lab2 - lab1 < -0x1000000) return 1;
  ------------------
  |  Branch (32243:9): [True: 0, False: 100k]
  ------------------
32244|   100k|    return 0;
32245|   100k|}
janet.c:defleaf:
32745|  1.51M|    JanetTable *tab) {
32746|  1.51M|    JanetTable *entry = NULL;
32747|  1.51M|    int is_redef = 0;
32748|  1.51M|    if (c->scope->flags & JANET_SCOPE_TOP) {
  ------------------
  |  | 1037|  1.51M|#define JANET_SCOPE_TOP 4
  ------------------
  |  Branch (32748:9): [True: 1.40k, False: 1.51M]
  ------------------
32749|  1.40k|        entry = janet_table_clone(tab);
32750|  1.40k|        janet_table_put(entry, janet_ckeywordv("source-map"),
  ------------------
  |  | 1843|  1.40k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  1.40k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.40k|    janet_nanbox_from_cpointer((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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32751|  1.40k|                        janet_wrap_tuple(janetc_make_sourcemap(c)));
  ------------------
  |  |  843|  1.40k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  1.40k|    janet_nanbox_from_cpointer((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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32752|       |
32753|  1.40k|        is_redef = c->is_redef;
32754|  1.40k|        if (is_redef) janet_table_put(entry, janet_ckeywordv("redef"), janet_wrap_true());
  ------------------
  |  | 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      if (is_redef) janet_table_put(entry, janet_ckeywordv("redef"), janet_wrap_true());
  ------------------
  |  |  832|      0|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 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 (32754:13): [True: 0, False: 1.40k]
  ------------------
32755|       |
32756|  1.40k|        if (is_redef) {
  ------------------
  |  Branch (32756:13): [True: 0, False: 1.40k]
  ------------------
32757|      0|            JanetBinding binding = janet_resolve_ext(c->env, sym);
32758|      0|            JanetArray *ref;
32759|      0|            if (binding.type == JANET_BINDING_DYNAMIC_DEF || binding.type == JANET_BINDING_DYNAMIC_MACRO) {
  ------------------
  |  Branch (32759:17): [True: 0, False: 0]
  |  Branch (32759:62): [True: 0, False: 0]
  ------------------
32760|      0|                ref = janet_unwrap_array(binding.value);
  ------------------
  |  |  860|      0|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
32761|      0|            } else {
32762|      0|                ref = janet_array(1);
32763|      0|                janet_array_push(ref, 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32764|      0|            }
32765|      0|            janet_table_put(entry, janet_ckeywordv("ref"), janet_wrap_array(ref));
  ------------------
  |  | 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          janet_table_put(entry, janet_ckeywordv("ref"), janet_wrap_array(ref));
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32766|      0|            JanetSlot refslot = janetc_cslot(janet_wrap_array(ref));
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32767|      0|            janetc_emit_ssu(c, JOP_PUT_INDEX, refslot, s, 0, 0);
32768|  1.40k|        } else {
32769|  1.40k|            JanetSlot valsym = janetc_cslot(janet_ckeywordv("value"));
  ------------------
  |  | 1843|  1.40k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  1.40k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.40k|    janet_nanbox_from_cpointer((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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32770|  1.40k|            JanetSlot tabslot = janetc_cslot(janet_wrap_table(entry));
  ------------------
  |  |  846|  1.40k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32771|  1.40k|            janetc_emit_sss(c, JOP_PUT, tabslot, valsym, s, 0);
32772|  1.40k|        }
32773|  1.40k|    }
32774|  1.51M|    int no_unused = tab && tab->count && janet_truthy(janet_table_get_keyword(tab, "unused"));
  ------------------
  |  |  818|  1.52M|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|  25.1k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 12.5k]
  |  |  |  |  ------------------
  |  |  |  |  807|  25.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|  25.1k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  12.5k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  12.5k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  12.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  12.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 12.0k, False: 532]
  |  |  ------------------
  |  |  819|  1.52M|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|  24.0k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 12.0k]
  |  |  |  |  ------------------
  |  |  |  |  807|  24.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|  24.0k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  12.0k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  12.0k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  12.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  12.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 0, False: 12.0k]
  |  |  |  Branch (819:47): [True: 12.0k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (32774:21): [True: 796k, False: 715k]
  |  Branch (32774:28): [True: 12.5k, False: 783k]
  ------------------
32775|  1.51M|    int no_shadow = is_redef || (tab && tab->count && janet_truthy(janet_table_get_keyword(tab, "shadow")));
  ------------------
  |  |  818|  12.5k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|  25.1k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 12.5k]
  |  |  |  |  ------------------
  |  |  |  |  807|  25.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|  25.1k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  12.5k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  12.5k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  12.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  12.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 0, False: 12.5k]
  |  |  ------------------
  |  |  819|  12.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 (32775:21): [True: 0, False: 1.51M]
  |  Branch (32775:34): [True: 796k, False: 715k]
  |  Branch (32775:41): [True: 12.5k, False: 783k]
  ------------------
32776|  1.51M|    uint32_t def_flags = 0;
32777|  1.51M|    if (no_unused) def_flags |= JANET_DEFFLAG_NO_UNUSED;
  ------------------
  |  | 1160|  12.0k|#define JANET_DEFFLAG_NO_UNUSED 2
  ------------------
  |  Branch (32777:9): [True: 12.0k, False: 1.49M]
  ------------------
32778|  1.51M|    if (no_shadow) def_flags |= JANET_DEFFLAG_NO_SHADOWCHECK;
  ------------------
  |  | 1159|      0|#define JANET_DEFFLAG_NO_SHADOWCHECK 1
  ------------------
  |  Branch (32778:9): [True: 0, False: 1.51M]
  ------------------
32779|  1.51M|    int result = namelocal(c, sym, 0, s, def_flags);
32780|  1.51M|    if (entry) {
  ------------------
  |  Branch (32780:9): [True: 1.40k, False: 1.51M]
  ------------------
32781|       |        /* Add env entry to env AFTER namelocal to avoid the shadowcheck false positive */
32782|  1.40k|        janet_table_put(c->env, janet_wrap_symbol(sym), janet_wrap_table(entry));
  ------------------
  |  |  849|  1.40k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|  1.40k|    janet_nanbox_from_cpointer((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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      janet_table_put(c->env, janet_wrap_symbol(sym), janet_wrap_table(entry));
  ------------------
  |  |  846|  1.40k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32783|  1.40k|    }
32784|  1.51M|    return result;
32785|  1.51M|}
janet.c:janetc_make_sourcemap:
32487|  4.82k|static const Janet *janetc_make_sourcemap(JanetCompiler *c) {
32488|  4.82k|    Janet *tup = janet_tuple_begin(3);
32489|  4.82k|    tup[0] = c->source ? janet_wrap_string(c->source) : janet_wrap_nil();
  ------------------
  |  |  848|  4.82k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  4.82k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.82k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.82k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  tup[0] = c->source ? janet_wrap_string(c->source) : janet_wrap_nil();
  ------------------
  |  |  831|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  4.82k|    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 (32489:14): [True: 4.82k, False: 0]
  ------------------
32490|  4.82k|    tup[1] = janet_wrap_integer(c->current_mapping.line);
  ------------------
  |  |  967|  4.82k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  4.82k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
32491|  4.82k|    tup[2] = janet_wrap_integer(c->current_mapping.column);
  ------------------
  |  |  967|  4.82k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  4.82k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
32492|  4.82k|    return janet_tuple_end(tup);
32493|  4.82k|}
janet.c:namelocal:
32643|  1.54M|static int namelocal(JanetCompiler *c, const uint8_t *head, int32_t flags, JanetSlot ret, uint32_t def_flags) {
32644|  1.54M|    int isUnnamedRegister = !(ret.flags & JANET_SLOT_NAMED) &&
  ------------------
  |  | 1016|  1.54M|#define JANET_SLOT_NAMED 0x20000
  ------------------
  |  Branch (32644:29): [True: 1.49M, False: 54.0k]
  ------------------
32645|  1.49M|                            ret.index > 0 &&
  ------------------
  |  Branch (32645:29): [True: 1.37M, False: 113k]
  ------------------
32646|  1.37M|                            ret.envindex >= 0;
  ------------------
  |  Branch (32646:29): [True: 0, False: 1.37M]
  ------------------
32647|       |    /* optimization for `(def x my-def)` - don't emit a movn/movf instruction, we can just alias my-def */
32648|       |    /* TODO - implement optimization for `(def x my-var)` correctly as well w/ de-aliasing */
32649|  1.54M|    int canAlias = !(flags & JANET_SLOT_MUTABLE) &&
  ------------------
  |  | 1017|  1.54M|#define JANET_SLOT_MUTABLE 0x40000
  ------------------
  |  Branch (32649:20): [True: 1.51M, False: 34.7k]
  ------------------
32650|  1.51M|                   !(ret.flags & JANET_SLOT_MUTABLE) &&
  ------------------
  |  | 1017|  1.51M|#define JANET_SLOT_MUTABLE 0x40000
  ------------------
  |  Branch (32650:20): [True: 1.46M, False: 50.6k]
  ------------------
32651|  1.46M|                   (ret.flags & JANET_SLOT_NAMED) &&
  ------------------
  |  | 1016|  1.46M|#define JANET_SLOT_NAMED 0x20000
  ------------------
  |  Branch (32651:20): [True: 3.39k, False: 1.45M]
  ------------------
32652|  3.39k|                   (ret.index >= 0) &&
  ------------------
  |  Branch (32652:20): [True: 3.39k, False: 0]
  ------------------
32653|  3.39k|                   (ret.envindex == -1);
  ------------------
  |  Branch (32653:20): [True: 2.75k, False: 642]
  ------------------
32654|  1.54M|    if (canAlias) {
  ------------------
  |  Branch (32654:9): [True: 2.75k, False: 1.54M]
  ------------------
32655|  2.75k|        ret.flags &= ~JANET_SLOT_MUTABLE;
  ------------------
  |  | 1017|  2.75k|#define JANET_SLOT_MUTABLE 0x40000
  ------------------
32656|  2.75k|        isUnnamedRegister = 1; /* don't free slot after use - is an alias for another slot */
32657|  1.54M|    } else if (!isUnnamedRegister) {
  ------------------
  |  Branch (32657:16): [True: 1.54M, False: 0]
  ------------------
32658|       |        /* Slot is not able to be named */
32659|  1.54M|        JanetSlot localslot = janetc_farslot(c);
32660|  1.54M|        janetc_copy(c, localslot, ret);
32661|  1.54M|        ret = localslot;
32662|  1.54M|    }
32663|  1.54M|    ret.flags |= flags;
32664|  1.54M|    if (c->scope->flags & JANET_SCOPE_TOP) {
  ------------------
  |  | 1037|  1.54M|#define JANET_SCOPE_TOP 4
  ------------------
  |  Branch (32664:9): [True: 1.40k, False: 1.54M]
  ------------------
32665|  1.40k|        def_flags |= JANET_DEFFLAG_NO_UNUSED;
  ------------------
  |  | 1160|  1.40k|#define JANET_DEFFLAG_NO_UNUSED 2
  ------------------
32666|  1.40k|    }
32667|  1.54M|    janetc_nameslot(c, head, ret, def_flags);
32668|  1.54M|    return !isUnnamedRegister;
32669|  1.54M|}
janet.c:janetc_do:
32947|   169k|static JanetSlot janetc_do(JanetFopts opts, int32_t argn, const Janet *argv) {
32948|   169k|    int32_t i;
32949|   169k|    JanetSlot ret = janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|   169k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   169k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   169k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   169k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32950|   169k|    JanetCompiler *c = opts.compiler;
32951|   169k|    JanetFopts subopts = janetc_fopts_default(c);
32952|   169k|    JanetScope tempscope;
32953|   169k|    janetc_scope(&tempscope, c, 0, "do");
32954|   506k|    for (i = 0; i < argn; i++) {
  ------------------
  |  Branch (32954:17): [True: 337k, False: 169k]
  ------------------
32955|   337k|        if (i != argn - 1) {
  ------------------
  |  Branch (32955:13): [True: 167k, False: 169k]
  ------------------
32956|   167k|            subopts.flags = JANET_FOPTS_DROP;
  ------------------
  |  | 1126|   167k|#define JANET_FOPTS_DROP 0x40000
  ------------------
32957|   169k|        } else {
32958|   169k|            subopts = opts;
32959|   169k|            subopts.flags &= ~JANET_FOPTS_ACCEPT_SPLICE;
  ------------------
  |  | 1127|   169k|#define JANET_FOPTS_ACCEPT_SPLICE 0x80000
  ------------------
32960|   169k|        }
32961|   337k|        ret = janetc_value(subopts, argv[i]);
32962|   337k|        if (i != argn - 1) {
  ------------------
  |  Branch (32962:13): [True: 167k, False: 169k]
  ------------------
32963|   167k|            janetc_freeslot(c, ret);
32964|   167k|        }
32965|   337k|    }
32966|   169k|    janetc_popscope_keepslot(c, ret);
32967|   169k|    return ret;
32968|   169k|}
janet.c:janetc_fn:
33208|   323k|static JanetSlot janetc_fn(JanetFopts opts, int32_t argn, const Janet *argv) {
33209|   323k|    JanetCompiler *c = opts.compiler;
33210|   323k|    JanetFuncDef *def;
33211|   323k|    JanetSlot ret;
33212|   323k|    Janet head;
33213|   323k|    JanetScope fnscope;
33214|   323k|    int32_t paramcount, argi, parami, arity, min_arity = 0, max_arity, defindex, i;
33215|   323k|    JanetFopts subopts = janetc_fopts_default(c);
33216|   323k|    const Janet *params;
33217|   323k|    const char *errmsg = NULL;
33218|       |
33219|       |    /* Function flags */
33220|   323k|    int vararg = 0;
33221|   323k|    int structarg = 0;
33222|   323k|    int allow_extra = 0;
33223|   323k|    int selfref = 0;
33224|   323k|    int hasname = 0;
33225|   323k|    int seenamp = 0;
33226|   323k|    int seenopt = 0;
33227|   323k|    int namedargs = 0;
33228|       |
33229|       |    /* Begin function */
33230|   323k|    c->scope->flags |= JANET_SCOPE_CLOSURE;
  ------------------
  |  | 1039|   323k|#define JANET_SCOPE_CLOSURE 16
  ------------------
33231|   323k|    janetc_scope(&fnscope, c, JANET_SCOPE_FUNCTION, "function");
  ------------------
  |  | 1035|   323k|#define JANET_SCOPE_FUNCTION 1
  ------------------
33232|       |
33233|   323k|    if (argn == 0) {
  ------------------
  |  Branch (33233:9): [True: 0, False: 323k]
  ------------------
33234|      0|        errmsg = "expected at least 1 argument to function literal";
33235|      0|        goto error;
33236|      0|    }
33237|       |
33238|       |    /* Read function parameters */
33239|   323k|    parami = 0;
33240|   323k|    head = argv[0];
33241|   323k|    if (janet_checktype(head, JANET_SYMBOL)) {
  ------------------
  |  |  806|   323k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 787, False: 323k]
  |  |  |  Branch (806:6): [Folded, False: 323k]
  |  |  ------------------
  |  |  807|   323k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   323k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   323k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   323k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   323k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   323k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33242|    787|        selfref = 1;
33243|    787|        hasname = 1;
33244|    787|        parami = 1;
33245|   323k|    } else if (janet_checktype(head, JANET_KEYWORD)) {
  ------------------
  |  |  806|   323k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 322k, False: 775]
  |  |  |  Branch (806:6): [Folded, False: 323k]
  |  |  ------------------
  |  |  807|   323k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   323k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   323k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   323k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   323k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   323k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33246|   322k|        hasname = 1;
33247|   322k|        parami = 1;
33248|   322k|    }
33249|   323k|    if (parami >= argn || !janet_checktype(argv[parami], JANET_TUPLE)) {
  ------------------
  |  |  806|   323k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 323k]
  |  |  ------------------
  |  |  807|   323k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   323k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   323k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   323k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   323k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   323k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33249:9): [True: 0, False: 323k]
  |  Branch (33249:27): [True: 6, False: 323k]
  ------------------
33250|      6|        errmsg = "expected function parameters";
33251|      6|        goto error;
33252|      6|    }
33253|       |
33254|       |    /* Keep track of destructured parameters */
33255|   323k|    JanetSlot *destructed_params = NULL;
33256|   323k|    JanetSlot *named_params = NULL;
33257|   323k|    JanetTable *named_table = NULL;
33258|   323k|    JanetSlot named_slot;
33259|       |
33260|       |    /* Compile function parameters */
33261|   323k|    params = janet_unwrap_tuple(argv[parami]);
  ------------------
  |  |  858|   323k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
33262|   323k|    paramcount = janet_tuple_length(params);
  ------------------
  |  | 1802|   323k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|   323k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
33263|   323k|    arity = paramcount;
33264|  4.65M|    for (i = 0; i < paramcount; i++) {
  ------------------
  |  Branch (33264:17): [True: 4.33M, False: 323k]
  ------------------
33265|  4.33M|        Janet param = params[i];
33266|  4.33M|        if (namedargs) {
  ------------------
  |  Branch (33266:13): [True: 150, False: 4.33M]
  ------------------
33267|    150|            arity--;
33268|    150|            if (!janet_checktype(param, JANET_SYMBOL)) {
  ------------------
  |  |  806|    150|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 150]
  |  |  ------------------
  |  |  807|    150|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    150|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    150|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    150|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    150|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    150|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33268:17): [True: 3, False: 147]
  ------------------
33269|      3|                errmsg = "only named arguments can follow &named";
33270|      3|                goto error;
33271|      3|            }
33272|    147|            Janet key = janet_wrap_keyword(janet_unwrap_symbol(param));
  ------------------
  |  |  850|    147|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  ------------------
  |  |  |  |  828|    147|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    147|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    147|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33273|    147|            janet_table_put(named_table, key, param);
33274|    147|            janet_v_push(named_params, janetc_farslot(c));
  ------------------
  |  |  734|    147|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|    147|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|    147|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|    134|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|    134|#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|    134|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|    134|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 13, False: 134]
  |  |  |  |  |  |  |  Branch (745:50): [True: 42, False: 92]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|     55|#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|    147|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    147|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33275|  4.33M|        } else if (janet_checktype(param, JANET_SYMBOL)) {
  ------------------
  |  |  806|  4.33M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 4.23M, False: 98.4k]
  |  |  |  Branch (806:6): [Folded, False: 4.33M]
  |  |  ------------------
  |  |  807|  4.33M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.33M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  4.33M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  4.33M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.33M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.33M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33276|       |            /* Check for varargs and unfixed arity */
33277|  4.23M|            const uint8_t *sym = janet_unwrap_symbol(param);
  ------------------
  |  |  864|  4.23M|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
33278|  4.23M|            if (sym[0] == '&') {
  ------------------
  |  Branch (33278:17): [True: 5.24k, False: 4.22M]
  ------------------
33279|  5.24k|                if (!janet_cstrcmp(sym, "&")) {
  ------------------
  |  Branch (33279:21): [True: 77, False: 5.16k]
  ------------------
33280|     77|                    if (seenamp) {
  ------------------
  |  Branch (33280:25): [True: 0, False: 77]
  ------------------
33281|      0|                        errmsg = "& in unexpected location";
33282|      0|                        goto error;
33283|     77|                    } else if (i == paramcount - 1) {
  ------------------
  |  Branch (33283:32): [True: 36, False: 41]
  ------------------
33284|     36|                        allow_extra = 1;
33285|     36|                        arity--;
33286|     41|                    } else if (i == paramcount - 2) {
  ------------------
  |  Branch (33286:32): [True: 40, False: 1]
  ------------------
33287|     40|                        vararg = 1;
33288|     40|                        arity -= 2;
33289|     40|                    } else {
33290|      1|                        errmsg = "& in unexpected location";
33291|      1|                        goto error;
33292|      1|                    }
33293|     76|                    seenamp = 1;
33294|  5.16k|                } else if (!janet_cstrcmp(sym, "&opt")) {
  ------------------
  |  Branch (33294:28): [True: 1, False: 5.16k]
  ------------------
33295|      1|                    if (seenopt) {
  ------------------
  |  Branch (33295:25): [True: 0, False: 1]
  ------------------
33296|      0|                        errmsg = "only one &opt allowed";
33297|      0|                        goto error;
33298|      1|                    } else if (i == paramcount - 1) {
  ------------------
  |  Branch (33298:32): [True: 1, False: 0]
  ------------------
33299|      1|                        errmsg = "&opt cannot be last item in parameter list";
33300|      1|                        goto error;
33301|      1|                    }
33302|      0|                    min_arity = i;
33303|      0|                    arity--;
33304|      0|                    seenopt = 1;
33305|  5.16k|                } else if (!janet_cstrcmp(sym, "&keys")) {
  ------------------
  |  Branch (33305:28): [True: 0, False: 5.16k]
  ------------------
33306|      0|                    if (seenamp) {
  ------------------
  |  Branch (33306:25): [True: 0, False: 0]
  ------------------
33307|      0|                        errmsg = "&keys in unexpected location";
33308|      0|                        goto error;
33309|      0|                    } else if (i == paramcount - 2) {
  ------------------
  |  Branch (33309:32): [True: 0, False: 0]
  ------------------
33310|      0|                        vararg = 1;
33311|      0|                        structarg = 1;
33312|      0|                        arity -= 2;
33313|      0|                    } else {
33314|      0|                        errmsg = "&keys in unexpected location";
33315|      0|                        goto error;
33316|      0|                    }
33317|      0|                    seenamp = 1;
33318|  5.16k|                } else if (!janet_cstrcmp(sym, "&named")) {
  ------------------
  |  Branch (33318:28): [True: 14, False: 5.14k]
  ------------------
33319|     14|                    if (seenamp) {
  ------------------
  |  Branch (33319:25): [True: 0, False: 14]
  ------------------
33320|      0|                        errmsg = "&named in unexpected location";
33321|      0|                        goto error;
33322|      0|                    }
33323|     14|                    vararg = 1;
33324|     14|                    structarg = 1;
33325|     14|                    arity--;
33326|     14|                    seenamp = 1;
33327|     14|                    namedargs = 1;
33328|     14|                    named_table = janet_table(10);
33329|     14|                    named_slot = janetc_farslot(c);
33330|  5.14k|                } else {
33331|  5.14k|                    janetc_nameslot(c, sym, janetc_farslot(c), 0);
33332|  5.14k|                }
33333|  4.22M|            } else {
33334|  4.22M|                janetc_nameslot(c, sym, janetc_farslot(c), 0);
33335|  4.22M|            }
33336|  4.23M|        } else {
33337|  98.4k|            janet_v_push(destructed_params, janetc_farslot(c));
  ------------------
  |  |  734|  98.4k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  98.4k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  98.4k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  97.7k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  97.7k|#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|  97.7k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  97.7k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 644, False: 97.7k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 681, False: 97.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  1.32k|#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|  98.4k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  98.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33338|  98.4k|        }
33339|  4.33M|    }
33340|       |
33341|       |    /* Compile named arguments */
33342|   323k|    if (namedargs) {
  ------------------
  |  Branch (33342:9): [True: 11, False: 323k]
  ------------------
33343|     11|        Janet param = janet_wrap_table(named_table);
  ------------------
  |  |  846|     11|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|     11|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     11|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     11|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33344|     11|        destructure(c, param, named_slot, defleaf, NULL);
33345|     11|        janetc_freeslot(c, named_slot);
33346|     11|        janet_v_free(named_params);
  ------------------
  |  |  733|     11|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|     10|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 10, False: 1]
  |  |  ------------------
  ------------------
33347|     11|    }
33348|       |
33349|       |    /* Compile destructed params */
33350|   323k|    int32_t j = 0;
33351|  4.65M|    for (i = 0; i < paramcount; i++) {
  ------------------
  |  Branch (33351:17): [True: 4.33M, False: 323k]
  ------------------
33352|  4.33M|        Janet param = params[i];
33353|  4.33M|        if (!janet_checktype(param, JANET_SYMBOL)) {
  ------------------
  |  |  806|  4.33M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 4.33M]
  |  |  ------------------
  |  |  807|  4.33M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.33M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  4.33M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  4.33M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.33M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.33M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33353:13): [True: 98.4k, False: 4.23M]
  ------------------
33354|  98.4k|            janet_assert(janet_v_count(destructed_params) > j, "out of bounds");
  ------------------
  |  |  389|  98.4k|#define janet_assert(c, m) do { \
  |  |  390|   196k|    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: 98.4k]
  |  |  |  Branch (390:11): [True: 98.4k, False: 0]
  |  |  ------------------
  |  |  391|  98.4k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 98.4k]
  |  |  ------------------
  ------------------
33355|  98.4k|            JanetSlot reg = destructed_params[j++];
33356|  98.4k|            destructure(c, param, reg, defleaf, NULL);
33357|  98.4k|            janetc_freeslot(c, reg);
33358|  98.4k|        }
33359|  4.33M|    }
33360|   323k|    janet_v_free(destructed_params);
  ------------------
  |  |  733|   323k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|    640|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 640, False: 323k]
  |  |  ------------------
  ------------------
33361|       |
33362|   323k|    max_arity = (vararg || allow_extra) ? INT32_MAX : arity;
  ------------------
  |  Branch (33362:18): [True: 51, False: 323k]
  |  Branch (33362:28): [True: 36, False: 323k]
  ------------------
33363|   323k|    if (!seenopt) min_arity = arity;
  ------------------
  |  Branch (33363:9): [True: 323k, False: 0]
  ------------------
33364|       |
33365|       |    /* Check for self ref (also avoid if arguments shadow own name) */
33366|   323k|    if (selfref) {
  ------------------
  |  Branch (33366:9): [True: 785, False: 322k]
  ------------------
33367|       |        /* Check if the parameters shadow the function name. If so, don't
33368|       |         * emit JOP_LOAD_SELF and add a binding since that most users
33369|       |         * seem to expect that function parameters take precedence over the
33370|       |         * function name */
33371|    785|        const uint8_t *sym = janet_unwrap_symbol(head);
  ------------------
  |  |  864|    785|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
33372|    785|        int32_t len = janet_v_count(c->scope->syms);
  ------------------
  |  |  736|    785|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|    666|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    666|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 666, False: 119]
  |  |  ------------------
  ------------------
33373|    785|        int found = 0;
33374|   685k|        for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (33374:29): [True: 685k, False: 785]
  ------------------
33375|   685k|            if (c->scope->syms[i].sym == sym) {
  ------------------
  |  Branch (33375:17): [True: 1.79k, False: 683k]
  ------------------
33376|  1.79k|                found = 1;
33377|  1.79k|            }
33378|   685k|        }
33379|    785|        if (!found) {
  ------------------
  |  Branch (33379:13): [True: 705, False: 80]
  ------------------
33380|    705|            JanetSlot slot = janetc_farslot(c);
33381|    705|            slot.flags = JANET_SLOT_NAMED | JANET_FUNCTION;
  ------------------
  |  | 1016|    705|#define JANET_SLOT_NAMED 0x20000
  ------------------
33382|    705|            janetc_emit_s(c, JOP_LOAD_SELF, slot, 1);
33383|       |            /* We should figure out a better way to avoid `(def x 1) (def x :shadow (fn x [...] ...))` triggering a
33384|       |             * shadow lint for the last x */
33385|    705|            janetc_nameslot(c, sym, slot, JANET_DEFFLAG_NO_UNUSED | JANET_DEFFLAG_NO_SHADOWCHECK);
  ------------------
  |  | 1160|    705|#define JANET_DEFFLAG_NO_UNUSED 2
  ------------------
                          janetc_nameslot(c, sym, slot, JANET_DEFFLAG_NO_UNUSED | JANET_DEFFLAG_NO_SHADOWCHECK);
  ------------------
  |  | 1159|    705|#define JANET_DEFFLAG_NO_SHADOWCHECK 1
  ------------------
33386|    705|        }
33387|    785|    }
33388|       |
33389|       |    /* Compile function body */
33390|   323k|    if (parami + 1 == argn) {
  ------------------
  |  Branch (33390:9): [True: 2.94k, False: 320k]
  ------------------
33391|  2.94k|        janetc_emit(c, JOP_RETURN_NIL);
33392|   320k|    } else {
33393|   649k|        for (argi = parami + 1; argi < argn; argi++) {
  ------------------
  |  Branch (33393:33): [True: 336k, False: 312k]
  ------------------
33394|   336k|            subopts.flags = (argi == (argn - 1)) ? JANET_FOPTS_TAIL : JANET_FOPTS_DROP;
  ------------------
  |  | 1124|   320k|#define JANET_FOPTS_TAIL 0x10000
  ------------------
                          subopts.flags = (argi == (argn - 1)) ? JANET_FOPTS_TAIL : JANET_FOPTS_DROP;
  ------------------
  |  | 1126|   352k|#define JANET_FOPTS_DROP 0x40000
  ------------------
  |  Branch (33394:29): [True: 320k, False: 16.0k]
  ------------------
33395|   336k|            janetc_value(subopts, argv[argi]);
33396|   336k|            if (c->result.status == JANET_COMPILE_ERROR)
  ------------------
  |  Branch (33396:17): [True: 8.04k, False: 328k]
  ------------------
33397|  8.04k|                goto error2;
33398|   336k|        }
33399|   320k|    }
33400|       |
33401|       |    /* Build function */
33402|   315k|    JanetString name = hasname ? janet_unwrap_symbol(head) : NULL;
  ------------------
  |  |  864|   315k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (33402:24): [True: 315k, False: 285]
  ------------------
33403|   315k|    def = janetc_pop_funcdef(c, name);
33404|   315k|    def->arity = arity;
33405|   315k|    def->min_arity = min_arity;
33406|   315k|    def->max_arity = max_arity;
33407|   315k|    if (named_table != NULL) {
  ------------------
  |  Branch (33407:9): [True: 8, False: 315k]
  ------------------
33408|      8|        def->named_args_count = named_table->count;
33409|      8|    }
33410|   315k|    if (vararg) def->flags |= JANET_FUNCDEF_FLAG_VARARG;
  ------------------
  |  | 1097|     29|#define JANET_FUNCDEF_FLAG_VARARG 0x10000
  ------------------
  |  Branch (33410:9): [True: 29, False: 315k]
  ------------------
33411|   315k|    if (structarg) def->flags |= JANET_FUNCDEF_FLAG_STRUCTARG;
  ------------------
  |  | 1105|      8|#define JANET_FUNCDEF_FLAG_STRUCTARG 0x1000000
  ------------------
  |  Branch (33411:9): [True: 8, False: 315k]
  ------------------
33412|   315k|    if (namedargs) def->flags |= JANET_FUNCDEF_FLAG_NAMEDARGS;
  ------------------
  |  | 1107|      8|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (33412:9): [True: 8, False: 315k]
  ------------------
33413|       |
33414|   315k|    janet_def_addflags(def);
33415|   315k|    defindex = janetc_addfuncdef(c, def);
33416|   315k|    if (defindex > 255) {
  ------------------
  |  Branch (33416:9): [True: 14, False: 315k]
  ------------------
33417|     14|        janetc_error(c, janet_cstring("too many closures"));
33418|     14|        return janetc_cslot(janet_wrap_nil()); /* Scope is now already popped, don't goto error */
  ------------------
  |  |  831|     14|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     14|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     14|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     14|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33419|     14|    }
33420|       |
33421|       |    /* Ensure enough slots for vararg function. */
33422|   315k|    if (arity + vararg > def->slotcount) def->slotcount = arity + vararg;
  ------------------
  |  Branch (33422:9): [True: 0, False: 315k]
  ------------------
33423|       |
33424|       |    /* Do basic optimization */
33425|   315k|    if (!(fnscope.flags & JANET_SCOPE_UNUSED)) {
  ------------------
  |  | 1038|   315k|#define JANET_SCOPE_UNUSED 8
  ------------------
  |  Branch (33425:9): [True: 315k, False: 0]
  ------------------
33426|   315k|        janet_bytecode_optimize(def, c->optimize);
33427|   315k|    }
33428|       |
33429|       |    /* Instantiate closure */
33430|   315k|    ret = janetc_gettarget(opts);
33431|   315k|    janetc_emit_su(c, JOP_CLOSURE, ret, defindex, 1);
33432|   315k|    return ret;
33433|       |
33434|     11|error:
33435|     11|    janetc_cerror(c, errmsg);
33436|  8.05k|error2:
33437|  8.05k|    janetc_popscope(c);
33438|  8.05k|    return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|  8.05k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  8.05k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.05k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.05k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33439|     11|}
janet.c:janetc_addfuncdef:
32993|   350k|static int32_t janetc_addfuncdef(JanetCompiler *c, JanetFuncDef *def) {
32994|   350k|    JanetScope *scope = c->scope;
32995|   945k|    while (scope) {
  ------------------
  |  Branch (32995:12): [True: 945k, False: 0]
  ------------------
32996|   945k|        if (scope->flags & JANET_SCOPE_FUNCTION)
  ------------------
  |  | 1035|   945k|#define JANET_SCOPE_FUNCTION 1
  ------------------
  |  Branch (32996:13): [True: 350k, False: 594k]
  ------------------
32997|   350k|            break;
32998|   594k|        scope = scope->parent;
32999|   594k|    }
33000|   350k|    janet_assert(scope, "could not add funcdef");
  ------------------
  |  |  389|   350k|#define janet_assert(c, m) do { \
  |  |  390|   350k|    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: 350k]
  |  |  ------------------
  |  |  391|   350k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 350k]
  |  |  ------------------
  ------------------
33001|   350k|    janet_v_push(scope->defs, def);
  ------------------
  |  |  734|   350k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|   350k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|   350k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|   138k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|   138k|#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|   138k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|   138k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 212k, False: 138k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 75.0k, False: 63.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|   287k|#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|   350k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   350k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33002|       |    return janet_v_count(scope->defs) - 1;
  ------------------
  |  |  736|   350k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|   350k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   350k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 350k, False: 0]
  |  |  ------------------
  ------------------
33003|   350k|}
janet.c:janetc_if:
32841|   143k|static JanetSlot janetc_if(JanetFopts opts, int32_t argn, const Janet *argv) {
32842|   143k|    JanetCompiler *c = opts.compiler;
32843|   143k|    int32_t labelr, labeljr, labeld, labeljd;
32844|   143k|    JanetFopts condopts, bodyopts;
32845|   143k|    JanetSlot cond, left, right, target;
32846|   143k|    Janet truebody, falsebody;
32847|   143k|    JanetScope condscope, tempscope;
32848|   143k|    const int tail = opts.flags & JANET_FOPTS_TAIL;
  ------------------
  |  | 1124|   143k|#define JANET_FOPTS_TAIL 0x10000
  ------------------
32849|   143k|    const int drop = opts.flags & JANET_FOPTS_DROP;
  ------------------
  |  | 1126|   143k|#define JANET_FOPTS_DROP 0x40000
  ------------------
32850|   143k|    uint8_t ifnjmp = JOP_JUMP_IF_NOT;
32851|       |
32852|   143k|    if (argn < 2 || argn > 3) {
  ------------------
  |  Branch (32852:9): [True: 0, False: 143k]
  |  Branch (32852:21): [True: 0, False: 143k]
  ------------------
32853|      0|        janetc_cerror(c, "expected 2 or 3 arguments to if");
32854|      0|        return janetc_cslot(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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32855|      0|    }
32856|       |
32857|       |    /* Get the bodies of the if expression */
32858|   143k|    truebody = argv[1];
32859|   143k|    falsebody = argn > 2 ? argv[2] : janet_wrap_nil();
  ------------------
  |  |  831|  1.80k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   144k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.80k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.80k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (32859:17): [True: 141k, False: 1.80k]
  ------------------
32860|       |
32861|       |    /* Get options */
32862|   143k|    condopts = janetc_fopts_default(c);
32863|   143k|    bodyopts = opts;
32864|   143k|    bodyopts.flags &= ~JANET_FOPTS_ACCEPT_SPLICE;
  ------------------
  |  | 1127|   143k|#define JANET_FOPTS_ACCEPT_SPLICE 0x80000
  ------------------
32865|       |
32866|       |    /* Set target for compilation */
32867|   143k|    target = (drop || tail)
  ------------------
  |  Branch (32867:15): [True: 972, False: 142k]
  |  Branch (32867:23): [True: 15.8k, False: 126k]
  ------------------
32868|   143k|             ? janetc_cslot(janet_wrap_nil())
  ------------------
  |  |  831|  16.8k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  16.8k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  16.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  16.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32869|   143k|             : janetc_gettarget(opts);
32870|       |
32871|       |    /* Compile condition */
32872|   143k|    janetc_scope(&condscope, c, 0, "if");
32873|       |
32874|   143k|    Janet condform = argv[0];
32875|   143k|    if (janetc_check_nil_form(condform, &condform, JANET_FUN_EQ)) {
  ------------------
  |  |  994|   143k|#define JANET_FUN_EQ 24
  ------------------
  |  Branch (32875:9): [True: 0, False: 143k]
  ------------------
32876|      0|        ifnjmp = JOP_JUMP_IF_NOT_NIL;
32877|   143k|    } else if (janetc_check_nil_form(condform, &condform, JANET_FUN_NEQ)) {
  ------------------
  |  |  995|   143k|#define JANET_FUN_NEQ 25
  ------------------
  |  Branch (32877:16): [True: 0, False: 143k]
  ------------------
32878|      0|        ifnjmp = JOP_JUMP_IF_NIL;
32879|      0|    }
32880|       |
32881|   143k|    cond = janetc_value(condopts, condform);
32882|       |
32883|       |    /* Check constant condition. */
32884|       |    /* TODO: Use type info for more short circuits */
32885|   143k|    if (cond.flags & JANET_SLOT_CONSTANT) {
  ------------------
  |  | 1015|   143k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (32885:9): [True: 47.2k, False: 95.8k]
  ------------------
32886|  47.2k|        int swap_condition = 0;
32887|  47.2k|        if (ifnjmp == JOP_JUMP_IF_NOT && !janet_truthy(cond.constant)) swap_condition = 1;
  ------------------
  |  |  818|  47.2k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|  94.5k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 47.2k]
  |  |  |  |  ------------------
  |  |  |  |  807|  94.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|  94.5k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  47.2k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  47.2k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  47.2k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  47.2k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 46.8k, False: 445]
  |  |  ------------------
  |  |  819|  47.2k|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|  93.6k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 46.8k]
  |  |  |  |  ------------------
  |  |  |  |  807|  93.6k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|  93.6k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  46.8k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  46.8k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  46.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  46.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 6.19k, False: 40.6k]
  |  |  |  Branch (819:47): [True: 40.6k, False: 11]
  |  |  ------------------
  ------------------
  |  Branch (32887:13): [True: 47.2k, False: 0]
  ------------------
32888|  47.2k|        if (ifnjmp == JOP_JUMP_IF_NIL && janet_checktype(cond.constant, JANET_NIL)) swap_condition = 1;
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (32888:13): [True: 0, False: 47.2k]
  ------------------
32889|  47.2k|        if (ifnjmp == JOP_JUMP_IF_NOT_NIL && !janet_checktype(cond.constant, JANET_NIL)) swap_condition = 1;
  ------------------
  |  |  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 (32889:13): [True: 0, False: 47.2k]
  |  Branch (32889:46): [True: 0, False: 0]
  ------------------
32890|  47.2k|        if (swap_condition) {
  ------------------
  |  Branch (32890:13): [True: 456, False: 46.8k]
  ------------------
32891|       |            /* Swap the true and false bodies */
32892|    456|            Janet temp = falsebody;
32893|    456|            falsebody = truebody;
32894|    456|            truebody = temp;
32895|    456|        }
32896|  47.2k|        janetc_scope(&tempscope, c, 0, "if-true");
32897|  47.2k|        right = janetc_value(bodyopts, truebody);
32898|  47.2k|        if (!drop && !tail) janetc_copy(c, target, right);
  ------------------
  |  Branch (32898:13): [True: 47.1k, False: 134]
  |  Branch (32898:22): [True: 43.0k, False: 4.08k]
  ------------------
32899|  47.2k|        janetc_popscope(c);
32900|  47.2k|        if (!janet_checktype(falsebody, JANET_NIL)) {
  ------------------
  |  |  806|  47.2k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 47.2k]
  |  |  ------------------
  |  |  807|  47.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|  47.2k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  47.2k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  47.2k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  47.2k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  47.2k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (32900:13): [True: 47.1k, False: 137]
  ------------------
32901|  47.1k|            janetc_throwaway(bodyopts, falsebody);
32902|  47.1k|        }
32903|  47.2k|        janetc_popscope(c);
32904|  47.2k|        return target;
32905|  47.2k|    }
32906|       |
32907|       |    /* Compile jump to right */
32908|  95.8k|    labeljr = janetc_emit_si(c, ifnjmp, cond, 0, 0);
32909|       |
32910|       |    /* Condition left body */
32911|  95.8k|    janetc_scope(&tempscope, c, 0, "if-true");
32912|  95.8k|    left = janetc_value(bodyopts, truebody);
32913|  95.8k|    if (!drop && !tail) janetc_copy(c, target, left);
  ------------------
  |  Branch (32913:9): [True: 95.0k, False: 838]
  |  Branch (32913:18): [True: 83.2k, False: 11.7k]
  ------------------
32914|  95.8k|    janetc_popscope(c);
32915|       |
32916|       |    /* Compile jump to done */
32917|  95.8k|    labeljd = janet_v_count(c->buffer);
  ------------------
  |  |  736|  95.8k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  95.8k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  95.8k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 95.8k, False: 0]
  |  |  ------------------
  ------------------
32918|  95.8k|    if (!tail && !(drop && janet_checktype(falsebody, JANET_NIL))) janetc_emit(c, JOP_JUMP);
  ------------------
  |  |  806|    838|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 17, False: 821]
  |  |  |  Branch (806:6): [Folded, False: 838]
  |  |  ------------------
  |  |  807|    838|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    838|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    838|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    838|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    838|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    838|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (32918:9): [True: 84.0k, False: 11.7k]
  |  Branch (32918:20): [True: 838, False: 83.2k]
  ------------------
32919|       |
32920|       |    /* Compile right body */
32921|  95.8k|    labelr = janet_v_count(c->buffer);
  ------------------
  |  |  736|  95.8k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  95.8k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  95.8k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 95.8k, False: 0]
  |  |  ------------------
  ------------------
32922|  95.8k|    janetc_scope(&tempscope, c, 0, "if-false");
32923|  95.8k|    right = janetc_value(bodyopts, falsebody);
32924|  95.8k|    if (!drop && !tail) janetc_copy(c, target, right);
  ------------------
  |  Branch (32924:9): [True: 95.0k, False: 838]
  |  Branch (32924:18): [True: 83.2k, False: 11.7k]
  ------------------
32925|  95.8k|    janetc_popscope(c);
32926|       |
32927|       |    /* Pop main scope */
32928|  95.8k|    janetc_popscope(c);
32929|       |
32930|       |    /* Write jumps - only add jump lengths if jump actually emitted */
32931|  95.8k|    labeld = janet_v_count(c->buffer);
  ------------------
  |  |  736|  95.8k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  95.8k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  95.8k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 95.8k, False: 0]
  |  |  ------------------
  ------------------
32932|  95.8k|    if (labeljr < labeld) {
  ------------------
  |  Branch (32932:9): [True: 95.8k, False: 0]
  ------------------
32933|  95.8k|        check_16bit_jump(c, labeljr, labelr);
32934|  95.8k|        c->buffer[labeljr] |= (uint32_t)(labelr - labeljr) << 16;
32935|  95.8k|        if (!tail && labeljd < labeld) {
  ------------------
  |  Branch (32935:13): [True: 84.0k, False: 11.7k]
  |  Branch (32935:22): [True: 84.0k, False: 17]
  ------------------
32936|  84.0k|            check_24bit_jump(c, labeljd, labeld);
32937|  84.0k|            c->buffer[labeljd] |= (uint32_t)(labeld - labeljd) << 8;
32938|  84.0k|        }
32939|  95.8k|    }
32940|       |
32941|  95.8k|    if (tail) target.flags |= JANET_SLOT_RETURNED;
  ------------------
  |  | 1019|  11.7k|#define JANET_SLOT_RETURNED 0x100000
  ------------------
  |  Branch (32941:9): [True: 11.7k, False: 84.0k]
  ------------------
32942|  95.8k|    return target;
32943|   143k|}
janet.c:janetc_check_nil_form:
32811|   390k|static int janetc_check_nil_form(Janet x, Janet *capture, uint32_t fun_tag) {
32812|   390k|    if (!janet_checktype(x, JANET_TUPLE)) return 0;
  ------------------
  |  |  806|   390k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 390k]
  |  |  ------------------
  |  |  807|   390k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   390k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   390k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   390k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   390k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   390k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (32812:9): [True: 42.5k, False: 347k]
  ------------------
32813|   347k|    JanetTuple tup = janet_unwrap_tuple(x);
  ------------------
  |  |  858|   347k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
32814|   347k|    if (3 != janet_tuple_length(tup)) return 0;
  ------------------
  |  | 1802|   347k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|   347k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (32814:9): [True: 261k, False: 86.4k]
  ------------------
32815|  86.4k|    Janet op1 = tup[0];
32816|  86.4k|    if (!janet_checktype(op1, JANET_FUNCTION)) return 0;
  ------------------
  |  |  806|  86.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 86.4k]
  |  |  ------------------
  |  |  807|  86.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|  86.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  86.4k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  86.4k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  86.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  86.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (32816:9): [True: 27.2k, False: 59.2k]
  ------------------
32817|  59.2k|    JanetFunction *fun = janet_unwrap_function(op1);
  ------------------
  |  |  868|  59.2k|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
32818|  59.2k|    uint32_t tag = fun->def->flags & JANET_FUNCDEF_FLAG_TAG;
  ------------------
  |  | 1108|  59.2k|#define JANET_FUNCDEF_FLAG_TAG 0xFFFF
  ------------------
32819|  59.2k|    if (tag != fun_tag) return 0;
  ------------------
  |  Branch (32819:9): [True: 29.6k, False: 29.5k]
  ------------------
32820|  29.5k|    if (janet_checktype(tup[1], JANET_NIL)) {
  ------------------
  |  |  806|  29.5k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 29.5k, False: 22]
  |  |  |  Branch (806:6): [Folded, False: 29.5k]
  |  |  ------------------
  |  |  807|  29.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|  29.5k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  29.5k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  29.5k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  29.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  29.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32821|  29.5k|        *capture = tup[2];
32822|  29.5k|        return 1;
32823|  29.5k|    } else if (janet_checktype(tup[2], JANET_NIL)) {
  ------------------
  |  |  806|     22|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 22]
  |  |  |  Branch (806:6): [Folded, False: 22]
  |  |  ------------------
  |  |  807|     22|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     22|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     22|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     22|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     22|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     22|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32824|      0|        *capture = tup[1];
32825|      0|        return 1;
32826|      0|    }
32827|     22|    return 0;
32828|  29.5k|}
janet.c:janetc_quasiquote:
32345|  1.02M|static JanetSlot janetc_quasiquote(JanetFopts opts, int32_t argn, const Janet *argv) {
32346|  1.02M|    if (argn != 1) {
  ------------------
  |  Branch (32346:9): [True: 3, False: 1.02M]
  ------------------
32347|      3|        janetc_cerror(opts.compiler, "expected 1 argument to quasiquote");
32348|      3|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|      3|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      3|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32349|      3|    }
32350|  1.02M|    return quasiquote(opts, argv[0], opts.compiler->recursion_guard, 0);
32351|  1.02M|}
janet.c:quasiquote:
32284|  5.53M|static JanetSlot quasiquote(JanetFopts opts, Janet x, int depth, int level) {
32285|  5.53M|    if (depth == 0) {
  ------------------
  |  Branch (32285:9): [True: 56, False: 5.53M]
  ------------------
32286|     56|        janetc_cerror(opts.compiler, "quasiquote too deeply nested");
32287|     56|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|     56|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     56|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     56|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     56|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32288|     56|    }
32289|  5.53M|    JanetSlot *slots = NULL;
32290|  5.53M|    JanetFopts subopts = opts;
32291|  5.53M|    subopts.flags &= ~JANET_FOPTS_HINT;
  ------------------
  |  | 1125|  5.53M|#define JANET_FOPTS_HINT 0x20000
  ------------------
32292|  5.53M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  5.53M|    (isnan((x).number) \
  |  |  796|  5.53M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  5.53M|        : JANET_NUMBER)
  ------------------
  |  Branch (32292:13): [True: 5.50M, False: 30.1k]
  ------------------
32293|  3.42M|        default:
  ------------------
  |  Branch (32293:9): [True: 3.42M, False: 2.10M]
  ------------------
32294|  3.42M|            return janetc_cslot(x);
32295|  2.10M|        case JANET_TUPLE: {
  ------------------
  |  Branch (32295:9): [True: 2.10M, False: 3.42M]
  ------------------
32296|  2.10M|            int32_t i, len;
32297|  2.10M|            const Janet *tup = janet_unwrap_tuple(x);
  ------------------
  |  |  858|  2.10M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
32298|  2.10M|            len = janet_tuple_length(tup);
  ------------------
  |  | 1802|  2.10M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  2.10M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
32299|  2.10M|            if (len > 1 && janet_checktype(tup[0], JANET_SYMBOL)) {
  ------------------
  |  |  806|  2.04M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 2.04M, False: 1.40k]
  |  |  |  Branch (806:6): [Folded, False: 2.04M]
  |  |  ------------------
  |  |  807|  2.04M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  2.04M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.04M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.04M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.04M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.04M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (32299:17): [True: 2.04M, False: 58.1k]
  ------------------
32300|  2.04M|                const uint8_t *head = janet_unwrap_symbol(tup[0]);
  ------------------
  |  |  864|  2.04M|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
32301|  2.04M|                if (!janet_cstrcmp(head, "unquote")) {
  ------------------
  |  Branch (32301:21): [True: 11.9k, False: 2.03M]
  ------------------
32302|  11.9k|                    if (level == 0) {
  ------------------
  |  Branch (32302:25): [True: 1.79k, False: 10.1k]
  ------------------
32303|  1.79k|                        JanetFopts subopts = janetc_fopts_default(opts.compiler);
32304|  1.79k|                        subopts.flags |= JANET_FOPTS_ACCEPT_SPLICE;
  ------------------
  |  | 1127|  1.79k|#define JANET_FOPTS_ACCEPT_SPLICE 0x80000
  ------------------
32305|  1.79k|                        return janetc_value(subopts, tup[1]);
32306|  10.1k|                    } else {
32307|  10.1k|                        level--;
32308|  10.1k|                    }
32309|  2.03M|                } else if (!janet_cstrcmp(head, "quasiquote")) {
  ------------------
  |  Branch (32309:28): [True: 1.72M, False: 311k]
  ------------------
32310|  1.72M|                    level++;
32311|  1.72M|                }
32312|  2.04M|            }
32313|  6.59M|            for (i = 0; i < len; i++)
  ------------------
  |  Branch (32313:25): [True: 4.49M, False: 2.10M]
  ------------------
32314|  4.49M|                janet_v_push(slots, quasiquote(subopts, tup[i], depth - 1, level));
  ------------------
  |  |  734|  6.59M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  4.49M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  4.49M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  2.44M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  2.44M|#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.44M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  2.44M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 2.04M, False: 2.44M]
  |  |  |  |  |  |  |  Branch (745:50): [True: 2.17M, False: 274k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  4.21M|#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.49M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  4.49M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32315|  2.10M|            return qq_slots(opts, slots, (janet_tuple_flag(tup) & JANET_TUPLE_FLAG_BRACKETCTOR)
  ------------------
  |  | 1806|  2.10M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  2.10M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                          return qq_slots(opts, slots, (janet_tuple_flag(tup) & JANET_TUPLE_FLAG_BRACKETCTOR)
  ------------------
  |  | 1798|  2.10M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (32315:42): [True: 51.9k, False: 2.05M]
  ------------------
32316|  2.10M|                            ? JOP_MAKE_BRACKET_TUPLE
32317|  2.10M|                            : JOP_MAKE_TUPLE);
32318|  2.10M|        }
32319|    652|        case JANET_ARRAY: {
  ------------------
  |  Branch (32319:9): [True: 652, False: 5.53M]
  ------------------
32320|    652|            int32_t i;
32321|    652|            JanetArray *array = janet_unwrap_array(x);
  ------------------
  |  |  860|    652|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
32322|  8.52k|            for (i = 0; i < array->count; i++)
  ------------------
  |  Branch (32322:25): [True: 7.87k, False: 652]
  ------------------
32323|  7.87k|                janet_v_push(slots, quasiquote(subopts, array->data[i], depth - 1, level));
  ------------------
  |  |  734|  8.52k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  7.87k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  7.87k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  7.35k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  7.35k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  742|  7.35k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  7.35k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 524, False: 7.35k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 1.01k, False: 6.33k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  1.54k|#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|  7.87k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  7.87k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32324|    652|            return qq_slots(opts, slots, JOP_MAKE_ARRAY);
32325|  2.10M|        }
32326|    256|        case JANET_TABLE:
  ------------------
  |  Branch (32326:9): [True: 256, False: 5.53M]
  ------------------
32327|  3.43k|        case JANET_STRUCT: {
  ------------------
  |  Branch (32327:9): [True: 3.18k, False: 5.53M]
  ------------------
32328|  3.43k|            const JanetKV *kv = NULL, *kvs = NULL;
32329|  3.43k|            int32_t len, cap = 0;
32330|  3.43k|            janet_dictionary_view(x, &kvs, &len, &cap);
32331|  8.15k|            while ((kv = janet_dictionary_next(kvs, cap, kv))) {
  ------------------
  |  Branch (32331:20): [True: 4.71k, False: 3.43k]
  ------------------
32332|  4.71k|                JanetSlot key = quasiquote(subopts, kv->key, depth - 1, level);
32333|  4.71k|                JanetSlot value =  quasiquote(subopts, kv->value, depth - 1, level);
32334|  4.71k|                key.flags &= ~JANET_SLOT_SPLICED;
  ------------------
  |  | 1023|  4.71k|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
32335|  4.71k|                value.flags &= ~JANET_SLOT_SPLICED;
  ------------------
  |  | 1023|  4.71k|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
32336|  4.71k|                janet_v_push(slots, key);
  ------------------
  |  |  734|  4.71k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  4.71k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  4.71k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  2.20k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  2.20k|#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.20k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  2.20k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 2.51k, False: 2.20k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 1.15k, False: 1.05k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  3.66k|#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.71k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  4.71k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32337|  4.71k|                janet_v_push(slots, value);
  ------------------
  |  |  734|  4.71k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  746|  4.71k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  745|  4.71k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  743|  4.71k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  4.71k|#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.71k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  741|  4.71k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (745:35): [True: 0, False: 4.71k]
  |  |  |  |  |  |  |  Branch (745:50): [True: 3.87k, False: 847]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  747|  3.87k|#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.71k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  4.71k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32338|  4.71k|            }
32339|  3.43k|            return qq_slots(opts, slots,
32340|  3.43k|                            janet_checktype(x, JANET_TABLE) ? JOP_MAKE_TABLE : JOP_MAKE_STRUCT);
  ------------------
  |  |  806|  3.43k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 256, False: 3.18k]
  |  |  |  Branch (806:6): [Folded, False: 3.43k]
  |  |  ------------------
  |  |  807|  3.43k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  3.43k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  3.43k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  3.43k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.43k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.43k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32341|    256|        }
32342|  5.53M|    }
32343|  5.53M|}
janet.c:qq_slots:
32276|  2.10M|static JanetSlot qq_slots(JanetFopts opts, JanetSlot *slots, int makeop) {
32277|  2.10M|    JanetSlot target = janetc_gettarget(opts);
32278|  2.10M|    janetc_pushslots(opts.compiler, slots);
32279|  2.10M|    janetc_freeslots(opts.compiler, slots);
32280|  2.10M|    janetc_emit_s(opts.compiler, makeop, target, 1);
32281|  2.10M|    return target;
32282|  2.10M|}
janet.c:janetc_quote:
32253|   258k|static JanetSlot janetc_quote(JanetFopts opts, int32_t argn, const Janet *argv) {
32254|   258k|    if (argn != 1) {
  ------------------
  |  Branch (32254:9): [True: 1, False: 258k]
  ------------------
32255|      1|        janetc_cerror(opts.compiler, "expected 1 argument to quote");
32256|      1|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32257|      1|    }
32258|   258k|    return janetc_cslot(argv[0]);
32259|   258k|}
janet.c:janetc_varset:
32495|  54.9k|static JanetSlot janetc_varset(JanetFopts opts, int32_t argn, const Janet *argv) {
32496|  54.9k|    if (argn != 2) {
  ------------------
  |  Branch (32496:9): [True: 0, False: 54.9k]
  ------------------
32497|      0|        janetc_cerror(opts.compiler, "expected 2 arguments to set");
32498|      0|        return janetc_cslot(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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32499|      0|    }
32500|  54.9k|    JanetFopts subopts = janetc_fopts_default(opts.compiler);
32501|  54.9k|    if (janet_checktype(argv[0], JANET_SYMBOL)) {
  ------------------
  |  |  806|  54.9k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 54.8k, False: 54]
  |  |  |  Branch (806:6): [Folded, False: 54.9k]
  |  |  ------------------
  |  |  807|  54.9k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  54.9k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  54.9k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  54.9k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  54.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  54.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32502|       |        /* Normal var - (set a 1) */
32503|  54.8k|        const uint8_t *sym = janet_unwrap_symbol(argv[0]);
  ------------------
  |  |  864|  54.8k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
32504|  54.8k|        JanetSlot dest = janetc_resolve(opts.compiler, sym);
32505|  54.8k|        if (!(dest.flags & JANET_SLOT_MUTABLE)) {
  ------------------
  |  | 1017|  54.8k|#define JANET_SLOT_MUTABLE 0x40000
  ------------------
  |  Branch (32505:13): [True: 0, False: 54.8k]
  ------------------
32506|      0|            janetc_cerror(opts.compiler, "cannot set constant");
32507|      0|            return janetc_cslot(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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32508|      0|        }
32509|  54.8k|        subopts.flags = JANET_FOPTS_HINT;
  ------------------
  |  | 1125|  54.8k|#define JANET_FOPTS_HINT 0x20000
  ------------------
32510|  54.8k|        subopts.hint = dest;
32511|  54.8k|        JanetSlot ret = janetc_value(subopts, argv[1]);
32512|  54.8k|        janetc_copy(opts.compiler, dest, ret);
32513|  54.8k|        return ret;
32514|  54.8k|    } else if (janet_checktype(argv[0], JANET_TUPLE)) {
  ------------------
  |  |  806|     54|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 54, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 54]
  |  |  ------------------
  |  |  807|     54|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     54|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     54|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     54|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     54|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     54|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32515|       |        /* Set a field (setf behavior) - (set (tab :key) 2) */
32516|     54|        const Janet *tup = janet_unwrap_tuple(argv[0]);
  ------------------
  |  |  858|     54|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
32517|       |        /* Tuple must have 2 elements */
32518|     54|        if (janet_tuple_length(tup) != 2) {
  ------------------
  |  | 1802|     54|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|     54|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (32518:13): [True: 0, False: 54]
  ------------------
32519|      0|            janetc_cerror(opts.compiler, "expected 2 element tuple for l-value to set");
32520|      0|            return janetc_cslot(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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32521|      0|        }
32522|     54|        JanetSlot ds = janetc_value(subopts, tup[0]);
32523|     54|        JanetSlot key = janetc_value(subopts, tup[1]);
32524|       |        /* Can't be tail position because we will emit a PUT instruction afterwards */
32525|       |        /* Also can't drop either */
32526|     54|        opts.flags &= ~(JANET_FOPTS_TAIL | JANET_FOPTS_DROP);
  ------------------
  |  | 1124|     54|#define JANET_FOPTS_TAIL 0x10000
  ------------------
                      opts.flags &= ~(JANET_FOPTS_TAIL | JANET_FOPTS_DROP);
  ------------------
  |  | 1126|     54|#define JANET_FOPTS_DROP 0x40000
  ------------------
32527|     54|        JanetSlot rvalue = janetc_value(opts, argv[1]);
32528|       |        /* Emit the PUT instruction */
32529|     54|        janetc_emit_sss(opts.compiler, JOP_PUT, ds, key, rvalue, 0);
32530|     54|        return rvalue;
32531|     54|    } else {
32532|       |        /* Error */
32533|      0|        janetc_cerror(opts.compiler, "expected symbol or tuple for l-value to set");
32534|      0|        return janetc_cslot(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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32535|      0|    }
32536|  54.9k|}
janet.c:janetc_splice:
32261|   139k|static JanetSlot janetc_splice(JanetFopts opts, int32_t argn, const Janet *argv) {
32262|   139k|    JanetSlot ret;
32263|   139k|    if (!(opts.flags & JANET_FOPTS_ACCEPT_SPLICE)) {
  ------------------
  |  | 1127|   139k|#define JANET_FOPTS_ACCEPT_SPLICE 0x80000
  ------------------
  |  Branch (32263:9): [True: 30, False: 139k]
  ------------------
32264|     30|        janetc_cerror(opts.compiler, "splice can only be used in function parameters and data constructors, it has no effect here");
32265|     30|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|     30|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     30|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     30|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     30|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32266|     30|    }
32267|   139k|    if (argn != 1) {
  ------------------
  |  Branch (32267:9): [True: 0, False: 139k]
  ------------------
32268|      0|        janetc_cerror(opts.compiler, "expected 1 argument to splice");
32269|      0|        return janetc_cslot(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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32270|      0|    }
32271|   139k|    ret = janetc_value(opts, argv[0]);
32272|   139k|    ret.flags |= JANET_SLOT_SPLICED;
  ------------------
  |  | 1023|   139k|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
32273|   139k|    return ret;
32274|   139k|}
janet.c:janetc_unquote:
32353|     60|static JanetSlot janetc_unquote(JanetFopts opts, int32_t argn, const Janet *argv) {
32354|     60|    (void) argn;
32355|     60|    (void) argv;
32356|     60|    janetc_cerror(opts.compiler, "cannot use unquote here");
32357|     60|    return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|     60|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     60|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     60|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     60|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32358|     60|}
janet.c:janetc_upscope:
32972|      4|static JanetSlot janetc_upscope(JanetFopts opts, int32_t argn, const Janet *argv) {
32973|      4|    int32_t i;
32974|      4|    JanetSlot ret = janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|      4|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      4|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      4|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32975|      4|    JanetCompiler *c = opts.compiler;
32976|      4|    JanetFopts subopts = janetc_fopts_default(c);
32977|     20|    for (i = 0; i < argn; i++) {
  ------------------
  |  Branch (32977:17): [True: 16, False: 4]
  ------------------
32978|     16|        if (i != argn - 1) {
  ------------------
  |  Branch (32978:13): [True: 12, False: 4]
  ------------------
32979|     12|            subopts.flags = JANET_FOPTS_DROP;
  ------------------
  |  | 1126|     12|#define JANET_FOPTS_DROP 0x40000
  ------------------
32980|     12|        } else {
32981|      4|            subopts = opts;
32982|      4|            subopts.flags &= ~JANET_FOPTS_ACCEPT_SPLICE;
  ------------------
  |  | 1127|      4|#define JANET_FOPTS_ACCEPT_SPLICE 0x80000
  ------------------
32983|      4|        }
32984|     16|        ret = janetc_value(subopts, argv[i]);
32985|     16|        if (i != argn - 1) {
  ------------------
  |  Branch (32985:13): [True: 12, False: 4]
  ------------------
32986|     12|            janetc_freeslot(c, ret);
32987|     12|        }
32988|     16|    }
32989|      4|    return ret;
32990|      4|}
janet.c:janetc_var:
32719|  30.2k|static JanetSlot janetc_var(JanetFopts opts, int32_t argn, const Janet *argv) {
32720|  30.2k|    JanetCompiler *c = opts.compiler;
32721|  30.2k|    JanetTable *attr_table = handleattr(c, "var", argn, argv);
32722|  30.2k|    if (c->result.status == JANET_COMPILE_ERROR) {
  ------------------
  |  Branch (32722:9): [True: 21, False: 30.2k]
  ------------------
32723|     21|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|     21|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     21|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     21|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     21|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32724|     21|    }
32725|  30.2k|    check_metadata_lint(c, attr_table);
32726|  30.2k|    SlotHeadPair *into = NULL;
32727|  30.2k|    into = dohead_destructure(c, into, opts, argv[0], argv[argn - 1]);
32728|  30.2k|    if (c->result.status == JANET_COMPILE_ERROR) {
  ------------------
  |  Branch (32728:9): [True: 6, False: 30.1k]
  ------------------
32729|      6|        janet_v_free(into);
  ------------------
  |  |  733|      6|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|      6|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 6, False: 0]
  |  |  ------------------
  ------------------
32730|      6|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|      6|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      6|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      6|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      6|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32731|      6|    }
32732|  30.1k|    JanetSlot ret = janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|  30.1k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  30.1k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  30.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  30.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32733|  60.3k|    for (int32_t i = 0; i < janet_v_count(into); i++) {
  ------------------
  |  |  736|  60.3k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  60.3k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  60.3k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 60.3k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (32733:25): [True: 30.1k, False: 30.1k]
  ------------------
32734|  30.1k|        destructure(c, into[i].lhs, into[i].rhs, varleaf, attr_table);
32735|  30.1k|        ret = into[i].rhs;
32736|  30.1k|    }
32737|       |    janet_v_free(into);
  ------------------
  |  |  733|  30.1k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  741|  30.1k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (733:34): [True: 30.1k, False: 0]
  |  |  ------------------
  ------------------
32738|  30.1k|    return ret;
32739|  30.2k|}
janet.c:varleaf:
32675|  38.1k|    JanetTable *reftab) {
32676|  38.1k|    if (c->scope->flags & JANET_SCOPE_TOP) {
  ------------------
  |  | 1037|  38.1k|#define JANET_SCOPE_TOP 4
  ------------------
  |  Branch (32676:9): [True: 3.41k, False: 34.7k]
  ------------------
32677|       |        /* Global var, generate var */
32678|  3.41k|        JanetSlot refslot;
32679|  3.41k|        JanetTable *entry = janet_table_clone(reftab);
32680|       |
32681|  3.41k|        int is_redef = c->is_redef;
32682|       |
32683|  3.41k|        JanetArray *ref;
32684|  3.41k|        JanetBinding old_binding;
32685|  3.41k|        if (is_redef && (old_binding = janet_resolve_ext(c->env, sym),
  ------------------
  |  Branch (32685:13): [True: 0, False: 3.41k]
  |  Branch (32685:25): [True: 0, False: 0]
  ------------------
32686|      0|                         old_binding.type == JANET_BINDING_VAR)) {
32687|      0|            ref = janet_unwrap_array(old_binding.value);
  ------------------
  |  |  860|      0|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
32688|  3.41k|        } else {
32689|  3.41k|            ref = janet_array(1);
32690|  3.41k|            janet_array_push(ref, janet_wrap_nil());
  ------------------
  |  |  831|  3.41k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  3.41k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.41k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.41k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32691|  3.41k|        }
32692|       |
32693|  3.41k|        janet_table_put(entry, janet_ckeywordv("ref"), janet_wrap_array(ref));
  ------------------
  |  | 1843|  3.41k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  3.41k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  3.41k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  3.41k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  3.41k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      janet_table_put(entry, janet_ckeywordv("ref"), janet_wrap_array(ref));
  ------------------
  |  |  845|  3.41k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  3.41k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.41k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.41k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32694|  3.41k|        janet_table_put(entry, janet_ckeywordv("source-map"),
  ------------------
  |  | 1843|  3.41k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  3.41k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  3.41k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  3.41k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  3.41k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32695|  3.41k|                        janet_wrap_tuple(janetc_make_sourcemap(c)));
  ------------------
  |  |  843|  3.41k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  3.41k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.41k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.41k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32696|  3.41k|        janet_table_put(c->env, janet_wrap_symbol(sym), janet_wrap_table(entry));
  ------------------
  |  |  849|  3.41k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|  3.41k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.41k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.41k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      janet_table_put(c->env, janet_wrap_symbol(sym), janet_wrap_table(entry));
  ------------------
  |  |  846|  3.41k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|  3.41k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.41k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.41k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32697|  3.41k|        refslot = janetc_cslot(janet_wrap_array(ref));
  ------------------
  |  |  845|  3.41k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  3.41k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.41k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.41k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32698|  3.41k|        janetc_emit_ssu(c, JOP_PUT_INDEX, refslot, s, 0, 0);
32699|  3.41k|        return 1;
32700|  34.7k|    } else {
32701|  34.7k|        int no_unused = reftab && reftab->count && janet_truthy(janet_table_get_keyword(reftab, "unused"));
  ------------------
  |  |  818|  34.7k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|     92|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 46]
  |  |  |  |  ------------------
  |  |  |  |  807|     92|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|     92|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|     46|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|     46|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     46|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     46|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 0, False: 46]
  |  |  ------------------
  |  |  819|  34.7k|     (!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 (32701:25): [True: 34.7k, False: 0]
  |  Branch (32701:35): [True: 46, False: 34.6k]
  ------------------
32702|  34.7k|        int no_shadow = reftab && reftab->count && janet_truthy(janet_table_get_keyword(reftab, "shadow"));
  ------------------
  |  |  818|  34.7k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|     92|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 46]
  |  |  |  |  ------------------
  |  |  |  |  807|     92|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|     92|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|     46|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|     46|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     46|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     46|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 0, False: 46]
  |  |  ------------------
  |  |  819|  34.7k|     (!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 (32702:25): [True: 34.7k, False: 0]
  |  Branch (32702:35): [True: 46, False: 34.6k]
  ------------------
32703|  34.7k|        uint32_t def_flags = 0;
32704|  34.7k|        if (no_unused) def_flags |= JANET_DEFFLAG_NO_UNUSED;
  ------------------
  |  | 1160|      0|#define JANET_DEFFLAG_NO_UNUSED 2
  ------------------
  |  Branch (32704:13): [True: 0, False: 34.7k]
  ------------------
32705|  34.7k|        if (no_shadow) def_flags |= JANET_DEFFLAG_NO_SHADOWCHECK;
  ------------------
  |  | 1159|      0|#define JANET_DEFFLAG_NO_SHADOWCHECK 1
  ------------------
  |  Branch (32705:13): [True: 0, False: 34.7k]
  ------------------
32706|  34.7k|        return namelocal(c, sym, JANET_SLOT_MUTABLE, s, def_flags);
  ------------------
  |  | 1017|  34.7k|#define JANET_SLOT_MUTABLE 0x40000
  ------------------
32707|  34.7k|    }
32708|  38.1k|}
janet.c:janetc_while:
33066|  51.9k|static JanetSlot janetc_while(JanetFopts opts, int32_t argn, const Janet *argv) {
33067|  51.9k|    JanetCompiler *c = opts.compiler;
33068|  51.9k|    JanetSlot cond;
33069|  51.9k|    JanetFopts subopts = janetc_fopts_default(c);
33070|  51.9k|    JanetScope tempscope;
33071|  51.9k|    int32_t labelwt, labeld, labeljt, labelc, i;
33072|  51.9k|    int infinite = 0;
33073|  51.9k|    int is_nil_form = 0;
33074|  51.9k|    int is_notnil_form = 0;
33075|  51.9k|    uint8_t ifjmp = JOP_JUMP_IF;
33076|  51.9k|    uint8_t ifnjmp = JOP_JUMP_IF_NOT;
33077|       |
33078|  51.9k|    if (argn < 1) {
  ------------------
  |  Branch (33078:9): [True: 0, False: 51.9k]
  ------------------
33079|      0|        janetc_cerror(c, "expected at least 1 argument to while");
33080|      0|        return janetc_cslot(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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33081|      0|    }
33082|       |
33083|  51.9k|    labelwt = janet_v_count(c->buffer);
  ------------------
  |  |  736|  51.9k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  51.6k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  51.6k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 51.6k, False: 336]
  |  |  ------------------
  ------------------
33084|       |
33085|  51.9k|    janetc_scope(&tempscope, c, JANET_SCOPE_WHILE, "while");
  ------------------
  |  | 1040|  51.9k|#define JANET_SCOPE_WHILE 32
  ------------------
33086|       |
33087|       |    /* Check for `(= nil _)` or `(not= nil _)` in condition, and if so, use the
33088|       |     * jmpnl or jmpnn instructions. This let's us implement `(each ...)`
33089|       |     * more efficiently. */
33090|  51.9k|    Janet condform = argv[0];
33091|  51.9k|    if (janetc_check_nil_form(condform, &condform, JANET_FUN_EQ)) {
  ------------------
  |  |  994|  51.9k|#define JANET_FUN_EQ 24
  ------------------
  |  Branch (33091:9): [True: 0, False: 51.9k]
  ------------------
33092|      0|        is_nil_form = 1;
33093|      0|        ifjmp = JOP_JUMP_IF_NIL;
33094|      0|        ifnjmp = JOP_JUMP_IF_NOT_NIL;
33095|      0|    }
33096|  51.9k|    if (janetc_check_nil_form(condform, &condform, JANET_FUN_NEQ)) {
  ------------------
  |  |  995|  51.9k|#define JANET_FUN_NEQ 25
  ------------------
  |  Branch (33096:9): [True: 29.5k, False: 22.4k]
  ------------------
33097|  29.5k|        is_notnil_form = 1;
33098|  29.5k|        ifjmp = JOP_JUMP_IF_NOT_NIL;
33099|  29.5k|        ifnjmp = JOP_JUMP_IF_NIL;
33100|  29.5k|    }
33101|       |
33102|       |    /* Compile condition */
33103|  51.9k|    cond = janetc_value(subopts, condform);
33104|       |
33105|       |    /* Check for constant condition */
33106|  51.9k|    if (cond.flags & JANET_SLOT_CONSTANT) {
  ------------------
  |  | 1015|  51.9k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (33106:9): [True: 17.4k, False: 34.4k]
  ------------------
33107|       |        /* Loop never executes */
33108|  17.4k|        int never_executes = is_nil_form
  ------------------
  |  Branch (33108:30): [True: 0, False: 17.4k]
  ------------------
33109|  17.4k|                             ? !janet_checktype(cond.constant, 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33110|  17.4k|                             : is_notnil_form
  ------------------
  |  Branch (33110:32): [True: 0, False: 17.4k]
  ------------------
33111|  17.4k|                             ? janet_checktype(cond.constant, 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33112|  17.4k|                             : !janet_truthy(cond.constant);
  ------------------
  |  |  818|  17.4k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|  34.9k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 17.4k]
  |  |  |  |  ------------------
  |  |  |  |  807|  34.9k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|  34.9k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  17.4k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  17.4k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  17.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  17.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 16.2k, False: 1.27k]
  |  |  ------------------
  |  |  819|  17.4k|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|  32.4k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 16.2k]
  |  |  |  |  ------------------
  |  |  |  |  807|  32.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|  32.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  16.2k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  16.2k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  16.2k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  16.2k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 12.6k, False: 3.50k]
  |  |  |  Branch (819:47): [True: 3.50k, False: 2]
  |  |  ------------------
  ------------------
33113|  17.4k|        if (never_executes) {
  ------------------
  |  Branch (33113:13): [True: 1.27k, False: 16.1k]
  ------------------
33114|  1.27k|            janetc_popscope(c);
33115|  1.27k|            return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|  1.27k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.27k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.27k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.27k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33116|  1.27k|        }
33117|       |        /* Infinite loop */
33118|  16.1k|        infinite = 1;
33119|  16.1k|    }
33120|       |
33121|       |    /* Infinite loop does not need to check condition */
33122|  50.6k|    labelc = infinite
  ------------------
  |  Branch (33122:14): [True: 16.1k, False: 34.4k]
  ------------------
33123|  50.6k|             ? 0
33124|  50.6k|             : janetc_emit_si(c, ifnjmp, cond, 0, 0);
33125|       |
33126|       |    /* Compile body */
33127|   400k|    for (i = 1; i < argn; i++) {
  ------------------
  |  Branch (33127:17): [True: 349k, False: 50.6k]
  ------------------
33128|   349k|        subopts.flags = JANET_FOPTS_DROP;
  ------------------
  |  | 1126|   349k|#define JANET_FOPTS_DROP 0x40000
  ------------------
33129|   349k|        janetc_freeslot(c, janetc_value(subopts, argv[i]));
33130|   349k|    }
33131|       |
33132|       |    /* Check if closure created in while scope. If so,
33133|       |     * recompile in a function scope. */
33134|  50.6k|    if (tempscope.flags & JANET_SCOPE_CLOSURE) {
  ------------------
  |  | 1039|  50.6k|#define JANET_SCOPE_CLOSURE 16
  ------------------
  |  Branch (33134:9): [True: 34.9k, False: 15.7k]
  ------------------
33135|  34.9k|        subopts = janetc_fopts_default(c);
33136|  34.9k|        tempscope.flags |= JANET_SCOPE_UNUSED;
  ------------------
  |  | 1038|  34.9k|#define JANET_SCOPE_UNUSED 8
  ------------------
33137|  34.9k|        janetc_popscope(c);
33138|  34.9k|        if (c->buffer) janet_v__cnt(c->buffer) = labelwt;
  ------------------
  |  |  743|  34.9k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  ------------------
  |  |  |  |  741|  34.9k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
  |  Branch (33138:13): [True: 34.9k, False: 1]
  ------------------
33139|  34.9k|        if (c->mapbuffer) janet_v__cnt(c->mapbuffer) = labelwt;
  ------------------
  |  |  743|  34.9k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  ------------------
  |  |  |  |  741|  34.9k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
  |  Branch (33139:13): [True: 34.9k, False: 1]
  ------------------
33140|       |
33141|  34.9k|        janetc_scope(&tempscope, c, JANET_SCOPE_FUNCTION, "while-iife");
  ------------------
  |  | 1035|  34.9k|#define JANET_SCOPE_FUNCTION 1
  ------------------
33142|       |
33143|       |        /* Recompile in the function scope */
33144|  34.9k|        cond = janetc_value(subopts, condform);
33145|  34.9k|        if (!(cond.flags & JANET_SLOT_CONSTANT)) {
  ------------------
  |  | 1015|  34.9k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (33145:13): [True: 29.4k, False: 5.53k]
  ------------------
33146|       |            /* If not an infinite loop, return nil when condition false */
33147|  29.4k|            janetc_emit_si(c, ifjmp, cond, 2, 0);
33148|  29.4k|            janetc_emit(c, JOP_RETURN_NIL);
33149|  29.4k|        }
33150|   345k|        for (i = 1; i < argn; i++) {
  ------------------
  |  Branch (33150:21): [True: 310k, False: 34.9k]
  ------------------
33151|   310k|            subopts.flags = JANET_FOPTS_DROP;
  ------------------
  |  | 1126|   310k|#define JANET_FOPTS_DROP 0x40000
  ------------------
33152|   310k|            janetc_freeslot(c, janetc_value(subopts, argv[i]));
33153|   310k|        }
33154|       |        /* But now add tail recursion */
33155|  34.9k|        int32_t tempself = janetc_regalloc_temp(&tempscope.ra, JANETC_REGTEMP_0);
33156|  34.9k|        janetc_emit(c, JOP_LOAD_SELF | ((uint32_t) tempself << 8));
33157|  34.9k|        janetc_emit(c, JOP_TAILCALL | ((uint32_t) tempself << 8));
33158|  34.9k|        janetc_regalloc_freetemp(&c->scope->ra, tempself, JANETC_REGTEMP_0);
33159|       |        /* Compile function */
33160|  34.9k|        JanetFuncDef *def = janetc_pop_funcdef(c, janet_cstring("while"));
33161|  34.9k|        janet_def_addflags(def);
33162|  34.9k|        int32_t defindex = janetc_addfuncdef(c, def);
33163|  34.9k|        if (defindex > 255) {
  ------------------
  |  Branch (33163:13): [True: 1, False: 34.9k]
  ------------------
33164|      1|            janetc_error(c, janet_cstring("too many closures"));
33165|      1|            return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33166|      1|        }
33167|       |        /* Do basic optimization */
33168|  34.9k|        if (!(c->scope->flags & JANET_SCOPE_UNUSED)) {
  ------------------
  |  | 1038|  34.9k|#define JANET_SCOPE_UNUSED 8
  ------------------
  |  Branch (33168:13): [True: 34.9k, False: 0]
  ------------------
33169|  34.9k|            janet_bytecode_optimize(def, c->optimize);
33170|  34.9k|        }
33171|       |        /* And then load the closure and call it. */
33172|  34.9k|        int32_t cloreg = janetc_regalloc_temp(&c->scope->ra, JANETC_REGTEMP_0);
33173|  34.9k|        janetc_emit(c, JOP_CLOSURE | ((uint32_t) cloreg << 8) | ((uint32_t) defindex << 16));
33174|  34.9k|        janetc_emit(c, JOP_CALL | ((uint32_t) cloreg << 8) | ((uint32_t) cloreg << 16));
33175|  34.9k|        janetc_regalloc_freetemp(&c->scope->ra, cloreg, JANETC_REGTEMP_0);
33176|  34.9k|        c->scope->flags |= JANET_SCOPE_CLOSURE;
  ------------------
  |  | 1039|  34.9k|#define JANET_SCOPE_CLOSURE 16
  ------------------
33177|  34.9k|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|  34.9k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  34.9k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  34.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  34.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33178|  34.9k|    }
33179|       |
33180|       |    /* Compile jump to :whiletop */
33181|  15.7k|    labeljt = janet_v_count(c->buffer);
  ------------------
  |  |  736|  15.7k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  15.6k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  15.6k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 15.6k, False: 35]
  |  |  ------------------
  ------------------
33182|  15.7k|    janetc_emit(c, JOP_JUMP);
33183|       |
33184|       |    /* Calculate jumps */
33185|  15.7k|    labeld = janet_v_count(c->buffer);
  ------------------
  |  |  736|  15.7k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  743|  15.7k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  15.7k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (736:34): [True: 15.7k, False: 0]
  |  |  ------------------
  ------------------
33186|  15.7k|    if (!infinite) {
  ------------------
  |  Branch (33186:9): [True: 4.82k, False: 10.8k]
  ------------------
33187|  4.82k|        check_16bit_jump(c, labelc, labeld);
33188|  4.82k|        c->buffer[labelc] |= (uint32_t)(labeld - labelc) << 16;
33189|  4.82k|    }
33190|       |
33191|  15.7k|    check_24bit_jump(c, labeljt, labelwt);
33192|  15.7k|    c->buffer[labeljt] |= (uint32_t)(labelwt - labeljt) << 8;
33193|       |
33194|       |    /* Calculate breaks */
33195|  3.52M|    for (int32_t i = labelwt; i < labeld; i++) {
  ------------------
  |  Branch (33195:31): [True: 3.51M, False: 15.7k]
  ------------------
33196|  3.51M|        if (c->buffer[i] == (0x80 | JOP_JUMP)) {
  ------------------
  |  Branch (33196:13): [True: 34, False: 3.51M]
  ------------------
33197|     34|            check_24bit_jump(c, i, labeld);
33198|     34|            c->buffer[i] = JOP_JUMP | ((uint32_t)(labeld - i) << 8);
33199|     34|        }
33200|  3.51M|    }
33201|       |
33202|       |    /* Pop scope and return nil slot */
33203|  15.7k|    janetc_popscope(c);
33204|       |
33205|  15.7k|    return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|  15.7k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  15.7k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  15.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  15.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33206|  50.6k|}
janet.c:findsetup:
33850|  29.6k|static void findsetup(int32_t argc, Janet *argv, struct kmp_state *s, int32_t extra) {
33851|  29.6k|    janet_arity(argc, 2, 3 + extra);
33852|  29.6k|    JanetByteView pat = janet_getbytes(argv, 0);
33853|  29.6k|    JanetByteView text = janet_getbytes(argv, 1);
33854|  29.6k|    int32_t start = 0;
33855|  29.6k|    if (argc >= 3) {
  ------------------
  |  Branch (33855:9): [True: 274, False: 29.3k]
  ------------------
33856|    274|        start = janet_getinteger(argv, 2);
33857|    274|        if (start < 0) janet_panic("expected non-negative start index");
  ------------------
  |  Branch (33857:13): [True: 6, False: 268]
  ------------------
33858|    274|    }
33859|  29.6k|    kmp_init(s, text.bytes, text.len, pat.bytes, pat.len);
33860|  29.6k|    s->i = start;
33861|  29.6k|}
janet.c:kmp_init:
33653|  5.67M|    const uint8_t *pat, int32_t patlen) {
33654|  5.67M|    if (patlen == 0) {
  ------------------
  |  Branch (33654:9): [True: 0, False: 5.67M]
  ------------------
33655|      0|        janet_panic("expected non-empty pattern");
33656|      0|    }
33657|  5.67M|    int32_t *lookup = janet_calloc(patlen, sizeof(int32_t));
  ------------------
  |  | 2412|  5.67M|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
33658|  5.67M|    if (!lookup) {
  ------------------
  |  Branch (33658:9): [True: 0, False: 5.67M]
  ------------------
33659|      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]
  |  |  ------------------
  ------------------
33660|      0|    }
33661|  5.67M|    s->lookup = lookup;
33662|  5.67M|    s->i = 0;
33663|  5.67M|    s->j = 0;
33664|  5.67M|    s->text = text;
33665|  5.67M|    s->pat = pat;
33666|  5.67M|    s->textlen = textlen;
33667|  5.67M|    s->patlen = patlen;
33668|       |    /* Init state machine */
33669|  5.67M|    {
33670|  5.67M|        int32_t i, j;
33671|  6.19M|        for (i = 1, j = 0; i < patlen; i++) {
  ------------------
  |  Branch (33671:28): [True: 520k, False: 5.67M]
  ------------------
33672|   569k|            while (j && pat[j] != pat[i]) j = lookup[j - 1];
  ------------------
  |  Branch (33672:20): [True: 85.0k, False: 484k]
  |  Branch (33672:25): [True: 48.9k, False: 36.1k]
  ------------------
33673|   520k|            if (pat[j] == pat[i]) j++;
  ------------------
  |  Branch (33673:17): [True: 48.9k, False: 471k]
  ------------------
33674|   520k|            lookup[i] = j;
33675|   520k|        }
33676|  5.67M|    }
33677|  5.67M|}
janet.c:kmp_next:
33688|  5.68M|static int32_t kmp_next(struct kmp_state *state) {
33689|  5.68M|    int32_t i = state->i;
33690|  5.68M|    int32_t j = state->j;
33691|  5.68M|    int32_t textlen = state->textlen;
33692|  5.68M|    int32_t patlen = state->patlen;
33693|  5.68M|    const uint8_t *text = state->text;
33694|  5.68M|    const uint8_t *pat = state->pat;
33695|  5.68M|    int32_t *lookup = state->lookup;
33696|  44.9M|    while (i < textlen) {
  ------------------
  |  Branch (33696:12): [True: 39.3M, False: 5.66M]
  ------------------
33697|  39.3M|        if (text[i] == pat[j]) {
  ------------------
  |  Branch (33697:13): [True: 41.9k, False: 39.2M]
  ------------------
33698|  41.9k|            if (j == patlen - 1) {
  ------------------
  |  Branch (33698:17): [True: 14.6k, False: 27.2k]
  ------------------
33699|  14.6k|                state->i = i + 1;
33700|  14.6k|                state->j = lookup[j];
33701|  14.6k|                return i - j;
33702|  27.2k|            } else {
33703|  27.2k|                i++;
33704|  27.2k|                j++;
33705|  27.2k|            }
33706|  39.2M|        } else {
33707|  39.2M|            if (j > 0) {
  ------------------
  |  Branch (33707:17): [True: 4.30k, False: 39.2M]
  ------------------
33708|  4.30k|                j = lookup[j - 1];
33709|  39.2M|            } else {
33710|  39.2M|                i++;
33711|  39.2M|            }
33712|  39.2M|        }
33713|  39.3M|    }
33714|  5.66M|    return -1;
33715|  5.68M|}
janet.c:kmp_deinit:
33679|  5.67M|static void kmp_deinit(struct kmp_state *state) {
33680|  5.67M|    janet_free(state->lookup);
  ------------------
  |  | 2415|  5.67M|#define janet_free(X) free((X))
  ------------------
33681|  5.67M|}
janet.c:replacesetup:
33927|  5.64M|static void replacesetup(int32_t argc, Janet *argv, struct replace_state *s) {
33928|  5.64M|    janet_arity(argc, 3, 4);
33929|       |    /* A callback may resize a buffer argument, so search a copy instead */
33930|  5.64M|    if (janet_checktype(argv[1], JANET_FUNCTION) || janet_checktype(argv[1], JANET_CFUNCTION)) {
  ------------------
  |  |  806|  11.2M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 7, False: 5.64M]
  |  |  |  Branch (806:6): [Folded, False: 5.64M]
  |  |  ------------------
  |  |  807|  11.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|  11.2M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  5.64M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  5.64M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.64M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.64M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (janet_checktype(argv[1], JANET_FUNCTION) || janet_checktype(argv[1], JANET_CFUNCTION)) {
  ------------------
  |  |  806|  5.64M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 5.64M]
  |  |  |  Branch (806:6): [Folded, False: 5.64M]
  |  |  ------------------
  |  |  807|  5.64M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.64M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  5.64M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  5.64M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.64M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.64M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33931|     15|        for (int32_t i = 0; i < 3; i += 2) {
  ------------------
  |  Branch (33931:29): [True: 10, False: 5]
  ------------------
33932|     10|            if (janet_checktype(argv[i], JANET_BUFFER)) {
  ------------------
  |  |  806|     10|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 10]
  |  |  |  Branch (806:6): [Folded, False: 10]
  |  |  ------------------
  |  |  807|     10|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     10|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     10|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     10|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     10|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     10|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33933|      0|                JanetBuffer *buffer = janet_unwrap_buffer(argv[i]);
  ------------------
  |  |  862|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
33934|      0|                argv[i] = janet_stringv(buffer->data, buffer->count);
  ------------------
  |  | 1827|      0|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33935|      0|            }
33936|     10|        }
33937|      5|    }
33938|  5.64M|    JanetByteView pat = janet_getbytes(argv, 0);
33939|  5.64M|    Janet subst = argv[1];
33940|  5.64M|    JanetByteView text = janet_getbytes(argv, 2);
33941|  5.64M|    int32_t start = 0;
33942|  5.64M|    if (argc == 4) {
  ------------------
  |  Branch (33942:9): [True: 1.18k, False: 5.64M]
  ------------------
33943|  1.18k|        start = janet_getinteger(argv, 3);
33944|  1.18k|        if (start < 0) janet_panic("expected non-negative start index");
  ------------------
  |  Branch (33944:13): [True: 1, False: 1.17k]
  ------------------
33945|  1.18k|    }
33946|  5.64M|    kmp_init(&s->kmp, text.bytes, text.len, pat.bytes, pat.len);
33947|  5.64M|    s->kmp.i = start;
33948|  5.64M|    s->subst = subst;
33949|  5.64M|}
janet.c:kmp_seti:
33683|  6.51k|static void kmp_seti(struct kmp_state *state, int32_t i) {
33684|  6.51k|    state->i = i;
33685|  6.51k|    state->j = 0;
33686|  6.51k|}
janet.c:trim_help_args:
34164|  4.59k|static void trim_help_args(int32_t argc, Janet *argv, JanetByteView *str, JanetByteView *set) {
34165|  4.59k|    janet_arity(argc, 1, 2);
34166|  4.59k|    *str = janet_getbytes(argv, 0);
34167|  4.59k|    if (argc >= 2) {
  ------------------
  |  Branch (34167:9): [True: 3.33k, False: 1.26k]
  ------------------
34168|  3.33k|        *set = janet_getbytes(argv, 1);
34169|  3.33k|    } else {
34170|  1.26k|        set->bytes = (const uint8_t *)(" \t\r\n\v\f");
34171|  1.26k|        set->len = 6;
34172|  1.26k|    }
34173|  4.59k|}
janet.c:trim_help_leftedge:
34150|  1.17k|static int32_t trim_help_leftedge(JanetByteView str, JanetByteView set) {
34151|  2.32k|    for (int32_t i = 0; i < str.len; i++)
  ------------------
  |  Branch (34151:25): [True: 2.06k, False: 262]
  ------------------
34152|  2.06k|        if (!trim_help_checkset(set, str.bytes[i]))
  ------------------
  |  Branch (34152:13): [True: 915, False: 1.15k]
  ------------------
34153|    915|            return i;
34154|    262|    return str.len;
34155|  1.17k|}
janet.c:trim_help_checkset:
34143|  11.4k|static int trim_help_checkset(JanetByteView set, uint8_t x) {
34144|   101k|    for (int32_t j = 0; j < set.len; j++)
  ------------------
  |  Branch (34144:25): [True: 97.5k, False: 3.98k]
  ------------------
34145|  97.5k|        if (set.bytes[j] == x)
  ------------------
  |  Branch (34145:13): [True: 7.49k, False: 90.0k]
  ------------------
34146|  7.49k|            return 1;
34147|  3.98k|    return 0;
34148|  11.4k|}
janet.c:trim_help_rightedge:
34157|  3.48k|static int32_t trim_help_rightedge(JanetByteView str, JanetByteView set) {
34158|  9.82k|    for (int32_t i = str.len - 1; i >= 0; i--)
  ------------------
  |  Branch (34158:35): [True: 9.40k, False: 417]
  ------------------
34159|  9.40k|        if (!trim_help_checkset(set, str.bytes[i]))
  ------------------
  |  Branch (34159:13): [True: 3.06k, False: 6.33k]
  ------------------
34160|  3.06k|            return i + 1;
34161|    417|    return 0;
34162|  3.48k|}
janet.c:bignat_zero:
34323|  1.23M|static void bignat_zero(struct BigNat *x) {
34324|  1.23M|    x->first_digit = 0;
34325|  1.23M|    x->n = 0;
34326|  1.23M|    x->cap = 0;
34327|       |    x->digits = NULL;
34328|  1.23M|}
janet.c:bignat_muladd:
34355|   421k|static void bignat_muladd(struct BigNat *mant, uint32_t factor, uint32_t term) {
34356|   421k|    int32_t i;
34357|   421k|    uint64_t carry = ((uint64_t) mant->first_digit) * factor + term;
34358|   421k|    mant->first_digit = carry % BIGNAT_BASE;
  ------------------
  |  |34312|   421k|#define BIGNAT_BASE 0x80000000U
  ------------------
34359|   421k|    carry /= BIGNAT_BASE;
  ------------------
  |  |34312|   421k|#define BIGNAT_BASE 0x80000000U
  ------------------
34360|  4.31M|    for (i = 0; i < mant->n; i++) {
  ------------------
  |  Branch (34360:17): [True: 3.88M, False: 421k]
  ------------------
34361|  3.88M|        carry += ((uint64_t) mant->digits[i]) * factor;
34362|  3.88M|        mant->digits[i] = carry % BIGNAT_BASE;
  ------------------
  |  |34312|  3.88M|#define BIGNAT_BASE 0x80000000U
  ------------------
34363|  3.88M|        carry /= BIGNAT_BASE;
  ------------------
  |  |34312|  3.88M|#define BIGNAT_BASE 0x80000000U
  ------------------
34364|  3.88M|    }
34365|   421k|    if (carry) bignat_append(mant, (uint32_t) carry);
  ------------------
  |  Branch (34365:9): [True: 19.6k, False: 402k]
  ------------------
34366|   421k|}
janet.c:bignat_append:
34348|  19.6k|static void bignat_append(struct BigNat *mant, uint32_t dig) {
34349|  19.6k|    bignat_extra(mant, 1)[0] = dig;
34350|  19.6k|}
janet.c:bignat_extra:
34331|  21.9k|static uint32_t *bignat_extra(struct BigNat *mant, int32_t n) {
34332|  21.9k|    int32_t oldn = mant->n;
34333|  21.9k|    int32_t newn = oldn + n;
34334|  21.9k|    if (mant->cap < newn) {
  ------------------
  |  Branch (34334:9): [True: 11.9k, False: 10.0k]
  ------------------
34335|  11.9k|        int32_t newcap = 2 * newn;
34336|  11.9k|        uint32_t *mem = janet_realloc(mant->digits, (size_t) newcap * sizeof(uint32_t));
  ------------------
  |  | 2409|  11.9k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
34337|  11.9k|        if (NULL == mem) {
  ------------------
  |  Branch (34337:13): [True: 0, False: 11.9k]
  ------------------
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|  11.9k|        mant->cap = newcap;
34341|  11.9k|        mant->digits = mem;
34342|  11.9k|    }
34343|  21.9k|    mant->n = newn;
34344|  21.9k|    return mant->digits + oldn;
34345|  21.9k|}
janet.c:convert:
34451|   667k|    int32_t exponent) {
34452|       |
34453|   667k|    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|   667k|    int64_t mant_exp2_approx = mant->n * 32 + 16;
34458|   667k|    int64_t exp_exp2_approx = (int64_t)(floor(log2(base) * exponent));
34459|   667k|    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|   667k|    if (mant->n == 0 && mant->first_digit == 0)
  ------------------
  |  Branch (34463:9): [True: 662k, False: 4.95k]
  |  Branch (34463:25): [True: 480k, False: 181k]
  ------------------
34464|   480k|        return negative ? -0.0 : 0.0;
  ------------------
  |  Branch (34464:16): [True: 139, False: 480k]
  ------------------
34465|   186k|    if (exp2_approx > 1176)
  ------------------
  |  Branch (34465:9): [True: 348, False: 186k]
  ------------------
34466|    348|        return negative ? -INFINITY : INFINITY;
  ------------------
  |  Branch (34466:16): [True: 30, False: 318]
  ------------------
34467|   186k|    if (exp2_approx < -1175)
  ------------------
  |  Branch (34467:9): [True: 232, False: 186k]
  ------------------
34468|    232|        return negative ? -0.0 : 0.0;
  ------------------
  |  Branch (34468:16): [True: 215, False: 17]
  ------------------
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|   197k|    for (; exponent > 3; exponent -= 4) bignat_muladd(mant, base * base * base * base, 0);
  ------------------
  |  Branch (34474:12): [True: 11.7k, False: 186k]
  ------------------
34475|   187k|    for (; exponent > 1; exponent -= 2) bignat_muladd(mant, base * base, 0);
  ------------------
  |  Branch (34475:12): [True: 1.79k, False: 186k]
  ------------------
34476|   187k|    for (; exponent > 0; exponent -= 1) bignat_muladd(mant, base, 0);
  ------------------
  |  Branch (34476:12): [True: 1.74k, False: 186k]
  ------------------
34477|       |
34478|       |    /* Negative exponents are tricky - we don't want to loose bits
34479|       |     * from integer division, so we need to premultiply. */
34480|   186k|    if (exponent < 0) {
  ------------------
  |  Branch (34480:9): [True: 2.27k, False: 183k]
  ------------------
34481|  2.27k|        int32_t shamt = 5 - exponent / 4;
34482|  2.27k|        bignat_lshift_n(mant, shamt);
34483|  2.27k|        exponent2 -= shamt * BIGNAT_NBIT;
  ------------------
  |  |34311|  2.27k|#define BIGNAT_NBIT 31
  ------------------
34484|  8.94k|        for (; exponent < -3; exponent += 4) bignat_div(mant, base * base * base * base);
  ------------------
  |  Branch (34484:16): [True: 6.67k, False: 2.27k]
  ------------------
34485|  3.60k|        for (; exponent < -1; exponent += 2) bignat_div(mant, base * base);
  ------------------
  |  Branch (34485:16): [True: 1.33k, False: 2.27k]
  ------------------
34486|  3.25k|        for (; exponent <  0; exponent += 1) bignat_div(mant, base);
  ------------------
  |  Branch (34486:16): [True: 987, False: 2.27k]
  ------------------
34487|  2.27k|    }
34488|       |
34489|   186k|    return negative
  ------------------
  |  Branch (34489:12): [True: 5.63k, False: 180k]
  ------------------
34490|   186k|           ? -bignat_extract(mant, exponent2)
34491|   186k|           : bignat_extract(mant, exponent2);
34492|   186k|}
janet.c:bignat_lshift_n:
34387|  2.27k|static void bignat_lshift_n(struct BigNat *mant, int n) {
34388|  2.27k|    if (!n) return;
  ------------------
  |  Branch (34388:9): [True: 0, False: 2.27k]
  ------------------
34389|  2.27k|    int32_t oldn = mant->n;
34390|  2.27k|    bignat_extra(mant, n);
34391|  2.27k|    memmove(mant->digits + n, mant->digits, sizeof(uint32_t) * oldn);
34392|  2.27k|    memset(mant->digits, 0, sizeof(uint32_t) * (n - 1));
34393|  2.27k|    mant->digits[n - 1] = mant->first_digit;
34394|  2.27k|    mant->first_digit = 0;
34395|  2.27k|}
janet.c:bignat_div:
34369|  8.99k|static void bignat_div(struct BigNat *mant, uint32_t divisor) {
34370|  8.99k|    int32_t i;
34371|  8.99k|    uint32_t quotient, remainder;
34372|  8.99k|    uint64_t dividend;
34373|  8.99k|    remainder = 0, quotient = 0;
34374|  4.77M|    for (i = mant->n - 1; i >= 0; i--) {
  ------------------
  |  Branch (34374:27): [True: 4.76M, False: 8.99k]
  ------------------
34375|  4.76M|        dividend = ((uint64_t)remainder * BIGNAT_BASE) + mant->digits[i];
  ------------------
  |  |34312|  4.76M|#define BIGNAT_BASE 0x80000000U
  ------------------
34376|  4.76M|        if (i < mant->n - 1) mant->digits[i + 1] = quotient;
  ------------------
  |  Branch (34376:13): [True: 4.76M, False: 8.99k]
  ------------------
34377|  4.76M|        quotient = (uint32_t)(dividend / divisor);
34378|  4.76M|        remainder = (uint32_t)(dividend % divisor);
34379|  4.76M|        mant->digits[i] = remainder;
34380|  4.76M|    }
34381|  8.99k|    dividend = ((uint64_t)remainder * BIGNAT_BASE) + mant->first_digit;
  ------------------
  |  |34312|  8.99k|#define BIGNAT_BASE 0x80000000U
  ------------------
34382|  8.99k|    if (mant->n && mant->digits[mant->n - 1] == 0) mant->n--;
  ------------------
  |  Branch (34382:9): [True: 8.99k, False: 0]
  |  Branch (34382:20): [True: 3.84k, False: 5.14k]
  ------------------
34383|  8.99k|    mant->first_digit = (uint32_t)(dividend / divisor);
34384|  8.99k|}
janet.c:bignat_extract:
34412|   186k|static double bignat_extract(struct BigNat *mant, int32_t exponent2) {
34413|   186k|    uint64_t top53;
34414|   186k|    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|   186k|    if (n) {
  ------------------
  |  Branch (34417:9): [True: 7.79k, False: 178k]
  ------------------
34418|       |        /* Two or more digits */
34419|  7.79k|        uint64_t d1 = mant->digits[n - 1]; /* MSD (non-zero) */
34420|  7.79k|        uint64_t d2 = (n == 1) ? mant->first_digit : mant->digits[n - 2];
  ------------------
  |  Branch (34420:23): [True: 3.52k, False: 4.26k]
  ------------------
34421|  7.79k|        uint64_t d3 = (n > 2) ? mant->digits[n - 3] : (n == 2) ? mant->first_digit : 0;
  ------------------
  |  Branch (34421:23): [True: 3.40k, False: 4.38k]
  |  Branch (34421:55): [True: 860, False: 3.52k]
  ------------------
34422|  7.79k|        int lz = clz((uint32_t) d1);
  ------------------
  |  |34398|  7.79k|#define clz(x) __builtin_clz(x)
  ------------------
34423|  7.79k|        int nbits = 32 - lz;
34424|       |        /* First get 54 bits */
34425|  7.79k|        top53 = (d2 << (54 - BIGNAT_NBIT)) + (d3 >> (2 * BIGNAT_NBIT - 54));
  ------------------
  |  |34311|  7.79k|#define BIGNAT_NBIT 31
  ------------------
                      top53 = (d2 << (54 - BIGNAT_NBIT)) + (d3 >> (2 * BIGNAT_NBIT - 54));
  ------------------
  |  |34311|  7.79k|#define BIGNAT_NBIT 31
  ------------------
34426|  7.79k|        top53 >>= nbits;
34427|  7.79k|        top53 |= (d1 << (54 - nbits));
34428|       |        /* Rounding based on lowest bit of 54 */
34429|  7.79k|        if (top53 & 1) top53++;
  ------------------
  |  Branch (34429:13): [True: 2.23k, False: 5.55k]
  ------------------
34430|  7.79k|        top53 >>= 1;
34431|  7.79k|        if (top53 > 0x1FffffFFFFffffUL) {
  ------------------
  |  Branch (34431:13): [True: 164, False: 7.62k]
  ------------------
34432|    164|            top53 >>= 1;
34433|    164|            exponent2++;
34434|    164|        }
34435|       |        /* Correct exponent - to correct for large right shift to mantissa. */
34436|  7.79k|        exponent2 += (nbits - 53) + BIGNAT_NBIT * n;
  ------------------
  |  |34311|  7.79k|#define BIGNAT_NBIT 31
  ------------------
34437|   178k|    } else {
34438|       |        /* One digit */
34439|   178k|        top53 = mant->first_digit;
34440|   178k|    }
34441|   186k|    return ldexp((double)top53, exponent2);
34442|   186k|}
janet.c:scan_uint64:
34652|  36.5k|    int *neg) {
34653|  36.5k|    const uint8_t *end = str + len;
34654|  36.5k|    int seenadigit = 0;
34655|  36.5k|    int base = 10;
34656|  36.5k|    *neg = 0;
34657|  36.5k|    *out = 0;
34658|  36.5k|    uint64_t accum = 0;
34659|  36.5k|    if (len > JANET_NUMBER_LENGTH_RIDICULOUS) return 0;
  ------------------
  |  |34296|  36.5k|#define JANET_NUMBER_LENGTH_RIDICULOUS 0xFFFF
  ------------------
  |  Branch (34659:9): [True: 1, False: 36.5k]
  ------------------
34660|       |    /* Get sign */
34661|  36.5k|    if (str >= end) return 0;
  ------------------
  |  Branch (34661:9): [True: 4, False: 36.5k]
  ------------------
34662|  36.5k|    if (*str == '-') {
  ------------------
  |  Branch (34662:9): [True: 20.9k, False: 15.6k]
  ------------------
34663|  20.9k|        *neg = 1;
34664|  20.9k|        str++;
34665|  20.9k|    } else if (*str == '+') {
  ------------------
  |  Branch (34665:16): [True: 920, False: 14.7k]
  ------------------
34666|    920|        str++;
34667|    920|    }
34668|       |    /* Check for leading 0x or digit digit r */
34669|  36.5k|    if (str + 1 < end && str[0] == '0' && str[1] == 'x') {
  ------------------
  |  Branch (34669:9): [True: 26.9k, False: 9.62k]
  |  Branch (34669:26): [True: 2.11k, False: 24.7k]
  |  Branch (34669:43): [True: 8, False: 2.10k]
  ------------------
34670|      8|        base = 16;
34671|      8|        str += 2;
34672|  36.5k|    } else if (str + 1 < end  &&
  ------------------
  |  Branch (34672:16): [True: 26.9k, False: 9.62k]
  ------------------
34673|  26.9k|               str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (34673:16): [True: 25.8k, False: 1.09k]
  |  Branch (34673:33): [True: 25.2k, False: 535]
  ------------------
34674|  25.2k|               str[1] == 'r') {
  ------------------
  |  Branch (34674:16): [True: 10, False: 25.2k]
  ------------------
34675|     10|        base = str[0] - '0';
34676|     10|        str += 2;
34677|  36.5k|    } else if (str + 2 < end  &&
  ------------------
  |  Branch (34677:16): [True: 25.5k, False: 10.9k]
  ------------------
34678|  25.5k|               str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (34678:16): [True: 24.8k, False: 633]
  |  Branch (34678:33): [True: 24.4k, False: 482]
  ------------------
34679|  24.4k|               str[1] >= '0' && str[1] <= '9' &&
  ------------------
  |  Branch (34679:16): [True: 24.2k, False: 151]
  |  Branch (34679:33): [True: 12.6k, False: 11.6k]
  ------------------
34680|  12.6k|               str[2] == 'r') {
  ------------------
  |  Branch (34680:16): [True: 89, False: 12.5k]
  ------------------
34681|     89|        base = 10 * (str[0] - '0') + (str[1] - '0');
34682|     89|        if (base < 2 || base > 36) return 0;
  ------------------
  |  Branch (34682:13): [True: 0, False: 89]
  |  Branch (34682:25): [True: 3, False: 86]
  ------------------
34683|     86|        str += 3;
34684|     86|    }
34685|       |
34686|       |    /* Skip leading zeros */
34687|  46.7k|    while (str < end && *str == '0') {
  ------------------
  |  Branch (34687:12): [True: 39.8k, False: 6.89k]
  |  Branch (34687:25): [True: 10.2k, False: 29.6k]
  ------------------
34688|  10.2k|        seenadigit = 1;
34689|  10.2k|        str++;
34690|  10.2k|    }
34691|       |    /* Parse significant digits */
34692|   197k|    while (str < end) {
  ------------------
  |  Branch (34692:12): [True: 180k, False: 17.0k]
  ------------------
34693|   180k|        if (*str == '_') {
  ------------------
  |  Branch (34693:13): [True: 12.2k, False: 168k]
  ------------------
34694|  12.2k|            if (!seenadigit) return 0;
  ------------------
  |  Branch (34694:17): [True: 259, False: 12.0k]
  ------------------
34695|   168k|        } else {
34696|   168k|            int digit = digit_lookup[*str & 0x7F];
34697|   168k|            if (*str > 127 || digit >= base) return 0;
  ------------------
  |  Branch (34697:17): [True: 635, False: 167k]
  |  Branch (34697:31): [True: 18.1k, False: 149k]
  ------------------
34698|   149k|            if (accum > (UINT64_MAX - digit) / base) return 0;
  ------------------
  |  Branch (34698:17): [True: 432, False: 149k]
  ------------------
34699|   149k|            accum = accum * base + digit;
34700|   149k|            seenadigit = 1;
34701|   149k|        }
34702|   161k|        str++;
34703|   161k|    }
34704|       |
34705|  17.0k|    if (!seenadigit) return 0;
  ------------------
  |  Branch (34705:9): [True: 842, False: 16.2k]
  ------------------
34706|  16.2k|    *out = accum;
34707|  16.2k|    return 1;
34708|  17.0k|}
janet.c:janet_symcache_findmem:
35180|   265M|    int *success) {
35181|   265M|    uint32_t bounds[4];
35182|   265M|    uint32_t i, j, index;
35183|   265M|    const uint8_t **firstEmpty = NULL;
35184|       |
35185|       |    /* We will search two ranges - index to the end,
35186|       |     * and 0 to the index. */
35187|   265M|    index = (uint32_t)hash & (janet_vm.cache_capacity - 1);
35188|   265M|    bounds[0] = index;
35189|   265M|    bounds[1] = janet_vm.cache_capacity;
35190|   265M|    bounds[2] = 0;
35191|   265M|    bounds[3] = index;
35192|   265M|    for (j = 0; j < 4; j += 2)
  ------------------
  |  Branch (35192:17): [True: 265M, False: 18.4E]
  ------------------
35193|   324M|        for (i = bounds[j]; i < bounds[j + 1]; ++i) {
  ------------------
  |  Branch (35193:29): [True: 324M, False: 26.6k]
  ------------------
35194|   324M|            const uint8_t *test = janet_vm.cache[i];
35195|       |            /* Check empty spots */
35196|   324M|            if (NULL == test) {
  ------------------
  |  Branch (35196:17): [True: 46.7M, False: 277M]
  ------------------
35197|  46.7M|                if (NULL == firstEmpty)
  ------------------
  |  Branch (35197:21): [True: 46.5M, False: 238k]
  ------------------
35198|  46.5M|                    firstEmpty = janet_vm.cache + i;
35199|  46.7M|                goto notfound;
35200|  46.7M|            }
35201|       |            /* Check for marked deleted */
35202|   277M|            if (JANET_SYMCACHE_DELETED == test) {
  ------------------
  |  Branch (35202:17): [True: 572k, False: 277M]
  ------------------
35203|   572k|                if (firstEmpty == NULL)
  ------------------
  |  Branch (35203:21): [True: 348k, False: 223k]
  ------------------
35204|   348k|                    firstEmpty = janet_vm.cache + i;
35205|   572k|                continue;
35206|   572k|            }
35207|   277M|            if (janet_string_equalconst(test, str, len, hash)) {
  ------------------
  |  Branch (35207:17): [True: 218M, False: 58.8M]
  ------------------
35208|       |                /* Replace first deleted */
35209|   218M|                *success = 1;
35210|   218M|                if (firstEmpty != NULL) {
  ------------------
  |  Branch (35210:21): [True: 110k, False: 218M]
  ------------------
35211|   110k|                    *firstEmpty = test;
35212|   110k|                    janet_vm.cache[i] = JANET_SYMCACHE_DELETED;
35213|   110k|                    return firstEmpty;
35214|   110k|                }
35215|   218M|                return janet_vm.cache + i;
35216|   218M|            }
35217|   277M|        }
35218|  18.4E|notfound:
35219|  46.7M|    *success = 0;
35220|  46.7M|    janet_assert(firstEmpty != NULL, "symcache failed to get memory");
  ------------------
  |  |  389|  46.7M|#define janet_assert(c, m) do { \
  |  |  390|  46.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: 46.7M]
  |  |  ------------------
  |  |  391|  46.7M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 46.7M]
  |  |  ------------------
  ------------------
35221|  46.7M|    return firstEmpty;
35222|  46.7M|}
janet.c:janet_symcache_put:
35258|  23.9M|static void janet_symcache_put(const uint8_t *x, const uint8_t **bucket) {
35259|  23.9M|    if ((janet_vm.cache_count + janet_vm.cache_deleted) * 2 > janet_vm.cache_capacity) {
  ------------------
  |  Branch (35259:9): [True: 21.5k, False: 23.9M]
  ------------------
35260|  21.5k|        int status;
35261|  21.5k|        janet_cache_resize(janet_tablen((2 * janet_vm.cache_count + 1)));
35262|  21.5k|        bucket = janet_symcache_find(x, &status);
  ------------------
  |  |35225|  21.5k|    janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1813|  21.5k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  21.5k|#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|  21.5k|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  21.5k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35263|  21.5k|    }
35264|       |    /* Add x to the cache */
35265|  23.9M|    janet_vm.cache_count++;
35266|  23.9M|    *bucket = x;
35267|  23.9M|}
janet.c:janet_cache_resize:
35228|  21.5k|static void janet_cache_resize(uint32_t newCapacity) {
35229|  21.5k|    uint32_t i, oldCapacity;
35230|  21.5k|    const uint8_t **oldCache = janet_vm.cache;
35231|  21.5k|    const uint8_t **newCache = janet_calloc(1, (size_t) newCapacity * sizeof(const uint8_t *));
  ------------------
  |  | 2412|  21.5k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
35232|  21.5k|    if (newCache == NULL) {
  ------------------
  |  Branch (35232:9): [True: 0, False: 21.5k]
  ------------------
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|  21.5k|    oldCapacity = janet_vm.cache_capacity;
35236|  21.5k|    janet_vm.cache = newCache;
35237|  21.5k|    janet_vm.cache_capacity = newCapacity;
35238|  21.5k|    janet_vm.cache_deleted = 0;
35239|       |    /* Add all of the old cache entries back */
35240|  48.7M|    for (i = 0; i < oldCapacity; ++i) {
  ------------------
  |  Branch (35240:17): [True: 48.7M, False: 21.5k]
  ------------------
35241|  48.7M|        int status;
35242|  48.7M|        const uint8_t **bucket;
35243|  48.7M|        const uint8_t *x = oldCache[i];
35244|  48.7M|        if (x != NULL && x != JANET_SYMCACHE_DELETED) {
  ------------------
  |  Branch (35244:13): [True: 24.1M, False: 24.5M]
  |  Branch (35244:26): [True: 22.7M, False: 1.40M]
  ------------------
35245|  22.7M|            bucket = janet_symcache_find(x, &status);
  ------------------
  |  |35225|  22.7M|    janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1813|  22.7M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  22.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|  22.7M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1812|  22.7M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35246|  22.7M|            if (status || bucket == NULL) {
  ------------------
  |  Branch (35246:17): [True: 18.4E, False: 22.7M]
  |  Branch (35246:27): [True: 10, False: 22.7M]
  ------------------
35247|       |                /* there was a problem with the algorithm. */
35248|      0|                break;
35249|      0|            }
35250|  22.7M|            *bucket = x;
35251|  22.7M|        }
35252|  48.7M|    }
35253|       |    /* Free the old cache */
35254|  21.5k|    janet_free((void *)oldCache);
  ------------------
  |  | 2415|  21.5k|#define janet_free(X) free((X))
  ------------------
35255|  21.5k|}
janet.c:inc_gensym:
35304|  1.26M|static void inc_gensym(void) {
35305|  1.28M|    for (int i = sizeof(janet_vm.gensym_counter) - 2; i; i--) {
  ------------------
  |  Branch (35305:55): [True: 1.28M, False: 0]
  ------------------
35306|  1.28M|        if (janet_vm.gensym_counter[i] == '9') {
  ------------------
  |  Branch (35306:13): [True: 21.2k, False: 1.26M]
  ------------------
35307|  21.2k|            janet_vm.gensym_counter[i] = 'a';
35308|  21.2k|            break;
35309|  1.26M|        } else if (janet_vm.gensym_counter[i] == 'z') {
  ------------------
  |  Branch (35309:20): [True: 20.2k, False: 1.24M]
  ------------------
35310|  20.2k|            janet_vm.gensym_counter[i] = 'A';
35311|  20.2k|            break;
35312|  1.24M|        } else if (janet_vm.gensym_counter[i] == 'Z') {
  ------------------
  |  Branch (35312:20): [True: 18.6k, False: 1.22M]
  ------------------
35313|  18.6k|            janet_vm.gensym_counter[i] = '0';
35314|  1.22M|        } else {
35315|  1.22M|            janet_vm.gensym_counter[i]++;
35316|  1.22M|            break;
35317|  1.22M|        }
35318|  1.28M|    }
35319|  1.26M|}
janet.c:janet_table_init_impl:
35399|  13.1M|static JanetTable *janet_table_init_impl(JanetTable *table, int32_t capacity, int stackalloc) {
35400|  13.1M|    JanetKV *data;
35401|  13.1M|    capacity = janet_tablen(capacity);
35402|  13.1M|    if (stackalloc) table->gc.flags = JANET_TABLE_FLAG_STACK;
  ------------------
  |  |35385|   154k|#define JANET_TABLE_FLAG_STACK 0x10000
  ------------------
  |  Branch (35402:9): [True: 154k, False: 13.0M]
  ------------------
35403|  13.1M|    if (capacity) {
  ------------------
  |  Branch (35403:9): [True: 13.1M, False: 20]
  ------------------
35404|  13.1M|        if (stackalloc) {
  ------------------
  |  Branch (35404:13): [True: 154k, False: 13.0M]
  ------------------
35405|   154k|            data = janet_memalloc_empty_local(capacity);
35406|  13.0M|        } else {
35407|  13.0M|            data = (JanetKV *) janet_memalloc_empty(capacity);
35408|  13.0M|            if (NULL == data) {
  ------------------
  |  Branch (35408:17): [True: 0, False: 13.0M]
  ------------------
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|  13.0M|        }
35412|  13.1M|        table->data = data;
35413|  13.1M|        table->capacity = capacity;
35414|  13.1M|    } else {
35415|     20|        table->data = NULL;
35416|     20|        table->capacity = 0;
35417|     20|    }
35418|  13.1M|    table->count = 0;
35419|  13.1M|    table->deleted = 0;
35420|       |    table->proto = NULL;
35421|  13.1M|    return table;
35422|  13.1M|}
janet.c:janet_memalloc_empty_local:
35387|   803k|static void *janet_memalloc_empty_local(int32_t count) {
35388|   803k|    int32_t i;
35389|   803k|    void *mem = janet_smalloc((size_t) count * sizeof(JanetKV));
35390|   803k|    JanetKV *mmem = (JanetKV *)mem;
35391|  61.0M|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (35391:17): [True: 60.2M, False: 803k]
  ------------------
35392|  60.2M|        JanetKV *kv = mmem + i;
35393|  60.2M|        kv->key = janet_wrap_nil();
  ------------------
  |  |  831|  60.2M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  60.2M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  60.2M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  60.2M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35394|  60.2M|        kv->value = janet_wrap_nil();
  ------------------
  |  |  831|  60.2M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  60.2M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  60.2M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  60.2M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35395|  60.2M|    }
35396|   803k|    return mem;
35397|   803k|}
janet.c:janet_table_rehash:
35472|  9.74M|static void janet_table_rehash(JanetTable *t, int32_t size) {
35473|  9.74M|    JanetKV *olddata = t->data;
35474|  9.74M|    JanetKV *newdata;
35475|  9.74M|    int islocal = t->gc.flags & JANET_TABLE_FLAG_STACK;
  ------------------
  |  |35385|  9.74M|#define JANET_TABLE_FLAG_STACK 0x10000
  ------------------
35476|  9.74M|    if (islocal) {
  ------------------
  |  Branch (35476:9): [True: 648k, False: 9.09M]
  ------------------
35477|   648k|        newdata = (JanetKV *) janet_memalloc_empty_local(size);
35478|  9.09M|    } else {
35479|  9.09M|        newdata = (JanetKV *) janet_memalloc_empty(size);
35480|  9.09M|        if (NULL == newdata) {
  ------------------
  |  Branch (35480:13): [True: 0, False: 9.09M]
  ------------------
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|  9.09M|    }
35484|  9.74M|    int32_t oldcapacity = t->capacity;
35485|  9.74M|    t->data = newdata;
35486|  9.74M|    t->capacity = size;
35487|  9.74M|    t->deleted = 0;
35488|   131M|    for (int32_t i = 0; i < oldcapacity; i++) {
  ------------------
  |  Branch (35488:25): [True: 122M, False: 9.74M]
  ------------------
35489|   122M|        JanetKV *kv = olddata + i;
35490|   122M|        if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|   122M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 122M]
  |  |  ------------------
  |  |  807|   122M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   122M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   122M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   122M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   122M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   122M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35490:13): [True: 58.5M, False: 63.6M]
  ------------------
35491|  58.5M|            JanetKV *newkv = janet_table_find(t, kv->key);
35492|  58.5M|            *newkv = *kv;
35493|  58.5M|        }
35494|   122M|    }
35495|  9.74M|    if (islocal) {
  ------------------
  |  Branch (35495:9): [True: 648k, False: 9.09M]
  ------------------
35496|   648k|        janet_sfree(olddata);
35497|  9.09M|    } else {
35498|  9.09M|        janet_free(olddata);
  ------------------
  |  | 2415|  9.09M|#define janet_free(X) free((X))
  ------------------
35499|  9.09M|    }
35500|  9.74M|}
janet.c:janet_table_mergekv:
35626|     90|static void janet_table_mergekv(JanetTable *table, const JanetKV *kvs, int32_t cap) {
35627|     90|    int32_t i;
35628|    328|    for (i = 0; i < cap; i++) {
  ------------------
  |  Branch (35628:17): [True: 238, False: 90]
  ------------------
35629|    238|        const JanetKV *kv = kvs + i;
35630|    238|        if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|    238|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 238]
  |  |  ------------------
  |  |  807|    238|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    238|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    238|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    238|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    238|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    238|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35630:13): [True: 44, False: 194]
  ------------------
35631|     44|            janet_table_put(table, kv->key, kv->value);
35632|     44|        }
35633|    238|    }
35634|     90|}
janet.c:janet_registry_sort:
36523|  1.53k|static void janet_registry_sort(void) {
36524|   540k|    for (size_t i = 1; i < janet_vm.registry_count; i++) {
  ------------------
  |  Branch (36524:24): [True: 538k, False: 1.53k]
  ------------------
36525|   538k|        JanetCFunRegistry reg = janet_vm.registry[i];
36526|   538k|        size_t j;
36527|  37.9M|        for (j = i; j > 0; j--) {
  ------------------
  |  Branch (36527:21): [True: 37.9M, False: 4.60k]
  ------------------
36528|  37.9M|            if ((void *)(janet_vm.registry[j - 1].cfun) < (void *)(reg.cfun)) break;
  ------------------
  |  Branch (36528:17): [True: 534k, False: 37.4M]
  ------------------
36529|  37.4M|            janet_vm.registry[j] = janet_vm.registry[j - 1];
36530|  37.4M|        }
36531|   538k|        janet_vm.registry[j] = reg;
36532|   538k|    }
36533|  1.53k|    janet_vm.registry_dirty = 0;
36534|  1.53k|}
janet.c:janet_check_pointer_align:
36624|  3.01M|static void janet_check_pointer_align(void *p) {
36625|  3.01M|    (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|  3.01M|}
janet.c:to_byte_view:
36799|    141|static JanetByteView to_byte_view(Janet value) {
36800|    141|    JanetByteView result;
36801|    141|    if (!janet_bytes_view(value, &result.bytes, &result.len)) {
  ------------------
  |  Branch (36801:9): [True: 138, False: 3]
  ------------------
36802|    138|        JanetString str = janet_to_string(value);
36803|    138|        result.bytes = str;
36804|       |        result.len = janet_string_length(str);
  ------------------
  |  | 1813|    138|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|    138|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
36805|    138|    }
36806|    141|    return result;
36807|    141|}
janet.c:memoize_byte_view:
36788|  47.1k|static JanetByteView memoize_byte_view(Janet *value) {
36789|  47.1k|    JanetByteView result;
36790|  47.1k|    if (!janet_bytes_view(*value, &result.bytes, &result.len)) {
  ------------------
  |  Branch (36790:9): [True: 965, False: 46.2k]
  ------------------
36791|    965|        JanetString str = janet_to_string(*value);
36792|    965|        *value = janet_wrap_string(str);
  ------------------
  |  |  848|    965|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|    965|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    965|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    965|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36793|    965|        result.bytes = str;
36794|       |        result.len = janet_string_length(str);
  ------------------
  |  | 1813|    965|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1812|    965|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
36795|    965|    }
36796|  47.1k|    return result;
36797|  47.1k|}
janet.c:janet_equals_containers:
37534|  3.90M|static int janet_equals_containers(Janet x, Janet y) {
37535|  3.90M|    janet_vm.traversal = janet_vm.traversal_base;
37536|  5.28M|    do {
37537|  5.28M|        if (janet_type(x) != janet_type(y)) return 0;
  ------------------
  |  |  795|  5.28M|    (isnan((x).number) \
  |  |  796|  5.28M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  5.28M|        : JANET_NUMBER)
  ------------------
                      if (janet_type(x) != janet_type(y)) return 0;
  ------------------
  |  |  795|  5.28M|    (isnan((x).number) \
  |  |  796|  5.28M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  5.28M|        : JANET_NUMBER)
  ------------------
  |  Branch (37537:13): [True: 5.13M, False: 151k]
  |  Branch (37537:13): [True: 385, False: 5.28M]
  |  Branch (37537:30): [True: 5.13M, False: 151k]
  ------------------
37538|  5.28M|        switch (janet_type(x)) {
  ------------------
  |  |  795|  5.28M|    (isnan((x).number) \
  |  |  796|  5.28M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  5.28M|        : JANET_NUMBER)
  ------------------
  |  Branch (37538:17): [True: 5.13M, False: 151k]
  ------------------
37539|  1.20M|            default:
  ------------------
  |  Branch (37539:13): [True: 1.20M, False: 4.07M]
  ------------------
37540|  1.20M|                if (!janet_equals_leaf(x, y)) return 0;
  ------------------
  |  Branch (37540:21): [True: 7.54k, False: 1.20M]
  ------------------
37541|  1.20M|                break;
37542|  4.05M|            case JANET_TUPLE: {
  ------------------
  |  Branch (37542:13): [True: 4.05M, False: 1.23M]
  ------------------
37543|  4.05M|                const Janet *t1 = janet_unwrap_tuple(x);
  ------------------
  |  |  858|  4.05M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
37544|  4.05M|                const Janet *t2 = janet_unwrap_tuple(y);
  ------------------
  |  |  858|  4.05M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
37545|  4.05M|                if (t1 == t2) break;
  ------------------
  |  Branch (37545:21): [True: 942, False: 4.05M]
  ------------------
37546|  4.05M|                if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(t1) ^ janet_tuple_flag(t2))) return 0;
  ------------------
  |  | 1798|  4.05M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
                              if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(t1) ^ janet_tuple_flag(t2))) return 0;
  ------------------
  |  | 1806|  4.05M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  4.05M|#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|  4.05M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|  4.05M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37546:21): [True: 4.69k, False: 4.04M]
  ------------------
37547|  4.04M|                if (janet_tuple_hash(t1) != janet_tuple_hash(t2)) return 0;
  ------------------
  |  | 1803|  4.04M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1800|  4.04M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_tuple_hash(t1) != janet_tuple_hash(t2)) return 0;
  ------------------
  |  | 1803|  4.04M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1800|  4.04M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37547:21): [True: 3.22M, False: 818k]
  ------------------
37548|   818k|                if (janet_tuple_length(t1) != janet_tuple_length(t2)) return 0;
  ------------------
  |  | 1802|   818k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|   818k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_tuple_length(t1) != janet_tuple_length(t2)) return 0;
  ------------------
  |  | 1802|   818k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|   818k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37548:21): [True: 0, False: 818k]
  ------------------
37549|   818k|                push_traversal_node(janet_tuple_head(t1), janet_tuple_head(t2), 0);
  ------------------
  |  | 1800|   818k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
                              push_traversal_node(janet_tuple_head(t1), janet_tuple_head(t2), 0);
  ------------------
  |  | 1800|   818k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
37550|   818k|                break;
37551|   818k|            }
37552|  24.5k|            case JANET_STRUCT: {
  ------------------
  |  Branch (37552:13): [True: 24.5k, False: 5.26M]
  ------------------
37553|  24.5k|                const JanetKV *s1 = janet_unwrap_struct(x);
  ------------------
  |  |  857|  24.5k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
37554|  24.5k|                const JanetKV *s2 = janet_unwrap_struct(y);
  ------------------
  |  |  857|  24.5k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
37555|  24.5k|                if (s1 == s2) break;
  ------------------
  |  Branch (37555:21): [True: 178, False: 24.3k]
  ------------------
37556|  24.3k|                if (janet_struct_hash(s1) != janet_struct_hash(s2)) return 0;
  ------------------
  |  | 1850|  24.3k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  24.3k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_struct_hash(s1) != janet_struct_hash(s2)) return 0;
  ------------------
  |  | 1850|  24.3k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1846|  24.3k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37556:21): [True: 21.0k, False: 3.30k]
  ------------------
37557|  3.30k|                if (janet_struct_length(s1) != janet_struct_length(s2)) return 0;
  ------------------
  |  | 1848|  3.30k|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|  3.30k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_struct_length(s1) != janet_struct_length(s2)) return 0;
  ------------------
  |  | 1848|  3.30k|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1846|  3.30k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37557:21): [True: 0, False: 3.30k]
  ------------------
37558|  3.30k|                if (janet_struct_proto(s1) && !janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1851|  6.60k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|  3.30k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1851:31): [True: 222, False: 3.07k]
  |  |  ------------------
  ------------------
                              if (janet_struct_proto(s1) && !janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1851|    222|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|    222|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (37558:47): [True: 0, False: 222]
  ------------------
37559|  3.30k|                if (!janet_struct_proto(s1) && janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1851|  6.60k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|  3.30k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                              if (!janet_struct_proto(s1) && janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1851|  3.07k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1846|  3.07k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1851:31): [True: 0, False: 3.07k]
  |  |  ------------------
  ------------------
  |  Branch (37559:21): [True: 3.07k, False: 222]
  ------------------
37560|  3.30k|                push_traversal_node(janet_struct_head(s1), janet_struct_head(s2), 0);
  ------------------
  |  | 1846|  3.30k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
                              push_traversal_node(janet_struct_head(s1), janet_struct_head(s2), 0);
  ------------------
  |  | 1846|  3.30k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
37561|  3.30k|                break;
37562|  3.30k|            }
37563|  5.28M|        }
37564|  5.28M|    } while (!traversal_next(&x, &y));
  ------------------
  |  Branch (37564:14): [True: 1.37M, False: 648k]
  ------------------
37565|   648k|    return 1;
37566|  3.90M|}
janet.c:janet_equals_leaf:
37521|   513M|static int janet_equals_leaf(Janet x, Janet y) {
37522|   513M|    switch (janet_type(x)) {
  ------------------
  |  |  795|   513M|    (isnan((x).number) \
  |  |  796|   513M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   513M|        : JANET_NUMBER)
  ------------------
  |  Branch (37522:13): [True: 501M, False: 12.5M]
  ------------------
37523|  12.5M|        case JANET_NUMBER:
  ------------------
  |  Branch (37523:9): [True: 12.5M, False: 501M]
  ------------------
37524|  12.5M|            return janet_unwrap_number(x) == janet_unwrap_number(y);
  ------------------
  |  |  839|  12.5M|#define janet_unwrap_number(x) ((x).number)
  ------------------
                          return janet_unwrap_number(x) == janet_unwrap_number(y);
  ------------------
  |  |  839|  12.5M|#define janet_unwrap_number(x) ((x).number)
  ------------------
37525|  1.41M|        case JANET_STRING:
  ------------------
  |  Branch (37525:9): [True: 1.41M, False: 512M]
  ------------------
37526|  1.41M|            return janet_string_equal(janet_unwrap_string(x), janet_unwrap_string(y));
  ------------------
  |  |  863|  1.41M|#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.41M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
37527|   777k|        case JANET_ABSTRACT:
  ------------------
  |  Branch (37527:9): [True: 777k, False: 512M]
  ------------------
37528|   777k|            return !janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y));
  ------------------
  |  |  866|   777k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
                          return !janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y));
  ------------------
  |  |  866|   777k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
37529|   498M|        default:
  ------------------
  |  Branch (37529:9): [True: 498M, False: 14.7M]
  ------------------
37530|   498M|            return janet_bitwise_same(x, y);
  ------------------
  |  |  401|   498M|#define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|   498M|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  |  |               #define janet_bitwise_same(x, y) (janet_u64(x) == janet_u64(y))
  |  |  ------------------
  |  |  |  |  788|   498M|#define janet_u64(x) ((x).u64)
  |  |  ------------------
  ------------------
37531|   513M|    }
37532|   513M|}
janet.c:murmur64:
37574|   267M|static uint64_t murmur64(uint64_t h) {
37575|   267M|    h ^= h >> 33;
37576|   267M|    h *= 0xff51afd7ed558ccdUL;
37577|   267M|    h ^= h >> 33;
37578|   267M|    h *= 0xc4ceb9fe1a85ec53UL;
37579|   267M|    h ^= h >> 33;
37580|   267M|    return h;
37581|   267M|}
janet.c:janet_compare_abstract:
37507|   780k|static int janet_compare_abstract(JanetAbstract xx, JanetAbstract yy) {
37508|   780k|    if (xx == yy) return 0;
  ------------------
  |  Branch (37508:9): [True: 341k, False: 439k]
  ------------------
37509|   439k|    const JanetAbstractType *xt = janet_abstract_type(xx);
  ------------------
  |  | 1899|   439k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|   439k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
37510|   439k|    const JanetAbstractType *yt = janet_abstract_type(yy);
  ------------------
  |  | 1899|   439k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|   439k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
37511|   439k|    if (xt != yt) {
  ------------------
  |  Branch (37511:9): [True: 31.4k, False: 407k]
  ------------------
37512|  31.4k|        return xt > yt ? 1 : -1;
  ------------------
  |  Branch (37512:16): [True: 16.7k, False: 14.7k]
  ------------------
37513|  31.4k|    }
37514|   407k|    if (xt->compare == NULL) {
  ------------------
  |  Branch (37514:9): [True: 300k, False: 106k]
  ------------------
37515|   300k|        return xx > yy ? 1 : -1;
  ------------------
  |  Branch (37515:16): [True: 138k, False: 161k]
  ------------------
37516|   300k|    }
37517|   106k|    return xt->compare(xx, yy);
37518|   407k|}
janet.c:push_traversal_node:
37305|   952k|static void push_traversal_node(void *lhs, void *rhs, int32_t index2) {
37306|   952k|    JanetTraversalNode node;
37307|   952k|    node.self = (JanetGCObject *) lhs;
37308|   952k|    node.other = (JanetGCObject *) rhs;
37309|   952k|    node.index = 0;
37310|   952k|    node.index2 = index2;
37311|   952k|    int is_new = janet_vm.traversal_base == NULL;
37312|   952k|    if (is_new || (janet_vm.traversal + 1 >= janet_vm.traversal_top)) {
  ------------------
  |  Branch (37312:9): [True: 992, False: 951k]
  |  Branch (37312:19): [True: 26, False: 951k]
  ------------------
37313|  1.01k|        size_t oldsize = is_new ? 0 : (janet_vm.traversal - janet_vm.traversal_base);
  ------------------
  |  Branch (37313:26): [True: 992, False: 26]
  ------------------
37314|  1.01k|        size_t newsize = 2 * oldsize + 1;
37315|  1.01k|        if (newsize < 128) {
  ------------------
  |  Branch (37315:13): [True: 992, False: 26]
  ------------------
37316|    992|            newsize = 128;
37317|    992|        }
37318|  1.01k|        JanetTraversalNode *tn = janet_realloc(janet_vm.traversal_base, newsize * sizeof(JanetTraversalNode));
  ------------------
  |  | 2409|  1.01k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
37319|  1.01k|        if (tn == NULL) {
  ------------------
  |  Branch (37319:13): [True: 0, False: 1.01k]
  ------------------
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|  1.01k|        janet_vm.traversal_base = tn;
37323|  1.01k|        janet_vm.traversal_top = janet_vm.traversal_base + newsize;
37324|  1.01k|        janet_vm.traversal = janet_vm.traversal_base + oldsize;
37325|  1.01k|    }
37326|   952k|    *(++janet_vm.traversal) = node;
37327|   952k|}
janet.c:traversal_next:
37337|  10.2M|static int traversal_next(Janet *x, Janet *y) {
37338|  10.2M|    JanetTraversalNode *t = janet_vm.traversal;
37339|  11.1M|    while (t && t > janet_vm.traversal_base) {
  ------------------
  |  Branch (37339:12): [True: 3.15M, False: 7.94M]
  |  Branch (37339:17): [True: 2.49M, False: 658k]
  ------------------
37340|  2.49M|        JanetGCObject *self = t->self;
37341|  2.49M|        JanetTupleHead *tself = (JanetTupleHead *)self;
37342|  2.49M|        JanetStructHead *sself = (JanetStructHead *)self;
37343|  2.49M|        JanetGCObject *other = t->other;
37344|  2.49M|        JanetTupleHead *tother = (JanetTupleHead *)other;
37345|  2.49M|        JanetStructHead *sother = (JanetStructHead *)other;
37346|  2.49M|        if ((self->flags & JANET_MEM_TYPEBITS) == JANET_MEMORY_TUPLE) {
  ------------------
  |  |  652|  2.49M|#define JANET_MEM_TYPEBITS 0xFF
  ------------------
  |  Branch (37346:13): [True: 2.46M, False: 29.8k]
  ------------------
37347|       |            /* Node is a tuple at index t->index */
37348|  2.46M|            if (t->index < tself->length && t->index < tother->length) {
  ------------------
  |  Branch (37348:17): [True: 1.63M, False: 832k]
  |  Branch (37348:45): [True: 1.63M, False: 215]
  ------------------
37349|  1.63M|                int32_t index = t->index++;
37350|  1.63M|                *x = tself->data[index];
37351|  1.63M|                *y = tother->data[index];
37352|  1.63M|                janet_vm.traversal = t;
37353|  1.63M|                return 0;
37354|  1.63M|            }
37355|   833k|            if (t->index2 && tself->length != tother->length) {
  ------------------
  |  Branch (37355:17): [True: 23.0k, False: 809k]
  |  Branch (37355:30): [True: 258, False: 22.8k]
  ------------------
37356|    258|                return tself->length > tother->length ? 3 : 1;
  ------------------
  |  Branch (37356:24): [True: 215, False: 43]
  ------------------
37357|    258|            }
37358|   833k|        } else {
37359|       |            /* Node is a struct at index t->index: if t->index2 is true, we should return the values. */
37360|  29.8k|            if (t->index2) {
  ------------------
  |  Branch (37360:17): [True: 13.0k, False: 16.8k]
  ------------------
37361|  13.0k|                t->index2 = 0;
37362|  13.0k|                int32_t index = t->index++;
37363|  13.0k|                *x = sself->data[index].value;
37364|  13.0k|                *y = sother->data[index].value;
37365|  13.0k|                janet_vm.traversal = t;
37366|  13.0k|                return 0;
37367|  13.0k|            }
37368|  16.8k|            for (int32_t i = t->index; i < sself->capacity; i++) {
  ------------------
  |  Branch (37368:40): [True: 13.0k, False: 3.77k]
  ------------------
37369|  13.0k|                t->index2 = 1;
37370|  13.0k|                *x = sself->data[t->index].key;
37371|  13.0k|                *y = sother->data[t->index].key;
37372|  13.0k|                janet_vm.traversal = t;
37373|  13.0k|                return 0;
37374|  13.0k|            }
37375|       |            /* Traverse prototype */
37376|  3.77k|            JanetStruct sproto = sself->proto;
37377|  3.77k|            JanetStruct oproto = sother->proto;
37378|  3.77k|            if (sproto && !oproto) return 3;
  ------------------
  |  Branch (37378:17): [True: 223, False: 3.55k]
  |  Branch (37378:27): [True: 0, False: 223]
  ------------------
37379|  3.77k|            if (!sproto && oproto) return 1;
  ------------------
  |  Branch (37379:17): [True: 3.55k, False: 223]
  |  Branch (37379:28): [True: 0, False: 3.55k]
  ------------------
37380|  3.77k|            if (oproto && sproto) {
  ------------------
  |  Branch (37380:17): [True: 223, False: 3.55k]
  |  Branch (37380:27): [True: 223, False: 0]
  ------------------
37381|    223|                *x = janet_wrap_struct(sproto);
  ------------------
  |  |  842|    223|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|    223|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    223|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    223|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37382|    223|                *y = janet_wrap_struct(oproto);
  ------------------
  |  |  842|    223|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|    223|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    223|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    223|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37383|    223|                janet_vm.traversal = t - 1;
37384|    223|                return 0;
37385|    223|            }
37386|  3.77k|        }
37387|   836k|        t--;
37388|   836k|    }
37389|  8.60M|    janet_vm.traversal = t;
37390|  8.60M|    return 2;
37391|  10.2M|}
janet.c:getter_checkint:
37717|  22.2M|static int32_t getter_checkint(JanetType type, Janet key, int32_t max) {
37718|  22.2M|    if (!janet_checkint(key)) goto bad;
  ------------------
  |  Branch (37718:9): [True: 12, False: 22.2M]
  ------------------
37719|  22.2M|    int32_t ret = janet_unwrap_integer(key);
  ------------------
  |  |  966|  22.2M|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|  22.2M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
37720|  22.2M|    if (ret < 0) goto bad;
  ------------------
  |  Branch (37720:9): [True: 4, False: 22.2M]
  ------------------
37721|  22.2M|    if (ret >= max) goto bad;
  ------------------
  |  Branch (37721:9): [True: 43, False: 22.2M]
  ------------------
37722|  22.2M|    return ret;
37723|     59|bad:
37724|     59|    janet_panicf("expected integer key for %s in range [0, %d), got %v", janet_type_names[type], max, key);
37725|  22.2M|}
janet.c:run_vm:
38562|  1.92M|static JanetSignal run_vm(JanetFiber *fiber, Janet in) {
38563|       |
38564|       |    /* opcode -> label lookup if using clang/GCC */
38565|  1.92M|#ifdef JANET_USE_COMPUTED_GOTOS
38566|  1.92M|    static void *op_lookup[255] = {
38567|  1.92M|        &&label_JOP_NOOP,
38568|  1.92M|        &&label_JOP_ERROR,
38569|  1.92M|        &&label_JOP_TYPECHECK,
38570|  1.92M|        &&label_JOP_RETURN,
38571|  1.92M|        &&label_JOP_RETURN_NIL,
38572|  1.92M|        &&label_JOP_ADD_IMMEDIATE,
38573|  1.92M|        &&label_JOP_ADD,
38574|  1.92M|        &&label_JOP_SUBTRACT_IMMEDIATE,
38575|  1.92M|        &&label_JOP_SUBTRACT,
38576|  1.92M|        &&label_JOP_MULTIPLY_IMMEDIATE,
38577|  1.92M|        &&label_JOP_MULTIPLY,
38578|  1.92M|        &&label_JOP_DIVIDE_IMMEDIATE,
38579|  1.92M|        &&label_JOP_DIVIDE,
38580|  1.92M|        &&label_JOP_DIVIDE_FLOOR,
38581|  1.92M|        &&label_JOP_MODULO,
38582|  1.92M|        &&label_JOP_REMAINDER,
38583|  1.92M|        &&label_JOP_BAND,
38584|  1.92M|        &&label_JOP_BOR,
38585|  1.92M|        &&label_JOP_BXOR,
38586|  1.92M|        &&label_JOP_BNOT,
38587|  1.92M|        &&label_JOP_SHIFT_LEFT,
38588|  1.92M|        &&label_JOP_SHIFT_LEFT_IMMEDIATE,
38589|  1.92M|        &&label_JOP_SHIFT_RIGHT,
38590|  1.92M|        &&label_JOP_SHIFT_RIGHT_IMMEDIATE,
38591|  1.92M|        &&label_JOP_SHIFT_RIGHT_UNSIGNED,
38592|  1.92M|        &&label_JOP_SHIFT_RIGHT_UNSIGNED_IMMEDIATE,
38593|  1.92M|        &&label_JOP_MOVE_FAR,
38594|  1.92M|        &&label_JOP_MOVE_NEAR,
38595|  1.92M|        &&label_JOP_JUMP,
38596|  1.92M|        &&label_JOP_JUMP_IF,
38597|  1.92M|        &&label_JOP_JUMP_IF_NOT,
38598|  1.92M|        &&label_JOP_JUMP_IF_NIL,
38599|  1.92M|        &&label_JOP_JUMP_IF_NOT_NIL,
38600|  1.92M|        &&label_JOP_GREATER_THAN,
38601|  1.92M|        &&label_JOP_GREATER_THAN_IMMEDIATE,
38602|  1.92M|        &&label_JOP_LESS_THAN,
38603|  1.92M|        &&label_JOP_LESS_THAN_IMMEDIATE,
38604|  1.92M|        &&label_JOP_EQUALS,
38605|  1.92M|        &&label_JOP_EQUALS_IMMEDIATE,
38606|  1.92M|        &&label_JOP_COMPARE,
38607|  1.92M|        &&label_JOP_LOAD_NIL,
38608|  1.92M|        &&label_JOP_LOAD_TRUE,
38609|  1.92M|        &&label_JOP_LOAD_FALSE,
38610|  1.92M|        &&label_JOP_LOAD_INTEGER,
38611|  1.92M|        &&label_JOP_LOAD_CONSTANT,
38612|  1.92M|        &&label_JOP_LOAD_UPVALUE,
38613|  1.92M|        &&label_JOP_LOAD_SELF,
38614|  1.92M|        &&label_JOP_SET_UPVALUE,
38615|  1.92M|        &&label_JOP_CLOSURE,
38616|  1.92M|        &&label_JOP_PUSH,
38617|  1.92M|        &&label_JOP_PUSH_2,
38618|  1.92M|        &&label_JOP_PUSH_3,
38619|  1.92M|        &&label_JOP_PUSH_ARRAY,
38620|  1.92M|        &&label_JOP_CALL,
38621|  1.92M|        &&label_JOP_TAILCALL,
38622|  1.92M|        &&label_JOP_RESUME,
38623|  1.92M|        &&label_JOP_SIGNAL,
38624|  1.92M|        &&label_JOP_PROPAGATE,
38625|  1.92M|        &&label_JOP_IN,
38626|  1.92M|        &&label_JOP_GET,
38627|  1.92M|        &&label_JOP_PUT,
38628|  1.92M|        &&label_JOP_GET_INDEX,
38629|  1.92M|        &&label_JOP_PUT_INDEX,
38630|  1.92M|        &&label_JOP_LENGTH,
38631|  1.92M|        &&label_JOP_MAKE_ARRAY,
38632|  1.92M|        &&label_JOP_MAKE_BUFFER,
38633|  1.92M|        &&label_JOP_MAKE_STRING,
38634|  1.92M|        &&label_JOP_MAKE_STRUCT,
38635|  1.92M|        &&label_JOP_MAKE_TABLE,
38636|  1.92M|        &&label_JOP_MAKE_TUPLE,
38637|  1.92M|        &&label_JOP_MAKE_BRACKET_TUPLE,
38638|  1.92M|        &&label_JOP_GREATER_THAN_EQUAL,
38639|  1.92M|        &&label_JOP_LESS_THAN_EQUAL,
38640|  1.92M|        &&label_JOP_NEXT,
38641|  1.92M|        &&label_JOP_NOT_EQUALS,
38642|  1.92M|        &&label_JOP_NOT_EQUALS_IMMEDIATE,
38643|  1.92M|        &&label_JOP_CANCEL,
38644|  1.92M|        &&label_unknown_op,
38645|  1.92M|        &&label_unknown_op,
38646|  1.92M|        &&label_unknown_op,
38647|  1.92M|        &&label_unknown_op,
38648|  1.92M|        &&label_unknown_op,
38649|  1.92M|        &&label_unknown_op,
38650|  1.92M|        &&label_unknown_op,
38651|  1.92M|        &&label_unknown_op,
38652|  1.92M|        &&label_unknown_op,
38653|  1.92M|        &&label_unknown_op,
38654|  1.92M|        &&label_unknown_op,
38655|  1.92M|        &&label_unknown_op,
38656|  1.92M|        &&label_unknown_op,
38657|  1.92M|        &&label_unknown_op,
38658|  1.92M|        &&label_unknown_op,
38659|  1.92M|        &&label_unknown_op,
38660|  1.92M|        &&label_unknown_op,
38661|  1.92M|        &&label_unknown_op,
38662|  1.92M|        &&label_unknown_op,
38663|  1.92M|        &&label_unknown_op,
38664|  1.92M|        &&label_unknown_op,
38665|  1.92M|        &&label_unknown_op,
38666|  1.92M|        &&label_unknown_op,
38667|  1.92M|        &&label_unknown_op,
38668|  1.92M|        &&label_unknown_op,
38669|  1.92M|        &&label_unknown_op,
38670|  1.92M|        &&label_unknown_op,
38671|  1.92M|        &&label_unknown_op,
38672|  1.92M|        &&label_unknown_op,
38673|  1.92M|        &&label_unknown_op,
38674|  1.92M|        &&label_unknown_op,
38675|  1.92M|        &&label_unknown_op,
38676|  1.92M|        &&label_unknown_op,
38677|  1.92M|        &&label_unknown_op,
38678|  1.92M|        &&label_unknown_op,
38679|  1.92M|        &&label_unknown_op,
38680|  1.92M|        &&label_unknown_op,
38681|  1.92M|        &&label_unknown_op,
38682|  1.92M|        &&label_unknown_op,
38683|  1.92M|        &&label_unknown_op,
38684|  1.92M|        &&label_unknown_op,
38685|  1.92M|        &&label_unknown_op,
38686|  1.92M|        &&label_unknown_op,
38687|  1.92M|        &&label_unknown_op,
38688|  1.92M|        &&label_unknown_op,
38689|  1.92M|        &&label_unknown_op,
38690|  1.92M|        &&label_unknown_op,
38691|  1.92M|        &&label_unknown_op,
38692|  1.92M|        &&label_unknown_op,
38693|  1.92M|        &&label_unknown_op,
38694|  1.92M|        &&label_unknown_op,
38695|  1.92M|        &&label_unknown_op,
38696|  1.92M|        &&label_unknown_op,
38697|  1.92M|        &&label_unknown_op,
38698|  1.92M|        &&label_unknown_op,
38699|  1.92M|        &&label_unknown_op,
38700|  1.92M|        &&label_unknown_op,
38701|  1.92M|        &&label_unknown_op,
38702|  1.92M|        &&label_unknown_op,
38703|  1.92M|        &&label_unknown_op,
38704|  1.92M|        &&label_unknown_op,
38705|  1.92M|        &&label_unknown_op,
38706|  1.92M|        &&label_unknown_op,
38707|  1.92M|        &&label_unknown_op,
38708|  1.92M|        &&label_unknown_op,
38709|  1.92M|        &&label_unknown_op,
38710|  1.92M|        &&label_unknown_op,
38711|  1.92M|        &&label_unknown_op,
38712|  1.92M|        &&label_unknown_op,
38713|  1.92M|        &&label_unknown_op,
38714|  1.92M|        &&label_unknown_op,
38715|  1.92M|        &&label_unknown_op,
38716|  1.92M|        &&label_unknown_op,
38717|  1.92M|        &&label_unknown_op,
38718|  1.92M|        &&label_unknown_op,
38719|  1.92M|        &&label_unknown_op,
38720|  1.92M|        &&label_unknown_op,
38721|  1.92M|        &&label_unknown_op,
38722|  1.92M|        &&label_unknown_op,
38723|  1.92M|        &&label_unknown_op,
38724|  1.92M|        &&label_unknown_op,
38725|  1.92M|        &&label_unknown_op,
38726|  1.92M|        &&label_unknown_op,
38727|  1.92M|        &&label_unknown_op,
38728|  1.92M|        &&label_unknown_op,
38729|  1.92M|        &&label_unknown_op,
38730|  1.92M|        &&label_unknown_op,
38731|  1.92M|        &&label_unknown_op,
38732|  1.92M|        &&label_unknown_op,
38733|  1.92M|        &&label_unknown_op,
38734|  1.92M|        &&label_unknown_op,
38735|  1.92M|        &&label_unknown_op,
38736|  1.92M|        &&label_unknown_op,
38737|  1.92M|        &&label_unknown_op,
38738|  1.92M|        &&label_unknown_op,
38739|  1.92M|        &&label_unknown_op,
38740|  1.92M|        &&label_unknown_op,
38741|  1.92M|        &&label_unknown_op,
38742|  1.92M|        &&label_unknown_op,
38743|  1.92M|        &&label_unknown_op,
38744|  1.92M|        &&label_unknown_op,
38745|  1.92M|        &&label_unknown_op,
38746|  1.92M|        &&label_unknown_op,
38747|  1.92M|        &&label_unknown_op,
38748|  1.92M|        &&label_unknown_op,
38749|  1.92M|        &&label_unknown_op,
38750|  1.92M|        &&label_unknown_op,
38751|  1.92M|        &&label_unknown_op,
38752|  1.92M|        &&label_unknown_op,
38753|  1.92M|        &&label_unknown_op,
38754|  1.92M|        &&label_unknown_op,
38755|  1.92M|        &&label_unknown_op,
38756|  1.92M|        &&label_unknown_op,
38757|  1.92M|        &&label_unknown_op,
38758|  1.92M|        &&label_unknown_op,
38759|  1.92M|        &&label_unknown_op,
38760|  1.92M|        &&label_unknown_op,
38761|  1.92M|        &&label_unknown_op,
38762|  1.92M|        &&label_unknown_op,
38763|  1.92M|        &&label_unknown_op,
38764|  1.92M|        &&label_unknown_op,
38765|  1.92M|        &&label_unknown_op,
38766|  1.92M|        &&label_unknown_op,
38767|  1.92M|        &&label_unknown_op,
38768|  1.92M|        &&label_unknown_op,
38769|  1.92M|        &&label_unknown_op,
38770|  1.92M|        &&label_unknown_op,
38771|  1.92M|        &&label_unknown_op,
38772|  1.92M|        &&label_unknown_op,
38773|  1.92M|        &&label_unknown_op,
38774|  1.92M|        &&label_unknown_op,
38775|  1.92M|        &&label_unknown_op,
38776|  1.92M|        &&label_unknown_op,
38777|  1.92M|        &&label_unknown_op,
38778|  1.92M|        &&label_unknown_op,
38779|  1.92M|        &&label_unknown_op,
38780|  1.92M|        &&label_unknown_op,
38781|  1.92M|        &&label_unknown_op,
38782|  1.92M|        &&label_unknown_op,
38783|  1.92M|        &&label_unknown_op,
38784|  1.92M|        &&label_unknown_op,
38785|  1.92M|        &&label_unknown_op,
38786|  1.92M|        &&label_unknown_op,
38787|  1.92M|        &&label_unknown_op,
38788|  1.92M|        &&label_unknown_op,
38789|  1.92M|        &&label_unknown_op,
38790|  1.92M|        &&label_unknown_op,
38791|  1.92M|        &&label_unknown_op,
38792|  1.92M|        &&label_unknown_op,
38793|  1.92M|        &&label_unknown_op,
38794|  1.92M|        &&label_unknown_op,
38795|  1.92M|        &&label_unknown_op,
38796|  1.92M|        &&label_unknown_op,
38797|  1.92M|        &&label_unknown_op,
38798|  1.92M|        &&label_unknown_op,
38799|  1.92M|        &&label_unknown_op,
38800|  1.92M|        &&label_unknown_op,
38801|  1.92M|        &&label_unknown_op,
38802|  1.92M|        &&label_unknown_op,
38803|  1.92M|        &&label_unknown_op,
38804|  1.92M|        &&label_unknown_op,
38805|  1.92M|        &&label_unknown_op,
38806|  1.92M|        &&label_unknown_op,
38807|  1.92M|        &&label_unknown_op,
38808|  1.92M|        &&label_unknown_op,
38809|  1.92M|        &&label_unknown_op,
38810|  1.92M|        &&label_unknown_op,
38811|  1.92M|        &&label_unknown_op,
38812|  1.92M|        &&label_unknown_op,
38813|  1.92M|        &&label_unknown_op,
38814|  1.92M|        &&label_unknown_op,
38815|  1.92M|        &&label_unknown_op,
38816|  1.92M|        &&label_unknown_op,
38817|  1.92M|        &&label_unknown_op,
38818|  1.92M|        &&label_unknown_op,
38819|  1.92M|        &&label_unknown_op,
38820|  1.92M|        &&label_unknown_op,
38821|  1.92M|        &&label_unknown_op
38822|  1.92M|    };
38823|  1.92M|#endif
38824|       |
38825|       |    /* Interpreter state */
38826|  1.92M|    register Janet *stack;
38827|  1.92M|    register uint32_t *pc;
38828|  1.92M|    register JanetFunction *func;
38829|       |
38830|       |    /* NOTE: Flag smuggling! We "smuggle" the fiber sigal in the gc.flags field instead of the usual flags field */
38831|  1.92M|    if (fiber->flags & JANET_FIBER_RESUME_SIGNAL) {
  ------------------
  |  |  808|  1.92M|#define JANET_FIBER_RESUME_SIGNAL 0x400000
  ------------------
  |  Branch (38831:9): [True: 12, False: 1.92M]
  ------------------
38832|       |        /* Get the signal */
38833|     12|        JanetSignal sig = (fiber->gc.flags & JANET_FIBER_STATUS_MASK) >> JANET_FIBER_STATUS_OFFSET;
  ------------------
  |  |  807|     12|#define JANET_FIBER_STATUS_MASK 0x3F0000
  ------------------
                      JanetSignal sig = (fiber->gc.flags & JANET_FIBER_STATUS_MASK) >> JANET_FIBER_STATUS_OFFSET;
  ------------------
  |  |  809|     12|#define JANET_FIBER_STATUS_OFFSET 16
  ------------------
38834|       |        /* Clear the signal */
38835|     12|        fiber->gc.flags &= ~JANET_FIBER_STATUS_MASK;
  ------------------
  |  |  807|     12|#define JANET_FIBER_STATUS_MASK 0x3F0000
  ------------------
38836|     12|        fiber->flags &= ~JANET_FIBER_RESUME_SIGNAL;
  ------------------
  |  |  808|     12|#define JANET_FIBER_RESUME_SIGNAL 0x400000
  ------------------
38837|     12|        janet_vm.return_reg[0] = in;
38838|     12|        return sig;
38839|     12|    }
38840|       |
38841|  1.92M|    vm_restore();
  ------------------
  |  |38225|  1.92M|#define vm_restore() do { \
  |  |38226|  1.92M|    stack = fiber->data + fiber->frame; \
  |  |38227|  1.92M|    pc = janet_stack_frame(stack)->pc; \
  |  |  ------------------
  |  |  |  |  831|  1.92M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  1.92M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38228|  1.92M|    func = janet_stack_frame(stack)->func; \
  |  |  ------------------
  |  |  |  |  831|  1.92M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  1.92M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38229|  1.92M|} while (0)
  |  |  ------------------
  |  |  |  Branch (38229:10): [Folded, False: 1.92M]
  |  |  ------------------
  ------------------
38842|       |
38843|  1.92M|    if (fiber->flags & JANET_FIBER_DID_LONGJUMP) {
  ------------------
  |  |  814|  1.92M|#define JANET_FIBER_DID_LONGJUMP     0x8000000
  ------------------
  |  Branch (38843:9): [True: 943, False: 1.92M]
  ------------------
38844|    943|        if (janet_fiber_frame(fiber)->func == NULL) {
  ------------------
  |  |  832|    943|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  831|    943|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|    943|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (38844:13): [True: 943, False: 0]
  ------------------
38845|       |            /* Inside a c function */
38846|    943|            janet_fiber_popframe(fiber);
38847|    943|            vm_restore();
  ------------------
  |  |38225|    943|#define vm_restore() do { \
  |  |38226|    943|    stack = fiber->data + fiber->frame; \
  |  |38227|    943|    pc = janet_stack_frame(stack)->pc; \
  |  |  ------------------
  |  |  |  |  831|    943|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|    943|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38228|    943|    func = janet_stack_frame(stack)->func; \
  |  |  ------------------
  |  |  |  |  831|    943|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|    943|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38229|    943|} while (0)
  |  |  ------------------
  |  |  |  Branch (38229:10): [Folded, False: 943]
  |  |  ------------------
  ------------------
38848|    943|        }
38849|       |        /* Check if we were at a tail call instruction. If so, do implicit return */
38850|    943|        if ((*pc & 0xFF) == JOP_TAILCALL) {
  ------------------
  |  Branch (38850:13): [True: 30, False: 913]
  ------------------
38851|       |            /* Tail call resume */
38852|     30|            int entrance_frame = janet_stack_frame(stack)->flags & JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  |  831|     30|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1026|     30|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
                          int entrance_frame = janet_stack_frame(stack)->flags & JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  | 1013|     30|#define JANET_STACKFRAME_ENTRANCE 2
  ------------------
38853|     30|            janet_fiber_popframe(fiber);
38854|     30|            if (entrance_frame) {
  ------------------
  |  Branch (38854:17): [True: 26, False: 4]
  ------------------
38855|     26|                fiber->flags &= ~JANET_FIBER_FLAG_MASK;
  ------------------
  |  |  815|     26|#define JANET_FIBER_FLAG_MASK        0xF000000
  ------------------
38856|     26|                vm_return(JANET_SIGNAL_OK, in);
  ------------------
  |  |38230|     26|#define vm_return(sig, val) do { \
  |  |38231|     26|    janet_vm.return_reg[0] = (val); \
  |  |38232|     26|    vm_commit(); \
  |  |  ------------------
  |  |  |  |38224|     26|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|     26|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|     26|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 26]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38233|     26|    return (sig); \
  |  |38234|     26|} while (0)
  |  |  ------------------
  |  |  |  Branch (38234:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
38857|     26|            }
38858|      4|            vm_restore();
  ------------------
  |  |38225|      4|#define vm_restore() do { \
  |  |38226|      4|    stack = fiber->data + fiber->frame; \
  |  |38227|      4|    pc = janet_stack_frame(stack)->pc; \
  |  |  ------------------
  |  |  |  |  831|      4|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|      4|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38228|      4|    func = janet_stack_frame(stack)->func; \
  |  |  ------------------
  |  |  |  |  831|      4|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|      4|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38229|      4|} while (0)
  |  |  ------------------
  |  |  |  Branch (38229:10): [Folded, False: 4]
  |  |  ------------------
  ------------------
38859|      4|        }
38860|    943|    }
38861|       |
38862|  1.92M|    if (!(fiber->flags & JANET_FIBER_RESUME_NO_USEVAL)) stack[A] = in;
  ------------------
  |  |  812|  1.92M|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
                  if (!(fiber->flags & JANET_FIBER_RESUME_NO_USEVAL)) stack[A] = in;
  ------------------
  |  |38190|    962|#define A ((*pc >> 8)  & 0xFF)
  ------------------
  |  Branch (38862:9): [True: 962, False: 1.92M]
  ------------------
38863|  1.92M|    if (!(fiber->flags & JANET_FIBER_RESUME_NO_SKIP)) pc++;
  ------------------
  |  |  813|  1.92M|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  ------------------
  |  Branch (38863:9): [True: 962, False: 1.92M]
  ------------------
38864|       |
38865|  1.92M|    uint8_t first_opcode = *pc & ((fiber->flags & JANET_FIBER_BREAKPOINT) ? 0x7F : 0xFF);
  ------------------
  |  |  811|  1.92M|#define JANET_FIBER_BREAKPOINT       0x1000000
  ------------------
  |  Branch (38865:35): [True: 0, False: 1.92M]
  ------------------
38866|       |
38867|  1.92M|    fiber->flags &= ~JANET_FIBER_FLAG_MASK;
  ------------------
  |  |  815|  1.92M|#define JANET_FIBER_FLAG_MASK        0xF000000
  ------------------
38868|       |
38869|       |    /* Main interpreter loop. Semantically is a switch on
38870|       |     * (*pc & 0xFF) inside of an infinite loop. */
38871|  1.92M|    VM_START();
  ------------------
  |  |38209|  1.92M|#define VM_START() { goto *op_lookup[first_opcode];
  ------------------
38872|       |
38873|  1.92M|    VM_DEFAULT();
  ------------------
  |  |38212|      1|#define VM_DEFAULT() label_unknown_op:
  ------------------
38874|      1|    fiber->flags |= JANET_FIBER_BREAKPOINT | JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  811|      1|#define JANET_FIBER_BREAKPOINT       0x1000000
  ------------------
                  fiber->flags |= JANET_FIBER_BREAKPOINT | JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  812|      1|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
                  fiber->flags |= JANET_FIBER_BREAKPOINT | JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  813|      1|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  ------------------
38875|      1|    vm_return(JANET_SIGNAL_DEBUG, janet_wrap_nil());
  ------------------
  |  |38230|      1|#define vm_return(sig, val) do { \
  |  |38231|      1|    janet_vm.return_reg[0] = (val); \
  |  |38232|      1|    vm_commit(); \
  |  |  ------------------
  |  |  |  |38224|      1|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|      1|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|      1|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38233|      1|    return (sig); \
  |  |38234|      1|} while (0)
  |  |  ------------------
  |  |  |  Branch (38234:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
38876|       |
38877|      0|    VM_OP(JOP_NOOP)
  ------------------
  |  |38211|      0|#define VM_OP(op) label_##op :
  ------------------
38878|      0|    vm_pcnext();
  ------------------
  |  |38244|      0|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
38879|       |
38880|   494k|    VM_OP(JOP_ERROR)
  ------------------
  |  |38211|   494k|#define VM_OP(op) label_##op :
  ------------------
38881|   494k|    vm_return(JANET_SIGNAL_ERROR, stack[D]);
  ------------------
  |  |38230|   494k|#define vm_return(sig, val) do { \
  |  |38231|   494k|    janet_vm.return_reg[0] = (val); \
  |  |38232|   494k|    vm_commit(); \
  |  |  ------------------
  |  |  |  |38224|   494k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|   494k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|   494k|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 494k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38233|   494k|    return (sig); \
  |  |38234|   494k|} while (0)
  |  |  ------------------
  |  |  |  Branch (38234:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
38882|       |
38883|      0|    VM_OP(JOP_TYPECHECK)
  ------------------
  |  |38211|      0|#define VM_OP(op) label_##op :
  ------------------
38884|      0|    vm_assert_types(stack[A], E);
  ------------------
  |  |38256|      0|#define vm_assert_types(X, TS) do { \
  |  |38257|      0|    if (!(janet_checktypes((X), (TS)))) { \
  |  |  ------------------
  |  |  |  |  969|      0|#define janet_checktypes(x, tps) ((1 << janet_type(x)) & (tps))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (isnan((x).number) \
  |  |  |  |  |  |  796|      0|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  |  |  |  |  797|      0|        : JANET_NUMBER)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38257:9): [True: 0, False: 0]
  |  |  ------------------
  |  |38258|      0|        vm_commit(); \
  |  |  ------------------
  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38259|      0|        janet_panicf("expected %T, got %v", (TS), (X)); \
  |  |38260|      0|    } \
  |  |38261|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (38261:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (38884:5): [True: 0, False: 0]
  ------------------
38885|      0|    vm_pcnext();
  ------------------
  |  |38244|      0|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
38886|       |
38887|   183M|    VM_OP(JOP_RETURN) {
  ------------------
  |  |38211|   183M|#define VM_OP(op) label_##op :
  ------------------
38888|   183M|        Janet retval = stack[D];
  ------------------
  |  |38193|   183M|#define D (*pc >> 8)
  ------------------
38889|   183M|        int entrance_frame = janet_stack_frame(stack)->flags & JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  |  831|   183M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1026|   183M|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
                      int entrance_frame = janet_stack_frame(stack)->flags & JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  | 1013|   183M|#define JANET_STACKFRAME_ENTRANCE 2
  ------------------
38890|   183M|        janet_fiber_popframe(fiber);
38891|   183M|        if (entrance_frame) vm_return_no_restore(JANET_SIGNAL_OK, retval);
  ------------------
  |  |38235|   856k|#define vm_return_no_restore(sig, val) do { \
  |  |38236|   856k|    janet_vm.return_reg[0] = (val); \
  |  |38237|   856k|    return (sig); \
  |  |38238|   856k|} while (0)
  |  |  ------------------
  |  |  |  Branch (38238:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (38891:13): [True: 856k, False: 182M]
  ------------------
38892|   182M|        vm_restore();
  ------------------
  |  |38225|   182M|#define vm_restore() do { \
  |  |38226|   182M|    stack = fiber->data + fiber->frame; \
  |  |38227|   182M|    pc = janet_stack_frame(stack)->pc; \
  |  |  ------------------
  |  |  |  |  831|   182M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|   182M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38228|   182M|    func = janet_stack_frame(stack)->func; \
  |  |  ------------------
  |  |  |  |  831|   182M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|   182M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38229|   182M|} while (0)
  |  |  ------------------
  |  |  |  Branch (38229:10): [Folded, False: 182M]
  |  |  ------------------
  ------------------
38893|   182M|        stack[A] = retval;
  ------------------
  |  |38190|   182M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
38894|   182M|        vm_checkgc_pcnext();
  ------------------
  |  |38245|   182M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38241|   182M|#define maybe_collect() do {\
  |  |  |  |38242|   182M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 69.0M, False: 113M]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 182M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38244|   182M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|   182M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
38895|   182M|    }
38896|       |
38897|  3.79M|    VM_OP(JOP_RETURN_NIL) {
  ------------------
  |  |38211|  3.79M|#define VM_OP(op) label_##op :
  ------------------
38898|  3.79M|        Janet retval = janet_wrap_nil();
  ------------------
  |  |  831|  3.79M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  3.79M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.79M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.79M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
38899|  3.79M|        int entrance_frame = janet_stack_frame(stack)->flags & JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  |  831|  3.79M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1026|  3.79M|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
                      int entrance_frame = janet_stack_frame(stack)->flags & JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  | 1013|  3.79M|#define JANET_STACKFRAME_ENTRANCE 2
  ------------------
38900|  3.79M|        janet_fiber_popframe(fiber);
38901|  3.79M|        if (entrance_frame) vm_return_no_restore(JANET_SIGNAL_OK, retval);
  ------------------
  |  |38235|   558k|#define vm_return_no_restore(sig, val) do { \
  |  |38236|   558k|    janet_vm.return_reg[0] = (val); \
  |  |38237|   558k|    return (sig); \
  |  |38238|   558k|} while (0)
  |  |  ------------------
  |  |  |  Branch (38238:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (38901:13): [True: 558k, False: 3.23M]
  ------------------
38902|  3.23M|        vm_restore();
  ------------------
  |  |38225|  3.23M|#define vm_restore() do { \
  |  |38226|  3.23M|    stack = fiber->data + fiber->frame; \
  |  |38227|  3.23M|    pc = janet_stack_frame(stack)->pc; \
  |  |  ------------------
  |  |  |  |  831|  3.23M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  3.23M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38228|  3.23M|    func = janet_stack_frame(stack)->func; \
  |  |  ------------------
  |  |  |  |  831|  3.23M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  3.23M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38229|  3.23M|} while (0)
  |  |  ------------------
  |  |  |  Branch (38229:10): [Folded, False: 3.23M]
  |  |  ------------------
  ------------------
38903|  3.23M|        stack[A] = retval;
  ------------------
  |  |38190|  3.23M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
38904|  3.23M|        vm_checkgc_pcnext();
  ------------------
  |  |38245|  3.23M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38241|  3.23M|#define maybe_collect() do {\
  |  |  |  |38242|  3.23M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 119k, False: 3.11M]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 3.23M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38244|  3.23M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|  3.23M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
38905|  3.23M|    }
38906|       |
38907|   187M|    VM_OP(JOP_ADD_IMMEDIATE)
  ------------------
  |  |38211|   187M|#define VM_OP(op) label_##op :
  ------------------
38908|   187M|    vm_binop_immediate(+);
  ------------------
  |  |38275|   187M|    {\
  |  |38276|   187M|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |38191|   187M|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |38277|   187M|        if (!janet_checktype(op1, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|   187M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [True: 187M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|   187M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|   187M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 186M, False: 726k]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 726k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|   187M|        : 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 (38277:13): [True: 726k, False: 186M]
  |  |  ------------------
  |  |38278|   726k|            vm_commit();\
  |  |  ------------------
  |  |  |  |38224|   726k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|   726k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|   726k|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 726k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38279|   726k|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  ------------------
  |  |  |  |  835|   726k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |38280|   726k|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |38281|   726k|            stack = fiber->data + fiber->frame;\
  |  |38282|   726k|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |38190|   726k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |38283|   726k|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |38245|   726k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |38241|   726k|#define maybe_collect() do {\
  |  |  |  |  |  |38242|   726k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38242:9): [True: 7, False: 726k]
  |  |  |  |  |  |  |  Branch (38242:85): [Folded, False: 726k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |38244|   726k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38213|   726k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38284|   186M|        } else {\
  |  |38285|   186M|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  839|   186M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |38286|   186M|            stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |38190|   186M|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |  835|   186M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |38287|   186M|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |38244|   186M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|   186M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38288|   186M|        }\
  |  |38289|   187M|    }
  ------------------
38909|       |
38910|   187M|    VM_OP(JOP_ADD)
  ------------------
  |  |38211|  22.5M|#define VM_OP(op) label_##op :
  ------------------
38911|  22.5M|    vm_binop(+);
  ------------------
  |  |38327|  22.5M|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  ------------------
  |  |  |  |38311|  22.5M|    {\
  |  |  |  |38312|  22.5M|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |38191|  22.5M|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38313|  22.5M|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |38192|  22.5M|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |38314|  22.5M|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|  45.0M|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 21.9M, False: 566k]
  |  |  |  |  |  |  |  Branch (806:6): [True: 22.5M, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  807|  45.0M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  803|  22.5M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (803:6): [True: 21.9M, False: 566k]
  |  |  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 566k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  808|  45.0M|        : 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_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|  21.9M|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 21.9M, False: 1.26k]
  |  |  |  |  |  |  |  Branch (806:6): [True: 21.9M, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  807|  21.9M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  803|  21.9M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (803:6): [True: 21.9M, False: 1.26k]
  |  |  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 1.26k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  808|  21.9M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38315|  21.9M|            double x1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|  21.9M|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |38316|  21.9M|            double x2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|  21.9M|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |38317|  21.9M|            stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|  21.9M|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |38327|  21.9M|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  835|  21.9M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38318|  21.9M|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38244|  21.9M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38213|  21.9M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38319|  21.9M|        } else {\
  |  |  |  |38320|   567k|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|   567k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|   567k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|   567k|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 567k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38321|   567k|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |38322|   567k|            stack = fiber->data + fiber->frame;\
  |  |  |  |38323|   567k|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|   567k|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38324|   567k|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38245|   567k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38241|   567k|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |38242|   567k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (38242:9): [True: 5, False: 567k]
  |  |  |  |  |  |  |  |  |  Branch (38242:85): [Folded, False: 567k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38244|   567k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |38213|   567k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38325|   567k|        }\
  |  |  |  |38326|  22.5M|    }
  |  |  ------------------
  ------------------
38912|       |
38913|  25.3M|    VM_OP(JOP_SUBTRACT_IMMEDIATE)
  ------------------
  |  |38211|  25.3M|#define VM_OP(op) label_##op :
  ------------------
38914|  25.3M|    vm_binop_immediate(-);
  ------------------
  |  |38275|  25.3M|    {\
  |  |38276|  25.3M|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |38191|  25.3M|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |38277|  25.3M|        if (!janet_checktype(op1, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|  25.3M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [True: 25.3M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|  25.3M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|  25.3M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 24.9M, False: 366k]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 366k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|  25.3M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38277:13): [True: 366k, False: 24.9M]
  |  |  ------------------
  |  |38278|   366k|            vm_commit();\
  |  |  ------------------
  |  |  |  |38224|   366k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|   366k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|   366k|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 366k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38279|   366k|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  ------------------
  |  |  |  |  835|   366k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |38280|   366k|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |38281|   366k|            stack = fiber->data + fiber->frame;\
  |  |38282|   366k|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |38190|   366k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |38283|   366k|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |38245|   366k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |38241|   366k|#define maybe_collect() do {\
  |  |  |  |  |  |38242|   366k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38242:9): [True: 1, False: 366k]
  |  |  |  |  |  |  |  Branch (38242:85): [Folded, False: 366k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |38244|   366k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38213|   366k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38284|  24.9M|        } else {\
  |  |38285|  24.9M|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  839|  24.9M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |38286|  24.9M|            stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |38190|  24.9M|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |  835|  24.9M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |38287|  24.9M|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |38244|  24.9M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|  24.9M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38288|  24.9M|        }\
  |  |38289|  25.3M|    }
  ------------------
38915|       |
38916|  25.3M|    VM_OP(JOP_SUBTRACT)
  ------------------
  |  |38211|  1.99M|#define VM_OP(op) label_##op :
  ------------------
38917|  1.99M|    vm_binop(-);
  ------------------
  |  |38327|  1.99M|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  ------------------
  |  |  |  |38311|  1.99M|    {\
  |  |  |  |38312|  1.99M|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |38191|  1.99M|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38313|  1.99M|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |38192|  1.99M|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |38314|  1.99M|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|  3.99M|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 1.81M, False: 183k]
  |  |  |  |  |  |  |  Branch (806:6): [True: 1.99M, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  807|  3.99M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  803|  1.99M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (803:6): [True: 1.81M, False: 183k]
  |  |  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 183k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  808|  3.99M|        : 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_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|  1.81M|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 1.81M, False: 31]
  |  |  |  |  |  |  |  Branch (806:6): [True: 1.81M, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  807|  1.81M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  803|  1.81M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (803:6): [True: 1.81M, False: 31]
  |  |  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 31]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  808|  1.81M|        : 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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38315|  1.81M|            double x1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|  1.81M|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |38316|  1.81M|            double x2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|  1.81M|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |38317|  1.81M|            stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|  1.81M|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |38327|  1.81M|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  835|  1.81M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38318|  1.81M|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38244|  1.81M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38213|  1.81M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38319|  1.81M|        } else {\
  |  |  |  |38320|   183k|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|   183k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|   183k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|   183k|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 183k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38321|   183k|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |38322|   183k|            stack = fiber->data + fiber->frame;\
  |  |  |  |38323|   183k|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|   183k|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38324|   183k|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38245|   183k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38241|   183k|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |38242|   183k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (38242:9): [True: 2, False: 183k]
  |  |  |  |  |  |  |  |  |  Branch (38242:85): [Folded, False: 183k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38244|   183k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |38213|   183k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38325|   183k|        }\
  |  |  |  |38326|  1.99M|    }
  |  |  ------------------
  ------------------
38918|       |
38919|  1.99M|    VM_OP(JOP_MULTIPLY_IMMEDIATE)
  ------------------
  |  |38211|  1.32k|#define VM_OP(op) label_##op :
  ------------------
38920|  1.32k|    vm_binop_immediate(*);
  ------------------
  |  |38275|  1.32k|    {\
  |  |38276|  1.32k|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |38191|  1.32k|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |38277|  1.32k|        if (!janet_checktype(op1, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|  1.32k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [True: 1.32k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|  1.32k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|  1.32k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 918, False: 408]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 408]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|  1.32k|        : 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 (38277:13): [True: 408, False: 918]
  |  |  ------------------
  |  |38278|    408|            vm_commit();\
  |  |  ------------------
  |  |  |  |38224|    408|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|    408|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|    408|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 408]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38279|    408|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  ------------------
  |  |  |  |  835|    408|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |38280|    408|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |38281|    408|            stack = fiber->data + fiber->frame;\
  |  |38282|    408|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |38190|    408|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |38283|    408|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |38245|    408|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |38241|    408|#define maybe_collect() do {\
  |  |  |  |  |  |38242|    408|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38242:9): [True: 0, False: 408]
  |  |  |  |  |  |  |  Branch (38242:85): [Folded, False: 408]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |38244|    408|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38213|    408|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38284|    918|        } else {\
  |  |38285|    918|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  839|    918|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |38286|    918|            stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |38190|    918|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |  835|    918|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |38287|    918|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |38244|    918|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|    918|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38288|    918|        }\
  |  |38289|  1.32k|    }
  ------------------
38921|       |
38922|  2.69k|    VM_OP(JOP_MULTIPLY)
  ------------------
  |  |38211|  2.69k|#define VM_OP(op) label_##op :
  ------------------
38923|  2.69k|    vm_binop(*);
  ------------------
  |  |38327|  2.69k|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  ------------------
  |  |  |  |38311|  2.69k|    {\
  |  |  |  |38312|  2.69k|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |38191|  2.69k|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38313|  2.69k|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |38192|  2.69k|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |38314|  2.69k|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|  5.39k|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 2.48k, False: 214]
  |  |  |  |  |  |  |  Branch (806:6): [True: 2.69k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  807|  5.39k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  803|  2.69k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (803:6): [True: 2.48k, False: 214]
  |  |  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 214]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  808|  5.39k|        : 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_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|  2.48k|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 2.41k, False: 71]
  |  |  |  |  |  |  |  Branch (806:6): [True: 2.48k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  807|  2.48k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  803|  2.48k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (803:6): [True: 2.41k, False: 71]
  |  |  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 71]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  808|  2.48k|        : 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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38315|  2.41k|            double x1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|  2.41k|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |38316|  2.41k|            double x2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|  2.41k|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |38317|  2.41k|            stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|  2.41k|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |38327|  2.41k|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  835|  2.41k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38318|  2.41k|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38244|  2.41k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38213|  2.41k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38319|  2.41k|        } else {\
  |  |  |  |38320|    285|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|    285|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|    285|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|    285|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 285]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38321|    285|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |38322|    285|            stack = fiber->data + fiber->frame;\
  |  |  |  |38323|    285|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|    285|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38324|    285|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38245|    285|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38241|    285|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |38242|    285|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (38242:9): [True: 0, False: 285]
  |  |  |  |  |  |  |  |  |  Branch (38242:85): [Folded, False: 285]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38244|    285|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |38213|    285|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38325|    285|        }\
  |  |  |  |38326|  2.69k|    }
  |  |  ------------------
  ------------------
38924|       |
38925|  2.69k|    VM_OP(JOP_DIVIDE_IMMEDIATE)
  ------------------
  |  |38211|  1.16k|#define VM_OP(op) label_##op :
  ------------------
38926|  1.16k|    vm_binop_immediate( /);
  ------------------
  |  |38275|  1.16k|    {\
  |  |38276|  1.16k|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |38191|  1.16k|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |38277|  1.16k|        if (!janet_checktype(op1, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|  1.16k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [True: 1.16k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|  1.16k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|  1.16k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 597, False: 567]
  |  |  |  |  |  |  |  Branch (803:28): [True: 46, False: 521]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|  1.16k|        : 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 (38277:13): [True: 521, False: 643]
  |  |  ------------------
  |  |38278|    521|            vm_commit();\
  |  |  ------------------
  |  |  |  |38224|    521|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|    521|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|    521|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 521]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38279|    521|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  ------------------
  |  |  |  |  835|    521|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |38280|    521|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |38281|    521|            stack = fiber->data + fiber->frame;\
  |  |38282|    521|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |38190|    521|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |38283|    521|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |38245|    521|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |38241|    521|#define maybe_collect() do {\
  |  |  |  |  |  |38242|    521|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38242:9): [True: 0, False: 521]
  |  |  |  |  |  |  |  Branch (38242:85): [Folded, False: 521]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |38244|    521|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38213|    521|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38284|    643|        } else {\
  |  |38285|    643|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  839|    643|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |38286|    643|            stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |38190|    643|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |  835|    643|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |38287|    643|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |38244|    643|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|    643|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38288|    643|        }\
  |  |38289|  1.16k|    }
  ------------------
38927|       |
38928|  1.61k|    VM_OP(JOP_DIVIDE)
  ------------------
  |  |38211|  1.61k|#define VM_OP(op) label_##op :
  ------------------
38929|  1.61k|    vm_binop( /);
  ------------------
  |  |38327|  1.61k|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  ------------------
  |  |  |  |38311|  1.61k|    {\
  |  |  |  |38312|  1.61k|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |38191|  1.61k|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38313|  1.61k|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |38192|  1.61k|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |38314|  1.61k|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|  3.22k|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 428, False: 1.18k]
  |  |  |  |  |  |  |  Branch (806:6): [True: 1.61k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  807|  3.22k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  803|  1.61k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (803:6): [True: 353, False: 1.25k]
  |  |  |  |  |  |  |  |  |  Branch (803:28): [True: 75, False: 1.18k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  808|  3.22k|        : 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_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|    428|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 360, False: 68]
  |  |  |  |  |  |  |  Branch (806:6): [True: 428, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  807|    428|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  803|    428|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (803:6): [True: 354, False: 74]
  |  |  |  |  |  |  |  |  |  Branch (803:28): [True: 6, False: 68]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  808|    428|        : 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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38315|    360|            double x1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|    360|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |38316|    360|            double x2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|    360|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |38317|    360|            stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|    360|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |38327|    360|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  835|    360|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38318|    360|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38244|    360|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38213|    360|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38319|  1.25k|        } else {\
  |  |  |  |38320|  1.25k|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|  1.25k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|  1.25k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|  1.25k|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 1.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38321|  1.25k|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |38322|  1.25k|            stack = fiber->data + fiber->frame;\
  |  |  |  |38323|  1.25k|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|  1.25k|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38324|  1.25k|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38245|  1.25k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38241|  1.25k|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |38242|  1.25k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (38242:9): [True: 0, False: 1.25k]
  |  |  |  |  |  |  |  |  |  Branch (38242:85): [Folded, False: 1.25k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38244|  1.25k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |38213|  1.25k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38325|  1.25k|        }\
  |  |  |  |38326|  1.61k|    }
  |  |  ------------------
  ------------------
38930|       |
38931|  3.80M|    VM_OP(JOP_DIVIDE_FLOOR) {
  ------------------
  |  |38211|  3.80M|#define VM_OP(op) label_##op :
  ------------------
38932|  3.80M|        Janet op1 = stack[B];
  ------------------
  |  |38191|  3.80M|#define B ((*pc >> 16) & 0xFF)
  ------------------
38933|  3.80M|        Janet op2 = stack[C];
  ------------------
  |  |38192|  3.80M|#define C (*pc >> 24)
  ------------------
38934|  3.80M|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {
  ------------------
  |  |  806|  7.60M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 3.80M, False: 151]
  |  |  |  Branch (806:6): [True: 3.80M, Folded]
  |  |  ------------------
  |  |  807|  7.60M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|  3.80M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 3.80M, False: 151]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 151]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  7.60M|        : 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_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {
  ------------------
  |  |  806|  3.80M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 3.30M, False: 492k]
  |  |  |  Branch (806:6): [True: 3.80M, Folded]
  |  |  ------------------
  |  |  807|  3.80M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|  3.80M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 3.30M, False: 492k]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 492k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  3.80M|        : 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
38935|  3.30M|            double x1 = janet_unwrap_number(op1);
  ------------------
  |  |  839|  3.30M|#define janet_unwrap_number(x) ((x).number)
  ------------------
38936|  3.30M|            double x2 = janet_unwrap_number(op2);
  ------------------
  |  |  839|  3.30M|#define janet_unwrap_number(x) ((x).number)
  ------------------
38937|  3.30M|            stack[A] = janet_wrap_number(floor(x1 / x2));
  ------------------
  |  |38190|  3.30M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                          stack[A] = janet_wrap_number(floor(x1 / x2));
  ------------------
  |  |  835|  3.30M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
38938|  3.30M|            vm_pcnext();
  ------------------
  |  |38244|  3.30M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|  3.30M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
38939|  3.30M|        } else {
38940|   493k|            vm_commit();
  ------------------
  |  |38224|   493k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  831|   493k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|   493k|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38224:70): [Folded, False: 493k]
  |  |  ------------------
  ------------------
38941|   493k|            Janet a = janet_binop_call("div", "rdiv", op1, op2);
38942|   493k|            stack = fiber->data + fiber->frame;
38943|   493k|            stack[A] = a;
  ------------------
  |  |38190|   493k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
38944|   493k|            vm_checkgc_pcnext();
  ------------------
  |  |38245|   493k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38241|   493k|#define maybe_collect() do {\
  |  |  |  |38242|   493k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 8, False: 493k]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 493k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38244|   493k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|   493k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
38945|   493k|        }
38946|  3.80M|    }
38947|       |
38948|  3.80M|    VM_OP(JOP_MODULO) {
  ------------------
  |  |38211|  3.36k|#define VM_OP(op) label_##op :
  ------------------
38949|  3.36k|        Janet op1 = stack[B];
  ------------------
  |  |38191|  3.36k|#define B ((*pc >> 16) & 0xFF)
  ------------------
38950|  3.36k|        Janet op2 = stack[C];
  ------------------
  |  |38192|  3.36k|#define C (*pc >> 24)
  ------------------
38951|  3.36k|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {
  ------------------
  |  |  806|  6.73k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 2.23k, False: 1.13k]
  |  |  |  Branch (806:6): [True: 3.36k, Folded]
  |  |  ------------------
  |  |  807|  6.73k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|  3.36k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 2.23k, False: 1.13k]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 1.13k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  6.73k|        : 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_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {
  ------------------
  |  |  806|  2.23k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 2.15k, False: 74]
  |  |  |  Branch (806:6): [True: 2.23k, Folded]
  |  |  ------------------
  |  |  807|  2.23k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|  2.23k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 2.15k, False: 74]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 74]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  2.23k|        : 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
38952|  2.15k|            double x1 = janet_unwrap_number(op1);
  ------------------
  |  |  839|  2.15k|#define janet_unwrap_number(x) ((x).number)
  ------------------
38953|  2.15k|            double x2 = janet_unwrap_number(op2);
  ------------------
  |  |  839|  2.15k|#define janet_unwrap_number(x) ((x).number)
  ------------------
38954|  2.15k|            if (x2 == 0) {
  ------------------
  |  Branch (38954:17): [True: 341, False: 1.81k]
  ------------------
38955|    341|                stack[A] = janet_wrap_number(x1);
  ------------------
  |  |38190|    341|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                              stack[A] = janet_wrap_number(x1);
  ------------------
  |  |  835|    341|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
38956|  1.81k|            } else {
38957|  1.81k|                double intres = x2 * floor(x1 / x2);
38958|  1.81k|                stack[A] = janet_wrap_number(x1 - intres);
  ------------------
  |  |38190|  1.81k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                              stack[A] = janet_wrap_number(x1 - intres);
  ------------------
  |  |  835|  1.81k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
38959|  1.81k|            }
38960|  2.15k|            vm_pcnext();
  ------------------
  |  |38244|  2.15k|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|  2.15k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
38961|  2.15k|        } else {
38962|  1.21k|            vm_commit();
  ------------------
  |  |38224|  1.21k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  831|  1.21k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  1.21k|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38224:70): [Folded, False: 1.21k]
  |  |  ------------------
  ------------------
38963|  1.21k|            Janet a = janet_binop_call("mod", "rmod", op1, op2);
38964|  1.21k|            stack = fiber->data + fiber->frame;
38965|  1.21k|            stack[A] = a;
  ------------------
  |  |38190|  1.21k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
38966|  1.21k|            vm_checkgc_pcnext();
  ------------------
  |  |38245|  1.21k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38241|  1.21k|#define maybe_collect() do {\
  |  |  |  |38242|  1.21k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 0, False: 1.21k]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 1.21k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38244|  1.21k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|  1.21k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
38967|  1.21k|        }
38968|  3.36k|    }
38969|       |
38970|  3.36k|    VM_OP(JOP_REMAINDER) {
  ------------------
  |  |38211|    616|#define VM_OP(op) label_##op :
  ------------------
38971|    616|        Janet op1 = stack[B];
  ------------------
  |  |38191|    616|#define B ((*pc >> 16) & 0xFF)
  ------------------
38972|    616|        Janet op2 = stack[C];
  ------------------
  |  |38192|    616|#define C (*pc >> 24)
  ------------------
38973|    616|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {
  ------------------
  |  |  806|  1.23k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 278, False: 338]
  |  |  |  Branch (806:6): [True: 616, Folded]
  |  |  ------------------
  |  |  807|  1.23k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|    616|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 232, False: 384]
  |  |  |  |  |  Branch (803:28): [True: 46, False: 338]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  1.23k|        : 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_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {
  ------------------
  |  |  806|    278|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 134, False: 144]
  |  |  |  Branch (806:6): [True: 278, Folded]
  |  |  ------------------
  |  |  807|    278|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|    278|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 130, False: 148]
  |  |  |  |  |  Branch (803:28): [True: 4, False: 144]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    278|        : 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
38974|    134|            double x1 = janet_unwrap_number(op1);
  ------------------
  |  |  839|    134|#define janet_unwrap_number(x) ((x).number)
  ------------------
38975|    134|            double x2 = janet_unwrap_number(op2);
  ------------------
  |  |  839|    134|#define janet_unwrap_number(x) ((x).number)
  ------------------
38976|    134|            stack[A] = janet_wrap_number(fmod(x1, x2));
  ------------------
  |  |38190|    134|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                          stack[A] = janet_wrap_number(fmod(x1, x2));
  ------------------
  |  |  835|    134|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
38977|    134|            vm_pcnext();
  ------------------
  |  |38244|    134|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|    134|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
38978|    482|        } else {
38979|    482|            vm_commit();
  ------------------
  |  |38224|    482|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  831|    482|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|    482|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38224:70): [Folded, False: 482]
  |  |  ------------------
  ------------------
38980|    482|            Janet a = janet_binop_call("%", "r%", op1, op2);
38981|    482|            stack = fiber->data + fiber->frame;
38982|    482|            stack[A] = a;
  ------------------
  |  |38190|    482|#define A ((*pc >> 8)  & 0xFF)
  ------------------
38983|    482|            vm_checkgc_pcnext();
  ------------------
  |  |38245|    482|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38241|    482|#define maybe_collect() do {\
  |  |  |  |38242|    482|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 3, False: 479]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 482]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38244|    482|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|    482|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
38984|    482|        }
38985|    616|    }
38986|       |
38987|    616|    VM_OP(JOP_BAND)
  ------------------
  |  |38211|      0|#define VM_OP(op) label_##op :
  ------------------
38988|      0|    vm_bitop(&);
  ------------------
  |  |38349|      0|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  ------------------
  |  |  |  |38329|      0|    {\
  |  |  |  |38330|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |38191|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38331|      0|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |38192|      0|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |38332|      0|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (806:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                       if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (806:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38333|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |38334|      0|            double y2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |38335|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |38349|      0|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  962|      0|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (962:33): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (962:53): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (962:73): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38336|      0|            if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |  962|      0|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (962:33): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (962:53): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (962:73): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38337|      0|            type1 x1 = (type1) y1;\
  |  |  |  |38338|      0|            int32_t x2 = (int32_t) y2;\
  |  |  |  |38339|      0|            stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |38340|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38244|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38213|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38341|      0|        } else {\
  |  |  |  |38342|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38343|      0|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |38344|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |38345|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38346|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38245|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38241|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |38242|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (38242:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (38242:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38244|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |38213|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38347|      0|        }\
  |  |  |  |38348|      0|    }
  |  |  ------------------
  ------------------
38989|       |
38990|    449|    VM_OP(JOP_BOR)
  ------------------
  |  |38211|    449|#define VM_OP(op) label_##op :
  ------------------
38991|    449|    vm_bitop( |);
  ------------------
  |  |38349|    449|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  ------------------
  |  |  |  |38329|    449|    {\
  |  |  |  |38330|    449|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |38191|    449|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38331|    449|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |38192|    449|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |38332|    449|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|    898|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 144, False: 305]
  |  |  |  |  |  |  |  Branch (806:6): [True: 449, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  807|    898|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  803|    449|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (803:6): [True: 144, False: 305]
  |  |  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 305]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  808|    898|        : 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_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|    144|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 123, False: 21]
  |  |  |  |  |  |  |  Branch (806:6): [True: 144, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  807|    144|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  803|    144|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (803:6): [True: 123, False: 21]
  |  |  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 21]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  808|    144|        : 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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38333|    123|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|    123|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |38334|    123|            double y2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|    123|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |38335|    123|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |38349|    123|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  962|    123|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (962:33): [True: 123, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (962:53): [True: 123, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (962:73): [True: 123, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38336|    123|            if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |  962|    123|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (962:33): [True: 123, False: 0]
  |  |  |  |  |  |  |  Branch (962:53): [True: 122, False: 1]
  |  |  |  |  |  |  |  Branch (962:73): [True: 122, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      1|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      1|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      1|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38337|    123|            type1 x1 = (type1) y1;\
  |  |  |  |38338|    122|            int32_t x2 = (int32_t) y2;\
  |  |  |  |38339|    122|            stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|    122|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|    122|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |38340|    122|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38244|    122|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38213|    122|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38341|    326|        } else {\
  |  |  |  |38342|    326|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|    326|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|    326|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|    326|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 326]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38343|    326|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |38344|    326|            stack = fiber->data + fiber->frame;\
  |  |  |  |38345|    326|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|    326|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38346|    326|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38245|    326|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38241|    326|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |38242|    326|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (38242:9): [True: 0, False: 326]
  |  |  |  |  |  |  |  |  |  Branch (38242:85): [Folded, False: 326]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38244|    326|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |38213|    326|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38347|    326|        }\
  |  |  |  |38348|    449|    }
  |  |  ------------------
  ------------------
38992|       |
38993|    448|    VM_OP(JOP_BXOR)
  ------------------
  |  |38211|      0|#define VM_OP(op) label_##op :
  ------------------
38994|      0|    vm_bitop(^);
  ------------------
  |  |38349|      0|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  ------------------
  |  |  |  |38329|      0|    {\
  |  |  |  |38330|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |38191|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38331|      0|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |38192|      0|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |38332|      0|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (806:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                       if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (806:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38333|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |38334|      0|            double y2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |38335|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |38349|      0|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  962|      0|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (962:33): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (962:53): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (962:73): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38336|      0|            if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |  962|      0|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (962:33): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (962:53): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (962:73): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38337|      0|            type1 x1 = (type1) y1;\
  |  |  |  |38338|      0|            int32_t x2 = (int32_t) y2;\
  |  |  |  |38339|      0|            stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |38340|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38244|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38213|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38341|      0|        } else {\
  |  |  |  |38342|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38343|      0|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |38344|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |38345|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38346|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38245|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38241|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |38242|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (38242:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (38242:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38244|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |38213|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38347|      0|        }\
  |  |  |  |38348|      0|    }
  |  |  ------------------
  ------------------
38995|       |
38996|      0|    VM_OP(JOP_BNOT) {
  ------------------
  |  |38211|      0|#define VM_OP(op) label_##op :
  ------------------
38997|      0|        Janet op = stack[E];
  ------------------
  |  |38194|      0|#define E (*pc >> 16)
  ------------------
38998|      0|        if (janet_checktype(op, JANET_NUMBER)) {
  ------------------
  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 0]
  |  |  |  Branch (806:6): [True: 0, Folded]
  |  |  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
38999|      0|            stack[A] = janet_wrap_integer(~janet_unwrap_integer(op));
  ------------------
  |  |38190|      0|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                          stack[A] = janet_wrap_integer(~janet_unwrap_integer(op));
  ------------------
  |  |  967|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
39000|      0|            vm_pcnext();
  ------------------
  |  |38244|      0|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39001|      0|        } else {
39002|      0|            vm_commit();
  ------------------
  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  ------------------
  ------------------
39003|      0|            Janet a = janet_unary_call("~", op);
39004|      0|            stack = fiber->data + fiber->frame;
39005|      0|            stack[A] = a;
  ------------------
  |  |38190|      0|#define A ((*pc >> 8)  & 0xFF)
  ------------------
39006|      0|            vm_checkgc_pcnext();
  ------------------
  |  |38245|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38241|      0|#define maybe_collect() do {\
  |  |  |  |38242|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 0, False: 0]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38244|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39007|      0|        }
39008|      0|    }
39009|       |
39010|      0|    VM_OP(JOP_SHIFT_RIGHT_UNSIGNED)
  ------------------
  |  |38211|      0|#define VM_OP(op) label_##op :
  ------------------
39011|      0|    vm_bitopu( >>);
  ------------------
  |  |38350|      0|#define vm_bitopu(op) _vm_bitop(op, uint32_t, janet_checkuintrange, "32-bit unsigned integers")
  |  |  ------------------
  |  |  |  |38329|      0|    {\
  |  |  |  |38330|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |38191|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38331|      0|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |38192|      0|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |38332|      0|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (806:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                       if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (806:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38333|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |38334|      0|            double y2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |38335|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |38350|      0|#define vm_bitopu(op) _vm_bitop(op, uint32_t, janet_checkuintrange, "32-bit unsigned integers")
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  963|      0|#define janet_checkuintrange(x) ((x) >= 0 && (x) <= UINT32_MAX && (x) == (uint32_t)(x))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (963:34): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (963:46): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (963:67): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38336|      0|            if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |  962|      0|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (962:33): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (962:53): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (962:73): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38337|      0|            type1 x1 = (type1) y1;\
  |  |  |  |38338|      0|            int32_t x2 = (int32_t) y2;\
  |  |  |  |38339|      0|            stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |38340|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38244|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38213|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38341|      0|        } else {\
  |  |  |  |38342|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38343|      0|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |38344|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |38345|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38346|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38245|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38241|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |38242|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (38242:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (38242:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38244|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |38213|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38347|      0|        }\
  |  |  |  |38348|      0|    }
  |  |  ------------------
  ------------------
39012|       |
39013|      0|    VM_OP(JOP_SHIFT_RIGHT_UNSIGNED_IMMEDIATE)
  ------------------
  |  |38211|      0|#define VM_OP(op) label_##op :
  ------------------
39014|      0|    vm_bitopu_immediate( >>);
  ------------------
  |  |38309|      0|#define vm_bitopu_immediate(op) _vm_bitop_immediate(op, uint32_t, janet_checkuintrange, "32-bit unsigned integers");
  |  |  ------------------
  |  |  |  |38291|      0|    {\
  |  |  |  |38292|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |38191|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38293|      0|        if (!janet_checktype(op1, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  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 (38293:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |38294|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38295|      0|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |38296|      0|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |  |  |38297|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |38298|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38299|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38245|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38241|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |38242|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (38242:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (38242:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38244|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |38213|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38300|      0|        } else {\
  |  |  |  |38301|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |38302|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |38309|      0|#define vm_bitopu_immediate(op) _vm_bitop_immediate(op, uint32_t, janet_checkuintrange, "32-bit unsigned integers");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  963|      0|#define janet_checkuintrange(x) ((x) >= 0 && (x) <= UINT32_MAX && (x) == (uint32_t)(x))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (963:34): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (963:46): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (963:67): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38303|      0|            type1 x1 = (type1) y1;\
  |  |  |  |38304|      0|            stack[A] = janet_wrap_number((type1) (x1 op CS));\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = janet_wrap_number((type1) (x1 op CS));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |38305|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38244|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38213|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38306|      0|        }\
  |  |  |  |38307|      0|    }
  |  |  ------------------
  ------------------
39015|       |
39016|      0|    VM_OP(JOP_SHIFT_RIGHT)
  ------------------
  |  |38211|      0|#define VM_OP(op) label_##op :
  ------------------
39017|      0|    vm_bitop( >>);
  ------------------
  |  |38349|      0|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  ------------------
  |  |  |  |38329|      0|    {\
  |  |  |  |38330|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |38191|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38331|      0|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |38192|      0|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |38332|      0|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (806:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                       if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (806:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38333|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |38334|      0|            double y2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |38335|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |38349|      0|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  962|      0|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (962:33): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (962:53): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (962:73): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38336|      0|            if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |  962|      0|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (962:33): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (962:53): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (962:73): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38337|      0|            type1 x1 = (type1) y1;\
  |  |  |  |38338|      0|            int32_t x2 = (int32_t) y2;\
  |  |  |  |38339|      0|            stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |38340|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38244|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38213|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38341|      0|        } else {\
  |  |  |  |38342|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38343|      0|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |38344|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |38345|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38346|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38245|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38241|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |38242|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (38242:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (38242:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38244|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |38213|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38347|      0|        }\
  |  |  |  |38348|      0|    }
  |  |  ------------------
  ------------------
39018|       |
39019|      0|    VM_OP(JOP_SHIFT_RIGHT_IMMEDIATE)
  ------------------
  |  |38211|      0|#define VM_OP(op) label_##op :
  ------------------
39020|      0|    vm_bitop_immediate( >>);
  ------------------
  |  |38308|      0|#define vm_bitop_immediate(op) _vm_bitop_immediate(op, int32_t, janet_checkintrange, "32-bit signed integers");
  |  |  ------------------
  |  |  |  |38291|      0|    {\
  |  |  |  |38292|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |38191|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38293|      0|        if (!janet_checktype(op1, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  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 (38293:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |38294|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38295|      0|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |38296|      0|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |  |  |38297|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |38298|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38299|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38245|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38241|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |38242|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (38242:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (38242:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38244|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |38213|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38300|      0|        } else {\
  |  |  |  |38301|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |38302|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |38308|      0|#define vm_bitop_immediate(op) _vm_bitop_immediate(op, int32_t, janet_checkintrange, "32-bit signed integers");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  962|      0|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (962:33): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (962:53): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (962:73): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38303|      0|            type1 x1 = (type1) y1;\
  |  |  |  |38304|      0|            stack[A] = janet_wrap_number((type1) (x1 op CS));\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = janet_wrap_number((type1) (x1 op CS));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |38305|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38244|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38213|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38306|      0|        }\
  |  |  |  |38307|      0|    }
  |  |  ------------------
  ------------------
39021|       |
39022|      0|    VM_OP(JOP_SHIFT_LEFT)
  ------------------
  |  |38211|      0|#define VM_OP(op) label_##op :
  ------------------
39023|      0|    vm_bitop( <<);
  ------------------
  |  |38349|      0|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  ------------------
  |  |  |  |38329|      0|    {\
  |  |  |  |38330|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |38191|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38331|      0|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |38192|      0|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |38332|      0|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (806:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                       if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (806:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38333|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |38334|      0|            double y2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |38335|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |38349|      0|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  962|      0|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (962:33): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (962:53): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (962:73): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38336|      0|            if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |  962|      0|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (962:33): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (962:53): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (962:73): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38337|      0|            type1 x1 = (type1) y1;\
  |  |  |  |38338|      0|            int32_t x2 = (int32_t) y2;\
  |  |  |  |38339|      0|            stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |38340|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38244|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38213|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38341|      0|        } else {\
  |  |  |  |38342|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38343|      0|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |38344|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |38345|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38346|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38245|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38241|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |38242|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (38242:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (38242:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38244|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |38213|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38347|      0|        }\
  |  |  |  |38348|      0|    }
  |  |  ------------------
  ------------------
39024|       |
39025|      0|    VM_OP(JOP_SHIFT_LEFT_IMMEDIATE)
  ------------------
  |  |38211|      0|#define VM_OP(op) label_##op :
  ------------------
39026|      0|    vm_bitop_immediate( <<);
  ------------------
  |  |38308|      0|#define vm_bitop_immediate(op) _vm_bitop_immediate(op, int32_t, janet_checkintrange, "32-bit signed integers");
  |  |  ------------------
  |  |  |  |38291|      0|    {\
  |  |  |  |38292|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |38191|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38293|      0|        if (!janet_checktype(op1, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  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 (38293:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |38294|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38295|      0|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |38296|      0|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |  |  |38297|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |38298|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |38299|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38245|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38241|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |38242|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (38242:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (38242:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38244|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |38213|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38300|      0|        } else {\
  |  |  |  |38301|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |38302|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |38308|      0|#define vm_bitop_immediate(op) _vm_bitop_immediate(op, int32_t, janet_checkintrange, "32-bit signed integers");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  962|      0|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (962:33): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (962:53): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (962:73): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38303|      0|            type1 x1 = (type1) y1;\
  |  |  |  |38304|      0|            stack[A] = janet_wrap_number((type1) (x1 op CS));\
  |  |  |  |  ------------------
  |  |  |  |  |  |38190|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = janet_wrap_number((type1) (x1 op CS));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |38305|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |38244|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38213|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38306|      0|        }\
  |  |  |  |38307|      0|    }
  |  |  ------------------
  ------------------
39027|       |
39028|   879M|    VM_OP(JOP_MOVE_NEAR)
  ------------------
  |  |38211|   879M|#define VM_OP(op) label_##op :
  ------------------
39029|   879M|    stack[A] = stack[E];
  ------------------
  |  |38190|   879M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  stack[A] = stack[E];
  ------------------
  |  |38194|   879M|#define E (*pc >> 16)
  ------------------
39030|   879M|    vm_pcnext();
  ------------------
  |  |38244|   879M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|   879M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39031|       |
39032|   879M|    VM_OP(JOP_MOVE_FAR)
  ------------------
  |  |38211|   725k|#define VM_OP(op) label_##op :
  ------------------
39033|   725k|    stack[E] = stack[A];
  ------------------
  |  |38194|   725k|#define E (*pc >> 16)
  ------------------
                  stack[E] = stack[A];
  ------------------
  |  |38190|   725k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
39034|   725k|    vm_pcnext();
  ------------------
  |  |38244|   725k|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|   725k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39035|       |
39036|   461M|    VM_OP(JOP_JUMP)
  ------------------
  |  |38211|   461M|#define VM_OP(op) label_##op :
  ------------------
39037|   461M|    vm_maybe_auto_suspend(DS <= 0);
  ------------------
  |  |38265|   461M|#define vm_maybe_auto_suspend(COND) do { \
  |  |38266|   461M|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (38266:9): [True: 300M, False: 160M]
  |  |  |  Branch (38266:19): [True: 0, False: 300M]
  |  |  ------------------
  |  |38267|      0|        fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  812|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  |  |  ------------------
  |  |                       fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  813|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  |  |  ------------------
  |  |38268|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |38230|      0|#define vm_return(sig, val) do { \
  |  |  |  |38231|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |38232|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38233|      0|    return (sig); \
  |  |  |  |38234|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38234:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38269|      0|    } \
  |  |38270|   461M|} while (0)
  |  |  ------------------
  |  |  |  Branch (38270:10): [Folded, False: 461M]
  |  |  ------------------
  ------------------
39038|   461M|    pc += DS;
  ------------------
  |  |38198|   461M|#define DS (*((int32_t *)pc) >> 8)
  ------------------
39039|   461M|    vm_next();
  ------------------
  |  |38213|   461M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  ------------------
39040|       |
39041|  3.19G|    VM_OP(JOP_JUMP_IF)
  ------------------
  |  |38211|  3.19G|#define VM_OP(op) label_##op :
  ------------------
39042|  3.19G|    if (janet_truthy(stack[A])) {
  ------------------
  |  |  818|  3.19G|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|  6.39G|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 3.19G]
  |  |  |  |  ------------------
  |  |  |  |  807|  6.39G|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!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.39G|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  3.19G|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  3.19G|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  3.19G|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  3.19G|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 3.19G, False: 18.4E]
  |  |  ------------------
  |  |  819|  3.19G|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|  6.39G|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 3.19G]
  |  |  |  |  ------------------
  |  |  |  |  807|  6.39G|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!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.39G|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  3.19G|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  3.19G|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  3.19G|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  3.19G|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 3.19G, False: 738k]
  |  |  |  Branch (819:47): [True: 688k, False: 49.8k]
  |  |  ------------------
  ------------------
39043|  3.19G|        vm_maybe_auto_suspend(ES <= 0);
  ------------------
  |  |38265|  3.19G|#define vm_maybe_auto_suspend(COND) do { \
  |  |38266|  3.19G|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (38266:9): [True: 0, False: 3.19G]
  |  |  |  Branch (38266:19): [True: 0, False: 0]
  |  |  ------------------
  |  |38267|      0|        fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  812|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  |  |  ------------------
  |  |                       fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  813|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  |  |  ------------------
  |  |38268|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |38230|      0|#define vm_return(sig, val) do { \
  |  |  |  |38231|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |38232|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38233|      0|    return (sig); \
  |  |  |  |38234|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38234:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38269|      0|    } \
  |  |38270|  3.19G|} while (0)
  |  |  ------------------
  |  |  |  Branch (38270:10): [Folded, False: 3.19G]
  |  |  ------------------
  ------------------
39044|  3.19G|        pc += ES;
  ------------------
  |  |38199|  3.19G|#define ES (*((int32_t *)pc) >> 16)
  ------------------
39045|  3.19G|    } else {
39046|  40.4k|        pc++;
39047|  40.4k|    }
39048|  3.19G|    vm_next();
  ------------------
  |  |38213|  3.19G|#define vm_next() goto *op_lookup[*pc & 0xFF]
  ------------------
39049|       |
39050|  3.19G|    VM_OP(JOP_JUMP_IF_NOT)
  ------------------
  |  |38211|   925M|#define VM_OP(op) label_##op :
  ------------------
39051|   925M|    if (janet_truthy(stack[A])) {
  ------------------
  |  |  818|   925M|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|  1.85G|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 925M]
  |  |  |  |  ------------------
  |  |  |  |  807|  1.85G|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!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.85G|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|   925M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|   925M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   925M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   925M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 902M, False: 22.9M]
  |  |  ------------------
  |  |  819|   925M|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|  1.80G|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 902M]
  |  |  |  |  ------------------
  |  |  |  |  807|  1.80G|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!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.80G|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|   902M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|   902M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   902M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   902M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 91.0M, False: 811M]
  |  |  |  Branch (819:47): [True: 326M, False: 484M]
  |  |  ------------------
  ------------------
39052|   418M|        pc++;
39053|   507M|    } else {
39054|   507M|        vm_maybe_auto_suspend(ES <= 0);
  ------------------
  |  |38265|   507M|#define vm_maybe_auto_suspend(COND) do { \
  |  |38266|   507M|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (38266:9): [True: 6.18M, False: 501M]
  |  |  |  Branch (38266:19): [True: 0, False: 6.18M]
  |  |  ------------------
  |  |38267|      0|        fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  812|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  |  |  ------------------
  |  |                       fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  813|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  |  |  ------------------
  |  |38268|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |38230|      0|#define vm_return(sig, val) do { \
  |  |  |  |38231|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |38232|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38233|      0|    return (sig); \
  |  |  |  |38234|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38234:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38269|      0|    } \
  |  |38270|   507M|} while (0)
  |  |  ------------------
  |  |  |  Branch (38270:10): [Folded, False: 507M]
  |  |  ------------------
  ------------------
39055|   507M|        pc += ES;
  ------------------
  |  |38199|   507M|#define ES (*((int32_t *)pc) >> 16)
  ------------------
39056|   507M|    }
39057|   925M|    vm_next();
  ------------------
  |  |38213|   925M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  ------------------
39058|       |
39059|   925M|    VM_OP(JOP_JUMP_IF_NIL)
  ------------------
  |  |38211|   172M|#define VM_OP(op) label_##op :
  ------------------
39060|   172M|    if (janet_checktype(stack[A], JANET_NIL)) {
  ------------------
  |  |  806|   172M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 14.2M, False: 158M]
  |  |  |  Branch (806:6): [Folded, False: 172M]
  |  |  ------------------
  |  |  807|   172M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   172M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   172M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   172M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   172M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   172M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39061|  14.2M|        vm_maybe_auto_suspend(ES <= 0);
  ------------------
  |  |38265|  14.2M|#define vm_maybe_auto_suspend(COND) do { \
  |  |38266|  14.2M|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (38266:9): [True: 0, False: 14.2M]
  |  |  |  Branch (38266:19): [True: 0, False: 0]
  |  |  ------------------
  |  |38267|      0|        fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  812|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  |  |  ------------------
  |  |                       fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  813|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  |  |  ------------------
  |  |38268|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |38230|      0|#define vm_return(sig, val) do { \
  |  |  |  |38231|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |38232|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38233|      0|    return (sig); \
  |  |  |  |38234|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38234:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38269|      0|    } \
  |  |38270|  14.2M|} while (0)
  |  |  ------------------
  |  |  |  Branch (38270:10): [Folded, False: 14.2M]
  |  |  ------------------
  ------------------
39062|  14.2M|        pc += ES;
  ------------------
  |  |38199|  14.2M|#define ES (*((int32_t *)pc) >> 16)
  ------------------
39063|   158M|    } else {
39064|   158M|        pc++;
39065|   158M|    }
39066|   172M|    vm_next();
  ------------------
  |  |38213|   172M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  ------------------
39067|       |
39068|   172M|    VM_OP(JOP_JUMP_IF_NOT_NIL)
  ------------------
  |  |38211|  41.4M|#define VM_OP(op) label_##op :
  ------------------
39069|  41.4M|    if (janet_checktype(stack[A], JANET_NIL)) {
  ------------------
  |  |  806|  41.4M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 5.45M, False: 35.9M]
  |  |  |  Branch (806:6): [Folded, False: 41.4M]
  |  |  ------------------
  |  |  807|  41.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|  41.4M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  41.4M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  41.4M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  41.4M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  41.4M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39070|  5.45M|        pc++;
39071|  35.9M|    } else {
39072|  35.9M|        vm_maybe_auto_suspend(ES <= 0);
  ------------------
  |  |38265|  35.9M|#define vm_maybe_auto_suspend(COND) do { \
  |  |38266|  35.9M|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (38266:9): [True: 0, False: 35.9M]
  |  |  |  Branch (38266:19): [True: 0, False: 0]
  |  |  ------------------
  |  |38267|      0|        fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  812|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  |  |  ------------------
  |  |                       fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  813|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  |  |  ------------------
  |  |38268|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |38230|      0|#define vm_return(sig, val) do { \
  |  |  |  |38231|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |38232|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38233|      0|    return (sig); \
  |  |  |  |38234|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38234:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38269|      0|    } \
  |  |38270|  35.9M|} while (0)
  |  |  ------------------
  |  |  |  Branch (38270:10): [Folded, False: 35.9M]
  |  |  ------------------
  ------------------
39073|  35.9M|        pc += ES;
  ------------------
  |  |38199|  35.9M|#define ES (*((int32_t *)pc) >> 16)
  ------------------
39074|  35.9M|    }
39075|  41.4M|    vm_next();
  ------------------
  |  |38213|  41.4M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  ------------------
39076|       |
39077|   137M|    VM_OP(JOP_LESS_THAN)
  ------------------
  |  |38211|   137M|#define VM_OP(op) label_##op :
  ------------------
39078|   137M|    vm_compop( <);
  ------------------
  |  |38352|   137M|    {\
  |  |38353|   137M|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |38191|   137M|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |38354|   137M|        Janet op2 = stack[C];\
  |  |  ------------------
  |  |  |  |38192|   137M|#define C (*pc >> 24)
  |  |  ------------------
  |  |38355|   137M|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|   274M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:5): [True: 99.7M, False: 37.7M]
  |  |  |  |  |  Branch (806:6): [True: 137M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|   274M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|   137M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 99.7M, False: 37.7M]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 37.7M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|   274M|        : 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_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|  99.7M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:5): [True: 99.6M, False: 95.5k]
  |  |  |  |  |  Branch (806:6): [True: 99.7M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|  99.7M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|  99.7M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 99.6M, False: 95.5k]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 95.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|  99.7M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38356|  99.6M|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  839|  99.6M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |38357|  99.6M|            double x2 = janet_unwrap_number(op2);\
  |  |  ------------------
  |  |  |  |  839|  99.6M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |38358|  99.6M|            stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |38190|  99.6M|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |  834|  99.6M|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  822|  99.6M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  99.6M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  99.6M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38359|  99.6M|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |38244|  99.6M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|  99.6M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38360|  99.6M|        } else {\
  |  |38361|  37.8M|            vm_commit();\
  |  |  ------------------
  |  |  |  |38224|  37.8M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|  37.8M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|  37.8M|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 37.8M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38362|  37.8M|            Janet a = janet_wrap_boolean(janet_compare(op1, op2) op 0);\
  |  |  ------------------
  |  |  |  |  834|  37.8M|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  822|  37.8M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  37.8M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  37.8M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38363|  37.8M|            stack = fiber->data + fiber->frame;\
  |  |38364|  37.8M|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |38190|  37.8M|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |38365|  37.8M|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |38245|  37.8M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |38241|  37.8M|#define maybe_collect() do {\
  |  |  |  |  |  |38242|  37.8M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38242:9): [True: 638, False: 37.8M]
  |  |  |  |  |  |  |  Branch (38242:85): [Folded, False: 37.8M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |38244|  37.8M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38213|  37.8M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38366|  37.8M|        }\
  |  |38367|   137M|    }
  ------------------
39079|       |
39080|   137M|    VM_OP(JOP_LESS_THAN_EQUAL)
  ------------------
  |  |38211|  17.0M|#define VM_OP(op) label_##op :
  ------------------
39081|  17.0M|    vm_compop( <=);
  ------------------
  |  |38352|  17.0M|    {\
  |  |38353|  17.0M|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |38191|  17.0M|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |38354|  17.0M|        Janet op2 = stack[C];\
  |  |  ------------------
  |  |  |  |38192|  17.0M|#define C (*pc >> 24)
  |  |  ------------------
  |  |38355|  17.0M|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|  34.0M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:5): [True: 9.00M, False: 8.00M]
  |  |  |  |  |  Branch (806:6): [True: 17.0M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|  34.0M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|  17.0M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 9.00M, False: 8.00M]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 8.00M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|  34.0M|        : 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_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|  9.00M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:5): [True: 9.00M, False: 13]
  |  |  |  |  |  Branch (806:6): [True: 9.00M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|  9.00M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|  9.00M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 9.00M, False: 13]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|  9.00M|        : 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38356|  9.00M|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  839|  9.00M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |38357|  9.00M|            double x2 = janet_unwrap_number(op2);\
  |  |  ------------------
  |  |  |  |  839|  9.00M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |38358|  9.00M|            stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |38190|  9.00M|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |  834|  9.00M|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  822|  9.00M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  9.00M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  9.00M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38359|  9.00M|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |38244|  9.00M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|  9.00M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38360|  9.00M|        } else {\
  |  |38361|  8.00M|            vm_commit();\
  |  |  ------------------
  |  |  |  |38224|  8.00M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|  8.00M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|  8.00M|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 8.00M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38362|  8.00M|            Janet a = janet_wrap_boolean(janet_compare(op1, op2) op 0);\
  |  |  ------------------
  |  |  |  |  834|  8.00M|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  822|  8.00M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  8.00M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  8.00M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38363|  8.00M|            stack = fiber->data + fiber->frame;\
  |  |38364|  8.00M|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |38190|  8.00M|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |38365|  8.00M|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |38245|  8.00M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |38241|  8.00M|#define maybe_collect() do {\
  |  |  |  |  |  |38242|  8.00M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38242:9): [True: 349, False: 7.99M]
  |  |  |  |  |  |  |  Branch (38242:85): [Folded, False: 8.00M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |38244|  8.00M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38213|  8.00M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38366|  8.00M|        }\
  |  |38367|  17.0M|    }
  ------------------
39082|       |
39083|  17.0M|    VM_OP(JOP_LESS_THAN_IMMEDIATE)
  ------------------
  |  |38211|   111k|#define VM_OP(op) label_##op :
  ------------------
39084|   111k|    vm_compop_imm( <);
  ------------------
  |  |38369|   111k|    {\
  |  |38370|   111k|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |38191|   111k|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |38371|   111k|        if (janet_checktype(op1, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|   111k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:5): [True: 32.4k, False: 79.4k]
  |  |  |  |  |  Branch (806:6): [True: 111k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|   111k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|   111k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 32.4k, False: 79.4k]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 79.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|   111k|        : 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38372|  32.4k|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  839|  32.4k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |38373|  32.4k|            double x2 = (double) CS; \
  |  |  ------------------
  |  |  |  |38197|  32.4k|#define CS (*((int32_t *)pc) >> 24)
  |  |  ------------------
  |  |38374|  32.4k|            stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |38190|  32.4k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |  834|  32.4k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  822|  32.4k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  32.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  32.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38375|  32.4k|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |38244|  32.4k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|  32.4k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38376|  79.4k|        } else {\
  |  |38377|  79.4k|            vm_commit();\
  |  |  ------------------
  |  |  |  |38224|  79.4k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|  79.4k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|  79.4k|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 79.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38378|  79.4k|            Janet a = janet_wrap_boolean(janet_compare(op1, janet_wrap_integer(CS)) op 0);\
  |  |  ------------------
  |  |  |  |  834|  79.4k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  822|  79.4k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  79.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  79.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38379|  79.4k|            stack = fiber->data + fiber->frame;\
  |  |38380|  79.4k|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |38190|  79.4k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |38381|  79.4k|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |38245|  79.4k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |38241|  79.4k|#define maybe_collect() do {\
  |  |  |  |  |  |38242|  79.4k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38242:9): [True: 0, False: 79.4k]
  |  |  |  |  |  |  |  Branch (38242:85): [Folded, False: 79.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |38244|  79.4k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38213|  79.4k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38382|  79.4k|        }\
  |  |38383|   111k|    }
  ------------------
39085|       |
39086|  6.93M|    VM_OP(JOP_GREATER_THAN)
  ------------------
  |  |38211|  6.93M|#define VM_OP(op) label_##op :
  ------------------
39087|  6.93M|    vm_compop( >);
  ------------------
  |  |38352|  6.93M|    {\
  |  |38353|  6.93M|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |38191|  6.93M|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |38354|  6.93M|        Janet op2 = stack[C];\
  |  |  ------------------
  |  |  |  |38192|  6.93M|#define C (*pc >> 24)
  |  |  ------------------
  |  |38355|  6.93M|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|  13.8M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:5): [True: 6.79M, False: 142k]
  |  |  |  |  |  Branch (806:6): [True: 6.93M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|  13.8M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|  6.93M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 6.79M, False: 142k]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 142k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|  13.8M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                       if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|  6.79M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:5): [True: 6.79M, False: 1.40k]
  |  |  |  |  |  Branch (806:6): [True: 6.79M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|  6.79M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|  6.79M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 6.79M, False: 1.40k]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 1.40k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|  6.79M|        : 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38356|  6.79M|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  839|  6.79M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |38357|  6.79M|            double x2 = janet_unwrap_number(op2);\
  |  |  ------------------
  |  |  |  |  839|  6.79M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |38358|  6.79M|            stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |38190|  6.79M|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |  834|  6.79M|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  822|  6.79M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  6.79M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  6.79M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38359|  6.79M|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |38244|  6.79M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|  6.79M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38360|  6.79M|        } else {\
  |  |38361|   143k|            vm_commit();\
  |  |  ------------------
  |  |  |  |38224|   143k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|   143k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|   143k|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 143k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38362|   143k|            Janet a = janet_wrap_boolean(janet_compare(op1, op2) op 0);\
  |  |  ------------------
  |  |  |  |  834|   143k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  822|   143k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   143k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   143k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38363|   143k|            stack = fiber->data + fiber->frame;\
  |  |38364|   143k|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |38190|   143k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |38365|   143k|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |38245|   143k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |38241|   143k|#define maybe_collect() do {\
  |  |  |  |  |  |38242|   143k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38242:9): [True: 1, False: 143k]
  |  |  |  |  |  |  |  Branch (38242:85): [Folded, False: 143k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |38244|   143k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38213|   143k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38366|   143k|        }\
  |  |38367|  6.93M|    }
  ------------------
39088|       |
39089|  9.74M|    VM_OP(JOP_GREATER_THAN_EQUAL)
  ------------------
  |  |38211|  9.74M|#define VM_OP(op) label_##op :
  ------------------
39090|  9.74M|    vm_compop( >=);
  ------------------
  |  |38352|  9.74M|    {\
  |  |38353|  9.74M|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |38191|  9.74M|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |38354|  9.74M|        Janet op2 = stack[C];\
  |  |  ------------------
  |  |  |  |38192|  9.74M|#define C (*pc >> 24)
  |  |  ------------------
  |  |38355|  9.74M|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|  19.4M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:5): [True: 9.65M, False: 97.2k]
  |  |  |  |  |  Branch (806:6): [True: 9.74M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|  19.4M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|  9.74M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 9.65M, False: 97.2k]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 97.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|  19.4M|        : 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_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|  9.65M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:5): [True: 9.65M, False: 323]
  |  |  |  |  |  Branch (806:6): [True: 9.65M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|  9.65M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|  9.65M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 9.65M, False: 323]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 323]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|  9.65M|        : 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38356|  9.65M|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  839|  9.65M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |38357|  9.65M|            double x2 = janet_unwrap_number(op2);\
  |  |  ------------------
  |  |  |  |  839|  9.65M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |38358|  9.65M|            stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |38190|  9.65M|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |  834|  9.65M|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  822|  9.65M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  9.65M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  9.65M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38359|  9.65M|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |38244|  9.65M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|  9.65M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38360|  9.65M|        } else {\
  |  |38361|  97.5k|            vm_commit();\
  |  |  ------------------
  |  |  |  |38224|  97.5k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|  97.5k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|  97.5k|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 97.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38362|  97.5k|            Janet a = janet_wrap_boolean(janet_compare(op1, op2) op 0);\
  |  |  ------------------
  |  |  |  |  834|  97.5k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  822|  97.5k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  97.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  97.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38363|  97.5k|            stack = fiber->data + fiber->frame;\
  |  |38364|  97.5k|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |38190|  97.5k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |38365|  97.5k|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |38245|  97.5k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |38241|  97.5k|#define maybe_collect() do {\
  |  |  |  |  |  |38242|  97.5k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38242:9): [True: 0, False: 97.5k]
  |  |  |  |  |  |  |  Branch (38242:85): [Folded, False: 97.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |38244|  97.5k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38213|  97.5k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38366|  97.5k|        }\
  |  |38367|  9.74M|    }
  ------------------
39091|       |
39092|  9.74M|    VM_OP(JOP_GREATER_THAN_IMMEDIATE)
  ------------------
  |  |38211|   278k|#define VM_OP(op) label_##op :
  ------------------
39093|   278k|    vm_compop_imm( >);
  ------------------
  |  |38369|   278k|    {\
  |  |38370|   278k|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |38191|   278k|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |38371|   278k|        if (janet_checktype(op1, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|   278k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:5): [True: 278k, False: 175]
  |  |  |  |  |  Branch (806:6): [True: 278k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|   278k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|   278k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 278k, False: 175]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 175]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|   278k|        : 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38372|   278k|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  839|   278k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |38373|   278k|            double x2 = (double) CS; \
  |  |  ------------------
  |  |  |  |38197|   278k|#define CS (*((int32_t *)pc) >> 24)
  |  |  ------------------
  |  |38374|   278k|            stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |38190|   278k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |  834|   278k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  822|   278k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   278k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   278k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38375|   278k|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |38244|   278k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|   278k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38376|   278k|        } else {\
  |  |38377|    175|            vm_commit();\
  |  |  ------------------
  |  |  |  |38224|    175|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|    175|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|    175|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 175]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38378|    175|            Janet a = janet_wrap_boolean(janet_compare(op1, janet_wrap_integer(CS)) op 0);\
  |  |  ------------------
  |  |  |  |  834|    175|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  822|    175|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    175|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    175|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38379|    175|            stack = fiber->data + fiber->frame;\
  |  |38380|    175|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |38190|    175|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |38381|    175|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |38245|    175|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |38241|    175|#define maybe_collect() do {\
  |  |  |  |  |  |38242|    175|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38242:9): [True: 7, False: 168]
  |  |  |  |  |  |  |  Branch (38242:85): [Folded, False: 175]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |38244|    175|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |38213|    175|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38382|    175|        }\
  |  |38383|   278k|    }
  ------------------
39094|       |
39095|   236M|    VM_OP(JOP_EQUALS)
  ------------------
  |  |38211|   236M|#define VM_OP(op) label_##op :
  ------------------
39096|   236M|    stack[A] = janet_wrap_boolean(janet_equals(stack[B], stack[C]));
  ------------------
  |  |38190|   236M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  stack[A] = janet_wrap_boolean(janet_equals(stack[B], stack[C]));
  ------------------
  |  |  834|   236M|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|   236M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   236M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   236M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39097|   236M|    vm_pcnext();
  ------------------
  |  |38244|   236M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|   236M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39098|       |
39099|   236M|    VM_OP(JOP_EQUALS_IMMEDIATE)
  ------------------
  |  |38211|   210M|#define VM_OP(op) label_##op :
  ------------------
39100|   210M|    stack[A] = janet_wrap_boolean(janet_checktype(stack[B], JANET_NUMBER) && (janet_unwrap_number(stack[B]) == (double) CS));
  ------------------
  |  |38190|   210M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  stack[A] = janet_wrap_boolean(janet_checktype(stack[B], JANET_NUMBER) && (janet_unwrap_number(stack[B]) == (double) CS));
  ------------------
  |  |  834|   210M|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|  1.05G|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   210M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   210M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (822:51): [True: 210M, False: 182k]
  |  |  |  |  |  Branch (822:51): [True: 0, False: 182k]
  |  |  |  |  |  Branch (822:51): [True: 210M, Folded]
  |  |  |  |  |  Branch (822:51): [True: 210M, False: 182k]
  |  |  |  |  |  Branch (822:51): [True: 16.8M, False: 193M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39101|   210M|    vm_pcnext();
  ------------------
  |  |38244|   210M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|   210M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39102|       |
39103|   210M|    VM_OP(JOP_NOT_EQUALS)
  ------------------
  |  |38211|  62.9M|#define VM_OP(op) label_##op :
  ------------------
39104|  62.9M|    stack[A] = janet_wrap_boolean(!janet_equals(stack[B], stack[C]));
  ------------------
  |  |38190|  62.9M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  stack[A] = janet_wrap_boolean(!janet_equals(stack[B], stack[C]));
  ------------------
  |  |  834|  62.9M|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|  62.9M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  62.9M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  62.9M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39105|  62.9M|    vm_pcnext();
  ------------------
  |  |38244|  62.9M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|  62.9M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39106|       |
39107|  62.9M|    VM_OP(JOP_NOT_EQUALS_IMMEDIATE)
  ------------------
  |  |38211|  55.6M|#define VM_OP(op) label_##op :
  ------------------
39108|  55.6M|    stack[A] = janet_wrap_boolean(!janet_checktype(stack[B], JANET_NUMBER) || (janet_unwrap_number(stack[B]) != (double) CS));
  ------------------
  |  |38190|  55.6M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  stack[A] = janet_wrap_boolean(!janet_checktype(stack[B], JANET_NUMBER) || (janet_unwrap_number(stack[B]) != (double) CS));
  ------------------
  |  |  834|  55.6M|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|   278M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  55.6M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  55.6M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (822:51): [True: 55.6M, False: 0]
  |  |  |  |  |  Branch (822:51): [True: 0, False: 0]
  |  |  |  |  |  Branch (822:51): [True: 55.6M, Folded]
  |  |  |  |  |  Branch (822:51): [True: 0, False: 55.6M]
  |  |  |  |  |  Branch (822:51): [True: 55.1M, False: 548k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39109|  55.6M|    vm_pcnext();
  ------------------
  |  |38244|  55.6M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|  55.6M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39110|       |
39111|  55.6M|    VM_OP(JOP_COMPARE) {
  ------------------
  |  |38211|  12.7k|#define VM_OP(op) label_##op :
  ------------------
39112|  12.7k|        Janet a = janet_wrap_integer(janet_compare(stack[B], stack[C]));
  ------------------
  |  |  967|  12.7k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  12.7k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
39113|  12.7k|        stack = fiber->data + fiber->frame;
39114|  12.7k|        stack[A] = a;
  ------------------
  |  |38190|  12.7k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
39115|  12.7k|    }
39116|  12.7k|    vm_pcnext();
  ------------------
  |  |38244|  12.7k|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|  12.7k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39117|       |
39118|   205M|    VM_OP(JOP_NEXT) {
  ------------------
  |  |38211|   205M|#define VM_OP(op) label_##op :
  ------------------
39119|   205M|        Janet ds = stack[B];
  ------------------
  |  |38191|   205M|#define B ((*pc >> 16) & 0xFF)
  ------------------
39120|   205M|        Janet key = stack[C];
  ------------------
  |  |38192|   205M|#define C (*pc >> 24)
  ------------------
39121|   205M|        int32_t index = -1;
39122|       |        /* Stays -1 when ds is neither an array nor a tuple */
39123|   205M|        int32_t len = -1;
39124|   205M|        if (janet_checktype(ds, JANET_ARRAY)) {
  ------------------
  |  |  806|   205M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 5.92M, False: 199M]
  |  |  |  Branch (806:6): [Folded, False: 205M]
  |  |  ------------------
  |  |  807|   205M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   205M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   205M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   205M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   205M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   205M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39125|  5.92M|            len = janet_unwrap_array(ds)->count;
  ------------------
  |  |  860|  5.92M|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
39126|   199M|        } else if (janet_checktype(ds, JANET_TUPLE)) {
  ------------------
  |  |  806|   199M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 46.8M, False: 152M]
  |  |  |  Branch (806:6): [Folded, False: 199M]
  |  |  ------------------
  |  |  807|   199M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   199M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   199M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   199M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   199M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   199M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39127|  46.8M|            len = janet_tuple_length(janet_unwrap_tuple(ds));
  ------------------
  |  | 1802|  46.8M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  46.8M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
39128|  46.8M|        }
39129|   205M|        if (len >= 0 && (janet_checktype(key, JANET_NIL) || vm_seq_index(key, len, &index))) {
  ------------------
  |  |  806|   105M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 17.5M, False: 35.2M]
  |  |  |  Branch (806:6): [Folded, False: 52.8M]
  |  |  ------------------
  |  |  807|   105M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   105M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  52.8M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  52.8M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  52.8M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  52.8M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (39129:13): [True: 52.8M, False: 152M]
  |  Branch (39129:61): [True: 35.2M, False: 0]
  ------------------
39130|  52.8M|            int32_t next = index + 1;
39131|  52.8M|            stack[A] = next < len ? janet_wrap_integer(next) : janet_wrap_nil();
  ------------------
  |  |38190|  52.8M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                          stack[A] = next < len ? janet_wrap_integer(next) : janet_wrap_nil();
  ------------------
  |  |  967|  40.4M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  40.4M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
                          stack[A] = next < len ? janet_wrap_integer(next) : janet_wrap_nil();
  ------------------
  |  |  831|  12.3M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  65.1M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  12.3M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  12.3M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (39131:24): [True: 40.4M, False: 12.3M]
  ------------------
39132|  52.8M|            vm_pcnext();
  ------------------
  |  |38244|  52.8M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|  52.8M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39133|   152M|        } else {
39134|   152M|            vm_commit();
  ------------------
  |  |38224|   152M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  831|   152M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|   152M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38224:70): [Folded, False: 152M]
  |  |  ------------------
  ------------------
39135|   152M|            Janet temp = janet_next_impl(ds, key, 1);
39136|   152M|            vm_restore();
  ------------------
  |  |38225|   152M|#define vm_restore() do { \
  |  |38226|   152M|    stack = fiber->data + fiber->frame; \
  |  |38227|   152M|    pc = janet_stack_frame(stack)->pc; \
  |  |  ------------------
  |  |  |  |  831|   152M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|   152M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38228|   152M|    func = janet_stack_frame(stack)->func; \
  |  |  ------------------
  |  |  |  |  831|   152M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|   152M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38229|   152M|} while (0)
  |  |  ------------------
  |  |  |  Branch (38229:10): [Folded, False: 152M]
  |  |  ------------------
  ------------------
39137|   152M|            stack[A] = temp;
  ------------------
  |  |38190|   152M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
39138|   152M|            vm_pcnext();
  ------------------
  |  |38244|   152M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|   152M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39139|   152M|        }
39140|   205M|    }
39141|       |
39142|   205M|    VM_OP(JOP_LOAD_NIL)
  ------------------
  |  |38211|  28.3M|#define VM_OP(op) label_##op :
  ------------------
39143|  28.3M|    stack[D] = janet_wrap_nil();
  ------------------
  |  |38193|  28.3M|#define D (*pc >> 8)
  ------------------
                  stack[D] = janet_wrap_nil();
  ------------------
  |  |  831|  28.3M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  28.3M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  28.3M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  28.3M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39144|  28.3M|    vm_pcnext();
  ------------------
  |  |38244|  28.3M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|  28.3M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39145|       |
39146|  28.3M|    VM_OP(JOP_LOAD_TRUE)
  ------------------
  |  |38211|  5.10M|#define VM_OP(op) label_##op :
  ------------------
39147|  5.10M|    stack[D] = janet_wrap_true();
  ------------------
  |  |38193|  5.10M|#define D (*pc >> 8)
  ------------------
                  stack[D] = janet_wrap_true();
  ------------------
  |  |  832|  5.10M|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  822|  5.10M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.10M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.10M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39148|  5.10M|    vm_pcnext();
  ------------------
  |  |38244|  5.10M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|  5.10M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39149|       |
39150|  11.3M|    VM_OP(JOP_LOAD_FALSE)
  ------------------
  |  |38211|  11.3M|#define VM_OP(op) label_##op :
  ------------------
39151|  11.3M|    stack[D] = janet_wrap_false();
  ------------------
  |  |38193|  11.3M|#define D (*pc >> 8)
  ------------------
                  stack[D] = janet_wrap_false();
  ------------------
  |  |  833|  11.3M|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|  11.3M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  11.3M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  11.3M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39152|  11.3M|    vm_pcnext();
  ------------------
  |  |38244|  11.3M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|  11.3M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39153|       |
39154|  68.2M|    VM_OP(JOP_LOAD_INTEGER)
  ------------------
  |  |38211|  68.2M|#define VM_OP(op) label_##op :
  ------------------
39155|  68.2M|    stack[A] = janet_wrap_integer(ES);
  ------------------
  |  |38190|  68.2M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  stack[A] = janet_wrap_integer(ES);
  ------------------
  |  |  967|  68.2M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  68.2M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
39156|  68.2M|    vm_pcnext();
  ------------------
  |  |38244|  68.2M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|  68.2M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39157|       |
39158|  1.17G|    VM_OP(JOP_LOAD_CONSTANT) {
  ------------------
  |  |38211|  1.17G|#define VM_OP(op) label_##op :
  ------------------
39159|  1.17G|        int32_t cindex = (int32_t)E;
  ------------------
  |  |38194|  1.17G|#define E (*pc >> 16)
  ------------------
39160|  1.17G|        vm_assert(cindex < func->def->constants_length, "invalid constant");
  ------------------
  |  |38249|  1.17G|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |38248|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38248:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38249:36): [True: 0, False: 1.17G]
  |  |  |  Branch (38249:69): [Folded, False: 1.17G]
  |  |  ------------------
  ------------------
39161|  1.17G|        stack[A] = func->def->constants[cindex];
  ------------------
  |  |38190|  1.17G|#define A ((*pc >> 8)  & 0xFF)
  ------------------
39162|  1.17G|        vm_pcnext();
  ------------------
  |  |38244|  1.17G|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|  1.17G|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39163|  1.17G|    }
39164|       |
39165|  3.27G|    VM_OP(JOP_LOAD_SELF)
  ------------------
  |  |38211|  3.27G|#define VM_OP(op) label_##op :
  ------------------
39166|  3.27G|    stack[D] = janet_wrap_function(func);
  ------------------
  |  |38193|  3.27G|#define D (*pc >> 8)
  ------------------
                  stack[D] = janet_wrap_function(func);
  ------------------
  |  |  852|  3.27G|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  825|  3.27G|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.27G|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.27G|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39167|  3.27G|    vm_pcnext();
  ------------------
  |  |38244|  3.27G|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|  3.27G|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39168|       |
39169|  3.27G|    VM_OP(JOP_LOAD_UPVALUE) {
  ------------------
  |  |38211|   461M|#define VM_OP(op) label_##op :
  ------------------
39170|   461M|        int32_t eindex = B;
  ------------------
  |  |38191|   461M|#define B ((*pc >> 16) & 0xFF)
  ------------------
39171|   461M|        int32_t vindex = C;
  ------------------
  |  |38192|   461M|#define C (*pc >> 24)
  ------------------
39172|   461M|        JanetFuncEnv *env;
39173|   461M|        vm_assert(func->def->environments_length > eindex, "invalid upvalue environment");
  ------------------
  |  |38249|   461M|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |38248|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38248:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38249:36): [True: 0, False: 461M]
  |  |  |  Branch (38249:69): [Folded, False: 461M]
  |  |  ------------------
  ------------------
39174|   461M|        env = func->envs[eindex];
39175|   461M|        vm_assert(env->length > vindex, "invalid upvalue index");
  ------------------
  |  |38249|   461M|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |38248|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38248:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38249:36): [True: 0, False: 461M]
  |  |  |  Branch (38249:69): [Folded, False: 461M]
  |  |  ------------------
  ------------------
39176|   461M|        vm_assert(janet_env_valid(env), "invalid upvalue environment");
  ------------------
  |  |38249|   461M|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |38248|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38248:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38249:36): [True: 0, False: 461M]
  |  |  |  Branch (38249:69): [Folded, False: 461M]
  |  |  ------------------
  ------------------
39177|   461M|        if (env->offset > 0) {
  ------------------
  |  Branch (39177:13): [True: 460M, False: 773k]
  ------------------
39178|       |            /* On stack */
39179|   460M|            stack[A] = env->as.fiber->data[env->offset + vindex];
  ------------------
  |  |38190|   460M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
39180|   460M|        } else {
39181|       |            /* Off stack */
39182|   773k|            stack[A] = env->as.values[vindex];
  ------------------
  |  |38190|   773k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
39183|   773k|        }
39184|   461M|        vm_pcnext();
  ------------------
  |  |38244|   461M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|   461M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39185|   461M|    }
39186|       |
39187|  90.3M|    VM_OP(JOP_SET_UPVALUE) {
  ------------------
  |  |38211|  90.3M|#define VM_OP(op) label_##op :
  ------------------
39188|  90.3M|        int32_t eindex = B;
  ------------------
  |  |38191|  90.3M|#define B ((*pc >> 16) & 0xFF)
  ------------------
39189|  90.3M|        int32_t vindex = C;
  ------------------
  |  |38192|  90.3M|#define C (*pc >> 24)
  ------------------
39190|  90.3M|        JanetFuncEnv *env;
39191|  90.3M|        vm_assert(func->def->environments_length > eindex, "invalid upvalue environment");
  ------------------
  |  |38249|  90.3M|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |38248|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38248:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38249:36): [True: 0, False: 90.3M]
  |  |  |  Branch (38249:69): [Folded, False: 90.3M]
  |  |  ------------------
  ------------------
39192|  90.3M|        env = func->envs[eindex];
39193|  90.3M|        vm_assert(env->length > vindex, "invalid upvalue index");
  ------------------
  |  |38249|  90.3M|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |38248|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38248:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38249:36): [True: 0, False: 90.3M]
  |  |  |  Branch (38249:69): [Folded, False: 90.3M]
  |  |  ------------------
  ------------------
39194|  90.3M|        vm_assert(janet_env_valid(env), "invalid upvalue environment");
  ------------------
  |  |38249|  90.3M|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |38248|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38248:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38249:36): [True: 0, False: 90.3M]
  |  |  |  Branch (38249:69): [Folded, False: 90.3M]
  |  |  ------------------
  ------------------
39195|  90.3M|        if (env->offset > 0) {
  ------------------
  |  Branch (39195:13): [True: 90.3M, False: 2.03k]
  ------------------
39196|  90.3M|            env->as.fiber->data[env->offset + vindex] = stack[A];
  ------------------
  |  |38190|  90.3M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
39197|  90.3M|        } else {
39198|  2.03k|            env->as.values[vindex] = stack[A];
  ------------------
  |  |38190|  2.03k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
39199|  2.03k|        }
39200|  90.3M|        vm_pcnext();
  ------------------
  |  |38244|  90.3M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|  90.3M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39201|  90.3M|    }
39202|       |
39203|  3.28G|    VM_OP(JOP_CLOSURE) {
  ------------------
  |  |38211|  3.28G|#define VM_OP(op) label_##op :
  ------------------
39204|  3.28G|        JanetFuncDef *fd;
39205|  3.28G|        JanetFunction *fn;
39206|  3.28G|        int32_t elen;
39207|  3.28G|        int32_t defindex = (int32_t)E;
  ------------------
  |  |38194|  3.28G|#define E (*pc >> 16)
  ------------------
39208|  3.28G|        vm_assert(defindex < func->def->defs_length, "invalid funcdef");
  ------------------
  |  |38249|  3.28G|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |38248|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38248:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38249:36): [True: 0, False: 3.28G]
  |  |  |  Branch (38249:69): [Folded, False: 3.28G]
  |  |  ------------------
  ------------------
39209|  3.28G|        fd = func->def->defs[defindex];
39210|  3.28G|        elen = fd->environments_length;
39211|  3.28G|        fn = janet_gcalloc(JANET_MEMORY_FUNCTION, sizeof(JanetFunction) + ((size_t) elen * sizeof(JanetFuncEnv *)));
39212|  3.28G|        fn->def = fd;
39213|  3.28G|        {
39214|  3.28G|            int32_t i;
39215|  3.37G|            for (i = 0; i < elen; ++i) {
  ------------------
  |  Branch (39215:25): [True: 94.6M, False: 3.28G]
  ------------------
39216|  94.6M|                int32_t inherit = fd->environments[i];
39217|  94.6M|                if (inherit < 0 || inherit >= func->def->environments_length) {
  ------------------
  |  Branch (39217:21): [True: 90.8M, False: 3.85M]
  |  Branch (39217:36): [True: 0, False: 3.85M]
  ------------------
39218|  90.8M|                    JanetStackFrame *frame = janet_stack_frame(stack);
  ------------------
  |  |  831|  90.8M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1026|  90.8M|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
39219|  90.8M|                    if (!frame->env) {
  ------------------
  |  Branch (39219:25): [True: 15.0M, False: 75.7M]
  ------------------
39220|       |                        /* Lazy capture of current stack frame */
39221|  15.0M|                        JanetFuncEnv *env = janet_gcalloc(JANET_MEMORY_FUNCENV, sizeof(JanetFuncEnv));
39222|  15.0M|                        env->offset = fiber->frame;
39223|  15.0M|                        env->as.fiber = fiber;
39224|  15.0M|                        env->length = func->def->slotcount;
39225|  15.0M|                        frame->env = env;
39226|  15.0M|                    }
39227|  90.8M|                    fn->envs[i] = frame->env;
39228|  90.8M|                } else {
39229|  3.85M|                    fn->envs[i] = func->envs[inherit];
39230|  3.85M|                }
39231|  94.6M|            }
39232|  3.28G|        }
39233|  3.28G|        stack[A] = janet_wrap_function(fn);
  ------------------
  |  |38190|  3.28G|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                      stack[A] = janet_wrap_function(fn);
  ------------------
  |  |  852|  3.28G|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  825|  3.28G|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.28G|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.28G|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39234|  3.28G|        vm_checkgc_pcnext();
  ------------------
  |  |38245|  3.28G|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38241|  3.28G|#define maybe_collect() do {\
  |  |  |  |38242|  3.28G|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 65.1M, False: 3.22G]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 3.28G]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38244|  3.28G|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|  3.28G|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39235|  3.28G|    }
39236|       |
39237|   403M|    VM_OP(JOP_PUSH)
  ------------------
  |  |38211|   403M|#define VM_OP(op) label_##op :
  ------------------
39238|   403M|    janet_fiber_push(fiber, stack[D]);
  ------------------
  |  |38193|   403M|#define D (*pc >> 8)
  ------------------
39239|   403M|    stack = fiber->data + fiber->frame;
39240|   403M|    vm_checkgc_pcnext();
  ------------------
  |  |38245|   403M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38241|   403M|#define maybe_collect() do {\
  |  |  |  |38242|   403M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 206M, False: 197M]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 403M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38244|   403M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|   403M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39241|       |
39242|   403M|    VM_OP(JOP_PUSH_2)
  ------------------
  |  |38211|   374M|#define VM_OP(op) label_##op :
  ------------------
39243|   374M|    janet_fiber_push2(fiber, stack[A], stack[E]);
  ------------------
  |  |38190|   374M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  janet_fiber_push2(fiber, stack[A], stack[E]);
  ------------------
  |  |38194|   374M|#define E (*pc >> 16)
  ------------------
39244|   374M|    stack = fiber->data + fiber->frame;
39245|   374M|    vm_checkgc_pcnext();
  ------------------
  |  |38245|   374M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38241|   374M|#define maybe_collect() do {\
  |  |  |  |38242|   374M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 90.2M, False: 284M]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 374M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38244|   374M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|   374M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39246|       |
39247|   374M|    VM_OP(JOP_PUSH_3)
  ------------------
  |  |38211|   118M|#define VM_OP(op) label_##op :
  ------------------
39248|   118M|    janet_fiber_push3(fiber, stack[A], stack[B], stack[C]);
  ------------------
  |  |38190|   118M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  janet_fiber_push3(fiber, stack[A], stack[B], stack[C]);
  ------------------
  |  |38191|   118M|#define B ((*pc >> 16) & 0xFF)
  ------------------
                  janet_fiber_push3(fiber, stack[A], stack[B], stack[C]);
  ------------------
  |  |38192|   118M|#define C (*pc >> 24)
  ------------------
39249|   118M|    stack = fiber->data + fiber->frame;
39250|   118M|    vm_checkgc_pcnext();
  ------------------
  |  |38245|   118M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38241|   118M|#define maybe_collect() do {\
  |  |  |  |38242|   118M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 58.6M, False: 59.7M]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 118M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38244|   118M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|   118M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39251|       |
39252|   118M|    VM_OP(JOP_PUSH_ARRAY) {
  ------------------
  |  |38211|  19.8M|#define VM_OP(op) label_##op :
  ------------------
39253|  19.8M|        const Janet *vals;
39254|  19.8M|        int32_t len;
39255|  19.8M|        if (janet_indexed_view(stack[D], &vals, &len)) {
  ------------------
  |  |38193|  19.8M|#define D (*pc >> 8)
  ------------------
  |  Branch (39255:13): [True: 19.8M, False: 26]
  ------------------
39256|  19.8M|            janet_fiber_pushn(fiber, vals, len);
39257|  19.8M|        } else {
39258|     26|            janet_panicf("expected %T, got %v", JANET_TFLAG_INDEXED, stack[D]);
  ------------------
  |  |  613|     26|#define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  ------------------
  |  |  |  |  602|     26|#define JANET_TFLAG_ARRAY (1 << JANET_ARRAY)
  |  |  ------------------
  |  |               #define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  ------------------
  |  |  |  |  603|     26|#define JANET_TFLAG_TUPLE (1 << JANET_TUPLE)
  |  |  ------------------
  ------------------
                          janet_panicf("expected %T, got %v", JANET_TFLAG_INDEXED, stack[D]);
  ------------------
  |  |38193|     26|#define D (*pc >> 8)
  ------------------
39259|     26|        }
39260|  19.8M|    }
39261|  19.8M|    stack = fiber->data + fiber->frame;
39262|  19.8M|    vm_checkgc_pcnext();
  ------------------
  |  |38245|  19.8M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38241|  19.8M|#define maybe_collect() do {\
  |  |  |  |38242|  19.8M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 15.8M, False: 3.99M]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 19.8M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38244|  19.8M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|  19.8M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39263|       |
39264|   607M|    VM_OP(JOP_CALL) {
  ------------------
  |  |38211|   607M|#define VM_OP(op) label_##op :
  ------------------
39265|   607M|        vm_maybe_auto_suspend(1);
  ------------------
  |  |38265|   607M|#define vm_maybe_auto_suspend(COND) do { \
  |  |38266|   607M|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (38266:9): [True: 607M, Folded]
  |  |  |  Branch (38266:19): [True: 0, False: 607M]
  |  |  ------------------
  |  |38267|      0|        fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  812|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  |  |  ------------------
  |  |                       fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  813|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  |  |  ------------------
  |  |38268|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |38230|      0|#define vm_return(sig, val) do { \
  |  |  |  |38231|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |38232|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38233|      0|    return (sig); \
  |  |  |  |38234|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38234:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38269|      0|    } \
  |  |38270|   607M|} while (0)
  |  |  ------------------
  |  |  |  Branch (38270:10): [Folded, False: 607M]
  |  |  ------------------
  ------------------
39266|   607M|        Janet callee = stack[E];
  ------------------
  |  |38194|   607M|#define E (*pc >> 16)
  ------------------
39267|   607M|        if (fiber->stacktop > fiber->maxstack) {
  ------------------
  |  Branch (39267:13): [True: 0, False: 607M]
  ------------------
39268|      0|            vm_throw("stack overflow");
  ------------------
  |  |38248|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  ------------------
  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38248:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
39269|      0|        }
39270|   607M|        if (janet_checktype(callee, JANET_KEYWORD)) {
  ------------------
  |  |  806|   607M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 2.16M, False: 605M]
  |  |  |  Branch (806:6): [Folded, False: 607M]
  |  |  ------------------
  |  |  807|   607M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   607M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   607M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   607M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   607M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   607M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39271|  2.16M|            vm_commit();
  ------------------
  |  |38224|  2.16M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  831|  2.16M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  2.16M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38224:70): [Folded, False: 2.16M]
  |  |  ------------------
  ------------------
39272|  2.16M|            callee = resolve_method(callee, fiber);
39273|  2.16M|        }
39274|   607M|        if (janet_checktype(callee, JANET_FUNCTION)) {
  ------------------
  |  |  806|   607M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 200M, False: 407M]
  |  |  |  Branch (806:6): [Folded, False: 607M]
  |  |  ------------------
  |  |  807|   607M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   607M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   607M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   607M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   607M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   607M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39275|   200M|            func = janet_unwrap_function(callee);
  ------------------
  |  |  868|   200M|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
39276|   200M|            if (func->gc.flags & JANET_FUNCFLAG_TRACE) {
  ------------------
  |  | 1164|   200M|#define JANET_FUNCFLAG_TRACE (1 << 16)
  ------------------
  |  Branch (39276:17): [True: 23, False: 200M]
  ------------------
39277|     23|                vm_do_trace(func, fiber->stacktop - fiber->stackstart, fiber->data + fiber->stackstart);
  ------------------
  |  |38449|     23|#define vm_do_trace(func, argc, argv) do { \
  |  |38450|     23|    JanetFunction* _func = (func);\
  |  |38451|     23|    if (_func->def->name) {\
  |  |  ------------------
  |  |  |  Branch (38451:9): [True: 23, False: 0]
  |  |  ------------------
  |  |38452|     23|        janet_eprintf("trace (%S", _func->def->name);\
  |  |  ------------------
  |  |  |  | 2195|     23|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |38453|     23|    } else {\
  |  |38454|      0|        janet_eprintf("trace (%p", janet_wrap_function(_func));\
  |  |  ------------------
  |  |  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |38455|      0|    }\
  |  |38456|     23|    int32_t _argc = (argc);\
  |  |38457|    147|    for (int32_t i = 0; i < _argc; i++) {\
  |  |  ------------------
  |  |  |  Branch (38457:25): [True: 124, False: 23]
  |  |  ------------------
  |  |38458|    124|        janet_eprintf(" %p", (argv)[i]);\
  |  |  ------------------
  |  |  |  | 2195|    124|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |38459|    124|    }\
  |  |38460|     23|    janet_eprintf(")\n");\
  |  |  ------------------
  |  |  |  | 2195|     23|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |38461|     23|} while (0)
  |  |  ------------------
  |  |  |  Branch (38461:10): [Folded, False: 23]
  |  |  ------------------
  ------------------
39278|     23|            }
39279|   200M|            vm_commit();
  ------------------
  |  |38224|   200M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  831|   200M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|   200M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38224:70): [Folded, False: 200M]
  |  |  ------------------
  ------------------
39280|   200M|            if (janet_fiber_funcframe(fiber, func)) {
  ------------------
  |  Branch (39280:17): [True: 15, False: 200M]
  ------------------
39281|     15|                int32_t n = fiber->stacktop - fiber->stackstart;
39282|     15|                janet_panicf("%v called with %d argument%s, expected %d",
39283|     15|                             callee, n, n == 1 ? "" : "s", func->def->arity);
  ------------------
  |  Branch (39283:41): [True: 9, False: 6]
  ------------------
39284|     15|            }
39285|   200M|            stack = fiber->data + fiber->frame;
39286|   200M|            pc = func->def->bytecode;
39287|   200M|            vm_checkgc_next();
  ------------------
  |  |38243|   200M|#define vm_checkgc_next() maybe_collect(); vm_next()
  |  |  ------------------
  |  |  |  |38241|   200M|#define maybe_collect() do {\
  |  |  |  |38242|   200M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 79.5M, False: 120M]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 200M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_next() maybe_collect(); vm_next()
  |  |  ------------------
  |  |  |  |38213|   200M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39288|   407M|        } else if (janet_checktype(callee, JANET_CFUNCTION)) {
  ------------------
  |  |  806|   407M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 363M, False: 43.9M]
  |  |  |  Branch (806:6): [Folded, False: 407M]
  |  |  ------------------
  |  |  807|   407M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   407M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   407M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   407M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   407M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   407M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39289|   363M|            vm_commit();
  ------------------
  |  |38224|   363M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  831|   363M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|   363M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38224:70): [Folded, False: 363M]
  |  |  ------------------
  ------------------
39290|   363M|            int32_t argc = fiber->stacktop - fiber->stackstart;
39291|   363M|            janet_fiber_cframe(fiber, janet_unwrap_cfunction(callee));
  ------------------
  |  |  869|   363M|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
39292|   363M|            Janet ret = janet_unwrap_cfunction(callee)(argc, fiber->data + fiber->frame);
  ------------------
  |  |  869|   363M|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
39293|   363M|            janet_fiber_popframe(fiber);
39294|   363M|            stack = fiber->data + fiber->frame;
39295|   363M|            stack[A] = ret;
  ------------------
  |  |38190|   363M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
39296|   363M|            vm_checkgc_pcnext();
  ------------------
  |  |38245|   363M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38241|   363M|#define maybe_collect() do {\
  |  |  |  |38242|   363M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 171M, False: 192M]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 363M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38244|   363M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|   363M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39297|   363M|        } else {
39298|  43.9M|            vm_commit();
  ------------------
  |  |38224|  43.9M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  831|  43.9M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  43.9M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38224:70): [Folded, False: 43.9M]
  |  |  ------------------
  ------------------
39299|  43.9M|            stack[A] = call_nonfn(fiber, callee);
  ------------------
  |  |38190|  43.9M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
39300|  43.9M|            vm_pcnext();
  ------------------
  |  |38244|  43.9M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|  43.9M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39301|  43.9M|        }
39302|   607M|    }
39303|       |
39304|  3.27G|    VM_OP(JOP_TAILCALL) {
  ------------------
  |  |38211|  3.27G|#define VM_OP(op) label_##op :
  ------------------
39305|  3.27G|        vm_maybe_auto_suspend(1);
  ------------------
  |  |38265|  3.27G|#define vm_maybe_auto_suspend(COND) do { \
  |  |38266|  3.27G|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (38266:9): [True: 3.27G, Folded]
  |  |  |  Branch (38266:19): [True: 0, False: 3.27G]
  |  |  ------------------
  |  |38267|      0|        fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  812|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  |  |  ------------------
  |  |                       fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  813|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  |  |  ------------------
  |  |38268|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |38230|      0|#define vm_return(sig, val) do { \
  |  |  |  |38231|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |38232|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38233|      0|    return (sig); \
  |  |  |  |38234|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38234:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38269|      0|    } \
  |  |38270|  3.27G|} while (0)
  |  |  ------------------
  |  |  |  Branch (38270:10): [Folded, False: 3.27G]
  |  |  ------------------
  ------------------
39306|  3.27G|        Janet callee = stack[D];
  ------------------
  |  |38193|  3.27G|#define D (*pc >> 8)
  ------------------
39307|  3.27G|        if (fiber->stacktop > fiber->maxstack) {
  ------------------
  |  Branch (39307:13): [True: 0, False: 3.27G]
  ------------------
39308|      0|            vm_throw("stack overflow");
  ------------------
  |  |38248|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  ------------------
  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38248:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
39309|      0|        }
39310|  3.27G|        if (janet_checktype(callee, JANET_KEYWORD)) {
  ------------------
  |  |  806|  3.27G|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 319k, False: 3.27G]
  |  |  |  Branch (806:6): [Folded, False: 3.27G]
  |  |  ------------------
  |  |  807|  3.27G|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  3.27G|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  3.27G|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  3.27G|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.27G|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.27G|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39311|   319k|            vm_commit();
  ------------------
  |  |38224|   319k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  831|   319k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|   319k|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38224:70): [Folded, False: 319k]
  |  |  ------------------
  ------------------
39312|   319k|            callee = resolve_method(callee, fiber);
39313|   319k|        }
39314|  3.27G|        if (janet_checktype(callee, JANET_FUNCTION)) {
  ------------------
  |  |  806|  3.27G|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 3.26G, False: 13.5M]
  |  |  |  Branch (806:6): [Folded, False: 3.27G]
  |  |  ------------------
  |  |  807|  3.27G|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  3.27G|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  3.27G|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  3.27G|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.27G|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.27G|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39315|  3.26G|            func = janet_unwrap_function(callee);
  ------------------
  |  |  868|  3.26G|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
39316|  3.26G|            if (func->gc.flags & JANET_FUNCFLAG_TRACE) {
  ------------------
  |  | 1164|  3.26G|#define JANET_FUNCFLAG_TRACE (1 << 16)
  ------------------
  |  Branch (39316:17): [True: 0, False: 3.26G]
  ------------------
39317|      0|                vm_do_trace(func, fiber->stacktop - fiber->stackstart, fiber->data + fiber->stackstart);
  ------------------
  |  |38449|      0|#define vm_do_trace(func, argc, argv) do { \
  |  |38450|      0|    JanetFunction* _func = (func);\
  |  |38451|      0|    if (_func->def->name) {\
  |  |  ------------------
  |  |  |  Branch (38451:9): [True: 0, False: 0]
  |  |  ------------------
  |  |38452|      0|        janet_eprintf("trace (%S", _func->def->name);\
  |  |  ------------------
  |  |  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |38453|      0|    } else {\
  |  |38454|      0|        janet_eprintf("trace (%p", janet_wrap_function(_func));\
  |  |  ------------------
  |  |  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |38455|      0|    }\
  |  |38456|      0|    int32_t _argc = (argc);\
  |  |38457|      0|    for (int32_t i = 0; i < _argc; i++) {\
  |  |  ------------------
  |  |  |  Branch (38457:25): [True: 0, False: 0]
  |  |  ------------------
  |  |38458|      0|        janet_eprintf(" %p", (argv)[i]);\
  |  |  ------------------
  |  |  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |38459|      0|    }\
  |  |38460|      0|    janet_eprintf(")\n");\
  |  |  ------------------
  |  |  |  | 2195|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |38461|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (38461:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
39318|      0|            }
39319|  3.26G|            if (janet_fiber_funcframe_tail(fiber, func)) {
  ------------------
  |  Branch (39319:17): [True: 13, False: 3.26G]
  ------------------
39320|     13|                janet_stack_frame(fiber->data + fiber->frame)->pc = pc;
  ------------------
  |  |  831|     13|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1026|     13|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
39321|     13|                int32_t n = fiber->stacktop - fiber->stackstart;
39322|     13|                janet_panicf("%v called with %d argument%s, expected %d",
39323|     13|                             callee, n, n == 1 ? "" : "s", func->def->arity);
  ------------------
  |  Branch (39323:41): [True: 0, False: 13]
  ------------------
39324|     13|            }
39325|  3.26G|            stack = fiber->data + fiber->frame;
39326|  3.26G|            pc = func->def->bytecode;
39327|  3.26G|            vm_checkgc_next();
  ------------------
  |  |38243|  3.26G|#define vm_checkgc_next() maybe_collect(); vm_next()
  |  |  ------------------
  |  |  |  |38241|  3.26G|#define maybe_collect() do {\
  |  |  |  |38242|  3.26G|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 30.0M, False: 3.23G]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 3.26G]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_next() maybe_collect(); vm_next()
  |  |  ------------------
  |  |  |  |38213|  3.26G|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39328|  3.26G|        } else {
39329|  13.5M|            Janet retreg;
39330|  13.5M|            int entrance_frame = janet_stack_frame(stack)->flags & JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  |  831|  13.5M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1026|  13.5M|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
                          int entrance_frame = janet_stack_frame(stack)->flags & JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  | 1013|  13.5M|#define JANET_STACKFRAME_ENTRANCE 2
  ------------------
39331|  13.5M|            vm_commit();
  ------------------
  |  |38224|  13.5M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  831|  13.5M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  13.5M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38224:70): [Folded, False: 13.5M]
  |  |  ------------------
  ------------------
39332|  14.2M|            if (janet_checktype(callee, JANET_CFUNCTION)) {
  ------------------
  |  |  806|  13.5M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 14.2M, False: 18.4E]
  |  |  |  Branch (806:6): [Folded, False: 13.5M]
  |  |  ------------------
  |  |  807|  13.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|  13.5M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  13.5M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  13.5M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  13.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  13.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39333|  14.2M|                int32_t argc = fiber->stacktop - fiber->stackstart;
39334|  14.2M|                janet_fiber_cframe(fiber, janet_unwrap_cfunction(callee));
  ------------------
  |  |  869|  14.2M|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
39335|  14.2M|                retreg = janet_unwrap_cfunction(callee)(argc, fiber->data + fiber->frame);
  ------------------
  |  |  869|  14.2M|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
39336|  14.2M|                janet_fiber_popframe(fiber);
39337|  18.4E|            } else {
39338|  18.4E|                retreg = call_nonfn(fiber, callee);
39339|  18.4E|            }
39340|  13.5M|            janet_fiber_popframe(fiber);
39341|  13.5M|            if (entrance_frame) {
  ------------------
  |  Branch (39341:17): [True: 2.11k, False: 13.5M]
  ------------------
39342|  2.11k|                vm_return_no_restore(JANET_SIGNAL_OK, retreg);
  ------------------
  |  |38235|  2.11k|#define vm_return_no_restore(sig, val) do { \
  |  |38236|  2.11k|    janet_vm.return_reg[0] = (val); \
  |  |38237|  2.11k|    return (sig); \
  |  |38238|  2.11k|} while (0)
  |  |  ------------------
  |  |  |  Branch (38238:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
39343|  2.11k|            }
39344|  13.5M|            vm_restore();
  ------------------
  |  |38225|  13.5M|#define vm_restore() do { \
  |  |38226|  13.5M|    stack = fiber->data + fiber->frame; \
  |  |38227|  13.5M|    pc = janet_stack_frame(stack)->pc; \
  |  |  ------------------
  |  |  |  |  831|  13.5M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  13.5M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38228|  13.5M|    func = janet_stack_frame(stack)->func; \
  |  |  ------------------
  |  |  |  |  831|  13.5M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  13.5M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38229|  13.5M|} while (0)
  |  |  ------------------
  |  |  |  Branch (38229:10): [Folded, False: 13.5M]
  |  |  ------------------
  ------------------
39345|  13.5M|            stack[A] = retreg;
  ------------------
  |  |38190|  13.5M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
39346|  13.5M|            vm_checkgc_pcnext();
  ------------------
  |  |38245|  13.5M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38241|  13.5M|#define maybe_collect() do {\
  |  |  |  |38242|  13.5M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 10.4M, False: 3.15M]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 13.5M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38244|  13.5M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|  13.5M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39347|  13.5M|        }
39348|  3.27G|    }
39349|       |
39350|  3.27G|    VM_OP(JOP_RESUME) {
  ------------------
  |  |38211|   817k|#define VM_OP(op) label_##op :
  ------------------
39351|   817k|        Janet retreg;
39352|   817k|        vm_maybe_auto_suspend(1);
  ------------------
  |  |38265|   817k|#define vm_maybe_auto_suspend(COND) do { \
  |  |38266|   817k|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (38266:9): [True: 817k, Folded]
  |  |  |  Branch (38266:19): [True: 0, False: 817k]
  |  |  ------------------
  |  |38267|      0|        fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  812|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  |  |  ------------------
  |  |                       fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  813|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  |  |  ------------------
  |  |38268|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |38230|      0|#define vm_return(sig, val) do { \
  |  |  |  |38231|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |38232|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |38233|      0|    return (sig); \
  |  |  |  |38234|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38234:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38269|      0|    } \
  |  |38270|   817k|} while (0)
  |  |  ------------------
  |  |  |  Branch (38270:10): [Folded, False: 817k]
  |  |  ------------------
  ------------------
39353|   817k|        vm_assert_type(stack[B], JANET_FIBER);
  ------------------
  |  |38250|   817k|#define vm_assert_type(X, T) do { \
  |  |38251|   817k|    if (!(janet_checktype((X), (T)))) { \
  |  |  ------------------
  |  |  |  |  806|   817k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 817k]
  |  |  |  |  ------------------
  |  |  |  |  807|   817k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|   817k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|   817k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|   817k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   817k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   817k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38251:9): [True: 0, False: 817k]
  |  |  ------------------
  |  |38252|      0|        vm_commit(); \
  |  |  ------------------
  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38253|      0|        janet_panicf("expected %T, got %v", (1 << (T)), (X)); \
  |  |38254|      0|    } \
  |  |38255|   817k|} while (0)
  |  |  ------------------
  |  |  |  Branch (38255:10): [Folded, False: 817k]
  |  |  ------------------
  ------------------
39354|   817k|        JanetFiber *child = janet_unwrap_fiber(stack[B]);
  ------------------
  |  |  859|   817k|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
39355|   817k|        if (janet_check_can_resume(child, &retreg, 0)) {
  ------------------
  |  Branch (39355:13): [True: 0, False: 817k]
  ------------------
39356|      0|            vm_commit();
  ------------------
  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  ------------------
  ------------------
39357|      0|            janet_panicv(retreg);
39358|      0|        }
39359|   817k|        fiber->child = child;
39360|   817k|        JanetSignal sig = janet_continue_no_check(child, stack[C], &retreg);
  ------------------
  |  |38192|   817k|#define C (*pc >> 24)
  ------------------
39361|   817k|        stack = fiber->data + fiber->frame;
39362|   817k|        if (sig != JANET_SIGNAL_OK && !(child->flags & (1 << sig))) {
  ------------------
  |  Branch (39362:13): [True: 497k, False: 320k]
  |  Branch (39362:39): [True: 138, False: 497k]
  ------------------
39363|    138|            vm_return(sig, retreg);
  ------------------
  |  |38230|    138|#define vm_return(sig, val) do { \
  |  |38231|    138|    janet_vm.return_reg[0] = (val); \
  |  |38232|    138|    vm_commit(); \
  |  |  ------------------
  |  |  |  |38224|    138|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|    138|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|    138|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 138]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38233|    138|    return (sig); \
  |  |38234|    138|} while (0)
  |  |  ------------------
  |  |  |  Branch (38234:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
39364|    138|        }
39365|   817k|        fiber->child = NULL;
39366|   817k|        stack[A] = retreg;
  ------------------
  |  |38190|   817k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
39367|   817k|        vm_checkgc_pcnext();
  ------------------
  |  |38245|   817k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38241|   817k|#define maybe_collect() do {\
  |  |  |  |38242|   817k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 43, False: 817k]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 817k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38244|   817k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|   817k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39368|   817k|    }
39369|       |
39370|      2|    VM_OP(JOP_SIGNAL) {
  ------------------
  |  |38211|      2|#define VM_OP(op) label_##op :
  ------------------
39371|      2|        int32_t s = C;
  ------------------
  |  |38192|      2|#define C (*pc >> 24)
  ------------------
39372|      2|        if (s > JANET_SIGNAL_USER9) s = JANET_SIGNAL_USER9;
  ------------------
  |  Branch (39372:13): [True: 0, False: 2]
  ------------------
39373|      2|        if (s < 0) s = 0;
  ------------------
  |  Branch (39373:13): [True: 0, False: 2]
  ------------------
39374|      2|        vm_return(s, stack[B]);
  ------------------
  |  |38230|      2|#define vm_return(sig, val) do { \
  |  |38231|      2|    janet_vm.return_reg[0] = (val); \
  |  |38232|      2|    vm_commit(); \
  |  |  ------------------
  |  |  |  |38224|      2|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|      2|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|      2|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38233|      2|    return (sig); \
  |  |38234|      2|} while (0)
  |  |  ------------------
  |  |  |  Branch (38234:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
39375|      2|    }
39376|       |
39377|     53|    VM_OP(JOP_PROPAGATE) {
  ------------------
  |  |38211|     53|#define VM_OP(op) label_##op :
  ------------------
39378|     53|        Janet fv = stack[C];
  ------------------
  |  |38192|     53|#define C (*pc >> 24)
  ------------------
39379|     53|        vm_assert_type(fv, JANET_FIBER);
  ------------------
  |  |38250|     53|#define vm_assert_type(X, T) do { \
  |  |38251|     53|    if (!(janet_checktype((X), (T)))) { \
  |  |  ------------------
  |  |  |  |  806|     53|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 53]
  |  |  |  |  ------------------
  |  |  |  |  807|     53|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|     53|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|     53|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|     53|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     53|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     53|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38251:9): [True: 0, False: 53]
  |  |  ------------------
  |  |38252|      0|        vm_commit(); \
  |  |  ------------------
  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38253|      0|        janet_panicf("expected %T, got %v", (1 << (T)), (X)); \
  |  |38254|      0|    } \
  |  |38255|     53|} while (0)
  |  |  ------------------
  |  |  |  Branch (38255:10): [Folded, False: 53]
  |  |  ------------------
  ------------------
39380|     53|        JanetFiber *f = janet_unwrap_fiber(fv);
  ------------------
  |  |  859|     53|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
39381|     53|        JanetFiberStatus sub_status = janet_fiber_status(f);
39382|     53|        if (sub_status > JANET_STATUS_USER9) {
  ------------------
  |  Branch (39382:13): [True: 0, False: 53]
  ------------------
39383|      0|            vm_commit();
  ------------------
  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  ------------------
  ------------------
39384|      0|            janet_panicf("cannot propagate from fiber with status :%s",
39385|      0|                         janet_status_names[sub_status]);
39386|      0|        }
39387|     53|        fiber->child = f;
39388|     53|        vm_return((int) sub_status, stack[B]);
  ------------------
  |  |38230|     53|#define vm_return(sig, val) do { \
  |  |38231|     53|    janet_vm.return_reg[0] = (val); \
  |  |38232|     53|    vm_commit(); \
  |  |  ------------------
  |  |  |  |38224|     53|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|     53|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|     53|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 53]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38233|     53|    return (sig); \
  |  |38234|     53|} while (0)
  |  |  ------------------
  |  |  |  Branch (38234:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
39389|     53|    }
39390|       |
39391|      5|    VM_OP(JOP_CANCEL) {
  ------------------
  |  |38211|      5|#define VM_OP(op) label_##op :
  ------------------
39392|      5|        Janet retreg;
39393|      5|        vm_assert_type(stack[B], JANET_FIBER);
  ------------------
  |  |38250|      5|#define vm_assert_type(X, T) do { \
  |  |38251|      5|    if (!(janet_checktype((X), (T)))) { \
  |  |  ------------------
  |  |  |  |  806|      5|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 5]
  |  |  |  |  ------------------
  |  |  |  |  807|      5|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!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|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|      5|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|      5|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      5|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      5|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38251:9): [True: 5, False: 0]
  |  |  ------------------
  |  |38252|      5|        vm_commit(); \
  |  |  ------------------
  |  |  |  |38224|      5|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|      5|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|      5|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38253|      5|        janet_panicf("expected %T, got %v", (1 << (T)), (X)); \
  |  |38254|      5|    } \
  |  |38255|      5|} while (0)
  |  |  ------------------
  |  |  |  Branch (38255:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
39394|      0|        JanetFiber *child = janet_unwrap_fiber(stack[B]);
  ------------------
  |  |  859|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
39395|      0|        if (janet_check_can_resume(child, &retreg, 1)) {
  ------------------
  |  Branch (39395:13): [True: 0, False: 0]
  ------------------
39396|      0|            vm_commit();
  ------------------
  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  ------------------
  ------------------
39397|      0|            janet_panicv(retreg);
39398|      0|        }
39399|      0|        fiber->child = child;
39400|      0|        JanetSignal sig = janet_continue_signal(child, stack[C], &retreg, JANET_SIGNAL_ERROR);
  ------------------
  |  |38192|      0|#define C (*pc >> 24)
  ------------------
39401|      0|        if (sig != JANET_SIGNAL_OK && !(child->flags & (1 << sig))) {
  ------------------
  |  Branch (39401:13): [True: 0, False: 0]
  |  Branch (39401:39): [True: 0, False: 0]
  ------------------
39402|      0|            vm_return(sig, retreg);
  ------------------
  |  |38230|      0|#define vm_return(sig, val) do { \
  |  |38231|      0|    janet_vm.return_reg[0] = (val); \
  |  |38232|      0|    vm_commit(); \
  |  |  ------------------
  |  |  |  |38224|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38233|      0|    return (sig); \
  |  |38234|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (38234:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
39403|      0|        }
39404|      0|        fiber->child = NULL;
39405|      0|        stack = fiber->data + fiber->frame;
39406|      0|        stack[A] = retreg;
  ------------------
  |  |38190|      0|#define A ((*pc >> 8)  & 0xFF)
  ------------------
39407|      0|        vm_checkgc_pcnext();
  ------------------
  |  |38245|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38241|      0|#define maybe_collect() do {\
  |  |  |  |38242|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 0, False: 0]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38244|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39408|      0|    }
39409|       |
39410|  28.4M|    VM_OP(JOP_PUT)
  ------------------
  |  |38211|  28.4M|#define VM_OP(op) label_##op :
  ------------------
39411|  28.4M|    vm_commit();
  ------------------
  |  |38224|  28.4M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  831|  28.4M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  28.4M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38224:70): [Folded, False: 28.4M]
  |  |  ------------------
  ------------------
39412|  28.4M|    fiber->flags |= JANET_FIBER_RESUME_NO_USEVAL;
  ------------------
  |  |  812|  28.4M|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
39413|  28.4M|    janet_put(stack[A], stack[B], stack[C]);
  ------------------
  |  |38190|  28.4M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  janet_put(stack[A], stack[B], stack[C]);
  ------------------
  |  |38191|  28.4M|#define B ((*pc >> 16) & 0xFF)
  ------------------
                  janet_put(stack[A], stack[B], stack[C]);
  ------------------
  |  |38192|  28.4M|#define C (*pc >> 24)
  ------------------
39414|  28.4M|    stack = fiber->data + fiber->frame;
39415|  28.4M|    fiber->flags &= ~JANET_FIBER_RESUME_NO_USEVAL;
  ------------------
  |  |  812|  28.4M|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
39416|  28.4M|    vm_checkgc_pcnext();
  ------------------
  |  |38245|  28.4M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38241|  28.4M|#define maybe_collect() do {\
  |  |  |  |38242|  28.4M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 662k, False: 27.7M]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 28.4M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38244|  28.4M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|  28.4M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39417|       |
39418|  28.4M|    VM_OP(JOP_PUT_INDEX) {
  ------------------
  |  |38211|     96|#define VM_OP(op) label_##op :
  ------------------
39419|     96|        Janet ds = stack[A];
  ------------------
  |  |38190|     96|#define A ((*pc >> 8)  & 0xFF)
  ------------------
39420|     96|        if (janet_checktype(ds, JANET_ARRAY) && (int32_t) C < janet_unwrap_array(ds)->count) {
  ------------------
  |  |  806|    192|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 91, False: 5]
  |  |  |  Branch (806:6): [Folded, False: 96]
  |  |  ------------------
  |  |  807|    192|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    192|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     96|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     96|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     96|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     96|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      if (janet_checktype(ds, JANET_ARRAY) && (int32_t) C < janet_unwrap_array(ds)->count) {
  ------------------
  |  |38192|     91|#define C (*pc >> 24)
  ------------------
                      if (janet_checktype(ds, JANET_ARRAY) && (int32_t) C < janet_unwrap_array(ds)->count) {
  ------------------
  |  |  860|     91|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (39420:49): [True: 91, False: 0]
  ------------------
39421|     91|            janet_unwrap_array(ds)->data[C] = stack[B];
  ------------------
  |  |  860|     91|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
                          janet_unwrap_array(ds)->data[C] = stack[B];
  ------------------
  |  |38192|     91|#define C (*pc >> 24)
  ------------------
                          janet_unwrap_array(ds)->data[C] = stack[B];
  ------------------
  |  |38191|     91|#define B ((*pc >> 16) & 0xFF)
  ------------------
39422|     91|            vm_pcnext();
  ------------------
  |  |38244|     91|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|     91|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39423|     91|        } else {
39424|      5|            vm_commit();
  ------------------
  |  |38224|      5|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  831|      5|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|      5|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38224:70): [Folded, False: 5]
  |  |  ------------------
  ------------------
39425|      5|            fiber->flags |= JANET_FIBER_RESUME_NO_USEVAL;
  ------------------
  |  |  812|      5|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
39426|      5|            janet_putindex(ds, C, stack[B]);
  ------------------
  |  |38192|      5|#define C (*pc >> 24)
  ------------------
                          janet_putindex(ds, C, stack[B]);
  ------------------
  |  |38191|      5|#define B ((*pc >> 16) & 0xFF)
  ------------------
39427|      5|            stack = fiber->data + fiber->frame;
39428|      5|            fiber->flags &= ~JANET_FIBER_RESUME_NO_USEVAL;
  ------------------
  |  |  812|      5|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
39429|      5|            vm_checkgc_pcnext();
  ------------------
  |  |38245|      5|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38241|      5|#define maybe_collect() do {\
  |  |  |  |38242|      5|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 0, False: 5]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38244|      5|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|      5|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39430|      5|        }
39431|     96|    }
39432|       |
39433|   197M|    VM_OP(JOP_IN)
  ------------------
  |  |38211|   197M|#define VM_OP(op) label_##op :
  ------------------
39434|   197M|    vm_getop(janet_in);
  ------------------
  |  |38404|   197M|    {\
  |  |38405|   197M|        Janet ds = stack[B];\
  |  |  ------------------
  |  |  |  |38191|   197M|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |38406|   197M|        Janet key = stack[C];\
  |  |  ------------------
  |  |  |  |38192|   197M|#define C (*pc >> 24)
  |  |  ------------------
  |  |38407|   197M|        int32_t index;\
  |  |38408|   197M|        switch (janet_type(ds)) {\
  |  |  ------------------
  |  |  |  |  795|   197M|    (isnan((x).number) \
  |  |  |  |  796|   197M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  |  |  797|  18.4E|        : JANET_NUMBER)
  |  |  ------------------
  |  |38409|  1.88M|            default:\
  |  |  ------------------
  |  |  |  Branch (38409:13): [True: 1.88M, False: 196M]
  |  |  ------------------
  |  |38410|  1.88M|                break;\
  |  |38411|  68.7M|            case JANET_ARRAY: {\
  |  |  ------------------
  |  |  |  Branch (38411:13): [True: 68.7M, False: 129M]
  |  |  ------------------
  |  |38412|  68.7M|                JanetArray *array = janet_unwrap_array(ds);\
  |  |  ------------------
  |  |  |  |  860|  68.7M|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  |  |  ------------------
  |  |38413|  68.7M|                if (!vm_seq_index(key, array->count, &index)) break;\
  |  |  ------------------
  |  |  |  Branch (38413:21): [True: 0, False: 68.7M]
  |  |  ------------------
  |  |38414|  68.7M|                stack[A] = array->data[index];\
  |  |  ------------------
  |  |  |  |38190|  68.7M|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |38415|  68.7M|                vm_pcnext();\
  |  |  ------------------
  |  |  |  |38244|  68.7M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|  68.7M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38416|  68.7M|            }\
  |  |38417|   169M|            case JANET_TUPLE: {\
  |  |  ------------------
  |  |  |  Branch (38417:13): [True: 100M, False: 97.2M]
  |  |  ------------------
  |  |38418|   169M|                const Janet *tuple = janet_unwrap_tuple(ds);\
  |  |  ------------------
  |  |  |  |  858|   169M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  |  |  ------------------
  |  |38419|   169M|                if (!vm_seq_index(key, janet_tuple_length(tuple), &index)) break;\
  |  |  ------------------
  |  |  |  | 1802|   169M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1800|   169M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38419:21): [True: 0, False: 169M]
  |  |  ------------------
  |  |38420|   169M|                stack[A] = tuple[index];\
  |  |  ------------------
  |  |  |  |38190|   169M|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |38421|   169M|                vm_pcnext();\
  |  |  ------------------
  |  |  |  |38244|   169M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|   169M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38422|   169M|            }\
  |  |38423|   170M|            case JANET_TABLE: {\
  |  |  ------------------
  |  |  |  Branch (38423:13): [True: 1.35M, False: 196M]
  |  |  ------------------
  |  |38424|   170M|                vm_commit();\
  |  |  ------------------
  |  |  |  |38224|   170M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|   170M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|   170M|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 170M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38425|   170M|                Janet a = janet_table_get(janet_unwrap_table(ds), key);\
  |  |  ------------------
  |  |  |  |  861|   170M|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  |  |  ------------------
  |  |38426|   170M|                stack = fiber->data + fiber->frame;\
  |  |38427|   170M|                stack[A] = a;\
  |  |  ------------------
  |  |  |  |38190|   170M|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |38428|   170M|                vm_pcnext();\
  |  |  ------------------
  |  |  |  |38244|   170M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|   170M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38429|   170M|            }\
  |  |38430|   196M|            case JANET_STRUCT: {\
  |  |  ------------------
  |  |  |  Branch (38430:13): [True: 25.2M, False: 172M]
  |  |  ------------------
  |  |38431|   196M|                vm_commit();\
  |  |  ------------------
  |  |  |  |38224|   196M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|   196M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|   196M|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 196M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38432|   196M|                Janet a = janet_struct_get(janet_unwrap_struct(ds), key);\
  |  |  ------------------
  |  |  |  |  857|   196M|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  |  |  ------------------
  |  |38433|   196M|                stack = fiber->data + fiber->frame;\
  |  |38434|   196M|                stack[A] = a;\
  |  |  ------------------
  |  |  |  |38190|   196M|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |38435|   196M|                vm_pcnext();\
  |  |  ------------------
  |  |  |  |38244|   196M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|   196M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38436|   196M|            }\
  |  |38437|   197M|        }\
  |  |38438|   197M|        /* Arrays and tuples with rejected keys and default reach this */\
  |  |38439|   197M|        vm_commit();\
  |  |  ------------------
  |  |  |  |38224|  1.88M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|  1.88M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|  1.88M|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 1.88M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38440|  1.88M|        Janet a = getter(ds, key);\
  |  |38441|  1.88M|        stack = fiber->data + fiber->frame;\
  |  |38442|  1.88M|        stack[A] = a;\
  |  |  ------------------
  |  |  |  |38190|  1.88M|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |38443|  1.88M|        vm_pcnext();\
  |  |  ------------------
  |  |  |  |38244|  1.88M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|  1.88M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38444|  1.88M|    }
  ------------------
  |  Branch (39434:5): [True: 197M, False: 18.4E]
  ------------------
39435|       |
39436|   118M|    VM_OP(JOP_GET)
  ------------------
  |  |38211|   118M|#define VM_OP(op) label_##op :
  ------------------
39437|   118M|    vm_getop(janet_get);
  ------------------
  |  |38404|   118M|    {\
  |  |38405|   118M|        Janet ds = stack[B];\
  |  |  ------------------
  |  |  |  |38191|   118M|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |38406|   118M|        Janet key = stack[C];\
  |  |  ------------------
  |  |  |  |38192|   118M|#define C (*pc >> 24)
  |  |  ------------------
  |  |38407|   118M|        int32_t index;\
  |  |38408|   118M|        switch (janet_type(ds)) {\
  |  |  ------------------
  |  |  |  |  795|   118M|    (isnan((x).number) \
  |  |  |  |  796|   118M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  |  |  797|   118M|        : JANET_NUMBER)
  |  |  ------------------
  |  |38409|   103M|            default:\
  |  |  ------------------
  |  |  |  Branch (38409:13): [True: 103M, False: 14.9M]
  |  |  ------------------
  |  |38410|   103M|                break;\
  |  |38411|   130k|            case JANET_ARRAY: {\
  |  |  ------------------
  |  |  |  Branch (38411:13): [True: 130k, False: 118M]
  |  |  ------------------
  |  |38412|   130k|                JanetArray *array = janet_unwrap_array(ds);\
  |  |  ------------------
  |  |  |  |  860|   130k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  |  |  ------------------
  |  |38413|   130k|                if (!vm_seq_index(key, array->count, &index)) break;\
  |  |  ------------------
  |  |  |  Branch (38413:21): [True: 2, False: 130k]
  |  |  ------------------
  |  |38414|   130k|                stack[A] = array->data[index];\
  |  |  ------------------
  |  |  |  |38190|   130k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |38415|   130k|                vm_pcnext();\
  |  |  ------------------
  |  |  |  |38244|   130k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|   130k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38416|   130k|            }\
  |  |38417|  2.19M|            case JANET_TUPLE: {\
  |  |  ------------------
  |  |  |  Branch (38417:13): [True: 2.06M, False: 116M]
  |  |  ------------------
  |  |38418|  2.19M|                const Janet *tuple = janet_unwrap_tuple(ds);\
  |  |  ------------------
  |  |  |  |  858|  2.19M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  |  |  ------------------
  |  |38419|  2.19M|                if (!vm_seq_index(key, janet_tuple_length(tuple), &index)) break;\
  |  |  ------------------
  |  |  |  | 1802|  2.19M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1800|  2.19M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38419:21): [True: 3.23k, False: 2.19M]
  |  |  ------------------
  |  |38420|  2.19M|                stack[A] = tuple[index];\
  |  |  ------------------
  |  |  |  |38190|  2.19M|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |38421|  2.19M|                vm_pcnext();\
  |  |  ------------------
  |  |  |  |38244|  2.19M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|  2.19M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38422|  2.19M|            }\
  |  |38423|  3.96M|            case JANET_TABLE: {\
  |  |  ------------------
  |  |  |  Branch (38423:13): [True: 1.77M, False: 116M]
  |  |  ------------------
  |  |38424|  3.96M|                vm_commit();\
  |  |  ------------------
  |  |  |  |38224|  3.96M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|  3.96M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|  3.96M|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 3.96M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38425|  3.96M|                Janet a = janet_table_get(janet_unwrap_table(ds), key);\
  |  |  ------------------
  |  |  |  |  861|  3.96M|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  |  |  ------------------
  |  |38426|  3.96M|                stack = fiber->data + fiber->frame;\
  |  |38427|  3.96M|                stack[A] = a;\
  |  |  ------------------
  |  |  |  |38190|  3.96M|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |38428|  3.96M|                vm_pcnext();\
  |  |  ------------------
  |  |  |  |38244|  3.96M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|  3.96M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38429|  3.96M|            }\
  |  |38430|  14.9M|            case JANET_STRUCT: {\
  |  |  ------------------
  |  |  |  Branch (38430:13): [True: 10.9M, False: 107M]
  |  |  ------------------
  |  |38431|  14.9M|                vm_commit();\
  |  |  ------------------
  |  |  |  |38224|  14.9M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|  14.9M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|  14.9M|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 14.9M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38432|  14.9M|                Janet a = janet_struct_get(janet_unwrap_struct(ds), key);\
  |  |  ------------------
  |  |  |  |  857|  14.9M|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  |  |  ------------------
  |  |38433|  14.9M|                stack = fiber->data + fiber->frame;\
  |  |38434|  14.9M|                stack[A] = a;\
  |  |  ------------------
  |  |  |  |38190|  14.9M|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |38435|  14.9M|                vm_pcnext();\
  |  |  ------------------
  |  |  |  |38244|  14.9M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|  14.9M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38436|  14.9M|            }\
  |  |38437|   118M|        }\
  |  |38438|   118M|        /* Arrays and tuples with rejected keys and default reach this */\
  |  |38439|   118M|        vm_commit();\
  |  |  ------------------
  |  |  |  |38224|   103M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  831|   103M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|   103M|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38224:70): [Folded, False: 103M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38440|   103M|        Janet a = getter(ds, key);\
  |  |38441|   103M|        stack = fiber->data + fiber->frame;\
  |  |38442|   103M|        stack[A] = a;\
  |  |  ------------------
  |  |  |  |38190|   103M|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |38443|   103M|        vm_pcnext();\
  |  |  ------------------
  |  |  |  |38244|   103M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|   103M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |38444|   103M|    }
  ------------------
  |  Branch (39437:5): [True: 118M, False: 24.9k]
  ------------------
39438|       |
39439|   103M|    VM_OP(JOP_GET_INDEX) {
  ------------------
  |  |38211|  12.0M|#define VM_OP(op) label_##op :
  ------------------
39440|  12.0M|        Janet ds = stack[B];
  ------------------
  |  |38191|  12.0M|#define B ((*pc >> 16) & 0xFF)
  ------------------
39441|  12.0M|        if (janet_checktype(ds, JANET_ARRAY)) {
  ------------------
  |  |  806|  12.0M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 24, False: 12.0M]
  |  |  |  Branch (806:6): [Folded, False: 12.0M]
  |  |  ------------------
  |  |  807|  12.0M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  12.0M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  12.0M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  12.0M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  12.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  12.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39442|     24|            JanetArray *array = janet_unwrap_array(ds);
  ------------------
  |  |  860|     24|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
39443|     24|            stack[A] = (int32_t) C < array->count ? array->data[C] : janet_wrap_nil();
  ------------------
  |  |38190|     24|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                          stack[A] = (int32_t) C < array->count ? array->data[C] : janet_wrap_nil();
  ------------------
  |  |38192|     24|#define C (*pc >> 24)
  ------------------
                          stack[A] = (int32_t) C < array->count ? array->data[C] : janet_wrap_nil();
  ------------------
  |  |38192|     17|#define C (*pc >> 24)
  ------------------
                          stack[A] = (int32_t) C < array->count ? array->data[C] : janet_wrap_nil();
  ------------------
  |  |  831|      7|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     31|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      7|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      7|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (39443:24): [True: 17, False: 7]
  ------------------
39444|     24|            vm_pcnext();
  ------------------
  |  |38244|     24|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|     24|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39445|  12.0M|        } else if (janet_checktype(ds, JANET_TUPLE)) {
  ------------------
  |  |  806|  12.0M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 12.0M, False: 345]
  |  |  |  Branch (806:6): [Folded, False: 12.0M]
  |  |  ------------------
  |  |  807|  12.0M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  12.0M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  12.0M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  12.0M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  12.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  12.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39446|  12.0M|            const Janet *tuple = janet_unwrap_tuple(ds);
  ------------------
  |  |  858|  12.0M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
39447|  12.0M|            stack[A] = (int32_t) C < janet_tuple_length(tuple) ? tuple[C] : janet_wrap_nil();
  ------------------
  |  |38190|  12.0M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                          stack[A] = (int32_t) C < janet_tuple_length(tuple) ? tuple[C] : janet_wrap_nil();
  ------------------
  |  |38192|  12.0M|#define C (*pc >> 24)
  ------------------
                          stack[A] = (int32_t) C < janet_tuple_length(tuple) ? tuple[C] : janet_wrap_nil();
  ------------------
  |  | 1802|  12.0M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1800|  12.0M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                          stack[A] = (int32_t) C < janet_tuple_length(tuple) ? tuple[C] : janet_wrap_nil();
  ------------------
  |  |38192|  12.0M|#define C (*pc >> 24)
  ------------------
                          stack[A] = (int32_t) C < janet_tuple_length(tuple) ? tuple[C] : janet_wrap_nil();
  ------------------
  |  |  831|  1.17k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  12.0M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.17k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.17k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (39447:24): [True: 12.0M, False: 1.17k]
  ------------------
39448|  12.0M|            vm_pcnext();
  ------------------
  |  |38244|  12.0M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|  12.0M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39449|  12.0M|        } else {
39450|    345|            vm_commit();
  ------------------
  |  |38224|    345|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  831|    345|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|    345|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38224:70): [Folded, False: 345]
  |  |  ------------------
  ------------------
39451|    345|            Janet a = janet_getindex(ds, C);
  ------------------
  |  |38192|    345|#define C (*pc >> 24)
  ------------------
39452|    345|            stack = fiber->data + fiber->frame;
39453|    345|            stack[A] = a;
  ------------------
  |  |38190|    345|#define A ((*pc >> 8)  & 0xFF)
  ------------------
39454|    345|            vm_pcnext();
  ------------------
  |  |38244|    345|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|    345|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39455|    345|        }
39456|  12.0M|    }
39457|       |
39458|  50.7M|    VM_OP(JOP_LENGTH)
  ------------------
  |  |38211|  50.7M|#define VM_OP(op) label_##op :
  ------------------
39459|  50.7M|    vm_commit();
  ------------------
  |  |38224|  50.7M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  831|  50.7M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  50.7M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38224:70): [Folded, False: 50.7M]
  |  |  ------------------
  ------------------
39460|  50.7M|    {
39461|  50.7M|        Janet a = janet_lengthv(stack[E]);
  ------------------
  |  |38194|  50.7M|#define E (*pc >> 16)
  ------------------
39462|  50.7M|        stack = fiber->data + fiber->frame;
39463|  50.7M|        stack[A] = a;
  ------------------
  |  |38190|  50.7M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
39464|  50.7M|    }
39465|  50.7M|    vm_pcnext();
  ------------------
  |  |38244|  50.7M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |38213|  50.7M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
39466|       |
39467|  50.7M|    VM_OP(JOP_MAKE_ARRAY) {
  ------------------
  |  |38211|  13.9M|#define VM_OP(op) label_##op :
  ------------------
39468|  13.9M|        int32_t count = fiber->stacktop - fiber->stackstart;
39469|  13.9M|        Janet *mem = fiber->data + fiber->stackstart;
39470|  13.9M|        stack[D] = janet_wrap_array(janet_array_n(mem, count));
  ------------------
  |  |38193|  13.9M|#define D (*pc >> 8)
  ------------------
                      stack[D] = janet_wrap_array(janet_array_n(mem, count));
  ------------------
  |  |  845|  13.9M|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  13.9M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  13.9M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  13.9M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39471|  13.9M|        fiber->stacktop = fiber->stackstart;
39472|  13.9M|        vm_checkgc_pcnext();
  ------------------
  |  |38245|  13.9M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38241|  13.9M|#define maybe_collect() do {\
  |  |  |  |38242|  13.9M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 9.78M, False: 4.17M]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 13.9M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38244|  13.9M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|  13.9M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39473|  13.9M|    }
39474|       |
39475|   190M|    VM_OP(JOP_MAKE_TUPLE)
  ------------------
  |  |38211|   190M|#define VM_OP(op) label_##op :
  ------------------
39476|       |    /* fallthrough */
39477|   190M|    VM_OP(JOP_MAKE_BRACKET_TUPLE) {
  ------------------
  |  |38211|   190M|#define VM_OP(op) label_##op :
  ------------------
39478|   190M|        int32_t count = fiber->stacktop - fiber->stackstart;
39479|   190M|        Janet *mem = fiber->data + fiber->stackstart;
39480|   190M|        const Janet *tup = janet_tuple_n(mem, count);
39481|   190M|        if (opcode == JOP_MAKE_BRACKET_TUPLE)
  ------------------
  |  |38214|   190M|#define opcode (*pc & 0xFF)
  ------------------
  |  Branch (39481:13): [True: 433k, False: 190M]
  ------------------
39482|   433k|            janet_tuple_flag(tup) |= JANET_TUPLE_FLAG_BRACKETCTOR;
  ------------------
  |  | 1806|   433k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1800|   433k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                          janet_tuple_flag(tup) |= JANET_TUPLE_FLAG_BRACKETCTOR;
  ------------------
  |  | 1798|   433k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
39483|   190M|        stack[D] = janet_wrap_tuple(tup);
  ------------------
  |  |38193|   190M|#define D (*pc >> 8)
  ------------------
                      stack[D] = janet_wrap_tuple(tup);
  ------------------
  |  |  843|   190M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|   190M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   190M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   190M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39484|   190M|        fiber->stacktop = fiber->stackstart;
39485|   190M|        vm_checkgc_pcnext();
  ------------------
  |  |38245|   190M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38241|   190M|#define maybe_collect() do {\
  |  |  |  |38242|   190M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 1.24M, False: 189M]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 190M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38244|   190M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|   190M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39486|   190M|    }
39487|       |
39488|   190M|    VM_OP(JOP_MAKE_TABLE) {
  ------------------
  |  |38211|  3.39M|#define VM_OP(op) label_##op :
  ------------------
39489|  3.39M|        int32_t count = fiber->stacktop - fiber->stackstart;
39490|  3.39M|        Janet *mem = fiber->data + fiber->stackstart;
39491|  3.39M|        if (count & 1) {
  ------------------
  |  Branch (39491:13): [True: 1, False: 3.39M]
  ------------------
39492|      1|            vm_commit();
  ------------------
  |  |38224|      1|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  831|      1|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|      1|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38224:70): [Folded, False: 1]
  |  |  ------------------
  ------------------
39493|      1|            janet_panicf("expected even number of arguments to table constructor, got %d", count);
39494|      1|        }
39495|  3.39M|        JanetTable *table = janet_table(count / 2);
39496|  3.41M|        for (int32_t i = 0; i < count; i += 2)
  ------------------
  |  Branch (39496:29): [True: 13.9k, False: 3.39M]
  ------------------
39497|  13.9k|            janet_table_put(table, mem[i], mem[i + 1]);
39498|  3.39M|        stack[D] = janet_wrap_table(table);
  ------------------
  |  |38193|  3.39M|#define D (*pc >> 8)
  ------------------
                      stack[D] = janet_wrap_table(table);
  ------------------
  |  |  846|  3.39M|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|  3.39M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.39M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.39M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39499|  3.39M|        fiber->stacktop = fiber->stackstart;
39500|  3.39M|        vm_checkgc_pcnext();
  ------------------
  |  |38245|  3.39M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38241|  3.39M|#define maybe_collect() do {\
  |  |  |  |38242|  3.39M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 219k, False: 3.17M]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 3.39M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38244|  3.39M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|  3.39M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39501|  3.39M|    }
39502|       |
39503|  10.2M|    VM_OP(JOP_MAKE_STRUCT) {
  ------------------
  |  |38211|  10.2M|#define VM_OP(op) label_##op :
  ------------------
39504|  10.2M|        int32_t count = fiber->stacktop - fiber->stackstart;
39505|  10.2M|        Janet *mem = fiber->data + fiber->stackstart;
39506|  10.2M|        if (count & 1) {
  ------------------
  |  Branch (39506:13): [True: 1, False: 10.2M]
  ------------------
39507|      1|            vm_commit();
  ------------------
  |  |38224|      1|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  831|      1|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|      1|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (38224:70): [Folded, False: 1]
  |  |  ------------------
  ------------------
39508|      1|            janet_panicf("expected even number of arguments to struct constructor, got %d", count);
39509|      1|        }
39510|  10.2M|        JanetKV *st = janet_struct_begin(count / 2);
39511|   120M|        for (int32_t i = 0; i < count; i += 2)
  ------------------
  |  Branch (39511:29): [True: 110M, False: 10.2M]
  ------------------
39512|   110M|            janet_struct_put(st, mem[i], mem[i + 1]);
39513|  10.2M|        stack[D] = janet_wrap_struct(janet_struct_end(st));
  ------------------
  |  |38193|  10.2M|#define D (*pc >> 8)
  ------------------
                      stack[D] = janet_wrap_struct(janet_struct_end(st));
  ------------------
  |  |  842|  10.2M|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|  10.2M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  10.2M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  10.2M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39514|  10.2M|        fiber->stacktop = fiber->stackstart;
39515|  10.2M|        vm_checkgc_pcnext();
  ------------------
  |  |38245|  10.2M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38241|  10.2M|#define maybe_collect() do {\
  |  |  |  |38242|  10.2M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 8.05M, False: 2.15M]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 10.2M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38244|  10.2M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|  10.2M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39516|  10.2M|    }
39517|       |
39518|      0|    VM_OP(JOP_MAKE_STRING) {
  ------------------
  |  |38211|      0|#define VM_OP(op) label_##op :
  ------------------
39519|      0|        int32_t count = fiber->stacktop - fiber->stackstart;
39520|      0|        Janet *mem = fiber->data + fiber->stackstart;
39521|      0|        JanetBuffer buffer;
39522|      0|        janet_buffer_init(&buffer, 10 * count);
39523|      0|        for (int32_t i = 0; i < count; i++)
  ------------------
  |  Branch (39523:29): [True: 0, False: 0]
  ------------------
39524|      0|            janet_to_string_b(&buffer, mem[i]);
39525|      0|        stack[D] = janet_stringv(buffer.data, buffer.count);
  ------------------
  |  |38193|      0|#define D (*pc >> 8)
  ------------------
                      stack[D] = janet_stringv(buffer.data, buffer.count);
  ------------------
  |  | 1827|      0|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39526|      0|        janet_buffer_deinit(&buffer);
39527|      0|        fiber->stacktop = fiber->stackstart;
39528|      0|        vm_checkgc_pcnext();
  ------------------
  |  |38245|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38241|      0|#define maybe_collect() do {\
  |  |  |  |38242|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 0, False: 0]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38244|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39529|      0|    }
39530|       |
39531|  1.23M|    VM_OP(JOP_MAKE_BUFFER) {
  ------------------
  |  |38211|  1.23M|#define VM_OP(op) label_##op :
  ------------------
39532|  1.23M|        int32_t count = fiber->stacktop - fiber->stackstart;
39533|  1.23M|        Janet *mem = fiber->data + fiber->stackstart;
39534|  1.23M|        JanetBuffer *buffer = janet_buffer(10 * count);
39535|  2.46M|        for (int32_t i = 0; i < count; i++)
  ------------------
  |  Branch (39535:29): [True: 1.23M, False: 1.23M]
  ------------------
39536|  1.23M|            janet_to_string_b(buffer, mem[i]);
39537|  1.23M|        stack[D] = janet_wrap_buffer(buffer);
  ------------------
  |  |38193|  1.23M|#define D (*pc >> 8)
  ------------------
                      stack[D] = janet_wrap_buffer(buffer);
  ------------------
  |  |  847|  1.23M|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|  1.23M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.23M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.23M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39538|  1.23M|        fiber->stacktop = fiber->stackstart;
39539|  1.23M|        vm_checkgc_pcnext();
  ------------------
  |  |38245|  1.23M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38241|  1.23M|#define maybe_collect() do {\
  |  |  |  |38242|  1.23M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (38242:9): [True: 11, False: 1.23M]
  |  |  |  |  |  Branch (38242:85): [Folded, False: 1.23M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |38244|  1.23M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |38213|  1.23M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39540|  1.23M|    }
39541|       |
39542|  1.23M|    VM_END()
  ------------------
  |  |38210|  1.23M|#define VM_END() }
  ------------------
39543|  1.23M|}
janet.c:janet_binop_call:
38539|  1.24M|static Janet janet_binop_call(const char *lmethod, const char *rmethod, Janet lhs, Janet rhs) {
38540|  1.24M|    Janet lm = janet_method_lookup(lhs, lmethod);
38541|  1.24M|    if (janet_checktype(lm, JANET_NIL)) {
  ------------------
  |  |  806|  1.24M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 494k, False: 752k]
  |  |  |  Branch (806:6): [Folded, False: 1.24M]
  |  |  ------------------
  |  |  807|  1.24M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.24M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.24M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.24M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.24M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.24M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
38542|       |        /* Invert order for rmethod */
38543|   494k|        Janet lr = janet_method_lookup(rhs, rmethod);
38544|   494k|        Janet argv[2] = { rhs, lhs };
38545|   494k|        if (janet_checktype(lr, JANET_NIL)) {
  ------------------
  |  |  806|   494k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 196, False: 494k]
  |  |  |  Branch (806:6): [Folded, False: 494k]
  |  |  ------------------
  |  |  807|   494k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   494k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   494k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   494k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   494k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   494k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
38546|    196|            janet_panicf("could not find method :%s for %v or :%s for %v",
38547|    196|                         lmethod, lhs,
38548|    196|                         rmethod, rhs);
38549|    196|        }
38550|   494k|        return janet_method_invoke(lr, 2, argv);
38551|   752k|    } else {
38552|   752k|        Janet argv[2] = { lhs, rhs };
38553|   752k|        return janet_method_invoke(lm, 2, argv);
38554|   752k|    }
38555|  1.24M|}
janet.c:vm_seq_index:
38387|   206M|static inline int vm_seq_index(Janet key, int32_t len, int32_t *index) {
38388|       |    /* 64-bit nanboxing makes non-numbers NaN, failing the range check */
38389|       |#ifndef JANET_NANBOX_64
38390|       |    if (!janet_checktype(key, JANET_NUMBER)) return 0;
38391|       |#endif
38392|   206M|    double d = janet_unwrap_number(key);
  ------------------
  |  |  839|   206M|#define janet_unwrap_number(x) ((x).number)
  ------------------
38393|   206M|    if (!(d >= 0 && d < (double) len)) return 0;
  ------------------
  |  Branch (38393:11): [True: 206M, False: 34]
  |  Branch (38393:21): [True: 206M, False: 3.20k]
  ------------------
38394|   206M|    int32_t i = (int32_t) d;
38395|   206M|    if ((double) i != d) return 0;
  ------------------
  |  Branch (38395:9): [True: 0, False: 206M]
  ------------------
38396|   206M|    *index = i;
38397|   206M|    return 1;
38398|   206M|}
janet.c:resolve_method:
38514|  2.48M|static Janet resolve_method(Janet name, JanetFiber *fiber) {
38515|  2.48M|    int32_t argc = fiber->stacktop - fiber->stackstart;
38516|  2.48M|    if (argc < 1) janet_panicf("method call (%v) takes at least 1 argument, got 0", name);
  ------------------
  |  Branch (38516:9): [True: 10, False: 2.48M]
  ------------------
38517|  2.48M|    Janet callee = method_to_fun(name, fiber->data[fiber->stackstart]);
38518|  2.48M|    if (janet_checktype(callee, JANET_NIL))
  ------------------
  |  |  806|  2.48M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 47, False: 2.48M]
  |  |  |  Branch (806:6): [Folded, False: 2.48M]
  |  |  ------------------
  |  |  807|  2.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|  2.48M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.48M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.48M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.48M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.48M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
38519|     47|        janet_panicf("unknown method %v invoked on %v", name, fiber->data[fiber->stackstart]);
38520|  2.48M|    return callee;
38521|  2.48M|}
janet.c:method_to_fun:
38509|  5.32M|static Janet method_to_fun(Janet method, Janet obj) {
38510|  5.32M|    return janet_get(obj, method);
38511|  5.32M|}
janet.c:call_nonfn:
38502|  44.2M|static Janet call_nonfn(JanetFiber *fiber, Janet callee) {
38503|  44.2M|    int32_t argc = fiber->stacktop - fiber->stackstart;
38504|  44.2M|    fiber->stacktop = fiber->stackstart;
38505|  44.2M|    return janet_method_invoke(callee, argc, fiber->data + fiber->stacktop);
38506|  44.2M|}
janet.c:janet_check_can_resume:
39682|  1.92M|static JanetSignal janet_check_can_resume(JanetFiber *fiber, Janet *out, int is_cancel) {
39683|       |    /* Check conditions */
39684|  1.92M|    JanetFiberStatus old_status = janet_fiber_status(fiber);
39685|  1.92M|    if (janet_vm.stackn >= JANET_RECURSION_GUARD) {
  ------------------
  |  |  296|  1.92M|#define JANET_RECURSION_GUARD 1024
  ------------------
  |  Branch (39685:9): [True: 0, False: 1.92M]
  ------------------
39686|      0|        janet_fiber_set_status(fiber, JANET_STATUS_ERROR);
  ------------------
  |  |  826|      0|#define janet_fiber_set_status(f, s) do {\
  |  |  827|      0|    (f)->flags &= ~JANET_FIBER_STATUS_MASK;\
  |  |  ------------------
  |  |  |  |  807|      0|#define JANET_FIBER_STATUS_MASK 0x3F0000
  |  |  ------------------
  |  |  828|      0|    (f)->flags |= (s) << JANET_FIBER_STATUS_OFFSET;\
  |  |  ------------------
  |  |  |  |  809|      0|#define JANET_FIBER_STATUS_OFFSET 16
  |  |  ------------------
  |  |  829|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (829:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
39687|      0|        *out = janet_cstringv("C stack recursed too deeply");
  ------------------
  |  | 1826|      0|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39688|      0|        return JANET_SIGNAL_ERROR;
39689|      0|    }
39690|       |    /* If a "task" fiber is trying to be used as a normal fiber, detect that. See bug #920.
39691|       |     * Fibers must be marked as root fibers manually, or by the ev scheduler. */
39692|  1.92M|    if (janet_vm.fiber != NULL && (fiber->gc.flags & JANET_FIBER_EV_GCFLAG_ROOT)) {
  ------------------
  |  |  821|  1.37M|#define JANET_FIBER_EV_GCFLAG_ROOT 0x4000000
  ------------------
  |  Branch (39692:9): [True: 1.37M, False: 549k]
  |  Branch (39692:35): [True: 0, False: 1.37M]
  ------------------
39693|      0|#ifdef JANET_EV
39694|      0|        *out = janet_cstringv(is_cancel
  ------------------
  |  | 1826|      0|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (828:33): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39695|      0|                              ? "cannot cancel root fiber, use ev/cancel"
39696|      0|                              : "cannot resume root fiber, use ev/go");
39697|       |#else
39698|       |        *out = janet_cstringv(is_cancel
39699|       |                              ? "cannot cancel root fiber"
39700|       |                              : "cannot resume root fiber");
39701|       |#endif
39702|      0|        return JANET_SIGNAL_ERROR;
39703|      0|    }
39704|  1.92M|    if (old_status == JANET_STATUS_ALIVE ||
  ------------------
  |  Branch (39704:9): [True: 0, False: 1.92M]
  ------------------
39705|  1.92M|            old_status == JANET_STATUS_DEAD ||
  ------------------
  |  Branch (39705:13): [True: 258, False: 1.92M]
  ------------------
39706|  1.92M|            (old_status >= JANET_STATUS_USER0 && old_status <= JANET_STATUS_USER4) ||
  ------------------
  |  Branch (39706:14): [True: 1.92M, False: 19]
  |  Branch (39706:50): [True: 0, False: 1.92M]
  ------------------
39707|  1.92M|            old_status == JANET_STATUS_ERROR) {
  ------------------
  |  Branch (39707:13): [True: 19, False: 1.92M]
  ------------------
39708|    277|        const uint8_t *str = janet_formatc("cannot resume fiber with status :%s",
39709|    277|                                           janet_status_names[old_status]);
39710|    277|        *out = janet_wrap_string(str);
  ------------------
  |  |  848|    277|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|    277|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    277|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    277|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39711|    277|        return JANET_SIGNAL_ERROR;
39712|    277|    }
39713|  1.92M|#ifdef JANET_EV
39714|  1.92M|    if (janet_vm.fiber == NULL) {
  ------------------
  |  Branch (39714:9): [True: 549k, False: 1.37M]
  ------------------
39715|       |        /* Make sure we don't run root fibers without this flag */
39716|   549k|        fiber->gc.flags |= JANET_FIBER_EV_GCFLAG_ROOT;
  ------------------
  |  |  821|   549k|#define JANET_FIBER_EV_GCFLAG_ROOT 0x4000000
  ------------------
39717|   549k|    }
39718|  1.92M|#endif
39719|  1.92M|    return JANET_SIGNAL_OK;
39720|  1.92M|}
janet.c:janet_continue_no_check:
39743|  1.92M|static JanetSignal janet_continue_no_check(JanetFiber *fiber, Janet in, Janet *out) {
39744|       |
39745|  1.92M|    JanetFiberStatus old_status = janet_fiber_status(fiber);
39746|       |
39747|  1.92M|#ifdef JANET_EV
39748|  1.92M|    janet_fiber_did_resume(fiber);
39749|  1.92M|#endif
39750|       |
39751|       |    /* Clear last value */
39752|  1.92M|    fiber->last_value = janet_wrap_nil();
  ------------------
  |  |  831|  1.92M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.92M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.92M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.92M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39753|       |
39754|       |    /* Continue child fiber if it exists */
39755|  1.92M|    if (fiber->child) {
  ------------------
  |  Branch (39755:9): [True: 834, False: 1.92M]
  ------------------
39756|    834|        if (janet_vm.root_fiber == NULL) janet_vm.root_fiber = fiber;
  ------------------
  |  Branch (39756:13): [True: 834, False: 0]
  ------------------
39757|    834|        JanetFiber *child = fiber->child;
39758|    834|        uint32_t instr = (janet_stack_frame(fiber->data + fiber->frame)->pc)[0];
  ------------------
  |  |  831|    834|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1026|    834|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
39759|    834|        janet_vm.stackn++;
39760|    834|        JanetSignal sig = janet_continue(child, in, &in);
39761|    834|        janet_vm.stackn--;
39762|    834|        if (janet_vm.root_fiber == fiber) janet_vm.root_fiber = NULL;
  ------------------
  |  Branch (39762:13): [True: 834, False: 0]
  ------------------
39763|    834|        if (sig != JANET_SIGNAL_OK && !(child->flags & (1 << sig))) {
  ------------------
  |  Branch (39763:13): [True: 815, False: 19]
  |  Branch (39763:39): [True: 789, False: 26]
  ------------------
39764|    789|            *out = in;
39765|    789|            janet_fiber_set_status(fiber, sig);
  ------------------
  |  |  826|    789|#define janet_fiber_set_status(f, s) do {\
  |  |  827|    789|    (f)->flags &= ~JANET_FIBER_STATUS_MASK;\
  |  |  ------------------
  |  |  |  |  807|    789|#define JANET_FIBER_STATUS_MASK 0x3F0000
  |  |  ------------------
  |  |  828|    789|    (f)->flags |= (s) << JANET_FIBER_STATUS_OFFSET;\
  |  |  ------------------
  |  |  |  |  809|    789|#define JANET_FIBER_STATUS_OFFSET 16
  |  |  ------------------
  |  |  829|    789|} while (0)
  |  |  ------------------
  |  |  |  Branch (829:10): [Folded, False: 789]
  |  |  ------------------
  ------------------
39766|    789|            fiber->last_value = child->last_value;
39767|    789|            return sig;
39768|    789|        }
39769|       |        /* Check if we need any special handling for certain opcodes */
39770|     45|        switch (instr & 0x7F) {
39771|     45|            default:
  ------------------
  |  Branch (39771:13): [True: 45, False: 0]
  ------------------
39772|     45|                break;
39773|     45|            case JOP_NEXT: {
  ------------------
  |  Branch (39773:13): [True: 0, False: 45]
  ------------------
39774|      0|                if (sig == JANET_SIGNAL_OK ||
  ------------------
  |  Branch (39774:21): [True: 0, False: 0]
  ------------------
39775|      0|                        sig == JANET_SIGNAL_ERROR ||
  ------------------
  |  Branch (39775:25): [True: 0, False: 0]
  ------------------
39776|      0|                        sig == JANET_SIGNAL_USER0 ||
  ------------------
  |  Branch (39776:25): [True: 0, False: 0]
  ------------------
39777|      0|                        sig == JANET_SIGNAL_USER1 ||
  ------------------
  |  Branch (39777:25): [True: 0, False: 0]
  ------------------
39778|      0|                        sig == JANET_SIGNAL_USER2 ||
  ------------------
  |  Branch (39778:25): [True: 0, False: 0]
  ------------------
39779|      0|                        sig == JANET_SIGNAL_USER3 ||
  ------------------
  |  Branch (39779:25): [True: 0, False: 0]
  ------------------
39780|      0|                        sig == JANET_SIGNAL_USER4) {
  ------------------
  |  Branch (39780:25): [True: 0, False: 0]
  ------------------
39781|      0|                    in = 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39782|      0|                } else {
39783|      0|                    in = janet_wrap_integer(0);
  ------------------
  |  |  967|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
39784|      0|                }
39785|      0|                break;
39786|      0|            }
39787|     45|        }
39788|     45|        fiber->child = NULL;
39789|     45|    }
39790|       |
39791|       |    /* Handle new fibers being resumed with a non-nil value */
39792|  1.92M|    if (old_status == JANET_STATUS_NEW && !janet_checktype(in, JANET_NIL)) {
  ------------------
  |  |  806|  1.92M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 1.92M]
  |  |  ------------------
  |  |  807|  1.92M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.92M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.92M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.92M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.92M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.92M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (39792:9): [True: 1.92M, False: 1.00k]
  |  Branch (39792:43): [True: 446, False: 1.91M]
  ------------------
39793|    446|        Janet *stack = fiber->data + fiber->frame;
39794|    446|        JanetFunction *func = janet_stack_frame(stack)->func;
  ------------------
  |  |  831|    446|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1026|    446|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
39795|    446|        if (func) {
  ------------------
  |  Branch (39795:13): [True: 446, False: 0]
  ------------------
39796|    446|            if (func->def->arity > 0) {
  ------------------
  |  Branch (39796:17): [True: 9, False: 437]
  ------------------
39797|      9|                stack[0] = in;
39798|    437|            } else if (func->def->flags & JANET_FUNCDEF_FLAG_VARARG) {
  ------------------
  |  | 1097|    437|#define JANET_FUNCDEF_FLAG_VARARG 0x10000
  ------------------
  |  Branch (39798:24): [True: 69, False: 368]
  ------------------
39799|     69|                stack[0] = janet_wrap_tuple(janet_tuple_n(&in, 1));
  ------------------
  |  |  843|     69|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|     69|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     69|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     69|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39800|     69|            }
39801|    446|        }
39802|    446|    }
39803|       |
39804|       |    /* If this is a nested continue (root_fiber already set), root the fiber
39805|       |     * so it survives GC. janet_collect only marks root_fiber, so without
39806|       |     * this a nested fiber (e.g., from janet_pcall in a C function) would be
39807|       |     * invisible to GC and could be collected while actively running. */
39808|  1.92M|    int fiber_rooted = (janet_vm.root_fiber != NULL);
39809|  1.92M|    if (fiber_rooted) {
  ------------------
  |  Branch (39809:9): [True: 1.37M, False: 547k]
  ------------------
39810|  1.37M|        janet_gcroot(janet_wrap_fiber(fiber));
  ------------------
  |  |  844|  1.37M|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|  1.37M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.37M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.37M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39811|  1.37M|    }
39812|       |
39813|       |    /* Save global state */
39814|  1.92M|    JanetTryState tstate;
39815|  1.92M|    JanetSignal sig = janet_try(&tstate);
  ------------------
  |  | 1981|  1.92M|#define janet_try(state) (janet_try_init(state), (JanetSignal) setjmp((state)->buf))
  ------------------
39816|  1.92M|    if (!sig) {
  ------------------
  |  Branch (39816:9): [True: 1.92M, False: 0]
  ------------------
39817|       |        /* Normal setup */
39818|  1.92M|        if (janet_vm.root_fiber == NULL) janet_vm.root_fiber = fiber;
  ------------------
  |  Branch (39818:13): [True: 547k, False: 1.37M]
  ------------------
39819|  1.92M|        janet_vm.fiber = fiber;
39820|  1.92M|        janet_fiber_set_status(fiber, JANET_STATUS_ALIVE);
  ------------------
  |  |  826|  1.92M|#define janet_fiber_set_status(f, s) do {\
  |  |  827|  1.92M|    (f)->flags &= ~JANET_FIBER_STATUS_MASK;\
  |  |  ------------------
  |  |  |  |  807|  1.92M|#define JANET_FIBER_STATUS_MASK 0x3F0000
  |  |  ------------------
  |  |  828|  1.92M|    (f)->flags |= (s) << JANET_FIBER_STATUS_OFFSET;\
  |  |  ------------------
  |  |  |  |  809|  1.92M|#define JANET_FIBER_STATUS_OFFSET 16
  |  |  ------------------
  |  |  829|  1.92M|} while (0)
  |  |  ------------------
  |  |  |  Branch (829:10): [Folded, False: 1.92M]
  |  |  ------------------
  ------------------
39821|  1.92M|        sig = run_vm(fiber, in);
39822|  1.92M|    }
39823|       |
39824|       |    /* Restore */
39825|  1.92M|    if (janet_vm.root_fiber == fiber) janet_vm.root_fiber = NULL;
  ------------------
  |  Branch (39825:9): [True: 547k, False: 1.37M]
  ------------------
39826|  1.92M|    janet_fiber_set_status(fiber, sig);
  ------------------
  |  |  826|  1.92M|#define janet_fiber_set_status(f, s) do {\
  |  |  827|  1.92M|    (f)->flags &= ~JANET_FIBER_STATUS_MASK;\
  |  |  ------------------
  |  |  |  |  807|  1.92M|#define JANET_FIBER_STATUS_MASK 0x3F0000
  |  |  ------------------
  |  |  828|  1.92M|    (f)->flags |= (s) << JANET_FIBER_STATUS_OFFSET;\
  |  |  ------------------
  |  |  |  |  809|  1.92M|#define JANET_FIBER_STATUS_OFFSET 16
  |  |  ------------------
  |  |  829|  1.92M|} while (0)
  |  |  ------------------
  |  |  |  Branch (829:10): [Folded, False: 1.92M]
  |  |  ------------------
  ------------------
39827|  1.92M|    janet_restore(&tstate);
39828|  1.92M|    if (fiber_rooted) {
  ------------------
  |  Branch (39828:9): [True: 1.37M, False: 547k]
  ------------------
39829|  1.37M|        janet_gcunroot(janet_wrap_fiber(fiber));
  ------------------
  |  |  844|  1.37M|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|  1.37M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.37M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.37M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
39830|  1.37M|    }
39831|  1.92M|    fiber->last_value = tstate.payload;
39832|  1.92M|    *out = tstate.payload;
39833|       |
39834|  1.92M|    return sig;
39835|  1.92M|}
janet.c:janet_method_lookup:
38524|  2.83M|static Janet janet_method_lookup(Janet x, const char *name) {
38525|  2.83M|    return method_to_fun(janet_ckeywordv(name), x);
  ------------------
  |  | 1843|  2.83M|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  2.83M|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  2.83M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  2.83M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  2.83M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
38526|  2.83M|}
janet.c:janet_method_invoke:
38464|  46.5M|static Janet janet_method_invoke(Janet method, int32_t argc, Janet *argv) {
38465|  46.5M|    switch (janet_type(method)) {
  ------------------
  |  |  795|  46.5M|    (isnan((x).number) \
  |  |  796|  46.5M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  46.5M|        : JANET_NUMBER)
  ------------------
  |  Branch (38465:13): [True: 46.5M, False: 16.2k]
  ------------------
38466|  2.34M|        case JANET_CFUNCTION:
  ------------------
  |  Branch (38466:9): [True: 2.34M, False: 44.2M]
  ------------------
38467|  2.34M|            return (janet_unwrap_cfunction(method))(argc, argv);
  ------------------
  |  |  869|  2.34M|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
38468|      0|        case JANET_FUNCTION: {
  ------------------
  |  Branch (38468:9): [True: 0, False: 46.5M]
  ------------------
38469|      0|            JanetFunction *fun = janet_unwrap_function(method);
  ------------------
  |  |  868|      0|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
38470|      0|            return janet_call(fun, argc, argv);
38471|      0|        }
38472|  2.74M|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (38472:9): [True: 2.74M, False: 43.8M]
  ------------------
38473|  2.74M|            JanetAbstract abst = janet_unwrap_abstract(method);
  ------------------
  |  |  866|  2.74M|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
38474|  2.74M|            const JanetAbstractType *at = janet_abstract_type(abst);
  ------------------
  |  | 1899|  2.74M|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1897|  2.74M|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
38475|  2.74M|            if (NULL != at->call) {
  ------------------
  |  Branch (38475:17): [True: 0, False: 2.74M]
  ------------------
38476|      0|                return at->call(abst, argc, argv);
38477|      0|            }
38478|  2.74M|        }
38479|       |        /* fallthrough */
38480|  2.74M|        case JANET_STRING:
  ------------------
  |  Branch (38480:9): [True: 96, False: 46.5M]
  ------------------
38481|  2.74M|        case JANET_BUFFER:
  ------------------
  |  Branch (38481:9): [True: 18, False: 46.5M]
  ------------------
38482|  42.9M|        case JANET_TABLE:
  ------------------
  |  Branch (38482:9): [True: 40.1M, False: 6.43M]
  ------------------
38483|  42.9M|        case JANET_STRUCT:
  ------------------
  |  Branch (38483:9): [True: 0, False: 46.5M]
  ------------------
38484|  43.0M|        case JANET_ARRAY:
  ------------------
  |  Branch (38484:9): [True: 157k, False: 46.4M]
  ------------------
38485|  44.2M|        case JANET_TUPLE: {
  ------------------
  |  Branch (38485:9): [True: 1.16M, False: 45.4M]
  ------------------
38486|  44.2M|            if (argc != 1) {
  ------------------
  |  Branch (38486:17): [True: 26, False: 44.2M]
  ------------------
38487|     26|                janet_panicf("%v called with %d arguments, possibly expected 1", method, argc);
38488|     26|            }
38489|  44.2M|            return janet_in(method, argv[0]);
38490|  44.2M|        }
38491|  16.2k|        default: {
  ------------------
  |  Branch (38491:9): [True: 16.2k, False: 46.5M]
  ------------------
38492|  16.2k|            if (argc != 1) {
  ------------------
  |  Branch (38492:17): [True: 26, False: 16.2k]
  ------------------
38493|     26|                janet_panicf("%v called with %d arguments, possibly expected 1", method, argc);
38494|     26|            }
38495|  16.2k|            return janet_in(argv[0], method);
38496|  16.2k|        }
38497|  46.5M|    }
38498|  46.5M|}

LLVMFuzzerTestOneInput:
    9|  8.33k|int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
   10|       |
   11|       |    /* init Janet */
   12|  8.33k|    janet_init();
   13|       |
   14|       |    /* fuzz the compile + bytecode VM path (parse, compile, run) in src/core/compile.c and src/core/vm.c */
   15|  8.33k|    JanetTable *env = janet_core_env(NULL);
   16|  8.33k|    JanetTryState tstate;
   17|  8.33k|    if (janet_try(&tstate) == JANET_SIGNAL_OK) {
  ------------------
  |  | 1981|  8.33k|#define janet_try(state) (janet_try_init(state), (JanetSignal) setjmp((state)->buf))
  ------------------
  |  Branch (17:9): [True: 8.33k, False: 0]
  ------------------
   18|  8.33k|        Janet out;
   19|  8.33k|        janet_dobytes(env, data, (int32_t) size, "<fuzz>", &out);
   20|  8.33k|    }
   21|  8.33k|    janet_restore(&tstate);
   22|       |
   23|       |    /* cleanup Janet */
   24|  8.33k|    janet_deinit();
   25|       |
   26|  8.33k|    return 0;
   27|  8.33k|}

