janet_abstract_begin:
 1338|   152k|void *janet_abstract_begin(const JanetAbstractType *atype, size_t size) {
 1339|   152k|    JanetAbstractHead *header = janet_gcalloc(JANET_MEMORY_NONE,
 1340|   152k|        sizeof(JanetAbstractHead) + size);
 1341|   152k|    header->size = size;
 1342|   152k|    header->type = atype;
 1343|   152k|    return (void *) & (header->data);
 1344|   152k|}
janet_abstract_end:
 1346|   152k|void *janet_abstract_end(void *x) {
 1347|   152k|    janet_gc_settype((void *)(janet_abstract_head(x)), JANET_MEMORY_ABSTRACT);
  ------------------
  |  |  634|   152k|#define janet_gc_settype(m, t) ((janet_gc_header(m)->flags |= (0xFF & (t))))
  |  |  ------------------
  |  |  |  |  628|   152k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
 1348|   152k|    return x;
 1349|   152k|}
janet_abstract:
 1351|   152k|void *janet_abstract(const JanetAbstractType *atype, size_t size) {
 1352|   152k|    return janet_abstract_end(janet_abstract_begin(atype, size));
 1353|   152k|}
janet_abstract_begin_threaded:
 1361|     32|void *janet_abstract_begin_threaded(const JanetAbstractType *atype, size_t size) {
 1362|     32|    JanetAbstractHead *header = janet_malloc(sizeof(JanetAbstractHead) + size);
  ------------------
  |  | 2406|     32|#define janet_malloc(X) malloc((X))
  ------------------
 1363|     32|    if (NULL == header) {
  ------------------
  |  Branch (1363:9): [True: 0, False: 32]
  ------------------
 1364|      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]
  |  |  ------------------
  ------------------
 1365|      0|    }
 1366|     32|    janet_vm.next_collection += size + sizeof(JanetAbstractHead);
 1367|     32|    header->gc.flags = JANET_MEMORY_THREADED_ABSTRACT;
 1368|     32|    header->gc.data.next = NULL; /* Clear memory for address sanitizers */
 1369|     32|    header->gc.data.refcount = 1;
 1370|     32|    header->size = size;
 1371|     32|    header->type = atype;
 1372|     32|    void *abstract = (void *) & (header->data);
 1373|     32|    janet_table_put(&janet_vm.threaded_abstracts, janet_wrap_abstract(abstract), janet_wrap_false());
  ------------------
  |  |  851|     32|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|     32|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     32|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     32|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_table_put(&janet_vm.threaded_abstracts, janet_wrap_abstract(abstract), janet_wrap_false());
  ------------------
  |  |  833|     32|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|     32|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     32|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     32|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1374|     32|    return abstract;
 1375|     32|}
janet_abstract_end_threaded:
 1377|     32|void *janet_abstract_end_threaded(void *x) {
 1378|     32|    janet_gc_settype((void *)(janet_abstract_head(x)), JANET_MEMORY_THREADED_ABSTRACT);
  ------------------
  |  |  634|     32|#define janet_gc_settype(m, t) ((janet_gc_header(m)->flags |= (0xFF & (t))))
  |  |  ------------------
  |  |  |  |  628|     32|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
 1379|     32|    return x;
 1380|     32|}
janet_abstract_threaded:
 1382|     32|void *janet_abstract_threaded(const JanetAbstractType *atype, size_t size) {
 1383|     32|    return janet_abstract_end_threaded(janet_abstract_begin_threaded(atype, size));
 1384|     32|}
janet_os_mutex_size:
 1442|     10|size_t janet_os_mutex_size(void) {
 1443|     10|    return sizeof(pthread_mutex_t);
 1444|     10|}
janet_os_rwlock_size:
 1446|     22|size_t janet_os_rwlock_size(void) {
 1447|     22|    return sizeof(pthread_rwlock_t);
 1448|     22|}
janet_os_mutex_init:
 1450|  1.55k|void janet_os_mutex_init(JanetOSMutex *mutex) {
 1451|  1.55k|    pthread_mutexattr_t attr;
 1452|  1.55k|    pthread_mutexattr_init(&attr);
 1453|  1.55k|    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
 1454|  1.55k|    pthread_mutex_init((pthread_mutex_t *) mutex, &attr);
 1455|  1.55k|}
janet_os_mutex_deinit:
 1457|  1.55k|void janet_os_mutex_deinit(JanetOSMutex *mutex) {
 1458|  1.55k|    pthread_mutex_destroy((pthread_mutex_t *) mutex);
 1459|  1.55k|}
janet_os_rwlock_init:
 1470|     22|void janet_os_rwlock_init(JanetOSRWLock *rwlock) {
 1471|       |    pthread_rwlock_init((pthread_rwlock_t *) rwlock, NULL);
 1472|     22|}
janet_os_rwlock_deinit:
 1474|     22|void janet_os_rwlock_deinit(JanetOSRWLock *rwlock) {
 1475|     22|    pthread_rwlock_destroy((pthread_rwlock_t *) rwlock);
 1476|     22|}
janet_abstract_decref:
 1500|     32|int32_t janet_abstract_decref(void *abst) {
 1501|       |    return janet_atomic_dec(&janet_abstract_head(abst)->gc.data.refcount);
  ------------------
  |  | 1896|     32|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
 1502|     32|}
janet_abstract_decref_maybe_free:
 1504|     32|int32_t janet_abstract_decref_maybe_free(void *abst) {
 1505|     32|    int32_t result = janet_abstract_decref(abst);
 1506|     32|    if (0 == result) {
  ------------------
  |  Branch (1506:9): [True: 32, False: 0]
  ------------------
 1507|     32|        JanetAbstractHead *head = janet_abstract_head(abst);
  ------------------
  |  | 1896|     32|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
 1508|     32|        if (head->type->gc) {
  ------------------
  |  Branch (1508:13): [True: 32, False: 0]
  ------------------
 1509|     32|            janet_assert(!head->type->gc(head->data, head->size), "finalizer failed");
  ------------------
  |  |  389|     32|#define janet_assert(c, m) do { \
  |  |  390|     32|    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: 32]
  |  |  ------------------
  |  |  391|     32|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 32]
  |  |  ------------------
  ------------------
 1510|     32|        }
 1511|       |        /* Free memory */
 1512|     32|        janet_free(head);
  ------------------
  |  | 2415|     32|#define janet_free(X) free((X))
  ------------------
 1513|     32|    }
 1514|     32|    return result;
 1515|     32|}
janet_array:
 1570|   114k|JanetArray *janet_array(int32_t capacity) {
 1571|   114k|    JanetArray *array = janet_gcalloc(JANET_MEMORY_ARRAY, sizeof(JanetArray));
 1572|   114k|    janet_array_impl(array, capacity);
 1573|   114k|    return array;
 1574|   114k|}
janet_array_weak:
 1577|     29|JanetArray *janet_array_weak(int32_t capacity) {
 1578|     29|    JanetArray *array = janet_gcalloc(JANET_MEMORY_ARRAY_WEAK, sizeof(JanetArray));
 1579|     29|    janet_array_impl(array, capacity);
 1580|     29|    return array;
 1581|     29|}
janet_array_n:
 1584|  11.9M|JanetArray *janet_array_n(const Janet *elements, int32_t n) {
 1585|  11.9M|    JanetArray *array = janet_gcalloc(JANET_MEMORY_ARRAY, sizeof(JanetArray));
 1586|  11.9M|    array->capacity = n;
 1587|  11.9M|    array->count = n;
 1588|  11.9M|    array->data = array_allocate(sizeof(Janet), (size_t) n);
 1589|  11.9M|    if (!array->data) {
  ------------------
  |  Branch (1589:9): [True: 0, False: 11.9M]
  ------------------
 1590|      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]
  |  |  ------------------
  ------------------
 1591|      0|    }
 1592|  11.9M|    safe_memcpy(array->data, elements, sizeof(Janet) * n);
 1593|  11.9M|    return array;
 1594|  11.9M|}
janet_array_ensure:
 1597|  19.5M|void janet_array_ensure(JanetArray *array, int32_t capacity, int32_t growth) {
 1598|  19.5M|    Janet *newData;
 1599|  19.5M|    Janet *old = array->data;
 1600|  19.5M|    if (capacity <= array->capacity) return;
  ------------------
  |  Branch (1600:9): [True: 12.3M, False: 7.16M]
  ------------------
 1601|  7.16M|    int64_t new_capacity = ((int64_t) capacity) * growth;
 1602|  7.16M|    if (new_capacity > INT32_MAX) new_capacity = INT32_MAX;
  ------------------
  |  Branch (1602:9): [True: 0, False: 7.16M]
  ------------------
 1603|  7.16M|    capacity = (int32_t) new_capacity;
 1604|  7.16M|    newData = janet_realloc(old, capacity * sizeof(Janet));
  ------------------
  |  | 2409|  7.16M|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 1605|  7.16M|    if (NULL == newData) {
  ------------------
  |  Branch (1605:9): [True: 0, False: 7.16M]
  ------------------
 1606|      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]
  |  |  ------------------
  ------------------
 1607|      0|    }
 1608|  7.16M|    janet_vm.next_collection += (capacity - array->capacity) * sizeof(Janet);
 1609|  7.16M|    array->data = newData;
 1610|  7.16M|    array->capacity = capacity;
 1611|  7.16M|}
janet_array_push:
 1628|  17.9k|void janet_array_push(JanetArray *array, Janet x) {
 1629|  17.9k|    if (array->count == INT32_MAX) {
  ------------------
  |  Branch (1629:9): [True: 0, False: 17.9k]
  ------------------
 1630|      0|        janet_panic("array overflow");
 1631|      0|    }
 1632|  17.9k|    int32_t newcount = array->count + 1;
 1633|  17.9k|    janet_array_ensure(array, newcount, 2);
 1634|  17.9k|    array->data[array->count] = x;
 1635|  17.9k|    array->count = newcount;
 1636|  17.9k|}
janet_array_pop:
 1639|  80.0k|Janet janet_array_pop(JanetArray *array) {
 1640|  80.0k|    if (array->count) {
  ------------------
  |  Branch (1640:9): [True: 80.0k, False: 0]
  ------------------
 1641|  80.0k|        return array->data[--array->count];
 1642|  80.0k|    } else {
 1643|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1644|      0|    }
 1645|  80.0k|}
cfun_array_weak:
 1670|     23|              "Creates a new empty array with a pre-allocated capacity and support for weak references. Similar to `array/new`.") {
 1671|     23|    janet_fixarity(argc, 1);
 1672|     23|    int32_t cap = janet_getinteger(argv, 0);
 1673|     23|    JanetArray *array = janet_array_weak(cap);
 1674|     23|    return janet_wrap_array(array);
  ------------------
  |  |  845|     23|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|     23|    janet_nanbox_from_pointer((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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1675|     23|}
cfun_array_new_filled:
 1679|  81.9k|              "Creates a new array of `count` elements, all set to `value`, which defaults to nil. Returns the new array.") {
 1680|  81.9k|    janet_arity(argc, 1, 2);
 1681|  81.9k|    int32_t count = janet_getnat(argv, 0);
 1682|  81.9k|    Janet x = (argc == 2) ? argv[1] : janet_wrap_nil();
  ------------------
  |  |  831|  80.3k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  80.3k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  80.3k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  80.3k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1682:15): [True: 1.56k, False: 80.3k]
  ------------------
 1683|  81.9k|    JanetArray *array = janet_array(count);
 1684|   342k|    for (int32_t i = 0; i < count; i++) {
  ------------------
  |  Branch (1684:25): [True: 260k, False: 81.9k]
  ------------------
 1685|   260k|        array->data[i] = x;
 1686|   260k|    }
 1687|  81.9k|    array->count = count;
 1688|  81.9k|    return janet_wrap_array(array);
  ------------------
  |  |  845|  81.9k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  81.9k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  81.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  81.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|  81.9k|}
cfun_array_fill:
 1694|      1|              "Returns the modified array.") {
 1695|      1|    janet_arity(argc, 1, 2);
 1696|      1|    JanetArray *array = janet_getarray(argv, 0);
 1697|      1|    Janet x = (argc == 2) ? argv[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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1697:15): [True: 0, False: 1]
  ------------------
 1698|      1|    for (int32_t i = 0; i < array->count; i++) {
  ------------------
  |  Branch (1698:25): [True: 0, False: 1]
  ------------------
 1699|      0|        array->data[i] = x;
 1700|      0|    }
 1701|      1|    return argv[0];
 1702|      1|}
cfun_array_pop:
 1707|  80.0k|              "the input array.") {
 1708|  80.0k|    janet_fixarity(argc, 1);
 1709|  80.0k|    JanetArray *array = janet_getarray(argv, 0);
 1710|  80.0k|    return janet_array_pop(array);
 1711|  80.0k|}
cfun_array_push:
 1723|  19.4M|              "Push all the elements of xs to the end of an array. Modifies the input array and returns it.") {
 1724|  19.4M|    janet_arity(argc, 1, -1);
 1725|  19.4M|    JanetArray *array = janet_getarray(argv, 0);
 1726|  19.4M|    if (INT32_MAX - argc + 1 <= array->count) {
  ------------------
  |  Branch (1726:9): [True: 0, False: 19.4M]
  ------------------
 1727|      0|        janet_panic("array overflow");
 1728|      0|    }
 1729|  19.4M|    int32_t newcount = array->count - 1 + argc;
 1730|  19.4M|    janet_array_ensure(array, newcount, 2);
 1731|  19.4M|    if (argc > 1) memcpy(array->data + array->count, argv + 1, (size_t)(argc - 1) * sizeof(Janet));
  ------------------
  |  Branch (1731:9): [True: 19.4M, False: 0]
  ------------------
 1732|  19.4M|    array->count = newcount;
 1733|  19.4M|    return argv[0];
 1734|  19.4M|}
cfun_array_ensure:
 1741|      2|              "Otherwise, the backing memory will be reallocated so that there is enough space.") {
 1742|      2|    janet_fixarity(argc, 3);
 1743|      2|    JanetArray *array = janet_getarray(argv, 0);
 1744|      2|    int32_t newcount = janet_getinteger(argv, 1);
 1745|      2|    int32_t growth = janet_getinteger(argv, 2);
 1746|      2|    if (newcount < 1) janet_panic("expected positive integer");
  ------------------
  |  Branch (1746:9): [True: 0, False: 2]
  ------------------
 1747|      2|    janet_array_ensure(array, newcount, growth);
 1748|      2|    return argv[0];
 1749|      2|}
cfun_array_slice:
 1757|  2.90k|              "negative slice range. Returns a new array.") {
 1758|  2.90k|    JanetView view = janet_getindexed(argv, 0);
 1759|  2.90k|    JanetRange range = janet_getslice(argc, argv);
 1760|  2.90k|    JanetArray *array = janet_array(range.end - range.start);
 1761|  2.90k|    if (array->data)
  ------------------
  |  Branch (1761:9): [True: 2.85k, False: 47]
  ------------------
 1762|  2.85k|        memcpy(array->data, view.items + range.start, sizeof(Janet) * (range.end - range.start));
 1763|  2.90k|    array->count = range.end - range.start;
 1764|  2.90k|    return janet_wrap_array(array);
  ------------------
  |  |  845|  2.90k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  2.90k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.90k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.90k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1765|  2.90k|}
cfun_array_concat:
 1772|  53.7k|              "Return the modified array `arr`.") {
 1773|  53.7k|    int32_t i;
 1774|  53.7k|    janet_arity(argc, 1, -1);
 1775|  53.7k|    JanetArray *array = janet_getarray(argv, 0);
 1776|   114k|    for (i = 1; i < argc; i++) {
  ------------------
  |  Branch (1776:17): [True: 60.3k, False: 53.7k]
  ------------------
 1777|  60.3k|        switch (janet_type(argv[i])) {
  ------------------
  |  |  795|  60.3k|    (isnan((x).number) \
  |  |  796|  60.3k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  60.3k|        : JANET_NUMBER)
  ------------------
  |  Branch (1777:17): [True: 60.3k, False: 0]
  ------------------
 1778|      0|            default:
  ------------------
  |  Branch (1778:13): [True: 0, False: 60.3k]
  ------------------
 1779|      0|                janet_array_push(array, argv[i]);
 1780|      0|                break;
 1781|  53.7k|            case JANET_ARRAY:
  ------------------
  |  Branch (1781:13): [True: 53.7k, False: 6.55k]
  ------------------
 1782|  60.3k|            case JANET_TUPLE: {
  ------------------
  |  Branch (1782:13): [True: 6.55k, False: 53.7k]
  ------------------
 1783|  60.3k|                int32_t j, len = 0;
 1784|  60.3k|                const Janet *vals = NULL;
 1785|  60.3k|                janet_indexed_view(argv[i], &vals, &len);
 1786|  60.3k|                if (array->data == vals) {
  ------------------
  |  Branch (1786:21): [True: 0, False: 60.3k]
  ------------------
 1787|      0|                    int32_t newcount = array->count + len;
 1788|      0|                    janet_array_ensure(array, newcount, 2);
 1789|      0|                    janet_indexed_view(argv[i], &vals, &len);
 1790|      0|                }
 1791|  72.2k|                for (j = 0; j < len; j++)
  ------------------
  |  Branch (1791:29): [True: 11.9k, False: 60.3k]
  ------------------
 1792|  11.9k|                    janet_array_push(array, vals[j]);
 1793|  60.3k|            }
 1794|  60.3k|            break;
 1795|  60.3k|        }
 1796|  60.3k|    }
 1797|  53.7k|    return janet_wrap_array(array);
  ------------------
  |  |  845|  53.7k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  53.7k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  53.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  53.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1798|  53.7k|}
cfun_array_join:
 1804|      1|              "Return the modified array `arr`.") {
 1805|      1|    int32_t i;
 1806|      1|    janet_arity(argc, 1, -1);
 1807|      1|    JanetArray *array = janet_getarray(argv, 0);
 1808|      1|    for (i = 1; i < argc; i++) {
  ------------------
  |  Branch (1808:17): [True: 0, False: 1]
  ------------------
 1809|      0|        int32_t j, len = 0;
 1810|      0|        const Janet *vals = NULL;
 1811|      0|        if (!janet_indexed_view(argv[i], &vals, &len)) {
  ------------------
  |  Branch (1811:13): [True: 0, False: 0]
  ------------------
 1812|      0|            janet_panicf("expected indexed type for argument %d, got %v", i, argv[i]);
 1813|      0|        }
 1814|      0|        if (array->data == vals) {
  ------------------
  |  Branch (1814:13): [True: 0, False: 0]
  ------------------
 1815|      0|            int32_t newcount = array->count + len;
 1816|      0|            janet_array_ensure(array, newcount, 2);
 1817|      0|            janet_indexed_view(argv[i], &vals, &len);
 1818|      0|        }
 1819|      0|        for (j = 0; j < len; j++)
  ------------------
  |  Branch (1819:21): [True: 0, False: 0]
  ------------------
 1820|      0|            janet_array_push(array, vals[j]);
 1821|      0|    }
 1822|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1823|      1|}
cfun_array_remove:
 1861|  40.0k|              "Returns the array.") {
 1862|  40.0k|    janet_arity(argc, 2, 3);
 1863|  40.0k|    JanetArray *array = janet_getarray(argv, 0);
 1864|  40.0k|    int32_t at = janet_getinteger(argv, 1);
 1865|  40.0k|    int32_t n = 1;
 1866|  40.0k|    if (at < 0) {
  ------------------
  |  Branch (1866:9): [True: 0, False: 40.0k]
  ------------------
 1867|      0|        at = array->count + at;
 1868|      0|    }
 1869|  40.0k|    if (at < 0 || at > array->count)
  ------------------
  |  Branch (1869:9): [True: 0, False: 40.0k]
  |  Branch (1869:19): [True: 0, False: 40.0k]
  ------------------
 1870|      0|        janet_panicf("removal index %d out of range [0,%d]", at, array->count);
 1871|  40.0k|    if (argc == 3) {
  ------------------
  |  Branch (1871:9): [True: 40.0k, False: 0]
  ------------------
 1872|  40.0k|        n = janet_getinteger(argv, 2);
 1873|  40.0k|        if (n < 0)
  ------------------
  |  Branch (1873:13): [True: 0, False: 40.0k]
  ------------------
 1874|      0|            janet_panicf("expected non-negative integer for argument n, got %v", argv[2]);
 1875|  40.0k|    }
 1876|  40.0k|    if (at + n > array->count) {
  ------------------
  |  Branch (1876:9): [True: 0, False: 40.0k]
  ------------------
 1877|      0|        n = array->count - at;
 1878|      0|    }
 1879|  40.0k|    memmove(array->data + at,
 1880|  40.0k|            array->data + at + n,
 1881|  40.0k|            (array->count - at - n) * sizeof(Janet));
 1882|  40.0k|    array->count -= n;
 1883|  40.0k|    return argv[0];
 1884|  40.0k|}
janet_lib_array:
 1919|  7.16k|void janet_lib_array(JanetTable *env) {
 1920|  7.16k|    JanetRegExt array_cfuns[] = {
 1921|  7.16k|        JANET_CORE_REG("array/new", cfun_array_new),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1922|  7.16k|        JANET_CORE_REG("array/weak", cfun_array_weak),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1923|  7.16k|        JANET_CORE_REG("array/new-filled", cfun_array_new_filled),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1924|  7.16k|        JANET_CORE_REG("array/fill", cfun_array_fill),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1925|  7.16k|        JANET_CORE_REG("array/pop", cfun_array_pop),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1926|  7.16k|        JANET_CORE_REG("array/peek", cfun_array_peek),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1927|  7.16k|        JANET_CORE_REG("array/push", cfun_array_push),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1928|  7.16k|        JANET_CORE_REG("array/ensure", cfun_array_ensure),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1929|  7.16k|        JANET_CORE_REG("array/slice", cfun_array_slice),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1930|  7.16k|        JANET_CORE_REG("array/concat", cfun_array_concat),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1931|  7.16k|        JANET_CORE_REG("array/insert", cfun_array_insert),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1932|  7.16k|        JANET_CORE_REG("array/remove", cfun_array_remove),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1933|  7.16k|        JANET_CORE_REG("array/trim", cfun_array_trim),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1934|  7.16k|        JANET_CORE_REG("array/clear", cfun_array_clear),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1935|  7.16k|        JANET_CORE_REG("array/join", cfun_array_join),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1936|  7.16k|        JANET_REG_END
  ------------------
  |  | 2109|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 1937|  7.16k|    };
 1938|       |    janet_core_cfuns_ext(env, NULL, array_cfuns);
 1939|  7.16k|}
janet_lib_asm:
 3069|  7.16k|void janet_lib_asm(JanetTable *env) {
 3070|  7.16k|    JanetRegExt asm_cfuns[] = {
 3071|  7.16k|        JANET_CORE_REG("asm", cfun_asm),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3072|  7.16k|        JANET_CORE_REG("disasm", cfun_disasm),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3073|  7.16k|        JANET_REG_END
  ------------------
  |  | 2109|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 3074|  7.16k|    };
 3075|       |    janet_core_cfuns_ext(env, NULL, asm_cfuns);
 3076|  7.16k|}
janet_buffer_init:
 3137|   274k|JanetBuffer *janet_buffer_init(JanetBuffer *buffer, int32_t capacity) {
 3138|   274k|    janet_buffer_init_impl(buffer, capacity);
 3139|   274k|    buffer->gc.data.next = NULL;
 3140|   274k|    buffer->gc.flags = JANET_MEM_DISABLED;
  ------------------
  |  |  632|   274k|#define JANET_MEM_DISABLED 0x200
  ------------------
 3141|   274k|    return buffer;
 3142|   274k|}
janet_buffer_deinit:
 3157|  1.51M|void janet_buffer_deinit(JanetBuffer *buffer) {
 3158|  1.51M|    if (!(buffer->gc.flags & JANET_BUFFER_FLAG_NO_REALLOC)) {
  ------------------
  |  | 1779|  1.51M|#define JANET_BUFFER_FLAG_NO_REALLOC 0x10000
  ------------------
  |  Branch (3158:9): [True: 1.51M, False: 0]
  ------------------
 3159|  1.51M|        janet_free(buffer->data);
  ------------------
  |  | 2415|  1.51M|#define janet_free(X) free((X))
  ------------------
 3160|       |        buffer->data = NULL;
 3161|  1.51M|    }
 3162|  1.51M|}
janet_buffer:
 3165|  1.23M|JanetBuffer *janet_buffer(int32_t capacity) {
 3166|  1.23M|    JanetBuffer *buffer = janet_gcalloc(JANET_MEMORY_BUFFER, sizeof(JanetBuffer));
 3167|  1.23M|    return janet_buffer_init_impl(buffer, capacity);
 3168|  1.23M|}
janet_buffer_ensure:
 3171|  1.02M|void janet_buffer_ensure(JanetBuffer *buffer, int32_t capacity, int32_t growth) {
 3172|  1.02M|    uint8_t *new_data;
 3173|  1.02M|    uint8_t *old = buffer->data;
 3174|  1.02M|    if (capacity <= buffer->capacity) return;
  ------------------
  |  Branch (3174:9): [True: 67.2k, False: 959k]
  ------------------
 3175|   959k|    janet_buffer_can_realloc(buffer);
 3176|   959k|    int64_t big_capacity = ((int64_t) capacity) * growth;
 3177|   959k|    capacity = big_capacity > INT32_MAX ? INT32_MAX : (int32_t) big_capacity;
  ------------------
  |  Branch (3177:16): [True: 0, False: 959k]
  ------------------
 3178|   959k|    janet_gcpressure(capacity - buffer->capacity);
 3179|   959k|    new_data = janet_realloc(old, (size_t) capacity * sizeof(uint8_t));
  ------------------
  |  | 2409|   959k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 3180|   959k|    if (NULL == new_data) {
  ------------------
  |  Branch (3180:9): [True: 0, False: 959k]
  ------------------
 3181|      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]
  |  |  ------------------
  ------------------
 3182|      0|    }
 3183|   959k|    buffer->data = new_data;
 3184|   959k|    buffer->capacity = capacity;
 3185|   959k|}
janet_buffer_setcount:
 3188|      7|void janet_buffer_setcount(JanetBuffer *buffer, int32_t count) {
 3189|      7|    if (count < 0)
  ------------------
  |  Branch (3189:9): [True: 0, False: 7]
  ------------------
 3190|      0|        return;
 3191|      7|    if (count > buffer->count) {
  ------------------
  |  Branch (3191:9): [True: 6, False: 1]
  ------------------
 3192|      6|        int32_t oldcount = buffer->count;
 3193|      6|        janet_buffer_ensure(buffer, count, 1);
 3194|      6|        memset(buffer->data + oldcount, 0, count - oldcount);
 3195|      6|    }
 3196|      7|    buffer->count = count;
 3197|      7|}
janet_buffer_extra:
 3201|  67.2M|void janet_buffer_extra(JanetBuffer *buffer, int32_t n) {
 3202|       |    /* Check for buffer overflow */
 3203|  67.2M|    if ((int64_t)n + buffer->count > INT32_MAX) {
  ------------------
  |  Branch (3203:9): [True: 0, False: 67.2M]
  ------------------
 3204|      0|        janet_panic("buffer overflow");
 3205|      0|    }
 3206|  67.2M|    int32_t new_size = buffer->count + n;
 3207|  67.2M|    if (new_size > buffer->capacity) {
  ------------------
  |  Branch (3207:9): [True: 1.24M, False: 66.0M]
  ------------------
 3208|  1.24M|        janet_buffer_can_realloc(buffer);
 3209|  1.24M|        int32_t new_capacity = (new_size > (INT32_MAX / 2)) ? INT32_MAX : (new_size * 2);
  ------------------
  |  Branch (3209:32): [True: 0, False: 1.24M]
  ------------------
 3210|  1.24M|        uint8_t *new_data = janet_realloc(buffer->data, new_capacity * sizeof(uint8_t));
  ------------------
  |  | 2409|  1.24M|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 3211|  1.24M|        janet_gcpressure(new_capacity - buffer->capacity);
 3212|  1.24M|        if (NULL == new_data) {
  ------------------
  |  Branch (3212:13): [True: 0, False: 1.24M]
  ------------------
 3213|      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]
  |  |  ------------------
  ------------------
 3214|      0|        }
 3215|  1.24M|        buffer->data = new_data;
 3216|  1.24M|        buffer->capacity = new_capacity;
 3217|  1.24M|    }
 3218|  67.2M|}
janet_buffer_push_cstring:
 3221|   296k|void janet_buffer_push_cstring(JanetBuffer *buffer, const char *cstring) {
 3222|   296k|    int32_t len = (int32_t) strlen(cstring);
 3223|   296k|    janet_buffer_push_bytes(buffer, (const uint8_t *) cstring, len);
 3224|   296k|}
janet_buffer_push_bytes:
 3227|  10.2M|void janet_buffer_push_bytes(JanetBuffer *buffer, const uint8_t *string, int32_t length) {
 3228|  10.2M|    if (0 == length) return;
  ------------------
  |  Branch (3228:9): [True: 217k, False: 10.0M]
  ------------------
 3229|  10.0M|    janet_buffer_extra(buffer, length);
 3230|  10.0M|    memcpy(buffer->data + buffer->count, string, length);
 3231|  10.0M|    buffer->count += length;
 3232|  10.0M|}
janet_buffer_push_u8:
 3239|  57.2M|void janet_buffer_push_u8(JanetBuffer *buffer, uint8_t byte) {
 3240|  57.2M|    janet_buffer_extra(buffer, 1);
 3241|  57.2M|    buffer->data[buffer->count] = byte;
 3242|  57.2M|    buffer->count++;
 3243|  57.2M|}
cfun_buffer_new:
 3282|      9|              "Returns a new buffer of length 0.") {
 3283|      9|    janet_fixarity(argc, 1);
 3284|      9|    int32_t cap = janet_getinteger(argv, 0);
 3285|      9|    JanetBuffer *buffer = janet_buffer(cap);
 3286|      9|    return janet_wrap_buffer(buffer);
  ------------------
  |  |  847|      9|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3287|      9|}
cfun_buffer_new_filled:
 3292|     20|              "Returns the new buffer.") {
 3293|     20|    janet_arity(argc, 1, 2);
 3294|     20|    int32_t count = janet_getinteger(argv, 0);
 3295|     20|    if (count < 0) count = 0;
  ------------------
  |  Branch (3295:9): [True: 2, False: 18]
  ------------------
 3296|     20|    int32_t byte = 0;
 3297|     20|    if (argc == 2) {
  ------------------
  |  Branch (3297:9): [True: 4, False: 16]
  ------------------
 3298|      4|        byte = janet_getinteger(argv, 1) & 0xFF;
 3299|      4|    }
 3300|     20|    JanetBuffer *buffer = janet_buffer(count);
 3301|     20|    if (buffer->data && count > 0)
  ------------------
  |  Branch (3301:9): [True: 12, False: 8]
  |  Branch (3301:25): [True: 11, False: 1]
  ------------------
 3302|     11|        memset(buffer->data, byte, count);
 3303|     20|    buffer->count = count;
 3304|     20|    return janet_wrap_buffer(buffer);
  ------------------
  |  |  847|     20|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|     20|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     20|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     20|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3305|     20|}
cfun_buffer_frombytes:
 3310|      1|              "will be coerced to the range of 1 byte 0-255.") {
 3311|      1|    int32_t i;
 3312|      1|    JanetBuffer *buffer = janet_buffer(argc);
 3313|      2|    for (i = 0; i < argc; i++) {
  ------------------
  |  Branch (3313:17): [True: 1, False: 1]
  ------------------
 3314|      1|        int32_t c = janet_getinteger(argv, i);
 3315|      1|        buffer->data[i] = c & 0xFF;
 3316|      1|    }
 3317|      1|    buffer->count = argc;
 3318|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3319|      1|}
cfun_buffer_fill:
 3324|      2|              "Returns the modified buffer.") {
 3325|      2|    janet_arity(argc, 1, 2);
 3326|      2|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3327|      2|    int32_t byte = 0;
 3328|      2|    if (argc == 2) {
  ------------------
  |  Branch (3328:9): [True: 0, False: 2]
  ------------------
 3329|      0|        byte = janet_getinteger(argv, 1) & 0xFF;
 3330|      0|    }
 3331|      2|    if (buffer->count) {
  ------------------
  |  Branch (3331:9): [True: 0, False: 2]
  ------------------
 3332|      0|        memset(buffer->data, byte, buffer->count);
 3333|      0|    }
 3334|      2|    return argv[0];
 3335|      2|}
cfun_buffer_word:
 3373|      3|              "Expands the buffer as necessary. Throws an error if size limit is exceeded.") {
 3374|      3|    int32_t i;
 3375|      3|    janet_arity(argc, 1, -1);
 3376|      3|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3377|      3|    for (i = 1; i < argc; i++) {
  ------------------
  |  Branch (3377:17): [True: 0, False: 3]
  ------------------
 3378|      0|        double number = janet_getnumber(argv, i);
 3379|      0|        uint32_t word = (uint32_t) number;
 3380|      0|        if (word != number)
  ------------------
  |  Branch (3380:13): [True: 0, False: 0]
  ------------------
 3381|      0|            janet_panicf("cannot convert %v to machine word", argv[i]);
 3382|      0|        janet_buffer_push_u32(buffer, word);
 3383|      0|    }
 3384|      3|    return argv[0];
 3385|      3|}
cfun_buffer_chars:
 3392|    547|              "Expands the buffer as necessary. Throws an error if size limit is exceeded.") {
 3393|    547|    int32_t i;
 3394|    547|    janet_arity(argc, 1, -1);
 3395|    547|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3396|  1.09k|    for (i = 1; i < argc; i++) {
  ------------------
  |  Branch (3396:17): [True: 547, False: 547]
  ------------------
 3397|    547|        JanetByteView view = janet_getbytes(argv, i);
 3398|    547|        if (view.bytes == buffer->data) {
  ------------------
  |  Branch (3398:13): [True: 0, False: 547]
  ------------------
 3399|      0|            janet_buffer_ensure(buffer, buffer->count + view.len, 2);
 3400|      0|            view.bytes = buffer->data;
 3401|      0|        }
 3402|    547|        janet_buffer_push_bytes(buffer, view.bytes, view.len);
 3403|    547|    }
 3404|    547|    return argv[0];
 3405|    547|}
cfun_buffer_push_uint16:
 3455|      2|              "Expands the buffer as necessary. Throws an error if size limit is exceeded.") {
 3456|      2|    janet_fixarity(argc, 3);
 3457|      2|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3458|      2|    int reverse = should_reverse_bytes(argv, 1);
 3459|      2|    uint16_t data = janet_getuinteger16(argv, 2);
 3460|      2|    uint8_t bytes[sizeof(data)];
 3461|      2|    memcpy(bytes, &data, sizeof(bytes));
 3462|      2|    if (reverse) {
  ------------------
  |  Branch (3462:9): [True: 0, False: 2]
  ------------------
 3463|      0|        uint8_t temp = bytes[1];
 3464|      0|        bytes[1] = bytes[0];
 3465|      0|        bytes[0] = temp;
 3466|      0|    }
 3467|      2|    janet_buffer_push_bytes(buffer, bytes, sizeof(bytes));
 3468|      2|    return argv[0];
 3469|      2|}
cfun_buffer_push_uint32:
 3475|      3|              "Expands the buffer as necessary. Throws an error if size limit is exceeded.") {
 3476|      3|    janet_fixarity(argc, 3);
 3477|      3|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3478|      3|    int reverse = should_reverse_bytes(argv, 1);
 3479|      3|    uint32_t data = janet_getuinteger(argv, 2);
 3480|      3|    uint8_t bytes[sizeof(data)];
 3481|      3|    memcpy(bytes, &data, sizeof(bytes));
 3482|      3|    if (reverse)
  ------------------
  |  Branch (3482:9): [True: 0, False: 3]
  ------------------
 3483|      0|        reverse_u32(bytes);
 3484|      3|    janet_buffer_push_bytes(buffer, bytes, sizeof(bytes));
 3485|      3|    return argv[0];
 3486|      3|}
cfun_buffer_push_float32:
 3509|      1|              "Expands the buffer as necessary. Throws an error if size limit is exceeded.") {
 3510|      1|    janet_fixarity(argc, 3);
 3511|      1|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3512|      1|    int reverse = should_reverse_bytes(argv, 1);
 3513|      1|    float data = (float) janet_getnumber(argv, 2);
 3514|      1|    uint8_t bytes[sizeof(data)];
 3515|      1|    memcpy(bytes, &data, sizeof(bytes));
 3516|      1|    if (reverse)
  ------------------
  |  Branch (3516:9): [True: 0, False: 1]
  ------------------
 3517|      0|        reverse_u32(bytes);
 3518|      1|    janet_buffer_push_bytes(buffer, bytes, sizeof(bytes));
 3519|      1|    return argv[0];
 3520|      1|}
cfun_buffer_push_float64:
 3526|      2|              "Expands the buffer as necessary. Throws an error if size limit is exceeded.") {
 3527|      2|    janet_fixarity(argc, 3);
 3528|      2|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3529|      2|    int reverse = should_reverse_bytes(argv, 1);
 3530|      2|    double data = janet_getnumber(argv, 2);
 3531|      2|    uint8_t bytes[sizeof(data)];
 3532|      2|    memcpy(bytes, &data, sizeof(bytes));
 3533|      2|    if (reverse)
  ------------------
  |  Branch (3533:9): [True: 0, False: 2]
  ------------------
 3534|      0|        reverse_u64(bytes);
 3535|      2|    janet_buffer_push_bytes(buffer, bytes, sizeof(bytes));
 3536|      2|    return argv[0];
 3537|      2|}
cfun_buffer_push:
 3579|  61.8k|              "Expands the buffer as necessary. Throws an error if size limit is exceeded.") {
 3580|  61.8k|    janet_arity(argc, 1, -1);
 3581|  61.8k|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3582|  61.8k|    buffer_push_impl(buffer, argv, 1, argc);
 3583|  61.8k|    return argv[0];
 3584|  61.8k|}
cfun_buffer_clear:
 3589|   107k|              "its memory so it can be efficiently refilled. Returns the modified buffer.") {
 3590|   107k|    janet_fixarity(argc, 1);
 3591|   107k|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3592|   107k|    buffer->count = 0;
 3593|   107k|    return argv[0];
 3594|   107k|}
cfun_buffer_popn:
 3598|      1|              "Removes the last `n` bytes from the buffer. Returns the modified buffer.") {
 3599|      1|    janet_fixarity(argc, 2);
 3600|      1|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3601|      1|    int32_t n = janet_getinteger(argv, 1);
 3602|      1|    if (n < 0) janet_panic("n must be non-negative");
  ------------------
  |  Branch (3602:9): [True: 0, False: 1]
  ------------------
 3603|      1|    if (buffer->count < n) {
  ------------------
  |  Branch (3603:9): [True: 0, False: 1]
  ------------------
 3604|      0|        buffer->count = 0;
 3605|      1|    } else {
 3606|      1|        buffer->count -= n;
 3607|      1|    }
 3608|      1|    return argv[0];
 3609|      1|}
cfun_buffer_bitclear:
 3653|      1|              "Clears the bit at the given bit-index. Returns the buffer.") {
 3654|      1|    int bit;
 3655|      1|    int32_t index;
 3656|      1|    JanetBuffer *buffer;
 3657|      1|    bitloc(argc, argv, &buffer, &index, &bit);
 3658|      1|    buffer->data[index] &= ~(1 << bit);
 3659|      1|    return argv[0];
 3660|      1|}
cfun_buffer_bittoggle:
 3674|      8|              "Toggles the bit at the given bit index in buffer. Returns the buffer.") {
 3675|      8|    int bit;
 3676|      8|    int32_t index;
 3677|      8|    JanetBuffer *buffer;
 3678|      8|    bitloc(argc, argv, &buffer, &index, &bit);
 3679|      8|    buffer->data[index] ^= (1 << bit);
 3680|      8|    return argv[0];
 3681|      8|}
cfun_buffer_format:
 3729|    547|              "the modified buffer.") {
 3730|    547|    janet_arity(argc, 2, -1);
 3731|    547|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3732|    547|    const char *strfrmt = (const char *) janet_getstring(argv, 1);
 3733|    547|    janet_buffer_format(buffer, strfrmt, 1, argc, argv);
 3734|    547|    return argv[0];
 3735|    547|}
cfun_buffer_format_at:
 3740|      2|              "the modified buffer.") {
 3741|      2|    janet_arity(argc, 2, -1);
 3742|      2|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3743|      2|    int32_t at = janet_getinteger(argv, 1);
 3744|      2|    if (at < 0) {
  ------------------
  |  Branch (3744:9): [True: 0, False: 2]
  ------------------
 3745|      0|        at += buffer->count + 1;
 3746|      0|    }
 3747|      2|    if (at > buffer->count || at < 0) janet_panicf("expected index at to be in range [0, %d), got %d", buffer->count, at);
  ------------------
  |  Branch (3747:9): [True: 2, False: 0]
  |  Branch (3747:31): [True: 0, False: 0]
  ------------------
 3748|      2|    int32_t oldcount = buffer->count;
 3749|      2|    buffer->count = at;
 3750|      2|    const char *strfrmt = (const char *) janet_getstring(argv, 2);
 3751|      2|    janet_buffer_format(buffer, strfrmt, 2, argc, argv);
 3752|      2|    if (buffer->count < oldcount) {
  ------------------
  |  Branch (3752:9): [True: 0, False: 2]
  ------------------
 3753|      0|        buffer->count = oldcount;
 3754|      0|    }
 3755|      2|    return argv[0];
 3756|      2|}
janet_lib_buffer:
 3758|  7.16k|void janet_lib_buffer(JanetTable *env) {
 3759|  7.16k|    JanetRegExt buffer_cfuns[] = {
 3760|  7.16k|        JANET_CORE_REG("buffer/new", cfun_buffer_new),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3761|  7.16k|        JANET_CORE_REG("buffer/new-filled", cfun_buffer_new_filled),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3762|  7.16k|        JANET_CORE_REG("buffer/from-bytes", cfun_buffer_frombytes),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3763|  7.16k|        JANET_CORE_REG("buffer/fill", cfun_buffer_fill),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3764|  7.16k|        JANET_CORE_REG("buffer/trim", cfun_buffer_trim),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3765|  7.16k|        JANET_CORE_REG("buffer/push-byte", cfun_buffer_u8),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3766|  7.16k|        JANET_CORE_REG("buffer/push-word", cfun_buffer_word),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3767|  7.16k|        JANET_CORE_REG("buffer/push-string", cfun_buffer_chars),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3768|  7.16k|        JANET_CORE_REG("buffer/push-uint16", cfun_buffer_push_uint16),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3769|  7.16k|        JANET_CORE_REG("buffer/push-uint32", cfun_buffer_push_uint32),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3770|  7.16k|        JANET_CORE_REG("buffer/push-uint64", cfun_buffer_push_uint64),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3771|  7.16k|        JANET_CORE_REG("buffer/push-float32", cfun_buffer_push_float32),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3772|  7.16k|        JANET_CORE_REG("buffer/push-float64", cfun_buffer_push_float64),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3773|  7.16k|        JANET_CORE_REG("buffer/push", cfun_buffer_push),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3774|  7.16k|        JANET_CORE_REG("buffer/push-at", cfun_buffer_push_at),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3775|  7.16k|        JANET_CORE_REG("buffer/popn", cfun_buffer_popn),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3776|  7.16k|        JANET_CORE_REG("buffer/clear", cfun_buffer_clear),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3777|  7.16k|        JANET_CORE_REG("buffer/slice", cfun_buffer_slice),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3778|  7.16k|        JANET_CORE_REG("buffer/bit-set", cfun_buffer_bitset),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3779|  7.16k|        JANET_CORE_REG("buffer/bit-clear", cfun_buffer_bitclear),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3780|  7.16k|        JANET_CORE_REG("buffer/bit", cfun_buffer_bitget),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3781|  7.16k|        JANET_CORE_REG("buffer/bit-toggle", cfun_buffer_bittoggle),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3782|  7.16k|        JANET_CORE_REG("buffer/blit", cfun_buffer_blit),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3783|  7.16k|        JANET_CORE_REG("buffer/format", cfun_buffer_format),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3784|  7.16k|        JANET_CORE_REG("buffer/format-at", cfun_buffer_format_at),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3785|  7.16k|        JANET_REG_END
  ------------------
  |  | 2109|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 3786|  7.16k|    };
 3787|       |    janet_core_cfuns_ext(env, NULL, buffer_cfuns);
 3788|  7.16k|}
janet_bytecode_remove_noops:
 3907|   688k|void janet_bytecode_remove_noops(JanetFuncDef *def) {
 3908|       |
 3909|       |    /* Get an instruction rewrite map so we can rewrite jumps */
 3910|   688k|    uint32_t *pc_map = janet_smalloc(sizeof(uint32_t) * (1 + def->bytecode_length));
 3911|   688k|    uint32_t new_bytecode_length = 0;
 3912|  7.39M|    for (int32_t i = 0; i < def->bytecode_length; i++) {
  ------------------
  |  Branch (3912:25): [True: 6.70M, False: 688k]
  ------------------
 3913|  6.70M|        uint32_t instr = def->bytecode[i];
 3914|  6.70M|        uint32_t opcode = instr & 0x7F;
 3915|  6.70M|        pc_map[i] = new_bytecode_length;
 3916|  6.70M|        if (opcode != JOP_NOOP) {
  ------------------
  |  Branch (3916:13): [True: 6.38M, False: 321k]
  ------------------
 3917|  6.38M|            new_bytecode_length++;
 3918|  6.38M|        }
 3919|  6.70M|    }
 3920|   688k|    pc_map[def->bytecode_length] = new_bytecode_length;
 3921|       |
 3922|       |    /* Linear scan rewrite bytecode and sourcemap. Also fix jumps. */
 3923|   688k|    int32_t j = 0;
 3924|  7.39M|    for (int32_t i = 0; i < def->bytecode_length; i++) {
  ------------------
  |  Branch (3924:25): [True: 6.70M, False: 688k]
  ------------------
 3925|  6.70M|        uint32_t instr = def->bytecode[i];
 3926|  6.70M|        uint32_t opcode = instr & 0x7F;
 3927|  6.70M|        int32_t old_jump_target = 0;
 3928|  6.70M|        int32_t new_jump_target = 0;
 3929|  6.70M|        switch (opcode) {
 3930|   321k|            case JOP_NOOP:
  ------------------
  |  Branch (3930:13): [True: 321k, False: 6.38M]
  ------------------
 3931|   321k|                continue;
 3932|    516|            case JOP_JUMP:
  ------------------
  |  Branch (3932:13): [True: 516, False: 6.70M]
  ------------------
 3933|       |                /* relative pc is in DS field of instruction */
 3934|    516|                old_jump_target = i + (((int32_t)instr) >> 8);
 3935|    516|                janet_assert(old_jump_target >= 0, "bounds");
  ------------------
  |  |  389|    516|#define janet_assert(c, m) do { \
  |  |  390|    516|    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: 516]
  |  |  ------------------
  |  |  391|    516|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 516]
  |  |  ------------------
  ------------------
 3936|    516|                janet_assert(old_jump_target < def->bytecode_length, "bounds");
  ------------------
  |  |  389|    516|#define janet_assert(c, m) do { \
  |  |  390|    516|    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: 516]
  |  |  ------------------
  |  |  391|    516|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 516]
  |  |  ------------------
  ------------------
 3937|    516|                new_jump_target = pc_map[old_jump_target];
 3938|    516|                instr += (uint32_t)(new_jump_target - old_jump_target + (i - j)) << 8;
 3939|    516|                break;
 3940|    220|            case JOP_JUMP_IF:
  ------------------
  |  Branch (3940:13): [True: 220, False: 6.70M]
  ------------------
 3941|    460|            case JOP_JUMP_IF_NIL:
  ------------------
  |  Branch (3941:13): [True: 240, False: 6.70M]
  ------------------
 3942|  23.6k|            case JOP_JUMP_IF_NOT:
  ------------------
  |  Branch (3942:13): [True: 23.1k, False: 6.68M]
  ------------------
 3943|  24.3k|            case JOP_JUMP_IF_NOT_NIL:
  ------------------
  |  Branch (3943:13): [True: 720, False: 6.70M]
  ------------------
 3944|       |                /* relative pc is in ES field of instruction */
 3945|  24.3k|                old_jump_target = i + (((int32_t)instr) >> 16);
 3946|  24.3k|                janet_assert(old_jump_target >= 0, "bounds");
  ------------------
  |  |  389|  24.3k|#define janet_assert(c, m) do { \
  |  |  390|  24.3k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 24.3k]
  |  |  ------------------
  |  |  391|  24.3k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 24.3k]
  |  |  ------------------
  ------------------
 3947|  24.3k|                janet_assert(old_jump_target < def->bytecode_length, "bounds");
  ------------------
  |  |  389|  24.3k|#define janet_assert(c, m) do { \
  |  |  390|  24.3k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 24.3k]
  |  |  ------------------
  |  |  391|  24.3k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 24.3k]
  |  |  ------------------
  ------------------
 3948|  24.3k|                new_jump_target = pc_map[old_jump_target];
 3949|  24.3k|                instr += (uint32_t)(new_jump_target - old_jump_target + (i - j)) << 16;
 3950|  24.3k|                break;
 3951|  6.35M|            default:
  ------------------
  |  Branch (3951:13): [True: 6.35M, False: 345k]
  ------------------
 3952|  6.35M|                break;
 3953|  6.70M|        }
 3954|  6.38M|        def->bytecode[j] = instr;
 3955|  6.38M|        if (def->sourcemap != NULL) {
  ------------------
  |  Branch (3955:13): [True: 6.38M, False: 0]
  ------------------
 3956|  6.38M|            def->sourcemap[j] = def->sourcemap[i];
 3957|  6.38M|        }
 3958|  6.38M|        j++;
 3959|  6.38M|    }
 3960|       |
 3961|       |    /* Rewrite symbolmap */
 3962|  17.0M|    for (int32_t i = 0; i < def->symbolmap_length; i++) {
  ------------------
  |  Branch (3962:25): [True: 16.4M, False: 688k]
  ------------------
 3963|  16.4M|        JanetSymbolMap *sm = def->symbolmap + i;
 3964|       |        /* Don't rewrite upvalue mappings */
 3965|  16.4M|        if (sm->birth_pc < UINT32_MAX) {
  ------------------
  |  Branch (3965:13): [True: 1.00M, False: 15.3M]
  ------------------
 3966|  1.00M|            sm->birth_pc = pc_map[sm->birth_pc];
 3967|  1.00M|            sm->death_pc = pc_map[sm->death_pc];
 3968|  1.00M|        }
 3969|  16.4M|    }
 3970|       |
 3971|   688k|    def->bytecode_length = new_bytecode_length;
 3972|   688k|    def->bytecode = janet_realloc(def->bytecode, def->bytecode_length * sizeof(uint32_t));
  ------------------
  |  | 2409|   688k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 3973|   688k|    janet_sfree(pc_map);
 3974|   688k|}
janet_bytecode_movopt:
 3978|   688k|void janet_bytecode_movopt(JanetFuncDef *def) {
 3979|   688k|    JanetcRegisterAllocator ra;
 3980|   688k|    int recur = 1;
 3981|       |
 3982|       |    /* Iterate this until no more instructions can be removed. */
 3983|  1.39M|    while (recur) {
  ------------------
  |  Branch (3983:12): [True: 705k, False: 688k]
  ------------------
 3984|   705k|        janetc_regalloc_init(&ra);
 3985|       |
 3986|       |        /* Look for slots that have writes but no reads (and aren't in the closure bitset). */
 3987|   705k|        if (def->closure_bitset != NULL) {
  ------------------
  |  Branch (3987:13): [True: 7.88k, False: 697k]
  ------------------
 3988|  13.4M|            for (int32_t i = 0; i < def->slotcount; i++) {
  ------------------
  |  Branch (3988:33): [True: 13.4M, False: 7.88k]
  ------------------
 3989|  13.4M|                int32_t index = i >> 5;
 3990|  13.4M|                uint32_t mask = 1U << (((uint32_t) i) & 31);
 3991|  13.4M|                if (def->closure_bitset[index] & mask) {
  ------------------
  |  Branch (3991:21): [True: 23.5k, False: 13.3M]
  ------------------
 3992|  23.5k|                    janetc_regalloc_touch(&ra, i);
 3993|  23.5k|                }
 3994|  13.4M|            }
 3995|  7.88k|        }
 3996|       |
 3997|   705k|#define AA ((instr >> 8)  & 0xFF)
 3998|   705k|#define BB ((instr >> 16) & 0xFF)
 3999|   705k|#define CC (instr >> 24)
 4000|   705k|#define DD (instr >> 8)
 4001|   705k|#define EE (instr >> 16)
 4002|       |
 4003|       |        /* Check reads and writes */
 4004|  50.2M|        for (int32_t i = 0; i < def->bytecode_length; i++) {
  ------------------
  |  Branch (4004:29): [True: 49.5M, False: 705k]
  ------------------
 4005|  49.5M|            uint32_t instr = def->bytecode[i];
 4006|  49.5M|            switch (instr & 0x7F) {
 4007|       |
 4008|       |                /* Group instructions my how they read from slots */
 4009|       |
 4010|       |                /* No reads or writes */
 4011|      0|                default:
  ------------------
  |  Branch (4011:17): [True: 0, False: 49.5M]
  ------------------
 4012|      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]
  |  |  ------------------
  ------------------
 4013|  2.70k|                case JOP_JUMP:
  ------------------
  |  Branch (4013:17): [True: 2.70k, False: 49.5M]
  ------------------
 4014|  6.65M|                case JOP_NOOP:
  ------------------
  |  Branch (4014:17): [True: 6.64M, False: 42.8M]
  ------------------
 4015|  6.66M|                case JOP_RETURN_NIL:
  ------------------
  |  Branch (4015:17): [True: 17.0k, False: 49.5M]
  ------------------
 4016|       |                /* Write A */
 4017|  6.77M|                case JOP_LOAD_INTEGER:
  ------------------
  |  Branch (4017:17): [True: 103k, False: 49.4M]
  ------------------
 4018|  11.4M|                case JOP_LOAD_CONSTANT:
  ------------------
  |  Branch (4018:17): [True: 4.65M, False: 44.8M]
  ------------------
 4019|  11.5M|                case JOP_LOAD_UPVALUE:
  ------------------
  |  Branch (4019:17): [True: 76.2k, False: 49.4M]
  ------------------
 4020|  12.1M|                case JOP_CLOSURE:
  ------------------
  |  Branch (4020:17): [True: 610k, False: 48.9M]
  ------------------
 4021|       |                /* Write D */
 4022|  12.1M|                case JOP_LOAD_NIL:
  ------------------
  |  Branch (4022:17): [True: 22.6k, False: 49.5M]
  ------------------
 4023|  12.1M|                case JOP_LOAD_TRUE:
  ------------------
  |  Branch (4023:17): [True: 1.42k, False: 49.5M]
  ------------------
 4024|  12.1M|                case JOP_LOAD_FALSE:
  ------------------
  |  Branch (4024:17): [True: 32, False: 49.5M]
  ------------------
 4025|  12.1M|                case JOP_LOAD_SELF:
  ------------------
  |  Branch (4025:17): [True: 13.1k, False: 49.5M]
  ------------------
 4026|  12.1M|                    break;
 4027|    719|                case JOP_MAKE_ARRAY:
  ------------------
  |  Branch (4027:17): [True: 719, False: 49.5M]
  ------------------
 4028|  1.62k|                case JOP_MAKE_BUFFER:
  ------------------
  |  Branch (4028:17): [True: 905, False: 49.5M]
  ------------------
 4029|  1.62k|                case JOP_MAKE_STRING:
  ------------------
  |  Branch (4029:17): [True: 0, False: 49.5M]
  ------------------
 4030|  13.1k|                case JOP_MAKE_STRUCT:
  ------------------
  |  Branch (4030:17): [True: 11.5k, False: 49.5M]
  ------------------
 4031|  13.3k|                case JOP_MAKE_TABLE:
  ------------------
  |  Branch (4031:17): [True: 175, False: 49.5M]
  ------------------
 4032|  3.37M|                case JOP_MAKE_TUPLE:
  ------------------
  |  Branch (4032:17): [True: 3.35M, False: 46.1M]
  ------------------
 4033|  3.43M|                case JOP_MAKE_BRACKET_TUPLE:
  ------------------
  |  Branch (4033:17): [True: 64.2k, False: 49.4M]
  ------------------
 4034|       |                    /* Reads from the stack, don't remove */
 4035|  3.43M|                    janetc_regalloc_touch(&ra, DD);
  ------------------
  |  | 4000|  3.43M|#define DD (instr >> 8)
  ------------------
 4036|  3.43M|                    break;
 4037|       |
 4038|       |                /* Read A */
 4039|     12|                case JOP_ERROR:
  ------------------
  |  Branch (4039:17): [True: 12, False: 49.5M]
  ------------------
 4040|     12|                case JOP_TYPECHECK:
  ------------------
  |  Branch (4040:17): [True: 0, False: 49.5M]
  ------------------
 4041|    232|                case JOP_JUMP_IF:
  ------------------
  |  Branch (4041:17): [True: 220, False: 49.5M]
  ------------------
 4042|  68.6k|                case JOP_JUMP_IF_NOT:
  ------------------
  |  Branch (4042:17): [True: 68.3k, False: 49.4M]
  ------------------
 4043|  70.7k|                case JOP_JUMP_IF_NIL:
  ------------------
  |  Branch (4043:17): [True: 2.14k, False: 49.5M]
  ------------------
 4044|  83.1k|                case JOP_JUMP_IF_NOT_NIL:
  ------------------
  |  Branch (4044:17): [True: 12.3k, False: 49.5M]
  ------------------
 4045|  95.5k|                case JOP_SET_UPVALUE:
  ------------------
  |  Branch (4045:17): [True: 12.4k, False: 49.5M]
  ------------------
 4046|       |                /* Write E, Read A */
 4047|  6.53M|                case JOP_MOVE_FAR:
  ------------------
  |  Branch (4047:17): [True: 6.43M, False: 43.1M]
  ------------------
 4048|  6.53M|                    janetc_regalloc_touch(&ra, AA);
  ------------------
  |  | 3997|  6.53M|#define AA ((instr >> 8)  & 0xFF)
  ------------------
 4049|  6.53M|                    break;
 4050|       |
 4051|       |                /* Read B */
 4052|      3|                case JOP_SIGNAL:
  ------------------
  |  Branch (4052:17): [True: 3, False: 49.5M]
  ------------------
 4053|       |                /* Write A, Read B */
 4054|    542|                case JOP_ADD_IMMEDIATE:
  ------------------
  |  Branch (4054:17): [True: 539, False: 49.5M]
  ------------------
 4055|    754|                case JOP_SUBTRACT_IMMEDIATE:
  ------------------
  |  Branch (4055:17): [True: 212, False: 49.5M]
  ------------------
 4056|    870|                case JOP_MULTIPLY_IMMEDIATE:
  ------------------
  |  Branch (4056:17): [True: 116, False: 49.5M]
  ------------------
 4057|  1.34k|                case JOP_DIVIDE_IMMEDIATE:
  ------------------
  |  Branch (4057:17): [True: 472, False: 49.5M]
  ------------------
 4058|  1.34k|                case JOP_SHIFT_LEFT_IMMEDIATE:
  ------------------
  |  Branch (4058:17): [True: 0, False: 49.5M]
  ------------------
 4059|  1.34k|                case JOP_SHIFT_RIGHT_IMMEDIATE:
  ------------------
  |  Branch (4059:17): [True: 0, False: 49.5M]
  ------------------
 4060|  1.34k|                case JOP_SHIFT_RIGHT_UNSIGNED_IMMEDIATE:
  ------------------
  |  Branch (4060:17): [True: 0, False: 49.5M]
  ------------------
 4061|  1.57k|                case JOP_GREATER_THAN_IMMEDIATE:
  ------------------
  |  Branch (4061:17): [True: 236, False: 49.5M]
  ------------------
 4062|  2.39k|                case JOP_LESS_THAN_IMMEDIATE:
  ------------------
  |  Branch (4062:17): [True: 814, False: 49.5M]
  ------------------
 4063|  2.73k|                case JOP_EQUALS_IMMEDIATE:
  ------------------
  |  Branch (4063:17): [True: 340, False: 49.5M]
  ------------------
 4064|  2.73k|                case JOP_NOT_EQUALS_IMMEDIATE:
  ------------------
  |  Branch (4064:17): [True: 0, False: 49.5M]
  ------------------
 4065|  9.18M|                case JOP_GET_INDEX:
  ------------------
  |  Branch (4065:17): [True: 9.18M, False: 40.3M]
  ------------------
 4066|  9.18M|                    janetc_regalloc_touch(&ra, BB);
  ------------------
  |  | 3998|  9.18M|#define BB ((instr >> 16) & 0xFF)
  ------------------
 4067|  9.18M|                    break;
 4068|       |
 4069|       |                /* Read D */
 4070|   687k|                case JOP_RETURN:
  ------------------
  |  Branch (4070:17): [True: 687k, False: 48.8M]
  ------------------
 4071|   761k|                case JOP_PUSH:
  ------------------
  |  Branch (4071:17): [True: 73.7k, False: 49.4M]
  ------------------
 4072|   764k|                case JOP_PUSH_ARRAY:
  ------------------
  |  Branch (4072:17): [True: 3.22k, False: 49.5M]
  ------------------
 4073|   777k|                case JOP_TAILCALL:
  ------------------
  |  Branch (4073:17): [True: 13.5k, False: 49.5M]
  ------------------
 4074|   777k|                    janetc_regalloc_touch(&ra, DD);
  ------------------
  |  | 4000|   777k|#define DD (instr >> 8)
  ------------------
 4075|   777k|                    break;
 4076|       |
 4077|       |                /* Write A, Read E */
 4078|  13.7M|                case JOP_MOVE_NEAR:
  ------------------
  |  Branch (4078:17): [True: 13.7M, False: 35.8M]
  ------------------
 4079|  13.7M|                case JOP_LENGTH:
  ------------------
  |  Branch (4079:17): [True: 150, False: 49.5M]
  ------------------
 4080|  13.7M|                case JOP_BNOT:
  ------------------
  |  Branch (4080:17): [True: 0, False: 49.5M]
  ------------------
 4081|  13.7M|                case JOP_CALL:
  ------------------
  |  Branch (4081:17): [True: 25.6k, False: 49.5M]
  ------------------
 4082|  13.7M|                    janetc_regalloc_touch(&ra, EE);
  ------------------
  |  | 4001|  13.7M|#define EE (instr >> 16)
  ------------------
 4083|  13.7M|                    break;
 4084|       |
 4085|       |                /* Read A, B */
 4086|  1.72k|                case JOP_PUT_INDEX:
  ------------------
  |  Branch (4086:17): [True: 1.72k, False: 49.5M]
  ------------------
 4087|  1.72k|                    janetc_regalloc_touch(&ra, AA);
  ------------------
  |  | 3997|  1.72k|#define AA ((instr >> 8)  & 0xFF)
  ------------------
 4088|  1.72k|                    janetc_regalloc_touch(&ra, BB);
  ------------------
  |  | 3998|  1.72k|#define BB ((instr >> 16) & 0xFF)
  ------------------
 4089|  1.72k|                    break;
 4090|       |
 4091|       |                /* Read A, E */
 4092|  3.30M|                case JOP_PUSH_2:
  ------------------
  |  Branch (4092:17): [True: 3.30M, False: 46.2M]
  ------------------
 4093|  3.30M|                    janetc_regalloc_touch(&ra, AA);
  ------------------
  |  | 3997|  3.30M|#define AA ((instr >> 8)  & 0xFF)
  ------------------
 4094|  3.30M|                    janetc_regalloc_touch(&ra, EE);
  ------------------
  |  | 4001|  3.30M|#define EE (instr >> 16)
  ------------------
 4095|  3.30M|                    break;
 4096|       |
 4097|       |                /* Read B, C */
 4098|    119|                case JOP_PROPAGATE:
  ------------------
  |  Branch (4098:17): [True: 119, False: 49.5M]
  ------------------
 4099|       |                /* Write A, Read B and C */
 4100|    119|                case JOP_BAND:
  ------------------
  |  Branch (4100:17): [True: 0, False: 49.5M]
  ------------------
 4101|    541|                case JOP_BOR:
  ------------------
  |  Branch (4101:17): [True: 422, False: 49.5M]
  ------------------
 4102|    541|                case JOP_BXOR:
  ------------------
  |  Branch (4102:17): [True: 0, False: 49.5M]
  ------------------
 4103|  3.96k|                case JOP_ADD:
  ------------------
  |  Branch (4103:17): [True: 3.42k, False: 49.5M]
  ------------------
 4104|  5.02k|                case JOP_SUBTRACT:
  ------------------
  |  Branch (4104:17): [True: 1.05k, False: 49.5M]
  ------------------
 4105|  5.94k|                case JOP_MULTIPLY:
  ------------------
  |  Branch (4105:17): [True: 917, False: 49.5M]
  ------------------
 4106|  6.94k|                case JOP_DIVIDE:
  ------------------
  |  Branch (4106:17): [True: 1.00k, False: 49.5M]
  ------------------
 4107|  6.94k|                case JOP_DIVIDE_FLOOR:
  ------------------
  |  Branch (4107:17): [True: 0, False: 49.5M]
  ------------------
 4108|  7.16k|                case JOP_MODULO:
  ------------------
  |  Branch (4108:17): [True: 219, False: 49.5M]
  ------------------
 4109|  9.68k|                case JOP_REMAINDER:
  ------------------
  |  Branch (4109:17): [True: 2.51k, False: 49.5M]
  ------------------
 4110|  9.68k|                case JOP_SHIFT_LEFT:
  ------------------
  |  Branch (4110:17): [True: 0, False: 49.5M]
  ------------------
 4111|  9.68k|                case JOP_SHIFT_RIGHT:
  ------------------
  |  Branch (4111:17): [True: 0, False: 49.5M]
  ------------------
 4112|  9.68k|                case JOP_SHIFT_RIGHT_UNSIGNED:
  ------------------
  |  Branch (4112:17): [True: 0, False: 49.5M]
  ------------------
 4113|  10.3k|                case JOP_GREATER_THAN:
  ------------------
  |  Branch (4113:17): [True: 687, False: 49.5M]
  ------------------
 4114|  26.3k|                case JOP_LESS_THAN:
  ------------------
  |  Branch (4114:17): [True: 16.0k, False: 49.5M]
  ------------------
 4115|  30.4k|                case JOP_EQUALS:
  ------------------
  |  Branch (4115:17): [True: 4.01k, False: 49.5M]
  ------------------
 4116|  30.4k|                case JOP_COMPARE:
  ------------------
  |  Branch (4116:17): [True: 1, False: 49.5M]
  ------------------
 4117|   132k|                case JOP_IN:
  ------------------
  |  Branch (4117:17): [True: 102k, False: 49.4M]
  ------------------
 4118|   133k|                case JOP_GET:
  ------------------
  |  Branch (4118:17): [True: 176, False: 49.5M]
  ------------------
 4119|   133k|                case JOP_GREATER_THAN_EQUAL:
  ------------------
  |  Branch (4119:17): [True: 842, False: 49.5M]
  ------------------
 4120|   181k|                case JOP_LESS_THAN_EQUAL:
  ------------------
  |  Branch (4120:17): [True: 48.0k, False: 49.4M]
  ------------------
 4121|   181k|                case JOP_NOT_EQUALS:
  ------------------
  |  Branch (4121:17): [True: 1, False: 49.5M]
  ------------------
 4122|   181k|                case JOP_CANCEL:
  ------------------
  |  Branch (4122:17): [True: 0, False: 49.5M]
  ------------------
 4123|   182k|                case JOP_RESUME:
  ------------------
  |  Branch (4123:17): [True: 120, False: 49.5M]
  ------------------
 4124|   204k|                case JOP_NEXT:
  ------------------
  |  Branch (4124:17): [True: 22.0k, False: 49.5M]
  ------------------
 4125|   204k|                    janetc_regalloc_touch(&ra, BB);
  ------------------
  |  | 3998|   204k|#define BB ((instr >> 16) & 0xFF)
  ------------------
 4126|   204k|                    janetc_regalloc_touch(&ra, CC);
  ------------------
  |  | 3999|   204k|#define CC (instr >> 24)
  ------------------
 4127|   204k|                    break;
 4128|       |
 4129|       |                /* Read A, B, C */
 4130|    283|                case JOP_PUT:
  ------------------
  |  Branch (4130:17): [True: 283, False: 49.5M]
  ------------------
 4131|   219k|                case JOP_PUSH_3:
  ------------------
  |  Branch (4131:17): [True: 218k, False: 49.3M]
  ------------------
 4132|   219k|                    janetc_regalloc_touch(&ra, AA);
  ------------------
  |  | 3997|   219k|#define AA ((instr >> 8)  & 0xFF)
  ------------------
 4133|   219k|                    janetc_regalloc_touch(&ra, BB);
  ------------------
  |  | 3998|   219k|#define BB ((instr >> 16) & 0xFF)
  ------------------
 4134|   219k|                    janetc_regalloc_touch(&ra, CC);
  ------------------
  |  | 3999|   219k|#define CC (instr >> 24)
  ------------------
 4135|   219k|                    break;
 4136|  49.5M|            }
 4137|  49.5M|        }
 4138|       |
 4139|       |        /* Iterate and set noops on instructions that make writes that no one ever reads.
 4140|       |         * Only set noops for instructions with no side effects - moves, loads, etc. that can't
 4141|       |         * raise errors (outside of systemic errors like oom or stack overflow). */
 4142|   705k|        recur = 0;
 4143|  50.2M|        for (int32_t i = 0; i < def->bytecode_length; i++) {
  ------------------
  |  Branch (4143:29): [True: 49.5M, False: 705k]
  ------------------
 4144|  49.5M|            uint32_t instr = def->bytecode[i];
 4145|  49.5M|            switch (instr & 0x7F) {
 4146|  11.3M|                default:
  ------------------
  |  Branch (4146:17): [True: 11.3M, False: 38.2M]
  ------------------
 4147|  11.3M|                    break;
 4148|       |                /* Write D */
 4149|  11.3M|                case JOP_LOAD_NIL:
  ------------------
  |  Branch (4149:17): [True: 22.6k, False: 49.5M]
  ------------------
 4150|  24.1k|                case JOP_LOAD_TRUE:
  ------------------
  |  Branch (4150:17): [True: 1.42k, False: 49.5M]
  ------------------
 4151|  24.1k|                case JOP_LOAD_FALSE:
  ------------------
  |  Branch (4151:17): [True: 32, False: 49.5M]
  ------------------
 4152|  37.2k|                case JOP_LOAD_SELF:
  ------------------
  |  Branch (4152:17): [True: 13.1k, False: 49.5M]
  ------------------
 4153|  37.9k|                case JOP_MAKE_ARRAY:
  ------------------
  |  Branch (4153:17): [True: 719, False: 49.5M]
  ------------------
 4154|  3.39M|                case JOP_MAKE_TUPLE:
  ------------------
  |  Branch (4154:17): [True: 3.35M, False: 46.1M]
  ------------------
 4155|  3.46M|                case JOP_MAKE_BRACKET_TUPLE: {
  ------------------
  |  Branch (4155:17): [True: 64.2k, False: 49.4M]
  ------------------
 4156|  3.46M|                    if (!janetc_regalloc_check(&ra, DD)) {
  ------------------
  |  | 4000|  3.46M|#define DD (instr >> 8)
  ------------------
  |  Branch (4156:25): [True: 347, False: 3.46M]
  ------------------
 4157|    347|                        def->bytecode[i] = JOP_NOOP;
 4158|    347|                        recur = 1;
 4159|    347|                    }
 4160|  3.46M|                }
 4161|  3.46M|                break;
 4162|       |                /* Write E, Read A */
 4163|  6.43M|                case JOP_MOVE_FAR: {
  ------------------
  |  Branch (4163:17): [True: 6.43M, False: 43.1M]
  ------------------
 4164|  6.43M|                    if (!janetc_regalloc_check(&ra, EE)) {
  ------------------
  |  | 4001|  6.43M|#define EE (instr >> 16)
  ------------------
  |  Branch (4164:25): [True: 128k, False: 6.30M]
  ------------------
 4165|   128k|                        def->bytecode[i] = JOP_NOOP;
 4166|   128k|                        recur = 1;
 4167|   128k|                    }
 4168|  6.43M|                }
 4169|  6.43M|                break;
 4170|       |                /* Write A, Read E */
 4171|  13.7M|                case JOP_MOVE_NEAR:
  ------------------
  |  Branch (4171:17): [True: 13.7M, False: 35.8M]
  ------------------
 4172|       |                /* Write A, Read B */
 4173|  22.8M|                case JOP_GET_INDEX:
  ------------------
  |  Branch (4173:17): [True: 9.18M, False: 40.3M]
  ------------------
 4174|       |                /* Write A */
 4175|  22.9M|                case JOP_LOAD_INTEGER:
  ------------------
  |  Branch (4175:17): [True: 103k, False: 49.4M]
  ------------------
 4176|  27.6M|                case JOP_LOAD_CONSTANT:
  ------------------
  |  Branch (4176:17): [True: 4.65M, False: 44.8M]
  ------------------
 4177|  27.7M|                case JOP_LOAD_UPVALUE:
  ------------------
  |  Branch (4177:17): [True: 76.2k, False: 49.4M]
  ------------------
 4178|  28.3M|                case JOP_CLOSURE: {
  ------------------
  |  Branch (4178:17): [True: 610k, False: 48.9M]
  ------------------
 4179|  28.3M|                    if (!janetc_regalloc_check(&ra, AA)) {
  ------------------
  |  | 3997|  28.3M|#define AA ((instr >> 8)  & 0xFF)
  ------------------
  |  Branch (4179:25): [True: 191k, False: 28.1M]
  ------------------
 4180|   191k|                        def->bytecode[i] = JOP_NOOP;
 4181|   191k|                        recur = 1;
 4182|   191k|                    }
 4183|  28.3M|                }
 4184|  28.3M|                break;
 4185|  49.5M|            }
 4186|  49.5M|        }
 4187|       |
 4188|   705k|        janetc_regalloc_deinit(&ra);
 4189|   705k|#undef AA
 4190|   705k|#undef BB
 4191|   705k|#undef CC
 4192|   705k|#undef DD
 4193|   705k|#undef EE
 4194|   705k|    }
 4195|   688k|}
janet_verify:
 4198|  4.10M|int janet_verify(JanetFuncDef *def) {
 4199|  4.10M|    int vargs = !!(def->flags & JANET_FUNCDEF_FLAG_VARARG);
  ------------------
  |  | 1097|  4.10M|#define JANET_FUNCDEF_FLAG_VARARG 0x10000
  ------------------
 4200|  4.10M|    int32_t i;
 4201|  4.10M|    int32_t maxslot = def->arity + vargs;
 4202|  4.10M|    int32_t sc = def->slotcount;
 4203|       |
 4204|  4.10M|    if (def->environments_length > 256) return 15;
  ------------------
  |  Branch (4204:9): [True: 0, False: 4.10M]
  ------------------
 4205|  4.10M|    if (def->bytecode_length == 0) return 1;
  ------------------
  |  Branch (4205:9): [True: 0, False: 4.10M]
  ------------------
 4206|       |
 4207|  4.10M|    if (maxslot > sc) return 2;
  ------------------
  |  Branch (4207:9): [True: 0, False: 4.10M]
  ------------------
 4208|       |
 4209|       |    /* Verify each instruction */
 4210|   116M|    for (i = 0; i < def->bytecode_length; i++) {
  ------------------
  |  Branch (4210:17): [True: 112M, False: 4.19M]
  ------------------
 4211|   112M|        uint32_t instr = def->bytecode[i];
 4212|       |        /* Check for invalid instructions */
 4213|   112M|        if ((instr & 0x7F) >= JOP_INSTRUCTION_COUNT) {
  ------------------
  |  Branch (4213:13): [True: 0, False: 112M]
  ------------------
 4214|      0|            return 3;
 4215|      0|        }
 4216|   112M|        enum JanetInstructionType type = janet_instructions[instr & 0x7F];
 4217|   112M|        switch (type) {
  ------------------
  |  Branch (4217:17): [True: 112M, False: 18.4E]
  ------------------
 4218|   644k|            case JINT_0:
  ------------------
  |  Branch (4218:13): [True: 644k, False: 112M]
  ------------------
 4219|   644k|                continue;
 4220|  21.6M|            case JINT_S: {
  ------------------
  |  Branch (4220:13): [True: 21.6M, False: 91.1M]
  ------------------
 4221|  21.6M|                if ((int32_t)(instr >> 8) >= sc) return 4;
  ------------------
  |  Branch (4221:21): [True: 0, False: 21.6M]
  ------------------
 4222|  21.6M|                continue;
 4223|  21.6M|            }
 4224|  21.6M|            case JINT_SI:
  ------------------
  |  Branch (4224:13): [True: 2.53M, False: 110M]
  ------------------
 4225|  2.53M|            case JINT_SU:
  ------------------
  |  Branch (4225:13): [True: 0, False: 112M]
  ------------------
 4226|  2.53M|            case JINT_ST: {
  ------------------
  |  Branch (4226:13): [True: 0, False: 112M]
  ------------------
 4227|  2.53M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (4227:21): [True: 0, False: 2.53M]
  ------------------
 4228|  2.53M|                continue;
 4229|  2.53M|            }
 4230|  5.13M|            case JINT_L: {
  ------------------
  |  Branch (4230:13): [True: 5.13M, False: 107M]
  ------------------
 4231|  5.13M|                int32_t jumpdest = i + (((int32_t)instr) >> 8);
 4232|  5.13M|                if (jumpdest < 0 || jumpdest >= def->bytecode_length) return 5;
  ------------------
  |  Branch (4232:21): [True: 18.4E, False: 5.13M]
  |  Branch (4232:37): [True: 18.4E, False: 5.13M]
  ------------------
 4233|  5.13M|                continue;
 4234|  5.13M|            }
 4235|  30.7M|            case JINT_SS: {
  ------------------
  |  Branch (4235:13): [True: 30.7M, False: 82.0M]
  ------------------
 4236|  30.7M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc ||
  ------------------
  |  Branch (4236:21): [True: 18.4E, False: 30.7M]
  ------------------
 4237|  30.7M|                        (int32_t)(instr >> 16) >= sc) return 4;
  ------------------
  |  Branch (4237:25): [True: 18.4E, False: 30.7M]
  ------------------
 4238|  30.7M|                continue;
 4239|  30.7M|            }
 4240|  30.7M|            case JINT_SSI:
  ------------------
  |  Branch (4240:13): [True: 1.94M, False: 110M]
  ------------------
 4241|  3.11M|            case JINT_SSU: {
  ------------------
  |  Branch (4241:13): [True: 1.16M, False: 111M]
  ------------------
 4242|  3.11M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc ||
  ------------------
  |  Branch (4242:21): [True: 128, False: 3.11M]
  ------------------
 4243|  3.11M|                        (int32_t)((instr >> 16) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (4243:25): [True: 18.4E, False: 3.11M]
  ------------------
 4244|  3.11M|                continue;
 4245|  3.11M|            }
 4246|  8.09M|            case JINT_SL: {
  ------------------
  |  Branch (4246:13): [True: 8.09M, False: 104M]
  ------------------
 4247|  8.09M|                int32_t jumpdest = i + (((int32_t)instr) >> 16);
 4248|  8.09M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (4248:21): [True: 0, False: 8.09M]
  ------------------
 4249|  8.09M|                if (jumpdest < 0 || jumpdest >= def->bytecode_length) return 5;
  ------------------
  |  Branch (4249:21): [True: 18.4E, False: 8.09M]
  |  Branch (4249:37): [True: 18.4E, False: 8.09M]
  ------------------
 4250|  8.09M|                continue;
 4251|  8.09M|            }
 4252|  14.9M|            case JINT_SSS: {
  ------------------
  |  Branch (4252:13): [True: 14.9M, False: 97.8M]
  ------------------
 4253|  14.9M|                if (((int32_t)(instr >> 8) & 0xFF) >= sc ||
  ------------------
  |  Branch (4253:21): [True: 18.4E, False: 14.9M]
  ------------------
 4254|  14.9M|                        ((int32_t)(instr >> 16) & 0xFF) >= sc ||
  ------------------
  |  Branch (4254:25): [True: 18.4E, False: 14.9M]
  ------------------
 4255|  14.9M|                        ((int32_t)(instr >> 24) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (4255:25): [True: 18.4E, False: 14.9M]
  ------------------
 4256|  14.9M|                continue;
 4257|  14.9M|            }
 4258|  14.9M|            case JINT_SD: {
  ------------------
  |  Branch (4258:13): [True: 1.23M, False: 111M]
  ------------------
 4259|  1.23M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (4259:21): [True: 0, False: 1.23M]
  ------------------
 4260|  1.23M|                if ((int32_t)(instr >> 16) >= def->defs_length) return 6;
  ------------------
  |  Branch (4260:21): [True: 0, False: 1.23M]
  ------------------
 4261|  1.23M|                continue;
 4262|  1.23M|            }
 4263|  20.2M|            case JINT_SC: {
  ------------------
  |  Branch (4263:13): [True: 20.2M, False: 92.4M]
  ------------------
 4264|  20.2M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (4264:21): [True: 0, False: 20.2M]
  ------------------
 4265|  20.2M|                if ((int32_t)(instr >> 16) >= def->constants_length) return 7;
  ------------------
  |  Branch (4265:21): [True: 0, False: 20.2M]
  ------------------
 4266|  20.2M|                continue;
 4267|  20.2M|            }
 4268|  20.2M|            case JINT_SES: {
  ------------------
  |  Branch (4268:13): [True: 4.56M, False: 108M]
  ------------------
 4269|       |                /* How can we check the last slot index? We need info parent funcdefs. Resort
 4270|       |                 * to runtime checks for now. Maybe invalid upvalue references could be defaulted
 4271|       |                 * to nil? (don't commit to this in the long term, though) */
 4272|  4.56M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (4272:21): [True: 0, False: 4.56M]
  ------------------
 4273|  4.56M|                if ((int32_t)((instr >> 16) & 0xFF) >= def->environments_length) return 8;
  ------------------
  |  Branch (4273:21): [True: 0, False: 4.56M]
  ------------------
 4274|  4.56M|                continue;
 4275|  4.56M|            }
 4276|   112M|        }
 4277|   112M|    }
 4278|       |
 4279|       |    /* Verify last instruction is either a jump, return, return-nil, or tailcall. Eventually,
 4280|       |     * some real flow analysis would be ideal, but this should be very effective. Will completely
 4281|       |     * prevent running over the end of bytecode. However, valid functions with dead code will
 4282|       |     * be rejected. */
 4283|  4.19M|    {
 4284|  4.19M|        uint32_t lastop = def->bytecode[def->bytecode_length - 1] & 0xFF;
 4285|  4.19M|        switch (lastop) {
 4286|      0|            default:
  ------------------
  |  Branch (4286:13): [True: 0, False: 4.19M]
  ------------------
 4287|      0|                return 9;
 4288|  2.45M|            case JOP_RETURN:
  ------------------
  |  Branch (4288:13): [True: 2.45M, False: 1.74M]
  ------------------
 4289|  2.81M|            case JOP_RETURN_NIL:
  ------------------
  |  Branch (4289:13): [True: 359k, False: 3.83M]
  ------------------
 4290|  2.81M|            case JOP_JUMP:
  ------------------
  |  Branch (4290:13): [True: 0, False: 4.19M]
  ------------------
 4291|  2.81M|            case JOP_ERROR:
  ------------------
  |  Branch (4291:13): [True: 7.49k, False: 4.19M]
  ------------------
 4292|  4.10M|            case JOP_TAILCALL:
  ------------------
  |  Branch (4292:13): [True: 1.28M, False: 2.91M]
  ------------------
 4293|  4.10M|                break;
 4294|  4.19M|        }
 4295|  4.19M|    }
 4296|       |
 4297|       |    /* Verify debug info - slotmapping, etc. */
 4298|  45.3M|    for (int32_t i = def->symbolmap_length - 1; i >= 0; i--) {
  ------------------
  |  Branch (4298:49): [True: 41.2M, False: 4.10M]
  ------------------
 4299|  41.2M|        JanetSymbolMap jsm = def->symbolmap[i];
 4300|  41.2M|        if (jsm.birth_pc == UINT32_MAX) {
  ------------------
  |  Branch (4300:13): [True: 19.5M, False: 21.6M]
  ------------------
 4301|  19.5M|            if (jsm.death_pc >= (uint32_t) def->environments_length) {
  ------------------
  |  Branch (4301:17): [True: 0, False: 19.5M]
  ------------------
 4302|      0|                return 10;
 4303|       |                /* We should also check jsm.slot_index */
 4304|      0|            }
 4305|  21.6M|        } else {
 4306|  21.6M|            if (jsm.slot_index >= (uint32_t) def->slotcount) {
  ------------------
  |  Branch (4306:17): [True: 0, False: 21.6M]
  ------------------
 4307|      0|                return 11;
 4308|      0|            }
 4309|  21.6M|            if (jsm.birth_pc != UINT32_MAX && jsm.birth_pc >= (uint32_t) def->bytecode_length) {
  ------------------
  |  Branch (4309:17): [True: 21.6M, False: 18.4E]
  |  Branch (4309:47): [True: 0, False: 21.6M]
  ------------------
 4310|      0|                return 12;
 4311|      0|            }
 4312|  21.6M|            if (jsm.death_pc != UINT32_MAX && jsm.death_pc > (uint32_t) def->bytecode_length) {
  ------------------
  |  Branch (4312:17): [True: 21.6M, False: 18.4E]
  |  Branch (4312:47): [True: 0, False: 21.6M]
  ------------------
 4313|      0|                return 13;
 4314|      0|            }
 4315|  21.6M|        }
 4316|  41.2M|        if (jsm.symbol == NULL) {
  ------------------
  |  Branch (4316:13): [True: 0, False: 41.2M]
  ------------------
 4317|      0|            return 14;
 4318|      0|        }
 4319|  41.2M|    }
 4320|       |
 4321|  4.10M|    return 0;
 4322|  4.10M|}
janet_funcdef_alloc:
 4326|   688k|JanetFuncDef *janet_funcdef_alloc(void) {
 4327|   688k|    JanetFuncDef *def = janet_gcalloc(JANET_MEMORY_FUNCDEF, sizeof(JanetFuncDef));
 4328|   688k|    def->environments = NULL;
 4329|   688k|    def->constants = NULL;
 4330|   688k|    def->bytecode = NULL;
 4331|   688k|    def->closure_bitset = NULL;
 4332|   688k|    def->flags = 0;
 4333|   688k|    def->slotcount = 0;
 4334|   688k|    def->symbolmap = NULL;
 4335|   688k|    def->arity = 0;
 4336|   688k|    def->min_arity = 0;
 4337|   688k|    def->max_arity = INT32_MAX;
 4338|   688k|    def->source = NULL;
 4339|   688k|    def->sourcemap = NULL;
 4340|   688k|    def->name = NULL;
 4341|       |    def->defs = NULL;
 4342|   688k|    def->defs_length = 0;
 4343|   688k|    def->constants_length = 0;
 4344|   688k|    def->bytecode_length = 0;
 4345|   688k|    def->environments_length = 0;
 4346|   688k|    def->symbolmap_length = 0;
 4347|   688k|    def->named_args_count = 0;
 4348|   688k|    return def;
 4349|   688k|}
janet_thunk:
 4352|   235k|JanetFunction *janet_thunk(JanetFuncDef *def) {
 4353|   235k|    JanetFunction *func = janet_gcalloc(JANET_MEMORY_FUNCTION, sizeof(JanetFunction));
 4354|   235k|    func->def = def;
 4355|   235k|    janet_assert(def->environments_length == 0, "tried to create thunk that needs upvalues");
  ------------------
  |  |  389|   235k|#define janet_assert(c, m) do { \
  |  |  390|   235k|    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: 235k]
  |  |  ------------------
  |  |  391|   235k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 235k]
  |  |  ------------------
  ------------------
 4356|   235k|    return func;
 4357|   235k|}
janet_signalv:
 4432|  3.54k|void janet_signalv(JanetSignal sig, Janet message) {
 4433|  3.54k|    if (janet_vm.return_reg != NULL) {
  ------------------
  |  Branch (4433:9): [True: 3.54k, False: 0]
  ------------------
 4434|       |        /* Should match logic in janet_call for coercing everything not ok to an error (no awaits, yields, etc.) */
 4435|  3.54k|        if (janet_vm.coerce_error && sig != JANET_SIGNAL_OK) {
  ------------------
  |  Branch (4435:13): [True: 72, False: 3.46k]
  |  Branch (4435:38): [True: 72, False: 0]
  ------------------
 4436|     72|#ifdef JANET_EV
 4437|     72|            if (NULL != janet_vm.root_fiber && sig == JANET_SIGNAL_EVENT) {
  ------------------
  |  Branch (4437:17): [True: 72, False: 0]
  |  Branch (4437:48): [True: 0, False: 72]
  ------------------
 4438|      0|                janet_vm.root_fiber->sched_id++;
 4439|      0|            }
 4440|     72|#endif
 4441|     72|            if (sig != JANET_SIGNAL_ERROR) {
  ------------------
  |  Branch (4441:17): [True: 0, False: 72]
  ------------------
 4442|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4443|      0|            }
 4444|     72|            sig = JANET_SIGNAL_ERROR;
 4445|     72|        }
 4446|  3.54k|        *janet_vm.return_reg = message;
 4447|  3.54k|        if (NULL != janet_vm.fiber) {
  ------------------
  |  Branch (4447:13): [True: 3.54k, False: 0]
  ------------------
 4448|  3.54k|            janet_vm.fiber->flags |= JANET_FIBER_DID_LONGJUMP;
  ------------------
  |  |  792|  3.54k|#define JANET_FIBER_DID_LONGJUMP     0x8000000
  ------------------
 4449|  3.54k|        }
 4450|       |#if defined(JANET_BSD) || defined(JANET_APPLE)
 4451|       |        _longjmp(*janet_vm.signal_buf, sig);
 4452|       |#else
 4453|  3.54k|        longjmp(*janet_vm.signal_buf, sig);
 4454|  3.54k|#endif
 4455|  3.54k|    } else {
 4456|      0|        const char *str = (const char *)janet_formatc("janet top level signal - %v\n", message);
 4457|      0|        janet_top_level_signal(str);
 4458|      0|    }
 4459|  3.54k|}
janet_panicv:
 4461|  2.11k|void janet_panicv(Janet message) {
 4462|  2.11k|    janet_signalv(JANET_SIGNAL_ERROR, message);
 4463|  2.11k|}
janet_panicf:
 4465|  2.00k|void janet_panicf(const char *format, ...) {
 4466|  2.00k|    va_list args;
 4467|  2.00k|    const uint8_t *ret;
 4468|  2.00k|    JanetBuffer buffer;
 4469|  2.00k|    int32_t len = 0;
 4470|  71.2k|    while (format[len]) len++;
  ------------------
  |  Branch (4470:12): [True: 69.2k, False: 2.00k]
  ------------------
 4471|  2.00k|    janet_buffer_init(&buffer, len);
 4472|  2.00k|    va_start(args, format);
 4473|  2.00k|    janet_formatbv(&buffer, format, args);
 4474|       |    va_end(args);
 4475|  2.00k|    ret = janet_string(buffer.data, buffer.count);
 4476|  2.00k|    janet_buffer_deinit(&buffer);
 4477|  2.00k|    janet_panics(ret);
 4478|  2.00k|}
janet_panic:
 4480|     88|void janet_panic(const char *message) {
 4481|     88|    janet_panicv(janet_cstringv(message));
  ------------------
  |  | 1825|     88|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  848|     88|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|     88|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     88|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     88|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4482|     88|}
janet_panics:
 4484|  2.00k|void janet_panics(const uint8_t *message) {
 4485|  2.00k|    janet_panicv(janet_wrap_string(message));
  ------------------
  |  |  848|  2.00k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  2.00k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.00k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.00k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4486|  2.00k|}
janet_panic_type:
 4488|    232|void janet_panic_type(Janet x, int32_t n, int expected) {
 4489|    232|    janet_panicf("bad slot #%d, expected %T, got %v", n, expected, x);
 4490|    232|}
janet_panic_abstract:
 4492|     58|void janet_panic_abstract(Janet x, int32_t n, const JanetAbstractType *at) {
 4493|     58|    janet_panicf("bad slot #%d, expected %s, got %v", n, at->name, x);
 4494|     58|}
janet_fixarity:
 4496|   152M|void janet_fixarity(int32_t arity, int32_t fix) {
 4497|   152M|    if (arity != fix)
  ------------------
  |  Branch (4497:9): [True: 98, False: 152M]
  ------------------
 4498|     98|        janet_panicf("arity mismatch, expected %d, got %d", fix, arity);
 4499|   152M|}
janet_arity:
 4501|  41.7M|void janet_arity(int32_t arity, int32_t min, int32_t max) {
 4502|  41.7M|    if (min >= 0 && arity < min)
  ------------------
  |  Branch (4502:9): [True: 41.7M, False: 0]
  |  Branch (4502:21): [True: 48, False: 41.7M]
  ------------------
 4503|     48|        janet_panicf("arity mismatch, expected at least %d, got %d", min, arity);
 4504|  41.7M|    if (max >= 0 && arity > max)
  ------------------
  |  Branch (4504:9): [True: 22.1M, False: 19.6M]
  |  Branch (4504:21): [True: 76, False: 22.1M]
  ------------------
 4505|     76|        janet_panicf("arity mismatch, expected at most %d, got %d", max, arity);
 4506|  41.7M|}
janet_getmethod:
 4532|   727k|int janet_getmethod(const uint8_t *method, const JanetMethod *methods, Janet *out) {
 4533|  5.80M|    while (methods->name) {
  ------------------
  |  Branch (4533:12): [True: 5.80M, False: 18]
  ------------------
 4534|  5.80M|        if (!janet_cstrcmp(method, methods->name)) {
  ------------------
  |  Branch (4534:13): [True: 727k, False: 5.07M]
  ------------------
 4535|   727k|            *out = janet_wrap_cfunction(methods->cfun);
  ------------------
  |  |  853|   727k|#define janet_wrap_cfunction(s) janet_nanbox_wrap_((s), JANET_CFUNCTION)
  |  |  ------------------
  |  |  |  |  825|   727k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   727k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   727k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4536|   727k|            return 1;
 4537|   727k|        }
 4538|  5.07M|        methods++;
 4539|  5.07M|    }
 4540|     18|    return 0;
 4541|   727k|}
janet_nextmethod:
 4543|  1.70k|Janet janet_nextmethod(const JanetMethod *methods, Janet key) {
 4544|  1.70k|    if (!janet_checktype(key, JANET_NIL)) {
  ------------------
  |  |  806|  1.70k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 1.70k]
  |  |  ------------------
  |  |  807|  1.70k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  1.70k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.70k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.70k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.70k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.70k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4544:9): [True: 1.63k, False: 70]
  ------------------
 4545|  20.4k|        while (methods->name) {
  ------------------
  |  Branch (4545:16): [True: 20.4k, False: 0]
  ------------------
 4546|  20.4k|            if (janet_keyeq(key, methods->name)) {
  ------------------
  |  Branch (4546:17): [True: 1.63k, False: 18.7k]
  ------------------
 4547|  1.63k|                methods++;
 4548|  1.63k|                break;
 4549|  1.63k|            }
 4550|  18.7k|            methods++;
 4551|  18.7k|        }
 4552|  1.63k|    }
 4553|  1.70k|    if (methods->name) {
  ------------------
  |  Branch (4553:9): [True: 1.63k, False: 68]
  ------------------
 4554|  1.63k|        return janet_ckeywordv(methods->name);
  ------------------
  |  | 1842|  1.63k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  1.63k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.63k|    janet_nanbox_from_cpointer((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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4555|  1.63k|    } else {
 4556|     68|        return janet_wrap_nil();
  ------------------
  |  |  831|     68|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     68|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     68|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     68|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4557|     68|    }
 4558|  1.70k|}
janet_optcstring:
 4591|     45|const char *janet_optcstring(const Janet *argv, int32_t argc, int32_t n, const char *dflt) {
 4592|     45|    if (n >= argc || janet_checktype(argv[n], JANET_NIL)) {
  ------------------
  |  |  806|     26|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 26]
  |  |  |  Branch (806:6): [Folded, False: 26]
  |  |  ------------------
  |  |  807|     26|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     26|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     26|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     26|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     26|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4592:9): [True: 19, False: 26]
  ------------------
 4593|     19|        return dflt;
 4594|     19|    }
 4595|     26|    return janet_getcstring(argv, n);
 4596|     45|}
janet_getcstring:
 4602|  31.4k|const char *janet_getcstring(const Janet *argv, int32_t n) {
 4603|  31.4k|    if (!janet_checktype(argv[n], JANET_STRING)) {
  ------------------
  |  |  806|  31.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 31.4k]
  |  |  ------------------
  |  |  807|  31.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|  31.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  31.4k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  31.4k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  31.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  31.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4603:9): [True: 9, False: 31.4k]
  ------------------
 4604|      9|        janet_panic_type(argv[n], n, JANET_TFLAG_STRING);
  ------------------
  |  |  599|      9|#define JANET_TFLAG_STRING (1 << JANET_STRING)
  ------------------
 4605|      9|    }
 4606|  31.4k|    return janet_getcbytes(argv, n);
 4607|  31.4k|}
janet_getcbytes:
 4609|  31.6k|const char *janet_getcbytes(const Janet *argv, int32_t n) {
 4610|       |    /* Ensure buffer 0-padded */
 4611|  31.6k|    if (janet_checktype(argv[n], JANET_BUFFER)) {
  ------------------
  |  |  806|  31.6k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 10, False: 31.6k]
  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4612|     10|        JanetBuffer *b = janet_unwrap_buffer(argv[n]);
  ------------------
  |  |  862|     10|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
 4613|     10|        if ((b->gc.flags & JANET_BUFFER_FLAG_NO_REALLOC) && b->count == b->capacity) {
  ------------------
  |  | 1779|     10|#define JANET_BUFFER_FLAG_NO_REALLOC 0x10000
  ------------------
  |  Branch (4613:13): [True: 0, False: 10]
  |  Branch (4613:61): [True: 0, False: 0]
  ------------------
 4614|       |            /* Make a copy with janet_smalloc in the rare case we have a buffer that
 4615|       |             * cannot be realloced and pushing a 0 byte would panic. */
 4616|      0|            char *new_string = janet_smalloc(b->count + 1);
 4617|      0|            memcpy(new_string, b->data, b->count);
 4618|      0|            new_string[b->count] = 0;
 4619|      0|            if (strlen(new_string) != (size_t) b->count) goto badzeros;
  ------------------
  |  Branch (4619:17): [True: 0, False: 0]
  ------------------
 4620|      0|            return new_string;
 4621|     10|        } else {
 4622|       |            /* Ensure trailing 0 */
 4623|     10|            janet_buffer_push_u8(b, 0);
 4624|     10|            b->count--;
 4625|     10|            if (strlen((char *)b->data) != (size_t) b->count) goto badzeros;
  ------------------
  |  Branch (4625:17): [True: 2, False: 8]
  ------------------
 4626|      8|            return (const char *) b->data;
 4627|     10|        }
 4628|     10|    }
 4629|  31.6k|    JanetByteView view = janet_getbytes(argv, n);
 4630|  31.6k|    const char *cstr = (const char *)view.bytes;
 4631|  31.6k|    if (strlen(cstr) != (size_t) view.len) goto badzeros;
  ------------------
  |  Branch (4631:9): [True: 6, False: 31.6k]
  ------------------
 4632|  31.6k|    return cstr;
 4633|       |
 4634|      8|badzeros:
 4635|      8|    janet_panic("bytes contain embedded 0s");
 4636|  31.6k|}
janet_getnat:
 4645|  83.4k|int32_t janet_getnat(const Janet *argv, int32_t n) {
 4646|  83.4k|    Janet x = argv[n];
 4647|  83.4k|    if (!janet_checkint(x)) goto bad;
  ------------------
  |  Branch (4647:9): [True: 15, False: 83.4k]
  ------------------
 4648|  83.4k|    int32_t ret = janet_unwrap_integer(x);
  ------------------
  |  |  966|  83.4k|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|  83.4k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
 4649|  83.4k|    if (ret < 0) goto bad;
  ------------------
  |  Branch (4649:9): [True: 2, False: 83.4k]
  ------------------
 4650|  83.4k|    return ret;
 4651|     17|bad:
 4652|     17|    janet_panicf("bad slot #%d, expected non-negative 32 bit signed integer, got %v", n, x);
 4653|  83.4k|}
janet_checkabstract:
 4655|     32|JanetAbstract janet_checkabstract(Janet x, const JanetAbstractType *at) {
 4656|     32|    if (!janet_checktype(x, JANET_ABSTRACT)) return NULL;
  ------------------
  |  |  806|     32|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 32]
  |  |  ------------------
  |  |  807|     32|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     32|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     32|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     32|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     32|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4656:9): [True: 31, False: 1]
  ------------------
 4657|      1|    JanetAbstract a = janet_unwrap_abstract(x);
  ------------------
  |  |  866|      1|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
 4658|      1|    if (janet_abstract_type(a) != at) return NULL;
  ------------------
  |  | 1898|      1|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|      1|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (4658:9): [True: 0, False: 1]
  ------------------
 4659|      1|    return a;
 4660|      1|}
janet_keyeq:
 4667|  23.5k|int janet_keyeq(Janet x, const char *cstring) {
 4668|  23.5k|    return janet_strlike_cmp(JANET_KEYWORD, x, cstring);
 4669|  23.5k|}
janet_symeq:
 4675|  6.01k|int janet_symeq(Janet x, const char *cstring) {
 4676|  6.01k|    return janet_strlike_cmp(JANET_SYMBOL, x, cstring);
 4677|  6.01k|}
janet_getinteger:
 4679|  23.6M|int32_t janet_getinteger(const Janet *argv, int32_t n) {
 4680|  23.6M|    Janet x = argv[n];
 4681|  23.6M|    if (!janet_checkint(x)) {
  ------------------
  |  Branch (4681:9): [True: 55, False: 23.6M]
  ------------------
 4682|     55|        janet_panicf("bad slot #%d, expected 32 bit signed integer, got %v", n, x);
 4683|     55|    }
 4684|  23.6M|    return janet_unwrap_integer(x);
  ------------------
  |  |  966|  23.6M|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|  23.6M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
 4685|  23.6M|}
janet_getinteger64:
 4727|     12|int64_t janet_getinteger64(const Janet *argv, int32_t n) {
 4728|     12|#ifdef JANET_INT_TYPES
 4729|     12|    return janet_unwrap_s64(argv[n]);
 4730|       |#else
 4731|       |    Janet x = argv[n];
 4732|       |    if (!janet_checkint64(x)) {
 4733|       |        janet_panicf("bad slot #%d, expected 64 bit signed integer, got %v", n, x);
 4734|       |    }
 4735|       |    return (int64_t) janet_unwrap_number(x);
 4736|       |#endif
 4737|     12|}
janet_getuinteger64:
 4739|     15|uint64_t janet_getuinteger64(const Janet *argv, int32_t n) {
 4740|     15|#ifdef JANET_INT_TYPES
 4741|     15|    return janet_unwrap_u64(argv[n]);
 4742|       |#else
 4743|       |    Janet x = argv[n];
 4744|       |    if (!janet_checkuint64(x)) {
 4745|       |        janet_panicf("bad slot #%d, expected 64 bit unsigned integer, got %v", n, x);
 4746|       |    }
 4747|       |    return (uint64_t) janet_unwrap_number(x);
 4748|       |#endif
 4749|     15|}
janet_getsize:
 4751|      5|size_t janet_getsize(const Janet *argv, int32_t n) {
 4752|      5|    Janet x = argv[n];
 4753|      5|    if (!janet_checksize(x)) {
  ------------------
  |  Branch (4753:9): [True: 2, False: 3]
  ------------------
 4754|      2|        janet_panicf("bad slot #%d, expected size, got %v", n, x);
 4755|      2|    }
 4756|      3|    return (size_t) janet_unwrap_number(x);
  ------------------
  |  |  839|      3|#define janet_unwrap_number(x) ((x).number)
  ------------------
 4757|      5|}
janet_gethalfrange:
 4759|  4.92M|int32_t janet_gethalfrange(const Janet *argv, int32_t n, int32_t length, const char *which) {
 4760|  4.92M|    int32_t raw = janet_getinteger(argv, n);
 4761|  4.92M|    int32_t not_raw = raw;
 4762|  4.92M|    if (not_raw < 0) not_raw += length + 1;
  ------------------
  |  Branch (4762:9): [True: 6.62k, False: 4.91M]
  ------------------
 4763|  4.92M|    if (not_raw < 0 || not_raw > length)
  ------------------
  |  Branch (4763:9): [True: 29, False: 4.92M]
  |  Branch (4763:24): [True: 27, False: 4.92M]
  ------------------
 4764|     41|        janet_panicf("%s index %d out of range [%d,%d]", which, (int64_t) raw, -(int64_t)length - 1, (int64_t) length);
 4765|  4.92M|    return not_raw;
 4766|  4.92M|}
janet_getstartrange:
 4768|  16.4M|int32_t janet_getstartrange(const Janet *argv, int32_t argc, int32_t n, int32_t length) {
 4769|  16.4M|    if (n >= argc || janet_checktype(argv[n], JANET_NIL)) {
  ------------------
  |  |  806|  4.87M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 4.87M]
  |  |  |  Branch (806:6): [Folded, False: 4.87M]
  |  |  ------------------
  |  |  807|  4.87M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.87M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  4.87M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  4.87M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.87M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.87M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4769:9): [True: 11.5M, False: 4.87M]
  ------------------
 4770|  11.5M|        return 0;
 4771|  11.5M|    }
 4772|  4.87M|    return janet_gethalfrange(argv, n, length, "start");
 4773|  16.4M|}
janet_getendrange:
 4775|  16.4M|int32_t janet_getendrange(const Janet *argv, int32_t argc, int32_t n, int32_t length) {
 4776|  16.4M|    if (n >= argc || janet_checktype(argv[n], JANET_NIL)) {
  ------------------
  |  |  806|  46.7k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 46.7k]
  |  |  |  Branch (806:6): [Folded, False: 46.7k]
  |  |  ------------------
  |  |  807|  46.7k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  46.7k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  46.7k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  46.7k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  46.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  46.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4776:9): [True: 16.4M, False: 46.7k]
  ------------------
 4777|  16.4M|        return length;
 4778|  16.4M|    }
 4779|  46.7k|    return janet_gethalfrange(argv, n, length, "end");
 4780|  16.4M|}
janet_getindexed:
 4791|  16.4M|JanetView janet_getindexed(const Janet *argv, int32_t n) {
 4792|  16.4M|    Janet x = argv[n];
 4793|  16.4M|    JanetView view;
 4794|  16.4M|    if (!janet_indexed_view(x, &view.items, &view.len)) {
  ------------------
  |  Branch (4794:9): [True: 3, False: 16.4M]
  ------------------
 4795|      3|        janet_panic_type(x, n, JANET_TFLAG_INDEXED);
  ------------------
  |  |  613|      3|#define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  ------------------
  |  |  |  |  602|      3|#define JANET_TFLAG_ARRAY (1 << JANET_ARRAY)
  |  |  ------------------
  |  |               #define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  ------------------
  |  |  |  |  603|      3|#define JANET_TFLAG_TUPLE (1 << JANET_TUPLE)
  |  |  ------------------
  ------------------
 4796|      3|    }
 4797|  16.4M|    return view;
 4798|  16.4M|}
janet_getbytes:
 4800|  11.3M|JanetByteView janet_getbytes(const Janet *argv, int32_t n) {
 4801|  11.3M|    Janet x = argv[n];
 4802|  11.3M|    JanetByteView view;
 4803|  11.3M|    if (!janet_bytes_view(x, &view.bytes, &view.len)) {
  ------------------
  |  Branch (4803:9): [True: 77, False: 11.3M]
  ------------------
 4804|     77|        janet_panic_type(x, n, JANET_TFLAG_BYTES);
  ------------------
  |  |  612|     77|#define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  599|     77|#define JANET_TFLAG_STRING (1 << JANET_STRING)
  |  |  ------------------
  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  600|     77|#define JANET_TFLAG_SYMBOL (1 << JANET_SYMBOL)
  |  |  ------------------
  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  606|     77|#define JANET_TFLAG_BUFFER (1 << JANET_BUFFER)
  |  |  ------------------
  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  601|     77|#define JANET_TFLAG_KEYWORD (1 << JANET_KEYWORD)
  |  |  ------------------
  ------------------
 4805|     77|    }
 4806|  11.3M|    return view;
 4807|  11.3M|}
janet_getdictionary:
 4809|      2|JanetDictView janet_getdictionary(const Janet *argv, int32_t n) {
 4810|      2|    Janet x = argv[n];
 4811|      2|    JanetDictView view;
 4812|      2|    if (!janet_dictionary_view(x, &view.kvs, &view.len, &view.cap)) {
  ------------------
  |  Branch (4812:9): [True: 2, False: 0]
  ------------------
 4813|      2|        janet_panic_type(x, n, JANET_TFLAG_DICTIONARY);
  ------------------
  |  |  614|      2|#define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  ------------------
  |  |  |  |  604|      2|#define JANET_TFLAG_TABLE (1 << JANET_TABLE)
  |  |  ------------------
  |  |               #define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  ------------------
  |  |  |  |  605|      2|#define JANET_TFLAG_STRUCT (1 << JANET_STRUCT)
  |  |  ------------------
  ------------------
 4814|      2|    }
 4815|      0|    return view;
 4816|      2|}
janet_getabstract:
 4818|   510k|void *janet_getabstract(const Janet *argv, int32_t n, const JanetAbstractType *at) {
 4819|   510k|    Janet x = argv[n];
 4820|   510k|    if (!janet_checktype(x, JANET_ABSTRACT)) {
  ------------------
  |  |  806|   510k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 510k]
  |  |  ------------------
  |  |  807|   510k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   510k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   510k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   510k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   510k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   510k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4820:9): [True: 55, False: 510k]
  ------------------
 4821|     55|        janet_panic_abstract(x, n, at);
 4822|     55|    }
 4823|   510k|    void *abstractx = janet_unwrap_abstract(x);
  ------------------
  |  |  866|   510k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
 4824|   510k|    if (janet_abstract_type(abstractx) != at) {
  ------------------
  |  | 1898|   510k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|   510k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (4824:9): [True: 3, False: 510k]
  ------------------
 4825|      3|        janet_panic_abstract(x, n, at);
 4826|      3|    }
 4827|   510k|    return abstractx;
 4828|   510k|}
janet_getslice:
 4830|  16.4M|JanetRange janet_getslice(int32_t argc, const Janet *argv) {
 4831|  16.4M|    janet_arity(argc, 1, 3);
 4832|  16.4M|    JanetRange range;
 4833|  16.4M|    int32_t length = janet_length(argv[0]);
 4834|  16.4M|    range.start = janet_getstartrange(argv, argc, 1, length);
 4835|  16.4M|    range.end = janet_getendrange(argv, argc, 2, length);
 4836|  16.4M|    if (range.end < range.start)
  ------------------
  |  Branch (4836:9): [True: 1, False: 16.4M]
  ------------------
 4837|      1|        range.end = range.start;
 4838|  16.4M|    return range;
 4839|  16.4M|}
janet_dyn:
 4841|   478k|Janet janet_dyn(const char *name) {
 4842|   478k|    if (!janet_vm.fiber) {
  ------------------
  |  Branch (4842:9): [True: 246k, False: 232k]
  ------------------
 4843|   246k|        if (!janet_vm.top_dyns) return janet_wrap_nil();
  ------------------
  |  |  831|   246k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   246k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   246k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   246k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4843:13): [True: 246k, False: 0]
  ------------------
 4844|      0|        return janet_table_get(janet_vm.top_dyns, janet_ckeywordv(name));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4845|   246k|    }
 4846|   232k|    if (janet_vm.fiber->env) {
  ------------------
  |  Branch (4846:9): [True: 232k, False: 0]
  ------------------
 4847|   232k|        return janet_table_get_keyword(janet_vm.fiber->env, name);
 4848|   232k|    } else {
 4849|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4850|      0|    }
 4851|   232k|}
janet_getflags:
 4892|     19|uint64_t janet_getflags(const Janet *argv, int32_t n, const char *flags) {
 4893|     19|    uint64_t ret = 0;
 4894|     19|    const uint8_t *keyw = janet_getkeyword(argv, n);
 4895|     19|    int32_t klen = janet_string_length(keyw);
  ------------------
  |  | 1812|     19|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|     19|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
 4896|     19|    int32_t flen = (int32_t) strlen(flags);
 4897|     19|    if (flen > 64) {
  ------------------
  |  Branch (4897:9): [True: 0, False: 19]
  ------------------
 4898|      0|        flen = 64;
 4899|      0|    }
 4900|     30|    for (int32_t j = 0; j < klen; j++) {
  ------------------
  |  Branch (4900:25): [True: 14, False: 16]
  ------------------
 4901|     38|        for (int32_t i = 0; i < flen; i++) {
  ------------------
  |  Branch (4901:29): [True: 35, False: 3]
  ------------------
 4902|     35|            if (((uint8_t) flags[i]) == keyw[j]) {
  ------------------
  |  Branch (4902:17): [True: 11, False: 24]
  ------------------
 4903|     11|                ret |= 1ULL << i;
 4904|     11|                goto found;
 4905|     11|            }
 4906|     35|        }
 4907|      3|        janet_panicf("unexpected flag %c, expected one of \"%s\"", (char) keyw[j], flags);
 4908|     11|    found:
 4909|     11|        ;
 4910|     11|    }
 4911|     16|    return ret;
 4912|     19|}
janet_optnat:
 4914|  71.8k|int32_t janet_optnat(const Janet *argv, int32_t argc, int32_t n, int32_t dflt) {
 4915|  71.8k|    if (argc <= n) return dflt;
  ------------------
  |  Branch (4915:9): [True: 70.2k, False: 1.51k]
  ------------------
 4916|  1.51k|    if (janet_checktype(argv[n], JANET_NIL)) return dflt;
  ------------------
  |  |  806|  1.51k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 1.51k]
  |  |  |  Branch (806:6): [Folded, False: 1.51k]
  |  |  ------------------
  |  |  807|  1.51k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.51k|        : 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4917|  1.51k|    return janet_getnat(argv, n);
 4918|  1.51k|}
janet_optinteger:
 4920|  7.85k|int32_t janet_optinteger(const Janet *argv, int32_t argc, int32_t n, int32_t dflt) {
 4921|  7.85k|    if (argc <= n) return dflt;
  ------------------
  |  Branch (4921:9): [True: 7.85k, False: 6]
  ------------------
 4922|      6|    if (janet_checktype(argv[n], JANET_NIL)) return dflt;
  ------------------
  |  |  806|      6|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 6]
  |  |  |  Branch (806:6): [Folded, False: 6]
  |  |  ------------------
  |  |  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|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4923|      6|    return janet_getinteger(argv, n);
 4924|      6|}
janet_optsize:
 4932|      3|size_t janet_optsize(const Janet *argv, int32_t argc, int32_t n, size_t dflt) {
 4933|      3|    if (argc <= n) return dflt;
  ------------------
  |  Branch (4933:9): [True: 2, False: 1]
  ------------------
 4934|      1|    if (janet_checktype(argv[n], JANET_NIL)) return dflt;
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4935|      1|    return janet_getsize(argv, n);
 4936|      1|}
janet_optabstract:
 4938|    640|void *janet_optabstract(const Janet *argv, int32_t argc, int32_t n, const JanetAbstractType *at, void *dflt) {
 4939|    640|    if (argc <= n) return dflt;
  ------------------
  |  Branch (4939:9): [True: 482, False: 158]
  ------------------
 4940|    158|    if (janet_checktype(argv[n], JANET_NIL)) return dflt;
  ------------------
  |  |  806|    158|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 158]
  |  |  |  Branch (806:6): [Folded, False: 158]
  |  |  ------------------
  |  |  807|    158|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    158|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    158|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    158|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    158|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    158|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4941|    158|    return janet_getabstract(argv, n, at);
 4942|    158|}
janet_atomic_inc:
 4958|    523|JanetAtomicInt janet_atomic_inc(JanetAtomicInt volatile *x) {
 4959|       |#ifdef _MSC_VER
 4960|       |    return _InterlockedIncrement(x);
 4961|       |#elif defined(JANET_USE_STDATOMIC)
 4962|       |    return atomic_fetch_add_explicit(x, 1, memory_order_relaxed) + 1;
 4963|       |#elif defined(JANET_PLAN9)
 4964|       |    return aincl((void *)x, 1);
 4965|       |#else
 4966|    523|    return __atomic_add_fetch(x, 1, __ATOMIC_RELAXED);
 4967|    523|#endif
 4968|    523|}
janet_atomic_dec:
 4970|    117|JanetAtomicInt janet_atomic_dec(JanetAtomicInt volatile *x) {
 4971|       |#ifdef _MSC_VER
 4972|       |    return _InterlockedDecrement(x);
 4973|       |#elif defined(JANET_USE_STDATOMIC)
 4974|       |    return atomic_fetch_add_explicit(x, -1, memory_order_acq_rel) - 1;
 4975|       |#elif defined(JANET_PLAN9)
 4976|       |    return aincl((void *)x, -1);
 4977|       |#else
 4978|    117|    return __atomic_add_fetch(x, -1, __ATOMIC_ACQ_REL);
 4979|    117|#endif
 4980|    117|}
janet_atomic_load:
 4982|  1.04k|JanetAtomicInt janet_atomic_load(JanetAtomicInt volatile *x) {
 4983|       |#ifdef _MSC_VER
 4984|       |    return _InterlockedOr(x, 0);
 4985|       |#elif defined(JANET_PLAN9)
 4986|       |    return agetl((void *)x);
 4987|       |#elif defined(JANET_USE_STDATOMIC)
 4988|       |    return atomic_load_explicit(x, memory_order_acquire);
 4989|       |#else
 4990|  1.04k|    return __atomic_load_n(x, __ATOMIC_ACQUIRE);
 4991|  1.04k|#endif
 4992|  1.04k|}
janet_atomic_load_relaxed:
 4994|   369M|JanetAtomicInt janet_atomic_load_relaxed(JanetAtomicInt volatile *x) {
 4995|       |#ifdef _MSC_VER
 4996|       |    return _InterlockedOr(x, 0);
 4997|       |#elif defined(JANET_PLAN9)
 4998|       |    return agetl((void *)x);
 4999|       |#elif defined(JANET_USE_STDATOMIC)
 5000|       |    return atomic_load_explicit(x, memory_order_relaxed);
 5001|       |#else
 5002|   369M|    return __atomic_load_n(x, __ATOMIC_RELAXED);
 5003|   369M|#endif
 5004|   369M|}
janetc_funopt:
 5437|  14.0k|const JanetFunOptimizer *janetc_funopt(uint32_t flags) {
 5438|  14.0k|    uint32_t tag = flags & JANET_FUNCDEF_FLAG_TAG;
  ------------------
  |  | 1108|  14.0k|#define JANET_FUNCDEF_FLAG_TAG 0xFFFF
  ------------------
 5439|  14.0k|    if (tag == 0)
  ------------------
  |  Branch (5439:9): [True: 1.20k, False: 12.8k]
  ------------------
 5440|  1.20k|        return NULL;
 5441|  12.8k|    uint32_t index = tag - 1;
 5442|  12.8k|    if (index >= (sizeof(optimizers) / sizeof(optimizers[0])))
  ------------------
  |  Branch (5442:9): [True: 0, False: 12.8k]
  ------------------
 5443|      0|        return NULL;
 5444|  12.8k|    return optimizers + index;
 5445|  12.8k|}
janetc_fopts_default:
 5484|   565k|JanetFopts janetc_fopts_default(JanetCompiler *c) {
 5485|   565k|    JanetFopts ret;
 5486|   565k|    ret.compiler = c;
 5487|   565k|    ret.flags = 0;
 5488|   565k|    ret.hint = janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|   565k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   565k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   565k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   565k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5489|   565k|    return ret;
 5490|   565k|}
janetc_error:
 5493|  59.9k|void janetc_error(JanetCompiler *c, const uint8_t *m) {
 5494|       |    /* Don't override first error */
 5495|  59.9k|    if (c->result.status == JANET_COMPILE_ERROR) {
  ------------------
  |  Branch (5495:9): [True: 57.5k, False: 2.43k]
  ------------------
 5496|  57.5k|        return;
 5497|  57.5k|    }
 5498|  2.43k|    c->result.status = JANET_COMPILE_ERROR;
 5499|  2.43k|    c->result.error = m;
 5500|  2.43k|}
janetc_cerror:
 5503|  45.1k|void janetc_cerror(JanetCompiler *c, const char *m) {
 5504|  45.1k|    janetc_error(c, janet_cstring(m));
 5505|  45.1k|}
janetc_lintf:
 5514|  1.64M|void janetc_lintf(JanetCompiler *c, JanetCompileLintLevel level, const char *format, ...) {
 5515|  1.64M|    if (NULL != c->lints) {
  ------------------
  |  Branch (5515:9): [True: 0, False: 1.64M]
  ------------------
 5516|       |        /* format message */
 5517|      0|        va_list args;
 5518|      0|        JanetBuffer buffer;
 5519|      0|        int32_t len = 0;
 5520|      0|        while (format[len]) len++;
  ------------------
  |  Branch (5520:16): [True: 0, False: 0]
  ------------------
 5521|      0|        janet_buffer_init(&buffer, len);
 5522|      0|        va_start(args, format);
 5523|      0|        janet_formatbv(&buffer, format, args);
 5524|      0|        va_end(args);
 5525|      0|        const uint8_t *str = janet_string(buffer.data, buffer.count);
 5526|      0|        janet_buffer_deinit(&buffer);
 5527|       |        /* construct linting payload */
 5528|      0|        Janet *payload = janet_tuple_begin(4);
 5529|      0|        payload[0] = janet_ckeywordv(janet_lint_level_names[level]);
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5530|      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 (5530:22): [True: 0, False: 0]
  ------------------
 5531|      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 (5531:22): [True: 0, False: 0]
  ------------------
 5532|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5533|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5534|      0|    }
 5535|  1.64M|}
janetc_freeslot:
 5538|  4.46M|void janetc_freeslot(JanetCompiler *c, JanetSlot s) {
 5539|  4.46M|    if (s.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF | JANET_SLOT_NAMED)) return;
  ------------------
  |  |  991|  4.46M|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
                  if (s.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF | JANET_SLOT_NAMED)) return;
  ------------------
  |  |  994|  4.46M|#define JANET_SLOT_REF 0x80000
  ------------------
                  if (s.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF | JANET_SLOT_NAMED)) return;
  ------------------
  |  |  992|  4.46M|#define JANET_SLOT_NAMED 0x20000
  ------------------
  |  Branch (5539:9): [True: 1.67M, False: 2.79M]
  ------------------
 5540|  2.79M|    if (s.envindex >= 0) return;
  ------------------
  |  Branch (5540:9): [True: 0, False: 2.79M]
  ------------------
 5541|  2.79M|    janetc_regalloc_free(&c->scope->ra, s.index);
 5542|  2.79M|}
janetc_nameslot:
 5545|  1.76M|void janetc_nameslot(JanetCompiler *c, const uint8_t *sym, JanetSlot s, uint32_t flags) {
 5546|  1.76M|    if (!(flags & JANET_DEFFLAG_NO_SHADOWCHECK)) {
  ------------------
  |  | 1134|  1.76M|#define JANET_DEFFLAG_NO_SHADOWCHECK 1
  ------------------
  |  Branch (5546:9): [True: 1.76M, False: 220]
  ------------------
 5547|  1.76M|        if (sym[0] != '_') {
  ------------------
  |  Branch (5547:13): [True: 944k, False: 821k]
  ------------------
 5548|   944k|            switch (janetc_shadowcheck(c, sym)) {
 5549|  19.9k|                default:
  ------------------
  |  Branch (5549:17): [True: 19.9k, False: 924k]
  ------------------
 5550|  19.9k|                    break;
 5551|  19.9k|                case JANETC_SHADOW_MACRO:
  ------------------
  |  Branch (5551:17): [True: 3.03k, False: 941k]
  ------------------
 5552|  3.03k|                    janetc_lintf(c, JANET_C_LINT_NORMAL, "binding %q is shadowing a macro", janet_wrap_symbol(sym));
  ------------------
  |  |  849|  3.03k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|  3.03k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.03k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.03k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5553|  3.03k|                    break;
 5554|   919k|                case JANETC_SHADOW_LOCAL_HIDES_LOCAL:
  ------------------
  |  Branch (5554:17): [True: 919k, False: 24.7k]
  ------------------
 5555|   919k|                    janetc_lintf(c, JANET_C_LINT_STRICT, "binding %q is shadowing a binding", janet_wrap_symbol(sym));
  ------------------
  |  |  849|   919k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|   919k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   919k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   919k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5556|   919k|                    break;
 5557|  1.53k|                case JANETC_SHADOW_LOCAL_HIDES_GLOBAL:
  ------------------
  |  Branch (5557:17): [True: 1.53k, False: 942k]
  ------------------
 5558|  1.53k|                    janetc_lintf(c, JANET_C_LINT_STRICT, "binding %q is shadowing a top-level binding", janet_wrap_symbol(sym));
  ------------------
  |  |  849|  1.53k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|  1.53k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.53k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.53k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5559|  1.53k|                    break;
 5560|    270|                case JANETC_SHADOW_GLOBAL_HIDES_GLOBAL:
  ------------------
  |  Branch (5560:17): [True: 270, False: 943k]
  ------------------
 5561|    270|                    janetc_lintf(c, JANET_C_LINT_STRICT, "top-level binding %q is shadowing another top-level binding", janet_wrap_symbol(sym));
  ------------------
  |  |  849|    270|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|    270|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    270|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    270|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5562|    270|                    break;
 5563|   944k|            }
 5564|   944k|        }
 5565|  1.76M|    }
 5566|  1.76M|    SymPair sp;
 5567|  1.76M|    int32_t cnt = janet_v_count(c->buffer);
  ------------------
  |  |  714|  1.76M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  1.20M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  1.20M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 1.20M, False: 564k]
  |  |  ------------------
  ------------------
 5568|  1.76M|    sp.sym = sym;
 5569|  1.76M|    sp.sym2 = sym;
 5570|  1.76M|    sp.slot = s;
 5571|  1.76M|    sp.keep = 0;
 5572|  1.76M|    if (flags & JANET_DEFFLAG_NO_UNUSED) {
  ------------------
  |  | 1135|  1.76M|#define JANET_DEFFLAG_NO_UNUSED 2
  ------------------
  |  Branch (5572:9): [True: 2.14k, False: 1.76M]
  ------------------
 5573|  2.14k|        sp.referenced = 1;
 5574|  1.76M|    } else {
 5575|  1.76M|        sp.referenced = sym[0] == '_'; /* Fake ref if symbol starts with _ to avoid lints */
 5576|  1.76M|    }
 5577|  1.76M|    sp.slot.flags |= JANET_SLOT_NAMED;
  ------------------
  |  |  992|  1.76M|#define JANET_SLOT_NAMED 0x20000
  ------------------
 5578|  1.76M|    sp.birth_pc = cnt ? cnt - 1 : 0;
  ------------------
  |  Branch (5578:19): [True: 1.20M, False: 564k]
  ------------------
 5579|  1.76M|    sp.death_pc = UINT32_MAX;
 5580|       |    janet_v_push(c->scope->syms, sp);
  ------------------
  |  |  712|  1.76M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  1.76M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  1.76M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  1.68M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  1.68M|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  1.68M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  1.68M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 82.9k, False: 1.68M]
  |  |  |  |  |  |  |  Branch (723:50): [True: 21.3k, False: 1.66M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|   104k|#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))
  |  |  ------------------
  |  |  |  |  721|  1.76M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  1.76M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5581|  1.76M|}
janetc_cslot:
 5584|  2.84M|JanetSlot janetc_cslot(Janet x) {
 5585|  2.84M|    JanetSlot ret;
 5586|  2.84M|    ret.flags = (1 << janet_type(x)) | JANET_SLOT_CONSTANT;
  ------------------
  |  |  795|  2.84M|    (isnan((x).number) \
  |  |  796|  2.84M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  2.84M|        : JANET_NUMBER)
  ------------------
                  ret.flags = (1 << janet_type(x)) | JANET_SLOT_CONSTANT;
  ------------------
  |  |  991|  2.84M|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (5586:23): [True: 2.79M, False: 48.1k]
  ------------------
 5587|  2.84M|    ret.index = -1;
 5588|  2.84M|    ret.constant = x;
 5589|  2.84M|    ret.envindex = -1;
 5590|  2.84M|    return ret;
 5591|  2.84M|}
janetc_farslot:
 5594|  3.55M|JanetSlot janetc_farslot(JanetCompiler *c) {
 5595|  3.55M|    JanetSlot ret;
 5596|  3.55M|    ret.flags = JANET_SLOTTYPE_ANY;
  ------------------
  |  | 1001|  3.55M|#define JANET_SLOTTYPE_ANY 0xFFFF
  ------------------
 5597|  3.55M|    ret.index = janetc_allocfar(c);
 5598|  3.55M|    ret.constant = janet_wrap_nil();
  ------------------
  |  |  831|  3.55M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  3.55M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.55M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.55M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5599|  3.55M|    ret.envindex = -1;
 5600|  3.55M|    return ret;
 5601|  3.55M|}
janetc_scope:
 5604|   728k|void janetc_scope(JanetScope *s, JanetCompiler *c, int flags, const char *name) {
 5605|   728k|    JanetScope scope;
 5606|   728k|    scope.name = name;
 5607|   728k|    scope.child = NULL;
 5608|   728k|    scope.consts = NULL;
 5609|   728k|    scope.syms = NULL;
 5610|   728k|    scope.envs = NULL;
 5611|   728k|    scope.defs = NULL;
 5612|   728k|    scope.bytecode_start = janet_v_count(c->buffer);
  ------------------
  |  |  714|   728k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|   288k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   288k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 288k, False: 440k]
  |  |  ------------------
  ------------------
 5613|   728k|    scope.flags = flags;
 5614|   728k|    scope.parent = c->scope;
 5615|   728k|    janetc_regalloc_init(&scope.ua);
 5616|       |    /* Inherit slots */
 5617|   728k|    if ((!(flags & JANET_SCOPE_FUNCTION)) && c->scope) {
  ------------------
  |  | 1011|   728k|#define JANET_SCOPE_FUNCTION 1
  ------------------
  |  Branch (5617:9): [True: 30.2k, False: 698k]
  |  Branch (5617:46): [True: 30.2k, False: 0]
  ------------------
 5618|  30.2k|        janetc_regalloc_clone(&scope.ra, &(c->scope->ra));
 5619|   698k|    } else {
 5620|   698k|        janetc_regalloc_init(&scope.ra);
 5621|   698k|    }
 5622|       |    /* Link parent and child and update pointer */
 5623|   728k|    if (c->scope)
  ------------------
  |  Branch (5623:9): [True: 490k, False: 237k]
  ------------------
 5624|   490k|        c->scope->child = s;
 5625|   728k|    c->scope = s;
 5626|   728k|    *s = scope;
 5627|   728k|}
janetc_popscope:
 5630|   728k|void janetc_popscope(JanetCompiler *c) {
 5631|   728k|    JanetScope *oldscope = c->scope;
 5632|   728k|    JanetScope *newscope = oldscope->parent;
 5633|       |    /* Move free slots to parent scope if not a new function.
 5634|       |     * We need to know the total number of slots used when compiling the function. */
 5635|   728k|    if (!(oldscope->flags & (JANET_SCOPE_FUNCTION | JANET_SCOPE_UNUSED)) && newscope) {
  ------------------
  |  | 1011|   728k|#define JANET_SCOPE_FUNCTION 1
  ------------------
                  if (!(oldscope->flags & (JANET_SCOPE_FUNCTION | JANET_SCOPE_UNUSED)) && newscope) {
  ------------------
  |  | 1014|   728k|#define JANET_SCOPE_UNUSED 8
  ------------------
  |  Branch (5635:9): [True: 28.5k, False: 700k]
  |  Branch (5635:77): [True: 28.5k, False: 0]
  ------------------
 5636|       |        /* Parent scopes inherit child's closure flag. Needed
 5637|       |         * for while loops. (if a while loop creates a closure, it
 5638|       |         * is compiled to a tail recursive iife) */
 5639|  28.5k|        if (oldscope->flags & JANET_SCOPE_CLOSURE) {
  ------------------
  |  | 1015|  28.5k|#define JANET_SCOPE_CLOSURE 16
  ------------------
  |  Branch (5639:13): [True: 14.8k, False: 13.6k]
  ------------------
 5640|  14.8k|            newscope->flags |= JANET_SCOPE_CLOSURE;
  ------------------
  |  | 1015|  14.8k|#define JANET_SCOPE_CLOSURE 16
  ------------------
 5641|  14.8k|        }
 5642|  28.5k|        if (newscope->ra.max < oldscope->ra.max) {
  ------------------
  |  Branch (5642:13): [True: 19.9k, False: 8.60k]
  ------------------
 5643|  19.9k|            newscope->ra.max = oldscope->ra.max;
 5644|  19.9k|        }
 5645|       |
 5646|       |        /* Keep upvalue slots and symbols for debugging. */
 5647|  1.92M|        for (int32_t i = 0; i < janet_v_count(oldscope->syms); i++) {
  ------------------
  |  |  714|  1.92M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  1.91M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  1.91M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 1.91M, False: 7.94k]
  |  |  ------------------
  ------------------
  |  Branch (5647:29): [True: 1.89M, False: 28.5k]
  ------------------
 5648|  1.89M|            SymPair pair = oldscope->syms[i];
 5649|       |            /* Check for unused symbols */
 5650|  1.89M|            if (pair.referenced == 0 && pair.sym) {
  ------------------
  |  Branch (5650:17): [True: 943k, False: 951k]
  |  Branch (5650:41): [True: 467k, False: 476k]
  ------------------
 5651|   467k|                janetc_lintf(c, JANET_C_LINT_STRICT, "binding %q is unused", janet_wrap_symbol(pair.sym));
  ------------------
  |  |  849|   467k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|   467k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   467k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   467k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5652|   467k|            }
 5653|       |            /* The variable should not be lexically accessible */
 5654|  1.89M|            pair.sym = NULL;
 5655|  1.89M|            if (pair.death_pc == UINT32_MAX) {
  ------------------
  |  Branch (5655:17): [True: 476k, False: 1.41M]
  ------------------
 5656|   476k|                pair.death_pc = (uint32_t) janet_v_count(c->buffer);
  ------------------
  |  |  714|   476k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|   476k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   476k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 476k, False: 0]
  |  |  ------------------
  ------------------
 5657|   476k|            }
 5658|  1.89M|            if (pair.keep) {
  ------------------
  |  Branch (5658:17): [True: 1.52k, False: 1.89M]
  ------------------
 5659|       |                /* The variable should also not be included in the locals */
 5660|  1.52k|                pair.sym2 = NULL;
 5661|  1.52k|                janetc_regalloc_touch(&newscope->ra, pair.slot.index);
 5662|  1.52k|            }
 5663|  1.89M|            janet_v_push(newscope->syms, pair);
  ------------------
  |  |  712|  1.89M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  1.89M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  1.89M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  1.88M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  1.88M|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  1.88M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  1.88M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 13.5k, False: 1.88M]
  |  |  |  |  |  |  |  Branch (723:50): [True: 92.8k, False: 1.78M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|   106k|#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))
  |  |  ------------------
  |  |  |  |  721|  1.89M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  1.89M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5664|  1.89M|        }
 5665|  28.5k|    }
 5666|       |
 5667|       |    /* Free the old scope */
 5668|   728k|    janet_v_free(oldscope->consts);
  ------------------
  |  |  711|   728k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  719|   240k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (711:34): [True: 240k, False: 488k]
  |  |  ------------------
  ------------------
 5669|   728k|    janet_v_free(oldscope->syms);
  ------------------
  |  |  711|   728k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  719|  96.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (711:34): [True: 96.5k, False: 632k]
  |  |  ------------------
  ------------------
 5670|   728k|    janet_v_free(oldscope->envs);
  ------------------
  |  |  711|   728k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  719|  23.3k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (711:34): [True: 23.3k, False: 705k]
  |  |  ------------------
  ------------------
 5671|   728k|    janet_v_free(oldscope->defs);
  ------------------
  |  |  711|   728k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  719|   356k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (711:34): [True: 356k, False: 372k]
  |  |  ------------------
  ------------------
 5672|   728k|    janetc_regalloc_deinit(&oldscope->ra);
 5673|   728k|    janetc_regalloc_deinit(&oldscope->ua);
 5674|       |    /* Update pointer */
 5675|   728k|    if (newscope)
  ------------------
  |  Branch (5675:9): [True: 490k, False: 237k]
  ------------------
 5676|   490k|        newscope->child = NULL;
 5677|   728k|    c->scope = newscope;
 5678|   728k|}
janetc_popscope_keepslot:
 5681|  8.24k|void janetc_popscope_keepslot(JanetCompiler *c, JanetSlot retslot) {
 5682|  8.24k|    JanetScope *scope;
 5683|  8.24k|    janetc_popscope(c);
 5684|  8.24k|    scope = c->scope;
 5685|  8.24k|    if (scope && retslot.envindex < 0 && retslot.index >= 0) {
  ------------------
  |  Branch (5685:9): [True: 8.24k, False: 0]
  |  Branch (5685:18): [True: 8.17k, False: 69]
  |  Branch (5685:42): [True: 1.61k, False: 6.55k]
  ------------------
 5686|  1.61k|        janetc_regalloc_touch(&scope->ra, retslot.index);
 5687|  1.61k|    }
 5688|  8.24k|}
janetc_shadowcheck:
 5725|   944k|Shadowing janetc_shadowcheck(JanetCompiler *c, const uint8_t *sym) {
 5726|       |    /* Check locals */
 5727|   944k|    JanetScope *scope = c->scope;
 5728|   944k|    int is_global = (scope->flags & JANET_SCOPE_TOP);
  ------------------
  |  | 1013|   944k|#define JANET_SCOPE_TOP 4
  ------------------
 5729|  1.13M|    while (scope) {
  ------------------
  |  Branch (5729:12): [True: 1.11M, False: 24.5k]
  ------------------
 5730|  1.11M|        int32_t len = janet_v_count(scope->syms);
  ------------------
  |  |  714|  1.11M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  1.03M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  1.03M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 1.03M, False: 76.2k]
  |  |  ------------------
  ------------------
 5731|  19.2M|        for (int32_t i = len - 1; i >= 0; i--) {
  ------------------
  |  Branch (5731:35): [True: 19.1M, False: 193k]
  ------------------
 5732|  19.1M|            SymPair *pair = scope->syms + i;
 5733|  19.1M|            if (pair->sym == sym) {
  ------------------
  |  Branch (5733:17): [True: 919k, False: 18.1M]
  ------------------
 5734|   919k|                if (is_global) {
  ------------------
  |  Branch (5734:21): [True: 245, False: 919k]
  ------------------
 5735|       |                    /* This can happen in a top level form like (def [x [x y]] [1 [2 3]])` where a symbol is reused in one expression */
 5736|       |                    /* janet_assert(!is_global, "shadowing analysis is incorrect. compiler bug"); */
 5737|    245|                    return JANETC_SHADOW_GLOBAL_HIDES_GLOBAL;
 5738|    245|                }
 5739|   919k|                return JANETC_SHADOW_LOCAL_HIDES_LOCAL;
 5740|   919k|            }
 5741|  19.1M|        }
 5742|   193k|        scope = scope->parent;
 5743|   193k|    }
 5744|       |    /* Check globals */
 5745|  24.5k|    JanetBinding binding = janet_resolve_ext(c->env, sym);
 5746|  24.5k|    if (binding.type == JANET_BINDING_MACRO || binding.type == JANET_BINDING_DYNAMIC_MACRO) {
  ------------------
  |  Branch (5746:9): [True: 3.03k, False: 21.4k]
  |  Branch (5746:48): [True: 0, False: 21.4k]
  ------------------
 5747|  3.03k|        return JANETC_SHADOW_MACRO;
 5748|  21.4k|    } else if (binding.type == JANET_BINDING_NONE) {
  ------------------
  |  Branch (5748:16): [True: 19.9k, False: 1.55k]
  ------------------
 5749|  19.9k|        return JANETC_SHADOW_NONE;
 5750|  19.9k|    } else {
 5751|  1.55k|        if (is_global) {
  ------------------
  |  Branch (5751:13): [True: 25, False: 1.53k]
  ------------------
 5752|     25|            return JANETC_SHADOW_GLOBAL_HIDES_GLOBAL;
 5753|  1.53k|        } else {
 5754|  1.53k|            return JANETC_SHADOW_LOCAL_HIDES_GLOBAL;
 5755|  1.53k|        }
 5756|  1.55k|    }
 5757|  24.5k|}
janetc_resolve:
 5762|   193k|    const uint8_t *sym) {
 5763|       |
 5764|   193k|    JanetSlot ret = janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|   193k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   193k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   193k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   193k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5765|   193k|    JanetScope *scope = c->scope;
 5766|   193k|    SymPair *pair;
 5767|   193k|    int foundlocal = 1;
 5768|   193k|    int unused = 0;
 5769|       |
 5770|       |    /* Search scopes for symbol, starting from top */
 5771|  2.09M|    while (scope) {
  ------------------
  |  Branch (5771:12): [True: 2.00M, False: 85.2k]
  ------------------
 5772|  2.00M|        int32_t i, len;
 5773|  2.00M|        if (scope->flags & JANET_SCOPE_UNUSED)
  ------------------
  |  | 1014|  2.00M|#define JANET_SCOPE_UNUSED 8
  ------------------
  |  Branch (5773:13): [True: 30.6k, False: 1.97M]
  ------------------
 5774|  30.6k|            unused = 1;
 5775|  2.00M|        len = janet_v_count(scope->syms);
  ------------------
  |  |  714|  2.00M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|   651k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   651k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 651k, False: 1.35M]
  |  |  ------------------
  ------------------
 5776|       |        /* Search in reverse order */
 5777|  7.81M|        for (i = len - 1; i >= 0; i--) {
  ------------------
  |  Branch (5777:27): [True: 5.91M, False: 1.90M]
  ------------------
 5778|  5.91M|            pair = scope->syms + i;
 5779|  5.91M|            if (pair->sym == sym) {
  ------------------
  |  Branch (5779:17): [True: 108k, False: 5.80M]
  ------------------
 5780|   108k|                ret = pair->slot;
 5781|   108k|                pair->referenced = 1;
 5782|   108k|                goto found;
 5783|   108k|            }
 5784|  5.91M|        }
 5785|  1.90M|        if (scope->flags & JANET_SCOPE_FUNCTION)
  ------------------
  |  | 1011|  1.90M|#define JANET_SCOPE_FUNCTION 1
  ------------------
  |  Branch (5785:13): [True: 331k, False: 1.56M]
  ------------------
 5786|   331k|            foundlocal = 0;
 5787|  1.90M|        scope = scope->parent;
 5788|  1.90M|    }
 5789|       |
 5790|       |    /* Symbol not found - check for global */
 5791|  85.2k|    {
 5792|  85.2k|        JanetBinding binding = janet_resolve_ext(c->env, sym);
 5793|  85.2k|        if (binding.type == JANET_BINDING_NONE) {
  ------------------
  |  Branch (5793:13): [True: 1.38k, False: 83.8k]
  ------------------
 5794|  1.38k|            Janet handler = janet_table_get_keyword(c->env, "missing-symbol");
 5795|  1.38k|            switch (janet_type(handler)) {
  ------------------
  |  |  795|  1.38k|    (isnan((x).number) \
  |  |  796|  1.38k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  1.38k|        : JANET_NUMBER)
  ------------------
  |  Branch (5795:21): [True: 1.38k, False: 0]
  ------------------
 5796|  1.38k|                case JANET_NIL:
  ------------------
  |  Branch (5796:17): [True: 1.38k, False: 0]
  ------------------
 5797|  1.38k|                    break;
 5798|      0|                case JANET_FUNCTION:
  ------------------
  |  Branch (5798:17): [True: 0, False: 1.38k]
  ------------------
 5799|      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 (5799:25): [True: 0, False: 0]
  ------------------
 5800|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5801|      0|                    break;
 5802|      0|                default:
  ------------------
  |  Branch (5802:17): [True: 0, False: 1.38k]
  ------------------
 5803|      0|                    janetc_error(c, janet_formatc("invalid lookup handler %V", handler));
 5804|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5805|  1.38k|            }
 5806|  1.38k|        }
 5807|       |
 5808|  85.2k|        switch (binding.type) {
 5809|      0|            default:
  ------------------
  |  Branch (5809:13): [True: 0, False: 85.2k]
  ------------------
 5810|  1.38k|            case JANET_BINDING_NONE:
  ------------------
  |  Branch (5810:13): [True: 1.38k, False: 83.8k]
  ------------------
 5811|  1.38k|                janetc_error(c, janet_formatc("unknown symbol %q", janet_wrap_symbol(sym)));
  ------------------
  |  |  849|  1.38k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|  1.38k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.38k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.38k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5812|  1.38k|                return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|  1.38k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.38k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.38k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.38k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5813|  35.7k|            case JANET_BINDING_DEF:
  ------------------
  |  Branch (5813:13): [True: 35.7k, False: 49.4k]
  ------------------
 5814|  83.8k|            case JANET_BINDING_MACRO: /* Macro should function like defs when not in calling pos */
  ------------------
  |  Branch (5814:13): [True: 48.0k, False: 37.2k]
  ------------------
 5815|  83.8k|                ret = janetc_cslot(binding.value);
 5816|  83.8k|                break;
 5817|      0|            case JANET_BINDING_DYNAMIC_DEF:
  ------------------
  |  Branch (5817:13): [True: 0, False: 85.2k]
  ------------------
 5818|      0|            case JANET_BINDING_DYNAMIC_MACRO:
  ------------------
  |  Branch (5818:13): [True: 0, False: 85.2k]
  ------------------
 5819|      0|                ret = janetc_cslot(binding.value);
 5820|      0|                ret.flags |= JANET_SLOT_REF | JANET_SLOT_NAMED | JANET_SLOTTYPE_ANY;
  ------------------
  |  |  994|      0|#define JANET_SLOT_REF 0x80000
  ------------------
                              ret.flags |= JANET_SLOT_REF | JANET_SLOT_NAMED | JANET_SLOTTYPE_ANY;
  ------------------
  |  |  992|      0|#define JANET_SLOT_NAMED 0x20000
  ------------------
                              ret.flags |= JANET_SLOT_REF | JANET_SLOT_NAMED | JANET_SLOTTYPE_ANY;
  ------------------
  |  | 1001|      0|#define JANET_SLOTTYPE_ANY 0xFFFF
  ------------------
 5821|      0|                ret.flags &= ~JANET_SLOT_CONSTANT;
  ------------------
  |  |  991|      0|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
 5822|      0|                break;
 5823|     22|            case JANET_BINDING_VAR: {
  ------------------
  |  Branch (5823:13): [True: 22, False: 85.2k]
  ------------------
 5824|     22|                ret = janetc_cslot(binding.value);
 5825|     22|                ret.flags |= JANET_SLOT_REF | JANET_SLOT_NAMED | JANET_SLOT_MUTABLE | JANET_SLOTTYPE_ANY;
  ------------------
  |  |  994|     22|#define JANET_SLOT_REF 0x80000
  ------------------
                              ret.flags |= JANET_SLOT_REF | JANET_SLOT_NAMED | JANET_SLOT_MUTABLE | JANET_SLOTTYPE_ANY;
  ------------------
  |  |  992|     22|#define JANET_SLOT_NAMED 0x20000
  ------------------
                              ret.flags |= JANET_SLOT_REF | JANET_SLOT_NAMED | JANET_SLOT_MUTABLE | JANET_SLOTTYPE_ANY;
  ------------------
  |  |  993|     22|#define JANET_SLOT_MUTABLE 0x40000
  ------------------
                              ret.flags |= JANET_SLOT_REF | JANET_SLOT_NAMED | JANET_SLOT_MUTABLE | JANET_SLOTTYPE_ANY;
  ------------------
  |  | 1001|     22|#define JANET_SLOTTYPE_ANY 0xFFFF
  ------------------
 5826|     22|                ret.flags &= ~JANET_SLOT_CONSTANT;
  ------------------
  |  |  991|     22|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
 5827|     22|                break;
 5828|      0|            }
 5829|  85.2k|        }
 5830|  83.8k|        JanetCompileLintLevel depLevel = JANET_C_LINT_RELAXED;
 5831|  83.8k|        switch (binding.deprecation) {
  ------------------
  |  Branch (5831:17): [True: 83.8k, False: 0]
  ------------------
 5832|  83.8k|            case JANET_BINDING_DEP_NONE:
  ------------------
  |  Branch (5832:13): [True: 83.8k, False: 0]
  ------------------
 5833|  83.8k|                break;
 5834|      0|            case JANET_BINDING_DEP_RELAXED:
  ------------------
  |  Branch (5834:13): [True: 0, False: 83.8k]
  ------------------
 5835|      0|                depLevel = JANET_C_LINT_RELAXED;
 5836|      0|                break;
 5837|      0|            case JANET_BINDING_DEP_NORMAL:
  ------------------
  |  Branch (5837:13): [True: 0, False: 83.8k]
  ------------------
 5838|      0|                depLevel = JANET_C_LINT_NORMAL;
 5839|      0|                break;
 5840|      0|            case JANET_BINDING_DEP_STRICT:
  ------------------
  |  Branch (5840:13): [True: 0, False: 83.8k]
  ------------------
 5841|      0|                depLevel = JANET_C_LINT_STRICT;
 5842|      0|                break;
 5843|  83.8k|        }
 5844|  83.8k|        if (binding.deprecation != JANET_BINDING_DEP_NONE) {
  ------------------
  |  Branch (5844:13): [True: 0, False: 83.8k]
  ------------------
 5845|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5846|      0|        }
 5847|  83.8k|        return ret;
 5848|  83.8k|    }
 5849|       |
 5850|       |    /* Symbol was found */
 5851|   108k|found:
 5852|       |
 5853|       |    /* Constants can be returned immediately (they are stateless) */
 5854|   108k|    if (ret.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF))
  ------------------
  |  |  991|   108k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
                  if (ret.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF))
  ------------------
  |  |  994|   108k|#define JANET_SLOT_REF 0x80000
  ------------------
  |  Branch (5854:9): [True: 0, False: 108k]
  ------------------
 5855|      0|        return ret;
 5856|       |
 5857|       |    /* Unused references and locals shouldn't add captured envs. */
 5858|   108k|    if (unused || foundlocal) {
  ------------------
  |  Branch (5858:9): [True: 89, False: 108k]
  |  Branch (5858:19): [True: 95.8k, False: 12.1k]
  ------------------
 5859|  95.9k|        ret.envindex = -1;
 5860|  95.9k|        return ret;
 5861|  95.9k|    }
 5862|       |
 5863|       |    /* non-local scope needs to expose its environment */
 5864|  12.1k|    JanetScope *original_scope = scope;
 5865|  12.1k|    pair->keep = 1;
 5866|  12.1k|    pair->referenced = 1;
 5867|  32.5k|    while (scope && !(scope->flags & JANET_SCOPE_FUNCTION))
  ------------------
  |  | 1011|  32.5k|#define JANET_SCOPE_FUNCTION 1
  ------------------
  |  Branch (5867:12): [True: 32.5k, False: 0]
  |  Branch (5867:21): [True: 20.3k, False: 12.1k]
  ------------------
 5868|  20.3k|        scope = scope->parent;
 5869|  12.1k|    janet_assert(scope, "invalid scopes");
  ------------------
  |  |  389|  12.1k|#define janet_assert(c, m) do { \
  |  |  390|  12.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: 12.1k]
  |  |  ------------------
  |  |  391|  12.1k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 12.1k]
  |  |  ------------------
  ------------------
 5870|  12.1k|    scope->flags |= JANET_SCOPE_ENV;
  ------------------
  |  | 1012|  12.1k|#define JANET_SCOPE_ENV 2
  ------------------
 5871|       |
 5872|       |    /* In the function scope, allocate the slot as an upvalue */
 5873|  12.1k|    janetc_regalloc_touch(&scope->ua, ret.index);
 5874|       |
 5875|       |    /* Iterate through child scopes and make sure environment is propagated */
 5876|  12.1k|    scope = scope->child;
 5877|       |
 5878|       |    /* Propagate env up to current scope */
 5879|  12.1k|    int32_t envindex = -1;
 5880|  63.7k|    while (scope) {
  ------------------
  |  Branch (5880:12): [True: 51.5k, False: 12.1k]
  ------------------
 5881|  51.5k|        if (scope->flags & JANET_SCOPE_FUNCTION) {
  ------------------
  |  | 1011|  51.5k|#define JANET_SCOPE_FUNCTION 1
  ------------------
  |  Branch (5881:13): [True: 28.5k, False: 22.9k]
  ------------------
 5882|  28.5k|            int32_t j, len;
 5883|  28.5k|            int scopefound = 0;
 5884|       |            /* Check if scope already has env. If so, break */
 5885|  28.5k|            len = janet_v_count(scope->envs);
  ------------------
  |  |  714|  28.5k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  5.21k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  5.21k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 5.21k, False: 23.3k]
  |  |  ------------------
  ------------------
 5886|  28.6k|            for (j = 0; j < len; j++) {
  ------------------
  |  Branch (5886:25): [True: 5.25k, False: 23.4k]
  ------------------
 5887|  5.25k|                if (scope->envs[j].envindex == envindex) {
  ------------------
  |  Branch (5887:21): [True: 5.13k, False: 116]
  ------------------
 5888|  5.13k|                    scopefound = 1;
 5889|  5.13k|                    envindex = j;
 5890|  5.13k|                    break;
 5891|  5.13k|                }
 5892|  5.25k|            }
 5893|       |            /* Add the environment if it is not already referenced */
 5894|  28.5k|            if (!scopefound) {
  ------------------
  |  Branch (5894:17): [True: 23.4k, False: 5.13k]
  ------------------
 5895|  23.4k|                len = janet_v_count(scope->envs);
  ------------------
  |  |  714|  23.4k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|     84|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|     84|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 84, False: 23.3k]
  |  |  ------------------
  ------------------
 5896|  23.4k|                JanetEnvRef ref;
 5897|  23.4k|                ref.envindex = envindex;
 5898|  23.4k|                ref.scope = original_scope;
 5899|  23.4k|                janet_v_push(scope->envs, ref);
  ------------------
  |  |  712|  23.4k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  23.4k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  23.4k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|     84|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|     84|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|     84|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|     84|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 23.3k, False: 84]
  |  |  |  |  |  |  |  Branch (723:50): [True: 84, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|  23.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))
  |  |  ------------------
  |  |  |  |  721|  23.4k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  23.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5900|  23.4k|                envindex = len;
 5901|  23.4k|            }
 5902|  28.5k|        }
 5903|  51.5k|        scope = scope->child;
 5904|  51.5k|    }
 5905|       |
 5906|  12.1k|    ret.envindex = envindex;
 5907|  12.1k|    return ret;
 5908|  12.1k|}
janetc_return:
 5911|   697k|JanetSlot janetc_return(JanetCompiler *c, JanetSlot s) {
 5912|   697k|    if (!(s.flags & JANET_SLOT_RETURNED)) {
  ------------------
  |  |  995|   697k|#define JANET_SLOT_RETURNED 0x100000
  ------------------
  |  Branch (5912:9): [True: 692k, False: 5.04k]
  ------------------
 5913|   692k|        if (s.flags & JANET_SLOT_CONSTANT && janet_checktype(s.constant, JANET_NIL))
  ------------------
  |  |  991|  1.38M|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
                      if (s.flags & JANET_SLOT_CONSTANT && janet_checktype(s.constant, JANET_NIL))
  ------------------
  |  |  806|   104k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1.16k, False: 103k]
  |  |  |  Branch (806:6): [Folded, False: 104k]
  |  |  ------------------
  |  |  807|   104k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   104k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   104k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   104k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   104k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   104k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5913:13): [True: 104k, False: 587k]
  ------------------
 5914|  1.16k|            janetc_emit(c, JOP_RETURN_NIL);
 5915|   691k|        else
 5916|   691k|            janetc_emit_s(c, JOP_RETURN, s, 0);
 5917|   692k|        s.flags |= JANET_SLOT_RETURNED;
  ------------------
  |  |  995|   692k|#define JANET_SLOT_RETURNED 0x100000
  ------------------
 5918|   692k|    }
 5919|   697k|    return s;
 5920|   697k|}
janetc_gettarget:
 5923|  1.54M|JanetSlot janetc_gettarget(JanetFopts opts) {
 5924|  1.54M|    JanetSlot slot;
 5925|  1.54M|    if ((opts.flags & JANET_FOPTS_HINT) &&
  ------------------
  |  | 1100|  1.54M|#define JANET_FOPTS_HINT 0x20000
  ------------------
  |  Branch (5925:9): [True: 1.68k, False: 1.54M]
  ------------------
 5926|  1.68k|            (opts.hint.envindex < 0) &&
  ------------------
  |  Branch (5926:13): [True: 954, False: 730]
  ------------------
 5927|    954|            (opts.hint.index >= 0 && opts.hint.index <= 0xFF)) {
  ------------------
  |  Branch (5927:14): [True: 954, False: 0]
  |  Branch (5927:38): [True: 819, False: 135]
  ------------------
 5928|    819|        slot = opts.hint;
 5929|  1.54M|    } else {
 5930|  1.54M|        slot.envindex = -1;
 5931|  1.54M|        slot.constant = janet_wrap_nil();
  ------------------
  |  |  831|  1.54M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.54M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.54M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.54M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5932|  1.54M|        slot.flags = 0;
 5933|  1.54M|        slot.index = janetc_allocfar(opts.compiler);
 5934|  1.54M|    }
 5935|  1.54M|    return slot;
 5936|  1.54M|}
janetc_toslots:
 5939|  28.0k|JanetSlot *janetc_toslots(JanetCompiler *c, const Janet *vals, int32_t len) {
 5940|  28.0k|    int32_t i;
 5941|  28.0k|    JanetSlot *ret = NULL;
 5942|  28.0k|    JanetFopts subopts = janetc_fopts_default(c);
 5943|  28.0k|    subopts.flags |= JANET_FOPTS_ACCEPT_SPLICE;
  ------------------
  |  | 1102|  28.0k|#define JANET_FOPTS_ACCEPT_SPLICE 0x80000
  ------------------
 5944|   293k|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (5944:17): [True: 265k, False: 28.0k]
  ------------------
 5945|       |        janet_v_push(ret, janetc_value(subopts, vals[i]));
  ------------------
  |  |  712|   265k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|   265k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|   265k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|   239k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|   239k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|   239k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|   239k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 25.5k, False: 239k]
  |  |  |  |  |  |  |  Branch (723:50): [True: 31.7k, False: 208k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|  57.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))
  |  |  ------------------
  |  |  |  |  721|   265k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   265k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5946|   265k|    }
 5947|  28.0k|    return ret;
 5948|  28.0k|}
janetc_toslotskv:
 5951|  5.92k|JanetSlot *janetc_toslotskv(JanetCompiler *c, Janet ds) {
 5952|  5.92k|    JanetSlot *ret = NULL;
 5953|  5.92k|    JanetFopts subopts = janetc_fopts_default(c);
 5954|  5.92k|    subopts.flags |= JANET_FOPTS_ACCEPT_SPLICE;
  ------------------
  |  | 1102|  5.92k|#define JANET_FOPTS_ACCEPT_SPLICE 0x80000
  ------------------
 5955|  5.92k|    const JanetKV *kvs = NULL;
 5956|  5.92k|    int32_t cap = 0, len = 0;
 5957|  5.92k|    janet_dictionary_view(ds, &kvs, &len, &cap);
 5958|       |    /* Sort keys for stability of order? */
 5959|  5.92k|    int32_t *index_buf;
 5960|  5.92k|    int32_t index_buf_stack[32];
 5961|  5.92k|    int32_t *index_buf_heap = NULL;
 5962|  5.92k|    if (len < 32) {
  ------------------
  |  Branch (5962:9): [True: 5.91k, False: 12]
  ------------------
 5963|  5.91k|        index_buf = index_buf_stack;
 5964|  5.91k|    } else {
 5965|     12|        index_buf_heap = janet_smalloc(sizeof(int32_t) * len);
 5966|     12|        index_buf = index_buf_heap;
 5967|     12|    }
 5968|  5.92k|    if (len) janet_sorted_keys(kvs, cap, index_buf);
  ------------------
  |  Branch (5968:9): [True: 221, False: 5.70k]
  ------------------
 5969|  8.09k|    for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (5969:25): [True: 2.17k, False: 5.92k]
  ------------------
 5970|  2.17k|        janet_v_push(ret, janetc_value(subopts, kvs[index_buf[i]].key));
  ------------------
  |  |  712|  2.17k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  2.17k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  2.17k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  1.94k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  1.94k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  1.94k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  1.94k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 221, False: 1.94k]
  |  |  |  |  |  |  |  Branch (723:50): [True: 191, False: 1.75k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|    412|#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))
  |  |  ------------------
  |  |  |  |  721|  2.17k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  2.17k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5971|  2.17k|        janet_v_push(ret, janetc_value(subopts, kvs[index_buf[i]].value));
  ------------------
  |  |  712|  2.17k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  2.17k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  2.17k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  2.17k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  2.17k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  2.17k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  2.17k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 0, False: 2.17k]
  |  |  |  |  |  |  |  Branch (723:50): [True: 718, False: 1.45k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|    718|#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))
  |  |  ------------------
  |  |  |  |  721|  2.17k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  2.17k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5972|  2.17k|    }
 5973|  5.92k|    if (index_buf_heap) janet_sfree(index_buf_heap);
  ------------------
  |  Branch (5973:9): [True: 12, False: 5.91k]
  ------------------
 5974|  5.92k|    return ret;
 5975|  5.92k|}
janetc_pushslots:
 5980|  1.08M|int32_t janetc_pushslots(JanetCompiler *c, JanetSlot *slots) {
 5981|  1.08M|    int32_t i;
 5982|  1.08M|    int32_t count = janet_v_count(slots);
  ------------------
  |  |  714|  1.08M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  1.00M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  1.00M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 1.00M, False: 75.5k]
  |  |  ------------------
  ------------------
 5983|  1.08M|    int32_t min_arity = 0;
 5984|  1.08M|    int has_splice = 0;
 5985|  2.25M|    for (i = 0; i < count;) {
  ------------------
  |  Branch (5985:17): [True: 1.17M, False: 1.08M]
  ------------------
 5986|  1.17M|        if (slots[i].flags & JANET_SLOT_SPLICED) {
  ------------------
  |  |  999|  1.17M|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
  |  Branch (5986:13): [True: 976, False: 1.17M]
  ------------------
 5987|    976|            janetc_emit_s(c, JOP_PUSH_ARRAY, slots[i], 0);
 5988|    976|            i++;
 5989|    976|            has_splice = 1;
 5990|  1.17M|        } else if (i + 1 == count) {
  ------------------
  |  Branch (5990:20): [True: 72.5k, False: 1.10M]
  ------------------
 5991|  72.5k|            janetc_emit_s(c, JOP_PUSH, slots[i], 0);
 5992|  72.5k|            i++;
 5993|  72.5k|            min_arity++;
 5994|  1.10M|        } else if (slots[i + 1].flags & JANET_SLOT_SPLICED) {
  ------------------
  |  |  999|  1.10M|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
  |  Branch (5994:20): [True: 354, False: 1.10M]
  ------------------
 5995|    354|            janetc_emit_s(c, JOP_PUSH, slots[i], 0);
 5996|    354|            janetc_emit_s(c, JOP_PUSH_ARRAY, slots[i + 1], 0);
 5997|    354|            i += 2;
 5998|    354|            min_arity++;
 5999|    354|            has_splice = 1;
 6000|  1.10M|        } else if (i + 2 == count) {
  ------------------
  |  Branch (6000:20): [True: 931k, False: 168k]
  ------------------
 6001|   931k|            janetc_emit_ss(c, JOP_PUSH_2, slots[i], slots[i + 1], 0);
 6002|   931k|            i += 2;
 6003|   931k|            min_arity += 2;
 6004|   931k|        } else if (slots[i + 2].flags & JANET_SLOT_SPLICED) {
  ------------------
  |  |  999|   168k|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
  |  Branch (6004:20): [True: 1.11k, False: 167k]
  ------------------
 6005|  1.11k|            janetc_emit_ss(c, JOP_PUSH_2, slots[i], slots[i + 1], 0);
 6006|  1.11k|            janetc_emit_s(c, JOP_PUSH_ARRAY, slots[i + 2], 0);
 6007|  1.11k|            i += 3;
 6008|  1.11k|            min_arity += 2;
 6009|  1.11k|            has_splice = 1;
 6010|   167k|        } else {
 6011|   167k|            janetc_emit_sss(c, JOP_PUSH_3, slots[i], slots[i + 1], slots[i + 2], 0);
 6012|   167k|            i += 3;
 6013|   167k|            min_arity += 3;
 6014|   167k|        }
 6015|  1.17M|    }
 6016|  1.08M|    return has_splice ? (-1 - min_arity) : min_arity;
  ------------------
  |  Branch (6016:12): [True: 700, False: 1.08M]
  ------------------
 6017|  1.08M|}
janetc_freeslots:
 6030|  1.10M|void janetc_freeslots(JanetCompiler *c, JanetSlot *slots) {
 6031|  1.10M|    int32_t i;
 6032|  3.65M|    for (i = 0; i < janet_v_count(slots); i++) {
  ------------------
  |  |  714|  3.65M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  3.57M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  3.57M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 3.57M, False: 82.0k]
  |  |  ------------------
  ------------------
  |  Branch (6032:17): [True: 2.55M, False: 1.10M]
  ------------------
 6033|  2.55M|        janetc_freeslot(c, slots[i]);
 6034|  2.55M|    }
 6035|       |    janet_v_free(slots);
  ------------------
  |  |  711|  1.10M|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  719|  1.02M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (711:34): [True: 1.02M, False: 82.0k]
  |  |  ------------------
  ------------------
 6036|  1.10M|}
janetc_throwaway:
 6041|    712|void janetc_throwaway(JanetFopts opts, Janet x) {
 6042|    712|    JanetCompiler *c = opts.compiler;
 6043|    712|    JanetScope unusedScope;
 6044|    712|    int32_t bufstart = janet_v_count(c->buffer);
  ------------------
  |  |  714|    712|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|    698|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    698|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 698, False: 14]
  |  |  ------------------
  ------------------
 6045|    712|    int32_t mapbufstart = janet_v_count(c->mapbuffer);
  ------------------
  |  |  714|    712|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|    698|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    698|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 698, False: 14]
  |  |  ------------------
  ------------------
 6046|    712|    janetc_scope(&unusedScope, c, JANET_SCOPE_UNUSED, "unused");
  ------------------
  |  | 1014|    712|#define JANET_SCOPE_UNUSED 8
  ------------------
 6047|    712|    janetc_value(opts, x);
 6048|    712|    janetc_lintf(c, JANET_C_LINT_STRICT, "dead code, consider removing %.4q", x);
 6049|    712|    janetc_popscope(c);
 6050|    712|    if (c->buffer) {
  ------------------
  |  Branch (6050:9): [True: 698, False: 14]
  ------------------
 6051|    698|        janet_v__cnt(c->buffer) = bufstart;
  ------------------
  |  |  721|    698|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  ------------------
  |  |  |  |  719|    698|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
 6052|    698|        if (c->mapbuffer)
  ------------------
  |  Branch (6052:13): [True: 698, False: 0]
  ------------------
 6053|    698|            janet_v__cnt(c->mapbuffer) = mapbufstart;
  ------------------
  |  |  721|    698|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  ------------------
  |  |  |  |  719|    698|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
 6054|    698|    }
 6055|    712|}
janetc_value:
 6343|  1.18M|JanetSlot janetc_value(JanetFopts opts, Janet x) {
 6344|  1.18M|    JanetSlot ret;
 6345|  1.18M|    JanetCompiler *c = opts.compiler;
 6346|  1.18M|    JanetSourceMapping last_mapping = c->current_mapping;
 6347|  1.18M|    c->recursion_guard--;
 6348|       |
 6349|       |    /* Guard against previous errors and unbounded recursion */
 6350|  1.18M|    if (c->result.status == JANET_COMPILE_ERROR) return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|  63.8k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  63.8k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  63.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  63.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6350:9): [True: 63.8k, False: 1.11M]
  ------------------
 6351|  1.11M|    if (c->recursion_guard <= 0) {
  ------------------
  |  Branch (6351:9): [True: 3, False: 1.11M]
  ------------------
 6352|      3|        janetc_cerror(c, "recursed too deeply");
 6353|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6354|      3|    }
 6355|       |
 6356|       |    /* Macro expand. Also gets possible special form and
 6357|       |     * refines source mapping cursor if possible. */
 6358|  1.11M|    const JanetSpecial *spec = NULL;
 6359|  1.11M|    int macroi = JANET_MAX_MACRO_EXPAND;
  ------------------
  |  |  302|  1.11M|#define JANET_MAX_MACRO_EXPAND 200
  ------------------
 6360|  1.26M|    while (macroi &&
  ------------------
  |  Branch (6360:12): [True: 1.26M, False: 0]
  ------------------
 6361|  1.26M|            c->result.status != JANET_COMPILE_ERROR &&
  ------------------
  |  Branch (6361:13): [True: 1.26M, False: 0]
  ------------------
 6362|  1.26M|            macroexpand1(c, x, &x, &spec))
  ------------------
  |  Branch (6362:13): [True: 146k, False: 1.11M]
  ------------------
 6363|   146k|        macroi--;
 6364|  1.11M|    if (macroi == 0) {
  ------------------
  |  Branch (6364:9): [True: 0, False: 1.11M]
  ------------------
 6365|      0|        janetc_cerror(c, "recursed too deeply in macro expansion");
 6366|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6367|      0|    }
 6368|       |
 6369|       |    /* Special forms */
 6370|  1.11M|    if (spec) {
  ------------------
  |  Branch (6370:9): [True: 829k, False: 286k]
  ------------------
 6371|   829k|        const Janet *tup = janet_unwrap_tuple(x);
  ------------------
  |  |  858|   829k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
 6372|   829k|        ret = spec->compile(opts, janet_tuple_length(tup) - 1, tup + 1);
  ------------------
  |  | 1801|   829k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|   829k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
 6373|   829k|    } else {
 6374|   286k|        switch (janet_type(x)) {
  ------------------
  |  |  795|   286k|    (isnan((x).number) \
  |  |  796|   286k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   286k|        : JANET_NUMBER)
  ------------------
  |  Branch (6374:17): [True: 269k, False: 17.3k]
  ------------------
 6375|  32.3k|            case JANET_TUPLE: {
  ------------------
  |  Branch (6375:13): [True: 32.3k, False: 254k]
  ------------------
 6376|  32.3k|                JanetFopts subopts = janetc_fopts_default(c);
 6377|  32.3k|                const Janet *tup = janet_unwrap_tuple(x);
  ------------------
  |  |  858|  32.3k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
 6378|       |                /* Empty tuple is tuple literal */
 6379|  32.3k|                if (janet_tuple_length(tup) == 0) {
  ------------------
  |  | 1801|  32.3k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|  32.3k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (6379:21): [True: 5.15k, False: 27.1k]
  ------------------
 6380|  5.15k|                    ret = janetc_cslot(janet_wrap_tuple(janet_tuple_n(NULL, 0)));
  ------------------
  |  |  843|  5.15k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  5.15k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.15k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.15k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6381|  27.1k|                } else if (janet_tuple_flag(tup) & JANET_TUPLE_FLAG_BRACKETCTOR) { /* [] tuples are not function call */
  ------------------
  |  | 1805|  27.1k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1799|  27.1k|#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 */
  ------------------
  |  | 1797|  27.1k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (6381:28): [True: 959, False: 26.1k]
  ------------------
 6382|    959|                    ret = janetc_tuple(opts, x);
 6383|  26.1k|                } else {
 6384|       |                    /* Function calls */
 6385|  26.1k|                    JanetSlot head = janetc_value(subopts, tup[0]);
 6386|  26.1k|                    subopts.flags = JANET_FUNCTION | JANET_CFUNCTION;
 6387|  26.1k|                    ret = janetc_call(opts, janetc_toslots(c, tup + 1, janet_tuple_length(tup) - 1), head, tup);
  ------------------
  |  | 1801|  26.1k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|  26.1k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
 6388|  26.1k|                    janetc_freeslot(c, head);
 6389|  26.1k|                }
 6390|  32.3k|                ret.flags &= ~JANET_SLOT_SPLICED;
  ------------------
  |  |  999|  32.3k|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
 6391|  32.3k|            }
 6392|  32.3k|            break;
 6393|       |            /* Data Constructors */
 6394|   191k|            case JANET_SYMBOL:
  ------------------
  |  Branch (6394:13): [True: 191k, False: 94.7k]
  ------------------
 6395|   191k|                ret = janetc_resolve(c, janet_unwrap_symbol(x));
  ------------------
  |  |  864|   191k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
 6396|   191k|                break;
 6397|    173|            case JANET_ARRAY:
  ------------------
  |  Branch (6397:13): [True: 173, False: 286k]
  ------------------
 6398|    173|                ret = janetc_array(opts, x);
 6399|    173|                break;
 6400|  5.87k|            case JANET_STRUCT:
  ------------------
  |  Branch (6400:13): [True: 5.87k, False: 280k]
  ------------------
 6401|  5.87k|                ret = janetc_tablector(opts, x, JOP_MAKE_STRUCT);
 6402|  5.87k|                break;
 6403|     48|            case JANET_TABLE:
  ------------------
  |  Branch (6403:13): [True: 48, False: 286k]
  ------------------
 6404|     48|                ret = janetc_tablector(opts, x, JOP_MAKE_TABLE);
 6405|     48|                break;
 6406|    764|            case JANET_BUFFER:
  ------------------
  |  Branch (6406:13): [True: 764, False: 285k]
  ------------------
 6407|    764|                ret = janetc_bufferctor(opts, x);
 6408|    764|                break;
 6409|  55.5k|            default:
  ------------------
  |  Branch (6409:13): [True: 55.5k, False: 230k]
  ------------------
 6410|  55.5k|                ret = janetc_cslot(x);
 6411|  55.5k|                break;
 6412|   286k|        }
 6413|   286k|    }
 6414|       |
 6415|  1.11M|    if (c->result.status == JANET_COMPILE_ERROR)
  ------------------
  |  Branch (6415:9): [True: 25.2k, False: 1.09M]
  ------------------
 6416|  25.2k|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|  25.2k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  25.2k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  25.2k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  25.2k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6417|  1.09M|    if (opts.flags & JANET_FOPTS_TAIL)
  ------------------
  |  | 1099|  1.09M|#define JANET_FOPTS_TAIL 0x10000
  ------------------
  |  Branch (6417:9): [True: 697k, False: 393k]
  ------------------
 6418|   697k|        ret = janetc_return(c, ret);
 6419|  1.09M|    if (opts.flags & JANET_FOPTS_HINT) {
  ------------------
  |  | 1100|  1.09M|#define JANET_FOPTS_HINT 0x20000
  ------------------
  |  Branch (6419:9): [True: 1.77k, False: 1.08M]
  ------------------
 6420|  1.77k|        janetc_copy(c, opts.hint, ret);
 6421|  1.77k|        ret = opts.hint;
 6422|  1.77k|    }
 6423|  1.09M|    c->current_mapping = last_mapping;
 6424|  1.09M|    c->recursion_guard++;
 6425|  1.09M|    return ret;
 6426|  1.11M|}
janet_def_addflags:
 6429|   688k|void janet_def_addflags(JanetFuncDef *def) {
 6430|   688k|    int32_t set_flags = 0;
 6431|   688k|    int32_t unset_flags = 0;
 6432|       |    /* pos checks */
 6433|   688k|    if (def->name)              set_flags |= JANET_FUNCDEF_FLAG_HASNAME;
  ------------------
  |  | 1100|   688k|#define JANET_FUNCDEF_FLAG_HASNAME 0x80000
  ------------------
  |  Branch (6433:9): [True: 688k, False: 210]
  ------------------
 6434|   688k|    if (def->source)            set_flags |= JANET_FUNCDEF_FLAG_HASSOURCE;
  ------------------
  |  | 1101|   688k|#define JANET_FUNCDEF_FLAG_HASSOURCE 0x100000
  ------------------
  |  Branch (6434:9): [True: 688k, False: 0]
  ------------------
 6435|   688k|    if (def->defs)              set_flags |= JANET_FUNCDEF_FLAG_HASDEFS;
  ------------------
  |  | 1102|   355k|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (6435:9): [True: 355k, False: 333k]
  ------------------
 6436|   688k|    if (def->environments)      set_flags |= JANET_FUNCDEF_FLAG_HASENVS;
  ------------------
  |  | 1103|   688k|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (6436:9): [True: 688k, False: 0]
  ------------------
 6437|   688k|    if (def->sourcemap)         set_flags |= JANET_FUNCDEF_FLAG_HASSOURCEMAP;
  ------------------
  |  | 1104|   688k|#define JANET_FUNCDEF_FLAG_HASSOURCEMAP 0x800000
  ------------------
  |  Branch (6437:9): [True: 688k, False: 0]
  ------------------
 6438|   688k|    if (def->closure_bitset)    set_flags |= JANET_FUNCDEF_FLAG_HASCLOBITSET;
  ------------------
  |  | 1106|    785|#define JANET_FUNCDEF_FLAG_HASCLOBITSET 0x2000000
  ------------------
  |  Branch (6438:9): [True: 785, False: 688k]
  ------------------
 6439|   688k|    if (def->named_args_count)  set_flags |= JANET_FUNCDEF_FLAG_NAMEDARGS;
  ------------------
  |  | 1107|      0|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (6439:9): [True: 0, False: 688k]
  ------------------
 6440|       |    /* negative checks */
 6441|   688k|    if (!def->name)             unset_flags |= JANET_FUNCDEF_FLAG_HASNAME;
  ------------------
  |  | 1100|    210|#define JANET_FUNCDEF_FLAG_HASNAME 0x80000
  ------------------
  |  Branch (6441:9): [True: 210, False: 688k]
  ------------------
 6442|   688k|    if (!def->source)           unset_flags |= JANET_FUNCDEF_FLAG_HASSOURCE;
  ------------------
  |  | 1101|      0|#define JANET_FUNCDEF_FLAG_HASSOURCE 0x100000
  ------------------
  |  Branch (6442:9): [True: 0, False: 688k]
  ------------------
 6443|   688k|    if (!def->defs)             unset_flags |= JANET_FUNCDEF_FLAG_HASDEFS;
  ------------------
  |  | 1102|   333k|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (6443:9): [True: 333k, False: 355k]
  ------------------
 6444|   688k|    if (!def->environments)     unset_flags |= JANET_FUNCDEF_FLAG_HASENVS;
  ------------------
  |  | 1103|      0|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (6444:9): [True: 0, False: 688k]
  ------------------
 6445|   688k|    if (!def->sourcemap)        unset_flags |= JANET_FUNCDEF_FLAG_HASSOURCEMAP;
  ------------------
  |  | 1104|      0|#define JANET_FUNCDEF_FLAG_HASSOURCEMAP 0x800000
  ------------------
  |  Branch (6445:9): [True: 0, False: 688k]
  ------------------
 6446|   688k|    if (!def->closure_bitset)   unset_flags |= JANET_FUNCDEF_FLAG_HASCLOBITSET;
  ------------------
  |  | 1106|   688k|#define JANET_FUNCDEF_FLAG_HASCLOBITSET 0x2000000
  ------------------
  |  Branch (6446:9): [True: 688k, False: 785]
  ------------------
 6447|   688k|    if (!def->named_args_count) unset_flags |= JANET_FUNCDEF_FLAG_NAMEDARGS;
  ------------------
  |  | 1107|   688k|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (6447:9): [True: 688k, False: 0]
  ------------------
 6448|       |    /* Update flags */
 6449|   688k|    def->flags |= set_flags;
 6450|   688k|    def->flags &= ~unset_flags;
 6451|   688k|}
janetc_pop_funcdef:
 6456|   688k|JanetFuncDef *janetc_pop_funcdef(JanetCompiler *c) {
 6457|   688k|    JanetScope *scope = c->scope;
 6458|   688k|    JanetFuncDef *def = janet_funcdef_alloc();
 6459|   688k|    def->slotcount = scope->ra.max + 1;
 6460|       |
 6461|   688k|    janet_assert(scope->flags & JANET_SCOPE_FUNCTION, "expected function scope");
  ------------------
  |  |  389|   688k|#define janet_assert(c, m) do { \
  |  |  390|   688k|    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: 688k]
  |  |  ------------------
  |  |  391|   688k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 688k]
  |  |  ------------------
  ------------------
 6462|       |
 6463|       |    /* Copy envs */
 6464|   688k|    def->environments_length = janet_v_count(scope->envs);
  ------------------
  |  |  714|   688k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  23.3k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  23.3k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 23.3k, False: 665k]
  |  |  ------------------
  ------------------
 6465|   688k|    def->environments = janet_malloc(sizeof(int32_t) * def->environments_length);
  ------------------
  |  | 2406|   688k|#define janet_malloc(X) malloc((X))
  ------------------
 6466|   712k|    for (int32_t i = 0; i < def->environments_length; i++) {
  ------------------
  |  Branch (6466:25): [True: 23.3k, False: 688k]
  ------------------
 6467|  23.3k|        def->environments[i] = scope->envs[i].envindex;
 6468|  23.3k|    }
 6469|       |
 6470|   688k|    def->constants_length = janet_v_count(scope->consts);
  ------------------
  |  |  714|   688k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|   239k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   239k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 239k, False: 449k]
  |  |  ------------------
  ------------------
 6471|   688k|    def->constants = janet_v_flatten(scope->consts);
  ------------------
  |  |  717|   688k|#define janet_v_flatten(v)      (janet_v_flattenmem((v), sizeof(*(v))))
  ------------------
 6472|       |
 6473|   688k|    def->defs_length = janet_v_count(scope->defs);
  ------------------
  |  |  714|   688k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|   355k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   355k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 355k, False: 333k]
  |  |  ------------------
  ------------------
 6474|   688k|    def->defs = janet_v_flatten(scope->defs);
  ------------------
  |  |  717|   688k|#define janet_v_flatten(v)      (janet_v_flattenmem((v), sizeof(*(v))))
  ------------------
 6475|       |
 6476|       |    /* Copy bytecode (only last chunk) */
 6477|   688k|    def->bytecode_length = janet_v_count(c->buffer) - scope->bytecode_start;
  ------------------
  |  |  714|   688k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|   688k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   688k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 688k, False: 0]
  |  |  ------------------
  ------------------
 6478|   688k|    if (def->bytecode_length) {
  ------------------
  |  Branch (6478:9): [True: 688k, False: 0]
  ------------------
 6479|   688k|        size_t s = sizeof(int32_t) * (size_t) def->bytecode_length;
 6480|   688k|        def->bytecode = janet_malloc(s);
  ------------------
  |  | 2406|   688k|#define janet_malloc(X) malloc((X))
  ------------------
 6481|   688k|        if (NULL == def->bytecode) {
  ------------------
  |  Branch (6481:13): [True: 0, False: 688k]
  ------------------
 6482|      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]
  |  |  ------------------
  ------------------
 6483|      0|        }
 6484|   688k|        safe_memcpy(def->bytecode, c->buffer + scope->bytecode_start, s);
 6485|   688k|        janet_v__cnt(c->buffer) = scope->bytecode_start;
  ------------------
  |  |  721|   688k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  ------------------
  |  |  |  |  719|   688k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
 6486|   688k|        if (NULL != c->mapbuffer && c->source) {
  ------------------
  |  Branch (6486:13): [True: 688k, False: 0]
  |  Branch (6486:37): [True: 688k, False: 0]
  ------------------
 6487|   688k|            size_t s = sizeof(JanetSourceMapping) * (size_t) def->bytecode_length;
 6488|   688k|            def->sourcemap = janet_malloc(s);
  ------------------
  |  | 2406|   688k|#define janet_malloc(X) malloc((X))
  ------------------
 6489|   688k|            if (NULL == def->sourcemap) {
  ------------------
  |  Branch (6489:17): [True: 0, False: 688k]
  ------------------
 6490|      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]
  |  |  ------------------
  ------------------
 6491|      0|            }
 6492|   688k|            safe_memcpy(def->sourcemap, c->mapbuffer + scope->bytecode_start, s);
 6493|   688k|            janet_v__cnt(c->mapbuffer) = scope->bytecode_start;
  ------------------
  |  |  721|   688k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  ------------------
  |  |  |  |  719|   688k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
 6494|   688k|        }
 6495|   688k|    }
 6496|       |
 6497|       |    /* Get source from parser */
 6498|   688k|    def->source = c->source;
 6499|       |
 6500|   688k|    def->arity = 0;
 6501|   688k|    def->min_arity = 0;
 6502|   688k|    def->flags = 0;
 6503|   688k|    if (scope->flags & JANET_SCOPE_ENV) {
  ------------------
  |  | 1012|   688k|#define JANET_SCOPE_ENV 2
  ------------------
  |  Branch (6503:9): [True: 785, False: 688k]
  ------------------
 6504|    785|        def->flags |= JANET_FUNCDEF_FLAG_NEEDSENV;
  ------------------
  |  | 1098|    785|#define JANET_FUNCDEF_FLAG_NEEDSENV 0x20000
  ------------------
 6505|    785|    }
 6506|       |
 6507|       |    /* Copy upvalue bitset */
 6508|   688k|    if (scope->ua.count) {
  ------------------
  |  Branch (6508:9): [True: 785, False: 688k]
  ------------------
 6509|       |        /* Number of u32s we need to create a bitmask for all slots */
 6510|    785|        int32_t slotchunks = (def->slotcount + 31) >> 5;
 6511|       |        /* numchunks is min of slotchunks and scope->ua.count */
 6512|    785|        int32_t numchunks = slotchunks > scope->ua.count ? scope->ua.count : slotchunks;
  ------------------
  |  Branch (6512:29): [True: 149, False: 636]
  ------------------
 6513|    785|        uint32_t *chunks = janet_calloc(slotchunks, sizeof(uint32_t));
  ------------------
  |  | 2412|    785|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
 6514|    785|        if (NULL == chunks) {
  ------------------
  |  Branch (6514:13): [True: 0, False: 785]
  ------------------
 6515|      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]
  |  |  ------------------
  ------------------
 6516|      0|        }
 6517|    785|        memcpy(chunks, scope->ua.chunks, sizeof(uint32_t) * numchunks);
 6518|       |        /* fprintf(stderr, "slot chunks: %d, scope->ua.count: %d, numchunks: %d\n", slotchunks, scope->ua.count, numchunks); */
 6519|       |        /* Register allocator preallocates some registers [240-255, high 16 bits of chunk index 7], we can ignore those. */
 6520|    785|        if (scope->ua.count > 7 && slotchunks > 7) chunks[7] &= 0xFFFFU;
  ------------------
  |  Branch (6520:13): [True: 248, False: 537]
  |  Branch (6520:36): [True: 169, False: 79]
  ------------------
 6521|    785|        def->closure_bitset = chunks;
 6522|    785|    }
 6523|       |
 6524|       |    /* Capture symbol to local mapping */
 6525|   688k|    JanetSymbolMap *locals = NULL;
 6526|       |
 6527|       |    /* Symbol -> upvalue mapping */
 6528|   688k|    JanetScope *top = c->scope;
 6529|  8.64M|    while (top->parent) top = top->parent;
  ------------------
  |  Branch (6529:12): [True: 7.95M, False: 688k]
  ------------------
 6530|  9.33M|    for (JanetScope *s = top; s != NULL; s = s->child) {
  ------------------
  |  Branch (6530:31): [True: 8.64M, False: 688k]
  ------------------
 6531|  8.81M|        for (int32_t j = 0; j < janet_v_count(scope->envs); j++) {
  ------------------
  |  |  714|  8.81M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|   349k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   349k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 349k, False: 8.46M]
  |  |  ------------------
  ------------------
  |  Branch (6531:29): [True: 175k, False: 8.64M]
  ------------------
 6532|   175k|            JanetEnvRef ref = scope->envs[j];
 6533|   175k|            JanetScope *upscope = ref.scope;
 6534|   175k|            if (upscope != s) continue;
  ------------------
  |  Branch (6534:17): [True: 151k, False: 23.3k]
  ------------------
 6535|  15.4M|            for (int32_t i = 0; i < janet_v_count(upscope->syms); i++) {
  ------------------
  |  |  714|  15.4M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  15.4M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  15.4M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 15.4M, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (6535:33): [True: 15.3M, False: 23.3k]
  ------------------
 6536|  15.3M|                SymPair pair = upscope->syms[i];
 6537|  15.3M|                if (pair.sym2) {
  ------------------
  |  Branch (6537:21): [True: 15.3M, False: 1.26k]
  ------------------
 6538|  15.3M|                    JanetSymbolMap jsm;
 6539|  15.3M|                    jsm.birth_pc = UINT32_MAX;
 6540|  15.3M|                    jsm.death_pc = j; /* Use death_pc to encode environment index */
 6541|  15.3M|                    jsm.slot_index = pair.slot.index;
 6542|  15.3M|                    jsm.symbol = pair.sym2;
 6543|  15.3M|                    janet_v_push(locals, jsm);
  ------------------
  |  |  712|  15.3M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  15.3M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  15.3M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  15.3M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  15.3M|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  15.3M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  15.3M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 23.3k, False: 15.3M]
  |  |  |  |  |  |  |  Branch (723:50): [True: 192k, False: 15.1M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|   215k|#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))
  |  |  ------------------
  |  |  |  |  721|  15.3M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  15.3M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6544|  15.3M|                }
 6545|  15.3M|            }
 6546|  23.3k|        }
 6547|  8.64M|    }
 6548|       |
 6549|       |    /* Symbol -> slot mapping */
 6550|  1.69M|    for (int32_t i = 0; i < janet_v_count(scope->syms); i++) {
  ------------------
  |  |  714|  1.69M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  1.08M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  1.08M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 1.08M, False: 615k]
  |  |  ------------------
  ------------------
  |  Branch (6550:25): [True: 1.00M, False: 688k]
  ------------------
 6551|  1.00M|        SymPair pair = scope->syms[i];
 6552|  1.00M|        if (pair.sym2) {
  ------------------
  |  Branch (6552:13): [True: 1.00M, False: 1.05k]
  ------------------
 6553|  1.00M|            JanetSymbolMap jsm;
 6554|       |            /* Check for unused symbols */
 6555|  1.00M|            if (pair.referenced == 0 && pair.sym) {
  ------------------
  |  Branch (6555:17): [True: 265k, False: 742k]
  |  Branch (6555:41): [True: 248k, False: 17.0k]
  ------------------
 6556|   248k|                janetc_lintf(c, JANET_C_LINT_STRICT, "binding %q is unused", janet_wrap_symbol(pair.sym));
  ------------------
  |  |  849|   248k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|   248k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   248k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   248k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6557|   248k|            }
 6558|  1.00M|            if (pair.death_pc == UINT32_MAX) {
  ------------------
  |  Branch (6558:17): [True: 990k, False: 17.8k]
  ------------------
 6559|   990k|                jsm.death_pc = def->bytecode_length;
 6560|   990k|            } else {
 6561|  17.8k|                jsm.death_pc = pair.death_pc - scope->bytecode_start;
 6562|  17.8k|            }
 6563|       |            /* Handle birth_pc == 0 correctly */
 6564|  1.00M|            if ((uint32_t) scope->bytecode_start > pair.birth_pc) {
  ------------------
  |  Branch (6564:17): [True: 234k, False: 773k]
  ------------------
 6565|   234k|                jsm.birth_pc = 0;
 6566|   773k|            } else {
 6567|   773k|                jsm.birth_pc = pair.birth_pc - scope->bytecode_start;
 6568|   773k|            }
 6569|  1.00M|            janet_assert(jsm.birth_pc <= jsm.death_pc, "birth pc after death pc");
  ------------------
  |  |  389|  1.00M|#define janet_assert(c, m) do { \
  |  |  390|  1.00M|    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.00M]
  |  |  ------------------
  |  |  391|  1.00M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 1.00M]
  |  |  ------------------
  ------------------
 6570|  1.00M|            janet_assert(jsm.birth_pc < (uint32_t) def->bytecode_length, "bad birth pc");
  ------------------
  |  |  389|  1.00M|#define janet_assert(c, m) do { \
  |  |  390|  1.00M|    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.00M]
  |  |  ------------------
  |  |  391|  1.00M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 1.00M]
  |  |  ------------------
  ------------------
 6571|  1.00M|            janet_assert(jsm.death_pc <= (uint32_t) def->bytecode_length, "bad death pc");
  ------------------
  |  |  389|  1.00M|#define janet_assert(c, m) do { \
  |  |  390|  1.00M|    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.00M]
  |  |  ------------------
  |  |  391|  1.00M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 1.00M]
  |  |  ------------------
  ------------------
 6572|  1.00M|            jsm.slot_index = pair.slot.index;
 6573|  1.00M|            jsm.symbol = pair.sym2;
 6574|  1.00M|            janet_v_push(locals, jsm);
  ------------------
  |  |  712|  1.00M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  1.00M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  1.00M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|   935k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|   935k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|   935k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|   935k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 72.7k, False: 935k]
  |  |  |  |  |  |  |  Branch (723:50): [True: 11.5k, False: 923k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|  84.3k|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  721|  1.00M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  1.00M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6575|  1.00M|        }
 6576|  1.00M|    }
 6577|   688k|    def->symbolmap_length = janet_v_count(locals);
  ------------------
  |  |  714|   688k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  96.0k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  96.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 96.0k, False: 592k]
  |  |  ------------------
  ------------------
 6578|   688k|    def->symbolmap = janet_v_flatten(locals);
  ------------------
  |  |  717|   688k|#define janet_v_flatten(v)      (janet_v_flattenmem((v), sizeof(*(v))))
  ------------------
 6579|   688k|    if (def->symbolmap_length) def->flags |= JANET_FUNCDEF_FLAG_HASSYMBOLMAP;
  ------------------
  |  | 1099|  96.0k|#define JANET_FUNCDEF_FLAG_HASSYMBOLMAP 0x40000
  ------------------
  |  Branch (6579:9): [True: 96.0k, False: 592k]
  ------------------
 6580|       |
 6581|       |    /* Pop the scope */
 6582|   688k|    janetc_popscope(c);
 6583|       |
 6584|       |    /* Do basic optimization */
 6585|   688k|    janet_bytecode_movopt(def);
 6586|   688k|    janet_bytecode_remove_noops(def);
 6587|       |
 6588|   688k|    return def;
 6589|   688k|}
janet_compile_lint:
 6621|   237k|                                      JanetTable *env, const uint8_t *where, JanetArray *lints) {
 6622|   237k|    JanetCompiler c;
 6623|   237k|    JanetScope rootscope;
 6624|   237k|    JanetFopts fopts;
 6625|       |
 6626|   237k|    janetc_init(&c, env, where, lints);
 6627|       |
 6628|       |    /* Push a function scope */
 6629|   237k|    janetc_scope(&rootscope, &c, JANET_SCOPE_FUNCTION | JANET_SCOPE_TOP, "root");
  ------------------
  |  | 1011|   237k|#define JANET_SCOPE_FUNCTION 1
  ------------------
                  janetc_scope(&rootscope, &c, JANET_SCOPE_FUNCTION | JANET_SCOPE_TOP, "root");
  ------------------
  |  | 1013|   237k|#define JANET_SCOPE_TOP 4
  ------------------
 6630|       |
 6631|       |    /* Set initial form options */
 6632|   237k|    fopts.compiler = &c;
 6633|   237k|    fopts.flags = JANET_FOPTS_TAIL | JANET_SLOTTYPE_ANY;
  ------------------
  |  | 1099|   237k|#define JANET_FOPTS_TAIL 0x10000
  ------------------
                  fopts.flags = JANET_FOPTS_TAIL | JANET_SLOTTYPE_ANY;
  ------------------
  |  | 1001|   237k|#define JANET_SLOTTYPE_ANY 0xFFFF
  ------------------
 6634|   237k|    fopts.hint = janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|   237k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   237k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   237k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   237k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6635|       |
 6636|       |    /* Compile the value */
 6637|   237k|    janetc_value(fopts, source);
 6638|       |
 6639|   237k|    if (c.result.status == JANET_COMPILE_OK) {
  ------------------
  |  Branch (6639:9): [True: 235k, False: 2.43k]
  ------------------
 6640|   235k|        JanetFuncDef *def = janetc_pop_funcdef(&c);
 6641|   235k|        def->name = janet_cstring("thunk");
 6642|   235k|        janet_def_addflags(def);
 6643|   235k|        c.result.funcdef = def;
 6644|   235k|    } else {
 6645|  2.43k|        c.result.error_mapping = c.current_mapping;
 6646|  2.43k|        janetc_popscope(&c);
 6647|  2.43k|    }
 6648|       |
 6649|   237k|    janetc_deinit(&c);
 6650|       |
 6651|   237k|    return c.result;
 6652|   237k|}
janet_compile:
 6654|   237k|JanetCompileResult janet_compile(Janet source, JanetTable *env, const uint8_t *where) {
 6655|       |    return janet_compile_lint(source, env, where, NULL);
 6656|   237k|}
cfun_compile:
 6666|      8|              "Each message will be a tuple of the form `(level line col message)`.") {
 6667|      8|    janet_sandbox_assert(JANET_SANDBOX_COMPILE);
  ------------------
  |  | 2040|      8|#define JANET_SANDBOX_COMPILE 32768
  ------------------
 6668|      8|    janet_arity(argc, 1, 4);
 6669|      8|    JanetTable *env = (argc > 1 && !janet_checktype(argv[1], JANET_NIL))
  ------------------
  |  |  806|      8|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 8]
  |  |  ------------------
  |  |  807|      8|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|      8|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      8|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      8|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      8|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6669:24): [True: 8, False: 0]
  |  Branch (6669:36): [True: 2, False: 6]
  ------------------
 6670|      8|                      ? janet_gettable(argv, 1) : janet_vm.fiber->env;
 6671|      8|    if (NULL == env) {
  ------------------
  |  Branch (6671:9): [True: 0, False: 8]
  ------------------
 6672|      0|        env = janet_table(0);
 6673|      0|        janet_vm.fiber->env = env;
 6674|      0|    }
 6675|      8|    const uint8_t *source = NULL;
 6676|      8|    if (argc >= 3) {
  ------------------
  |  Branch (6676:9): [True: 6, False: 2]
  ------------------
 6677|      6|        Janet x = argv[2];
 6678|      6|        if (janet_checktype(x, JANET_STRING)) {
  ------------------
  |  |  806|      6|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 6]
  |  |  |  Branch (806:6): [Folded, False: 6]
  |  |  ------------------
  |  |  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|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6679|      0|            source = janet_unwrap_string(x);
  ------------------
  |  |  863|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
 6680|      6|        } else if (janet_checktype(x, JANET_KEYWORD)) {
  ------------------
  |  |  806|      6|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 6, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 6]
  |  |  ------------------
  |  |  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|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6681|      6|            source = janet_unwrap_keyword(x);
  ------------------
  |  |  865|      6|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
 6682|      6|        } 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 (6682:20): [True: 0, False: 0]
  ------------------
 6683|      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)
  ------------------
 6684|      0|        }
 6685|      6|    }
 6686|      8|    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 (6686:26): [True: 0, False: 8]
  |  Branch (6686:39): [True: 0, False: 0]
  ------------------
 6687|      8|                        ? janet_getarray(argv, 3) : NULL;
 6688|      8|    JanetCompileResult res = janet_compile_lint(argv[0], env, source, lints);
 6689|      8|    if (res.status == JANET_COMPILE_OK) {
  ------------------
  |  Branch (6689:9): [True: 5, False: 3]
  ------------------
 6690|      5|        return janet_wrap_function(janet_thunk(res.funcdef));
  ------------------
  |  |  852|      5|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6691|      5|    } else {
 6692|      3|        JanetTable *t = janet_table(4);
 6693|      3|        janet_table_put(t, janet_ckeywordv("error"), janet_wrap_string(res.error));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      janet_table_put(t, janet_ckeywordv("error"), janet_wrap_string(res.error));
  ------------------
  |  |  848|      3|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6694|      3|        if (res.error_mapping.line > 0) {
  ------------------
  |  Branch (6694:13): [True: 0, False: 3]
  ------------------
 6695|      0|            janet_table_put(t, janet_ckeywordv("line"), janet_wrap_integer(res.error_mapping.line));
  ------------------
  |  | 1842|      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)
  |  |  ------------------
  ------------------
 6696|      0|        }
 6697|      3|        if (res.error_mapping.column > 0) {
  ------------------
  |  Branch (6697:13): [True: 0, False: 3]
  ------------------
 6698|      0|            janet_table_put(t, janet_ckeywordv("column"), janet_wrap_integer(res.error_mapping.column));
  ------------------
  |  | 1842|      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)
  |  |  ------------------
  ------------------
 6699|      0|        }
 6700|      3|        if (res.macrofiber) {
  ------------------
  |  Branch (6700:13): [True: 0, False: 3]
  ------------------
 6701|      0|            janet_table_put(t, janet_ckeywordv("fiber"), janet_wrap_fiber(res.macrofiber));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6702|      0|        }
 6703|      3|        return janet_wrap_table(t);
  ------------------
  |  |  846|      3|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6704|      3|    }
 6705|      8|}
janet_lib_compile:
 6707|  7.16k|void janet_lib_compile(JanetTable *env) {
 6708|  7.16k|    JanetRegExt cfuns[] = {
 6709|  7.16k|        JANET_CORE_REG("compile", cfun_compile),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 6710|  7.16k|        JANET_REG_END
  ------------------
  |  | 2109|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 6711|  7.16k|    };
 6712|       |    janet_core_cfuns_ext(env, NULL, cfuns);
 6713|  7.16k|}
janet_core_expand_path:
 6842|  12.4k|              "* :sys: -- the system path, or (dyn :syspath)") {
 6843|  12.4k|    janet_fixarity(argc, 2);
 6844|  12.4k|    const char *input = janet_getcstring(argv, 0);
 6845|  12.4k|    const char *template = janet_getcstring(argv, 1);
 6846|  12.4k|    const char *curfile = janet_dyncstring("current-file", "");
 6847|  12.4k|    const char *syspath = janet_dyncstring("syspath", "");
 6848|  12.4k|    JanetBuffer *out = janet_buffer(0);
 6849|  12.4k|    size_t tlen = strlen(template);
 6850|       |
 6851|       |    /* Calculate name */
 6852|  12.4k|    const char *name = input + strlen(input);
 6853|  29.7k|    while (name > input) {
  ------------------
  |  Branch (6853:12): [True: 24.0k, False: 5.70k]
  ------------------
 6854|  24.0k|        if (is_path_sep(*(name - 1))) break;
  ------------------
  |  Branch (6854:13): [True: 6.78k, False: 17.2k]
  ------------------
 6855|  17.2k|        name--;
 6856|  17.2k|    }
 6857|       |
 6858|       |    /* Calculate dirpath from current file */
 6859|  12.4k|    const char *curname = curfile + strlen(curfile);
 6860|  12.4k|    while (curname > curfile) {
  ------------------
  |  Branch (6860:12): [True: 0, False: 12.4k]
  ------------------
 6861|      0|        if (is_path_sep(*curname)) break;
  ------------------
  |  Branch (6861:13): [True: 0, False: 0]
  ------------------
 6862|      0|        curname--;
 6863|      0|    }
 6864|  12.4k|    const char *curdir;
 6865|  12.4k|    int32_t curlen;
 6866|  12.4k|    if (curname == curfile) {
  ------------------
  |  Branch (6866:9): [True: 12.4k, False: 2]
  ------------------
 6867|       |        /* Current file has one or zero path segments, so
 6868|       |         * we are in the . directory. */
 6869|  12.4k|        curdir = ".";
 6870|  12.4k|        curlen = 1;
 6871|  12.4k|    } else {
 6872|       |        /* Current file has 2 or more segments, so we
 6873|       |         * can cut off the last segment. */
 6874|      2|        curdir = curfile;
 6875|      2|        curlen = (int32_t)(curname - curfile);
 6876|      2|    }
 6877|       |
 6878|   120k|    for (size_t i = 0; i < tlen; i++) {
  ------------------
  |  Branch (6878:24): [True: 108k, False: 12.4k]
  ------------------
 6879|   108k|        if (template[i] == ':') {
  ------------------
  |  Branch (6879:13): [True: 21.3k, False: 87.0k]
  ------------------
 6880|  21.3k|            if (strncmp(template + i, ":all:", 5) == 0) {
  ------------------
  |  Branch (6880:17): [True: 12.1k, False: 9.22k]
  ------------------
 6881|  12.1k|                janet_buffer_push_cstring(out, input);
 6882|  12.1k|                i += 4;
 6883|  12.1k|            } else if (strncmp(template + i, ":@all:", 6) == 0) {
  ------------------
  |  Branch (6883:24): [True: 328, False: 8.89k]
  ------------------
 6884|    328|                if (input[0] == '@') {
  ------------------
  |  Branch (6884:21): [True: 328, False: 0]
  ------------------
 6885|    328|                    const char *p = input;
 6886|  3.00k|                    while (*p && !is_path_sep(*p)) p++;
  ------------------
  |  Branch (6886:28): [True: 2.72k, False: 272]
  |  Branch (6886:34): [True: 2.67k, False: 56]
  ------------------
 6887|    328|                    size_t len = p - input - 1;
 6888|    328|                    char *str = janet_smalloc(len + 1);
 6889|    328|                    memcpy(str, input + 1, len);
 6890|    328|                    str[len] = '\0';
 6891|    328|                    janet_formatb(out, "%V", janet_dyn(str));
 6892|    328|                    janet_sfree(str);
 6893|    328|                    janet_buffer_push_cstring(out, p);
 6894|    328|                } else {
 6895|      0|                    janet_buffer_push_cstring(out, input);
 6896|      0|                }
 6897|    328|                i += 5;
 6898|  8.89k|            } else if (strncmp(template + i, ":cur:", 5) == 0) {
  ------------------
  |  Branch (6898:24): [True: 200, False: 8.69k]
  ------------------
 6899|    200|                janet_buffer_push_bytes(out, (const uint8_t *)curdir, curlen);
 6900|    200|                i += 4;
 6901|  8.69k|            } else if (strncmp(template + i, ":dir:", 5) == 0) {
  ------------------
  |  Branch (6901:24): [True: 0, False: 8.69k]
  ------------------
 6902|      0|                janet_buffer_push_bytes(out, (const uint8_t *)input,
 6903|      0|                                        (int32_t)(name - input));
 6904|      0|                i += 4;
 6905|  8.69k|            } else if (strncmp(template + i, ":sys:", 5) == 0) {
  ------------------
  |  Branch (6905:24): [True: 5.57k, False: 3.12k]
  ------------------
 6906|  5.57k|                janet_buffer_push_cstring(out, syspath);
 6907|  5.57k|                i += 4;
 6908|  5.57k|            } else if (strncmp(template + i, ":name:", 6) == 0) {
  ------------------
  |  Branch (6908:24): [True: 0, False: 3.12k]
  ------------------
 6909|      0|                janet_buffer_push_cstring(out, name);
 6910|      0|                i += 5;
 6911|  3.12k|            } else if (strncmp(template + i, ":native:", 8) == 0) {
  ------------------
  |  Branch (6911:24): [True: 3.12k, False: 0]
  ------------------
 6912|       |#ifdef JANET_WINDOWS
 6913|       |                janet_buffer_push_cstring(out, ".dll");
 6914|       |#else
 6915|  3.12k|                janet_buffer_push_cstring(out, ".so");
 6916|  3.12k|#endif
 6917|  3.12k|                i += 7;
 6918|  3.12k|            } else {
 6919|      0|                janet_buffer_push_u8(out, (uint8_t) template[i]);
 6920|      0|            }
 6921|  87.0k|        } else {
 6922|  87.0k|            janet_buffer_push_u8(out, (uint8_t) template[i]);
 6923|  87.0k|        }
 6924|   108k|    }
 6925|       |
 6926|       |    /* Normalize */
 6927|  12.4k|    uint8_t *scan = out->data;
 6928|  12.4k|    uint8_t *print = scan;
 6929|  12.4k|    uint8_t *scanend = scan + out->count;
 6930|  12.4k|    int normal_section_count = 0;
 6931|  12.4k|    int dot_count = 0;
 6932|   270k|    while (scan < scanend) {
  ------------------
  |  Branch (6932:12): [True: 257k, False: 12.4k]
  ------------------
 6933|   257k|        if (*scan == '.') {
  ------------------
  |  Branch (6933:13): [True: 37.9k, False: 219k]
  ------------------
 6934|  37.9k|            if (dot_count >= 0) {
  ------------------
  |  Branch (6934:17): [True: 22.3k, False: 15.5k]
  ------------------
 6935|  22.3k|                dot_count++;
 6936|  22.3k|            } else {
 6937|  15.5k|                *print++ = '.';
 6938|  15.5k|            }
 6939|   219k|        } else if (is_path_sep(*scan)) {
  ------------------
  |  Branch (6939:20): [True: 43.1k, False: 176k]
  ------------------
 6940|  43.1k|            if (dot_count == 1) {
  ------------------
  |  Branch (6940:17): [True: 6.65k, False: 36.4k]
  ------------------
 6941|  6.65k|                ;
 6942|  36.4k|            } else if (dot_count == 2) {
  ------------------
  |  Branch (6942:24): [True: 452, False: 36.0k]
  ------------------
 6943|    452|                if (normal_section_count > 0) {
  ------------------
  |  Branch (6943:21): [True: 316, False: 136]
  ------------------
 6944|       |                    /* unprint last separator */
 6945|    316|                    print--;
 6946|       |                    /* unprint last section */
 6947|  11.1k|                    while (print > out->data && !is_path_sep(*(print - 1)))
  ------------------
  |  Branch (6947:28): [True: 11.0k, False: 40]
  |  Branch (6947:49): [True: 10.7k, False: 276]
  ------------------
 6948|  10.7k|                        print--;
 6949|    316|                    normal_section_count--;
 6950|    316|                } else {
 6951|    136|                    *print++ = '.';
 6952|    136|                    *print++ = '.';
 6953|    136|                    *print++ = '/';
 6954|    136|                }
 6955|  36.0k|            } else if (scan == out->data || dot_count != 0) {
  ------------------
  |  Branch (6955:24): [True: 5.70k, False: 30.3k]
  |  Branch (6955:45): [True: 24.9k, False: 5.40k]
  ------------------
 6956|  36.2k|                while (dot_count > 0) {
  ------------------
  |  Branch (6956:24): [True: 5.64k, False: 30.6k]
  ------------------
 6957|  5.64k|                    --dot_count;
 6958|  5.64k|                    *print++ = '.';
 6959|  5.64k|                }
 6960|  30.6k|                if (scan > out->data) {
  ------------------
  |  Branch (6960:21): [True: 24.9k, False: 5.70k]
  ------------------
 6961|  24.9k|                    normal_section_count++;
 6962|  24.9k|                }
 6963|  30.6k|                *print++ = '/';
 6964|  30.6k|            }
 6965|  43.1k|            dot_count = 0;
 6966|   176k|        } else {
 6967|   185k|            while (dot_count > 0) {
  ------------------
  |  Branch (6967:20): [True: 9.16k, False: 176k]
  ------------------
 6968|  9.16k|                --dot_count;
 6969|  9.16k|                *print++ = '.';
 6970|  9.16k|            }
 6971|   176k|            dot_count = -1;
 6972|   176k|            *print++ = *scan;
 6973|   176k|        }
 6974|   257k|        scan++;
 6975|   257k|    }
 6976|  12.4k|    out->count = (int32_t)(print - out->data);
 6977|  12.4k|    return janet_wrap_buffer(out);
  ------------------
  |  |  847|  12.4k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|  12.4k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  12.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  12.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6978|  12.4k|}
janet_core_dyn:
 6982|  5.12M|              "Get a dynamic binding. Returns the default value (or nil) if no binding found.") {
 6983|  5.12M|    janet_arity(argc, 1, 2);
 6984|  5.12M|    Janet value;
 6985|  5.12M|    if (janet_vm.fiber->env) {
  ------------------
  |  Branch (6985:9): [True: 5.12M, False: 2]
  ------------------
 6986|  5.12M|        value = janet_table_get(janet_vm.fiber->env, argv[0]);
 6987|  5.12M|    } else {
 6988|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6989|      2|    }
 6990|  5.12M|    if (argc == 2 && janet_checktype(value, JANET_NIL)) {
  ------------------
  |  |  806|  2.33k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 2.33k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 2.33k]
  |  |  ------------------
  |  |  807|  2.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|  2.33k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.33k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.33k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.33k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.33k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6990:9): [True: 2.33k, False: 5.12M]
  ------------------
 6991|  2.33k|        return argv[1];
 6992|  2.33k|    }
 6993|  5.12M|    return value;
 6994|  5.12M|}
janet_core_setdyn:
 6998|   421k|              "Set a dynamic binding. Returns value.") {
 6999|   421k|    janet_fixarity(argc, 2);
 7000|   421k|    if (!janet_vm.fiber->env) {
  ------------------
  |  Branch (7000:9): [True: 0, False: 421k]
  ------------------
 7001|      0|        janet_vm.fiber->env = janet_table(2);
 7002|      0|    }
 7003|   421k|    janet_table_put(janet_vm.fiber->env, argv[0], argv[1]);
 7004|   421k|    return argv[1];
 7005|   421k|}
janet_core_describe:
 7041|     39|              "value from which the identity of `x` can be determined.") {
 7042|     39|    JanetBuffer *b = janet_buffer(0);
 7043|  1.76k|    for (int32_t i = 0; i < argc; ++i)
  ------------------
  |  Branch (7043:25): [True: 1.72k, False: 39]
  ------------------
 7044|  1.72k|        janet_description_b(b, argv[i]);
 7045|     39|    return janet_stringv(b->data, b->count);
  ------------------
  |  | 1826|     39|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|     39|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|     39|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     39|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     39|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7046|     39|}
janet_core_string:
 7052|   117k|              "Returns the new string.") {
 7053|   117k|    JanetBuffer *b = janet_buffer(0);
 7054|   657k|    for (int32_t i = 0; i < argc; ++i)
  ------------------
  |  Branch (7054:25): [True: 540k, False: 117k]
  ------------------
 7055|   540k|        janet_to_string_b(b, argv[i]);
 7056|   117k|    return janet_stringv(b->data, b->count);
  ------------------
  |  | 1826|   117k|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|   117k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|   117k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   117k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   117k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7057|   117k|}
janet_core_symbol:
 7063|   925k|              "Returns the new symbol.") {
 7064|   925k|    JanetBuffer *b = janet_buffer(0);
 7065|  3.62M|    for (int32_t i = 0; i < argc; ++i)
  ------------------
  |  Branch (7065:25): [True: 2.70M, False: 925k]
  ------------------
 7066|  2.70M|        janet_to_string_b(b, argv[i]);
 7067|   925k|    return janet_symbolv(b->data, b->count);
  ------------------
  |  | 1835|   925k|#define janet_symbolv(str, len) janet_wrap_symbol(janet_symbol((str), (len)))
  |  |  ------------------
  |  |  |  |  849|   925k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|   925k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   925k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   925k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7068|   925k|}
janet_core_keyword:
 7074|     11|              "Returns the new keyword.") {
 7075|     11|    JanetBuffer *b = janet_buffer(0);
 7076|     62|    for (int32_t i = 0; i < argc; ++i)
  ------------------
  |  Branch (7076:25): [True: 51, False: 11]
  ------------------
 7077|     51|        janet_to_string_b(b, argv[i]);
 7078|     11|    return janet_keywordv(b->data, b->count);
  ------------------
  |  | 1841|     11|#define janet_keywordv(str, len) janet_wrap_keyword(janet_keyword((str), (len)))
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7079|     11|}
janet_core_buffer:
 7085|  1.77k|              "Returns the new buffer.") {
 7086|  1.77k|    JanetBuffer *b = janet_buffer(0);
 7087|  2.41k|    for (int32_t i = 0; i < argc; ++i)
  ------------------
  |  Branch (7087:25): [True: 640, False: 1.77k]
  ------------------
 7088|    640|        janet_to_string_b(b, argv[i]);
 7089|  1.77k|    return janet_wrap_buffer(b);
  ------------------
  |  |  847|  1.77k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|  1.77k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.77k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.77k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7090|  1.77k|}
janet_core_is_abstract:
 7094|      1|              "Check if x is an abstract type.") {
 7095|      1|    janet_fixarity(argc, 1);
 7096|      1|    return janet_wrap_boolean(janet_checktype(argv[0], JANET_ABSTRACT));
  ------------------
  |  |  834|      1|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|      2|    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 (822:51): [True: 0, False: 0]
  |  |  |  |  |  Branch (822:51): [True: 0, False: 0]
  |  |  |  |  |  Branch (822:51): [Folded, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7097|      1|}
janet_core_scannumber:
 7105|  7.86k|              "radix specifier is expected at the beginning of the number.") {
 7106|  7.86k|    double number;
 7107|  7.86k|    janet_arity(argc, 1, 2);
 7108|  7.86k|    JanetByteView view = janet_getbytes(argv, 0);
 7109|  7.86k|    int32_t base = janet_optinteger(argv, argc, 1, 0);
 7110|  7.86k|    int valid = base == 0 || (base >= 2 && base <= 36);
  ------------------
  |  Branch (7110:17): [True: 7.85k, False: 3]
  |  Branch (7110:31): [True: 2, False: 1]
  |  Branch (7110:44): [True: 2, False: 0]
  ------------------
 7111|  7.86k|    if (!valid) {
  ------------------
  |  Branch (7111:9): [True: 1, False: 7.86k]
  ------------------
 7112|      1|        janet_panicf("expected base between 2 and 36, got %d", base);
 7113|      1|    }
 7114|  7.86k|    if (janet_scan_number_base(view.bytes, view.len, base, &number))
  ------------------
  |  Branch (7114:9): [True: 6.70k, False: 1.15k]
  ------------------
 7115|  6.70k|        return janet_wrap_nil();
  ------------------
  |  |  831|  6.70k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  6.70k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.70k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.70k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7116|  1.15k|    return janet_wrap_number(number);
  ------------------
  |  |  835|  1.15k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
 7117|  7.86k|}
janet_core_tuple:
 7121|  5.06M|              "Creates a new tuple that contains items. Returns the new tuple.") {
 7122|  5.06M|    return janet_wrap_tuple(janet_tuple_n(argv, argc));
  ------------------
  |  |  843|  5.06M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  5.06M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.06M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.06M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7123|  5.06M|}
janet_core_array:
 7127|  1.49k|              "Create a new array that contains items. Returns the new array.") {
 7128|  1.49k|    JanetArray *array = janet_array(argc);
 7129|  1.49k|    array->count = argc;
 7130|  1.49k|    safe_memcpy(array->data, argv, argc * sizeof(Janet));
 7131|  1.49k|    return janet_wrap_array(array);
  ------------------
  |  |  845|  1.49k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  1.49k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.49k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.49k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7132|  1.49k|}
janet_core_slice:
 7136|  4.38k|              "Extract a sub-range of an indexed data structure or byte sequence.") {
 7137|  4.38k|    JanetRange range;
 7138|  4.38k|    JanetByteView bview;
 7139|  4.38k|    JanetView iview;
 7140|  4.38k|    if (janet_bytes_view(argv[0], &bview.bytes, &bview.len)) {
  ------------------
  |  Branch (7140:9): [True: 2.49k, False: 1.89k]
  ------------------
 7141|  2.49k|        range = janet_getslice(argc, argv);
 7142|  2.49k|        return janet_stringv(bview.bytes + range.start, range.end - range.start);
  ------------------
  |  | 1826|  2.49k|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|  2.49k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  2.49k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  2.49k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  2.49k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7143|  2.49k|    } else if (janet_indexed_view(argv[0], &iview.items, &iview.len)) {
  ------------------
  |  Branch (7143:16): [True: 1.89k, False: 5]
  ------------------
 7144|  1.89k|        range = janet_getslice(argc, argv);
 7145|  1.89k|        return janet_wrap_tuple(janet_tuple_n(iview.items + range.start, range.end - range.start));
  ------------------
  |  |  843|  1.89k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  1.89k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.89k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.89k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7146|  1.89k|    } else {
 7147|      5|        janet_panic_type(argv[0], 0, JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED);
  ------------------
  |  |  612|      5|#define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  599|      5|#define JANET_TFLAG_STRING (1 << JANET_STRING)
  |  |  ------------------
  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  600|      5|#define JANET_TFLAG_SYMBOL (1 << JANET_SYMBOL)
  |  |  ------------------
  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  606|      5|#define JANET_TFLAG_BUFFER (1 << JANET_BUFFER)
  |  |  ------------------
  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  601|      5|#define JANET_TFLAG_KEYWORD (1 << JANET_KEYWORD)
  |  |  ------------------
  ------------------
                      janet_panic_type(argv[0], 0, JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED);
  ------------------
  |  |  613|      5|#define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  ------------------
  |  |  |  |  602|      5|#define JANET_TFLAG_ARRAY (1 << JANET_ARRAY)
  |  |  ------------------
  |  |               #define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  ------------------
  |  |  |  |  603|      5|#define JANET_TFLAG_TUPLE (1 << JANET_TUPLE)
  |  |  ------------------
  ------------------
 7148|      5|    }
 7149|  4.38k|}
janet_core_range:
 7155|    119|              "a range [start, end). With three, returns a range with optional step size.") {
 7156|    119|    janet_arity(argc, 1, 3);
 7157|    119|    double start = 0, stop = 0, step = 1, count = 0;
 7158|    119|    if (argc == 3) {
  ------------------
  |  Branch (7158:9): [True: 44, False: 75]
  ------------------
 7159|     44|        start = janet_getnumber(argv, 0);
 7160|     44|        stop = janet_getnumber(argv, 1);
 7161|     44|        step = janet_getnumber(argv, 2);
 7162|     44|        count = (step > 0.0) ? (stop - start) / step :
  ------------------
  |  Branch (7162:17): [True: 29, False: 15]
  ------------------
 7163|     44|                ((step < 0.0) ? (stop - start) / step : 0.0);
  ------------------
  |  Branch (7163:18): [True: 6, False: 9]
  ------------------
 7164|     75|    } else if (argc == 2) {
  ------------------
  |  Branch (7164:16): [True: 62, False: 13]
  ------------------
 7165|     62|        start = janet_getnumber(argv, 0.0);
 7166|     62|        stop = janet_getnumber(argv, 1.0);
 7167|     62|        count = stop - start;
 7168|     62|    } else {
 7169|     13|        stop = janet_getnumber(argv, 0.0);
 7170|     13|        count = stop;
 7171|     13|    }
 7172|    119|    if (isinf(step)) {
  ------------------
  |  Branch (7172:9): [True: 0, False: 119]
  ------------------
 7173|      0|        janet_panic("infinite step not allowed");
 7174|      0|    }
 7175|    119|    count = (count > 0.0) ? count : 0.0;
  ------------------
  |  Branch (7175:13): [True: 89, False: 30]
  ------------------
 7176|    119|    int32_t int_count;
 7177|    119|    janet_assert(count >= 0.0, "bad range code (count)");
  ------------------
  |  |  389|    119|#define janet_assert(c, m) do { \
  |  |  390|    119|    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: 119]
  |  |  ------------------
  |  |  391|    119|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 119]
  |  |  ------------------
  ------------------
 7178|    119|    if (count > (double) INT32_MAX) {
  ------------------
  |  Branch (7178:9): [True: 4, False: 115]
  ------------------
 7179|      4|        janet_panicf("range is too large, %f elements", count);
 7180|    115|    } else {
 7181|    115|        int_count = (int32_t) ceil(count);
 7182|    115|    }
 7183|    115|    if (int_count) { /* e.g. (range 10 0 0) */
  ------------------
  |  Branch (7183:9): [True: 85, False: 30]
  ------------------
 7184|     85|        if (step > 0.0) {
  ------------------
  |  Branch (7184:13): [True: 85, False: 0]
  ------------------
 7185|     85|            janet_assert(start + int_count * step >= stop, "bad range code (+step)");
  ------------------
  |  |  389|     85|#define janet_assert(c, m) do { \
  |  |  390|     85|    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: 85]
  |  |  ------------------
  |  |  391|     85|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 85]
  |  |  ------------------
  ------------------
 7186|     85|        } else {
 7187|      0|            janet_assert(start + int_count * step <= stop, "bad range code (-step)");
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
 7188|      0|        }
 7189|     85|    }
 7190|    115|    JanetArray *array = janet_array(int_count);
 7191|   173M|    for (int32_t i = 0; i < int_count; i++) {
  ------------------
  |  Branch (7191:25): [True: 173M, False: 115]
  ------------------
 7192|   173M|        array->data[i] = janet_wrap_number((double) start + (double) i * step);
  ------------------
  |  |  835|   173M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
 7193|   173M|    }
 7194|    115|    array->count = int_count;
 7195|    115|    return janet_wrap_array(array);
  ------------------
  |  |  845|    115|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|    115|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    115|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    115|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7196|    115|}
janet_core_table:
 7203|  7.55k|              "new table.") {
 7204|  7.55k|    int32_t i;
 7205|  7.55k|    if (argc & 1)
  ------------------
  |  Branch (7205:9): [True: 0, False: 7.55k]
  ------------------
 7206|      0|        janet_panic("expected even number of arguments");
 7207|  7.55k|    JanetTable *table = janet_table(argc >> 1);
 7208|  27.1k|    for (i = 0; i < argc; i += 2) {
  ------------------
  |  Branch (7208:17): [True: 19.5k, False: 7.55k]
  ------------------
 7209|  19.5k|        janet_table_put(table, argv[i], argv[i + 1]);
 7210|  19.5k|    }
 7211|  7.55k|    return janet_wrap_table(table);
  ------------------
  |  |  846|  7.55k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|  7.55k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.55k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.55k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7212|  7.55k|}
janet_core_getproto:
 7216|      2|              "Get the prototype of a table or struct. Will return nil if `x` has no prototype.") {
 7217|      2|    janet_fixarity(argc, 1);
 7218|      2|    if (janet_checktype(argv[0], JANET_TABLE)) {
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7219|      0|        JanetTable *t = janet_unwrap_table(argv[0]);
  ------------------
  |  |  861|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
 7220|      0|        return t->proto
  ------------------
  |  Branch (7220:16): [True: 0, False: 0]
  ------------------
 7221|      0|               ? 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7222|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7223|      0|    }
 7224|      2|    if (janet_checktype(argv[0], JANET_STRUCT)) {
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7225|      0|        JanetStruct st = janet_unwrap_struct(argv[0]);
  ------------------
  |  |  857|      0|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
 7226|      0|        return janet_struct_proto(st)
  ------------------
  |  | 1850|      0|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1845|      0|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1850:31): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 7227|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7228|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7229|      0|    }
 7230|      2|    janet_panicf("expected struct or table, got %v", argv[0]);
 7231|      2|}
janet_core_struct:
 7238|  14.1k|              "new struct.") {
 7239|  14.1k|    int32_t i;
 7240|  14.1k|    if (argc & 1) {
  ------------------
  |  Branch (7240:9): [True: 0, False: 14.1k]
  ------------------
 7241|      0|        janet_panic("expected even number of arguments");
 7242|      0|    }
 7243|  14.1k|    JanetKV *st = janet_struct_begin(argc >> 1);
 7244|  41.6k|    for (i = 0; i < argc; i += 2) {
  ------------------
  |  Branch (7244:17): [True: 27.4k, False: 14.1k]
  ------------------
 7245|  27.4k|        janet_struct_put(st, argv[i], argv[i + 1]);
 7246|  27.4k|    }
 7247|  14.1k|    return janet_wrap_struct(janet_struct_end(st));
  ------------------
  |  |  842|  14.1k|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|  14.1k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  14.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  14.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7248|  14.1k|}
janet_core_gensym:
 7254|   706k|              "it can be used in macros to generate automatic bindings.") {
 7255|   706k|    (void) argv;
 7256|   706k|    janet_fixarity(argc, 0);
 7257|   706k|    return janet_wrap_symbol(janet_symbol_gen());
  ------------------
  |  |  849|   706k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|   706k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   706k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   706k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7258|   706k|}
janet_core_gccollect:
 7262|      1|              "Run garbage collection. You should probably not call this manually.") {
 7263|      1|    (void) argv;
 7264|      1|    (void) argc;
 7265|      1|    janet_collect();
 7266|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7267|      1|}
janet_core_gcsetinterval:
 7273|      5|              "High values will be faster but use more memory.") {
 7274|      5|    janet_fixarity(argc, 1);
 7275|      5|    size_t s = janet_getsize(argv, 0);
 7276|       |    /* limit interval to 48 bits */
 7277|      5|#ifdef JANET_64
 7278|      5|    if (s >> 48) {
  ------------------
  |  Branch (7278:9): [True: 0, False: 5]
  ------------------
 7279|      0|        janet_panic("interval too large");
 7280|      0|    }
 7281|      5|#endif
 7282|      5|    janet_vm.gc_interval = s;
 7283|      5|    return janet_wrap_nil();
  ------------------
  |  |  831|      5|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      5|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      5|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      5|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7284|      5|}
janet_core_gcinterval:
 7289|      2|              "of garbage collection.") {
 7290|      2|    (void) argv;
 7291|      2|    janet_fixarity(argc, 0);
 7292|      2|    return janet_wrap_number((double) janet_vm.gc_interval);
  ------------------
  |  |  835|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
 7293|      2|}
janet_core_type:
 7313|   105M|              "or another keyword for an abstract type.") {
 7314|   105M|    janet_fixarity(argc, 1);
 7315|   105M|    JanetType t = janet_type(argv[0]);
  ------------------
  |  |  795|   105M|    (isnan((x).number) \
  |  |  796|   105M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   105M|        : JANET_NUMBER)
  ------------------
  |  Branch (7315:19): [True: 104M, False: 372k]
  ------------------
 7316|   105M|    if (t == JANET_ABSTRACT) {
  ------------------
  |  Branch (7316:9): [True: 5.39k, False: 105M]
  ------------------
 7317|  5.39k|        return janet_ckeywordv(janet_abstract_type(janet_unwrap_abstract(argv[0]))->name);
  ------------------
  |  | 1842|  5.39k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  5.39k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  5.39k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  5.39k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  5.39k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7318|   105M|    } else {
 7319|   105M|        return janet_ckeywordv(janet_type_names[t]);
  ------------------
  |  | 1842|   105M|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|   105M|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|   105M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   105M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   105M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7320|   105M|    }
 7321|   105M|}
janet_core_hash:
 7327|      1|              "then they will have the same hash value.") {
 7328|      1|    janet_fixarity(argc, 1);
 7329|      1|    return janet_wrap_number(janet_hash(argv[0]));
  ------------------
  |  |  835|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
 7330|      1|}
janet_core_getline:
 7337|   102k|              "Use this function to implement a simple interface for a terminal program.") {
 7338|   102k|    FILE *in = janet_dynfile("in", stdin);
 7339|   102k|    FILE *out = janet_dynfile("out", stdout);
 7340|   102k|    janet_arity(argc, 0, 3);
 7341|   102k|    JanetBuffer *buf = (argc >= 2) ? janet_getbuffer(argv, 1) : janet_buffer(10);
  ------------------
  |  Branch (7341:24): [True: 102k, False: 1]
  ------------------
 7342|   102k|    if (argc >= 1) {
  ------------------
  |  Branch (7342:9): [True: 102k, False: 2]
  ------------------
 7343|   102k|        const char *prompt = (const char *) janet_getstring(argv, 0);
 7344|   102k|        fprintf(out, "%s", prompt);
 7345|   102k|        fflush(out);
 7346|   102k|    }
 7347|   102k|    {
 7348|   102k|        buf->count = 0;
 7349|   102k|        int c;
 7350|   102k|        for (;;) {
 7351|   102k|            c = fgetc(in);
 7352|   102k|            if (feof(in) || c < 0) {
  ------------------
  |  Branch (7352:17): [True: 102k, False: 0]
  |  Branch (7352:29): [True: 0, False: 0]
  ------------------
 7353|   102k|                break;
 7354|   102k|            }
 7355|      0|            janet_buffer_push_u8(buf, (uint8_t) c);
 7356|      0|            if (c == '\n') break;
  ------------------
  |  Branch (7356:17): [True: 0, False: 0]
  ------------------
 7357|      0|        }
 7358|   102k|    }
 7359|   102k|    return janet_wrap_buffer(buf);
  ------------------
  |  |  847|   102k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|   102k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   102k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   102k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7360|   102k|}
janet_core_trace:
 7364|      1|              "Enable tracing on a function. Returns the function.") {
 7365|      1|    janet_fixarity(argc, 1);
 7366|      1|    JanetFunction *func = janet_getfunction(argv, 0);
 7367|      1|    func->gc.flags |= JANET_FUNCFLAG_TRACE;
  ------------------
  |  | 1164|      1|#define JANET_FUNCFLAG_TRACE (1 << 16)
  ------------------
 7368|      1|    return argv[0];
 7369|      1|}
janet_core_check_nat:
 7389|  1.15k|              "Check if x can be exactly represented as a non-negative 32 bit signed two's complement integer.") {
 7390|  1.15k|    janet_fixarity(argc, 1);
 7391|  1.15k|    if (!janet_checkint(argv[0])) return janet_wrap_false();
  ------------------
  |  |  833|     66|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|     66|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     66|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     66|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7391:9): [True: 66, False: 1.08k]
  ------------------
 7392|  1.08k|    return janet_wrap_boolean(janet_unwrap_integer(argv[0]) >= 0);
  ------------------
  |  |  834|  1.08k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|  1.08k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.08k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.08k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7393|  1.15k|}
janet_core_is_bytes:
 7397|    794|              "Check if x is a string, symbol, keyword, or buffer.") {
 7398|    794|    janet_fixarity(argc, 1);
 7399|    794|    return janet_wrap_boolean(janet_checktypes(argv[0], JANET_TFLAG_BYTES));
  ------------------
  |  |  834|    794|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|  1.58k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    794|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    794|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (822:51): [True: 233, False: 561]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7400|    794|}
janet_core_is_indexed:
 7404|   102k|              "Check if x is an array or tuple.") {
 7405|   102k|    janet_fixarity(argc, 1);
 7406|   102k|    return janet_wrap_boolean(janet_checktypes(argv[0], JANET_TFLAG_INDEXED));
  ------------------
  |  |  834|   102k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|   204k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   102k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   102k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (822:51): [True: 102k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7407|   102k|}
janet_core_is_dictionary:
 7411|     11|              "Check if x is a table or struct.") {
 7412|     11|    janet_fixarity(argc, 1);
 7413|     11|    return janet_wrap_boolean(janet_checktypes(argv[0], JANET_TFLAG_DICTIONARY));
  ------------------
  |  |  834|     11|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|     22|    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 (822:51): [True: 8, False: 3]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7414|     11|}
janet_core_is_lengthable:
 7418|  81.8k|              "Check if x is a bytes, indexed, or dictionary.") {
 7419|  81.8k|    janet_fixarity(argc, 1);
 7420|  81.8k|    return janet_wrap_boolean(janet_checktypes(argv[0], JANET_TFLAG_LENGTHABLE));
  ------------------
  |  |  834|  81.8k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|   163k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  81.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  81.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (822:51): [True: 81.8k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7421|  81.8k|}
janet_core_signal:
 7433|      7|              "* :await") {
 7434|      7|    janet_arity(argc, 1, 2);
 7435|      7|    Janet payload = argc == 2 ? argv[1] : 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7435:21): [True: 5, False: 2]
  ------------------
 7436|      7|    if (janet_checkint(argv[0])) {
  ------------------
  |  Branch (7436:9): [True: 0, False: 7]
  ------------------
 7437|      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)
  |  |  ------------------
  ------------------
 7438|      0|        if (s < 0 || s > 9) {
  ------------------
  |  Branch (7438:13): [True: 0, False: 0]
  |  Branch (7438:22): [True: 0, False: 0]
  ------------------
 7439|      0|            janet_panicf("expected user signal between 0 and 9, got %d", s);
 7440|      0|        }
 7441|      0|        janet_signalv(JANET_SIGNAL_USER0 + s, payload);
 7442|      7|    } else {
 7443|      7|        JanetKeyword kw = janet_getkeyword(argv, 0);
 7444|     35|        for (unsigned i = 0; i < sizeof(janet_signal_names) / sizeof(char *); i++) {
  ------------------
  |  Branch (7444:30): [True: 28, False: 7]
  ------------------
 7445|     28|            if (!janet_cstrcmp(kw, janet_signal_names[i])) {
  ------------------
  |  Branch (7445:17): [True: 0, False: 28]
  ------------------
 7446|      0|                janet_signalv((JanetSignal) i, payload);
 7447|      0|            }
 7448|     28|        }
 7449|      7|    }
 7450|      7|    janet_panicf("unknown signal %v", argv[0]);
 7451|      7|}
janet_core_memcmp:
 7458|  23.4k|              "to compare slices of the bytes sequences.") {
 7459|  23.4k|    janet_arity(argc, 2, 5);
 7460|  23.4k|    JanetByteView a = janet_getbytes(argv, 0);
 7461|  23.4k|    JanetByteView b = janet_getbytes(argv, 1);
 7462|  23.4k|    int32_t len = janet_optnat(argv, argc, 2, a.len < b.len ? a.len : b.len);
  ------------------
  |  Branch (7462:47): [True: 1, False: 23.4k]
  ------------------
 7463|  23.4k|    int32_t offset_a = janet_optnat(argv, argc, 3, 0);
 7464|  23.4k|    int32_t offset_b = janet_optnat(argv, argc, 4, 0);
 7465|  23.4k|    if (offset_a + len > a.len) janet_panicf("invalid offset-a: %d", offset_a);
  ------------------
  |  Branch (7465:9): [True: 1, False: 23.4k]
  ------------------
 7466|  23.4k|    if (offset_b + len > b.len) janet_panicf("invalid offset-b: %d", offset_b);
  ------------------
  |  Branch (7466:9): [True: 0, False: 23.4k]
  ------------------
 7467|  23.4k|    return janet_wrap_integer(memcmp(a.bytes + offset_a, b.bytes + offset_b, (size_t) len));
  ------------------
  |  |  967|  23.4k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  23.4k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 7468|  23.4k|}
janet_core_sandbox:
 7532|      1|              "* :unmarshal - disallow calling the `unmarshal` function.\n") {
 7533|      1|    uint32_t flags = 0;
 7534|      2|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (7534:25): [True: 1, False: 1]
  ------------------
 7535|      1|        JanetKeyword kw = janet_getkeyword(argv, i);
 7536|      1|        const SandboxOption *opt = sandbox_options;
 7537|      1|        while (opt->name != NULL) {
  ------------------
  |  Branch (7537:16): [True: 0, False: 1]
  ------------------
 7538|      0|            if (janet_cstrcmp(kw, opt->name) == 0) {
  ------------------
  |  Branch (7538:17): [True: 0, False: 0]
  ------------------
 7539|      0|                flags |= opt->flag;
 7540|      0|                break;
 7541|      0|            }
 7542|      0|            opt++;
 7543|      0|        }
 7544|      1|        if (opt->name == NULL) janet_panicf("unknown capability %v", argv[i]);
  ------------------
  |  Branch (7544:13): [True: 0, False: 1]
  ------------------
 7545|      1|    }
 7546|      1|    janet_sandbox(flags);
 7547|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7548|      1|}
janet_core_env:
 8092|  7.16k|JanetTable *janet_core_env(JanetTable *replacements) {
 8093|       |    /* Memoize core env, ignoring replacements the second time around. */
 8094|  7.16k|    if (NULL != janet_vm.core_env) {
  ------------------
  |  Branch (8094:9): [True: 0, False: 7.16k]
  ------------------
 8095|      0|        return janet_vm.core_env;
 8096|      0|    }
 8097|       |
 8098|  7.16k|    JanetTable *dict = janet_core_lookup_table(replacements);
 8099|       |
 8100|       |    /* Unmarshal bytecode */
 8101|  7.16k|    Janet marsh_out = janet_unmarshal(
 8102|  7.16k|                          janet_core_image,
 8103|  7.16k|                          janet_core_image_size,
 8104|  7.16k|                          0,
 8105|  7.16k|                          dict,
 8106|  7.16k|                          NULL);
 8107|       |
 8108|       |    /* Memoize */
 8109|  7.16k|    janet_gcroot(marsh_out);
 8110|  7.16k|    JanetTable *env = janet_unwrap_table(marsh_out);
  ------------------
  |  |  861|  7.16k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
 8111|  7.16k|    janet_vm.core_env = env;
 8112|       |
 8113|       |    /* Invert image dict manually here. We can't do this in boot.janet as it
 8114|       |     * breaks deterministic builds */
 8115|  7.16k|    Janet lidv, midv;
 8116|  7.16k|    lidv = midv = janet_wrap_nil();
  ------------------
  |  |  831|  7.16k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  7.16k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.16k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.16k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8117|  7.16k|    janet_resolve(env, janet_csymbol("load-image-dict"), &lidv);
 8118|  7.16k|    janet_resolve(env, janet_csymbol("make-image-dict"), &midv);
 8119|       |
 8120|       |    /* Check that we actually got tables - if we are using a smaller corelib, may not exist */
 8121|  7.16k|    if (janet_checktype(lidv, JANET_TABLE) && janet_checktype(midv, JANET_TABLE)) {
  ------------------
  |  |  806|  14.3k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 7.16k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 7.16k]
  |  |  ------------------
  |  |  807|  14.3k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  14.3k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  7.16k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  7.16k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.16k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.16k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (janet_checktype(lidv, JANET_TABLE) && janet_checktype(midv, JANET_TABLE)) {
  ------------------
  |  |  806|  7.16k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 7.16k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 7.16k]
  |  |  ------------------
  |  |  807|  7.16k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.16k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  7.16k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  7.16k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.16k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.16k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8122|  7.16k|        JanetTable *lid = janet_unwrap_table(lidv);
  ------------------
  |  |  861|  7.16k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
 8123|  7.16k|        JanetTable *mid = janet_unwrap_table(midv);
  ------------------
  |  |  861|  7.16k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
 8124|  14.6M|        for (int32_t i = 0; i < lid->capacity; i++) {
  ------------------
  |  Branch (8124:29): [True: 14.6M, False: 7.16k]
  ------------------
 8125|  14.6M|            const JanetKV *kv = lid->data + i;
 8126|  14.6M|            if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  14.6M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 14.6M]
  |  |  ------------------
  |  |  807|  14.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|  14.6M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  14.6M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  14.6M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  14.6M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  14.6M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (8126:17): [True: 4.72M, False: 9.95M]
  ------------------
 8127|  4.72M|                janet_table_put(mid, kv->value, kv->key);
 8128|  4.72M|            }
 8129|  14.6M|        }
 8130|  7.16k|    }
 8131|       |
 8132|  7.16k|    return env;
 8133|  7.16k|}
janet_core_lookup_table:
 8137|  7.16k|JanetTable *janet_core_lookup_table(JanetTable *replacements) {
 8138|  7.16k|    JanetTable *dict = janet_table(512);
 8139|  7.16k|    janet_load_libs(dict);
 8140|       |
 8141|       |    /* Add replacements */
 8142|  7.16k|    if (replacements != NULL) {
  ------------------
  |  Branch (8142:9): [True: 0, False: 7.16k]
  ------------------
 8143|      0|        for (int32_t i = 0; i < replacements->capacity; i++) {
  ------------------
  |  Branch (8143:29): [True: 0, False: 0]
  ------------------
 8144|      0|            JanetKV kv = replacements->data[i];
 8145|      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 (8145:17): [True: 0, False: 0]
  ------------------
 8146|      0|                janet_table_put(dict, kv.key, kv.value);
 8147|       |                /* Add replacement functions to registry? */
 8148|      0|            }
 8149|      0|        }
 8150|      0|    }
 8151|       |
 8152|  7.16k|    return dict;
 8153|  7.16k|}
janet_debug_break:
 8195|      6|void janet_debug_break(JanetFuncDef *def, int32_t pc) {
 8196|      6|    if (pc >= def->bytecode_length || pc < 0)
  ------------------
  |  Branch (8196:9): [True: 0, False: 6]
  |  Branch (8196:39): [True: 1, False: 5]
  ------------------
 8197|      1|        janet_panic("invalid bytecode offset");
 8198|      5|    def->bytecode[pc] |= 0x80;
 8199|      5|}
janet_debug_unbreak:
 8202|      6|void janet_debug_unbreak(JanetFuncDef *def, int32_t pc) {
 8203|      6|    if (pc >= def->bytecode_length || pc < 0)
  ------------------
  |  Branch (8203:9): [True: 2, False: 4]
  |  Branch (8203:39): [True: 2, False: 2]
  ------------------
 8204|      4|        janet_panic("invalid bytecode offset");
 8205|      2|    def->bytecode[pc] &= ~((uint32_t)0x80);
 8206|      2|}
janet_stacktrace_ext:
 8264|  2.84k|void janet_stacktrace_ext(JanetFiber *fiber, Janet err, const char *prefix) {
 8265|       |
 8266|  2.84k|    int32_t fi;
 8267|  2.84k|    const char *errstr = (const char *)janet_to_string(err);
 8268|  2.84k|    JanetFiber **fibers = NULL;
 8269|  2.84k|    int wrote_error = !prefix;
 8270|       |
 8271|  2.84k|    int print_color = janet_truthy(janet_dyn("err-color"));
  ------------------
  |  |  818|  2.84k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|  5.68k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 2.84k]
  |  |  |  |  ------------------
  |  |  |  |  807|  5.68k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!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.68k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  2.84k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  2.84k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  2.84k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  2.84k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 0, False: 2.84k]
  |  |  ------------------
  |  |  819|  2.84k|     (!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]
  |  |  ------------------
  ------------------
 8272|  2.84k|    if (print_color) janet_eprintf("\x1b[31m");
  ------------------
  |  | 2194|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
  |  Branch (8272:9): [True: 0, False: 2.84k]
  ------------------
 8273|       |
 8274|  5.70k|    while (fiber) {
  ------------------
  |  Branch (8274:12): [True: 2.85k, False: 2.84k]
  ------------------
 8275|  2.85k|        janet_v_push(fibers, fiber);
  ------------------
  |  |  712|  2.85k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  2.85k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  2.85k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|     17|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|     17|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|     17|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|     17|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 2.84k, False: 17]
  |  |  |  |  |  |  |  Branch (723:50): [True: 17, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|  2.85k|#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))
  |  |  ------------------
  |  |  |  |  721|  2.85k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  2.85k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8276|  2.85k|        fiber = fiber->child;
 8277|  2.85k|    }
 8278|       |
 8279|  5.70k|    for (fi = janet_v_count(fibers) - 1; fi >= 0; fi--) {
  ------------------
  |  |  714|  2.84k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  2.84k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  2.84k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 2.84k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (8279:42): [True: 2.85k, False: 2.84k]
  ------------------
 8280|  2.85k|        fiber = fibers[fi];
 8281|  2.85k|        int32_t i = fiber->frame;
 8282|  48.3k|        while (i > 0) {
  ------------------
  |  Branch (8282:16): [True: 45.4k, False: 2.85k]
  ------------------
 8283|  45.4k|            JanetCFunRegistry *reg = NULL;
 8284|  45.4k|            JanetStackFrame *frame = (JanetStackFrame *)(fiber->data + i - JANET_FRAME_SIZE);
  ------------------
  |  | 1026|  45.4k|#define JANET_FRAME_SIZE 4
  ------------------
 8285|  45.4k|            JanetFuncDef *def = NULL;
 8286|  45.4k|            i = frame->prevframe;
 8287|       |
 8288|       |            /* Print prelude to stack frame */
 8289|  45.4k|            if (!wrote_error) {
  ------------------
  |  Branch (8289:17): [True: 2.39k, False: 43.0k]
  ------------------
 8290|  2.39k|                JanetFiberStatus status = janet_fiber_status(fiber);
 8291|  2.39k|                janet_eprintf("%s%s: %s\n",
  ------------------
  |  | 2194|  9.57k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (2194:59): [True: 2.39k, False: 0]
  |  |  |  Branch (2194:59): [True: 2.39k, False: 0]
  |  |  ------------------
  ------------------
 8292|  2.39k|                              prefix ? prefix : "",
 8293|  2.39k|                              janet_status_names[status],
 8294|  2.39k|                              errstr ? errstr : janet_status_names[status]);
 8295|  2.39k|                wrote_error = 1;
 8296|  2.39k|            }
 8297|       |
 8298|  45.4k|            janet_eprintf("  in");
  ------------------
  |  | 2194|  45.4k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 8299|       |
 8300|  45.4k|            if (frame->func) {
  ------------------
  |  Branch (8300:17): [True: 44.2k, False: 1.24k]
  ------------------
 8301|  44.2k|                def = frame->func->def;
 8302|  44.2k|                janet_eprintf(" %s", def->name ? (const char *)def->name : "<anonymous>");
  ------------------
  |  | 2194|  88.4k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (2194:59): [True: 44.2k, False: 1]
  |  |  ------------------
  ------------------
 8303|  44.2k|                if (def->source) {
  ------------------
  |  Branch (8303:21): [True: 44.1k, False: 92]
  ------------------
 8304|  44.1k|                    janet_eprintf(" [%s]", (const char *)def->source);
  ------------------
  |  | 2194|  44.1k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 8305|  44.1k|                }
 8306|  44.2k|            } else {
 8307|  1.24k|                JanetCFunction cfun = (JanetCFunction)(frame->pc);
 8308|  1.24k|                if (cfun) {
  ------------------
  |  Branch (8308:21): [True: 1.24k, False: 0]
  ------------------
 8309|  1.24k|                    reg = janet_registry_get(cfun);
 8310|  1.24k|                    if (NULL != reg && NULL != reg->name) {
  ------------------
  |  Branch (8310:25): [True: 1.20k, False: 35]
  |  Branch (8310:40): [True: 1.20k, False: 0]
  ------------------
 8311|  1.20k|                        if (reg->name_prefix) {
  ------------------
  |  Branch (8311:29): [True: 0, False: 1.20k]
  ------------------
 8312|      0|                            janet_eprintf(" %s/%s", reg->name_prefix, reg->name);
  ------------------
  |  | 2194|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 8313|  1.20k|                        } else {
 8314|  1.20k|                            janet_eprintf(" %s", reg->name);
  ------------------
  |  | 2194|  1.20k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 8315|  1.20k|                        }
 8316|  1.20k|                        if (NULL != reg->source_file) {
  ------------------
  |  Branch (8316:29): [True: 1.20k, False: 0]
  ------------------
 8317|  1.20k|                            janet_eprintf(" [%s]", reg->source_file);
  ------------------
  |  | 2194|  1.20k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 8318|  1.20k|                        }
 8319|  1.20k|                    } else {
 8320|     35|                        janet_eprintf(" <cfunction>");
  ------------------
  |  | 2194|     35|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 8321|     35|                    }
 8322|  1.24k|                }
 8323|  1.24k|            }
 8324|  45.4k|            if (frame->flags & JANET_STACKFRAME_TAILCALL)
  ------------------
  |  | 1010|  45.4k|#define JANET_STACKFRAME_TAILCALL 1
  ------------------
  |  Branch (8324:17): [True: 9.60k, False: 35.8k]
  ------------------
 8325|  9.60k|                janet_eprintf(" (tail call)");
  ------------------
  |  | 2194|  9.60k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 8326|  45.4k|            if (frame->func && frame->pc) {
  ------------------
  |  Branch (8326:17): [True: 44.2k, False: 1.24k]
  |  Branch (8326:32): [True: 44.2k, False: 0]
  ------------------
 8327|  44.2k|                int32_t off = (int32_t)(frame->pc - def->bytecode);
 8328|  44.2k|                if (def->sourcemap) {
  ------------------
  |  Branch (8328:21): [True: 44.1k, False: 92]
  ------------------
 8329|  44.1k|                    JanetSourceMapping mapping = def->sourcemap[off];
 8330|  44.1k|                    janet_eprintf(" on line %d, column %d", mapping.line, mapping.column);
  ------------------
  |  | 2194|  44.1k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 8331|  44.1k|                } else {
 8332|     92|                    janet_eprintf(" pc=%d", off);
  ------------------
  |  | 2194|     92|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 8333|     92|                }
 8334|  44.2k|            } else if (NULL != reg) {
  ------------------
  |  Branch (8334:24): [True: 1.20k, False: 35]
  ------------------
 8335|       |                /* C Function */
 8336|  1.20k|                if (reg->source_line > 0) {
  ------------------
  |  Branch (8336:21): [True: 1.20k, False: 0]
  ------------------
 8337|  1.20k|                    janet_eprintf(" on line %d", (long) reg->source_line);
  ------------------
  |  | 2194|  1.20k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 8338|  1.20k|                }
 8339|  1.20k|            }
 8340|  45.4k|            janet_eprintf("\n");
  ------------------
  |  | 2194|  45.4k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 8341|       |            /* Print fiber points optionally. Clutters traces but provides info
 8342|       |            if (i <= 0 && fi > 0) {
 8343|       |                janet_eprintf("  in parent fiber\n");
 8344|       |            }
 8345|       |            */
 8346|  45.4k|        }
 8347|  2.85k|    }
 8348|       |
 8349|  2.84k|    if (print_color) janet_eprintf("\x1b[0m");
  ------------------
  |  | 2194|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
  |  Branch (8349:9): [True: 0, False: 2.84k]
  ------------------
 8350|       |
 8351|       |    janet_v_free(fibers);
  ------------------
  |  |  711|  2.84k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  719|  2.84k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (711:34): [True: 2.84k, False: 0]
  |  |  ------------------
  ------------------
 8352|  2.84k|}
cfun_debug_break:
 8384|      1|              "will set a breakpoint at line 10, 4th column of the file core.janet.") {
 8385|      1|    JanetFuncDef *def;
 8386|      1|    int32_t offset;
 8387|      1|    helper_find(argc, argv, &def, &offset);
 8388|      1|    janet_debug_break(def, offset);
 8389|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8390|      1|}
cfun_debug_unbreak:
 8396|      1|              "cannot be found.") {
 8397|      1|    JanetFuncDef *def;
 8398|      1|    int32_t offset = 0;
 8399|      1|    helper_find(argc, argv, &def, &offset);
 8400|      1|    janet_debug_unbreak(def, offset);
 8401|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8402|      1|}
cfun_debug_fbreak:
 8408|      8|              "if the offset is too large or negative.") {
 8409|      8|    JanetFuncDef *def;
 8410|      8|    int32_t offset = 0;
 8411|      8|    helper_find_fun(argc, argv, &def, &offset);
 8412|      8|    janet_debug_break(def, offset);
 8413|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8414|      8|}
cfun_debug_unfbreak:
 8418|     12|              "Unset a breakpoint set with debug/fbreak.") {
 8419|     12|    JanetFuncDef *def;
 8420|     12|    int32_t offset;
 8421|     12|    helper_find_fun(argc, argv, &def, &offset);
 8422|     12|    janet_debug_unbreak(def, offset);
 8423|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8424|     12|}
cfun_debug_stacktrace:
 8566|     20|              "provided, will skip the error line. Returns the fiber.") {
 8567|     20|    janet_arity(argc, 1, 3);
 8568|     20|    JanetFiber *fiber = janet_getfiber(argv, 0);
 8569|     20|    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 (8569:15): [True: 0, False: 20]
  ------------------
 8570|       |    const char *prefix = janet_optcstring(argv, argc, 2, NULL);
 8571|     20|    janet_stacktrace_ext(fiber, x, prefix);
 8572|     20|    return argv[0];
 8573|     20|}
cfun_debug_step:
 8594|      3|              "which will usually be nil, as breakpoints raise nil signals.") {
 8595|      3|    janet_arity(argc, 1, 2);
 8596|      3|    JanetFiber *fiber = janet_getfiber(argv, 0);
 8597|      3|    Janet out = 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8598|      3|    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 (8598:23): [True: 0, False: 3]
  ------------------
 8599|      3|    return out;
 8600|      3|}
janet_lib_debug:
 8603|  7.16k|void janet_lib_debug(JanetTable *env) {
 8604|  7.16k|    JanetRegExt debug_cfuns[] = {
 8605|  7.16k|        JANET_CORE_REG("debug/break", cfun_debug_break),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 8606|  7.16k|        JANET_CORE_REG("debug/unbreak", cfun_debug_unbreak),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 8607|  7.16k|        JANET_CORE_REG("debug/fbreak", cfun_debug_fbreak),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 8608|  7.16k|        JANET_CORE_REG("debug/unfbreak", cfun_debug_unfbreak),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 8609|  7.16k|        JANET_CORE_REG("debug/arg-stack", cfun_debug_argstack),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 8610|  7.16k|        JANET_CORE_REG("debug/stack", cfun_debug_stack),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 8611|  7.16k|        JANET_CORE_REG("debug/stacktrace", cfun_debug_stacktrace),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 8612|  7.16k|        JANET_CORE_REG("debug/lineage", cfun_debug_lineage),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 8613|  7.16k|        JANET_CORE_REG("debug/step", cfun_debug_step),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 8614|  7.16k|        JANET_REG_END
  ------------------
  |  | 2109|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 8615|  7.16k|    };
 8616|       |    janet_core_cfuns_ext(env, NULL, debug_cfuns);
 8617|  7.16k|}
janetc_allocfar:
 8655|  5.27M|int32_t janetc_allocfar(JanetCompiler *c) {
 8656|  5.27M|    int32_t reg = janetc_regalloc_1(&c->scope->ra);
 8657|  5.27M|    if (reg > 0xFFFF) {
  ------------------
  |  Branch (8657:9): [True: 39.7k, False: 5.23M]
  ------------------
 8658|  39.7k|        janetc_cerror(c, "ran out of internal registers");
 8659|  39.7k|    }
 8660|  5.27M|    return reg;
 8661|  5.27M|}
janetc_allocnear:
 8664|   706k|int32_t janetc_allocnear(JanetCompiler *c, JanetcRegisterTemp tag) {
 8665|   706k|    return janetc_regalloc_temp(&c->scope->ra, tag);
 8666|   706k|}
janetc_emit:
 8669|  13.3M|void janetc_emit(JanetCompiler *c, uint32_t instr) {
 8670|  13.3M|    janet_v_push(c->buffer, instr);
  ------------------
  |  |  712|  13.3M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  13.3M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  13.3M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  13.0M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  13.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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  13.0M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  13.0M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 236k, False: 13.0M]
  |  |  |  |  |  |  |  Branch (723:50): [True: 620k, False: 12.4M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|   856k|#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))
  |  |  ------------------
  |  |  |  |  721|  13.3M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  13.3M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8671|       |    janet_v_push(c->mapbuffer, c->current_mapping);
  ------------------
  |  |  712|  13.3M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  13.3M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  13.3M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  13.0M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  13.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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  13.0M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  13.0M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 236k, False: 13.0M]
  |  |  |  |  |  |  |  Branch (723:50): [True: 620k, False: 12.4M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|   856k|#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))
  |  |  ------------------
  |  |  |  |  721|  13.3M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  13.3M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8672|  13.3M|}
janetc_sequal:
 8846|   957k|int janetc_sequal(JanetSlot lhs, JanetSlot rhs) {
 8847|   957k|    if ((lhs.flags & ~JANET_SLOTTYPE_ANY) == (rhs.flags & ~JANET_SLOTTYPE_ANY) &&
  ------------------
  |  | 1001|   957k|#define JANET_SLOTTYPE_ANY 0xFFFF
  ------------------
                  if ((lhs.flags & ~JANET_SLOTTYPE_ANY) == (rhs.flags & ~JANET_SLOTTYPE_ANY) &&
  ------------------
  |  | 1001|   957k|#define JANET_SLOTTYPE_ANY 0xFFFF
  ------------------
  |  Branch (8847:9): [True: 950k, False: 7.01k]
  ------------------
 8848|   950k|            lhs.index == rhs.index &&
  ------------------
  |  Branch (8848:13): [True: 2.59k, False: 947k]
  ------------------
 8849|  2.59k|            lhs.envindex == rhs.envindex) {
  ------------------
  |  Branch (8849:13): [True: 2.59k, False: 0]
  ------------------
 8850|  2.59k|        if (lhs.flags & (JANET_SLOT_REF | JANET_SLOT_CONSTANT)) {
  ------------------
  |  |  994|  2.59k|#define JANET_SLOT_REF 0x80000
  ------------------
                      if (lhs.flags & (JANET_SLOT_REF | JANET_SLOT_CONSTANT)) {
  ------------------
  |  |  991|  2.59k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (8850:13): [True: 0, False: 2.59k]
  ------------------
 8851|      0|            return janet_equals(lhs.constant, rhs.constant);
 8852|  2.59k|        } else {
 8853|  2.59k|            return 1;
 8854|  2.59k|        }
 8855|  2.59k|    }
 8856|   954k|    return 0;
 8857|   957k|}
janetc_copy:
 8864|   957k|    JanetSlot src) {
 8865|   957k|    if (dest.flags & JANET_SLOT_CONSTANT) {
  ------------------
  |  |  991|   957k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (8865:9): [True: 0, False: 957k]
  ------------------
 8866|      0|        janetc_cerror(c, "cannot write to constant");
 8867|      0|        return;
 8868|      0|    }
 8869|   957k|    if (janetc_sequal(dest, src)) return;
  ------------------
  |  Branch (8869:9): [True: 2.59k, False: 954k]
  ------------------
 8870|       |    /* If dest is a near register */
 8871|   954k|    if (dest.envindex < 0 && dest.index >= 0 && dest.index <= 0xFF) {
  ------------------
  |  Branch (8871:9): [True: 953k, False: 798]
  |  Branch (8871:30): [True: 953k, False: 0]
  |  Branch (8871:49): [True: 213k, False: 740k]
  ------------------
 8872|   213k|        janetc_movenear(c, dest.index, src);
 8873|   213k|        return;
 8874|   213k|    }
 8875|       |    /* If src is a near register */
 8876|   741k|    if (src.envindex < 0 && src.index >= 0 && src.index <= 0xFF) {
  ------------------
  |  Branch (8876:9): [True: 741k, False: 0]
  |  Branch (8876:29): [True: 740k, False: 746]
  |  Branch (8876:47): [True: 34.4k, False: 705k]
  ------------------
 8877|  34.4k|        janetc_moveback(c, dest, src.index);
 8878|  34.4k|        return;
 8879|  34.4k|    }
 8880|       |    /* Process: src -> near -> dest */
 8881|   706k|    int32_t nearreg = janetc_allocnear(c, JANETC_REGTEMP_3);
 8882|   706k|    janetc_movenear(c, nearreg, src);
 8883|   706k|    janetc_moveback(c, dest, nearreg);
 8884|       |    /* Cleanup */
 8885|   706k|    janetc_regalloc_freetemp(&c->scope->ra, nearreg, JANETC_REGTEMP_3);
 8886|   706k|}
janetc_emit_s:
 8900|  1.84M|int32_t janetc_emit_s(JanetCompiler *c, uint8_t op, JanetSlot s, int wr) {
 8901|  1.84M|    int32_t reg = janetc_regfar(c, s, JANETC_REGTEMP_0);
 8902|  1.84M|    int32_t label = janet_v_count(c->buffer);
  ------------------
  |  |  714|  1.84M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  1.79M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  1.79M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 1.79M, False: 48.6k]
  |  |  ------------------
  ------------------
 8903|  1.84M|    janetc_emit(c, op | ((uint32_t) reg << 8));
 8904|  1.84M|    if (wr)
  ------------------
  |  Branch (8904:9): [True: 1.06M, False: 771k]
  ------------------
 8905|  1.06M|        janetc_moveback(c, s, reg);
 8906|  1.84M|    janetc_free_regnear(c, s, reg, JANETC_REGTEMP_0);
 8907|  1.84M|    return label;
 8908|  1.84M|}
janetc_emit_si:
 8923|  76.3k|int32_t janetc_emit_si(JanetCompiler *c, uint8_t op, JanetSlot s, int16_t immediate, int wr) {
 8924|  76.3k|    return emit1s(c, op, s, immediate, wr);
 8925|  76.3k|}
janetc_emit_su:
 8927|   452k|int32_t janetc_emit_su(JanetCompiler *c, uint8_t op, JanetSlot s, uint16_t immediate, int wr) {
 8928|   452k|    return emit1s(c, op, s, (int32_t) immediate, wr);
 8929|   452k|}
janetc_emit_ss:
 8943|   949k|int32_t janetc_emit_ss(JanetCompiler *c, uint8_t op, JanetSlot s1, JanetSlot s2, int wr) {
 8944|   949k|    int32_t reg1 = janetc_regnear(c, s1, JANETC_REGTEMP_0);
 8945|   949k|    int32_t reg2 = janetc_regfar(c, s2, JANETC_REGTEMP_1);
 8946|   949k|    int32_t label = janet_v_count(c->buffer);
  ------------------
  |  |  714|   949k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|   949k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   949k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 949k, False: 1]
  |  |  ------------------
  ------------------
 8947|   949k|    janetc_emit(c, op | ((uint32_t) reg1 << 8) | ((uint32_t) reg2 << 16));
 8948|   949k|    janetc_free_regnear(c, s2, reg2, JANETC_REGTEMP_1);
 8949|   949k|    if (wr)
  ------------------
  |  Branch (8949:9): [True: 16.9k, False: 932k]
  ------------------
 8950|  16.9k|        janetc_moveback(c, s1, reg1);
 8951|   949k|    janetc_free_regnear(c, s1, reg1, JANETC_REGTEMP_0);
 8952|   949k|    return label;
 8953|   949k|}
janetc_emit_ssi:
 8955|  2.85k|int32_t janetc_emit_ssi(JanetCompiler *c, uint8_t op, JanetSlot s1, JanetSlot s2, int8_t immediate, int wr) {
 8956|  2.85k|    return emit2s(c, op, s1, s2, immediate, wr);
 8957|  2.85k|}
janetc_emit_ssu:
 8959|  1.76M|int32_t janetc_emit_ssu(JanetCompiler *c, uint8_t op, JanetSlot s1, JanetSlot s2, uint8_t immediate, int wr) {
 8960|  1.76M|    return emit2s(c, op, s1, s2, (int32_t) immediate, wr);
 8961|  1.76M|}
janetc_emit_sss:
 8963|   274k|int32_t janetc_emit_sss(JanetCompiler *c, uint8_t op, JanetSlot s1, JanetSlot s2, JanetSlot s3, int wr) {
 8964|   274k|    int32_t reg1 = janetc_regnear(c, s1, JANETC_REGTEMP_0);
 8965|   274k|    int32_t reg2 = janetc_regnear(c, s2, JANETC_REGTEMP_1);
 8966|   274k|    int32_t reg3 = janetc_regnear(c, s3, JANETC_REGTEMP_2);
 8967|   274k|    int32_t label = janet_v_count(c->buffer);
  ------------------
  |  |  714|   274k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|   274k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   274k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 274k, False: 0]
  |  |  ------------------
  ------------------
 8968|   274k|    janetc_emit(c, op | ((uint32_t) reg1 << 8) | ((uint32_t) reg2 << 16) | ((uint32_t) reg3 << 24));
 8969|   274k|    janetc_free_regnear(c, s2, reg2, JANETC_REGTEMP_1);
 8970|   274k|    janetc_free_regnear(c, s3, reg3, JANETC_REGTEMP_2);
 8971|   274k|    if (wr)
  ------------------
  |  Branch (8971:9): [True: 106k, False: 168k]
  ------------------
 8972|   106k|        janetc_moveback(c, s1, reg1);
 8973|   274k|    janetc_free_regnear(c, s1, reg1, JANETC_REGTEMP_0);
 8974|   274k|    return label;
 8975|   274k|}
janet_async_end:
 9247|   383k|void janet_async_end(JanetFiber *fiber) {
 9248|   383k|    if (fiber->ev_callback) {
  ------------------
  |  Branch (9248:9): [True: 0, False: 383k]
  ------------------
 9249|      0|        if (fiber->ev_stream->read_fiber == fiber) {
  ------------------
  |  Branch (9249:13): [True: 0, False: 0]
  ------------------
 9250|      0|            fiber->ev_stream->read_fiber = NULL;
 9251|      0|        }
 9252|      0|        if (fiber->ev_stream->write_fiber == fiber) {
  ------------------
  |  Branch (9252:13): [True: 0, False: 0]
  ------------------
 9253|      0|            fiber->ev_stream->write_fiber = NULL;
 9254|      0|        }
 9255|      0|        fiber->ev_callback(fiber, JANET_ASYNC_EVENT_DEINIT);
 9256|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9257|      0|        fiber->ev_callback = NULL;
 9258|      0|        if (!(fiber->flags & JANET_FIBER_EV_FLAG_IN_FLIGHT)) {
  ------------------
  |  |  802|      0|#define JANET_FIBER_EV_FLAG_IN_FLIGHT 0x1
  ------------------
  |  Branch (9258:13): [True: 0, False: 0]
  ------------------
 9259|      0|            if (fiber->ev_state) {
  ------------------
  |  Branch (9259:17): [True: 0, False: 0]
  ------------------
 9260|      0|                janet_free(fiber->ev_state);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
 9261|       |                fiber->ev_state = NULL;
 9262|      0|            }
 9263|      0|            janet_ev_dec_refcount();
 9264|      0|        }
 9265|      0|    }
 9266|   383k|}
janet_fiber_did_resume:
 9297|   383k|void janet_fiber_did_resume(JanetFiber *fiber) {
 9298|   383k|    janet_async_end(fiber);
 9299|   383k|}
janet_stream_ext:
 9322|     22|JanetStream *janet_stream_ext(JanetHandle handle, uint32_t flags, const JanetMethod *methods, size_t size) {
 9323|     22|    janet_assert(size >= sizeof(JanetStream), "bad size");
  ------------------
  |  |  389|     22|#define janet_assert(c, m) do { \
  |  |  390|     22|    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: 22]
  |  |  ------------------
  |  |  391|     22|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 22]
  |  |  ------------------
  ------------------
 9324|     22|    JanetStream *stream = janet_abstract(&janet_stream_type, size);
 9325|     22|    stream->handle = handle;
 9326|     22|    stream->flags = flags;
 9327|     22|    stream->read_fiber = NULL;
 9328|     22|    stream->write_fiber = NULL;
 9329|     22|    if (methods == NULL) methods = ev_default_stream_methods;
  ------------------
  |  Branch (9329:9): [True: 16, False: 6]
  ------------------
 9330|     22|    stream->methods = methods;
 9331|     22|    stream->index = 0;
 9332|     22|    janet_register_stream(stream);
 9333|     22|    return stream;
 9334|     22|}
janet_stream:
 9336|     22|JanetStream *janet_stream(JanetHandle handle, uint32_t flags, const JanetMethod *methods) {
 9337|     22|    return janet_stream_ext(handle, flags, methods, sizeof(JanetStream));
 9338|     22|}
janet_schedule_signal:
 9511|    676|void janet_schedule_signal(JanetFiber *fiber, Janet value, JanetSignal sig) {
 9512|    676|    janet_schedule_general(fiber, value, sig, 0);
 9513|    676|}
janet_schedule:
 9526|    676|void janet_schedule(JanetFiber *fiber, Janet value) {
 9527|    676|    janet_schedule_signal(fiber, value, JANET_SIGNAL_OK);
 9528|    676|}
janet_ev_mark:
 9531|  1.11k|void janet_ev_mark(void) {
 9532|       |
 9533|       |    /* Pending tasks */
 9534|  1.11k|    JanetTask *tasks = janet_vm.spawn.data;
 9535|  1.11k|    if (janet_vm.spawn.head <= janet_vm.spawn.tail) {
  ------------------
  |  Branch (9535:9): [True: 1.11k, False: 0]
  ------------------
 9536|  1.11k|        for (int32_t i = janet_vm.spawn.head; i < janet_vm.spawn.tail; i++) {
  ------------------
  |  Branch (9536:47): [True: 0, False: 1.11k]
  ------------------
 9537|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9538|      0|            janet_mark(tasks[i].value);
 9539|      0|        }
 9540|  1.11k|    } else {
 9541|      0|        for (int32_t i = janet_vm.spawn.head; i < janet_vm.spawn.capacity; i++) {
  ------------------
  |  Branch (9541:47): [True: 0, False: 0]
  ------------------
 9542|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9543|      0|            janet_mark(tasks[i].value);
 9544|      0|        }
 9545|      0|        for (int32_t i = 0; i < janet_vm.spawn.tail; i++) {
  ------------------
  |  Branch (9545:29): [True: 0, False: 0]
  ------------------
 9546|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9547|      0|            janet_mark(tasks[i].value);
 9548|      0|        }
 9549|      0|    }
 9550|       |
 9551|       |    /* Pending timeouts */
 9552|  1.19k|    for (size_t i = 0; i < janet_vm.tq_count; i++) {
  ------------------
  |  Branch (9552:24): [True: 84, False: 1.11k]
  ------------------
 9553|     84|        janet_mark(janet_wrap_fiber(janet_vm.tq[i].fiber));
  ------------------
  |  |  844|     84|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|     84|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     84|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     84|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9554|     84|        if (janet_vm.tq[i].curr_fiber != NULL) {
  ------------------
  |  Branch (9554:13): [True: 0, False: 84]
  ------------------
 9555|      0|            janet_mark(janet_wrap_fiber(janet_vm.tq[i].curr_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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9556|      0|        }
 9557|     84|    }
 9558|  1.11k|}
janet_ev_init_common:
 9576|  7.64k|void janet_ev_init_common(void) {
 9577|  7.64k|    janet_q_init(&janet_vm.spawn);
 9578|  7.64k|    janet_vm.tq = NULL;
 9579|  7.64k|    janet_vm.tq_count = 0;
 9580|  7.64k|    janet_vm.tq_capacity = 0;
 9581|  7.64k|    janet_table_init_raw(&janet_vm.threaded_abstracts, 0);
 9582|  7.64k|    janet_table_init_raw(&janet_vm.active_tasks, 0);
 9583|  7.64k|    janet_table_init_raw(&janet_vm.signal_handlers, 0);
 9584|  7.64k|    janet_rng_seed(&janet_vm.ev_rng, 0);
 9585|  7.64k|#ifndef JANET_WINDOWS
 9586|  7.64k|    pthread_attr_init(&janet_vm.new_thread_attr);
 9587|       |    pthread_attr_setdetachstate(&janet_vm.new_thread_attr, PTHREAD_CREATE_DETACHED);
 9588|  7.64k|#endif
 9589|  7.64k|}
janet_ev_deinit_common:
 9622|  7.64k|void janet_ev_deinit_common(void) {
 9623|  7.64k|    JanetTimeout to;
 9624|  11.2k|    while (peek_timeout(&to)) {
  ------------------
  |  Branch (9624:12): [True: 3.61k, False: 7.64k]
  ------------------
 9625|  3.61k|        handle_timeout_worker(to, 1);
 9626|  3.61k|        pop_timeout(0);
 9627|  3.61k|    }
 9628|  7.64k|    janet_q_deinit(&janet_vm.spawn);
 9629|  7.64k|    janet_free(janet_vm.tq);
  ------------------
  |  | 2415|  7.64k|#define janet_free(X) free((X))
  ------------------
 9630|  7.64k|    janet_table_deinit(&janet_vm.threaded_abstracts);
 9631|  7.64k|    janet_table_deinit(&janet_vm.active_tasks);
 9632|  7.64k|    janet_table_deinit(&janet_vm.signal_handlers);
 9633|  7.64k|#ifndef JANET_WINDOWS
 9634|  7.64k|    pthread_attr_destroy(&janet_vm.new_thread_attr);
 9635|  7.64k|#endif
 9636|  7.64k|}
janet_await:
 9639|  1.42k|void janet_await(void) {
 9640|       |    /* Store the fiber in a global table */
 9641|  1.42k|    janet_signalv(JANET_SIGNAL_EVENT, janet_wrap_nil());
  ------------------
  |  |  831|  1.42k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.42k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.42k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.42k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9642|  1.42k|}
janet_ev_inc_refcount:
 9721|    523|void janet_ev_inc_refcount(void) {
 9722|    523|    janet_atomic_inc(&janet_vm.listener_count);
 9723|    523|}
janet_ev_dec_refcount:
 9725|     85|void janet_ev_dec_refcount(void) {
 9726|     85|    janet_atomic_dec(&janet_vm.listener_count);
 9727|     85|}
janet_channel_unwrap:
10119|     21|JanetChannel *janet_channel_unwrap(void *abstract) {
10120|     21|    return abstract;
10121|     21|}
janet_getchannel:
10123|     39|JanetChannel *janet_getchannel(const Janet *argv, int32_t n) {
10124|     39|    return janet_channel_unwrap(janet_getabstract(argv, n, &janet_channel_type));
10125|     39|}
cfun_channel_pop:
10176|     22|              "Read from a channel, suspending the current fiber if no value is available.") {
10177|     22|    janet_fixarity(argc, 1);
10178|     22|    JanetChannel *channel = janet_getchannel(argv, 0);
10179|     22|    Janet item;
10180|     22|    if (janet_vm.coerce_error) {
  ------------------
  |  Branch (10180:9): [True: 0, False: 22]
  ------------------
10181|      0|        janet_panic("cannot take from channel inside janet_call");
10182|      0|    }
10183|     22|    if (janet_channel_pop(channel, &item, 0)) {
  ------------------
  |  Branch (10183:9): [True: 0, False: 22]
  ------------------
10184|      0|        janet_schedule(janet_vm.root_fiber, item);
10185|      0|    }
10186|     22|    janet_await();
10187|     22|}
cfun_channel_choice:
10200|     17|              "closed.") {
10201|     17|    janet_arity(argc, 1, -1);
10202|     17|    int32_t len;
10203|     17|    const Janet *data;
10204|       |
10205|     17|    if (janet_vm.coerce_error) {
  ------------------
  |  Branch (10205:9): [True: 0, False: 17]
  ------------------
10206|      0|        janet_panic("cannot select from channel inside janet_call");
10207|      0|    }
10208|       |
10209|       |    /* Check channels for immediate reads and writes */
10210|     34|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (10210:25): [True: 17, False: 17]
  ------------------
10211|     17|        if (janet_indexed_view(argv[i], &data, &len) && len == 2) {
  ------------------
  |  Branch (10211:13): [True: 3, False: 14]
  |  Branch (10211:57): [True: 3, False: 0]
  ------------------
10212|       |            /* Write */
10213|      3|            JanetChannel *chan = janet_getchannel(data, 0);
10214|      3|            janet_chan_lock(chan);
10215|      3|            if (chan->closed) {
  ------------------
  |  Branch (10215:17): [True: 0, False: 3]
  ------------------
10216|      0|                janet_chan_unlock(chan);
10217|      0|                return make_close_result(chan);
10218|      0|            }
10219|      3|            if (janet_q_count(&chan->items) < chan->limit) {
  ------------------
  |  Branch (10219:17): [True: 0, False: 3]
  ------------------
10220|      0|                janet_channel_push_with_lock(chan, data[1], 1);
10221|      0|                return make_write_result(chan);
10222|      0|            }
10223|      3|            janet_chan_unlock(chan);
10224|     14|        } else {
10225|       |            /* Read */
10226|     14|            JanetChannel *chan = janet_getchannel(argv, i);
10227|     14|            janet_chan_lock(chan);
10228|     14|            if (chan->closed) {
  ------------------
  |  Branch (10228:17): [True: 0, False: 14]
  ------------------
10229|      0|                janet_chan_unlock(chan);
10230|      0|                return make_close_result(chan);
10231|      0|            }
10232|     14|            if (chan->items.head != chan->items.tail) {
  ------------------
  |  Branch (10232:17): [True: 0, False: 14]
  ------------------
10233|      0|                Janet item;
10234|      0|                janet_channel_pop_with_lock(chan, &item, 1);
10235|      0|                return make_read_result(chan, item);
10236|      0|            }
10237|     14|            janet_chan_unlock(chan);
10238|     14|        }
10239|     17|    }
10240|       |
10241|       |    /* Wait for all readers or writers */
10242|     17|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (10242:25): [True: 0, False: 17]
  ------------------
10243|      0|        if (janet_indexed_view(argv[i], &data, &len) && len == 2) {
  ------------------
  |  Branch (10243:13): [True: 0, False: 0]
  |  Branch (10243:57): [True: 0, False: 0]
  ------------------
10244|       |            /* Write */
10245|      0|            JanetChannel *chan = janet_getchannel(data, 0);
10246|      0|            janet_chan_lock(chan);
10247|      0|            janet_channel_push_with_lock(chan, data[1], 1);
10248|      0|        } else {
10249|       |            /* Read */
10250|      0|            Janet item;
10251|      0|            JanetChannel *chan = janet_getchannel(argv, i);
10252|      0|            janet_chan_lock(chan);
10253|      0|            janet_channel_pop_with_lock(chan, &item, 1);
10254|      0|        }
10255|      0|    }
10256|       |
10257|     17|    janet_await();
10258|     17|}
cfun_channel_capacity:
10273|      1|              "Get the number of items a channel will store before blocking writers.") {
10274|      1|    janet_fixarity(argc, 1);
10275|      1|    JanetChannel *channel = janet_getchannel(argv, 0);
10276|      1|    janet_chan_lock(channel);
10277|      1|    Janet ret = janet_wrap_integer(channel->limit);
  ------------------
  |  |  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)
  |  |  ------------------
  ------------------
10278|      1|    janet_chan_unlock(channel);
10279|      1|    return ret;
10280|      1|}
cfun_channel_rchoice:
10305|     16|              "Similar to ev/select, but will try clauses in a random order for fairness.") {
10306|     16|    fisher_yates_args(argc, argv);
10307|     16|    return cfun_channel_choice(argc, argv);
10308|     16|}
cfun_channel_new:
10313|  1.54k|              "blocking writers, defaults to 0 if not provided. Returns a new channel.") {
10314|  1.54k|    janet_arity(argc, 0, 1);
10315|  1.54k|    int32_t limit = janet_optnat(argv, argc, 0, 0);
10316|  1.54k|    JanetChannel *channel = janet_abstract(&janet_channel_type, sizeof(JanetChannel));
10317|  1.54k|    janet_chan_init(channel, limit, 0);
10318|  1.54k|    return janet_wrap_abstract(channel);
  ------------------
  |  |  851|  1.54k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  1.54k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.54k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.54k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10319|  1.54k|}
janet_loop_done:
10480|  1.00k|int janet_loop_done(void) {
10481|  1.00k|    return !((janet_vm.spawn.head != janet_vm.spawn.tail) ||
  ------------------
  |  Branch (10481:14): [True: 522, False: 481]
  ------------------
10482|    481|             janet_vm.tq_count ||
  ------------------
  |  Branch (10482:14): [True: 1, False: 480]
  ------------------
10483|    480|             janet_atomic_load(&janet_vm.listener_count));
  ------------------
  |  Branch (10483:14): [True: 0, False: 480]
  ------------------
10484|  1.00k|}
janet_loop1:
10486|    523|JanetFiber *janet_loop1(void) {
10487|       |    /* Schedule expired timers */
10488|    523|    JanetTimeout to;
10489|    523|    JanetTimestamp now = ts_now();
10490|    524|    while (peek_timeout(&to) && to.when <= now) {
  ------------------
  |  Branch (10490:12): [True: 1, False: 523]
  |  Branch (10490:33): [True: 1, False: 0]
  ------------------
10491|      1|        pop_timeout(0);
10492|      1|        if (to.curr_fiber != NULL) {
  ------------------
  |  Branch (10492:13): [True: 0, False: 1]
  ------------------
10493|      0|            if (janet_fiber_can_resume(to.curr_fiber)) {
  ------------------
  |  Branch (10493:17): [True: 0, False: 0]
  ------------------
10494|      0|                janet_cancel(to.fiber, janet_cstringv("deadline expired"));
  ------------------
  |  | 1825|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10495|      0|            }
10496|      1|        } else {
10497|       |            /* This is a timeout (for a function call, not a whole fiber) */
10498|      1|            if (to.fiber->sched_id == to.sched_id) {
  ------------------
  |  Branch (10498:17): [True: 1, False: 0]
  ------------------
10499|      1|                if (to.is_error) {
  ------------------
  |  Branch (10499:21): [True: 0, False: 1]
  ------------------
10500|      0|                    janet_cancel(to.fiber, janet_cstringv("timeout"));
  ------------------
  |  | 1825|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10501|      1|                } else {
10502|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10503|      1|                }
10504|      1|            }
10505|      1|        }
10506|      1|        handle_timeout_worker(to, 0);
10507|      1|    }
10508|       |
10509|       |    /* Run scheduled fibers unless interrupts need to be handled. */
10510|  1.04k|    while (janet_vm.spawn.head != janet_vm.spawn.tail) {
  ------------------
  |  Branch (10510:12): [True: 523, False: 523]
  ------------------
10511|       |        /* Don't run until all interrupts have been marked as handled by calling janet_interpreter_interrupt_handled */
10512|    523|        if (janet_atomic_load_relaxed(&janet_vm.auto_suspend)) break;
  ------------------
  |  Branch (10512:13): [True: 0, False: 523]
  ------------------
10513|    523|        JanetTask task = {NULL, janet_wrap_nil(), JANET_SIGNAL_OK, 0};
  ------------------
  |  |  831|    523|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    523|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    523|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    523|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10514|    523|        janet_q_pop(&janet_vm.spawn, &task, sizeof(task));
10515|    523|        if (task.fiber->gc.flags & JANET_FIBER_EV_GCFLAG_SUSPENDED) janet_ev_dec_refcount();
  ------------------
  |  |  798|    523|#define JANET_FIBER_EV_GCFLAG_SUSPENDED 0x2000000
  ------------------
  |  Branch (10515:13): [True: 43, False: 480]
  ------------------
10516|    523|        task.fiber->gc.flags &= ~(JANET_FIBER_EV_GCFLAG_CANCELED | JANET_FIBER_EV_GCFLAG_SUSPENDED);
  ------------------
  |  |  797|    523|#define JANET_FIBER_EV_GCFLAG_CANCELED 0x1000000
  ------------------
                      task.fiber->gc.flags &= ~(JANET_FIBER_EV_GCFLAG_CANCELED | JANET_FIBER_EV_GCFLAG_SUSPENDED);
  ------------------
  |  |  798|    523|#define JANET_FIBER_EV_GCFLAG_SUSPENDED 0x2000000
  ------------------
10517|    523|        if (task.expected_sched_id != task.fiber->sched_id) continue;
  ------------------
  |  Branch (10517:13): [True: 0, False: 523]
  ------------------
10518|    523|        Janet res;
10519|    523|        JanetSignal sig = janet_continue_signal(task.fiber, task.value, &res, task.sig);
10520|    523|        if (!janet_fiber_can_resume(task.fiber)) {
  ------------------
  |  Branch (10520:13): [True: 480, False: 43]
  ------------------
10521|    480|            janet_table_remove(&janet_vm.active_tasks, janet_wrap_fiber(task.fiber));
  ------------------
  |  |  844|    480|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|    480|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    480|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    480|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10522|    480|        }
10523|    523|        void *sv = task.fiber->supervisor_channel;
10524|    523|        int is_suspended = sig == JANET_SIGNAL_EVENT || sig == JANET_SIGNAL_YIELD || sig == JANET_SIGNAL_INTERRUPT;
  ------------------
  |  Branch (10524:28): [True: 43, False: 480]
  |  Branch (10524:57): [True: 0, False: 480]
  |  Branch (10524:86): [True: 0, False: 480]
  ------------------
10525|    523|        if (is_suspended) {
  ------------------
  |  Branch (10525:13): [True: 43, False: 480]
  ------------------
10526|     43|            task.fiber->gc.flags |= JANET_FIBER_EV_GCFLAG_SUSPENDED;
  ------------------
  |  |  798|     43|#define JANET_FIBER_EV_GCFLAG_SUSPENDED 0x2000000
  ------------------
10527|     43|            janet_ev_inc_refcount();
10528|     43|        }
10529|    523|        if (NULL == sv) {
  ------------------
  |  Branch (10529:13): [True: 523, False: 0]
  ------------------
10530|    523|            if (!is_suspended) {
  ------------------
  |  Branch (10530:17): [True: 480, False: 43]
  ------------------
10531|    480|                janet_stacktrace_ext(task.fiber, res, "");
10532|    480|            }
10533|    523|        } else if (sig == JANET_SIGNAL_OK || (task.fiber->flags & (1 << sig))) {
  ------------------
  |  Branch (10533:20): [True: 0, False: 0]
  |  Branch (10533:46): [True: 0, False: 0]
  ------------------
10534|      0|            JanetChannel *chan = janet_channel_unwrap(sv);
10535|      0|            janet_channel_push(chan, make_supervisor_event(janet_signal_names[sig],
10536|      0|                    task.fiber, chan->is_threaded), 2);
10537|      0|        } else if (!is_suspended) {
  ------------------
  |  Branch (10537:20): [True: 0, False: 0]
  ------------------
10538|      0|            janet_stacktrace_ext(task.fiber, res, "");
10539|      0|        }
10540|    523|        if (sig == JANET_SIGNAL_INTERRUPT) {
  ------------------
  |  Branch (10540:13): [True: 0, False: 523]
  ------------------
10541|      0|            return task.fiber;
10542|      0|        }
10543|    523|    }
10544|       |
10545|       |    /* Poll for events */
10546|    523|    if (janet_vm.tq_count || janet_atomic_load(&janet_vm.listener_count)) {
  ------------------
  |  Branch (10546:9): [True: 1, False: 522]
  |  Branch (10546:30): [True: 42, False: 480]
  ------------------
10547|     43|        JanetTimeout to;
10548|     43|        memset(&to, 0, sizeof(to));
10549|     43|        int has_timeout;
10550|       |        /* Drop timeouts that are no longer needed */
10551|     43|        while ((has_timeout = peek_timeout(&to))) {
  ------------------
  |  Branch (10551:16): [True: 1, False: 42]
  ------------------
10552|      1|            if (to.curr_fiber != NULL) {
  ------------------
  |  Branch (10552:17): [True: 0, False: 1]
  ------------------
10553|      0|                if (!janet_fiber_can_resume(to.curr_fiber)) {
  ------------------
  |  Branch (10553:21): [True: 0, False: 0]
  ------------------
10554|      0|                    pop_timeout(0);
10555|      0|                    janet_table_remove(&janet_vm.active_tasks, janet_wrap_fiber(to.curr_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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10556|      0|                    handle_timeout_worker(to, 1);
10557|      0|                    continue;
10558|      0|                }
10559|      1|            } else if (to.fiber->sched_id != to.sched_id) {
  ------------------
  |  Branch (10559:24): [True: 0, False: 1]
  ------------------
10560|      0|                pop_timeout(0);
10561|      0|                handle_timeout_worker(to, 1);
10562|      0|                continue;
10563|      0|            }
10564|      1|            break;
10565|      1|        }
10566|       |        /* Run polling implementation only if pending timeouts or pending events */
10567|     43|        if (janet_vm.tq_count || janet_atomic_load(&janet_vm.listener_count)) {
  ------------------
  |  Branch (10567:13): [True: 1, False: 42]
  |  Branch (10567:34): [True: 42, False: 0]
  ------------------
10568|     43|            janet_loop1_impl(has_timeout, to.when);
10569|     43|        }
10570|     43|    }
10571|       |
10572|       |    /* No fiber was interrupted */
10573|       |    return NULL;
10574|    523|}
janet_loop:
10587|    480|void janet_loop(void) {
10588|  1.00k|    while (!janet_loop_done()) {
  ------------------
  |  Branch (10588:12): [True: 523, False: 480]
  ------------------
10589|    523|        JanetFiber *interrupted_fiber = janet_loop1();
10590|    523|        if (NULL != interrupted_fiber) {
  ------------------
  |  Branch (10590:13): [True: 0, False: 523]
  ------------------
10591|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10592|      0|        }
10593|    523|    }
10594|    480|}
janet_loop1_impl:
10780|     43|void janet_loop1_impl(int has_timeout, JanetTimestamp timeout) {
10781|     43|    struct itimerspec its;
10782|     43|    if (janet_vm.timer_enabled || has_timeout) {
  ------------------
  |  Branch (10782:9): [True: 0, False: 43]
  |  Branch (10782:35): [True: 1, False: 42]
  ------------------
10783|      1|        memset(&its, 0, sizeof(its));
10784|      1|        if (has_timeout) {
  ------------------
  |  Branch (10784:13): [True: 1, False: 0]
  ------------------
10785|      1|            its.it_value.tv_sec = timeout / 1000;
10786|      1|            its.it_value.tv_nsec = (timeout % 1000) * 1000000;
10787|      1|        }
10788|      1|        timerfd_settime(janet_vm.timerfd, TFD_TIMER_ABSTIME, &its, NULL);
10789|      1|    }
10790|     43|    janet_vm.timer_enabled = has_timeout;
10791|       |
10792|       |    /* Poll for events */
10793|     43|    struct epoll_event events[JANET_EPOLL_MAX_EVENTS];
10794|     43|    int ready;
10795|     43|    do {
10796|     43|        ready = epoll_wait(janet_vm.epoll, events, JANET_EPOLL_MAX_EVENTS, -1);
  ------------------
  |  |10779|     43|#define JANET_EPOLL_MAX_EVENTS 64
  ------------------
10797|     43|    } while (ready == -1 && errno == EINTR);
  ------------------
  |  Branch (10797:14): [True: 0, False: 43]
  |  Branch (10797:29): [True: 0, False: 0]
  ------------------
10798|     43|    if (ready == -1) {
  ------------------
  |  Branch (10798:9): [True: 0, False: 43]
  ------------------
10799|      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]
  |  |  ------------------
  ------------------
10800|      0|    }
10801|       |
10802|       |    /* Step state machines */
10803|     86|    for (int i = 0; i < ready; i++) {
  ------------------
  |  Branch (10803:21): [True: 43, False: 43]
  ------------------
10804|     43|        void *p = events[i].data.ptr;
10805|     43|        if (&janet_vm.timerfd == p) {
  ------------------
  |  Branch (10805:13): [True: 1, False: 42]
  ------------------
10806|      1|            /* Timer expired, ignore */;
10807|     42|        } else if (janet_vm.selfpipe == p) {
  ------------------
  |  Branch (10807:20): [True: 42, False: 0]
  ------------------
10808|       |            /* Self-pipe handling */
10809|     42|            janet_ev_handle_selfpipe();
10810|     42|        } else {
10811|      0|            JanetStream *stream = p;
10812|      0|            int mask = events[i].events;
10813|      0|            int has_err = mask & EPOLLERR;
10814|      0|            int has_hup = mask & EPOLLHUP;
10815|      0|            JanetFiber *rf = stream->read_fiber;
10816|      0|            JanetFiber *wf = stream->write_fiber;
10817|      0|            if (rf) {
  ------------------
  |  Branch (10817:17): [True: 0, False: 0]
  ------------------
10818|      0|                if (rf->ev_callback && (mask & EPOLLIN)) {
  ------------------
  |  Branch (10818:21): [True: 0, False: 0]
  |  Branch (10818:40): [True: 0, False: 0]
  ------------------
10819|      0|                    rf->ev_callback(rf, JANET_ASYNC_EVENT_READ);
10820|      0|                }
10821|      0|                if (rf->ev_callback && has_err) {
  ------------------
  |  Branch (10821:21): [True: 0, False: 0]
  |  Branch (10821:40): [True: 0, False: 0]
  ------------------
10822|      0|                    rf->ev_callback(rf, JANET_ASYNC_EVENT_ERR);
10823|      0|                }
10824|      0|                if (rf->ev_callback && has_hup) {
  ------------------
  |  Branch (10824:21): [True: 0, False: 0]
  |  Branch (10824:40): [True: 0, False: 0]
  ------------------
10825|      0|                    rf->ev_callback(rf, JANET_ASYNC_EVENT_HUP);
10826|      0|                }
10827|      0|            }
10828|      0|            if (wf) {
  ------------------
  |  Branch (10828:17): [True: 0, False: 0]
  ------------------
10829|      0|                if (wf->ev_callback && (mask & EPOLLOUT)) {
  ------------------
  |  Branch (10829:21): [True: 0, False: 0]
  |  Branch (10829:40): [True: 0, False: 0]
  ------------------
10830|      0|                    wf->ev_callback(wf, JANET_ASYNC_EVENT_WRITE);
10831|      0|                }
10832|      0|                if (wf->ev_callback && has_err) {
  ------------------
  |  Branch (10832:21): [True: 0, False: 0]
  |  Branch (10832:40): [True: 0, False: 0]
  ------------------
10833|      0|                    wf->ev_callback(wf, JANET_ASYNC_EVENT_ERR);
10834|      0|                }
10835|      0|                if (wf->ev_callback && has_hup) {
  ------------------
  |  Branch (10835:21): [True: 0, False: 0]
  |  Branch (10835:40): [True: 0, False: 0]
  ------------------
10836|      0|                    wf->ev_callback(wf, JANET_ASYNC_EVENT_HUP);
10837|      0|                }
10838|      0|            }
10839|      0|            janet_stream_checktoclose(stream);
10840|      0|        }
10841|     43|    }
10842|     43|}
janet_ev_init:
10844|  7.64k|void janet_ev_init(void) {
10845|  7.64k|    janet_ev_init_common();
10846|  7.64k|    janet_ev_setup_selfpipe();
10847|  7.64k|    janet_vm.epoll = epoll_create1(EPOLL_CLOEXEC);
10848|  7.64k|    janet_vm.timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK);
10849|  7.64k|    janet_vm.timer_enabled = 0;
10850|  7.64k|    if (janet_vm.epoll == -1 || janet_vm.timerfd == -1) goto error;
  ------------------
  |  Branch (10850:9): [True: 0, False: 7.64k]
  |  Branch (10850:33): [True: 0, False: 7.64k]
  ------------------
10851|  7.64k|    struct epoll_event ev;
10852|  7.64k|    ev.events = EPOLLIN | EPOLLET;
10853|  7.64k|    ev.data.ptr = &janet_vm.timerfd;
10854|  7.64k|    if (-1 == epoll_ctl(janet_vm.epoll, EPOLL_CTL_ADD, janet_vm.timerfd, &ev)) goto error;
  ------------------
  |  Branch (10854:9): [True: 0, False: 7.64k]
  ------------------
10855|  7.64k|    ev.events = EPOLLIN | EPOLLET;
10856|  7.64k|    ev.data.ptr = janet_vm.selfpipe;
10857|  7.64k|    if (-1 == epoll_ctl(janet_vm.epoll, EPOLL_CTL_ADD, janet_vm.selfpipe[0], &ev)) goto error;
  ------------------
  |  Branch (10857:9): [True: 0, False: 7.64k]
  ------------------
10858|  7.64k|    return;
10859|  7.64k|error:
10860|       |    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]
  |  |  ------------------
  ------------------
10861|      0|}
janet_ev_deinit:
10863|  7.64k|void janet_ev_deinit(void) {
10864|  7.64k|    janet_ev_deinit_common();
10865|  7.64k|    close(janet_vm.epoll);
10866|  7.64k|    close(janet_vm.timerfd);
10867|  7.64k|    janet_ev_cleanup_selfpipe();
10868|  7.64k|    janet_vm.epoll = 0;
10869|  7.64k|}
janet_ev_threaded_call:
11315|    480|void janet_ev_threaded_call(JanetThreadedSubroutine fp, JanetEVGenericMessage arguments, JanetThreadedCallback cb) {
11316|    480|    JanetEVThreadInit *init = janet_malloc(sizeof(JanetEVThreadInit));
  ------------------
  |  | 2406|    480|#define janet_malloc(X) malloc((X))
  ------------------
11317|    480|    if (NULL == init) {
  ------------------
  |  Branch (11317:9): [True: 0, False: 480]
  ------------------
11318|      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]
  |  |  ------------------
  ------------------
11319|      0|    }
11320|    480|    init->msg = arguments;
11321|    480|    init->subr = fp;
11322|    480|    init->cb = cb;
11323|       |
11324|       |#ifdef JANET_WINDOWS
11325|       |    init->write_pipe = janet_vm.iocp;
11326|       |    HANDLE thread_handle = CreateThread(NULL, 0, janet_thread_body, init, 0, NULL);
11327|       |    if (NULL == thread_handle) {
11328|       |        janet_free(init);
11329|       |        janet_panic("failed to create thread");
11330|       |    }
11331|       |    CloseHandle(thread_handle); /* detach from thread */
11332|       |#else
11333|    480|    init->write_pipe = janet_vm.selfpipe[1];
11334|    480|    pthread_t waiter_thread;
11335|    480|    int err = pthread_create(&waiter_thread, &janet_vm.new_thread_attr, janet_thread_body, init);
11336|    480|    if (err) {
  ------------------
  |  Branch (11336:9): [True: 0, False: 480]
  ------------------
11337|      0|        janet_free(init);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
11338|      0|        janet_panicf("%s", janet_strerror(err));
11339|      0|    }
11340|    480|#endif
11341|       |
11342|       |    /* Increment ev refcount so we don't quit while waiting for a subprocess */
11343|    480|    janet_ev_inc_refcount();
11344|    480|}
janet_ev_default_threaded_callback:
11347|     42|void janet_ev_default_threaded_callback(JanetEVGenericMessage return_value) {
11348|     42|    if (return_value.fiber == NULL) {
  ------------------
  |  Branch (11348:9): [True: 0, False: 42]
  ------------------
11349|       |        /* Clean up */
11350|      0|        switch (return_value.tag) {
11351|      0|            default:
  ------------------
  |  Branch (11351:13): [True: 0, False: 0]
  ------------------
11352|      0|                break;
11353|      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 (11353:13): [True: 0, False: 0]
  ------------------
11354|      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 (11354:13): [True: 0, False: 0]
  ------------------
11355|      0|                janet_free(return_value.argp);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
11356|      0|                break;
11357|      0|        }
11358|      0|        return;
11359|      0|    }
11360|     42|    if (janet_fiber_can_resume(return_value.fiber)) {
  ------------------
  |  Branch (11360:9): [True: 42, False: 0]
  ------------------
11361|     42|        switch (return_value.tag) {
11362|      0|            default:
  ------------------
  |  Branch (11362:13): [True: 0, False: 42]
  ------------------
11363|      0|                break;
11364|     42|            case JANET_EV_TCTAG_NIL:
  ------------------
  |  | 1578|     42|#define JANET_EV_TCTAG_NIL 0          /* resume with nil */
  ------------------
  |  Branch (11364:13): [True: 42, False: 0]
  ------------------
11365|     42|                janet_schedule(return_value.fiber, 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11366|     42|                break;
11367|      0|            case JANET_EV_TCTAG_INTEGER:
  ------------------
  |  | 1579|      0|#define JANET_EV_TCTAG_INTEGER 1      /* resume with janet_wrap_integer(argi) */
  ------------------
  |  Branch (11367:13): [True: 0, False: 42]
  ------------------
11368|      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)
  |  |  ------------------
  ------------------
11369|      0|                break;
11370|      0|            case JANET_EV_TCTAG_STRING:
  ------------------
  |  | 1580|      0|#define JANET_EV_TCTAG_STRING 2       /* resume with janet_cstringv((const char *) argp) */
  ------------------
  |  Branch (11370:13): [True: 0, False: 42]
  ------------------
11371|      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 (11371:13): [True: 0, False: 42]
  ------------------
11372|      0|                janet_schedule(return_value.fiber, janet_cstringv((const char *) return_value.argp));
  ------------------
  |  | 1825|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11373|      0|                break;
11374|      0|            case JANET_EV_TCTAG_KEYWORD:
  ------------------
  |  | 1582|      0|#define JANET_EV_TCTAG_KEYWORD 4      /* resume with janet_ckeywordv((const char *) argp) */
  ------------------
  |  Branch (11374:13): [True: 0, False: 42]
  ------------------
11375|      0|                janet_schedule(return_value.fiber, janet_ckeywordv((const char *) return_value.argp));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11376|      0|                break;
11377|      0|            case JANET_EV_TCTAG_ERR_STRING:
  ------------------
  |  | 1583|      0|#define JANET_EV_TCTAG_ERR_STRING 5   /* cancel with janet_cstringv((const char *) argp) */
  ------------------
  |  Branch (11377:13): [True: 0, False: 42]
  ------------------
11378|      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 (11378:13): [True: 0, False: 42]
  ------------------
11379|      0|                janet_cancel(return_value.fiber, janet_cstringv((const char *) return_value.argp));
  ------------------
  |  | 1825|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11380|      0|                break;
11381|      0|            case JANET_EV_TCTAG_ERR_KEYWORD:
  ------------------
  |  | 1585|      0|#define JANET_EV_TCTAG_ERR_KEYWORD 7  /* cancel with janet_ckeywordv((const char *) argp) */
  ------------------
  |  Branch (11381:13): [True: 0, False: 42]
  ------------------
11382|      0|                janet_cancel(return_value.fiber, janet_ckeywordv((const char *) return_value.argp));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11383|      0|                break;
11384|      0|            case JANET_EV_TCTAG_BOOLEAN:
  ------------------
  |  | 1586|      0|#define JANET_EV_TCTAG_BOOLEAN 8      /* resume with janet_wrap_boolean(argi) */
  ------------------
  |  Branch (11384:13): [True: 0, False: 42]
  ------------------
11385|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11386|      0|                break;
11387|     42|        }
11388|     42|    }
11389|       |    /* Clean up */
11390|     42|    switch (return_value.tag) {
11391|     42|        default:
  ------------------
  |  Branch (11391:9): [True: 42, False: 0]
  ------------------
11392|     42|            break;
11393|     42|        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 (11393:9): [True: 0, False: 42]
  ------------------
11394|      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 (11394:9): [True: 0, False: 42]
  ------------------
11395|      0|            janet_free(return_value.argp);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
11396|      0|            break;
11397|     42|    }
11398|     42|    janet_gcunroot(janet_wrap_fiber(return_value.fiber));
  ------------------
  |  |  844|     42|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|     42|    janet_nanbox_from_pointer((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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11399|     42|}
janet_ev_threaded_await:
11403|    480|void janet_ev_threaded_await(JanetThreadedSubroutine fp, int tag, int argi, void *argp) {
11404|    480|    JanetEVGenericMessage arguments;
11405|    480|    memset(&arguments, 0, sizeof(arguments));
11406|    480|    arguments.tag = tag;
11407|    480|    arguments.argi = argi;
11408|    480|    arguments.argp = argp;
11409|    480|    arguments.fiber = janet_root_fiber();
11410|    480|    janet_gcroot(janet_wrap_fiber(arguments.fiber));
  ------------------
  |  |  844|    480|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|    480|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    480|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    480|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11411|    480|    janet_ev_threaded_call(fp, arguments, janet_ev_default_threaded_callback);
11412|    480|    janet_await();
11413|    480|}
janet_ev_lasterr:
11463|     29|Janet janet_ev_lasterr(void) {
11464|     29|    return janet_cstringv(janet_strerror(errno));
  ------------------
  |  | 1825|     29|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  848|     29|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|     29|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     29|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     29|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11465|     29|}
janet_make_pipe:
11966|  7.64k|int janet_make_pipe(JanetHandle handles[2], int mode) {
11967|       |#ifdef JANET_WINDOWS
11968|       |    /*
11969|       |     * On windows, the built in CreatePipe function doesn't support overlapped IO
11970|       |     * so we lift from the windows source code and modify for our own version.
11971|       |     */
11972|       |    JanetHandle shandle, chandle;
11973|       |    CHAR PipeNameBuffer[MAX_PATH];
11974|       |    SECURITY_ATTRIBUTES saAttr;
11975|       |    memset(&saAttr, 0, sizeof(saAttr));
11976|       |    saAttr.nLength = sizeof(saAttr);
11977|       |    saAttr.bInheritHandle = TRUE;
11978|       |    if (mode == 3) {
11979|       |        /* No overlapped IO involved, just call CreatePipe */
11980|       |        if (!CreatePipe(handles, handles + 1, &saAttr, 0)) return -1;
11981|       |        return 0;
11982|       |    }
11983|       |    snprintf(PipeNameBuffer,
11984|       |             sizeof(PipeNameBuffer),
11985|       |             "\\\\.\\Pipe\\JanetPipeFile.%08x.%08x",
11986|       |             (unsigned int) GetCurrentProcessId(),
11987|       |             (unsigned int) InterlockedIncrement(&PipeSerialNumber));
11988|       |
11989|       |    /* server handle goes to subprocess */
11990|       |    shandle = CreateNamedPipeA(
11991|       |                  PipeNameBuffer,
11992|       |                  (mode == 2 ? PIPE_ACCESS_INBOUND : PIPE_ACCESS_OUTBOUND) | FILE_FLAG_OVERLAPPED,
11993|       |                  PIPE_TYPE_BYTE | PIPE_WAIT,
11994|       |                  255,           /* Max number of pipes for duplication. */
11995|       |                  4096,          /* Out buffer size */
11996|       |                  4096,          /* In buffer size */
11997|       |                  120 * 1000,    /* Timeout in ms */
11998|       |                  &saAttr);
11999|       |    if (shandle == INVALID_HANDLE_VALUE) {
12000|       |        return -1;
12001|       |    }
12002|       |
12003|       |    /* we keep client handle */
12004|       |    chandle = CreateFileA(
12005|       |                  PipeNameBuffer,
12006|       |                  (mode == 2 ? GENERIC_WRITE : GENERIC_READ),
12007|       |                  0,
12008|       |                  &saAttr,
12009|       |                  OPEN_EXISTING,
12010|       |                  FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED,
12011|       |                  NULL);
12012|       |
12013|       |    if (chandle == INVALID_HANDLE_VALUE) {
12014|       |        CloseHandle(shandle);
12015|       |        return -1;
12016|       |    }
12017|       |    if (mode == 2) {
12018|       |        handles[0] = shandle;
12019|       |        handles[1] = chandle;
12020|       |    } else {
12021|       |        handles[0] = chandle;
12022|       |        handles[1] = shandle;
12023|       |    }
12024|       |    return 0;
12025|       |#else
12026|  7.64k|    if (pipe(handles)) return -1;
  ------------------
  |  Branch (12026:9): [True: 0, False: 7.64k]
  ------------------
12027|  7.64k|    if (mode != 2 && fcntl(handles[0], F_SETFD, FD_CLOEXEC)) goto error;
  ------------------
  |  Branch (12027:9): [True: 7.64k, False: 0]
  |  Branch (12027:22): [True: 0, False: 7.64k]
  ------------------
12028|  7.64k|    if (mode != 1 && fcntl(handles[1], F_SETFD, FD_CLOEXEC)) goto error;
  ------------------
  |  Branch (12028:9): [True: 5, False: 7.64k]
  |  Branch (12028:22): [True: 0, False: 5]
  ------------------
12029|  7.64k|    if (mode != 2 && mode != 3 && fcntl(handles[0], F_SETFL, O_NONBLOCK)) goto error;
  ------------------
  |  Branch (12029:9): [True: 7.64k, False: 0]
  |  Branch (12029:22): [True: 7.64k, False: 0]
  |  Branch (12029:35): [True: 0, False: 7.64k]
  ------------------
12030|  7.64k|    if (mode != 1 && mode != 3 && fcntl(handles[1], F_SETFL, O_NONBLOCK)) goto error;
  ------------------
  |  Branch (12030:9): [True: 5, False: 7.64k]
  |  Branch (12030:22): [True: 5, False: 0]
  |  Branch (12030:35): [True: 0, False: 5]
  ------------------
12031|  7.64k|    return 0;
12032|      0|error:
12033|      0|    close(handles[0]);
12034|      0|    close(handles[1]);
12035|      0|    return -1;
12036|  7.64k|#endif
12037|  7.64k|}
cfun_ev_go:
12050|    159|              "current supervisor.") {
12051|    159|    janet_arity(argc, 1, 3);
12052|    159|    Janet value = argc >= 2 ? argv[1] : 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 (12052:19): [True: 156, False: 3]
  ------------------
12053|    159|    void *supervisor = janet_optabstract(argv, argc, 2, &janet_channel_type, janet_vm.root_fiber->supervisor_channel);
12054|    159|    JanetFiber *fiber;
12055|    159|    if (janet_checktype(argv[0], JANET_FUNCTION)) {
  ------------------
  |  |  806|    159|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 154, False: 5]
  |  |  |  Branch (806:6): [Folded, False: 159]
  |  |  ------------------
  |  |  807|    159|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    159|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    159|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    159|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    159|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    159|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12056|       |        /* Create a fiber for the user */
12057|    154|        JanetFunction *func = janet_unwrap_function(argv[0]);
  ------------------
  |  |  868|    154|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
12058|    154|        if (func->def->min_arity > 1) {
  ------------------
  |  Branch (12058:13): [True: 1, False: 153]
  ------------------
12059|      1|            janet_panicf("task function must accept 0 or 1 arguments");
12060|      1|        }
12061|    153|        fiber = janet_fiber(func, 64, func->def->min_arity, &value);
12062|    153|        janet_assert(fiber != NULL, "bad fiber-func");
  ------------------
  |  |  389|    153|#define janet_assert(c, m) do { \
  |  |  390|    153|    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: 153]
  |  |  ------------------
  |  |  391|    153|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 153]
  |  |  ------------------
  ------------------
12063|    153|        fiber->flags |=
12064|    153|            JANET_FIBER_MASK_ERROR |
  ------------------
  |  |  767|    153|#define JANET_FIBER_MASK_ERROR 2
  ------------------
12065|    153|            JANET_FIBER_MASK_USER0 |
  ------------------
  |  |  771|    153|#define JANET_FIBER_MASK_USER0 (16 << 0)
  ------------------
12066|    153|            JANET_FIBER_MASK_USER1 |
  ------------------
  |  |  772|    153|#define JANET_FIBER_MASK_USER1 (16 << 1)
  ------------------
12067|    153|            JANET_FIBER_MASK_USER2 |
  ------------------
  |  |  773|    153|#define JANET_FIBER_MASK_USER2 (16 << 2)
  ------------------
12068|    153|            JANET_FIBER_MASK_USER3 |
  ------------------
  |  |  774|    153|#define JANET_FIBER_MASK_USER3 (16 << 3)
  ------------------
12069|    153|            JANET_FIBER_MASK_USER4;
  ------------------
  |  |  775|    153|#define JANET_FIBER_MASK_USER4 (16 << 4)
  ------------------
12070|    153|        if (!janet_vm.fiber->env) {
  ------------------
  |  Branch (12070:13): [True: 0, False: 153]
  ------------------
12071|      0|            janet_vm.fiber->env = janet_table(0);
12072|      0|        }
12073|    153|        fiber->env = janet_table(0);
12074|    153|        fiber->env->proto = janet_vm.fiber->env;
12075|    153|    } else {
12076|      5|        fiber = janet_getfiber(argv, 0);
12077|      5|        if (janet_fiber_status(fiber) != JANET_STATUS_NEW) {
  ------------------
  |  Branch (12077:13): [True: 0, False: 5]
  ------------------
12078|      0|            janet_panic("can only schedule new fibers where (= (fiber/status f) :new)");
12079|      0|        }
12080|      5|    }
12081|    158|    fiber->supervisor_channel = supervisor;
12082|    158|    janet_schedule(fiber, value);
12083|    158|    return janet_wrap_fiber(fiber);
  ------------------
  |  |  844|    158|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|    158|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    158|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    158|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12084|    159|}
cfun_ev_thread:
12215|    502|              "* `:c` - don't copy cfunction registry to new thread (performance optimization)") {
12216|    502|    janet_sandbox_assert(JANET_SANDBOX_THREADS);
  ------------------
  |  | 2042|    502|#define JANET_SANDBOX_THREADS 131072
  ------------------
12217|    502|    janet_arity(argc, 1, 4);
12218|    502|    Janet value = argc >= 2 ? argv[1] : janet_wrap_nil();
  ------------------
  |  |  831|    301|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    301|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    301|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    301|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (12218:19): [True: 201, False: 301]
  ------------------
12219|    502|    if (janet_checktype(argv[0], JANET_FUNCTION)) {
  ------------------
  |  |  806|    502|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 221, False: 281]
  |  |  |  Branch (806:6): [Folded, False: 502]
  |  |  ------------------
  |  |  807|    502|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    502|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    502|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    502|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    502|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    502|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12220|    221|        JanetFunction *func = janet_getfunction(argv, 0);
12221|    221|        if (func->def->arity < 0 || func->def->min_arity > 1) {
  ------------------
  |  Branch (12221:13): [True: 0, False: 221]
  |  Branch (12221:37): [True: 0, False: 221]
  ------------------
12222|      0|            janet_panic("function must take 0 or 1 arguments");
12223|      0|        }
12224|    281|    } else {
12225|    281|        janet_getfiber(argv, 0); /* arg check for fiber */
12226|    281|    }
12227|    502|    uint64_t flags = 0;
12228|    502|    if (argc >= 3) {
  ------------------
  |  Branch (12228:9): [True: 16, False: 486]
  ------------------
12229|     16|        flags = janet_getflags(argv, 2, "nact");
12230|     16|    }
12231|    502|    void *supervisor = janet_optabstract(argv, argc, 3, &janet_channel_type, janet_vm.root_fiber->supervisor_channel);
12232|    502|    if (NULL != supervisor) flags |= JANET_THREAD_SUPERVISOR_FLAG;
  ------------------
  |  |12086|      0|#define JANET_THREAD_SUPERVISOR_FLAG 0x100
  ------------------
  |  Branch (12232:9): [True: 0, False: 502]
  ------------------
12233|       |
12234|       |    /* Marshal arguments for the new thread. */
12235|    502|    JanetBuffer *buffer = janet_malloc(sizeof(JanetBuffer));
  ------------------
  |  | 2406|    502|#define janet_malloc(X) malloc((X))
  ------------------
12236|    502|    if (NULL == buffer) {
  ------------------
  |  Branch (12236:9): [True: 0, False: 502]
  ------------------
12237|      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]
  |  |  ------------------
  ------------------
12238|      0|    }
12239|    502|    janet_buffer_init(buffer, 0);
12240|    502|    if (!(flags & 0x2)) {
  ------------------
  |  Branch (12240:9): [True: 478, False: 24]
  ------------------
12241|    478|        janet_marshal(buffer, janet_wrap_table(janet_vm.abstract_registry), NULL, JANET_MARSHAL_UNSAFE);
  ------------------
  |  |  846|    478|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|    478|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    478|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    478|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      janet_marshal(buffer, janet_wrap_table(janet_vm.abstract_registry), NULL, JANET_MARSHAL_UNSAFE);
  ------------------
  |  | 1910|    478|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
12242|    478|    }
12243|    502|    if (flags & JANET_THREAD_SUPERVISOR_FLAG) {
  ------------------
  |  |12086|    502|#define JANET_THREAD_SUPERVISOR_FLAG 0x100
  ------------------
  |  Branch (12243:9): [True: 0, False: 502]
  ------------------
12244|      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);
  ------------------
  |  | 1910|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
12245|      0|    }
12246|    502|    if (!(flags & 0x4)) {
  ------------------
  |  Branch (12246:9): [True: 480, False: 22]
  ------------------
12247|    480|        janet_assert(janet_vm.registry_count <= INT32_MAX, "assert failed size check");
  ------------------
  |  |  389|    480|#define janet_assert(c, m) do { \
  |  |  390|    480|    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: 480]
  |  |  ------------------
  |  |  391|    480|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 480]
  |  |  ------------------
  ------------------
12248|    480|        uint32_t temp = (uint32_t) janet_vm.registry_count;
12249|    480|        janet_buffer_push_bytes(buffer, (uint8_t *) &temp, sizeof(temp));
12250|    480|        janet_buffer_push_bytes(buffer, (uint8_t *) janet_vm.registry, (int32_t) janet_vm.registry_count * sizeof(JanetCFunRegistry));
12251|    480|    }
12252|    502|    janet_marshal(buffer, argv[0], NULL, JANET_MARSHAL_UNSAFE);
  ------------------
  |  | 1910|    502|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
12253|    502|    janet_marshal(buffer, value, NULL, JANET_MARSHAL_UNSAFE);
  ------------------
  |  | 1910|    502|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
12254|    502|    if (flags & 0x1) {
  ------------------
  |  Branch (12254:9): [True: 0, False: 502]
  ------------------
12255|       |        /* Return immediately */
12256|      0|        JanetEVGenericMessage arguments;
12257|      0|        memset(&arguments, 0, sizeof(arguments));
12258|      0|        arguments.tag = (uint32_t) flags;
12259|      0|        arguments.argi = (uint32_t) janet_vm.sandbox_flags;
12260|      0|        arguments.argp = buffer;
12261|      0|        arguments.fiber = NULL;
12262|      0|        janet_ev_threaded_call(janet_go_thread_subr, arguments, janet_ev_default_threaded_callback);
12263|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12264|    502|    } else {
12265|    502|        janet_ev_threaded_await(janet_go_thread_subr, (uint32_t) flags, (uint32_t) janet_vm.sandbox_flags, buffer);
12266|    502|    }
12267|    502|}
janet_sleep_await:
12285|    923|JANET_NO_RETURN void janet_sleep_await(double sec) {
12286|    923|    JanetTimeout to;
12287|    923|    to.when = ts_delta(ts_now(), sec);
12288|    923|    to.fiber = janet_vm.root_fiber;
12289|    923|    to.is_error = 0;
12290|    923|    to.sched_id = to.fiber->sched_id;
12291|       |    to.curr_fiber = NULL;
12292|    923|    to.has_worker = 0;
12293|    923|    add_timeout(to);
12294|    923|    janet_await();
12295|    923|}
cfun_ev_sleep:
12299|    928|              "Suspend the current fiber for sec seconds without blocking the event loop.") {
12300|    928|    janet_fixarity(argc, 1);
12301|    928|    double sec = janet_getnumber(argv, 0);
12302|    928|    janet_sleep_await(sec);
12303|    928|}
cfun_ev_deadline:
12313|  2.69k|              "background thread to try to interrupt the VM if the timeout expires.") {
12314|  2.69k|    janet_arity(argc, 1, 4);
12315|  2.69k|    double sec = janet_getnumber(argv, 0);
12316|  2.69k|    sec = (sec < 0) ? 0 : sec;
  ------------------
  |  Branch (12316:11): [True: 2.69k, False: 4]
  ------------------
12317|  2.69k|    JanetFiber *tocancel = janet_optfiber(argv, argc, 1, janet_vm.root_fiber);
12318|  2.69k|    JanetFiber *tocheck = janet_optfiber(argv, argc, 2, janet_vm.fiber);
12319|  2.69k|    int use_interrupt = janet_optboolean(argv, argc, 3, 0);
12320|  2.69k|    JanetTimeout to;
12321|  2.69k|    to.when = ts_delta(ts_now(), sec);
12322|  2.69k|    to.fiber = tocancel;
12323|  2.69k|    to.curr_fiber = tocheck;
12324|  2.69k|    to.is_error = 0;
12325|  2.69k|    to.sched_id = to.fiber->sched_id;
12326|  2.69k|    if (use_interrupt) {
  ------------------
  |  Branch (12326:9): [True: 0, False: 2.69k]
  ------------------
12327|       |#ifdef JANET_ANDROID
12328|       |        janet_sandbox_assert(JANET_SANDBOX_SIGNAL);
12329|       |#endif
12330|      0|        JanetThreadedTimeout *tto = janet_malloc(sizeof(JanetThreadedTimeout));
  ------------------
  |  | 2406|      0|#define janet_malloc(X) malloc((X))
  ------------------
12331|      0|        if (NULL == tto) {
  ------------------
  |  Branch (12331:13): [True: 0, False: 0]
  ------------------
12332|      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]
  |  |  ------------------
  ------------------
12333|      0|        }
12334|      0|        tto->sec = sec;
12335|      0|        tto->vm = &janet_vm;
12336|      0|        tto->fiber = tocheck;
12337|       |#ifdef JANET_WINDOWS
12338|       |        HANDLE cancel_event = CreateEvent(NULL, TRUE, FALSE, NULL);
12339|       |        if (NULL == cancel_event) {
12340|       |            janet_free(tto);
12341|       |            janet_panic("failed to create cancel event");
12342|       |        }
12343|       |        tto->cancel_event = cancel_event;
12344|       |        HANDLE worker = CreateThread(NULL, 0, janet_timeout_body, tto, CREATE_SUSPENDED, NULL);
12345|       |        if (NULL == worker) {
12346|       |            janet_free(tto);
12347|       |            janet_panic("failed to create thread");
12348|       |        }
12349|       |#else
12350|      0|        pthread_t worker;
12351|      0|        int err = pthread_create(&worker, NULL, janet_timeout_body, tto);
12352|      0|        if (err) {
  ------------------
  |  Branch (12352:13): [True: 0, False: 0]
  ------------------
12353|      0|            janet_free(tto);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
12354|      0|            janet_panicf("%s", janet_strerror(err));
12355|      0|        }
12356|      0|#endif
12357|      0|        to.has_worker = 1;
12358|      0|        to.worker = worker;
12359|       |#ifdef JANET_WINDOWS
12360|       |        to.worker_event = cancel_event;
12361|       |        ResumeThread(worker);
12362|       |#endif
12363|  2.69k|    } else {
12364|  2.69k|        to.has_worker = 0;
12365|  2.69k|    }
12366|  2.69k|    add_timeout(to);
12367|  2.69k|    return janet_wrap_fiber(tocancel);
  ------------------
  |  |  844|  2.69k|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|  2.69k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.69k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.69k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12368|  2.69k|}
cfun_ev_cancel:
12373|      1|              "`cancel` in that it returns the canceled fiber immediately.") {
12374|      1|    janet_fixarity(argc, 2);
12375|      1|    JanetFiber *fiber = janet_getfiber(argv, 0);
12376|      1|    Janet err = argv[1];
12377|      1|    janet_cancel(fiber, err);
12378|      1|    return argv[0];
12379|      1|}
janet_cfun_stream_close:
12383|      7|              "Close a stream. This should be the same as calling (:close stream) for all streams.") {
12384|      7|    janet_fixarity(argc, 1);
12385|      7|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
12386|      7|    janet_stream_close(stream);
12387|      7|    return argv[0];
12388|      7|}
janet_cfun_stream_read:
12397|      5|              "error if there are problems with the IO operation.") {
12398|      5|    janet_arity(argc, 2, 4);
12399|      5|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
12400|      5|    janet_stream_flags(stream, JANET_STREAM_READABLE);
  ------------------
  |  |  625|      5|#define JANET_STREAM_READABLE 0x200
  ------------------
12401|      5|    JanetBuffer *buffer = janet_optbuffer(argv, argc, 2, 10);
12402|      5|    double to = janet_optnumber(argv, argc, 3, INFINITY);
12403|      5|    if (janet_keyeq(argv[1], "all")) {
  ------------------
  |  Branch (12403:9): [True: 0, False: 5]
  ------------------
12404|      0|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (12404:13): [True: 0, False: 0]
  ------------------
12405|      0|        janet_ev_readchunk(stream, buffer, INT32_MAX);
12406|      5|    } else {
12407|      5|        int32_t n = janet_getnat(argv, 1);
12408|      5|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (12408:13): [True: 0, False: 5]
  ------------------
12409|      5|        janet_ev_read(stream, buffer, n);
12410|      5|    }
12411|      5|}
janet_cfun_stream_write:
12431|      2|              "Returns nil, or raises an error if the write failed.") {
12432|      2|    janet_arity(argc, 2, 3);
12433|      2|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
12434|      2|    janet_stream_flags(stream, JANET_STREAM_WRITABLE);
  ------------------
  |  |  626|      2|#define JANET_STREAM_WRITABLE 0x400
  ------------------
12435|      2|    double to = janet_optnumber(argv, argc, 2, INFINITY);
12436|      2|    if (janet_checktype(argv[1], 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12437|      0|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (12437:13): [True: 0, False: 0]
  ------------------
12438|      0|        janet_ev_write_buffer(stream, janet_getbuffer(argv, 1));
12439|      2|    } else {
12440|      2|        JanetByteView bytes = janet_getbytes(argv, 1);
12441|      2|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (12441:13): [True: 0, False: 2]
  ------------------
12442|      2|        janet_ev_write_string(stream, bytes.bytes);
12443|      2|    }
12444|      2|}
janet_cfun_mutex:
12460|     12|              "Create a new lock to coordinate threads.") {
12461|     12|    janet_fixarity(argc, 0);
12462|     12|    (void) argv;
12463|     12|    void *mutex = janet_abstract_threaded(&janet_mutex_type, janet_os_mutex_size());
12464|     12|    janet_os_mutex_init(mutex);
12465|     12|    return janet_wrap_abstract(mutex);
  ------------------
  |  |  851|     12|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|     12|    janet_nanbox_from_pointer((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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12466|     12|}
janet_cfun_mutex_acquire:
12472|      2|              "on this system thread.") {
12473|      2|    janet_fixarity(argc, 1);
12474|      2|    void *mutex = janet_getabstract(argv, 0, &janet_mutex_type);
12475|      2|    janet_os_mutex_lock(mutex);
12476|      2|    return argv[0];
12477|      2|}
janet_cfun_mutex_release:
12481|      2|              "Release a lock such that other threads may acquire it.") {
12482|      2|    janet_fixarity(argc, 1);
12483|      2|    void *mutex = janet_getabstract(argv, 0, &janet_mutex_type);
12484|      2|    janet_os_mutex_unlock(mutex);
12485|      2|    return argv[0];
12486|      2|}
janet_cfun_rwlock:
12502|     23|              "Create a new read-write lock to coordinate threads.") {
12503|     23|    janet_fixarity(argc, 0);
12504|     23|    (void) argv;
12505|     23|    void *rwlock = janet_abstract_threaded(&janet_rwlock_type, janet_os_rwlock_size());
12506|     23|    janet_os_rwlock_init(rwlock);
12507|     23|    return janet_wrap_abstract(rwlock);
  ------------------
  |  |  851|     23|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|     23|    janet_nanbox_from_pointer((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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12508|     23|}
janet_cfun_rwlock_write_lock:
12521|      1|              "Acquire a write lock on a read-write lock.") {
12522|      1|    janet_fixarity(argc, 1);
12523|      1|    void *rwlock = janet_getabstract(argv, 0, &janet_rwlock_type);
12524|      1|    janet_os_rwlock_wlock(rwlock);
12525|      1|    return argv[0];
12526|      1|}
janet_cfun_rwlock_read_release:
12530|      1|              "Release a read lock on a read-write lock") {
12531|      1|    janet_fixarity(argc, 1);
12532|      1|    void *rwlock = janet_getabstract(argv, 0, &janet_rwlock_type);
12533|      1|    janet_os_rwlock_runlock(rwlock);
12534|      1|    return argv[0];
12535|      1|}
janet_cfun_rwlock_write_release:
12539|      2|              "Release a write lock on a read-write lock") {
12540|      2|    janet_fixarity(argc, 1);
12541|      2|    void *rwlock = janet_getabstract(argv, 0, &janet_rwlock_type);
12542|      2|    janet_os_rwlock_wunlock(rwlock);
12543|      2|    return argv[0];
12544|      2|}
janet_lib_ev:
12619|  7.16k|void janet_lib_ev(JanetTable *env) {
12620|  7.16k|    JanetRegExt ev_cfuns_ext[] = {
12621|  7.16k|        JANET_CORE_REG("ev/give", cfun_channel_push),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12622|  7.16k|        JANET_CORE_REG("ev/take", cfun_channel_pop),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12623|  7.16k|        JANET_CORE_REG("ev/full", cfun_channel_full),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12624|  7.16k|        JANET_CORE_REG("ev/capacity", cfun_channel_capacity),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12625|  7.16k|        JANET_CORE_REG("ev/count", cfun_channel_count),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12626|  7.16k|        JANET_CORE_REG("ev/select", cfun_channel_choice),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12627|  7.16k|        JANET_CORE_REG("ev/rselect", cfun_channel_rchoice),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12628|  7.16k|        JANET_CORE_REG("ev/chan", cfun_channel_new),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12629|  7.16k|        JANET_CORE_REG("ev/thread-chan", cfun_channel_new_threaded),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12630|  7.16k|        JANET_CORE_REG("ev/chan-close", cfun_channel_close),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12631|  7.16k|        JANET_CORE_REG("ev/go", cfun_ev_go),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12632|  7.16k|        JANET_CORE_REG("ev/thread", cfun_ev_thread),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12633|  7.16k|        JANET_CORE_REG("ev/give-supervisor", cfun_ev_give_supervisor),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12634|  7.16k|        JANET_CORE_REG("ev/sleep", cfun_ev_sleep),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12635|  7.16k|        JANET_CORE_REG("ev/deadline", cfun_ev_deadline),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12636|  7.16k|        JANET_CORE_REG("ev/cancel", cfun_ev_cancel),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12637|  7.16k|        JANET_CORE_REG("ev/close", janet_cfun_stream_close),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12638|  7.16k|        JANET_CORE_REG("ev/read", janet_cfun_stream_read),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12639|  7.16k|        JANET_CORE_REG("ev/chunk", janet_cfun_stream_chunk),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12640|  7.16k|        JANET_CORE_REG("ev/write", janet_cfun_stream_write),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12641|  7.16k|        JANET_CORE_REG("ev/lock", janet_cfun_mutex),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12642|  7.16k|        JANET_CORE_REG("ev/acquire-lock", janet_cfun_mutex_acquire),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12643|  7.16k|        JANET_CORE_REG("ev/release-lock", janet_cfun_mutex_release),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12644|  7.16k|        JANET_CORE_REG("ev/rwlock", janet_cfun_rwlock),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12645|  7.16k|        JANET_CORE_REG("ev/acquire-rlock", janet_cfun_rwlock_read_lock),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12646|  7.16k|        JANET_CORE_REG("ev/acquire-wlock", janet_cfun_rwlock_write_lock),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12647|  7.16k|        JANET_CORE_REG("ev/release-rlock", janet_cfun_rwlock_read_release),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12648|  7.16k|        JANET_CORE_REG("ev/release-wlock", janet_cfun_rwlock_write_release),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12649|  7.16k|        JANET_CORE_REG("ev/to-file", janet_cfun_to_file),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12650|  7.16k|        JANET_CORE_REG("ev/all-tasks", janet_cfun_ev_all_tasks),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12651|  7.16k|        JANET_REG_END
  ------------------
  |  | 2109|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
12652|  7.16k|    };
12653|       |
12654|       |    janet_core_cfuns_ext(env, NULL, ev_cfuns_ext);
12655|  7.16k|    janet_register_abstract_type(&janet_stream_type);
12656|  7.16k|    janet_register_abstract_type(&janet_channel_type);
12657|  7.16k|    janet_register_abstract_type(&janet_mutex_type);
12658|  7.16k|    janet_register_abstract_type(&janet_rwlock_type);
12659|  7.16k|}
cfun_ffi_struct:
13137|    119|              "Create a struct type definition that can be used to pass structs into native functions. ") {
13138|    119|    janet_arity(argc, 1, -1);
13139|    119|    return janet_wrap_abstract(build_struct_type(argc, argv));
  ------------------
  |  |  851|    119|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|    119|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    119|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    119|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13140|    119|}
cfun_ffi_align:
13152|      1|              "Get the align of an ffi type in bytes.") {
13153|      1|    janet_fixarity(argc, 1);
13154|      1|    size_t size = type_align(decode_ffi_type(argv[0]));
13155|      1|    return janet_wrap_number((double) size);
  ------------------
  |  |  835|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
13156|      1|}
cfun_ffi_call:
14337|      4|              "how Janet values in `args` are converted to native machine types.") {
14338|      4|    janet_sandbox_assert(JANET_SANDBOX_FFI_USE);
  ------------------
  |  | 2033|      4|#define JANET_SANDBOX_FFI_USE 2048
  ------------------
14339|      4|    janet_arity(argc, 2, -1);
14340|      4|    void *function_pointer = janet_ffi_get_callable_pointer(argv, 0);
14341|      4|    JanetFFISignature *signature = janet_getabstract(argv, 1, &janet_signature_type);
14342|      4|    janet_fixarity(argc - 2, signature->arg_count);
14343|      4|    switch (signature->cc) {
14344|      0|        default:
  ------------------
  |  Branch (14344:9): [True: 0, False: 4]
  ------------------
14345|      0|        case JANET_FFI_CC_NONE:
  ------------------
  |  Branch (14345:9): [True: 0, False: 4]
  ------------------
14346|      0|            (void) function_pointer;
14347|      0|            janet_panic("calling convention not supported");
14348|       |#ifdef JANET_FFI_WIN64_ENABLED
14349|       |        case JANET_FFI_CC_WIN_64:
14350|       |            return janet_ffi_win64(signature, function_pointer, argv);
14351|       |#endif
14352|      0|#ifdef JANET_FFI_SYSV64_ENABLED
14353|      0|        case JANET_FFI_CC_SYSV_64:
  ------------------
  |  Branch (14353:9): [True: 0, False: 4]
  ------------------
14354|      0|            return janet_ffi_sysv64(signature, function_pointer, argv);
14355|      4|#endif
14356|       |#ifdef JANET_FFI_AAPCS64_ENABLED
14357|       |        case JANET_FFI_CC_AAPCS64:
14358|       |            return janet_ffi_aapcs64(signature, function_pointer, argv);
14359|       |#endif
14360|      4|    }
14361|      4|}
cfun_ffi_buffer_read:
14390|      2|              "this is unsafe.") {
14391|      2|    janet_sandbox_assert(JANET_SANDBOX_FFI_USE);
  ------------------
  |  | 2033|      2|#define JANET_SANDBOX_FFI_USE 2048
  ------------------
14392|      2|    janet_arity(argc, 2, 3);
14393|      2|    JanetFFIType type = decode_ffi_type(argv[0]);
14394|      2|    size_t offset = (size_t) janet_optnat(argv, argc, 2, 0);
14395|      2|    if (janet_checktype(argv[1], JANET_POINTER)) {
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14396|      0|        uint8_t *ptr = janet_unwrap_pointer(argv[1]);
  ------------------
  |  |  867|      0|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
14397|      0|        return janet_ffi_read_one(ptr + offset, type, JANET_FFI_MAX_RECUR);
  ------------------
  |  |12714|      0|#define JANET_FFI_MAX_RECUR 64
  ------------------
14398|      2|    } else {
14399|      2|        size_t el_size = type_size(type);
14400|      2|        JanetByteView bytes = janet_getbytes(argv, 1);
14401|      2|        if ((size_t) bytes.len < offset + el_size) janet_panic("read out of range");
  ------------------
  |  Branch (14401:13): [True: 0, False: 2]
  ------------------
14402|      2|        return janet_ffi_read_one(bytes.bytes + offset, type, JANET_FFI_MAX_RECUR);
  ------------------
  |  |12714|      2|#define JANET_FFI_MAX_RECUR 64
  ------------------
14403|      2|    }
14404|      2|}
cfun_ffi_get_callback_trampoline:
14413|      5|              "be further inspected with `ffi/read`.") {
14414|      5|    janet_arity(argc, 0, 1);
14415|      5|    JanetFFICallingConvention cc = JANET_FFI_CC_DEFAULT;
  ------------------
  |  |12840|      5|#define JANET_FFI_CC_DEFAULT JANET_FFI_CC_SYSV_64
  ------------------
14416|      5|    if (argc >= 1) cc = decode_ffi_cc(janet_getkeyword(argv, 0));
  ------------------
  |  Branch (14416:9): [True: 3, False: 2]
  ------------------
14417|      5|    switch (cc) {
14418|      0|        default:
  ------------------
  |  Branch (14418:9): [True: 0, False: 5]
  ------------------
14419|      0|        case JANET_FFI_CC_NONE:
  ------------------
  |  Branch (14419:9): [True: 0, False: 5]
  ------------------
14420|      0|            janet_panic("calling convention not supported");
14421|       |#ifdef JANET_FFI_WIN64_ENABLED
14422|       |        case JANET_FFI_CC_WIN_64:
14423|       |            return janet_wrap_pointer(janet_ffi_win64_standard_callback);
14424|       |#endif
14425|      0|#ifdef JANET_FFI_SYSV64_ENABLED
14426|      1|        case JANET_FFI_CC_SYSV_64:
  ------------------
  |  Branch (14426:9): [True: 1, False: 4]
  ------------------
14427|      1|            return janet_wrap_pointer(janet_ffi_sysv64_standard_callback);
  ------------------
  |  |  854|      1|#define janet_wrap_pointer(s) janet_nanbox_wrap_((s), JANET_POINTER)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14428|      5|#endif
14429|       |#ifdef JANET_FFI_AAPCS64_ENABLED
14430|       |        case JANET_FFI_CC_AAPCS64:
14431|       |            return janet_wrap_pointer(janet_ffi_aapcs64_standard_callback);
14432|       |#endif
14433|      5|    }
14434|      5|}
cfun_ffi_pointer_buffer:
14509|      3|              "unsafe and can potentially allow out of bounds memory access. Returns a new buffer.") {
14510|      3|    janet_sandbox_assert(JANET_SANDBOX_FFI_USE);
  ------------------
  |  | 2033|      3|#define JANET_SANDBOX_FFI_USE 2048
  ------------------
14511|      3|    janet_arity(argc, 2, 4);
14512|      3|    void *pointer = janet_getpointer(argv, 0);
14513|      3|    int32_t capacity = janet_getnat(argv, 1);
14514|      3|    int32_t count = janet_optnat(argv, argc, 2, 0);
14515|      3|    int64_t offset = janet_optinteger64(argv, argc, 3, 0);
14516|      3|    uint8_t *offset_pointer = ((uint8_t *) pointer) + offset;
14517|      3|    return janet_wrap_buffer(janet_pointer_buffer_unsafe(offset_pointer, capacity, count));
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14518|      3|}
cfun_ffi_pointer_cfunction:
14523|      7|              "source location for stack traces and debugging.") {
14524|      7|    janet_sandbox_assert(JANET_SANDBOX_FFI_USE);
  ------------------
  |  | 2033|      7|#define JANET_SANDBOX_FFI_USE 2048
  ------------------
14525|      7|    janet_arity(argc, 1, 4);
14526|      7|    void *pointer = janet_getpointer(argv, 0);
14527|      7|    const char *name = janet_optcstring(argv, argc, 1, NULL);
14528|      7|    const char *source = janet_optcstring(argv, argc, 2, NULL);
14529|      7|    int32_t line = janet_optinteger(argv, argc, 3, -1);
14530|      7|    if ((name != NULL) || (source != NULL) || (line != -1)) {
  ------------------
  |  Branch (14530:9): [True: 7, False: 0]
  |  Branch (14530:27): [True: 0, False: 0]
  |  Branch (14530:47): [True: 0, False: 0]
  ------------------
14531|      0|        janet_registry_put((JanetCFunction) pointer, name, NULL, source, line);
14532|      0|    }
14533|      7|    return janet_wrap_cfunction((JanetCFunction) pointer);
  ------------------
  |  |  853|      7|#define janet_wrap_cfunction(s) janet_nanbox_wrap_((s), JANET_CFUNCTION)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14534|      7|}
cfun_ffi_supported_calling_conventions:
14542|      4|              "convention which is a placeholder that cannot be used at runtime.") {
14543|      4|    janet_fixarity(argc, 0);
14544|      4|    (void) argv;
14545|      4|    JanetArray *array = janet_array(4);
14546|       |#ifdef JANET_FFI_WIN64_ENABLED
14547|       |    janet_array_push(array, janet_ckeywordv("win64"));
14548|       |#endif
14549|      4|#ifdef JANET_FFI_SYSV64_ENABLED
14550|      4|    janet_array_push(array, janet_ckeywordv("sysv64"));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14551|      4|#endif
14552|       |#ifdef JANET_FFI_AAPCS64_ENABLED
14553|       |    janet_array_push(array, janet_ckeywordv("aapcs64"));
14554|       |#endif
14555|      4|    janet_array_push(array, janet_ckeywordv("none"));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14556|      4|    return janet_wrap_array(array);
  ------------------
  |  |  845|      4|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14557|      4|}
janet_lib_ffi:
14559|  7.16k|void janet_lib_ffi(JanetTable *env) {
14560|  7.16k|    JanetRegExt ffi_cfuns[] = {
14561|  7.16k|        JANET_CORE_REG("ffi/native", janet_core_raw_native),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14562|  7.16k|        JANET_CORE_REG("ffi/lookup", janet_core_native_lookup),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14563|  7.16k|        JANET_CORE_REG("ffi/close", janet_core_native_close),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14564|  7.16k|        JANET_CORE_REG("ffi/signature", cfun_ffi_signature),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14565|  7.16k|        JANET_CORE_REG("ffi/call", cfun_ffi_call),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14566|  7.16k|        JANET_CORE_REG("ffi/struct", cfun_ffi_struct),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14567|  7.16k|        JANET_CORE_REG("ffi/write", cfun_ffi_buffer_write),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14568|  7.16k|        JANET_CORE_REG("ffi/read", cfun_ffi_buffer_read),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14569|  7.16k|        JANET_CORE_REG("ffi/size", cfun_ffi_size),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14570|  7.16k|        JANET_CORE_REG("ffi/align", cfun_ffi_align),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14571|  7.16k|        JANET_CORE_REG("ffi/trampoline", cfun_ffi_get_callback_trampoline),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14572|  7.16k|        JANET_CORE_REG("ffi/jitfn", cfun_ffi_jitfn),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14573|  7.16k|        JANET_CORE_REG("ffi/malloc", cfun_ffi_malloc),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14574|  7.16k|        JANET_CORE_REG("ffi/free", cfun_ffi_free),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14575|  7.16k|        JANET_CORE_REG("ffi/pointer-buffer", cfun_ffi_pointer_buffer),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14576|  7.16k|        JANET_CORE_REG("ffi/pointer-cfunction", cfun_ffi_pointer_cfunction),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14577|  7.16k|        JANET_CORE_REG("ffi/calling-conventions", cfun_ffi_supported_calling_conventions),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14578|  7.16k|        JANET_REG_END
  ------------------
  |  | 2109|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
14579|  7.16k|    };
14580|       |    janet_core_cfuns_ext(env, NULL, ffi_cfuns);
14581|  7.16k|}
janet_fiber_reset:
14656|   384k|JanetFiber *janet_fiber_reset(JanetFiber *fiber, JanetFunction *callee, int32_t argc, const Janet *argv) {
14657|   384k|    int32_t newstacktop;
14658|   384k|    fiber_reset(fiber);
14659|   384k|    if (argc) {
  ------------------
  |  Branch (14659:9): [True: 147k, False: 236k]
  ------------------
14660|   147k|        newstacktop = fiber->stacktop + argc;
14661|   147k|        if (newstacktop >= fiber->capacity) {
  ------------------
  |  Branch (14661:13): [True: 454, False: 146k]
  ------------------
14662|    454|            janet_fiber_setcapacity(fiber, 2 * newstacktop);
14663|    454|        }
14664|   147k|        if (argv) {
  ------------------
  |  Branch (14664:13): [True: 147k, False: 1]
  ------------------
14665|   147k|            memcpy(fiber->data + fiber->stacktop, argv, argc * sizeof(Janet));
14666|   147k|        } else {
14667|       |            /* If argv not given, fill with nil */
14668|      2|            for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (14668:33): [True: 1, False: 1]
  ------------------
14669|      1|                fiber->data[fiber->stacktop + i] = 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14670|      1|            }
14671|      1|        }
14672|   147k|        fiber->stacktop = newstacktop;
14673|   147k|    }
14674|       |    /* Don't panic on failure since we use this to implement janet_pcall */
14675|   384k|    if (janet_fiber_funcframe(fiber, callee)) return NULL;
  ------------------
  |  Branch (14675:9): [True: 6, False: 384k]
  ------------------
14676|   384k|    janet_fiber_frame(fiber)->flags |= JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  |  810|   384k|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  809|   384k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|   384k|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_fiber_frame(fiber)->flags |= JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  | 1013|   384k|#define JANET_STACKFRAME_ENTRANCE 2
  ------------------
14677|   384k|#ifdef JANET_EV
14678|       |    fiber->supervisor_channel = NULL;
14679|   384k|#endif
14680|   384k|    return fiber;
14681|   384k|}
janet_fiber:
14684|   384k|JanetFiber *janet_fiber(JanetFunction *callee, int32_t capacity, int32_t argc, const Janet *argv) {
14685|   384k|    return janet_fiber_reset(fiber_alloc(capacity), callee, argc, argv);
14686|   384k|}
janet_fiber_setcapacity:
14705|   345k|void janet_fiber_setcapacity(JanetFiber *fiber, int32_t n) {
14706|   345k|    int32_t old_size = fiber->capacity;
14707|   345k|    int32_t diff = n - old_size;
14708|   345k|    Janet *newData = janet_realloc(fiber->data, sizeof(Janet) * n);
  ------------------
  |  | 2409|   345k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
14709|   345k|    if (NULL == newData) {
  ------------------
  |  Branch (14709:9): [True: 0, False: 345k]
  ------------------
14710|      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]
  |  |  ------------------
  ------------------
14711|      0|    }
14712|   345k|    fiber->data = newData;
14713|   345k|    fiber->capacity = n;
14714|   345k|    janet_vm.next_collection += sizeof(Janet) * diff;
14715|   345k|}
janet_fiber_push:
14724|   228M|void janet_fiber_push(JanetFiber *fiber, Janet x) {
14725|   228M|    if (fiber->stacktop == INT32_MAX) janet_panic("stack overflow");
  ------------------
  |  Branch (14725:9): [True: 0, False: 228M]
  ------------------
14726|   228M|    if (fiber->stacktop >= fiber->capacity) {
  ------------------
  |  Branch (14726:9): [True: 6.28k, False: 228M]
  ------------------
14727|  6.28k|        janet_fiber_grow(fiber, fiber->stacktop);
14728|  6.28k|    }
14729|   228M|    fiber->data[fiber->stacktop++] = x;
14730|   228M|}
janet_fiber_push2:
14733|  99.9M|void janet_fiber_push2(JanetFiber *fiber, Janet x, Janet y) {
14734|  99.9M|    if (fiber->stacktop >= INT32_MAX - 1) janet_panic("stack overflow");
  ------------------
  |  Branch (14734:9): [True: 0, False: 99.9M]
  ------------------
14735|  99.9M|    int32_t newtop = fiber->stacktop + 2;
14736|  99.9M|    if (newtop > fiber->capacity) {
  ------------------
  |  Branch (14736:9): [True: 108, False: 99.9M]
  ------------------
14737|    108|        janet_fiber_grow(fiber, newtop);
14738|    108|    }
14739|  99.9M|    fiber->data[fiber->stacktop] = x;
14740|  99.9M|    fiber->data[fiber->stacktop + 1] = y;
14741|  99.9M|    fiber->stacktop = newtop;
14742|  99.9M|}
janet_fiber_push3:
14745|  70.4M|void janet_fiber_push3(JanetFiber *fiber, Janet x, Janet y, Janet z) {
14746|  70.4M|    if (fiber->stacktop >= INT32_MAX - 2) janet_panic("stack overflow");
  ------------------
  |  Branch (14746:9): [True: 0, False: 70.4M]
  ------------------
14747|  70.4M|    int32_t newtop = fiber->stacktop + 3;
14748|  70.4M|    if (newtop > fiber->capacity) {
  ------------------
  |  Branch (14748:9): [True: 555, False: 70.4M]
  ------------------
14749|    555|        janet_fiber_grow(fiber, newtop);
14750|    555|    }
14751|  70.4M|    fiber->data[fiber->stacktop] = x;
14752|  70.4M|    fiber->data[fiber->stacktop + 1] = y;
14753|  70.4M|    fiber->data[fiber->stacktop + 2] = z;
14754|  70.4M|    fiber->stacktop = newtop;
14755|  70.4M|}
janet_fiber_pushn:
14758|  20.2M|void janet_fiber_pushn(JanetFiber *fiber, const Janet *arr, int32_t n) {
14759|  20.2M|    if (fiber->stacktop > INT32_MAX - n) janet_panic("stack overflow");
  ------------------
  |  Branch (14759:9): [True: 0, False: 20.2M]
  ------------------
14760|  20.2M|    int32_t newtop = fiber->stacktop + n;
14761|  20.2M|    if (newtop > fiber->capacity) {
  ------------------
  |  Branch (14761:9): [True: 581, False: 20.2M]
  ------------------
14762|    581|        janet_fiber_grow(fiber, newtop);
14763|    581|    }
14764|  20.2M|    safe_memcpy(fiber->data + fiber->stacktop, arr, n * sizeof(Janet));
14765|  20.2M|    fiber->stacktop = newtop;
14766|  20.2M|}
janet_fiber_funcframe:
14780|  88.7M|int janet_fiber_funcframe(JanetFiber *fiber, JanetFunction *func) {
14781|  88.7M|    JanetStackFrame *newframe;
14782|       |
14783|  88.7M|    int32_t i;
14784|  88.7M|    int32_t oldtop = fiber->stacktop;
14785|  88.7M|    int32_t oldframe = fiber->frame;
14786|  88.7M|    int32_t nextframe = fiber->stackstart;
14787|  88.7M|    int32_t nextstacktop = nextframe + func->def->slotcount + JANET_FRAME_SIZE;
  ------------------
  |  | 1026|  88.7M|#define JANET_FRAME_SIZE 4
  ------------------
14788|  88.7M|    int32_t next_arity = fiber->stacktop - fiber->stackstart;
14789|       |
14790|       |    /* Check strict arity before messing with state */
14791|  88.7M|    if (next_arity < func->def->min_arity) return 1;
  ------------------
  |  Branch (14791:9): [True: 1, False: 88.7M]
  ------------------
14792|  88.7M|    if (next_arity > func->def->max_arity) return 1;
  ------------------
  |  Branch (14792:9): [True: 23, False: 88.7M]
  ------------------
14793|       |
14794|  88.7M|    if (fiber->capacity < nextstacktop) {
  ------------------
  |  Branch (14794:9): [True: 328k, False: 88.3M]
  ------------------
14795|   328k|        janet_fiber_setcapacity(fiber, 2 * nextstacktop);
14796|       |#ifdef JANET_DEBUG
14797|       |    } else {
14798|       |        janet_fiber_refresh_memory(fiber);
14799|       |#endif
14800|   328k|    }
14801|       |
14802|       |    /* Nil unset stack arguments (Needed for gc correctness) */
14803|  1.33G|    for (i = fiber->stacktop; i < nextstacktop; ++i) {
  ------------------
  |  Branch (14803:31): [True: 1.25G, False: 88.7M]
  ------------------
14804|  1.25G|        fiber->data[i] = janet_wrap_nil();
  ------------------
  |  |  831|  1.25G|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.25G|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.25G|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.25G|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14805|  1.25G|    }
14806|       |
14807|       |    /* Set up the next frame */
14808|  88.7M|    fiber->frame = nextframe;
14809|  88.7M|    fiber->stacktop = fiber->stackstart = nextstacktop;
14810|  88.7M|    newframe = janet_fiber_frame(fiber);
  ------------------
  |  |  810|  88.7M|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  809|  88.7M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  88.7M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14811|  88.7M|    newframe->prevframe = oldframe;
14812|  88.7M|    newframe->pc = func->def->bytecode;
14813|  88.7M|    newframe->func = func;
14814|  88.7M|    newframe->env = NULL;
14815|  88.7M|    newframe->flags = 0;
14816|       |
14817|       |    /* Check varargs */
14818|  88.7M|    if (func->def->flags & JANET_FUNCDEF_FLAG_VARARG) {
  ------------------
  |  | 1097|  88.7M|#define JANET_FUNCDEF_FLAG_VARARG 0x10000
  ------------------
  |  Branch (14818:9): [True: 11.1M, False: 77.5M]
  ------------------
14819|  11.1M|        int32_t tuplehead = fiber->frame + func->def->arity;
14820|  11.1M|        janet_assert(tuplehead > 0, "fiber stack overflow");
  ------------------
  |  |  389|  11.1M|#define janet_assert(c, m) do { \
  |  |  390|  11.1M|    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.1M]
  |  |  ------------------
  |  |  391|  11.1M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 11.1M]
  |  |  ------------------
  ------------------
14821|  11.1M|        int st = func->def->flags & JANET_FUNCDEF_FLAG_STRUCTARG;
  ------------------
  |  | 1105|  11.1M|#define JANET_FUNCDEF_FLAG_STRUCTARG 0x1000000
  ------------------
14822|  11.1M|        if (tuplehead >= oldtop) {
  ------------------
  |  Branch (14822:13): [True: 11.0M, False: 77.9k]
  ------------------
14823|  11.0M|            fiber->data[tuplehead] = st
  ------------------
  |  Branch (14823:38): [True: 2, False: 11.0M]
  ------------------
14824|  11.0M|                                     ? make_struct_n(NULL, 0)
14825|  11.0M|                                     : janet_wrap_tuple(janet_tuple_n(NULL, 0));
  ------------------
  |  |  843|  11.0M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  22.1M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  11.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  11.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14826|  11.0M|        } else {
14827|  77.9k|            fiber->data[tuplehead] = st
  ------------------
  |  Branch (14827:38): [True: 17, False: 77.9k]
  ------------------
14828|  77.9k|                                     ? make_struct_n(
14829|     17|                                         fiber->data + tuplehead,
14830|     17|                                         oldtop - tuplehead)
14831|  77.9k|                                     : janet_wrap_tuple(janet_tuple_n(
  ------------------
  |  |  843|  77.9k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|   155k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  77.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  77.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14832|  77.9k|                                             fiber->data + tuplehead,
14833|  77.9k|                                             oldtop - tuplehead));
14834|  77.9k|        }
14835|  11.1M|    }
14836|       |
14837|       |    /* Good return */
14838|  88.7M|    return 0;
14839|  88.7M|}
janet_env_valid:
14874|  50.3M|int janet_env_valid(JanetFuncEnv *env) {
14875|  50.3M|    if (env->offset < 0) {
  ------------------
  |  Branch (14875:9): [True: 0, False: 50.3M]
  ------------------
14876|      0|        int32_t real_offset = -(env->offset);
14877|      0|        JanetFiber *fiber = env->as.fiber;
14878|      0|        int32_t i = fiber->frame;
14879|      0|        while (i > 0) {
  ------------------
  |  Branch (14879:16): [True: 0, False: 0]
  ------------------
14880|      0|            JanetStackFrame *frame = (JanetStackFrame *)(fiber->data + i - JANET_FRAME_SIZE);
  ------------------
  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  ------------------
14881|      0|            if (real_offset == i &&
  ------------------
  |  Branch (14881:17): [True: 0, False: 0]
  ------------------
14882|      0|                    frame->env == env &&
  ------------------
  |  Branch (14882:21): [True: 0, False: 0]
  ------------------
14883|      0|                    frame->func &&
  ------------------
  |  Branch (14883:21): [True: 0, False: 0]
  ------------------
14884|      0|                    frame->func->def->slotcount == env->length) {
  ------------------
  |  Branch (14884:21): [True: 0, False: 0]
  ------------------
14885|      0|                env->offset = real_offset;
14886|      0|                return 1;
14887|      0|            }
14888|      0|            i = frame->prevframe;
14889|      0|        }
14890|       |        /* Invalid, set to empty off-stack variant. */
14891|      0|        env->offset = 0;
14892|      0|        env->length = 0;
14893|      0|        env->as.values = NULL;
14894|      0|        return 0;
14895|  50.3M|    } else {
14896|  50.3M|        return 1;
14897|  50.3M|    }
14898|  50.3M|}
janet_env_maybe_detach:
14901|  11.6k|void janet_env_maybe_detach(JanetFuncEnv *env) {
14902|       |    /* Check for detachable closure envs */
14903|  11.6k|    janet_env_valid(env);
14904|  11.6k|    if (env->offset > 0) {
  ------------------
  |  Branch (14904:9): [True: 62, False: 11.6k]
  ------------------
14905|     62|        JanetFiberStatus s = janet_fiber_status(env->as.fiber);
14906|     62|        int isFinished = s == JANET_STATUS_DEAD ||
  ------------------
  |  Branch (14906:26): [True: 0, False: 62]
  ------------------
14907|     62|                         s == JANET_STATUS_ERROR ||
  ------------------
  |  Branch (14907:26): [True: 0, False: 62]
  ------------------
14908|     62|                         s == JANET_STATUS_USER0 ||
  ------------------
  |  Branch (14908:26): [True: 0, False: 62]
  ------------------
14909|     62|                         s == JANET_STATUS_USER1 ||
  ------------------
  |  Branch (14909:26): [True: 0, False: 62]
  ------------------
14910|     62|                         s == JANET_STATUS_USER2 ||
  ------------------
  |  Branch (14910:26): [True: 0, False: 62]
  ------------------
14911|     62|                         s == JANET_STATUS_USER3 ||
  ------------------
  |  Branch (14911:26): [True: 0, False: 62]
  ------------------
14912|     62|                         s == JANET_STATUS_USER4;
  ------------------
  |  Branch (14912:26): [True: 0, False: 62]
  ------------------
14913|     62|        if (isFinished) {
  ------------------
  |  Branch (14913:13): [True: 0, False: 62]
  ------------------
14914|      0|            janet_env_detach(env);
14915|      0|        }
14916|     62|    }
14917|  11.6k|}
janet_fiber_funcframe_tail:
14920|  30.3M|int janet_fiber_funcframe_tail(JanetFiber *fiber, JanetFunction *func) {
14921|  30.3M|    int32_t i;
14922|  30.3M|    int32_t nextframetop = fiber->frame + func->def->slotcount;
14923|  30.3M|    int32_t nextstacktop = nextframetop + JANET_FRAME_SIZE;
  ------------------
  |  | 1026|  30.3M|#define JANET_FRAME_SIZE 4
  ------------------
14924|  30.3M|    int32_t next_arity = fiber->stacktop - fiber->stackstart;
14925|  30.3M|    int32_t stacksize;
14926|       |
14927|       |    /* Check strict arity before messing with state */
14928|  30.3M|    if (next_arity < func->def->min_arity) return 1;
  ------------------
  |  Branch (14928:9): [True: 7, False: 30.3M]
  ------------------
14929|  30.3M|    if (next_arity > func->def->max_arity) return 1;
  ------------------
  |  Branch (14929:9): [True: 1, False: 30.3M]
  ------------------
14930|       |
14931|  30.3M|    if (fiber->capacity < nextstacktop) {
  ------------------
  |  Branch (14931:9): [True: 312, False: 30.3M]
  ------------------
14932|    312|        janet_fiber_setcapacity(fiber, 2 * nextstacktop);
14933|       |#ifdef JANET_DEBUG
14934|       |    } else {
14935|       |        janet_fiber_refresh_memory(fiber);
14936|       |#endif
14937|    312|    }
14938|       |
14939|       |    /* Detach old function */
14940|  30.3M|    if (NULL != janet_fiber_frame(fiber)->func)
  ------------------
  |  |  810|  30.3M|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  809|  30.3M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  30.3M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (14940:9): [True: 30.3M, False: 0]
  ------------------
14941|  30.3M|        janet_env_detach(janet_fiber_frame(fiber)->env);
  ------------------
  |  |  810|  30.3M|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  809|  30.3M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  30.3M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14942|  30.3M|    janet_fiber_frame(fiber)->env = NULL;
  ------------------
  |  |  810|  30.3M|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  809|  30.3M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  30.3M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14943|       |
14944|       |    /* Check varargs */
14945|  30.3M|    if (func->def->flags & JANET_FUNCDEF_FLAG_VARARG) {
  ------------------
  |  | 1097|  30.3M|#define JANET_FUNCDEF_FLAG_VARARG 0x10000
  ------------------
  |  Branch (14945:9): [True: 1.34k, False: 30.3M]
  ------------------
14946|  1.34k|        int32_t tuplehead = fiber->stackstart + func->def->arity;
14947|  1.34k|        int st = func->def->flags & JANET_FUNCDEF_FLAG_STRUCTARG;
  ------------------
  |  | 1105|  1.34k|#define JANET_FUNCDEF_FLAG_STRUCTARG 0x1000000
  ------------------
14948|  1.34k|        if (tuplehead >= fiber->stacktop) {
  ------------------
  |  Branch (14948:13): [True: 853, False: 490]
  ------------------
14949|    853|            if (tuplehead >= fiber->capacity) janet_fiber_setcapacity(fiber, 2 * (tuplehead + 1));
  ------------------
  |  Branch (14949:17): [True: 0, False: 853]
  ------------------
14950|    853|            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 (14950:39): [True: 0, False: 853]
  ------------------
14951|    853|            fiber->data[tuplehead] = st
  ------------------
  |  Branch (14951:38): [True: 0, False: 853]
  ------------------
14952|    853|                                     ? make_struct_n(NULL, 0)
14953|    853|                                     : janet_wrap_tuple(janet_tuple_n(NULL, 0));
  ------------------
  |  |  843|    853|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  1.70k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    853|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    853|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14954|    853|        } else {
14955|    490|            fiber->data[tuplehead] = st
  ------------------
  |  Branch (14955:38): [True: 19, False: 471]
  ------------------
14956|    490|                                     ? make_struct_n(
14957|     19|                                         fiber->data + tuplehead,
14958|     19|                                         fiber->stacktop - tuplehead)
14959|    490|                                     : janet_wrap_tuple(janet_tuple_n(
  ------------------
  |  |  843|    471|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|    961|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    471|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    471|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14960|    490|                                             fiber->data + tuplehead,
14961|    490|                                             fiber->stacktop - tuplehead));
14962|    490|        }
14963|  1.34k|        stacksize = tuplehead - fiber->stackstart + 1;
14964|  30.3M|    } else {
14965|  30.3M|        stacksize = fiber->stacktop - fiber->stackstart;
14966|  30.3M|    }
14967|       |
14968|  30.3M|    if (stacksize) memmove(fiber->data + fiber->frame, fiber->data + fiber->stackstart, stacksize * sizeof(Janet));
  ------------------
  |  Branch (14968:9): [True: 30.2M, False: 28.1k]
  ------------------
14969|       |
14970|       |    /* Nil unset locals (Needed for functional correctness) */
14971|   570M|    for (i = fiber->frame + stacksize; i < nextframetop; ++i)
  ------------------
  |  Branch (14971:40): [True: 539M, False: 30.3M]
  ------------------
14972|   539M|        fiber->data[i] = janet_wrap_nil();
  ------------------
  |  |  831|   539M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   570M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   539M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   539M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14973|       |
14974|       |    /* Set stack stuff */
14975|  30.3M|    fiber->stacktop = fiber->stackstart = nextstacktop;
14976|       |
14977|       |    /* Set frame stuff */
14978|  30.3M|    janet_fiber_frame(fiber)->func = func;
  ------------------
  |  |  810|  30.3M|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  809|  30.3M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  30.3M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14979|  30.3M|    janet_fiber_frame(fiber)->pc = func->def->bytecode;
  ------------------
  |  |  810|  30.3M|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  809|  30.3M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  30.3M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14980|  30.3M|    janet_fiber_frame(fiber)->flags |= JANET_STACKFRAME_TAILCALL;
  ------------------
  |  |  810|  30.3M|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  809|  30.3M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  30.3M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_fiber_frame(fiber)->flags |= JANET_STACKFRAME_TAILCALL;
  ------------------
  |  | 1010|  30.3M|#define JANET_STACKFRAME_TAILCALL 1
  ------------------
14981|       |
14982|       |    /* Good return */
14983|  30.3M|    return 0;
14984|  30.3M|}
janet_fiber_cframe:
14987|   204M|void janet_fiber_cframe(JanetFiber *fiber, JanetCFunction cfun) {
14988|   204M|    JanetStackFrame *newframe;
14989|       |
14990|   204M|    int32_t oldframe = fiber->frame;
14991|   204M|    int32_t nextframe = fiber->stackstart;
14992|   204M|    int32_t nextstacktop = fiber->stacktop + JANET_FRAME_SIZE;
  ------------------
  |  | 1026|   204M|#define JANET_FRAME_SIZE 4
  ------------------
14993|       |
14994|   204M|    if (fiber->capacity < nextstacktop) {
  ------------------
  |  Branch (14994:9): [True: 8.63k, False: 204M]
  ------------------
14995|  8.63k|        janet_fiber_setcapacity(fiber, 2 * nextstacktop);
14996|       |#ifdef JANET_DEBUG
14997|       |    } else {
14998|       |        janet_fiber_refresh_memory(fiber);
14999|       |#endif
15000|  8.63k|    }
15001|       |
15002|       |    /* Set the next frame */
15003|   204M|    fiber->frame = nextframe;
15004|   204M|    fiber->stacktop = fiber->stackstart = nextstacktop;
15005|   204M|    newframe = janet_fiber_frame(fiber);
  ------------------
  |  |  810|   204M|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  809|   204M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|   204M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
15006|       |
15007|       |    /* Set up the new frame */
15008|   204M|    newframe->prevframe = oldframe;
15009|   204M|    newframe->pc = (uint32_t *) cfun;
15010|   204M|    newframe->func = NULL;
15011|       |    newframe->env = NULL;
15012|   204M|    newframe->flags = 0;
15013|   204M|}
janet_fiber_popframe:
15016|   293M|void janet_fiber_popframe(JanetFiber *fiber) {
15017|   293M|    JanetStackFrame *frame = janet_fiber_frame(fiber);
  ------------------
  |  |  810|   293M|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  809|   293M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|   293M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
15018|   293M|    if (fiber->frame == 0) return;
  ------------------
  |  Branch (15018:9): [True: 0, False: 293M]
  ------------------
15019|       |
15020|       |    /* Clean up the frame (detach environments) */
15021|   293M|    if (NULL != frame->func)
  ------------------
  |  Branch (15021:9): [True: 88.6M, False: 204M]
  ------------------
15022|  88.6M|        janet_env_detach(frame->env);
15023|       |
15024|       |    /* Shrink stack */
15025|   293M|    fiber->stacktop = fiber->stackstart = fiber->frame;
15026|   293M|    fiber->frame = frame->prevframe;
15027|   293M|}
janet_fiber_status:
15029|   770k|JanetFiberStatus janet_fiber_status(JanetFiber *f) {
15030|   770k|    return ((f)->flags & JANET_FIBER_STATUS_MASK) >> JANET_FIBER_STATUS_OFFSET;
  ------------------
  |  |  785|   770k|#define JANET_FIBER_STATUS_MASK 0x3F0000
  ------------------
                  return ((f)->flags & JANET_FIBER_STATUS_MASK) >> JANET_FIBER_STATUS_OFFSET;
  ------------------
  |  |  787|   770k|#define JANET_FIBER_STATUS_OFFSET 16
  ------------------
15031|   770k|}
janet_root_fiber:
15037|    480|JanetFiber *janet_root_fiber(void) {
15038|    480|    return janet_vm.root_fiber;
15039|    480|}
cfun_fiber_getenv:
15046|     48|              "set yet.") {
15047|     48|    janet_fixarity(argc, 1);
15048|     48|    JanetFiber *fiber = janet_getfiber(argv, 0);
15049|     48|    return fiber->env ?
  ------------------
  |  Branch (15049:12): [True: 47, False: 1]
  ------------------
15050|     48|           janet_wrap_table(fiber->env) :
  ------------------
  |  |  846|     47|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|     47|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     47|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     47|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
15051|     48|           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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
15052|     48|}
cfun_fiber_setenv:
15057|      1|              "environment.") {
15058|      1|    janet_fixarity(argc, 2);
15059|      1|    JanetFiber *fiber = janet_getfiber(argv, 0);
15060|      1|    if (janet_checktype(argv[1], JANET_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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
15061|      0|        fiber->env = NULL;
15062|      1|    } else {
15063|      1|        fiber->env = janet_gettable(argv, 1);
15064|      1|    }
15065|      1|    return argv[0];
15066|      1|}
cfun_fiber_new:
15093|  1.02k|              "* :p - the environment table's prototype is the current environment table") {
15094|  1.02k|    janet_arity(argc, 1, 3);
15095|  1.02k|    JanetFunction *func = janet_getfunction(argv, 0);
15096|  1.02k|    JanetFiber *fiber;
15097|  1.02k|    if (func->def->min_arity > 1) {
  ------------------
  |  Branch (15097:9): [True: 1, False: 1.02k]
  ------------------
15098|      1|        janet_panicf("fiber function must accept 0 or 1 arguments");
15099|      1|    }
15100|  1.02k|    fiber = janet_fiber(func, 64, func->def->min_arity, NULL);
15101|  1.02k|    janet_assert(fiber != NULL, "bad fiber arity check");
  ------------------
  |  |  389|  1.02k|#define janet_assert(c, m) do { \
  |  |  390|  1.02k|    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.02k]
  |  |  ------------------
  |  |  391|  1.02k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 1.02k]
  |  |  ------------------
  ------------------
15102|  1.02k|    if (argc == 3 && !janet_checktype(argv[2], JANET_NIL)) {
  ------------------
  |  |  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 (15102:9): [True: 5, False: 1.01k]
  |  Branch (15102:22): [True: 3, False: 2]
  ------------------
15103|      3|        fiber->env = janet_gettable(argv, 2);
15104|      3|    }
15105|  1.02k|    if (argc >= 2) {
  ------------------
  |  Branch (15105:9): [True: 917, False: 107]
  ------------------
15106|    917|        int32_t i;
15107|    917|        JanetByteView view = janet_getbytes(argv, 1);
15108|    917|        fiber->flags = JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  790|    917|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
                      fiber->flags = JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  791|    917|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  ------------------
15109|    917|        janet_fiber_set_status(fiber, JANET_STATUS_NEW);
  ------------------
  |  |  804|    917|#define janet_fiber_set_status(f, s) do {\
  |  |  805|    917|    (f)->flags &= ~JANET_FIBER_STATUS_MASK;\
  |  |  ------------------
  |  |  |  |  785|    917|#define JANET_FIBER_STATUS_MASK 0x3F0000
  |  |  ------------------
  |  |  806|    917|    (f)->flags |= (s) << JANET_FIBER_STATUS_OFFSET;\
  |  |  ------------------
  |  |  |  |  787|    917|#define JANET_FIBER_STATUS_OFFSET 16
  |  |  ------------------
  |  |  807|    917|} while (0)
  |  |  ------------------
  |  |  |  Branch (807:10): [Folded, False: 917]
  |  |  ------------------
  ------------------
15110|  3.81k|        for (i = 0; i < view.len; i++) {
  ------------------
  |  Branch (15110:21): [True: 2.92k, False: 888]
  ------------------
15111|  2.92k|            if (view.bytes[i] >= '0' && view.bytes[i] <= '9') {
  ------------------
  |  Branch (15111:17): [True: 2.91k, False: 12]
  |  Branch (15111:41): [True: 163, False: 2.74k]
  ------------------
15112|    163|                fiber->flags |= JANET_FIBER_MASK_USERN(view.bytes[i] - '0');
  ------------------
  |  |  782|    163|#define JANET_FIBER_MASK_USERN(N) (16 << (N))
  ------------------
15113|  2.75k|            } else {
15114|  2.75k|                switch (view.bytes[i]) {
15115|     29|                    default:
  ------------------
  |  Branch (15115:21): [True: 29, False: 2.73k]
  ------------------
15116|     29|                        janet_panicf("invalid flag %c, expected a, t, d, e, u, y, w, r, i, or p", view.bytes[i]);
15117|      0|                        break;
15118|     35|                    case 'a':
  ------------------
  |  Branch (15118:21): [True: 35, False: 2.72k]
  ------------------
15119|     35|                        fiber->flags |=
15120|     35|                            JANET_FIBER_MASK_DEBUG |
  ------------------
  |  |  768|     35|#define JANET_FIBER_MASK_DEBUG 4
  ------------------
15121|     35|                            JANET_FIBER_MASK_ERROR |
  ------------------
  |  |  767|     35|#define JANET_FIBER_MASK_ERROR 2
  ------------------
15122|     35|                            JANET_FIBER_MASK_USER |
  ------------------
  |  |  783|     35|#define JANET_FIBER_MASK_USER 0x3FF0
  ------------------
15123|     35|                            JANET_FIBER_MASK_YIELD;
  ------------------
  |  |  769|     35|#define JANET_FIBER_MASK_YIELD 8
  ------------------
15124|     35|                        break;
15125|     75|                    case 't':
  ------------------
  |  Branch (15125:21): [True: 75, False: 2.68k]
  ------------------
15126|     75|                        fiber->flags |=
15127|     75|                            JANET_FIBER_MASK_ERROR |
  ------------------
  |  |  767|     75|#define JANET_FIBER_MASK_ERROR 2
  ------------------
15128|     75|                            JANET_FIBER_MASK_USER0 |
  ------------------
  |  |  771|     75|#define JANET_FIBER_MASK_USER0 (16 << 0)
  ------------------
15129|     75|                            JANET_FIBER_MASK_USER1 |
  ------------------
  |  |  772|     75|#define JANET_FIBER_MASK_USER1 (16 << 1)
  ------------------
15130|     75|                            JANET_FIBER_MASK_USER2 |
  ------------------
  |  |  773|     75|#define JANET_FIBER_MASK_USER2 (16 << 2)
  ------------------
15131|     75|                            JANET_FIBER_MASK_USER3 |
  ------------------
  |  |  774|     75|#define JANET_FIBER_MASK_USER3 (16 << 3)
  ------------------
15132|     75|                            JANET_FIBER_MASK_USER4;
  ------------------
  |  |  775|     75|#define JANET_FIBER_MASK_USER4 (16 << 4)
  ------------------
15133|     75|                        break;
15134|    137|                    case 'd':
  ------------------
  |  Branch (15134:21): [True: 137, False: 2.62k]
  ------------------
15135|    137|                        fiber->flags |= JANET_FIBER_MASK_DEBUG;
  ------------------
  |  |  768|    137|#define JANET_FIBER_MASK_DEBUG 4
  ------------------
15136|    137|                        break;
15137|     97|                    case 'e':
  ------------------
  |  Branch (15137:21): [True: 97, False: 2.66k]
  ------------------
15138|     97|                        fiber->flags |= JANET_FIBER_MASK_ERROR;
  ------------------
  |  |  767|     97|#define JANET_FIBER_MASK_ERROR 2
  ------------------
15139|     97|                        break;
15140|     28|                    case 'u':
  ------------------
  |  Branch (15140:21): [True: 28, False: 2.73k]
  ------------------
15141|     28|                        fiber->flags |= JANET_FIBER_MASK_USER;
  ------------------
  |  |  783|     28|#define JANET_FIBER_MASK_USER 0x3FF0
  ------------------
15142|     28|                        break;
15143|    778|                    case 'y':
  ------------------
  |  Branch (15143:21): [True: 778, False: 1.98k]
  ------------------
15144|    778|                        fiber->flags |= JANET_FIBER_MASK_YIELD;
  ------------------
  |  |  769|    778|#define JANET_FIBER_MASK_YIELD 8
  ------------------
15145|    778|                        break;
15146|     23|                    case 'w':
  ------------------
  |  Branch (15146:21): [True: 23, False: 2.73k]
  ------------------
15147|     23|                        fiber->flags |= JANET_FIBER_MASK_USER9;
  ------------------
  |  |  780|     23|#define JANET_FIBER_MASK_USER9 (16 << 9)
  ------------------
15148|     23|                        break;
15149|     21|                    case 'r':
  ------------------
  |  Branch (15149:21): [True: 21, False: 2.73k]
  ------------------
15150|     21|                        fiber->flags |= JANET_FIBER_MASK_USER8;
  ------------------
  |  |  779|     21|#define JANET_FIBER_MASK_USER8 (16 << 8)
  ------------------
15151|     21|                        break;
15152|    876|                    case 'i':
  ------------------
  |  Branch (15152:21): [True: 876, False: 1.88k]
  ------------------
15153|    876|                        if (!janet_vm.fiber->env) {
  ------------------
  |  Branch (15153:29): [True: 2, False: 874]
  ------------------
15154|      2|                            janet_vm.fiber->env = janet_table(0);
15155|      2|                        }
15156|    876|                        fiber->env = janet_vm.fiber->env;
15157|    876|                        break;
15158|    660|                    case 'p':
  ------------------
  |  Branch (15158:21): [True: 660, False: 2.09k]
  ------------------
15159|    660|                        if (!janet_vm.fiber->env) {
  ------------------
  |  Branch (15159:29): [True: 0, False: 660]
  ------------------
15160|      0|                            janet_vm.fiber->env = janet_table(0);
15161|      0|                        }
15162|    660|                        fiber->env = janet_table(0);
15163|    660|                        fiber->env->proto = janet_vm.fiber->env;
15164|    660|                        break;
15165|  2.75k|                }
15166|  2.75k|            }
15167|  2.92k|        }
15168|    917|    }
15169|    995|    return janet_wrap_fiber(fiber);
  ------------------
  |  |  844|    995|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|    995|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    995|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    995|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
15170|  1.02k|}
cfun_fiber_status:
15183|     61|              "* :alive - the fiber is currently running and cannot be resumed") {
15184|     61|    janet_fixarity(argc, 1);
15185|     61|    JanetFiber *fiber = janet_getfiber(argv, 0);
15186|     61|    uint32_t s = janet_fiber_status(fiber);
15187|     61|    return janet_ckeywordv(janet_status_names[s]);
  ------------------
  |  | 1842|     61|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|     61|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|     61|    janet_nanbox_from_cpointer((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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
15188|     61|}
cfun_fiber_current:
15192|     49|              "Returns the currently running fiber.") {
15193|     49|    (void) argv;
15194|     49|    janet_fixarity(argc, 0);
15195|     49|    return janet_wrap_fiber(janet_vm.fiber);
  ------------------
  |  |  844|     49|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|     49|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     49|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     49|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
15196|     49|}
cfun_fiber_maxstack:
15212|      2|              "than this amount and will throw a stack-overflow error if more memory is needed. ") {
15213|      2|    janet_fixarity(argc, 1);
15214|      2|    JanetFiber *fiber = janet_getfiber(argv, 0);
15215|      2|    return janet_wrap_integer(fiber->maxstack);
  ------------------
  |  |  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)
  |  |  ------------------
  ------------------
15216|      2|}
cfun_fiber_setmaxstack:
15221|      1|              "maximum stack size is usually 8192.") {
15222|      1|    janet_fixarity(argc, 2);
15223|      1|    JanetFiber *fiber = janet_getfiber(argv, 0);
15224|      1|    int32_t maxs = janet_getinteger(argv, 1);
15225|      1|    if (maxs < 0) {
  ------------------
  |  Branch (15225:9): [True: 0, False: 1]
  ------------------
15226|      0|        janet_panic("expected positive integer");
15227|      0|    }
15228|      1|    fiber->maxstack = maxs;
15229|      1|    return argv[0];
15230|      1|}
janet_fiber_can_resume:
15232|    565|int janet_fiber_can_resume(JanetFiber *fiber) {
15233|    565|    JanetFiberStatus s = janet_fiber_status(fiber);
15234|    565|    int isFinished = s == JANET_STATUS_DEAD ||
  ------------------
  |  Branch (15234:22): [True: 448, False: 117]
  ------------------
15235|    117|                     s == JANET_STATUS_ERROR ||
  ------------------
  |  Branch (15235:22): [True: 32, False: 85]
  ------------------
15236|     85|                     s == JANET_STATUS_USER0 ||
  ------------------
  |  Branch (15236:22): [True: 0, False: 85]
  ------------------
15237|     85|                     s == JANET_STATUS_USER1 ||
  ------------------
  |  Branch (15237:22): [True: 0, False: 85]
  ------------------
15238|     85|                     s == JANET_STATUS_USER2 ||
  ------------------
  |  Branch (15238:22): [True: 0, False: 85]
  ------------------
15239|     85|                     s == JANET_STATUS_USER3 ||
  ------------------
  |  Branch (15239:22): [True: 0, False: 85]
  ------------------
15240|     85|                     s == JANET_STATUS_USER4;
  ------------------
  |  Branch (15240:22): [True: 0, False: 85]
  ------------------
15241|    565|    return !isFinished;
15242|    565|}
cfun_fiber_can_resume:
15246|      2|              "Check if a fiber is finished and cannot be resumed.") {
15247|      2|    janet_fixarity(argc, 1);
15248|      2|    JanetFiber *fiber = janet_getfiber(argv, 0);
15249|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
15250|      2|}
cfun_fiber_last_value:
15254|      1|              "Get the last value returned or signaled from the fiber.") {
15255|      1|    janet_fixarity(argc, 1);
15256|      1|    JanetFiber *fiber = janet_getfiber(argv, 0);
15257|      1|    return fiber->last_value;
15258|      1|}
janet_lib_fiber:
15261|  7.16k|void janet_lib_fiber(JanetTable *env) {
15262|  7.16k|    JanetRegExt fiber_cfuns[] = {
15263|  7.16k|        JANET_CORE_REG("fiber/new", cfun_fiber_new),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
15264|  7.16k|        JANET_CORE_REG("fiber/status", cfun_fiber_status),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
15265|  7.16k|        JANET_CORE_REG("fiber/root", cfun_fiber_root),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
15266|  7.16k|        JANET_CORE_REG("fiber/current", cfun_fiber_current),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
15267|  7.16k|        JANET_CORE_REG("fiber/maxstack", cfun_fiber_maxstack),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
15268|  7.16k|        JANET_CORE_REG("fiber/setmaxstack", cfun_fiber_setmaxstack),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
15269|  7.16k|        JANET_CORE_REG("fiber/getenv", cfun_fiber_getenv),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
15270|  7.16k|        JANET_CORE_REG("fiber/setenv", cfun_fiber_setenv),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
15271|  7.16k|        JANET_CORE_REG("fiber/can-resume?", cfun_fiber_can_resume),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
15272|  7.16k|        JANET_CORE_REG("fiber/last-value", cfun_fiber_last_value),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
15273|  7.16k|        JANET_REG_END
  ------------------
  |  | 2109|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
15274|  7.16k|    };
15275|       |    janet_core_cfuns_ext(env, NULL, fiber_cfuns);
15276|  7.16k|}
cfun_filewatch_make:
16132|      2|              "") {
16133|      2|    janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2028|      2|#define JANET_SANDBOX_FS_READ 64
  ------------------
16134|      2|    janet_arity(argc, 1, -1);
16135|      2|    JanetChannel *channel = janet_getchannel(argv, 0);
16136|      2|    JanetWatcher *watcher = janet_abstract(&janet_filewatch_at, sizeof(JanetWatcher));
16137|      2|    uint32_t default_flags = decode_watch_flags(argv + 1, argc - 1);
16138|      2|    janet_watcher_init(watcher, channel, default_flags);
16139|      2|    return janet_wrap_abstract(watcher);
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16140|      2|}
cfun_filewatch_remove:
16209|      1|              "Remove a path from the watcher.") {
16210|      1|    janet_fixarity(argc, 2);
16211|      1|    JanetWatcher *watcher = janet_getabstract(argv, 0, &janet_filewatch_at);
16212|       |    /* TODO - pass string in directly to avoid extra allocation */
16213|      1|    const char *path = janet_getcstring(argv, 1);
16214|      1|    janet_watcher_remove(watcher, path);
16215|      1|    return argv[0];
16216|      1|}
cfun_filewatch_listen:
16220|      2|              "Listen for changes in the watcher.") {
16221|      2|    janet_fixarity(argc, 1);
16222|      2|    JanetWatcher *watcher = janet_getabstract(argv, 0, &janet_filewatch_at);
16223|      2|    janet_watcher_listen(watcher);
16224|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16225|      2|}
cfun_filewatch_unlisten:
16229|      2|              "Stop listening for changes on a given watcher.") {
16230|      2|    janet_fixarity(argc, 1);
16231|      2|    JanetWatcher *watcher = janet_getabstract(argv, 0, &janet_filewatch_at);
16232|      2|    janet_watcher_unlisten(watcher);
16233|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16234|      2|}
janet_lib_filewatch:
16237|  7.16k|void janet_lib_filewatch(JanetTable *env) {
16238|  7.16k|    JanetRegExt cfuns[] = {
16239|  7.16k|        JANET_CORE_REG("filewatch/new", cfun_filewatch_make),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16240|  7.16k|        JANET_CORE_REG("filewatch/add", cfun_filewatch_add),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16241|  7.16k|        JANET_CORE_REG("filewatch/remove", cfun_filewatch_remove),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16242|  7.16k|        JANET_CORE_REG("filewatch/listen", cfun_filewatch_listen),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16243|  7.16k|        JANET_CORE_REG("filewatch/unlisten", cfun_filewatch_unlisten),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16244|  7.16k|        JANET_REG_END
  ------------------
  |  | 2109|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
16245|  7.16k|    };
16246|       |    janet_core_cfuns_ext(env, NULL, cfuns);
16247|  7.16k|}
janet_gcpressure:
16307|  3.71M|void janet_gcpressure(size_t s) {
16308|  3.71M|    janet_vm.next_collection += s;
16309|  3.71M|}
janet_mark:
16312|   205M|void janet_mark(Janet x) {
16313|   205M|    if (depth) {
  ------------------
  |  Branch (16313:9): [True: 205M, False: 0]
  ------------------
16314|   205M|        depth--;
16315|   205M|        switch (janet_type(x)) {
  ------------------
  |  |  795|   205M|    (isnan((x).number) \
  |  |  796|   205M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   205M|        : JANET_NUMBER)
  ------------------
  |  Branch (16315:17): [True: 31.2M, False: 174M]
  ------------------
16316|   193M|            default:
  ------------------
  |  Branch (16316:13): [True: 193M, False: 11.4M]
  ------------------
16317|   193M|                break;
16318|   193M|            case JANET_STRING:
  ------------------
  |  Branch (16318:13): [True: 2.02M, False: 203M]
  ------------------
16319|  5.28M|            case JANET_KEYWORD:
  ------------------
  |  Branch (16319:13): [True: 3.25M, False: 202M]
  ------------------
16320|  8.04M|            case JANET_SYMBOL:
  ------------------
  |  Branch (16320:13): [True: 2.76M, False: 202M]
  ------------------
16321|  8.04M|                janet_mark_string(janet_unwrap_string(x));
  ------------------
  |  |  863|  8.04M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
16322|  8.04M|                break;
16323|  1.60M|            case JANET_FUNCTION:
  ------------------
  |  Branch (16323:13): [True: 1.60M, False: 203M]
  ------------------
16324|  1.60M|                janet_mark_function(janet_unwrap_function(x));
  ------------------
  |  |  868|  1.60M|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
16325|  1.60M|                break;
16326|  10.1k|            case JANET_ARRAY:
  ------------------
  |  Branch (16326:13): [True: 10.1k, False: 205M]
  ------------------
16327|  10.1k|                janet_mark_array(janet_unwrap_array(x));
  ------------------
  |  |  860|  10.1k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
16328|  10.1k|                break;
16329|   849k|            case JANET_TABLE:
  ------------------
  |  Branch (16329:13): [True: 849k, False: 204M]
  ------------------
16330|   849k|                janet_mark_table(janet_unwrap_table(x));
  ------------------
  |  |  861|   849k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
16331|   849k|                break;
16332|  8.95k|            case JANET_STRUCT:
  ------------------
  |  Branch (16332:13): [True: 8.95k, False: 205M]
  ------------------
16333|  8.95k|                janet_mark_struct(janet_unwrap_struct(x));
  ------------------
  |  |  857|  8.95k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
16334|  8.95k|                break;
16335|   930k|            case JANET_TUPLE:
  ------------------
  |  Branch (16335:13): [True: 930k, False: 204M]
  ------------------
16336|   930k|                janet_mark_tuple(janet_unwrap_tuple(x));
  ------------------
  |  |  858|   930k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
16337|   930k|                break;
16338|  22.4k|            case JANET_BUFFER:
  ------------------
  |  Branch (16338:13): [True: 22.4k, False: 205M]
  ------------------
16339|  22.4k|                janet_mark_buffer(janet_unwrap_buffer(x));
  ------------------
  |  |  862|  22.4k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
16340|  22.4k|                break;
16341|     97|            case JANET_FIBER:
  ------------------
  |  Branch (16341:13): [True: 97, False: 205M]
  ------------------
16342|     97|                janet_mark_fiber(janet_unwrap_fiber(x));
  ------------------
  |  |  859|     97|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
16343|     97|                break;
16344|  16.7k|            case JANET_ABSTRACT:
  ------------------
  |  Branch (16344:13): [True: 16.7k, False: 205M]
  ------------------
16345|  16.7k|                janet_mark_abstract(janet_unwrap_abstract(x));
  ------------------
  |  |  866|  16.7k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
16346|  16.7k|                break;
16347|   205M|        }
16348|   205M|        depth++;
16349|   205M|    } else {
16350|      0|        janet_gcroot(x);
16351|      0|    }
16352|   205M|}
janet_sweep:
16661|  1.11k|void janet_sweep() {
16662|  1.11k|    JanetGCObject *previous = NULL;
16663|  1.11k|    JanetGCObject *current = janet_vm.weak_blocks;
16664|  1.11k|    JanetGCObject *next;
16665|       |
16666|       |    /* Sweep weak heap to drop weak refs */
16667|  1.13k|    while (NULL != current) {
  ------------------
  |  Branch (16667:12): [True: 20, False: 1.11k]
  ------------------
16668|     20|        next = current->data.next;
16669|     20|        if (current->flags & (JANET_MEM_REACHABLE | JANET_MEM_DISABLED)) {
  ------------------
  |  |  631|     20|#define JANET_MEM_REACHABLE 0x100
  ------------------
                      if (current->flags & (JANET_MEM_REACHABLE | JANET_MEM_DISABLED)) {
  ------------------
  |  |  632|     20|#define JANET_MEM_DISABLED 0x200
  ------------------
  |  Branch (16669:13): [True: 13, False: 7]
  ------------------
16670|       |            /* Check for dead references */
16671|     13|            enum JanetMemoryType type = janet_gc_type(current);
  ------------------
  |  |  635|     13|#define janet_gc_type(m) (janet_gc_header(m)->flags & 0xFF)
  |  |  ------------------
  |  |  |  |  628|     13|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
16672|     13|            if (type == JANET_MEMORY_ARRAY_WEAK) {
  ------------------
  |  Branch (16672:17): [True: 10, False: 3]
  ------------------
16673|     10|                JanetArray *array = (JanetArray *) current;
16674|     10|                for (uint32_t i = 0; i < (uint32_t) array->count; i++) {
  ------------------
  |  Branch (16674:38): [True: 0, False: 10]
  ------------------
16675|      0|                    if (!janet_check_liveref(array->data[i])) {
  ------------------
  |  Branch (16675:25): [True: 0, False: 0]
  ------------------
16676|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16677|      0|                    }
16678|      0|                }
16679|     10|            } else {
16680|      3|                JanetTable *table = (JanetTable *) current;
16681|      3|                int check_values = (type == JANET_MEMORY_TABLE_WEAKV) || (type == JANET_MEMORY_TABLE_WEAKKV);
  ------------------
  |  Branch (16681:36): [True: 0, False: 3]
  |  Branch (16681:74): [True: 3, False: 0]
  ------------------
16682|      3|                int check_keys = (type == JANET_MEMORY_TABLE_WEAKK) || (type == JANET_MEMORY_TABLE_WEAKKV);
  ------------------
  |  Branch (16682:34): [True: 0, False: 3]
  |  Branch (16682:72): [True: 3, False: 0]
  ------------------
16683|      3|                JanetKV *end = table->data + table->capacity;
16684|      3|                JanetKV *kvs = table->data;
16685|  1.83M|                while (kvs < end) {
  ------------------
  |  Branch (16685:24): [True: 1.83M, False: 3]
  ------------------
16686|  1.83M|                    int drop = 0;
16687|  1.83M|                    if (check_keys && !janet_check_liveref(kvs->key)) drop = 1;
  ------------------
  |  Branch (16687:25): [True: 1.83M, False: 0]
  |  Branch (16687:39): [True: 0, False: 1.83M]
  ------------------
16688|  1.83M|                    if (check_values && !janet_check_liveref(kvs->value)) drop = 1;
  ------------------
  |  Branch (16688:25): [True: 1.83M, False: 0]
  |  Branch (16688:41): [True: 0, False: 1.83M]
  ------------------
16689|  1.83M|                    if (drop) {
  ------------------
  |  Branch (16689:25): [True: 0, False: 1.83M]
  ------------------
16690|       |                        /* Inlined from janet_table_remove without search */
16691|      0|                        table->count--;
16692|      0|                        table->deleted++;
16693|      0|                        kvs->key = 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16694|      0|                        kvs->value = 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16695|      0|                    }
16696|  1.83M|                    kvs++;
16697|  1.83M|                }
16698|      3|            }
16699|     13|        }
16700|     20|        current = next;
16701|     20|    }
16702|       |
16703|       |    /* Sweep weak heap to free blocks */
16704|  1.11k|    previous = NULL;
16705|  1.11k|    current = janet_vm.weak_blocks;
16706|  1.13k|    while (NULL != current) {
  ------------------
  |  Branch (16706:12): [True: 20, False: 1.11k]
  ------------------
16707|     20|        next = current->data.next;
16708|     20|        if (current->flags & (JANET_MEM_REACHABLE | JANET_MEM_DISABLED)) {
  ------------------
  |  |  631|     20|#define JANET_MEM_REACHABLE 0x100
  ------------------
                      if (current->flags & (JANET_MEM_REACHABLE | JANET_MEM_DISABLED)) {
  ------------------
  |  |  632|     20|#define JANET_MEM_DISABLED 0x200
  ------------------
  |  Branch (16708:13): [True: 13, False: 7]
  ------------------
16709|     13|            previous = current;
16710|     13|            current->flags &= ~JANET_MEM_REACHABLE;
  ------------------
  |  |  631|     13|#define JANET_MEM_REACHABLE 0x100
  ------------------
16711|     13|        } else {
16712|      7|            janet_vm.block_count--;
16713|      7|            janet_deinit_block(current);
16714|      7|            if (NULL != previous) {
  ------------------
  |  Branch (16714:17): [True: 7, False: 0]
  ------------------
16715|      7|                previous->data.next = next;
16716|      7|            } else {
16717|      0|                janet_vm.weak_blocks = next;
16718|      0|            }
16719|      7|            janet_free(current);
  ------------------
  |  | 2415|      7|#define janet_free(X) free((X))
  ------------------
16720|      7|        }
16721|     20|        current = next;
16722|     20|    }
16723|       |
16724|       |    /* Sweep main heap to free blocks */
16725|  1.11k|    previous = NULL;
16726|  1.11k|    current = janet_vm.blocks;
16727|   115M|    while (NULL != current) {
  ------------------
  |  Branch (16727:12): [True: 115M, False: 1.11k]
  ------------------
16728|   115M|        next = current->data.next;
16729|   115M|        if (current->flags & (JANET_MEM_REACHABLE | JANET_MEM_DISABLED)) {
  ------------------
  |  |  631|   115M|#define JANET_MEM_REACHABLE 0x100
  ------------------
                      if (current->flags & (JANET_MEM_REACHABLE | JANET_MEM_DISABLED)) {
  ------------------
  |  |  632|   115M|#define JANET_MEM_DISABLED 0x200
  ------------------
  |  Branch (16729:13): [True: 7.21M, False: 108M]
  ------------------
16730|  7.21M|            previous = current;
16731|  7.21M|            current->flags &= ~JANET_MEM_REACHABLE;
  ------------------
  |  |  631|  7.21M|#define JANET_MEM_REACHABLE 0x100
  ------------------
16732|   108M|        } else {
16733|   108M|            janet_vm.block_count--;
16734|   108M|            janet_deinit_block(current);
16735|   108M|            if (NULL != previous) {
  ------------------
  |  Branch (16735:17): [True: 108M, False: 148]
  ------------------
16736|   108M|                previous->data.next = next;
16737|   108M|            } else {
16738|    148|                janet_vm.blocks = next;
16739|    148|            }
16740|   108M|            janet_free(current);
  ------------------
  |  | 2415|   108M|#define janet_free(X) free((X))
  ------------------
16741|   108M|        }
16742|   115M|        current = next;
16743|   115M|    }
16744|       |
16745|  1.11k|#ifdef JANET_EV
16746|       |    /* Sweep threaded abstract types for references to decrement */
16747|  1.11k|    JanetKV *items = janet_vm.threaded_abstracts.data;
16748|  2.23k|    for (int32_t i = 0; i < janet_vm.threaded_abstracts.capacity; i++) {
  ------------------
  |  Branch (16748:25): [True: 1.11k, False: 1.11k]
  ------------------
16749|  1.11k|        if (janet_checktype(items[i].key, JANET_ABSTRACT)) {
  ------------------
  |  |  806|  1.11k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 1.11k]
  |  |  |  Branch (806:6): [Folded, False: 1.11k]
  |  |  ------------------
  |  |  807|  1.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|  1.11k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.11k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.11k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16750|       |
16751|       |            /* If item was not visited during the mark phase, then this
16752|       |             * abstract type isn't present in the heap and needs its refcount
16753|       |             * decremented, and shouuld be removed from table. If the refcount is
16754|       |             * then 0, the item will be collected. This ensures that only one interpreter
16755|       |             * will clean up the threaded abstract. */
16756|       |
16757|       |            /* If not visited... */
16758|      0|            if (!janet_truthy(items[i].value)) {
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
16759|      0|                void *abst = janet_unwrap_abstract(items[i].key);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
16760|      0|                JanetAbstractHead *head = janet_abstract_head(abst);
  ------------------
  |  | 1896|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
16761|      0|                if (head->type->gcperthread) {
  ------------------
  |  Branch (16761:21): [True: 0, False: 0]
  ------------------
16762|      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]
  |  |  ------------------
  ------------------
16763|      0|                }
16764|      0|                janet_abstract_decref_maybe_free(abst);
16765|       |
16766|       |                /* Mark as tombstone in place */
16767|      0|                items[i].key = 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16768|      0|                items[i].value = 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16769|      0|                janet_vm.threaded_abstracts.deleted++;
16770|      0|                janet_vm.threaded_abstracts.count--;
16771|      0|            }
16772|       |
16773|       |            /* Reset for next sweep */
16774|      0|            items[i].value = 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16775|      0|        }
16776|  1.11k|    }
16777|  1.11k|#endif
16778|  1.11k|}
janet_gcalloc:
16781|   216M|void *janet_gcalloc(enum JanetMemoryType type, size_t size) {
16782|   216M|    JanetGCObject *mem;
16783|       |
16784|       |    /* Make sure everything is inited */
16785|   216M|    janet_assert(NULL != janet_vm.cache, "please initialize janet before use");
  ------------------
  |  |  389|   216M|#define janet_assert(c, m) do { \
  |  |  390|   216M|    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: 216M]
  |  |  ------------------
  |  |  391|   216M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 216M]
  |  |  ------------------
  ------------------
16786|   216M|    mem = janet_malloc(size);
  ------------------
  |  | 2406|   216M|#define janet_malloc(X) malloc((X))
  ------------------
16787|       |
16788|       |    /* Check for bad malloc */
16789|   216M|    if (NULL == mem) {
  ------------------
  |  Branch (16789:9): [True: 0, False: 216M]
  ------------------
16790|      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]
  |  |  ------------------
  ------------------
16791|      0|    }
16792|       |
16793|       |    /* Configure block */
16794|   216M|    mem->flags = type;
16795|       |
16796|       |    /* Prepend block to heap list */
16797|   216M|    janet_vm.next_collection += size;
16798|   216M|    if (type < JANET_MEMORY_TABLE_WEAKK) {
  ------------------
  |  Branch (16798:9): [True: 216M, False: 18.4E]
  ------------------
16799|       |        /* normal heap */
16800|   216M|        mem->data.next = janet_vm.blocks;
16801|   216M|        janet_vm.blocks = mem;
16802|  18.4E|    } else {
16803|       |        /* weak heap */
16804|  18.4E|        mem->data.next = janet_vm.weak_blocks;
16805|  18.4E|        janet_vm.weak_blocks = mem;
16806|  18.4E|    }
16807|   216M|    janet_vm.block_count++;
16808|       |
16809|   216M|    return (void *)mem;
16810|   216M|}
janet_collect:
16833|   581M|void janet_collect(void) {
16834|   581M|    uint32_t i;
16835|   581M|    if (janet_vm.gc_suspend) return;
  ------------------
  |  Branch (16835:9): [True: 581M, False: 1.11k]
  ------------------
16836|  1.11k|    depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|  1.11k|#define JANET_RECURSION_GUARD 1024
  ------------------
16837|  1.11k|    janet_vm.gc_mark_phase = 1;
16838|       |    /* Try to prevent many major collections back to back.
16839|       |     * A full collection will take O(janet_vm.block_count) time.
16840|       |     * If we have a large heap, make sure our interval is not too
16841|       |     * small so we won't make many collections over it. This is just a
16842|       |     * heuristic for automatically changing the gc interval */
16843|  1.11k|    if (janet_vm.block_count * 8 > janet_vm.gc_interval) {
  ------------------
  |  Branch (16843:9): [True: 27, False: 1.08k]
  ------------------
16844|     27|        janet_vm.gc_interval = janet_vm.block_count * sizeof(JanetGCObject);
16845|     27|    }
16846|  1.11k|    orig_rootcount = janet_vm.root_count;
16847|  1.11k|#ifdef JANET_EV
16848|  1.11k|    janet_ev_mark();
16849|  1.11k|#endif
16850|  1.11k|    if (janet_vm.root_fiber != NULL) { /* Can be NULL if janet_collect called outside of interpreter loop */
  ------------------
  |  Branch (16850:9): [True: 1.11k, False: 0]
  ------------------
16851|  1.11k|        janet_mark_fiber(janet_vm.root_fiber);
16852|  1.11k|    }
16853|  5.58k|    for (i = 0; i < orig_rootcount; i++)
  ------------------
  |  Branch (16853:17): [True: 4.46k, False: 1.11k]
  ------------------
16854|  4.46k|        janet_mark(janet_vm.roots[i]);
16855|  1.11k|    while (orig_rootcount < janet_vm.root_count) {
  ------------------
  |  Branch (16855:12): [True: 0, False: 1.11k]
  ------------------
16856|      0|        Janet x = janet_vm.roots[--janet_vm.root_count];
16857|      0|        janet_mark(x);
16858|      0|    }
16859|  1.11k|    janet_vm.gc_mark_phase = 0;
16860|  1.11k|    janet_sweep();
16861|  1.11k|    janet_vm.next_collection = 0;
16862|  1.11k|    janet_free_all_scratch();
16863|  1.11k|}
janet_gcroot:
16868|  30.1k|void janet_gcroot(Janet root) {
16869|  30.1k|    size_t newcount = janet_vm.root_count + 1;
16870|  30.1k|    if (newcount > janet_vm.root_capacity) {
  ------------------
  |  Branch (16870:9): [True: 14.8k, False: 15.3k]
  ------------------
16871|  14.8k|        size_t newcap = 2 * newcount;
16872|  14.8k|        janet_vm.roots = janet_realloc(janet_vm.roots, sizeof(Janet) * newcap);
  ------------------
  |  | 2409|  14.8k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
16873|  14.8k|        if (NULL == janet_vm.roots) {
  ------------------
  |  Branch (16873:13): [True: 0, False: 14.8k]
  ------------------
16874|      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]
  |  |  ------------------
  ------------------
16875|      0|        }
16876|  14.8k|        janet_vm.root_capacity = newcap;
16877|  14.8k|    }
16878|  30.1k|    janet_vm.roots[janet_vm.root_count] = root;
16879|  30.1k|    janet_vm.root_count = newcount;
16880|  30.1k|}
janet_gcunroot:
16899|  14.4k|int janet_gcunroot(Janet root) {
16900|  14.4k|    Janet *vtop = janet_vm.roots + janet_vm.root_count;
16901|       |    /* Search from top to bottom as access is most likely LIFO */
16902|  50.8k|    for (Janet *v = janet_vm.roots; v < vtop; v++) {
  ------------------
  |  Branch (16902:37): [True: 50.8k, False: 0]
  ------------------
16903|  50.8k|        if (janet_gc_idequals(root, *v)) {
  ------------------
  |  Branch (16903:13): [True: 14.4k, False: 36.3k]
  ------------------
16904|  14.4k|            *v = janet_vm.roots[--janet_vm.root_count];
16905|  14.4k|            return 1;
16906|  14.4k|        }
16907|  50.8k|    }
16908|      0|    return 0;
16909|  14.4k|}
janet_clear_memory:
16927|  7.64k|void janet_clear_memory(void) {
16928|  7.64k|#ifdef JANET_EV
16929|  7.64k|    JanetKV *items = janet_vm.threaded_abstracts.data;
16930|  15.3k|    for (int32_t i = 0; i < janet_vm.threaded_abstracts.capacity; i++) {
  ------------------
  |  Branch (16930:25): [True: 7.71k, False: 7.64k]
  ------------------
16931|  7.71k|        if (janet_checktype(items[i].key, JANET_ABSTRACT)) {
  ------------------
  |  |  806|  7.71k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 32, False: 7.68k]
  |  |  |  Branch (806:6): [Folded, False: 7.71k]
  |  |  ------------------
  |  |  807|  7.71k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  7.71k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  7.71k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  7.71k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.71k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.71k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16932|     32|            void *abst = janet_unwrap_abstract(items[i].key);
  ------------------
  |  |  866|     32|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
16933|     32|            JanetAbstractHead *head = janet_abstract_head(abst);
  ------------------
  |  | 1896|     32|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
16934|     32|            if (head->type->gcperthread) {
  ------------------
  |  Branch (16934:17): [True: 0, False: 32]
  ------------------
16935|      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]
  |  |  ------------------
  ------------------
16936|      0|            }
16937|     32|            janet_abstract_decref_maybe_free(abst);
16938|     32|        }
16939|  7.71k|    }
16940|  7.64k|#endif
16941|  7.64k|    JanetGCObject *current = janet_vm.blocks;
16942|   108M|    while (NULL != current) {
  ------------------
  |  Branch (16942:12): [True: 108M, False: 7.64k]
  ------------------
16943|   108M|        janet_deinit_block(current);
16944|   108M|        JanetGCObject *next = current->data.next;
16945|   108M|        janet_free(current);
  ------------------
  |  | 2415|   108M|#define janet_free(X) free((X))
  ------------------
16946|   108M|        current = next;
16947|   108M|    }
16948|  7.64k|    janet_vm.blocks = NULL;
16949|  7.64k|    janet_free_all_scratch();
16950|  7.64k|    janet_free(janet_vm.scratch_mem);
  ------------------
  |  | 2415|  7.64k|#define janet_free(X) free((X))
  ------------------
16951|  7.64k|}
janet_gclock:
16954|   147k|int janet_gclock(void) {
16955|   147k|    return janet_vm.gc_suspend++;
16956|   147k|}
janet_gcunlock:
16957|   147k|void janet_gcunlock(int handle) {
16958|   147k|    janet_vm.gc_suspend = handle;
16959|   147k|}
janet_smalloc:
16965|  3.09M|void *janet_smalloc(size_t size) {
16966|  3.09M|    JanetScratch *s = janet_malloc(sizeof(JanetScratch) + size);
  ------------------
  |  | 2406|  3.09M|#define janet_malloc(X) malloc((X))
  ------------------
16967|  3.09M|    if (NULL == s) {
  ------------------
  |  Branch (16967:9): [True: 0, False: 3.09M]
  ------------------
16968|      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]
  |  |  ------------------
  ------------------
16969|      0|    }
16970|  3.09M|    s->finalize = NULL;
16971|  3.09M|    if (janet_vm.scratch_len == janet_vm.scratch_cap) {
  ------------------
  |  Branch (16971:9): [True: 19.4k, False: 3.07M]
  ------------------
16972|  19.4k|        size_t newcap = 2 * janet_vm.scratch_cap + 2;
16973|  19.4k|        JanetScratch **newmem = (JanetScratch **) janet_realloc(janet_vm.scratch_mem, newcap * sizeof(JanetScratch));
  ------------------
  |  | 2409|  19.4k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
16974|  19.4k|        if (NULL == newmem) {
  ------------------
  |  Branch (16974:13): [True: 0, False: 19.4k]
  ------------------
16975|      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]
  |  |  ------------------
  ------------------
16976|      0|        }
16977|  19.4k|        janet_vm.scratch_cap = newcap;
16978|  19.4k|        janet_vm.scratch_mem = newmem;
16979|  19.4k|    }
16980|  3.09M|    janet_vm.scratch_mem[janet_vm.scratch_len++] = s;
16981|  3.09M|    return (char *)(s->mem);
16982|  3.09M|}
janet_srealloc:
16994|  5.47M|void *janet_srealloc(void *mem, size_t size) {
16995|  5.47M|    if (NULL == mem) return janet_smalloc(size);
  ------------------
  |  Branch (16995:9): [True: 2.35M, False: 3.12M]
  ------------------
16996|  3.12M|    JanetScratch *s = janet_mem2scratch(mem);
16997|  3.12M|    if (janet_vm.scratch_len) {
  ------------------
  |  Branch (16997:9): [True: 3.12M, False: 18.4E]
  ------------------
16998|  5.51M|        for (size_t i = janet_vm.scratch_len - 1; ; i--) {
16999|  5.51M|            if (janet_vm.scratch_mem[i] == s) {
  ------------------
  |  Branch (16999:17): [True: 3.12M, False: 2.39M]
  ------------------
17000|  3.12M|                JanetScratch *news = janet_realloc(s, size + sizeof(JanetScratch));
  ------------------
  |  | 2409|  3.12M|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
17001|  3.12M|                if (NULL == news) {
  ------------------
  |  Branch (17001:21): [True: 0, False: 3.12M]
  ------------------
17002|      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]
  |  |  ------------------
  ------------------
17003|      0|                }
17004|  3.12M|                janet_vm.scratch_mem[i] = news;
17005|  3.12M|                return (char *)(news->mem);
17006|  3.12M|            }
17007|  2.39M|            if (i == 0) break;
  ------------------
  |  Branch (17007:17): [True: 0, False: 2.39M]
  ------------------
17008|  2.39M|        }
17009|  3.12M|    }
17010|  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]
  |  |  ------------------
  ------------------
17011|  18.4E|}
janet_sfree:
17018|  2.99M|void janet_sfree(void *mem) {
17019|  2.99M|    if (NULL == mem) return;
  ------------------
  |  Branch (17019:9): [True: 0, False: 2.99M]
  ------------------
17020|  2.99M|    JanetScratch *s = janet_mem2scratch(mem);
17021|  2.99M|    if (janet_vm.scratch_len) {
  ------------------
  |  Branch (17021:9): [True: 2.99M, False: 0]
  ------------------
17022|  4.99M|        for (size_t i = janet_vm.scratch_len - 1; ; i--) {
17023|  4.99M|            if (janet_vm.scratch_mem[i] == s) {
  ------------------
  |  Branch (17023:17): [True: 2.99M, False: 1.99M]
  ------------------
17024|  2.99M|                janet_vm.scratch_mem[i] = janet_vm.scratch_mem[--janet_vm.scratch_len];
17025|  2.99M|                free_one_scratch(s);
17026|  2.99M|                return;
17027|  2.99M|            }
17028|  1.99M|            if (i == 0) break;
  ------------------
  |  Branch (17028:17): [True: 0, False: 1.99M]
  ------------------
17029|  1.99M|        }
17030|  2.99M|    }
17031|  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]
  |  |  ------------------
  ------------------
17032|  18.4E|}
janet_unwrap_s64:
17153|  25.0k|int64_t janet_unwrap_s64(Janet x) {
17154|  25.0k|    switch (janet_type(x)) {
  ------------------
  |  |  795|  25.0k|    (isnan((x).number) \
  |  |  796|  25.0k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  25.0k|        : JANET_NUMBER)
  ------------------
  |  Branch (17154:13): [True: 9.99k, False: 15.0k]
  ------------------
17155|     68|        default:
  ------------------
  |  Branch (17155:9): [True: 68, False: 24.9k]
  ------------------
17156|     68|            break;
17157|  15.0k|        case JANET_NUMBER : {
  ------------------
  |  Branch (17157:9): [True: 15.0k, False: 9.99k]
  ------------------
17158|  15.0k|            double d = janet_unwrap_number(x);
  ------------------
  |  |  839|  15.0k|#define janet_unwrap_number(x) ((x).number)
  ------------------
17159|  15.0k|            if (!janet_checkint64range(d)) break;
  ------------------
  |  |  964|  15.0k|#define janet_checkint64range(x) ((x) >= JANET_INTMIN_DOUBLE && (x) <= JANET_INTMAX_DOUBLE && (x) == (int64_t)(x))
  |  |  ------------------
  |  |  |  |  166|  30.1k|#define JANET_INTMIN_DOUBLE (-9007199254740992.0)
  |  |  ------------------
  |  |               #define janet_checkint64range(x) ((x) >= JANET_INTMIN_DOUBLE && (x) <= JANET_INTMAX_DOUBLE && (x) == (int64_t)(x))
  |  |  ------------------
  |  |  |  |  165|  30.1k|#define JANET_INTMAX_DOUBLE 9007199254740992.0
  |  |  ------------------
  |  |  |  Branch (964:35): [True: 15.0k, False: 0]
  |  |  |  Branch (964:65): [True: 15.0k, False: 2]
  |  |  |  Branch (964:95): [True: 15.0k, False: 0]
  |  |  ------------------
  ------------------
17160|  15.0k|            return (int64_t) d;
17161|  15.0k|        }
17162|     17|        case JANET_STRING: {
  ------------------
  |  Branch (17162:9): [True: 17, False: 25.0k]
  ------------------
17163|     17|            int64_t value;
17164|     17|            const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  863|     17|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
17165|     17|            if (janet_scan_int64(str, janet_string_length(str), &value))
  ------------------
  |  | 1812|     17|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|     17|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (17165:17): [True: 5, False: 12]
  ------------------
17166|      5|                return value;
17167|     12|            break;
17168|     17|        }
17169|  9.90k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (17169:9): [True: 9.90k, False: 15.1k]
  ------------------
17170|  9.90k|            void *abst = janet_unwrap_abstract(x);
  ------------------
  |  |  866|  9.90k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
17171|  9.90k|            if (janet_abstract_type(abst) == &janet_s64_type ||
  ------------------
  |  | 1898|  9.90k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|  9.90k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (17171:17): [True: 9.88k, False: 16]
  ------------------
17172|     16|                    (janet_abstract_type(abst) == &janet_u64_type))
  ------------------
  |  | 1898|     16|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|     16|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (17172:21): [True: 15, False: 1]
  ------------------
17173|  9.90k|                return *(int64_t *)abst;
17174|      1|            break;
17175|  9.90k|        }
17176|  25.0k|    }
17177|     83|    janet_panicf("can not convert %t %q to 64 bit signed integer", x, x);
17178|      0|    return 0;
17179|  25.0k|}
janet_unwrap_u64:
17181|  7.64k|uint64_t janet_unwrap_u64(Janet x) {
17182|  7.64k|    switch (janet_type(x)) {
  ------------------
  |  |  795|  7.64k|    (isnan((x).number) \
  |  |  796|  7.64k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  7.64k|        : JANET_NUMBER)
  ------------------
  |  Branch (17182:13): [True: 4.00k, False: 3.64k]
  ------------------
17183|     63|        default:
  ------------------
  |  Branch (17183:9): [True: 63, False: 7.58k]
  ------------------
17184|     63|            break;
17185|  3.64k|        case JANET_NUMBER : {
  ------------------
  |  Branch (17185:9): [True: 3.64k, False: 4.00k]
  ------------------
17186|  3.64k|            double d = janet_unwrap_number(x);
  ------------------
  |  |  839|  3.64k|#define janet_unwrap_number(x) ((x).number)
  ------------------
17187|  3.64k|            if (!janet_checkuint64range(d)) break;
  ------------------
  |  |  965|  3.64k|#define janet_checkuint64range(x) ((x) >= 0 && (x) <= JANET_INTMAX_DOUBLE && (x) == (uint64_t)(x))
  |  |  ------------------
  |  |  |  |  165|  7.27k|#define JANET_INTMAX_DOUBLE 9007199254740992.0
  |  |  ------------------
  |  |  |  Branch (965:36): [True: 3.63k, False: 8]
  |  |  |  Branch (965:48): [True: 3.63k, False: 2]
  |  |  |  Branch (965:78): [True: 3.63k, False: 0]
  |  |  ------------------
  ------------------
17188|  3.63k|            return (uint64_t) d;
17189|  3.64k|        }
17190|     12|        case JANET_STRING: {
  ------------------
  |  Branch (17190:9): [True: 12, False: 7.63k]
  ------------------
17191|     12|            uint64_t value;
17192|     12|            const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  863|     12|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
17193|     12|            if (janet_scan_uint64(str, janet_string_length(str), &value))
  ------------------
  |  | 1812|     12|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|     12|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (17193:17): [True: 5, False: 7]
  ------------------
17194|      5|                return value;
17195|      7|            break;
17196|     12|        }
17197|  3.92k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (17197:9): [True: 3.92k, False: 3.71k]
  ------------------
17198|  3.92k|            void *abst = janet_unwrap_abstract(x);
  ------------------
  |  |  866|  3.92k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
17199|  3.92k|            if (janet_abstract_type(abst) == &janet_s64_type ||
  ------------------
  |  | 1898|  3.92k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|  3.92k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (17199:17): [True: 47, False: 3.88k]
  ------------------
17200|  3.88k|                    (janet_abstract_type(abst) == &janet_u64_type))
  ------------------
  |  | 1898|  3.88k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|  3.88k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (17200:21): [True: 3.88k, False: 1]
  ------------------
17201|  3.92k|                return *(uint64_t *)abst;
17202|      1|            break;
17203|  3.92k|        }
17204|  7.64k|    }
17205|     81|    janet_panicf("can not convert %t %q to a 64 bit unsigned integer", x, x);
17206|      0|    return 0;
17207|  7.64k|}
janet_is_int:
17209|      1|JanetIntType janet_is_int(Janet x) {
17210|      1|    if (!janet_checktype(x, JANET_ABSTRACT)) return JANET_INT_NONE;
  ------------------
  |  |  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 (17210:9): [True: 0, False: 1]
  ------------------
17211|      1|    const JanetAbstractType *at = janet_abstract_type(janet_unwrap_abstract(x));
  ------------------
  |  | 1898|      1|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|      1|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
17212|      1|    return (at == &janet_s64_type) ? JANET_INT_S64 :
  ------------------
  |  Branch (17212:12): [True: 1, False: 0]
  ------------------
17213|      1|           ((at == &janet_u64_type) ? JANET_INT_U64 :
  ------------------
  |  Branch (17213:13): [True: 0, False: 0]
  ------------------
17214|      0|            JANET_INT_NONE);
17215|      1|}
janet_wrap_s64:
17217|  4.15k|Janet janet_wrap_s64(int64_t x) {
17218|  4.15k|    int64_t *box = janet_abstract(&janet_s64_type, sizeof(int64_t));
17219|  4.15k|    *box = (int64_t)x;
17220|  4.15k|    return janet_wrap_abstract(box);
  ------------------
  |  |  851|  4.15k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  4.15k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17221|  4.15k|}
janet_wrap_u64:
17223|  2.54k|Janet janet_wrap_u64(uint64_t x) {
17224|  2.54k|    uint64_t *box = janet_abstract(&janet_u64_type, sizeof(uint64_t));
17225|  2.54k|    *box = (uint64_t)x;
17226|  2.54k|    return janet_wrap_abstract(box);
  ------------------
  |  |  851|  2.54k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  2.54k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17227|  2.54k|}
cfun_it_s64_new:
17231|      5|              "Create a boxed signed 64 bit integer from a string value or a number.") {
17232|      5|    janet_fixarity(argc, 1);
17233|      5|    return janet_wrap_s64(janet_unwrap_s64(argv[0]));
17234|      5|}
cfun_it_u64_new:
17238|      2|              "Create a boxed unsigned 64 bit integer from a string value or a number.") {
17239|      2|    janet_fixarity(argc, 1);
17240|      2|    return janet_wrap_u64(janet_unwrap_u64(argv[0]));
17241|      2|}
cfun_to_bytes:
17282|      1|              "- `:be`: big-endian, most significant byte first\n") {
17283|      1|    janet_arity(argc, 1, 3);
17284|      1|    if (janet_is_int(argv[0]) == JANET_INT_NONE) {
  ------------------
  |  Branch (17284:9): [True: 0, False: 1]
  ------------------
17285|      0|        janet_panicf("int/to-bytes: expected an int/s64 or int/u64, got %q", argv[0]);
17286|      0|    }
17287|       |
17288|      1|    int reverse = 0;
17289|      1|    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 (17289:9): [True: 0, False: 1]
  |  Branch (17289:21): [True: 0, False: 0]
  ------------------
17290|      0|        JanetKeyword endianness_kw = janet_getkeyword(argv, 1);
17291|      0|        if (!janet_cstrcmp(endianness_kw, "le")) {
  ------------------
  |  Branch (17291:13): [True: 0, False: 0]
  ------------------
17292|       |#if JANET_BIG_ENDIAN
17293|       |            reverse = 1;
17294|       |#endif
17295|      0|        } else if (!janet_cstrcmp(endianness_kw, "be")) {
  ------------------
  |  Branch (17295:20): [True: 0, False: 0]
  ------------------
17296|      0|#if JANET_LITTLE_ENDIAN
17297|      0|            reverse = 1;
17298|      0|#endif
17299|      0|        } else {
17300|      0|            janet_panicf("int/to-bytes: expected endianness :le, :be or nil, got %v", argv[1]);
17301|      0|        }
17302|      0|    }
17303|       |
17304|      1|    JanetBuffer *buffer = NULL;
17305|      1|    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 (17305:9): [True: 0, False: 1]
  |  Branch (17305:21): [True: 0, False: 0]
  ------------------
17306|      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 (17306:13): [True: 0, False: 0]
  ------------------
17307|      0|            janet_panicf("int/to-bytes: expected buffer or nil, got %q", argv[2]);
17308|      0|        }
17309|       |
17310|      0|        buffer = janet_unwrap_buffer(argv[2]);
  ------------------
  |  |  862|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
17311|      0|        janet_buffer_extra(buffer, 8);
17312|      1|    } else {
17313|      1|        buffer = janet_buffer(8);
17314|      1|    }
17315|       |
17316|      1|    uint8_t *bytes = janet_unwrap_abstract(argv[0]);
  ------------------
  |  |  866|      1|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
17317|      1|    if (reverse) {
  ------------------
  |  Branch (17317:9): [True: 0, False: 1]
  ------------------
17318|      0|        for (int i = 0; i < 8; ++i) {
  ------------------
  |  Branch (17318:25): [True: 0, False: 0]
  ------------------
17319|      0|            buffer->data[buffer->count + 7 - i] = bytes[i];
17320|      0|        }
17321|      1|    } else {
17322|      1|        memcpy(buffer->data + buffer->count, bytes, 8);
17323|      1|    }
17324|      1|    buffer->count += 8;
17325|       |
17326|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17327|      1|}
janet_lib_inttypes:
17706|  7.16k|void janet_lib_inttypes(JanetTable *env) {
17707|  7.16k|    JanetRegExt it_cfuns[] = {
17708|  7.16k|        JANET_CORE_REG("int/s64", cfun_it_s64_new),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17709|  7.16k|        JANET_CORE_REG("int/u64", cfun_it_u64_new),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17710|  7.16k|        JANET_CORE_REG("int/to-number", cfun_to_number),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17711|  7.16k|        JANET_CORE_REG("int/to-bytes", cfun_to_bytes),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17712|  7.16k|        JANET_REG_END
  ------------------
  |  | 2109|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
17713|  7.16k|    };
17714|       |    janet_core_cfuns_ext(env, NULL, it_cfuns);
17715|  7.16k|    janet_register_abstract_type(&janet_s64_type);
17716|  7.16k|    janet_register_abstract_type(&janet_u64_type);
17717|  7.16k|}
cfun_io_temp:
17854|      3|              "Raises an error on failure.") {
17855|      3|    janet_sandbox_assert(JANET_SANDBOX_FS_TEMP);
  ------------------
  |  | 2032|      3|#define JANET_SANDBOX_FS_TEMP 1024
  ------------------
17856|      3|    (void)argv;
17857|      3|    janet_fixarity(argc, 0);
17858|       |    // XXX use mkostemp when we can to avoid CLOEXEC race.
17859|      3|    FILE *tmp = tmpfile();
17860|      3|    if (!tmp)
  ------------------
  |  Branch (17860:9): [True: 0, False: 3]
  ------------------
17861|      0|        janet_panicf("unable to create temporary file - %s", janet_strerror(errno));
17862|      3|    return janet_makefile(tmp, JANET_FILE_WRITE | JANET_FILE_READ | JANET_FILE_BINARY);
  ------------------
  |  | 2274|      3|#define JANET_FILE_WRITE 1
  ------------------
                  return janet_makefile(tmp, JANET_FILE_WRITE | JANET_FILE_READ | JANET_FILE_BINARY);
  ------------------
  |  | 2275|      3|#define JANET_FILE_READ 2
  ------------------
                  return janet_makefile(tmp, JANET_FILE_WRITE | JANET_FILE_READ | JANET_FILE_BINARY);
  ------------------
  |  | 2280|      3|#define JANET_FILE_BINARY 64
  ------------------
17863|      3|}
cfun_io_fopen:
17879|     40|              "See fopen (<stdio.h>, C99) for further details.") {
17880|     40|    janet_arity(argc, 1, 3);
17881|     40|    const uint8_t *fname = janet_getstring(argv, 0);
17882|     40|    const uint8_t *fmode;
17883|     40|    int32_t flags;
17884|     40|    if (argc == 2) {
  ------------------
  |  Branch (17884:9): [True: 6, False: 34]
  ------------------
17885|      6|        fmode = janet_getkeyword(argv, 1);
17886|      6|        flags = checkflags(fmode);
17887|     34|    } else {
17888|     34|        fmode = (const uint8_t *)"r";
17889|     34|        janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2028|     34|#define JANET_SANDBOX_FS_READ 64
  ------------------
17890|     34|        flags = JANET_FILE_READ;
  ------------------
  |  | 2275|     34|#define JANET_FILE_READ 2
  ------------------
17891|     34|    }
17892|     40|    FILE *f = fopen((const char *)fname, (const char *)fmode);
17893|     40|    size_t bufsize = BUFSIZ;
17894|     40|    if (f != NULL) {
  ------------------
  |  Branch (17894:9): [True: 4, False: 36]
  ------------------
17895|      4|#if !(defined(JANET_WINDOWS) || defined(JANET_PLAN9))
17896|      4|        struct stat st;
17897|      4|        fstat(fileno(f), &st);
17898|      4|        if (S_ISDIR(st.st_mode)) {
  ------------------
  |  Branch (17898:13): [True: 1, False: 3]
  ------------------
17899|      1|            fclose(f);
17900|      1|            janet_panicf("cannot open directory: %s", fname);
17901|      1|        }
17902|      3|#endif
17903|      3|        bufsize = janet_optsize(argv, argc, 2, BUFSIZ);
17904|      3|        if (bufsize != BUFSIZ) {
  ------------------
  |  Branch (17904:13): [True: 0, False: 3]
  ------------------
17905|      0|            int result = setvbuf(f, NULL, bufsize ? _IOFBF : _IONBF, bufsize);
  ------------------
  |  Branch (17905:43): [True: 0, False: 0]
  ------------------
17906|      0|            if (result) {
  ------------------
  |  Branch (17906:17): [True: 0, False: 0]
  ------------------
17907|      0|                janet_panic("failed to set buffer size for file");
17908|      0|            }
17909|      0|        }
17910|      3|    }
17911|     39|    return f ? janet_wrap_abstract(makef(f, flags, bufsize))
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (17911:12): [True: 2, False: 37]
  ------------------
17912|     39|           : (flags & JANET_FILE_NONIL) ? (janet_panicf("failed to open file %s: %s", fname, janet_strerror(errno)), janet_wrap_nil())
  ------------------
  |  | 2282|     37|#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 (17912:14): [True: 0, False: 37]
  ------------------
17913|     37|           : janet_wrap_nil();
  ------------------
  |  |  831|     37|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     37|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     37|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     37|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17914|     39|}
cfun_io_fread:
17938|      2|              "* n (integer) - read up to n bytes from the file") {
17939|      2|    janet_arity(argc, 2, 3);
17940|      2|    JanetFile *iof = janet_getabstract(argv, 0, &janet_file_type);
17941|      2|    if (iof->flags & JANET_FILE_CLOSED) janet_panic("file is closed");
  ------------------
  |  | 2279|      2|#define JANET_FILE_CLOSED 32
  ------------------
  |  Branch (17941:9): [True: 0, False: 2]
  ------------------
17942|      2|    JanetBuffer *buffer;
17943|      2|    if (argc == 2) {
  ------------------
  |  Branch (17943:9): [True: 0, False: 2]
  ------------------
17944|      0|        buffer = janet_buffer(0);
17945|      2|    } else {
17946|      2|        buffer = janet_getbuffer(argv, 2);
17947|      2|    }
17948|      2|    int32_t bufstart = buffer->count;
17949|      2|    if (janet_checktype(argv[1], JANET_KEYWORD)) {
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17950|      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))
  ------------------
17951|      0|        if (!janet_cstrcmp(sym, "all")) {
  ------------------
  |  Branch (17951:13): [True: 0, False: 0]
  ------------------
17952|      0|            int32_t sizeBefore;
17953|      0|            do {
17954|      0|                sizeBefore = buffer->count;
17955|      0|                read_chunk(iof, buffer, 4096);
17956|      0|            } while (sizeBefore < buffer->count);
  ------------------
  |  Branch (17956:22): [True: 0, False: 0]
  ------------------
17957|       |            /* Never return nil for :all */
17958|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17959|      0|        } else if (!janet_cstrcmp(sym, "line")) {
  ------------------
  |  Branch (17959:20): [True: 0, False: 0]
  ------------------
17960|      0|            for (;;) {
17961|      0|                int x = fgetc(iof->file);
17962|      0|                if (x != EOF) janet_buffer_push_u8(buffer, (uint8_t)x);
  ------------------
  |  Branch (17962:21): [True: 0, False: 0]
  ------------------
17963|      0|                if (x == EOF || x == '\n') break;
  ------------------
  |  Branch (17963:21): [True: 0, False: 0]
  |  Branch (17963:33): [True: 0, False: 0]
  ------------------
17964|      0|            }
17965|      0|        } else {
17966|      0|            janet_panicf("expected one of :all, :line, got %v", argv[1]);
17967|      0|        }
17968|      2|    } else {
17969|      2|        int32_t len = janet_getinteger(argv, 1);
17970|      2|        if (len < 0) janet_panic("expected positive integer");
  ------------------
  |  Branch (17970:13): [True: 0, False: 2]
  ------------------
17971|      2|        read_chunk(iof, buffer, len);
17972|      2|    }
17973|      2|    if (bufstart == buffer->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 (17973:9): [True: 0, False: 2]
  ------------------
17974|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17975|      2|}
janet_file_close:
18028|  22.4k|int janet_file_close(JanetFile *file) {
18029|  22.4k|    int ret = 0;
18030|  22.4k|    if (!(file->flags & (JANET_FILE_NOT_CLOSEABLE | JANET_FILE_CLOSED))) {
  ------------------
  |  | 2278|  22.4k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
                  if (!(file->flags & (JANET_FILE_NOT_CLOSEABLE | JANET_FILE_CLOSED))) {
  ------------------
  |  | 2279|  22.4k|#define JANET_FILE_CLOSED 32
  ------------------
  |  Branch (18030:9): [True: 3, False: 22.4k]
  ------------------
18031|      3|        ret = fclose(file->file);
18032|      3|        file->flags |= JANET_FILE_CLOSED;
  ------------------
  |  | 2279|      3|#define JANET_FILE_CLOSED 32
  ------------------
18033|      3|        file->file = NULL; /* NULL dereference is easier to debug then other problems */
18034|      3|        return ret;
18035|      3|    }
18036|  22.4k|    return 0;
18037|  22.4k|}
cfun_io_fseek:
18076|      2|              "number to handle large files of more than 4GB. Returns the file handle.") {
18077|      2|    janet_arity(argc, 2, 3);
18078|      2|    JanetFile *iof = janet_getabstract(argv, 0, &janet_file_type);
18079|      2|    if (iof->flags & JANET_FILE_CLOSED)
  ------------------
  |  | 2279|      2|#define JANET_FILE_CLOSED 32
  ------------------
  |  Branch (18079:9): [True: 0, False: 2]
  ------------------
18080|      0|        janet_panic("file is closed");
18081|      2|    int64_t offset = 0;
18082|      2|    int whence = SEEK_CUR;
18083|      2|    if (argc >= 2) {
  ------------------
  |  Branch (18083:9): [True: 0, False: 2]
  ------------------
18084|      0|        const uint8_t *whence_sym = janet_getkeyword(argv, 1);
18085|      0|        if (!janet_cstrcmp(whence_sym, "cur")) {
  ------------------
  |  Branch (18085:13): [True: 0, False: 0]
  ------------------
18086|      0|            whence = SEEK_CUR;
18087|      0|        } else if (!janet_cstrcmp(whence_sym, "set")) {
  ------------------
  |  Branch (18087:20): [True: 0, False: 0]
  ------------------
18088|      0|            whence = SEEK_SET;
18089|      0|        } else if (!janet_cstrcmp(whence_sym, "end")) {
  ------------------
  |  Branch (18089:20): [True: 0, False: 0]
  ------------------
18090|      0|            whence = SEEK_END;
18091|      0|        } else {
18092|      0|            janet_panicf("expected one of :cur, :set, :end, got %v", argv[1]);
18093|      0|        }
18094|      0|        if (argc == 3) {
  ------------------
  |  Branch (18094:13): [True: 0, False: 0]
  ------------------
18095|      0|            offset = (int64_t) janet_getinteger64(argv, 2);
18096|      0|        }
18097|      0|    }
18098|      2|    if (fseek(iof->file, offset, whence)) janet_panic("error seeking file");
  ------------------
  |  Branch (18098:9): [True: 0, False: 2]
  ------------------
18099|      2|    return argv[0];
18100|      2|}
janet_dynfile:
18200|   204k|FILE *janet_dynfile(const char *name, FILE *def) {
18201|   204k|    Janet x = janet_dyn(name);
18202|   204k|    if (!janet_checktype(x, JANET_ABSTRACT)) return def;
  ------------------
  |  |  806|   204k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 204k]
  |  |  ------------------
  |  |  807|   204k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   204k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   204k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   204k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   204k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   204k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (18202:9): [True: 204k, False: 0]
  ------------------
18203|      0|    void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18204|      0|    if (janet_abstract_type(abstract) != &janet_file_type) return def;
  ------------------
  |  | 1898|      0|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (18204:9): [True: 0, False: 0]
  ------------------
18205|      0|    JanetFile *iofile = abstract;
18206|      0|    return iofile->file;
18207|      0|}
cfun_io_print:
18290|  1.71k|              "a buffer. Returns nil.") {
18291|       |    return cfun_io_print_impl(argc, argv, 1, "out", stdout);
18292|  1.71k|}
cfun_io_prin:
18296|     17|              "Same as `print`, but does not add trailing newline.") {
18297|       |    return cfun_io_print_impl(argc, argv, 0, "out", stdout);
18298|     17|}
cfun_io_eprin:
18308|      6|              "Same as `prin`, but uses `(dyn :err stderr)` instead of `(dyn :out stdout)`.") {
18309|       |    return cfun_io_print_impl(argc, argv, 0, "err", stderr);
18310|      6|}
cfun_io_xprint:
18316|      2|              "to is the first argument, and is otherwise the same as `print`. Returns nil.") {
18317|      2|    janet_arity(argc, 1, -1);
18318|       |    return cfun_io_print_impl_x(argc, argv, 1, NULL, 1, argv[0]);
18319|      2|}
cfun_io_xprin:
18324|     23|              "to is the first argument, and is otherwise the same as `prin`. Returns nil.") {
18325|     23|    janet_arity(argc, 1, -1);
18326|       |    return cfun_io_print_impl_x(argc, argv, 0, NULL, 1, argv[0]);
18327|     23|}
cfun_io_printf:
18396|      2|              "Prints output formatted as if with `(string/format fmt ;xs)` to `(dyn :out stdout)` with a trailing newline.") {
18397|       |    return cfun_io_printf_impl(argc, argv, 1, "out", stdout);
18398|      2|}
cfun_io_prinf:
18402|     14|              "Like `printf` but with no trailing newline.") {
18403|       |    return cfun_io_printf_impl(argc, argv, 0, "out", stdout);
18404|     14|}
cfun_io_eprinf:
18414|    159|              "Like `eprintf` but with no trailing newline.") {
18415|       |    return cfun_io_printf_impl(argc, argv, 0, "err", stderr);
18416|    159|}
cfun_io_xprinf:
18427|      3|              "Like `prinf` but prints to an explicit file or value `to`. Returns nil.") {
18428|      3|    janet_arity(argc, 2, -1);
18429|       |    return cfun_io_printf_impl_x(argc, argv, 0, NULL, 1, argv[0]);
18430|      3|}
cfun_io_flush:
18452|      3|              "Flush `(dyn :out stdout)` if it is a file, otherwise do nothing.") {
18453|      3|    janet_fixarity(argc, 0);
18454|      3|    (void) argv;
18455|      3|    janet_flusher("out", stdout);
18456|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18457|      3|}
janet_dynprintf:
18468|   243k|void janet_dynprintf(const char *name, FILE *dflt_file, const char *format, ...) {
18469|   243k|    va_list args;
18470|   243k|    va_start(args, format);
18471|   243k|    JanetType xtype;
18472|   243k|    Janet x;
18473|   243k|    if (!name || name[0] == '\0') { /* Allow NULL or empty string to just use dflt_file directly */
  ------------------
  |  Branch (18473:9): [True: 0, False: 243k]
  |  Branch (18473:18): [True: 0, False: 243k]
  ------------------
18474|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18475|      0|        xtype = JANET_NIL;
18476|   243k|    } else {
18477|   243k|        x = janet_dyn(name);
18478|   243k|        xtype = janet_type(x);
  ------------------
  |  |  795|   243k|    (isnan((x).number) \
  |  |  796|   243k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   243k|        : JANET_NUMBER)
  ------------------
  |  Branch (18478:17): [True: 243k, False: 0]
  ------------------
18479|   243k|    }
18480|   243k|    switch (xtype) {
18481|      0|        default:
  ------------------
  |  Branch (18481:9): [True: 0, False: 243k]
  ------------------
18482|       |            /* Other values simply do nothing */
18483|      0|            break;
18484|   243k|        case JANET_NIL:
  ------------------
  |  Branch (18484:9): [True: 243k, False: 0]
  ------------------
18485|   243k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (18485:9): [True: 0, False: 243k]
  ------------------
18486|   243k|            FILE *f = dflt_file;
18487|   243k|            JanetBuffer buffer;
18488|   243k|            int32_t len = 0;
18489|  1.97M|            while (format[len]) len++;
  ------------------
  |  Branch (18489:20): [True: 1.72M, False: 243k]
  ------------------
18490|   243k|            janet_buffer_init(&buffer, len);
18491|   243k|            janet_formatbv(&buffer, format, args);
18492|   243k|            if (xtype == JANET_ABSTRACT) {
  ------------------
  |  Branch (18492:17): [True: 0, False: 243k]
  ------------------
18493|      0|                void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18494|      0|                if (janet_abstract_type(abstract) != &janet_file_type)
  ------------------
  |  | 1898|      0|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (18494:21): [True: 0, False: 0]
  ------------------
18495|      0|                    break;
18496|      0|                JanetFile *iofile = abstract;
18497|      0|                io_assert_writeable(iofile);
18498|      0|                f = iofile->file;
18499|      0|            }
18500|   243k|            fwrite(buffer.data, buffer.count, 1, f);
18501|   243k|            janet_buffer_deinit(&buffer);
18502|   243k|            break;
18503|   243k|        }
18504|      0|        case JANET_FUNCTION: {
  ------------------
  |  Branch (18504:9): [True: 0, False: 243k]
  ------------------
18505|      0|            JanetFunction *fun = janet_unwrap_function(x);
  ------------------
  |  |  868|      0|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
18506|      0|            int32_t len = 0;
18507|      0|            while (format[len]) len++;
  ------------------
  |  Branch (18507:20): [True: 0, False: 0]
  ------------------
18508|      0|            JanetBuffer *buf = janet_buffer(len);
18509|      0|            janet_formatbv(buf, format, args);
18510|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18511|      0|            janet_call(fun, 1, args);
18512|      0|            break;
18513|   243k|        }
18514|      0|        case JANET_BUFFER:
  ------------------
  |  Branch (18514:9): [True: 0, False: 243k]
  ------------------
18515|      0|            janet_formatbv(janet_unwrap_buffer(x), format, args);
  ------------------
  |  |  862|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
18516|      0|            break;
18517|   243k|    }
18518|   243k|    va_end(args);
18519|   243k|    return;
18520|   243k|}
janet_getfile:
18528|      1|FILE *janet_getfile(const Janet *argv, int32_t n, int32_t *flags) {
18529|      1|    JanetFile *iof = janet_getabstract(argv, n, &janet_file_type);
18530|      1|    if (NULL != flags) *flags = iof->flags;
  ------------------
  |  Branch (18530:9): [True: 0, False: 1]
  ------------------
18531|      1|    return iof->file;
18532|      1|}
janet_makefile:
18538|  21.4k|Janet janet_makefile(FILE *f, int32_t flags) {
18539|  21.4k|    return janet_wrap_abstract(makef(f, flags, BUFSIZ));
  ------------------
  |  |  851|  21.4k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  21.4k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  21.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  21.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18540|  21.4k|}
janet_lib_io:
18553|  7.16k|void janet_lib_io(JanetTable *env) {
18554|  7.16k|    JanetRegExt io_cfuns[] = {
18555|  7.16k|        JANET_CORE_REG("print", cfun_io_print),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18556|  7.16k|        JANET_CORE_REG("prin", cfun_io_prin),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18557|  7.16k|        JANET_CORE_REG("printf", cfun_io_printf),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18558|  7.16k|        JANET_CORE_REG("prinf", cfun_io_prinf),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18559|  7.16k|        JANET_CORE_REG("eprin", cfun_io_eprin),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18560|  7.16k|        JANET_CORE_REG("eprint", cfun_io_eprint),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18561|  7.16k|        JANET_CORE_REG("eprintf", cfun_io_eprintf),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18562|  7.16k|        JANET_CORE_REG("eprinf", cfun_io_eprinf),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18563|  7.16k|        JANET_CORE_REG("xprint", cfun_io_xprint),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18564|  7.16k|        JANET_CORE_REG("xprin", cfun_io_xprin),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18565|  7.16k|        JANET_CORE_REG("xprintf", cfun_io_xprintf),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18566|  7.16k|        JANET_CORE_REG("xprinf", cfun_io_xprinf),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18567|  7.16k|        JANET_CORE_REG("flush", cfun_io_flush),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18568|  7.16k|        JANET_CORE_REG("eflush", cfun_io_eflush),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18569|  7.16k|        JANET_CORE_REG("file/temp", cfun_io_temp),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18570|  7.16k|        JANET_CORE_REG("file/open", cfun_io_fopen),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18571|  7.16k|        JANET_CORE_REG("file/close", cfun_io_fclose),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18572|  7.16k|        JANET_CORE_REG("file/read", cfun_io_fread),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18573|  7.16k|        JANET_CORE_REG("file/write", cfun_io_fwrite),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18574|  7.16k|        JANET_CORE_REG("file/flush", cfun_io_fflush),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18575|  7.16k|        JANET_CORE_REG("file/seek", cfun_io_fseek),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18576|  7.16k|        JANET_CORE_REG("file/tell", cfun_io_ftell),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18577|  7.16k|        JANET_REG_END
  ------------------
  |  | 2109|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
18578|  7.16k|    };
18579|  7.16k|    janet_core_cfuns_ext(env, NULL, io_cfuns);
18580|  7.16k|    janet_register_abstract_type(&janet_file_type);
18581|  7.16k|    int default_flags = JANET_FILE_NOT_CLOSEABLE | JANET_FILE_SERIALIZABLE;
  ------------------
  |  | 2278|  7.16k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
                  int default_flags = JANET_FILE_NOT_CLOSEABLE | JANET_FILE_SERIALIZABLE;
  ------------------
  |  | 2281|  7.16k|#define JANET_FILE_SERIALIZABLE 128
  ------------------
18582|       |    /* stdout */
18583|  7.16k|    JANET_CORE_DEF(env, "stdout",
  ------------------
  |  |  481|  7.16k|#define JANET_CORE_DEF(ENV, NAME, X, DOC) janet_core_def_sm(ENV, NAME, X, DOC, NULL, 0)
  ------------------
18584|  7.16k|                   janet_makefile(stdout, JANET_FILE_APPEND | default_flags),
18585|  7.16k|                   "The standard output file.");
18586|       |    /* stderr */
18587|  7.16k|    JANET_CORE_DEF(env, "stderr",
  ------------------
  |  |  481|  7.16k|#define JANET_CORE_DEF(ENV, NAME, X, DOC) janet_core_def_sm(ENV, NAME, X, DOC, NULL, 0)
  ------------------
18588|  7.16k|                   janet_makefile(stderr, JANET_FILE_APPEND | default_flags),
18589|  7.16k|                   "The standard error file.");
18590|       |    /* stdin */
18591|  7.16k|    JANET_CORE_DEF(env, "stdin",
  ------------------
  |  |  481|  7.16k|#define JANET_CORE_DEF(ENV, NAME, X, DOC) janet_core_def_sm(ENV, NAME, X, DOC, NULL, 0)
  ------------------
18592|  7.16k|                   janet_makefile(stdin, JANET_FILE_READ | default_flags),
18593|  7.16k|                   "The standard input file.");
18594|       |
18595|  7.16k|}
janet_marshal_size:
18976|    990|void janet_marshal_size(JanetMarshalContext *ctx, size_t value) {
18977|    990|    janet_marshal_int64(ctx, (int64_t) value);
18978|    990|}
janet_marshal_int64:
18980|  1.00k|void janet_marshal_int64(JanetMarshalContext *ctx, int64_t value) {
18981|  1.00k|    MarshalState *st = (MarshalState *)(ctx->m_state);
18982|  1.00k|    push64(st, (uint64_t) value);
18983|  1.00k|}
janet_marshal_int:
18985|  1.98k|void janet_marshal_int(JanetMarshalContext *ctx, int32_t value) {
18986|  1.98k|    MarshalState *st = (MarshalState *)(ctx->m_state);
18987|  1.98k|    pushint(st, value);
18988|  1.98k|}
janet_marshal_abstract:
19030|  1.00k|void janet_marshal_abstract(JanetMarshalContext *ctx, void *abstract) {
19031|  1.00k|    MarshalState *st = (MarshalState *)(ctx->m_state);
19032|  1.00k|    Janet x = janet_wrap_abstract(abstract);
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19033|  1.00k|    MARK_SEEN();
  ------------------
  |  |19025|  1.00k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (19025:14): [True: 1.00k, False: 0]
  |  |  ------------------
  |  |19026|  1.00k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|  1.00k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|  1.00k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |19027|  1.00k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (19027:16): [Folded, False: 1.00k]
  |  |  ------------------
  ------------------
19034|  1.00k|}
janet_marshal_flags:
19036|    990|int janet_marshal_flags(JanetMarshalContext *ctx) {
19037|    990|    return ctx->flags;
19038|    990|}
janet_marshal:
19296|  16.0k|    int flags) {
19297|  16.0k|    MarshalState st;
19298|  16.0k|    st.buf = buf;
19299|  16.0k|    st.nextid = 0;
19300|  16.0k|    st.seen_defs = NULL;
19301|  16.0k|    st.seen_envs = NULL;
19302|  16.0k|    st.rreg = rreg;
19303|  16.0k|    st.maybe_cycles = !(flags & JANET_MARSHAL_NO_CYCLES);
  ------------------
  |  | 1911|  16.0k|#define JANET_MARSHAL_NO_CYCLES 0x40000
  ------------------
19304|  16.0k|    janet_table_init(&st.seen, 0);
19305|  16.0k|    marshal_one(&st, x, flags);
19306|  16.0k|    janet_table_deinit(&st.seen);
19307|  16.0k|    janet_v_free(st.seen_envs);
  ------------------
  |  |  711|  16.0k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  719|    330|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (711:34): [True: 330, False: 15.7k]
  |  |  ------------------
  ------------------
19308|       |    janet_v_free(st.seen_defs);
  ------------------
  |  |  711|  16.0k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  719|  4.99k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (711:34): [True: 4.99k, False: 11.0k]
  |  |  ------------------
  ------------------
19309|  16.0k|}
janet_unmarshal_int:
19834|  1.98k|int32_t janet_unmarshal_int(JanetMarshalContext *ctx) {
19835|  1.98k|    UnmarshalState *st = (UnmarshalState *)(ctx->u_state);
19836|  1.98k|    return readint(st, &(ctx->data));
19837|  1.98k|}
janet_unmarshal_size:
19839|    990|size_t janet_unmarshal_size(JanetMarshalContext *ctx) {
19840|    990|    return (size_t) janet_unmarshal_int64(ctx);
19841|    990|}
janet_unmarshal_int64:
19843|  1.00k|int64_t janet_unmarshal_int64(JanetMarshalContext *ctx) {
19844|  1.00k|    UnmarshalState *st = (UnmarshalState *)(ctx->u_state);
19845|  1.00k|    return read64(st, &(ctx->data));
19846|  1.00k|}
janet_unmarshal_abstract_reuse:
19880|  1.00k|void janet_unmarshal_abstract_reuse(JanetMarshalContext *ctx, void *p) {
19881|  1.00k|    UnmarshalState *st = (UnmarshalState *)(ctx->u_state);
19882|  1.00k|    if (ctx->at == NULL) {
  ------------------
  |  Branch (19882:9): [True: 0, False: 1.00k]
  ------------------
19883|      0|        janet_panicf("janet_unmarshal_abstract called more than once");
19884|      0|    }
19885|  1.00k|    janet_v_push(st->lookup, janet_wrap_abstract(p));
  ------------------
  |  |  712|  1.00k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  1.00k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  1.00k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  1.00k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  1.00k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  1.00k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  1.00k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 0, False: 1.00k]
  |  |  |  |  |  |  |  Branch (723:50): [True: 3, False: 1.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|      3|#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))
  |  |  ------------------
  |  |  |  |  721|  1.00k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  1.00k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19886|       |    ctx->at = NULL;
19887|  1.00k|}
janet_unmarshal_abstract:
19889|  1.00k|void *janet_unmarshal_abstract(JanetMarshalContext *ctx, size_t size) {
19890|  1.00k|    void *p = janet_abstract(ctx->at, size);
19891|  1.00k|    janet_unmarshal_abstract_reuse(ctx, p);
19892|  1.00k|    return p;
19893|  1.00k|}
janet_unmarshal_flags:
19907|    990|int janet_unmarshal_flags(JanetMarshalContext *ctx) {
19908|    990|    return ctx->flags;
19909|    990|}
janet_unmarshal:
20252|  8.67k|    const uint8_t **next) {
20253|  8.67k|    UnmarshalState st;
20254|  8.67k|    st.start = bytes;
20255|  8.67k|    st.end = bytes + len;
20256|  8.67k|    st.lookup_defs = NULL;
20257|  8.67k|    st.lookup_envs = NULL;
20258|  8.67k|    st.lookup = NULL;
20259|  8.67k|    st.reg = reg;
20260|  8.67k|    Janet out;
20261|  8.67k|    const uint8_t *nextbytes = unmarshal_one(&st, bytes, &out, flags);
20262|  8.67k|    if (next) *next = nextbytes;
  ------------------
  |  Branch (20262:9): [True: 1.43k, False: 7.24k]
  ------------------
20263|  8.67k|    janet_v_free(st.lookup_defs);
  ------------------
  |  |  711|  8.67k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  719|  7.73k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (711:34): [True: 7.73k, False: 941]
  |  |  ------------------
  ------------------
20264|  8.67k|    janet_v_free(st.lookup_envs);
  ------------------
  |  |  711|  8.67k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  719|  7.49k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (711:34): [True: 7.49k, False: 1.18k]
  |  |  ------------------
  ------------------
20265|       |    janet_v_free(st.lookup);
  ------------------
  |  |  711|  8.67k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  719|  8.28k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (711:34): [True: 8.28k, False: 395]
  |  |  ------------------
  ------------------
20266|  8.67k|    return out;
20267|  8.67k|}
cfun_marshal:
20288|  14.6k|              "unmarshalling.") {
20289|  14.6k|    janet_arity(argc, 1, 4);
20290|  14.6k|    JanetBuffer *buffer;
20291|  14.6k|    JanetTable *rreg = NULL;
20292|  14.6k|    uint32_t flags = 0;
20293|  14.6k|    if (argc > 1) {
  ------------------
  |  Branch (20293:9): [True: 14, False: 14.6k]
  ------------------
20294|     14|        rreg = janet_gettable(argv, 1);
20295|     14|    }
20296|  14.6k|    if (argc > 2) {
  ------------------
  |  Branch (20296:9): [True: 3, False: 14.6k]
  ------------------
20297|      3|        buffer = janet_getbuffer(argv, 2);
20298|  14.6k|    } else {
20299|  14.6k|        buffer = janet_buffer(10);
20300|  14.6k|    }
20301|  14.6k|    if (argc > 3 && janet_truthy(argv[3])) {
  ------------------
  |  |  818|      1|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|      2|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  807|      2|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|      2|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|      1|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|      1|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 1, False: 0]
  |  |  ------------------
  |  |  819|      1|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|      2|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  807|      2|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|      2|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|      1|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|      1|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 1, False: 0]
  |  |  |  Branch (819:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (20301:9): [True: 1, False: 14.6k]
  ------------------
20302|      1|        flags |= JANET_MARSHAL_NO_CYCLES;
  ------------------
  |  | 1911|      1|#define JANET_MARSHAL_NO_CYCLES 0x40000
  ------------------
20303|      1|    }
20304|  14.6k|    janet_marshal(buffer, argv[0], rreg, flags);
20305|  14.6k|    return janet_wrap_buffer(buffer);
  ------------------
  |  |  847|  14.6k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|  14.6k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  14.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  14.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20306|  14.6k|}
cfun_unmarshal:
20312|     83|              "unmarshalled from the buffer.") {
20313|     83|    janet_sandbox_assert(JANET_SANDBOX_UNMARSHAL);
  ------------------
  |  | 2043|     83|#define JANET_SANDBOX_UNMARSHAL 262144
  ------------------
20314|     83|    janet_arity(argc, 1, 2);
20315|     83|    JanetByteView view = janet_getbytes(argv, 0);
20316|     83|    JanetTable *reg = NULL;
20317|     83|    if (argc > 1) {
  ------------------
  |  Branch (20317:9): [True: 1, False: 82]
  ------------------
20318|      1|        reg = janet_gettable(argv, 1);
20319|      1|    }
20320|       |    return janet_unmarshal(view.bytes, (size_t) view.len, 0, reg, NULL);
20321|     83|}
janet_lib_marsh:
20324|  7.16k|void janet_lib_marsh(JanetTable *env) {
20325|  7.16k|    JanetRegExt marsh_cfuns[] = {
20326|  7.16k|        JANET_CORE_REG("marshal", cfun_marshal),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20327|  7.16k|        JANET_CORE_REG("unmarshal", cfun_unmarshal),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20328|  7.16k|        JANET_CORE_REG("env-lookup", cfun_env_lookup),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20329|  7.16k|        JANET_REG_END
  ------------------
  |  | 2109|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
20330|  7.16k|    };
20331|       |    janet_core_cfuns_ext(env, NULL, marsh_cfuns);
20332|  7.16k|}
janet_default_rng:
20407|  7.64k|JanetRNG *janet_default_rng(void) {
20408|  7.64k|    return &janet_vm.rng;
20409|  7.64k|}
janet_rng_seed:
20411|  15.2k|void janet_rng_seed(JanetRNG *rng, uint32_t seed) {
20412|  15.2k|    rng->a = seed;
20413|  15.2k|    rng->b = 0x97654321u;
20414|  15.2k|    rng->c = 123871873u;
20415|  15.2k|    rng->d = 0xf23f56c8u;
20416|  15.2k|    rng->counter = 0u;
20417|       |    /* First several numbers aren't that random. */
20418|   259k|    for (int i = 0; i < 16; i++) janet_rng_u32(rng);
  ------------------
  |  Branch (20418:21): [True: 244k, False: 15.2k]
  ------------------
20419|  15.2k|}
janet_rng_longseed:
20421|     50|void janet_rng_longseed(JanetRNG *rng, const uint8_t *bytes, int32_t len) {
20422|     50|    uint8_t state[16] = {0};
20423|  5.71k|    for (int32_t i = 0; i < len; i++)
  ------------------
  |  Branch (20423:25): [True: 5.66k, False: 50]
  ------------------
20424|  5.66k|        state[i & 0xF] ^= bytes[i];
20425|     50|    rng->a = state[0] + ((uint32_t) state[1] << 8) + ((uint32_t) state[2] << 16) + ((uint32_t) state[3] << 24);
20426|     50|    rng->b = state[4] + ((uint32_t) state[5] << 8) + ((uint32_t) state[6] << 16) + ((uint32_t) state[7] << 24);
20427|     50|    rng->c = state[8] + ((uint32_t) state[9] << 8) + ((uint32_t) state[10] << 16) + ((uint32_t) state[11] << 24);
20428|     50|    rng->d = state[12] + ((uint32_t) state[13] << 8) + ((uint32_t) state[14] << 16) + ((uint32_t) state[15] << 24);
20429|     50|    rng->counter = 0u;
20430|       |    /* a, b, c, d can't all be 0 */
20431|     50|    if (rng->a == 0) rng->a = 1u;
  ------------------
  |  Branch (20431:9): [True: 13, False: 37]
  ------------------
20432|    850|    for (int i = 0; i < 16; i++) janet_rng_u32(rng);
  ------------------
  |  Branch (20432:21): [True: 800, False: 50]
  ------------------
20433|     50|}
janet_rng_u32:
20435|   245k|uint32_t janet_rng_u32(JanetRNG *rng) {
20436|       |    /* Algorithm "xorwow" from p. 5 of Marsaglia, "Xorshift RNGs" */
20437|   245k|    uint32_t t = rng->d;
20438|   245k|    uint32_t const s = rng->a;
20439|   245k|    rng->d = rng->c;
20440|   245k|    rng->c = rng->b;
20441|   245k|    rng->b = s;
20442|   245k|    t ^= t >> 2;
20443|   245k|    t ^= t << 1;
20444|   245k|    t ^= s ^ (s << 4);
20445|   245k|    rng->a = t;
20446|   245k|    rng->counter += 362437;
20447|   245k|    return t + rng->counter;
20448|   245k|}
janet_rng_double:
20450|     10|double janet_rng_double(JanetRNG *rng) {
20451|     10|    uint32_t hi = janet_rng_u32(rng);
20452|     10|    uint32_t lo = janet_rng_u32(rng);
20453|     10|    uint64_t big = (uint64_t)(lo) | (((uint64_t) hi) << 32);
20454|     10|    return ldexp((double)(big >> (64 - 52)), -52);
20455|     10|}
cfun_rng_make:
20462|     58|             ) {
20463|     58|    janet_arity(argc, 0, 1);
20464|     58|    JanetRNG *rng = janet_abstract(&janet_rng_type, sizeof(JanetRNG));
20465|     58|    if (argc == 1) {
  ------------------
  |  Branch (20465:9): [True: 56, False: 2]
  ------------------
20466|     56|        if (janet_checkint(argv[0])) {
  ------------------
  |  Branch (20466:13): [True: 5, False: 51]
  ------------------
20467|      5|            uint32_t seed = (uint32_t)(janet_getinteger(argv, 0));
20468|      5|            janet_rng_seed(rng, seed);
20469|     51|        } else {
20470|     51|            JanetByteView bytes = janet_getbytes(argv, 0);
20471|     51|            janet_rng_longseed(rng, bytes.bytes, bytes.len);
20472|     51|        }
20473|     56|    } else {
20474|      2|        janet_rng_seed(rng, 0);
20475|      2|    }
20476|     58|    return janet_wrap_abstract(rng);
  ------------------
  |  |  851|     58|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|     58|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     58|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     58|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20477|     58|}
cfun_rng_uniform:
20482|      2|             ) {
20483|      2|    janet_fixarity(argc, 1);
20484|      2|    JanetRNG *rng = janet_getabstract(argv, 0, &janet_rng_type);
20485|      2|    return janet_wrap_number(janet_rng_double(rng));
  ------------------
  |  |  835|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20486|      2|}
cfun_rng_int:
20492|      2|             ) {
20493|      2|    janet_arity(argc, 1, 2);
20494|      2|    JanetRNG *rng = janet_getabstract(argv, 0, &janet_rng_type);
20495|      2|    if (argc == 1) {
  ------------------
  |  Branch (20495:9): [True: 0, False: 2]
  ------------------
20496|      0|        uint32_t word = janet_rng_u32(rng) >> 1;
20497|      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)
  |  |  ------------------
  ------------------
20498|      2|    } else {
20499|      2|        int32_t max = janet_optnat(argv, argc, 1, INT32_MAX);
20500|      2|        if (max == 0) return janet_wrap_number(0.0);
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
  |  Branch (20500:13): [True: 0, False: 2]
  ------------------
20501|      2|        uint32_t modulo = (uint32_t) max;
20502|      2|        uint32_t maxgen = INT32_MAX;
20503|      2|        uint32_t maxword = maxgen - (maxgen % modulo);
20504|      2|        uint32_t word;
20505|      2|        do {
20506|      2|            word = janet_rng_u32(rng) >> 1;
20507|      2|        } while (word > maxword);
  ------------------
  |  Branch (20507:18): [True: 0, False: 2]
  ------------------
20508|      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)
  |  |  ------------------
  ------------------
20509|      2|    }
20510|      2|}
janet_rand:
20571|     14|              "Returns a uniformly distributed random number between 0 and 1.") {
20572|     14|    (void) argv;
20573|     14|    janet_fixarity(argc, 0);
20574|     14|    return janet_wrap_number(janet_rng_double(&janet_vm.rng));
  ------------------
  |  |  835|     14|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20575|     14|}
janet_srand:
20582|      5|             ) {
20583|      5|    janet_fixarity(argc, 1);
20584|      5|    if (janet_checkint(argv[0])) {
  ------------------
  |  Branch (20584:9): [True: 0, False: 5]
  ------------------
20585|      0|        uint32_t seed = (uint32_t)(janet_getinteger(argv, 0));
20586|      0|        janet_rng_seed(&janet_vm.rng, seed);
20587|      5|    } else {
20588|      5|        JanetByteView bytes = janet_getbytes(argv, 0);
20589|      5|        janet_rng_longseed(&janet_vm.rng, bytes.bytes, bytes.len);
20590|      5|    }
20591|      5|    return janet_wrap_nil();
  ------------------
  |  |  831|      5|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      5|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      5|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      5|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20592|      5|}
janet_acos:
20595|  3.47k|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20596|  3.47k|    janet_fixarity(argc, 1); \
20597|  3.47k|    double x = janet_getnumber(argv, 0); \
20598|  3.47k|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|  3.47k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20599|  3.47k|}
janet_asin:
20595|     11|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20596|     11|    janet_fixarity(argc, 1); \
20597|     11|    double x = janet_getnumber(argv, 0); \
20598|     11|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|     11|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20599|     11|}
janet_atan:
20595|      2|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20596|      2|    janet_fixarity(argc, 1); \
20597|      2|    double x = janet_getnumber(argv, 0); \
20598|      2|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20599|      2|}
janet_cos:
20595|      4|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20596|      4|    janet_fixarity(argc, 1); \
20597|      4|    double x = janet_getnumber(argv, 0); \
20598|      4|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20599|      4|}
janet_acosh:
20595|      1|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20596|      1|    janet_fixarity(argc, 1); \
20597|      1|    double x = janet_getnumber(argv, 0); \
20598|      1|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20599|      1|}
janet_sin:
20595|     13|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20596|     13|    janet_fixarity(argc, 1); \
20597|     13|    double x = janet_getnumber(argv, 0); \
20598|     13|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|     13|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20599|     13|}
janet_sinh:
20595|      3|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20596|      3|    janet_fixarity(argc, 1); \
20597|      3|    double x = janet_getnumber(argv, 0); \
20598|      3|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      3|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20599|      3|}
janet_tan:
20595|     13|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20596|     13|    janet_fixarity(argc, 1); \
20597|     13|    double x = janet_getnumber(argv, 0); \
20598|     13|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|     13|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20599|     13|}
janet_tanh:
20595|      6|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20596|      6|    janet_fixarity(argc, 1); \
20597|      6|    double x = janet_getnumber(argv, 0); \
20598|      6|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      6|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20599|      6|}
janet_expm1:
20595|      4|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20596|      4|    janet_fixarity(argc, 1); \
20597|      4|    double x = janet_getnumber(argv, 0); \
20598|      4|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20599|      4|}
janet_cbrt:
20595|      2|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20596|      2|    janet_fixarity(argc, 1); \
20597|      2|    double x = janet_getnumber(argv, 0); \
20598|      2|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20599|      2|}
janet_erfc:
20595|      1|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20596|      1|    janet_fixarity(argc, 1); \
20597|      1|    double x = janet_getnumber(argv, 0); \
20598|      1|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20599|      1|}
janet_lgamma:
20595|      8|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20596|      8|    janet_fixarity(argc, 1); \
20597|      8|    double x = janet_getnumber(argv, 0); \
20598|      8|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      8|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20599|      8|}
janet_tgamma:
20595|      2|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20596|      2|    janet_fixarity(argc, 1); \
20597|      2|    double x = janet_getnumber(argv, 0); \
20598|      2|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20599|      2|}
janet_atanh:
20595|      3|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20596|      3|    janet_fixarity(argc, 1); \
20597|      3|    double x = janet_getnumber(argv, 0); \
20598|      3|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      3|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20599|      3|}
janet_log:
20595|      4|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20596|      4|    janet_fixarity(argc, 1); \
20597|      4|    double x = janet_getnumber(argv, 0); \
20598|      4|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20599|      4|}
janet_log10:
20595|      1|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20596|      1|    janet_fixarity(argc, 1); \
20597|      1|    double x = janet_getnumber(argv, 0); \
20598|      1|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20599|      1|}
janet_sqrt:
20595|      1|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20596|      1|    janet_fixarity(argc, 1); \
20597|      1|    double x = janet_getnumber(argv, 0); \
20598|      1|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20599|      1|}
janet_floor:
20595|      1|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20596|      1|    janet_fixarity(argc, 1); \
20597|      1|    double x = janet_getnumber(argv, 0); \
20598|      1|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20599|      1|}
janet_round:
20595|      5|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20596|      5|    janet_fixarity(argc, 1); \
20597|      5|    double x = janet_getnumber(argv, 0); \
20598|      5|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  835|      5|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20599|      5|}
janet_atan2:
20637|      2|JANET_CORE_FN(janet_##name, signature, doc) {\
20638|      2|    janet_fixarity(argc, 2); \
20639|      2|    double lhs = janet_getnumber(argv, 0); \
20640|      2|    double rhs = janet_getnumber(argv, 1); \
20641|      2|    return janet_wrap_number(fop(lhs, rhs)); \
  ------------------
  |  |  835|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20642|      2|}
janet_pow:
20637|      1|JANET_CORE_FN(janet_##name, signature, doc) {\
20638|      1|    janet_fixarity(argc, 2); \
20639|      1|    double lhs = janet_getnumber(argv, 0); \
20640|      1|    double rhs = janet_getnumber(argv, 1); \
20641|      1|    return janet_wrap_number(fop(lhs, rhs)); \
  ------------------
  |  |  835|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20642|      1|}
janet_not:
20651|   193k|JANET_CORE_FN(janet_not, "(not x)", "Returns the boolean inverse of x.") {
20652|   193k|    janet_fixarity(argc, 1);
20653|   193k|    return janet_wrap_boolean(!janet_truthy(argv[0]));
  ------------------
  |  |  834|   193k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|  1.29M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   193k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   193k|#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: 193k]
  |  |  |  |  |  Branch (822:51): [True: 0, False: 0]
  |  |  |  |  |  Branch (822:51): [True: 0, False: 0]
  |  |  |  |  |  Branch (822:51): [Folded, False: 142k]
  |  |  |  |  |  Branch (822:51): [True: 35, False: 142k]
  |  |  |  |  |  Branch (822:51): [True: 141k, False: 667]
  |  |  |  |  |  Branch (822:51): [True: 142k, False: 51.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20654|   193k|}
janet_cfun_lcm:
20686|      1|              "Returns the least common multiple of x and y.") {
20687|      1|    janet_fixarity(argc, 2);
20688|      1|    double x = janet_getnumber(argv, 0);
20689|      1|    double y = janet_getnumber(argv, 1);
20690|      1|    return janet_wrap_number(janet_lcm(x, y));
  ------------------
  |  |  835|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20691|      1|}
janet_cfun_frexp:
20694|     10|              "Returns a tuple of (mantissa, exponent) from number.") {
20695|     10|    janet_fixarity(argc, 1);
20696|     10|    double x = janet_getnumber(argv, 0);
20697|     10|    int exp;
20698|     10|    x = frexp(x, &exp);
20699|     10|    Janet *result = janet_tuple_begin(2);
20700|     10|    result[0] = janet_wrap_number(x);
  ------------------
  |  |  835|     10|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20701|     10|    result[1] = janet_wrap_number((double) exp);
  ------------------
  |  |  835|     10|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20702|     10|    return janet_wrap_tuple(janet_tuple_end(result));
  ------------------
  |  |  843|     10|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|     10|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     10|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     10|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20703|     10|}
janet_lib_math:
20714|  7.16k|void janet_lib_math(JanetTable *env) {
20715|  7.16k|    JanetRegExt math_cfuns[] = {
20716|  7.16k|        JANET_CORE_REG("not", janet_not),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20717|  7.16k|        JANET_CORE_REG("math/random", janet_rand),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20718|  7.16k|        JANET_CORE_REG("math/seedrandom", janet_srand),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20719|  7.16k|        JANET_CORE_REG("math/cos", janet_cos),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20720|  7.16k|        JANET_CORE_REG("math/sin", janet_sin),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20721|  7.16k|        JANET_CORE_REG("math/tan", janet_tan),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20722|  7.16k|        JANET_CORE_REG("math/acos", janet_acos),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20723|  7.16k|        JANET_CORE_REG("math/asin", janet_asin),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20724|  7.16k|        JANET_CORE_REG("math/atan", janet_atan),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20725|  7.16k|        JANET_CORE_REG("math/exp", janet_exp),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20726|  7.16k|        JANET_CORE_REG("math/log", janet_log),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20727|  7.16k|        JANET_CORE_REG("math/log10", janet_log10),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20728|  7.16k|        JANET_CORE_REG("math/log2", janet_log2),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20729|  7.16k|        JANET_CORE_REG("math/sqrt", janet_sqrt),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20730|  7.16k|#ifndef JANET_PLAN9
20731|  7.16k|        JANET_CORE_REG("math/cbrt", janet_cbrt),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20732|  7.16k|        JANET_CORE_REG("math/gamma", janet_tgamma),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20733|  7.16k|        JANET_CORE_REG("math/log-gamma", janet_lgamma),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20734|  7.16k|        JANET_CORE_REG("math/erfc", janet_erfc),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20735|  7.16k|        JANET_CORE_REG("math/erf", janet_erf),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20736|  7.16k|        JANET_CORE_REG("math/expm1", janet_expm1),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20737|  7.16k|        JANET_CORE_REG("math/atanh", janet_atanh),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20738|  7.16k|        JANET_CORE_REG("math/asinh", janet_asinh),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20739|  7.16k|        JANET_CORE_REG("math/next", janet_nextafter),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20740|  7.16k|#endif
20741|  7.16k|        JANET_CORE_REG("math/floor", janet_floor),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20742|  7.16k|        JANET_CORE_REG("math/ceil", janet_ceil),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20743|  7.16k|        JANET_CORE_REG("math/pow", janet_pow),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20744|  7.16k|        JANET_CORE_REG("math/abs", janet_fabs),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20745|  7.16k|        JANET_CORE_REG("math/sinh", janet_sinh),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20746|  7.16k|        JANET_CORE_REG("math/cosh", janet_cosh),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20747|  7.16k|        JANET_CORE_REG("math/tanh", janet_tanh),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20748|  7.16k|        JANET_CORE_REG("math/acosh", janet_acosh),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20749|  7.16k|        JANET_CORE_REG("math/atan2", janet_atan2),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20750|  7.16k|        JANET_CORE_REG("math/rng", cfun_rng_make),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20751|  7.16k|        JANET_CORE_REG("math/rng-uniform", cfun_rng_uniform),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20752|  7.16k|        JANET_CORE_REG("math/rng-int", cfun_rng_int),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20753|  7.16k|        JANET_CORE_REG("math/rng-buffer", cfun_rng_buffer),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20754|  7.16k|        JANET_CORE_REG("math/hypot", janet_hypot),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20755|  7.16k|        JANET_CORE_REG("math/exp2", janet_exp2),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20756|  7.16k|        JANET_CORE_REG("math/log1p", janet_log1p),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20757|  7.16k|        JANET_CORE_REG("math/trunc", janet_trunc),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20758|  7.16k|        JANET_CORE_REG("math/round", janet_round),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20759|  7.16k|        JANET_CORE_REG("math/gcd", janet_cfun_gcd),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20760|  7.16k|        JANET_CORE_REG("math/lcm", janet_cfun_lcm),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20761|  7.16k|        JANET_CORE_REG("math/frexp", janet_cfun_frexp),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20762|  7.16k|        JANET_CORE_REG("math/ldexp", janet_cfun_ldexp),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20763|  7.16k|        JANET_REG_END
  ------------------
  |  | 2109|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
20764|  7.16k|    };
20765|  7.16k|    janet_core_cfuns_ext(env, NULL, math_cfuns);
20766|  7.16k|    janet_register_abstract_type(&janet_rng_type);
20767|       |#ifdef JANET_BOOTSTRAP
20768|       |    JANET_CORE_DEF(env, "math/pi", janet_wrap_number(3.1415926535897931),
20769|       |                   "The value pi.");
20770|       |    JANET_CORE_DEF(env, "math/e", janet_wrap_number(2.7182818284590451),
20771|       |                   "The base of the natural log.");
20772|       |    JANET_CORE_DEF(env, "math/inf", janet_wrap_number(INFINITY),
20773|       |                   "The number representing positive infinity");
20774|       |    JANET_CORE_DEF(env, "math/-inf", janet_wrap_number(-INFINITY),
20775|       |                   "The number representing negative infinity");
20776|       |    JANET_CORE_DEF(env, "math/int32-min", janet_wrap_number(INT32_MIN),
20777|       |                   "The minimum contiguous integer representable by a 32 bit signed integer");
20778|       |    JANET_CORE_DEF(env, "math/int32-max", janet_wrap_number(INT32_MAX),
20779|       |                   "The maximum contiguous integer representable by a 32 bit signed integer");
20780|       |    JANET_CORE_DEF(env, "math/int-min", janet_wrap_number(JANET_INTMIN_DOUBLE),
20781|       |                   "The minimum contiguous integer representable by a double (-(2^53))");
20782|       |    JANET_CORE_DEF(env, "math/int-max", janet_wrap_number(JANET_INTMAX_DOUBLE),
20783|       |                   "The maximum contiguous integer representable by a double (2^53)");
20784|       |#ifdef NAN
20785|       |    JANET_CORE_DEF(env, "math/nan", janet_wrap_number(NAN), "Not a number (IEEE-754 NaN)");
20786|       |#else
20787|       |    JANET_CORE_DEF(env, "math/nan", janet_wrap_number(0.0 / 0.0), "Not a number (IEEE-754 NaN)");
20788|       |#endif
20789|       |#endif
20790|  7.16k|}
cfun_net_sockaddr:
21255|      3|              "return all address that match in an array instead of just the first.") {
21256|      3|    janet_sandbox_assert(JANET_SANDBOX_NET_CONNECT); /* connect OR listen */
  ------------------
  |  | 2024|      3|#define JANET_SANDBOX_NET_CONNECT 4
  ------------------
21257|      3|    janet_arity(argc, 2, 4);
21258|      3|    int socktype = janet_get_sockettype(argv, argc, 2);
21259|      3|    int is_unix = 0;
21260|      3|    int make_arr = (argc >= 3 && 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 (21260:21): [True: 0, False: 3]
  ------------------
21261|      3|    socklen_t addrsize = 0;
21262|      3|    struct addrinfo *ai = janet_get_addrinfo(argv, 0, socktype, 0, &is_unix, &addrsize);
21263|      3|#ifndef JANET_WINDOWS
21264|       |    /* no unix domain socket support on windows yet */
21265|      3|    if (is_unix) {
  ------------------
  |  Branch (21265:9): [True: 0, False: 3]
  ------------------
21266|      0|        void *abst = janet_abstract(&janet_address_type, addrsize);
21267|      0|        memcpy(abst, ai, addrsize);
21268|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21269|      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 (21269:16): [True: 0, False: 0]
  ------------------
21270|      0|    }
21271|      3|#endif
21272|      3|    if (make_arr) {
  ------------------
  |  Branch (21272:9): [True: 0, False: 3]
  ------------------
21273|       |        /* Select all */
21274|      0|        JanetArray *arr = janet_array(10);
21275|      0|        struct addrinfo *iter = ai;
21276|      0|        while (NULL != iter) {
  ------------------
  |  Branch (21276:16): [True: 0, False: 0]
  ------------------
21277|      0|            void *abst = janet_abstract(&janet_address_type, iter->ai_addrlen);
21278|      0|            memcpy(abst, iter->ai_addr, iter->ai_addrlen);
21279|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21280|      0|            iter = iter->ai_next;
21281|      0|        }
21282|      0|        freeaddrinfo(ai);
21283|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21284|      3|    } else {
21285|       |        /* Select first */
21286|      3|        if (NULL == ai) {
  ------------------
  |  Branch (21286:13): [True: 0, False: 3]
  ------------------
21287|      0|            janet_panic("no data for given address");
21288|      0|        }
21289|      3|        void *abst = janet_abstract(&janet_address_type, ai->ai_addrlen);
21290|      3|        memcpy(abst, ai->ai_addr, ai->ai_addrlen);
21291|      3|        freeaddrinfo(ai);
21292|      3|        return janet_wrap_abstract(abst);
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21293|      3|    }
21294|      3|}
cfun_net_connect:
21302|     14|              "connection, with the default being the same as using the OS's preferred address. ") {
21303|     14|    janet_sandbox_assert(JANET_SANDBOX_NET_CONNECT);
  ------------------
  |  | 2024|     14|#define JANET_SANDBOX_NET_CONNECT 4
  ------------------
21304|     14|    janet_arity(argc, 2, 5);
21305|       |
21306|       |    /* Check arguments */
21307|     14|    int socktype = janet_get_sockettype(argv, argc, 2);
21308|     14|    int is_unix = 0;
21309|     14|    char *bindhost = (char *) janet_optcstring(argv, argc, 3, NULL);
21310|     14|    char *bindport = NULL;
21311|     14|    if (argc >= 5 && janet_checkint(argv[4])) {
  ------------------
  |  Branch (21311:9): [True: 0, False: 14]
  |  Branch (21311:22): [True: 0, False: 0]
  ------------------
21312|      0|        bindport = (char *)janet_to_string(argv[4]);
21313|     14|    } else {
21314|     14|        bindport = (char *)janet_optcstring(argv, argc, 4, NULL);
21315|     14|    }
21316|       |
21317|       |    /* Where we're connecting to */
21318|     14|    socklen_t addrlen = 0;
21319|     14|    struct addrinfo *ai = janet_get_addrinfo(argv, 0, socktype, 0, &is_unix, &addrlen);
21320|       |
21321|       |    /* Check if we're binding address */
21322|     14|    struct addrinfo *binding = NULL;
21323|     14|    if (bindhost != NULL) {
  ------------------
  |  Branch (21323:9): [True: 0, False: 14]
  ------------------
21324|      0|        if (is_unix) {
  ------------------
  |  Branch (21324:13): [True: 0, False: 0]
  ------------------
21325|      0|            freeaddrinfo(ai);
21326|      0|            janet_panic("bindhost not supported for unix domain sockets");
21327|      0|        }
21328|       |        /* getaddrinfo */
21329|      0|        struct addrinfo hints;
21330|      0|        memset(&hints, 0, sizeof(hints));
21331|      0|        hints.ai_family = AF_UNSPEC;
21332|      0|        hints.ai_socktype = socktype;
21333|      0|        hints.ai_flags = 0;
21334|      0|        int status = getaddrinfo(bindhost, bindport, &hints, &binding);
21335|      0|        if (status) {
  ------------------
  |  Branch (21335:13): [True: 0, False: 0]
  ------------------
21336|      0|            freeaddrinfo(ai);
21337|      0|            janet_panicf("could not get address info for bindhost: %s", gai_strerror(status));
21338|      0|        }
21339|      0|    }
21340|       |
21341|       |    /* Create socket */
21342|     14|    JSock sock = JSOCKDEFAULT;
  ------------------
  |  |20867|     14|#define JSock int
  ------------------
                  JSock sock = JSOCKDEFAULT;
  ------------------
  |  |20865|     14|#define JSOCKDEFAULT 0
  ------------------
21343|     14|    void *addr = NULL;
21344|     14|#ifndef JANET_WINDOWS
21345|     14|    if (is_unix) {
  ------------------
  |  Branch (21345:9): [True: 0, False: 14]
  ------------------
21346|      0|        sock = socket(AF_UNIX, socktype | JSOCKFLAGS, 0);
  ------------------
  |  |20869|      0|#define JSOCKFLAGS SOCK_CLOEXEC
  ------------------
21347|      0|        if (!JSOCKVALID(sock)) {
  ------------------
  |  |20866|      0|#define JSOCKVALID(x) ((x) >= 0)
  ------------------
  |  Branch (21347:13): [True: 0, False: 0]
  ------------------
21348|      0|            Janet v = janet_ev_lasterr();
21349|      0|            janet_free(ai);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
21350|      0|            janet_panicf("could not create socket: %V", v);
21351|      0|        }
21352|      0|        addr = (void *) ai;
21353|      0|    } else
21354|     14|#endif
21355|     14|    {
21356|     14|        struct addrinfo *rp = NULL;
21357|     14|        for (rp = ai; rp != NULL; rp = rp->ai_next) {
  ------------------
  |  Branch (21357:23): [True: 0, False: 14]
  ------------------
21358|       |#ifdef JANET_WINDOWS
21359|       |            sock = WSASocketW(rp->ai_family, rp->ai_socktype, rp->ai_protocol, NULL, 0, WSA_FLAG_OVERLAPPED);
21360|       |#else
21361|      0|            sock = socket(rp->ai_family, rp->ai_socktype | JSOCKFLAGS, rp->ai_protocol);
  ------------------
  |  |20869|      0|#define JSOCKFLAGS SOCK_CLOEXEC
  ------------------
21362|      0|#endif
21363|      0|            if (JSOCKVALID(sock)) {
  ------------------
  |  |20866|      0|#define JSOCKVALID(x) ((x) >= 0)
  |  |  ------------------
  |  |  |  Branch (20866:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
21364|      0|                addr = rp->ai_addr;
21365|      0|                addrlen = (socklen_t) rp->ai_addrlen;
21366|      0|                break;
21367|      0|            }
21368|      0|        }
21369|     14|        if (NULL == addr) {
  ------------------
  |  Branch (21369:13): [True: 0, False: 14]
  ------------------
21370|      0|            Janet v = janet_ev_lasterr();
21371|      0|            if (binding) freeaddrinfo(binding);
  ------------------
  |  Branch (21371:17): [True: 0, False: 0]
  ------------------
21372|      0|            freeaddrinfo(ai);
21373|      0|            janet_panicf("could not create socket: %V", v);
21374|      0|        }
21375|     14|    }
21376|       |
21377|       |    /* Bind to bindhost and bindport if given */
21378|     14|    if (binding) {
  ------------------
  |  Branch (21378:9): [True: 0, False: 14]
  ------------------
21379|      0|        struct addrinfo *rp = NULL;
21380|      0|        int did_bind = 0;
21381|      0|        for (rp = binding; rp != NULL; rp = rp->ai_next) {
  ------------------
  |  Branch (21381:28): [True: 0, False: 0]
  ------------------
21382|      0|            if (bind(sock, rp->ai_addr, (int) rp->ai_addrlen) == 0) {
  ------------------
  |  Branch (21382:17): [True: 0, False: 0]
  ------------------
21383|      0|                did_bind = 1;
21384|      0|                break;
21385|      0|            }
21386|      0|        }
21387|      0|        if (!did_bind) {
  ------------------
  |  Branch (21387:13): [True: 0, False: 0]
  ------------------
21388|      0|            Janet v = janet_ev_lasterr();
21389|      0|            freeaddrinfo(binding);
21390|      0|            freeaddrinfo(ai);
21391|      0|            JSOCKCLOSE(sock);
  ------------------
  |  |20864|      0|#define JSOCKCLOSE(x) close(x)
  ------------------
21392|      0|            janet_panicf("could not bind outgoing address: %V", v);
21393|      0|        } else {
21394|      0|            freeaddrinfo(binding);
21395|      0|        }
21396|      0|    }
21397|       |
21398|       |    /* Wrap socket in abstract type JanetStream */
21399|     14|    uint32_t udp_flag = 0;
21400|     14|    if (socktype == SOCK_DGRAM) udp_flag = JANET_STREAM_UDPSERVER;
  ------------------
  |  |  628|      0|#define JANET_STREAM_UDPSERVER 0x1000
  ------------------
  |  Branch (21400:9): [True: 0, False: 14]
  ------------------
21401|     14|    JanetStream *stream = make_stream(sock, JANET_STREAM_READABLE | JANET_STREAM_WRITABLE | udp_flag);
  ------------------
  |  |  625|     14|#define JANET_STREAM_READABLE 0x200
  ------------------
                  JanetStream *stream = make_stream(sock, JANET_STREAM_READABLE | JANET_STREAM_WRITABLE | udp_flag);
  ------------------
  |  |  626|     14|#define JANET_STREAM_WRITABLE 0x400
  ------------------
21402|       |
21403|       |    /* Connect to socket */
21404|       |#ifdef JANET_WINDOWS
21405|       |    int status = 0;
21406|       |    int err = 0;
21407|       |    LPFN_CONNECTEX connect_ex = NULL;
21408|       |    if (socktype == SOCK_STREAM && ((connect_ex = lazy_get_connectex(sock)))) {
21409|       |        /* Prefer ConnecEx as it works well with overlapped IO. */
21410|       |        janet_net_socknoblock(sock);
21411|       |        NetStateConnect *state = janet_malloc(sizeof(NetStateConnect));
21412|       |        memset(state, 0, sizeof(NetStateConnect));
21413|       |        BOOL success = connect_ex(sock, addr, addrlen, NULL, 0, NULL, &state->overlapped.as.overlapped);
21414|       |        freeaddrinfo(ai);
21415|       |        if (success) {
21416|       |            /* Did not fail */
21417|       |        } else {
21418|       |            int err = WSAGetLastError();
21419|       |            if (err == ERROR_IO_PENDING) {
21420|       |                /* Did not actually fail yet */
21421|       |            } else {
21422|       |                janet_free(state);
21423|       |                Janet lasterr = janet_ev_lasterr();
21424|       |                janet_panicf("could not connect socket (ConnectEx): %V", lasterr);
21425|       |            }
21426|       |        }
21427|       |
21428|       |        net_sched_connect(stream, state);
21429|       |    } else {
21430|       |        /* Default to blocking connect if ConnectEx not available */
21431|       |        status = WSAConnect(sock, addr, addrlen, NULL, NULL, NULL, NULL);
21432|       |        err = WSAGetLastError();
21433|       |        freeaddrinfo(ai);
21434|       |        /* Set up the socket for non-blocking IO after connecting on windows by default */
21435|       |        janet_net_socknoblock(sock);
21436|       |    }
21437|       |
21438|       |#else
21439|       |    /* Set up the socket for non-blocking IO before connecting */
21440|     14|    janet_net_socknoblock(sock);
21441|     14|    int status;
21442|     14|    do {
21443|     14|        status = connect(sock, addr, addrlen);
21444|     14|    } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (21444:14): [True: 0, False: 14]
  |  Branch (21444:30): [True: 0, False: 0]
  ------------------
21445|     14|    int err = errno;
21446|     14|    if (is_unix) {
  ------------------
  |  Branch (21446:9): [True: 0, False: 14]
  ------------------
21447|      0|        janet_free(ai);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
21448|     14|    } else {
21449|     14|        freeaddrinfo(ai);
21450|     14|    }
21451|     14|#endif
21452|       |
21453|     14|    if (status == 0) {
  ------------------
  |  Branch (21453:9): [True: 0, False: 14]
  ------------------
21454|       |        /* Connect completed synchronously (common for unix domain sockets).
21455|       |         * Return the stream directly without scheduling an async wait,
21456|       |         * as edge-triggered kqueue may not signal EVFILT_WRITE if the socket
21457|       |         * is already connected when registered. */
21458|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21459|      0|    }
21460|       |
21461|       |#ifdef JANET_WINDOWS
21462|       |    if (status == SOCKET_ERROR) {
21463|       |        if (err != WSAEWOULDBLOCK) {
21464|       |#else
21465|     14|    if (status == -1) {
  ------------------
  |  Branch (21465:9): [True: 0, False: 14]
  ------------------
21466|      0|        if (err != EINPROGRESS) {
  ------------------
  |  Branch (21466:13): [True: 0, False: 0]
  ------------------
21467|      0|#endif
21468|      0|            JSOCKCLOSE(sock);
  ------------------
  |  |20864|      0|#define JSOCKCLOSE(x) close(x)
  ------------------
21469|      0|            Janet lasterr = janet_ev_lasterr();
21470|      0|            janet_panicf("could not connect socket: %V", lasterr);
21471|      0|        }
21472|      0|    }
21473|       |
21474|     14|    net_sched_connect(stream, NULL);
21475|     14|}
cfun_net_socket:
21481|      6|              "`address-family` should be one of :ipv4 or :ipv6.") {
21482|      6|    janet_arity(argc, 0, 2);
21483|       |
21484|      6|    int socktype = janet_get_sockettype(argv, argc, 0);
21485|       |
21486|       |    /* Create socket */
21487|      6|    JSock sfd = JSOCKDEFAULT;
  ------------------
  |  |20867|      6|#define JSock int
  ------------------
                  JSock sfd = JSOCKDEFAULT;
  ------------------
  |  |20865|      6|#define JSOCKDEFAULT 0
  ------------------
21488|      6|    struct addrinfo *ai = NULL;
21489|      6|    struct addrinfo hints;
21490|      6|    memset(&hints, 0, sizeof(hints));
21491|      6|    hints.ai_family = AF_UNSPEC;
21492|      6|    hints.ai_socktype = socktype;
21493|      6|#ifdef AI_NUMERICSERV
21494|      6|    hints.ai_flags = AI_NUMERICSERV; /* Explicitly prevent name resolution */
21495|       |#else
21496|       |    hints.ai_flags = 0;
21497|       |#endif
21498|      6|    if (argc >= 2) {
  ------------------
  |  Branch (21498:9): [True: 0, False: 6]
  ------------------
21499|      0|        hints.ai_family = net_get_address_family(argv[1]);
21500|      0|    }
21501|      6|    int status = getaddrinfo(NULL, "0", &hints, &ai);
21502|      6|    if (status) {
  ------------------
  |  Branch (21502:9): [True: 0, False: 6]
  ------------------
21503|      0|        janet_panicf("could not get address info: %s", gai_strerror(status));
21504|      0|    }
21505|       |
21506|      6|    struct addrinfo *rp = NULL;
21507|      6|    for (rp = ai; rp != NULL; rp = rp->ai_next) {
  ------------------
  |  Branch (21507:19): [True: 6, False: 0]
  ------------------
21508|       |#ifdef JANET_WINDOWS
21509|       |        sfd = WSASocketW(rp->ai_family, rp->ai_socktype | JSOCKFLAGS, rp->ai_protocol, NULL, 0, WSA_FLAG_OVERLAPPED);
21510|       |#else
21511|      6|        sfd = socket(rp->ai_family, rp->ai_socktype | JSOCKFLAGS, rp->ai_protocol);
  ------------------
  |  |20869|      6|#define JSOCKFLAGS SOCK_CLOEXEC
  ------------------
21512|      6|#endif
21513|      6|        if (JSOCKVALID(sfd)) {
  ------------------
  |  |20866|      6|#define JSOCKVALID(x) ((x) >= 0)
  |  |  ------------------
  |  |  |  Branch (20866:23): [True: 6, False: 0]
  |  |  ------------------
  ------------------
21514|      6|            break;
21515|      6|        }
21516|      6|    }
21517|      6|    freeaddrinfo(ai);
21518|       |
21519|      6|    if (!JSOCKVALID(sfd)) {
  ------------------
  |  |20866|      6|#define JSOCKVALID(x) ((x) >= 0)
  ------------------
  |  Branch (21519:9): [True: 0, False: 6]
  ------------------
21520|      0|        Janet v = janet_ev_lasterr();
21521|      0|        janet_panicf("could not create socket: %V", v);
21522|      0|    }
21523|       |
21524|       |    /* Wrap socket in abstract type JanetStream */
21525|      6|    uint32_t udp_flag = 0;
21526|      6|    if (socktype == SOCK_DGRAM) udp_flag = JANET_STREAM_UDPSERVER;
  ------------------
  |  |  628|      0|#define JANET_STREAM_UDPSERVER 0x1000
  ------------------
  |  Branch (21526:9): [True: 0, False: 6]
  ------------------
21527|      6|    JanetStream *stream = make_stream(sfd, JANET_STREAM_READABLE | JANET_STREAM_WRITABLE | udp_flag);
  ------------------
  |  |  625|      6|#define JANET_STREAM_READABLE 0x200
  ------------------
                  JanetStream *stream = make_stream(sfd, JANET_STREAM_READABLE | JANET_STREAM_WRITABLE | udp_flag);
  ------------------
  |  |  626|      6|#define JANET_STREAM_WRITABLE 0x400
  ------------------
21528|       |
21529|       |    /* Set up the socket for non-blocking IO */
21530|      6|    janet_net_socknoblock(sfd);
21531|       |
21532|      6|    return janet_wrap_abstract(stream);
  ------------------
  |  |  851|      6|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|      6|    janet_nanbox_from_pointer((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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21533|      6|}
cfun_net_shutdown:
21573|      2|              "Returns the original socket.") {
21574|      2|    janet_arity(argc, 1, 2);
21575|      2|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21576|      2|    janet_stream_flags(stream, JANET_STREAM_SOCKET);
  ------------------
  |  |  623|      2|#define JANET_STREAM_SOCKET 0x2
  ------------------
21577|      2|    int shutdown_type = JANET_SHUTDOWN_RW;
  ------------------
  |  |21561|      2|#define JANET_SHUTDOWN_RW SHUT_RDWR
  ------------------
21578|      2|    if (argc == 2) {
  ------------------
  |  Branch (21578:9): [True: 0, False: 2]
  ------------------
21579|      0|        const uint8_t *kw = janet_getkeyword(argv, 1);
21580|      0|        if (0 == janet_cstrcmp(kw, "rw")) {
  ------------------
  |  Branch (21580:13): [True: 0, False: 0]
  ------------------
21581|      0|            shutdown_type = JANET_SHUTDOWN_RW;
  ------------------
  |  |21561|      0|#define JANET_SHUTDOWN_RW SHUT_RDWR
  ------------------
21582|      0|        } else if (0 == janet_cstrcmp(kw, "r")) {
  ------------------
  |  Branch (21582:20): [True: 0, False: 0]
  ------------------
21583|      0|            shutdown_type = JANET_SHUTDOWN_R;
  ------------------
  |  |21562|      0|#define JANET_SHUTDOWN_R SHUT_RD
  ------------------
21584|      0|        } else if (0 == janet_cstrcmp(kw, "w")) {
  ------------------
  |  Branch (21584:20): [True: 0, False: 0]
  ------------------
21585|      0|            shutdown_type = JANET_SHUTDOWN_W;
  ------------------
  |  |21563|      0|#define JANET_SHUTDOWN_W SHUT_WR
  ------------------
21586|      0|        } else {
21587|      0|            janet_panicf("unexpected keyword %v", argv[1]);
21588|      0|        }
21589|      0|    }
21590|      2|    int status;
21591|       |#ifdef JANET_WINDOWS
21592|       |    status = shutdown((SOCKET) stream->handle, shutdown_type);
21593|       |#else
21594|      2|    do {
21595|      2|        status = shutdown(stream->handle, shutdown_type);
21596|      2|    } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (21596:14): [True: 0, False: 2]
  |  Branch (21596:30): [True: 0, False: 0]
  ------------------
21597|      2|#endif
21598|      2|    if (status) {
  ------------------
  |  Branch (21598:9): [True: 0, False: 2]
  ------------------
21599|      0|        janet_panicf("could not shutdown socket: %V", janet_ev_lasterr());
21600|      0|    }
21601|      2|    return argv[0];
21602|      2|}
cfun_net_listen:
21611|      2|              "disable the use of `SO_REUSEADDR` and `SO_REUSEPORT` when creating a server on some operating systems.") {
21612|      2|    janet_sandbox_assert(JANET_SANDBOX_NET_LISTEN);
  ------------------
  |  | 2025|      2|#define JANET_SANDBOX_NET_LISTEN 8
  ------------------
21613|      2|    janet_arity(argc, 2, 4);
21614|       |
21615|       |    /* Get host, port, and handler*/
21616|      2|    int socktype = janet_get_sockettype(argv, argc, 2);
21617|      2|    int is_unix = 0;
21618|      2|    socklen_t addrlen = 0;
21619|      2|    struct addrinfo *ai = janet_get_addrinfo(argv, 0, socktype, 1, &is_unix, &addrlen);
21620|      2|    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 (21620:19): [True: 0, False: 2]
  ------------------
21621|       |
21622|      2|    JSock sfd = JSOCKDEFAULT;
  ------------------
  |  |20867|      2|#define JSock int
  ------------------
                  JSock sfd = JSOCKDEFAULT;
  ------------------
  |  |20865|      2|#define JSOCKDEFAULT 0
  ------------------
21623|      2|#ifndef JANET_WINDOWS
21624|      2|    if (is_unix) {
  ------------------
  |  Branch (21624:9): [True: 0, False: 2]
  ------------------
21625|      0|        sfd = socket(AF_UNIX, socktype | JSOCKFLAGS, 0);
  ------------------
  |  |20869|      0|#define JSOCKFLAGS SOCK_CLOEXEC
  ------------------
21626|      0|        if (!JSOCKVALID(sfd)) {
  ------------------
  |  |20866|      0|#define JSOCKVALID(x) ((x) >= 0)
  ------------------
  |  Branch (21626:13): [True: 0, False: 0]
  ------------------
21627|      0|            janet_free(ai);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
21628|      0|            janet_panicf("could not create socket: %V", janet_ev_lasterr());
21629|      0|        }
21630|      0|        const char *err = serverify_socket(sfd, reuse, 0);
21631|      0|        if (NULL != err || bind(sfd, (struct sockaddr *)ai, addrlen)) {
  ------------------
  |  Branch (21631:13): [True: 0, False: 0]
  |  Branch (21631:28): [True: 0, False: 0]
  ------------------
21632|      0|            JSOCKCLOSE(sfd);
  ------------------
  |  |20864|      0|#define JSOCKCLOSE(x) close(x)
  ------------------
21633|      0|            janet_free(ai);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
21634|      0|            if (err) {
  ------------------
  |  Branch (21634:17): [True: 0, False: 0]
  ------------------
21635|      0|                janet_panic(err);
21636|      0|            } else {
21637|      0|                janet_panicf("could not bind socket: %V", janet_ev_lasterr());
21638|      0|            }
21639|      0|        }
21640|      0|        janet_free(ai);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
21641|      0|    } else
21642|      2|#endif
21643|      2|    {
21644|       |        /* Check all addrinfos in a loop for the first that we can bind to. */
21645|      2|        struct addrinfo *rp = NULL;
21646|      2|        for (rp = ai; rp != NULL; rp = rp->ai_next) {
  ------------------
  |  Branch (21646:23): [True: 0, False: 2]
  ------------------
21647|       |#ifdef JANET_WINDOWS
21648|       |            sfd = WSASocketW(rp->ai_family, rp->ai_socktype | JSOCKFLAGS, rp->ai_protocol, NULL, 0, WSA_FLAG_OVERLAPPED);
21649|       |#else
21650|      0|            sfd = socket(rp->ai_family, rp->ai_socktype | JSOCKFLAGS, rp->ai_protocol);
  ------------------
  |  |20869|      0|#define JSOCKFLAGS SOCK_CLOEXEC
  ------------------
21651|      0|#endif
21652|      0|            if (!JSOCKVALID(sfd)) continue;
  ------------------
  |  |20866|      0|#define JSOCKVALID(x) ((x) >= 0)
  ------------------
  |  Branch (21652:17): [True: 0, False: 0]
  ------------------
21653|      0|            const char *err = serverify_socket(sfd, reuse, reuse);
21654|      0|            if (NULL != err) {
  ------------------
  |  Branch (21654:17): [True: 0, False: 0]
  ------------------
21655|      0|                JSOCKCLOSE(sfd);
  ------------------
  |  |20864|      0|#define JSOCKCLOSE(x) close(x)
  ------------------
21656|      0|                continue;
21657|      0|            }
21658|       |            /* Bind */
21659|      0|            if (bind(sfd, rp->ai_addr, (int) rp->ai_addrlen) == 0) break;
  ------------------
  |  Branch (21659:17): [True: 0, False: 0]
  ------------------
21660|      0|            JSOCKCLOSE(sfd);
  ------------------
  |  |20864|      0|#define JSOCKCLOSE(x) close(x)
  ------------------
21661|      0|        }
21662|      2|        freeaddrinfo(ai);
21663|      2|        if (NULL == rp) {
  ------------------
  |  Branch (21663:13): [True: 0, False: 2]
  ------------------
21664|      0|            janet_panic("could not bind to any sockets");
21665|      0|        }
21666|      2|    }
21667|       |
21668|      2|    if (socktype == SOCK_DGRAM) {
  ------------------
  |  Branch (21668:9): [True: 0, False: 2]
  ------------------
21669|       |        /* Datagram server (UDP) */
21670|      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
  ------------------
21671|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21672|      2|    } else {
21673|       |        /* Stream server (TCP) */
21674|       |
21675|       |        /* listen */
21676|      2|        int status = listen(sfd, 1024);
21677|      2|        if (status) {
  ------------------
  |  Branch (21677:13): [True: 0, False: 2]
  ------------------
21678|      0|            JSOCKCLOSE(sfd);
  ------------------
  |  |20864|      0|#define JSOCKCLOSE(x) close(x)
  ------------------
21679|      0|            janet_panicf("could not listen on file descriptor: %V", janet_ev_lasterr());
21680|      0|        }
21681|       |
21682|       |        /* Put sfd on our loop */
21683|      2|        JanetStream *stream = make_stream(sfd, JANET_STREAM_ACCEPTABLE);
  ------------------
  |  |  627|      2|#define JANET_STREAM_ACCEPTABLE 0x800
  ------------------
21684|      2|        return janet_wrap_abstract(stream);
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21685|      2|    }
21686|      2|}
cfun_net_getsockname:
21741|      1|              "Gets the local address and port in a tuple in that order.") {
21742|      1|    janet_fixarity(argc, 1);
21743|      1|    JanetStream *js = janet_getabstract(argv, 0, &janet_stream_type);
21744|      1|    if (js->flags & JANET_STREAM_CLOSED) janet_panic("stream closed");
  ------------------
  |  |  622|      1|#define JANET_STREAM_CLOSED 0x1
  ------------------
  |  Branch (21744:9): [True: 0, False: 1]
  ------------------
21745|      1|    struct sockaddr_storage ss;
21746|      1|    socklen_t slen = sizeof(ss);
21747|      1|    memset(&ss, 0, slen);
21748|      1|    if (getsockname((JSock)js->handle, (struct sockaddr *) &ss, &slen)) {
  ------------------
  |  Branch (21748:9): [True: 0, False: 1]
  ------------------
21749|      0|        janet_panicf("Failed to get localname on %v: %V", argv[0], janet_ev_lasterr());
21750|      0|    }
21751|      1|    janet_assert(slen <= (socklen_t) sizeof(ss), "socket address truncated");
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
21752|      1|    return janet_so_getname(&ss);
21753|      1|}
cfun_stream_accept_loop:
21783|      1|              "Blocks the current fiber until the stream is closed, and will return the stream.") {
21784|      1|    janet_fixarity(argc, 2);
21785|      1|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21786|      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
  ------------------
21787|      1|    JanetFunction *fun = janet_getfunction(argv, 1);
21788|      1|    if (fun->def->min_arity < 1) janet_panic("handler function must take at least 1 argument");
  ------------------
  |  Branch (21788:9): [True: 0, False: 1]
  ------------------
21789|      1|    janet_sched_accept(stream, fun);
21790|      1|}
cfun_stream_accept:
21796|      1|              "Returns a new duplex stream which represents a connection to the client.") {
21797|      1|    janet_arity(argc, 1, 2);
21798|      1|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21799|      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
  ------------------
21800|      1|    double to = janet_optnumber(argv, argc, 1, INFINITY);
21801|      1|    if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21801:9): [True: 0, False: 1]
  ------------------
21802|       |    janet_sched_accept(stream, NULL);
21803|      1|}
cfun_stream_read:
21811|      2|              "Returns a buffer with up to n more bytes in it, or raises an error if the read failed.") {
21812|      2|    janet_arity(argc, 2, 4);
21813|      2|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21814|      2|    janet_stream_flags(stream, JANET_STREAM_READABLE | JANET_STREAM_SOCKET);
  ------------------
  |  |  625|      2|#define JANET_STREAM_READABLE 0x200
  ------------------
                  janet_stream_flags(stream, JANET_STREAM_READABLE | JANET_STREAM_SOCKET);
  ------------------
  |  |  623|      2|#define JANET_STREAM_SOCKET 0x2
  ------------------
21815|      2|    JanetBuffer *buffer = janet_optbuffer(argv, argc, 2, 10);
21816|      2|    double to = janet_optnumber(argv, argc, 3, INFINITY);
21817|      2|    if (janet_keyeq(argv[1], "all")) {
  ------------------
  |  Branch (21817:9): [True: 0, False: 2]
  ------------------
21818|      0|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21818:13): [True: 0, False: 0]
  ------------------
21819|      0|        janet_ev_recvchunk(stream, buffer, INT32_MAX, MSG_NOSIGNAL);
21820|      2|    } else {
21821|      2|        int32_t n = janet_getnat(argv, 1);
21822|      2|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21822:13): [True: 0, False: 2]
  ------------------
21823|       |        janet_ev_recv(stream, buffer, n, MSG_NOSIGNAL);
21824|      2|    }
21825|      2|}
cfun_stream_chunk:
21830|      2|              "Takes an optional timeout in seconds, after which will raise an error.") {
21831|      2|    janet_arity(argc, 2, 4);
21832|      2|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21833|      2|    janet_stream_flags(stream, JANET_STREAM_READABLE | JANET_STREAM_SOCKET);
  ------------------
  |  |  625|      2|#define JANET_STREAM_READABLE 0x200
  ------------------
                  janet_stream_flags(stream, JANET_STREAM_READABLE | JANET_STREAM_SOCKET);
  ------------------
  |  |  623|      2|#define JANET_STREAM_SOCKET 0x2
  ------------------
21834|      2|    int32_t n = janet_getnat(argv, 1);
21835|      2|    JanetBuffer *buffer = janet_optbuffer(argv, argc, 2, 10);
21836|      2|    double to = janet_optnumber(argv, argc, 3, INFINITY);
21837|      2|    if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21837:9): [True: 0, False: 2]
  ------------------
21838|       |    janet_ev_recvchunk(stream, buffer, n, MSG_NOSIGNAL);
21839|      2|}
cfun_stream_recv_from:
21844|      2|              "packet came from. Takes an optional timeout in seconds, after which will raise an error.") {
21845|      2|    janet_arity(argc, 3, 4);
21846|      2|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21847|      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
  ------------------
21848|      2|    int32_t n = janet_getnat(argv, 1);
21849|      2|    JanetBuffer *buffer = janet_getbuffer(argv, 2);
21850|      2|    double to = janet_optnumber(argv, argc, 3, INFINITY);
21851|      2|    if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21851:9): [True: 0, False: 2]
  ------------------
21852|       |    janet_ev_recvfrom(stream, buffer, n, MSG_NOSIGNAL);
21853|      2|}
cfun_stream_write:
21859|      3|              "Returns nil, or raises an error if the write failed.") {
21860|      3|    janet_arity(argc, 2, 3);
21861|      3|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21862|      3|    janet_stream_flags(stream, JANET_STREAM_WRITABLE | JANET_STREAM_SOCKET);
  ------------------
  |  |  626|      3|#define JANET_STREAM_WRITABLE 0x400
  ------------------
                  janet_stream_flags(stream, JANET_STREAM_WRITABLE | JANET_STREAM_SOCKET);
  ------------------
  |  |  623|      3|#define JANET_STREAM_SOCKET 0x2
  ------------------
21863|      3|    double to = janet_optnumber(argv, argc, 2, INFINITY);
21864|      3|    if (janet_checktype(argv[1], JANET_BUFFER)) {
  ------------------
  |  |  806|      3|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 3]
  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21865|      0|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21865:13): [True: 0, False: 0]
  ------------------
21866|      0|        janet_ev_send_buffer(stream, janet_getbuffer(argv, 1), MSG_NOSIGNAL);
21867|      3|    } else {
21868|      3|        JanetByteView bytes = janet_getbytes(argv, 1);
21869|      3|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21869:13): [True: 0, False: 3]
  ------------------
21870|       |        janet_ev_send_string(stream, bytes.bytes, MSG_NOSIGNAL);
21871|      3|    }
21872|      3|}
cfun_stream_send_to:
21878|      3|              "Returns stream.") {
21879|      3|    janet_arity(argc, 3, 4);
21880|      3|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21881|      3|    janet_stream_flags(stream, JANET_STREAM_UDPSERVER | JANET_STREAM_SOCKET);
  ------------------
  |  |  628|      3|#define JANET_STREAM_UDPSERVER 0x1000
  ------------------
                  janet_stream_flags(stream, JANET_STREAM_UDPSERVER | JANET_STREAM_SOCKET);
  ------------------
  |  |  623|      3|#define JANET_STREAM_SOCKET 0x2
  ------------------
21882|      3|    void *dest = janet_getabstract(argv, 1, &janet_address_type);
21883|      3|    double to = janet_optnumber(argv, argc, 3, INFINITY);
21884|      3|    if (janet_checktype(argv[2], JANET_BUFFER)) {
  ------------------
  |  |  806|      3|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 3]
  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21885|      0|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21885:13): [True: 0, False: 0]
  ------------------
21886|      0|        janet_ev_sendto_buffer(stream, janet_getbuffer(argv, 2), dest, MSG_NOSIGNAL);
21887|      3|    } else {
21888|      3|        JanetByteView bytes = janet_getbytes(argv, 2);
21889|      3|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21889:13): [True: 0, False: 3]
  ------------------
21890|       |        janet_ev_sendto_string(stream, bytes.bytes, dest, MSG_NOSIGNAL);
21891|      3|    }
21892|      3|}
cfun_net_setsockopt:
21949|      3|             ) {
21950|      3|    janet_arity(argc, 3, 3);
21951|      3|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21952|      3|    janet_stream_flags(stream, JANET_STREAM_SOCKET);
  ------------------
  |  |  623|      3|#define JANET_STREAM_SOCKET 0x2
  ------------------
21953|      3|    JanetKeyword optstr = janet_getkeyword(argv, 1);
21954|       |
21955|      3|    const struct sockopt_type *st = sockopt_type_list;
21956|      3|    while (st->name) {
  ------------------
  |  Branch (21956:12): [True: 0, False: 3]
  ------------------
21957|      0|        if (janet_cstrcmp(optstr, st->name) == 0) {
  ------------------
  |  Branch (21957:13): [True: 0, False: 0]
  ------------------
21958|      0|            break;
21959|      0|        }
21960|      0|        st++;
21961|      0|    }
21962|       |
21963|      3|    if (st->name == NULL) {
  ------------------
  |  Branch (21963:9): [True: 0, False: 3]
  ------------------
21964|      0|        janet_panicf("unknown socket option %q", argv[1]);
21965|      0|    }
21966|       |
21967|      3|    union {
21968|      3|        unsigned char v_uchar;
21969|      3|        int v_int;
21970|      3|        struct ip_mreq v_mreq;
21971|      3|#ifndef JANET_NO_IPV6
21972|      3|        struct ipv6_mreq v_mreq6;
21973|      3|#endif
21974|      3|    } val;
21975|       |
21976|      3|    void *optval = (void *)&val;
21977|      3|    socklen_t optlen = 0;
21978|       |
21979|      3|    if (st->type == JANET_BOOLEAN) {
  ------------------
  |  Branch (21979:9): [True: 0, False: 3]
  ------------------
21980|      0|        val.v_int = janet_getboolean(argv, 2);
21981|      0|        optlen = sizeof(val.v_int);
21982|      3|    } else if (st->type == JANET_NUMBER) {
  ------------------
  |  Branch (21982:16): [True: 0, False: 3]
  ------------------
21983|       |#if defined(JANET_BSD) || defined(JANET_ILLUMOS)
21984|       |        int v_int = janet_getinteger(argv, 2);
21985|       |        if (st->optname == IP_MULTICAST_TTL) {
21986|       |            val.v_uchar = v_int;
21987|       |            optlen = sizeof(val.v_uchar);
21988|       |        } else {
21989|       |            val.v_int = v_int;
21990|       |            optlen = sizeof(val.v_int);
21991|       |        }
21992|       |#else
21993|      0|        val.v_int = janet_getinteger(argv, 2);
21994|      0|        optlen = sizeof(val.v_int);
21995|      0|#endif
21996|      3|    } else if (st->optname == IP_ADD_MEMBERSHIP || st->optname == IP_DROP_MEMBERSHIP) {
  ------------------
  |  Branch (21996:16): [True: 3, False: 0]
  |  Branch (21996:52): [True: 0, False: 0]
  ------------------
21997|      0|        const char *addr = janet_getcstring(argv, 2);
21998|      0|        memset(&val.v_mreq, 0, sizeof val.v_mreq);
21999|      0|        val.v_mreq.imr_interface.s_addr = htonl(INADDR_ANY);
22000|      0|        inet_pton(AF_INET, addr, &val.v_mreq.imr_multiaddr.s_addr);
22001|      0|        optlen = sizeof(val.v_mreq);
22002|      0|#ifndef JANET_NO_IPV6
22003|      3|    } else if (st->optname == IPV6_JOIN_GROUP || st->optname == IPV6_LEAVE_GROUP) {
  ------------------
  |  Branch (22003:16): [True: 3, False: 0]
  |  Branch (22003:50): [True: 0, False: 0]
  ------------------
22004|      0|        const char *addr = janet_getcstring(argv, 2);
22005|      0|        memset(&val.v_mreq6, 0, sizeof val.v_mreq6);
22006|      0|        val.v_mreq6.ipv6mr_interface = 0;
22007|      0|        inet_pton(AF_INET6, addr, &val.v_mreq6.ipv6mr_multiaddr);
22008|      0|        optlen = sizeof(val.v_mreq6);
22009|      0|#endif
22010|      3|    } else {
22011|      3|        janet_panicf("invalid socket option type");
22012|      3|    }
22013|       |
22014|      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]
  |  |  ------------------
  ------------------
22015|       |
22016|      0|    int r = setsockopt((JSock) stream->handle, st->level, st->optname, optval, optlen);
22017|      0|    if (r == -1) {
  ------------------
  |  Branch (22017:9): [True: 0, False: 0]
  ------------------
22018|      0|        janet_panicf("setsockopt(%q): %s", argv[1], janet_strerror(errno));
22019|      0|    }
22020|       |
22021|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22022|      0|}
janet_lib_net:
22046|  7.16k|void janet_lib_net(JanetTable *env) {
22047|  7.16k|    JanetRegExt net_cfuns[] = {
22048|  7.16k|        JANET_CORE_REG("net/address", cfun_net_sockaddr),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22049|  7.16k|        JANET_CORE_REG("net/listen", cfun_net_listen),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22050|  7.16k|        JANET_CORE_REG("net/socket", cfun_net_socket),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22051|  7.16k|        JANET_CORE_REG("net/accept", cfun_stream_accept),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22052|  7.16k|        JANET_CORE_REG("net/accept-loop", cfun_stream_accept_loop),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22053|  7.16k|        JANET_CORE_REG("net/read", cfun_stream_read),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22054|  7.16k|        JANET_CORE_REG("net/chunk", cfun_stream_chunk),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22055|  7.16k|        JANET_CORE_REG("net/write", cfun_stream_write),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22056|  7.16k|        JANET_CORE_REG("net/send-to", cfun_stream_send_to),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22057|  7.16k|        JANET_CORE_REG("net/recv-from", cfun_stream_recv_from),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22058|  7.16k|        JANET_CORE_REG("net/flush", cfun_stream_flush),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22059|  7.16k|        JANET_CORE_REG("net/connect", cfun_net_connect),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22060|  7.16k|        JANET_CORE_REG("net/shutdown", cfun_net_shutdown),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22061|  7.16k|        JANET_CORE_REG("net/peername", cfun_net_getpeername),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22062|  7.16k|        JANET_CORE_REG("net/localname", cfun_net_getsockname),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22063|  7.16k|        JANET_CORE_REG("net/address-unpack", cfun_net_address_unpack),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22064|  7.16k|        JANET_CORE_REG("net/setsockopt", cfun_net_setsockopt),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22065|  7.16k|        JANET_REG_END
  ------------------
  |  | 2109|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
22066|  7.16k|    };
22067|       |    janet_core_cfuns_ext(env, NULL, net_cfuns);
22068|  7.16k|}
janet_net_init:
22070|  7.64k|void janet_net_init(void) {
22071|       |#ifdef JANET_WINDOWS
22072|       |    WSADATA wsaData;
22073|       |    janet_assert(!WSAStartup(MAKEWORD(2, 2), &wsaData), "could not start winsock");
22074|       |    janet_vm.connect_ex_loaded = 0;
22075|       |    janet_vm.connect_ex = NULL;
22076|       |#endif
22077|  7.64k|}
janet_net_deinit:
22079|  7.64k|void janet_net_deinit(void) {
22080|       |#ifdef JANET_WINDOWS
22081|       |    WSACleanup();
22082|       |#endif
22083|  7.64k|}
os_which:
22256|      1|              "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.") {
22257|      1|    janet_arity(argc, 0, 1);
22258|      1|    if (argc == 1 && janet_truthy(argv[0])) {
  ------------------
  |  |  818|      1|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|      2|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  807|      2|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|      2|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|      1|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|      1|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 1, False: 0]
  |  |  ------------------
  |  |  819|      1|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|      2|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  807|      2|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|      2|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|      1|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|      1|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 1, False: 0]
  |  |  |  Branch (819:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (22258:9): [True: 1, False: 0]
  ------------------
22259|      1|        janet_getkeyword(argv, 0); /* Constrain to keywords */
22260|      1|        return janet_wrap_boolean(janet_equals(argv[0], os_which(0, NULL)));
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22261|      1|    }
22262|       |#if defined(JANET_OS_NAME)
22263|       |    return janet_ckeywordv(janet_stringify(JANET_OS_NAME));
22264|       |#elif defined(JANET_MINGW)
22265|       |    return janet_ckeywordv("mingw");
22266|       |#elif defined(JANET_CYGWIN)
22267|       |    return janet_ckeywordv("cygwin");
22268|       |#elif defined(JANET_WINDOWS)
22269|       |    return janet_ckeywordv("windows");
22270|       |#elif defined(JANET_APPLE)
22271|       |    return janet_ckeywordv("macos");
22272|       |#elif defined(__EMSCRIPTEN__)
22273|       |    return janet_ckeywordv("web");
22274|       |#elif defined(JANET_LINUX)
22275|      0|    return janet_ckeywordv("linux");
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22276|       |#elif defined(JANET_GNU_HURD)
22277|       |    return janet_ckeywordv("hurd");
22278|       |#elif defined(__FreeBSD__)
22279|       |    return janet_ckeywordv("freebsd");
22280|       |#elif defined(__NetBSD__)
22281|       |    return janet_ckeywordv("netbsd");
22282|       |#elif defined(__OpenBSD__)
22283|       |    return janet_ckeywordv("openbsd");
22284|       |#elif defined(__DragonFly__)
22285|       |    return janet_ckeywordv("dragonfly");
22286|       |#elif defined(JANET_BSD)
22287|       |    return janet_ckeywordv("bsd");
22288|       |#elif defined(JANET_ILLUMOS)
22289|       |    return janet_ckeywordv("illumos");
22290|       |#else
22291|       |    return janet_ckeywordv("posix");
22292|       |#endif
22293|      1|}
os_arch:
22309|      1|              "* :unknown\n") {
22310|      1|    janet_fixarity(argc, 0);
22311|      1|    (void) argv;
22312|       |    /* Check 64-bit vs 32-bit */
22313|       |#if defined(JANET_ARCH_NAME)
22314|       |    return janet_ckeywordv(janet_stringify(JANET_ARCH_NAME));
22315|       |#elif defined(__EMSCRIPTEN__)
22316|       |    return janet_ckeywordv("wasm");
22317|       |#elif (defined(__x86_64__) || defined(_M_X64))
22318|      1|    return janet_ckeywordv("x64");
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22319|       |#elif defined(__i386) || defined(_M_IX86)
22320|       |    return janet_ckeywordv("x86");
22321|       |#elif defined(_M_ARM64) || defined(__aarch64__)
22322|       |    return janet_ckeywordv("aarch64");
22323|       |#elif defined(_M_ARM) || defined(__arm__)
22324|       |    return janet_ckeywordv("arm");
22325|       |#elif (defined(__riscv) && (__riscv_xlen == 64))
22326|       |    return janet_ckeywordv("riscv64");
22327|       |#elif (defined(__riscv) && (__riscv_xlen == 32))
22328|       |    return janet_ckeywordv("riscv32");
22329|       |#elif (defined(__sparc__))
22330|       |    return janet_ckeywordv("sparc");
22331|       |#elif (defined(__ppc__))
22332|       |    return janet_ckeywordv("ppc");
22333|       |#elif (defined(__ppc64__) || defined(_ARCH_PPC64) || defined(_M_PPC))
22334|       |    return janet_ckeywordv("ppc64");
22335|       |#elif (defined(__s390x__))
22336|       |    return janet_ckeywordv("s390x");
22337|       |#elif (defined(__s390__))
22338|       |    return janet_ckeywordv("s390");
22339|       |#else
22340|       |    return janet_ckeywordv("unknown");
22341|       |#endif
22342|      1|}
os_exit:
22375|      1|              "skip cleanup code.") {
22376|      1|    janet_arity(argc, 0, 2);
22377|      1|    janet_sandbox_assert(JANET_SANDBOX_EXIT);
  ------------------
  |  | 2044|      1|#define JANET_SANDBOX_EXIT 524288
  ------------------
22378|      1|    int status;
22379|      1|    if (argc == 0) {
  ------------------
  |  Branch (22379:9): [True: 0, False: 1]
  ------------------
22380|      0|        status = EXIT_SUCCESS;
22381|      1|    } else if (janet_checkint(argv[0])) {
  ------------------
  |  Branch (22381:16): [True: 0, False: 1]
  ------------------
22382|      0|        status = 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)
  |  |  ------------------
  ------------------
22383|      1|    } else {
22384|      1|        status = EXIT_FAILURE;
22385|      1|    }
22386|      1|    int force = (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 (22386:18): [True: 0, False: 1]
  ------------------
22387|      1|    janet_deinit();
22388|      1|    if (force) {
  ------------------
  |  Branch (22388:9): [True: 0, False: 1]
  ------------------
22389|       |#ifdef JANET_PLAN9
22390|       |        exits(nil);
22391|       |#else
22392|      0|        _Exit(status);
22393|      0|#endif
22394|      1|    } else {
22395|      1|        exit(status);
22396|      1|    }
22397|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22398|      1|}
os_cpu_count:
22405|      3|              "unable to get an approximation, will return a default value dflt.") {
22406|      3|    janet_arity(argc, 0, 1);
22407|      3|    (void) argv; /* Prevent unused argument warning */
22408|       |#ifdef JANET_WINDOWS
22409|       |    SYSTEM_INFO info;
22410|       |    GetSystemInfo(&info);
22411|       |    return janet_wrap_integer(info.dwNumberOfProcessors);
22412|       |#elif defined(JANET_LINUX)
22413|       |    cpu_set_t cs;
22414|      3|    CPU_ZERO(&cs);
  ------------------
  |  Branch (22414:5): [Folded, False: 3]
  ------------------
22415|      3|    sched_getaffinity(0, sizeof(cs), &cs);
22416|      3|    int count = CPU_COUNT(&cs);
22417|      3|    return janet_wrap_integer(count);
  ------------------
  |  |  967|      3|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|      3|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
22418|       |#elif defined(JANET_BSD) && defined(HW_NCPUONLINE)
22419|       |    const int name[2] = {CTL_HW, HW_NCPUONLINE};
22420|       |    int result = 0;
22421|       |    size_t len = sizeof(int);
22422|       |    if (-1 == sysctl(name, 2, &result, &len, NULL, 0)) {
22423|       |        return argc > 0 ? argv[0] : janet_wrap_nil();
22424|       |    }
22425|       |    return janet_wrap_integer(result);
22426|       |#elif defined(JANET_BSD) && defined(HW_NCPU)
22427|       |    const int name[2] = {CTL_HW, HW_NCPU};
22428|       |    int result = 0;
22429|       |    size_t len = sizeof(int);
22430|       |    if (-1 == sysctl(name, 2, &result, &len, NULL, 0)) {
22431|       |        return argc > 0 ? argv[0] : janet_wrap_nil();
22432|       |    }
22433|       |    return janet_wrap_integer(result);
22434|       |#elif defined(JANET_ILLUMOS)
22435|       |    long result = sysconf(_SC_NPROCESSORS_CONF);
22436|       |    if (result < 0) {
22437|       |        return argc > 0 ? argv[0] : janet_wrap_nil();
22438|       |    }
22439|       |    return janet_wrap_integer(result);
22440|       |#elif defined(JANET_PLAN9)
22441|       |    return janet_wrap_integer(atoi(getenv("NPROC")));
22442|       |#else
22443|       |    return argc > 0 ? argv[0] : janet_wrap_nil();
22444|       |#endif
22445|      3|}
os_proc_kill:
22897|      1|              "ignored on Windows.") {
22898|      1|    janet_arity(argc, 1, 3);
22899|      1|    JanetProc *proc = janet_getabstract(argv, 0, &ProcAT);
22900|      1|    if (proc->flags & JANET_PROC_WAITED) {
  ------------------
  |  |22607|      1|#define JANET_PROC_WAITED 2
  ------------------
  |  Branch (22900:9): [True: 0, False: 1]
  ------------------
22901|      0|        janet_panicf("cannot kill process that has already finished");
22902|      0|    }
22903|       |#ifdef JANET_WINDOWS
22904|       |    if (proc->flags & JANET_PROC_CLOSED) {
22905|       |        janet_panicf("cannot close process handle that is already closed");
22906|       |    }
22907|       |    proc->flags |= JANET_PROC_CLOSED;
22908|       |    TerminateProcess(proc->pHandle, 1);
22909|       |    CloseHandle(proc->pHandle);
22910|       |    CloseHandle(proc->tHandle);
22911|       |#else
22912|      1|    int signal = -1;
22913|      1|    if (argc == 3) {
  ------------------
  |  Branch (22913:9): [True: 0, False: 1]
  ------------------
22914|      0|        signal = get_signal_kw(argv, 2);
22915|      0|    }
22916|      1|    int status = kill(proc->pid, signal == -1 ? SIGKILL : signal);
  ------------------
  |  Branch (22916:34): [True: 0, False: 1]
  ------------------
22917|      1|    if (status) {
  ------------------
  |  Branch (22917:9): [True: 0, False: 1]
  ------------------
22918|      0|        janet_panic(janet_strerror(errno));
22919|      0|    }
22920|      1|#endif
22921|       |    /* After killing process we wait on it. */
22922|      1|    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 (22922:9): [True: 0, False: 1]
  ------------------
22923|      0|#ifdef JANET_EV
22924|      0|        os_proc_wait_impl(proc);
22925|       |#else
22926|       |        return os_proc_wait_impl(proc);
22927|       |#endif
22928|      1|    } else {
22929|      1|        return argv[0];
22930|      1|    }
22931|      1|}
os_proc_close:
22937|      1|              "`proc` completes, return the exit code of `proc`. Otherwise, return nil.") {
22938|      1|    janet_fixarity(argc, 1);
22939|      1|    JanetProc *proc = janet_getabstract(argv, 0, &ProcAT);
22940|      1|#ifdef JANET_EV
22941|      1|    if (proc->flags & JANET_PROC_OWNS_STDIN) janet_stream_close(proc->in);
  ------------------
  |  |22610|      1|#define JANET_PROC_OWNS_STDIN 16
  ------------------
  |  Branch (22941:9): [True: 0, False: 1]
  ------------------
22942|      1|    if (proc->flags & JANET_PROC_OWNS_STDOUT) janet_stream_close(proc->out);
  ------------------
  |  |22611|      1|#define JANET_PROC_OWNS_STDOUT 32
  ------------------
  |  Branch (22942:9): [True: 0, False: 1]
  ------------------
22943|      1|    if (proc->flags & JANET_PROC_OWNS_STDERR) janet_stream_close(proc->err);
  ------------------
  |  |22612|      1|#define JANET_PROC_OWNS_STDERR 64
  ------------------
  |  Branch (22943:9): [True: 0, False: 1]
  ------------------
22944|       |#else
22945|       |    if (proc->flags & JANET_PROC_OWNS_STDIN) janet_file_close(proc->in);
22946|       |    if (proc->flags & JANET_PROC_OWNS_STDOUT) janet_file_close(proc->out);
22947|       |    if (proc->flags & JANET_PROC_OWNS_STDERR) janet_file_close(proc->err);
22948|       |#endif
22949|      1|    proc->flags &= ~(JANET_PROC_OWNS_STDIN | JANET_PROC_OWNS_STDOUT | JANET_PROC_OWNS_STDERR);
  ------------------
  |  |22610|      1|#define JANET_PROC_OWNS_STDIN 16
  ------------------
                  proc->flags &= ~(JANET_PROC_OWNS_STDIN | JANET_PROC_OWNS_STDOUT | JANET_PROC_OWNS_STDERR);
  ------------------
  |  |22611|      1|#define JANET_PROC_OWNS_STDOUT 32
  ------------------
                  proc->flags &= ~(JANET_PROC_OWNS_STDIN | JANET_PROC_OWNS_STDOUT | JANET_PROC_OWNS_STDERR);
  ------------------
  |  |22612|      1|#define JANET_PROC_OWNS_STDERR 64
  ------------------
22950|      1|    if (proc->flags & (JANET_PROC_WAITED | JANET_PROC_WAITING)) {
  ------------------
  |  |22607|      1|#define JANET_PROC_WAITED 2
  ------------------
                  if (proc->flags & (JANET_PROC_WAITED | JANET_PROC_WAITING)) {
  ------------------
  |  |22608|      1|#define JANET_PROC_WAITING 4
  ------------------
  |  Branch (22950:9): [True: 0, False: 1]
  ------------------
22951|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22952|      0|    }
22953|      1|#ifdef JANET_EV
22954|      1|    os_proc_wait_impl(proc);
22955|       |#else
22956|       |    return os_proc_wait_impl(proc);
22957|       |#endif
22958|      1|}
os_proc_getpid:
22962|      1|              "Get the process ID of the current process.") {
22963|      1|    janet_sandbox_assert(JANET_SANDBOX_SUBPROCESS);
  ------------------
  |  | 2023|      1|#define JANET_SANDBOX_SUBPROCESS 2
  ------------------
22964|      1|    janet_fixarity(argc, 0);
22965|      1|    (void) argv;
22966|       |#ifdef JANET_WINDOWS
22967|       |    return janet_wrap_number((double) _getpid());
22968|       |#else
22969|      1|    return janet_wrap_number((double) getpid());
  ------------------
  |  |  835|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22970|      1|#endif
22971|      1|}
os_sigaction:
23034|      3|              "All signal handlers are the same as supported by `os/proc-kill`.") {
23035|      3|    janet_sandbox_assert(JANET_SANDBOX_SIGNAL);
  ------------------
  |  | 2035|      3|#define JANET_SANDBOX_SIGNAL 8192
  ------------------
23036|      3|    janet_arity(argc, 1, 3);
23037|       |#ifdef JANET_WINDOWS
23038|       |    (void) argv;
23039|       |    janet_panic("unsupported on this platform");
23040|       |#else
23041|       |    /* TODO - per thread signal masks */
23042|      3|    int rc;
23043|      3|    int sig = get_signal_kw(argv, 0);
23044|      3|    JanetFunction *handler = janet_optfunction(argv, argc, 1, NULL);
23045|      3|    int can_interrupt = janet_optboolean(argv, argc, 2, 0);
23046|      3|    Janet oldhandler = janet_table_get(&janet_vm.signal_handlers, janet_wrap_integer(sig));
  ------------------
  |  |  967|      3|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|      3|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
23047|      3|    if (!janet_checktype(oldhandler, 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 (23047:9): [True: 0, False: 3]
  ------------------
23048|      0|        janet_gcunroot(oldhandler);
23049|      0|    }
23050|      3|    if (NULL != handler) {
  ------------------
  |  Branch (23050:9): [True: 0, False: 3]
  ------------------
23051|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23052|      0|        janet_gcroot(handlerv);
23053|      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)
  |  |  ------------------
  ------------------
23054|      3|    } else {
23055|      3|        janet_table_put(&janet_vm.signal_handlers, janet_wrap_integer(sig), janet_wrap_nil());
  ------------------
  |  |  967|      3|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|      3|#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|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23056|      3|    }
23057|      3|    struct sigaction action;
23058|      3|    sigset_t mask;
23059|      3|    sigaddset(&mask, sig);
23060|      3|    memset(&action, 0, sizeof(action));
23061|      3|    action.sa_flags |= SA_RESTART;
23062|      3|    if (can_interrupt) {
  ------------------
  |  Branch (23062:9): [True: 0, False: 3]
  ------------------
23063|       |#ifdef JANET_NO_INTERPRETER_INTERRUPT
23064|       |        janet_panic("interpreter interrupt not enabled");
23065|       |#else
23066|      0|        action.sa_handler = janet_signal_trampoline;
23067|      0|#endif
23068|      3|    } else {
23069|      3|        action.sa_handler = janet_signal_trampoline_no_interrupt;
23070|      3|    }
23071|      3|    action.sa_mask = mask;
23072|      3|    RETRY_EINTR(rc, sigaction(sig, &action, NULL));
  ------------------
  |  |  532|      3|#define RETRY_EINTR(RC, CALL) do { (RC) = CALL; } while((RC) < 0 && errno == EINTR)
  |  |  ------------------
  |  |  |  Branch (532:57): [True: 0, False: 3]
  |  |  |  Branch (532:69): [True: 0, False: 0]
  |  |  ------------------
  ------------------
23073|      3|    sigset_t set;
23074|      3|    sigemptyset(&set);
23075|      3|    sigaddset(&set, sig);
23076|       |#ifdef JANET_THREADS
23077|       |    pthread_sigmask(SIG_UNBLOCK, &set, NULL);
23078|       |#else
23079|      3|    sigprocmask(SIG_UNBLOCK, &set, NULL);
23080|      3|#endif
23081|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23082|      3|#endif
23083|      3|}
os_execute:
23619|      2|              "cause the program to block and deadlock.") {
23620|      2|    return os_execute_impl(argc, argv, JANET_EXECUTE_EXECUTE);
23621|      2|}
os_posix_exec:
23647|      1|              "does not allow redirection of stdio.") {
23648|       |#ifdef JANET_WINDOWS
23649|       |    (void) argc;
23650|       |    (void) argv;
23651|       |    janet_panic("not supported on Windows");
23652|       |#else
23653|      1|    return os_execute_impl(argc, argv, JANET_EXECUTE_EXEC);
23654|      1|#endif
23655|      1|}
os_posix_chroot:
23692|      3|              "Not supported on all systems (POSIX only).") {
23693|      3|    janet_sandbox_assert(JANET_SANDBOX_CHROOT);
  ------------------
  |  | 2036|      3|#define JANET_SANDBOX_CHROOT 16384
  ------------------
23694|      3|    janet_fixarity(argc, 1);
23695|       |#if defined(JANET_WINDOWS) || defined(JANET_PLAN9)
23696|       |    (void) argv;
23697|       |    janet_panic("not supported on Windows or Plan 9");
23698|       |#else
23699|      3|    const char *root = janet_getcstring(argv, 0);
23700|      3|    int result;
23701|      3|    do {
23702|      3|        result = chroot(root);
23703|      3|    } while (result == -1 && errno == EINTR);
  ------------------
  |  Branch (23703:14): [True: 0, False: 3]
  |  Branch (23703:30): [True: 0, False: 0]
  ------------------
23704|      3|    if (result == -1) {
  ------------------
  |  Branch (23704:9): [True: 0, False: 3]
  ------------------
23705|      0|        janet_panic(janet_strerror(errno));
23706|      0|    }
23707|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23708|      3|#endif
23709|      3|}
os_environ:
23758|      3|              "Get a copy of the OS environment table.") {
23759|      3|    janet_sandbox_assert(JANET_SANDBOX_ENV);
  ------------------
  |  | 2030|      3|#define JANET_SANDBOX_ENV 256
  ------------------
23760|      3|    (void) argv;
23761|      3|    janet_fixarity(argc, 0);
23762|      3|    int32_t nenv = 0;
23763|      3|    janet_lock_environ();
23764|      3|    char **env = environ;
23765|    102|    while (*env++)
  ------------------
  |  Branch (23765:12): [True: 99, False: 3]
  ------------------
23766|     99|        nenv += 1;
23767|      3|    JanetTable *t = janet_table(nenv);
23768|    102|    for (int32_t i = 0; i < nenv; i++) {
  ------------------
  |  Branch (23768:25): [True: 99, False: 3]
  ------------------
23769|     99|        char *e = environ[i];
23770|     99|        char *eq = strchr(e, '=');
23771|     99|        if (!eq) {
  ------------------
  |  Branch (23771:13): [True: 0, False: 99]
  ------------------
23772|      0|            janet_unlock_environ();
23773|      0|            janet_panic("no '=' in environ");
23774|      0|        }
23775|     99|        char *v = eq + 1;
23776|     99|        int32_t full_len = (int32_t) strlen(e);
23777|     99|        int32_t val_len = (int32_t) strlen(v);
23778|     99|        janet_table_put(
23779|     99|            t,
23780|     99|            janet_stringv((const uint8_t *)e, full_len - val_len - 1),
  ------------------
  |  | 1826|     99|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|     99|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|     99|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     99|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     99|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23781|     99|            janet_stringv((const uint8_t *)v, val_len)
  ------------------
  |  | 1826|     99|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|     99|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|     99|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     99|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     99|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23782|     99|        );
23783|     99|    }
23784|      3|    janet_unlock_environ();
23785|      3|    return janet_wrap_table(t);
  ------------------
  |  |  846|      3|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23786|      3|}
os_getenv:
23791|      3|              "Get the string value of an environment variable.") {
23792|      3|    janet_sandbox_assert(JANET_SANDBOX_ENV);
  ------------------
  |  | 2030|      3|#define JANET_SANDBOX_ENV 256
  ------------------
23793|      3|    janet_arity(argc, 1, 2);
23794|      3|    const char *cstr = janet_getcstring(argv, 0);
23795|      3|    janet_lock_environ();
23796|      3|    const char *res = getenv(cstr);
23797|      3|    Janet ret = res
  ------------------
  |  Branch (23797:17): [True: 0, False: 3]
  ------------------
23798|      3|                ? janet_cstringv(res)
  ------------------
  |  | 1825|      3|#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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23799|      3|                : argc == 2
  ------------------
  |  Branch (23799:19): [True: 0, False: 3]
  ------------------
23800|      3|                ? argv[1]
23801|      3|                : 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23802|      3|    janet_unlock_environ();
23803|      3|    return ret;
23804|      3|}
os_setenv:
23808|      1|              "Set an environment variable.") {
23809|       |#ifdef JANET_WINDOWS
23810|       |#define SETENV(K,V) _putenv_s(K, V)
23811|       |#define UNSETENV(K) _putenv_s(K, "")
23812|       |#elif defined(JANET_PLAN9)
23813|       |#define SETENV(K,V) putenv(K, V)
23814|       |#define UNSETENV(K) unsetenv(K)
23815|       |#else
23816|      1|#define SETENV(K,V) setenv(K, V, 1)
23817|      1|#define UNSETENV(K) unsetenv(K)
23818|      1|#endif
23819|      1|    janet_sandbox_assert(JANET_SANDBOX_ENV);
  ------------------
  |  | 2030|      1|#define JANET_SANDBOX_ENV 256
  ------------------
23820|      1|    janet_arity(argc, 1, 2);
23821|      1|    const char *ks = janet_getcstring(argv, 0);
23822|      1|    const char *vs = janet_optcstring(argv, argc, 1, NULL);
23823|      1|    janet_lock_environ();
23824|      1|    if (NULL == vs) {
  ------------------
  |  Branch (23824:9): [True: 0, False: 1]
  ------------------
23825|      0|        UNSETENV(ks);
  ------------------
  |  |23817|      0|#define UNSETENV(K) unsetenv(K)
  ------------------
23826|      1|    } else {
23827|      1|        SETENV(ks, vs);
  ------------------
  |  |23816|      1|#define SETENV(K,V) setenv(K, V, 1)
  ------------------
23828|      1|    }
23829|      1|    janet_unlock_environ();
23830|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23831|      1|}
os_time:
23836|      9|              "January 1, 1970, the Unix epoch. Returns a real number.") {
23837|      9|    janet_fixarity(argc, 0);
23838|      9|    (void) argv;
23839|      9|    double dtime = (double)(time(NULL));
23840|      9|    return janet_wrap_number(dtime);
  ------------------
  |  |  835|      9|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
23841|      9|}
os_clock:
23856|     11|              "- :tuple: Return a 2 integer tuple [seconds, nanoseconds]\n") {
23857|     11|    enum JanetTimeSource source;
23858|     11|    janet_sandbox_assert(JANET_SANDBOX_HRTIME);
  ------------------
  |  | 2029|     11|#define JANET_SANDBOX_HRTIME 128
  ------------------
23859|     11|    janet_arity(argc, 0, 2);
23860|       |
23861|     11|    JanetKeyword sourcestr = janet_optkeyword(argv, argc, 0, NULL);
23862|     11|    if (sourcestr == NULL || janet_cstrcmp(sourcestr, "realtime") == 0) {
  ------------------
  |  Branch (23862:9): [True: 3, False: 8]
  |  Branch (23862:30): [True: 0, False: 8]
  ------------------
23863|      1|        source = JANET_TIME_REALTIME;
23864|     10|    } else if (janet_cstrcmp(sourcestr, "monotonic") == 0) {
  ------------------
  |  Branch (23864:16): [True: 0, False: 10]
  ------------------
23865|      0|        source = JANET_TIME_MONOTONIC;
23866|     10|    } else if (janet_cstrcmp(sourcestr, "cputime") == 0) {
  ------------------
  |  Branch (23866:16): [True: 0, False: 10]
  ------------------
23867|      0|        source = JANET_TIME_CPUTIME;
23868|     10|    } else {
23869|     10|        janet_panicf("expected :realtime, :monotonic, or :cputime, got %v", argv[0]);
23870|     10|    }
23871|       |
23872|      1|    struct timespec tv;
23873|      1|    if (janet_gettime(&tv, source)) janet_panic("could not get time");
  ------------------
  |  Branch (23873:9): [True: 0, False: 1]
  ------------------
23874|       |
23875|      1|    JanetKeyword formatstr = janet_optkeyword(argv, argc, 1, NULL);
23876|      1|    if (formatstr == NULL || janet_cstrcmp(formatstr, "double") == 0) {
  ------------------
  |  Branch (23876:9): [True: 1, False: 0]
  |  Branch (23876:30): [True: 0, False: 0]
  ------------------
23877|      1|        double dtime = (double)(tv.tv_sec + (tv.tv_nsec / 1E9));
23878|      1|        return janet_wrap_number(dtime);
  ------------------
  |  |  835|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
23879|      1|    } else if (janet_cstrcmp(formatstr, "int") == 0) {
  ------------------
  |  Branch (23879:16): [True: 0, False: 0]
  ------------------
23880|      0|        return janet_wrap_number((double)(tv.tv_sec));
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
23881|      0|    } else if (janet_cstrcmp(formatstr, "tuple") == 0) {
  ------------------
  |  Branch (23881:16): [True: 0, False: 0]
  ------------------
23882|      0|        Janet tup[2] = {janet_wrap_number((double)tv.tv_sec),
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
23883|      0|                        janet_wrap_number((double)tv.tv_nsec)
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
23884|      0|                       };
23885|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23886|      0|    } else {
23887|      0|        janet_panicf("expected :double, :int, or :tuple, got %v", argv[1]);
23888|      0|    }
23889|      1|}
os_sleep:
23894|      5|              "nil.") {
23895|      5|    janet_fixarity(argc, 1);
23896|      5|    double delay = janet_getnumber(argv, 0);
23897|      5|    if (delay < 0) janet_panic("invalid argument to sleep");
  ------------------
  |  Branch (23897:9): [True: 0, False: 5]
  ------------------
23898|       |#ifdef JANET_WINDOWS
23899|       |    Sleep((DWORD)(delay * 1000));
23900|       |#else
23901|      5|    int rc;
23902|      5|    struct timespec ts;
23903|      5|    ts.tv_sec = (time_t) delay;
23904|      5|    ts.tv_nsec = (delay <= UINT32_MAX)
  ------------------
  |  Branch (23904:18): [True: 1, False: 4]
  ------------------
23905|      5|                 ? (long)((delay - ((uint32_t)delay)) * 1000000000)
23906|      5|                 : 0;
23907|      5|    RETRY_EINTR(rc, nanosleep(&ts, &ts));
  ------------------
  |  |  532|      5|#define RETRY_EINTR(RC, CALL) do { (RC) = CALL; } while((RC) < 0 && errno == EINTR)
  |  |  ------------------
  |  |  |  Branch (532:57): [True: 2, False: 3]
  |  |  |  Branch (532:69): [True: 0, False: 2]
  |  |  ------------------
  ------------------
23908|      5|#endif
23909|      5|    return janet_wrap_nil();
  ------------------
  |  |  831|      5|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      5|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      5|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      5|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23910|      5|}
os_isatty:
23915|      5|              "it will default to standard output.") {
23916|      5|    janet_arity(argc, 0, 1);
23917|      5|    FILE *f = (argc == 1) ? janet_getfile(argv, 0, NULL) : stdout;
  ------------------
  |  Branch (23917:15): [True: 1, False: 4]
  ------------------
23918|       |#ifdef JANET_WINDOWS
23919|       |    int fd = _fileno(f);
23920|       |    if (fd == -1) janet_panic("not a valid stream");
23921|       |    return janet_wrap_boolean(_isatty(fd));
23922|       |#else
23923|      5|    int fd = fileno(f);
23924|      5|    if (fd == -1) janet_panic(janet_strerror(errno));
  ------------------
  |  Branch (23924:9): [True: 0, False: 5]
  ------------------
23925|      5|    return janet_wrap_boolean(isatty(fd));
  ------------------
  |  |  834|      5|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|      5|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      5|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      5|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23926|      5|#endif
23927|      5|}
os_cryptorand:
23947|     24|              "Get or append `n` bytes of good quality random data provided by the OS. Returns a new buffer or `buf`.") {
23948|     24|    JanetBuffer *buffer;
23949|     24|    janet_arity(argc, 1, 2);
23950|     24|    int32_t offset;
23951|     24|    int32_t n = janet_getinteger(argv, 0);
23952|     24|    if (n < 0) janet_panic("expected positive integer");
  ------------------
  |  Branch (23952:9): [True: 6, False: 18]
  ------------------
23953|     18|    if (argc == 2) {
  ------------------
  |  Branch (23953:9): [True: 4, False: 14]
  ------------------
23954|      4|        buffer = janet_getbuffer(argv, 1);
23955|      4|        offset = buffer->count;
23956|     14|    } else {
23957|     14|        offset = 0;
23958|     14|        buffer = janet_buffer(n);
23959|     14|    }
23960|       |    /* We could optimize here by adding setcount_uninit */
23961|     18|    janet_buffer_setcount(buffer, offset + n);
23962|       |
23963|     18|    if (janet_cryptorand(buffer->data + offset, n) != 0)
  ------------------
  |  Branch (23963:9): [True: 0, False: 18]
  ------------------
23964|      0|        janet_panic("unable to get sufficient random data");
23965|       |
23966|     18|    return janet_wrap_buffer(buffer);
  ------------------
  |  |  847|     18|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23967|     18|}
os_date:
24022|      4|              "See tzset(<time.h>) or _tzset(<time.h>) for further details.") {
24023|      4|    janet_arity(argc, 0, 2);
24024|      4|    (void) argv;
24025|      4|    struct tm t_infos;
24026|      4|    struct tm *t_info = time_to_tm(argv, argc, 0, &t_infos);
24027|      4|    JanetKV *st = janet_struct_begin(9);
24028|      4|    janet_struct_put(st, janet_ckeywordv("seconds"), janet_wrap_number(t_info->tm_sec));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_struct_put(st, janet_ckeywordv("seconds"), janet_wrap_number(t_info->tm_sec));
  ------------------
  |  |  835|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
24029|      4|    janet_struct_put(st, janet_ckeywordv("minutes"), janet_wrap_number(t_info->tm_min));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_struct_put(st, janet_ckeywordv("minutes"), janet_wrap_number(t_info->tm_min));
  ------------------
  |  |  835|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
24030|      4|    janet_struct_put(st, janet_ckeywordv("hours"), janet_wrap_number(t_info->tm_hour));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_struct_put(st, janet_ckeywordv("hours"), janet_wrap_number(t_info->tm_hour));
  ------------------
  |  |  835|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
24031|      4|    janet_struct_put(st, janet_ckeywordv("month-day"), janet_wrap_number(t_info->tm_mday - 1));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_struct_put(st, janet_ckeywordv("month-day"), janet_wrap_number(t_info->tm_mday - 1));
  ------------------
  |  |  835|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
24032|      4|    janet_struct_put(st, janet_ckeywordv("month"), janet_wrap_number(t_info->tm_mon));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_struct_put(st, janet_ckeywordv("month"), janet_wrap_number(t_info->tm_mon));
  ------------------
  |  |  835|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
24033|      4|    janet_struct_put(st, janet_ckeywordv("year"), janet_wrap_number(t_info->tm_year + 1900));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_struct_put(st, janet_ckeywordv("year"), janet_wrap_number(t_info->tm_year + 1900));
  ------------------
  |  |  835|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
24034|      4|    janet_struct_put(st, janet_ckeywordv("week-day"), janet_wrap_number(t_info->tm_wday));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_struct_put(st, janet_ckeywordv("week-day"), janet_wrap_number(t_info->tm_wday));
  ------------------
  |  |  835|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
24035|      4|    janet_struct_put(st, janet_ckeywordv("year-day"), janet_wrap_number(t_info->tm_yday));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_struct_put(st, janet_ckeywordv("year-day"), janet_wrap_number(t_info->tm_yday));
  ------------------
  |  |  835|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
24036|      4|    janet_struct_put(st, janet_ckeywordv("dst"), janet_wrap_boolean(t_info->tm_isdst));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_struct_put(st, janet_ckeywordv("dst"), janet_wrap_boolean(t_info->tm_isdst));
  ------------------
  |  |  834|      4|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24037|      4|    return janet_wrap_struct(janet_struct_end(st));
  ------------------
  |  |  842|      4|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24038|      4|}
os_strftime:
24048|      1|              "See tzset(<time.h>) or _tzset(<time.h>) for further details.") {
24049|      1|    janet_arity(argc, 1, 3);
24050|      1|    const char *fmt = janet_getcstring(argv, 0);
24051|       |    /* ANSI X3.159-1989, section 4.12.3.5 "The strftime function" */
24052|      1|    static const char *valid = "aAbBcdHIjmMpSUwWxXyYZ%";
24053|      1|    const char *p = fmt;
24054|      1|    while (*p) {
  ------------------
  |  Branch (24054:12): [True: 0, False: 1]
  ------------------
24055|      0|        if (*p++ == '%') {
  ------------------
  |  Branch (24055:13): [True: 0, False: 0]
  ------------------
24056|      0|            if (!*p) {
  ------------------
  |  Branch (24056:17): [True: 0, False: 0]
  ------------------
24057|      0|                janet_panic("invalid conversion specifier");
24058|      0|            }
24059|      0|            if (!strchr(valid, *p)) {
  ------------------
  |  Branch (24059:17): [True: 0, False: 0]
  ------------------
24060|      0|                janet_panicf("invalid conversion specifier '%%%c'", *p);
24061|      0|            }
24062|      0|            p++;
24063|      0|        }
24064|      0|    }
24065|      1|    struct tm t_infos;
24066|      1|    struct tm *t_info = time_to_tm(argv, argc, 1, &t_infos);
24067|      1|    char buf[SIZETIMEFMT];
24068|      1|    (void)strftime(buf, sizeof(buf), fmt, t_info);
24069|      1|    return janet_cstringv(buf);
  ------------------
  |  | 1825|      1|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24070|      1|}
os_mktime:
24134|      5|              "Inverse function to os/date.") {
24135|      5|    janet_arity(argc, 1, 2);
24136|      5|    time_t t;
24137|      5|    struct tm t_info;
24138|       |
24139|       |    /* Use memset instead of = {0} to silence paranoid warning in macos */
24140|      5|    memset(&t_info, 0, sizeof(t_info));
24141|       |
24142|      5|    if (!janet_checktype(argv[0], JANET_TABLE) &&
  ------------------
  |  |  806|     10|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 5]
  |  |  ------------------
  |  |  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|      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 (24142:9): [True: 3, False: 2]
  ------------------
24143|      3|            !janet_checktype(argv[0], JANET_STRUCT))
  ------------------
  |  |  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 (24143:13): [True: 3, False: 0]
  ------------------
24144|      3|        janet_panic_type(argv[0], 0, JANET_TFLAG_DICTIONARY);
  ------------------
  |  |  614|      3|#define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  ------------------
  |  |  |  |  604|      3|#define JANET_TFLAG_TABLE (1 << JANET_TABLE)
  |  |  ------------------
  |  |               #define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  ------------------
  |  |  |  |  605|      3|#define JANET_TFLAG_STRUCT (1 << JANET_STRUCT)
  |  |  ------------------
  ------------------
24145|       |
24146|      2|    t_info.tm_sec = entry_getint(argv[0], "seconds");
24147|      2|    t_info.tm_min = entry_getint(argv[0], "minutes");
24148|      2|    t_info.tm_hour = entry_getint(argv[0], "hours");
24149|      2|    t_info.tm_mday = entry_getint(argv[0], "month-day") + 1;
24150|      2|    t_info.tm_mon = entry_getint(argv[0], "month");
24151|      2|    t_info.tm_year = entry_getint(argv[0], "year") - 1900;
24152|      2|    t_info.tm_isdst = entry_getdst(argv[0]);
24153|       |
24154|      2|    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 (24154:9): [True: 0, False: 2]
  ------------------
24155|       |        /* local time */
24156|      0|        t = mktime(&t_info);
24157|      2|    } else {
24158|       |        /* utc time */
24159|       |#ifdef JANET_NO_UTC_MKTIME
24160|       |        janet_panic("os/mktime UTC not supported on this platform");
24161|       |#else
24162|      2|        t = timegm(&t_info);
24163|      2|#endif
24164|      2|    }
24165|       |
24166|      2|    if (t == (time_t) -1) {
  ------------------
  |  Branch (24166:9): [True: 0, False: 2]
  ------------------
24167|      0|        janet_panicf("%s", janet_strerror(errno));
24168|      0|    }
24169|       |
24170|      2|    return janet_wrap_number((double)t);
  ------------------
  |  |  835|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
24171|      2|}
os_setlocale:
24191|     24|              "other functions such as `os/strftime` and even `printf`.") {
24192|     24|    janet_sandbox_assert(JANET_SANDBOX_LOCALE);
  ------------------
  |  | 2045|     24|#define JANET_SANDBOX_LOCALE 1048576
  ------------------
24193|     24|    janet_arity(argc, 0, 2);
24194|     24|    const char *locale_name = janet_optcstring(argv, argc, 0, NULL);
24195|     24|    int category_int = LC_ALL;
24196|     24|    if (argc > 1 && !janet_checktype(argv[1], 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 (24196:9): [True: 3, False: 21]
  |  Branch (24196:21): [True: 3, False: 0]
  ------------------
24197|      3|        if (janet_keyeq(argv[1], "all")) {
  ------------------
  |  Branch (24197:13): [True: 0, False: 3]
  ------------------
24198|      0|            category_int = LC_ALL;
24199|      3|        } else if (janet_keyeq(argv[1], "collate")) {
  ------------------
  |  Branch (24199:20): [True: 0, False: 3]
  ------------------
24200|      0|            category_int = LC_COLLATE;
24201|      3|        } else if (janet_keyeq(argv[1], "ctype")) {
  ------------------
  |  Branch (24201:20): [True: 0, False: 3]
  ------------------
24202|      0|            category_int = LC_CTYPE;
24203|      3|        } else if (janet_keyeq(argv[1], "monetary")) {
  ------------------
  |  Branch (24203:20): [True: 0, False: 3]
  ------------------
24204|      0|            category_int = LC_MONETARY;
24205|      3|        } else if (janet_keyeq(argv[1], "numeric")) {
  ------------------
  |  Branch (24205:20): [True: 0, False: 3]
  ------------------
24206|      0|            category_int = LC_NUMERIC;
24207|      3|        } else if (janet_keyeq(argv[1], "time")) {
  ------------------
  |  Branch (24207:20): [True: 0, False: 3]
  ------------------
24208|      0|            category_int = LC_TIME;
24209|      3|        } else {
24210|      3|            janet_panicf("expected one of :all, :collate, :ctype, :monetary, :numeric, or :time, got %v", argv[1]);
24211|      3|        }
24212|      3|    }
24213|     21|    const char *old = setlocale(category_int, locale_name);
24214|     21|    if (old == NULL) 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 (24214:9): [True: 1, False: 20]
  ------------------
24215|     20|    return janet_cstringv(old);
  ------------------
  |  | 1825|     20|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  848|     20|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|     20|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     20|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     20|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24216|     21|}
os_link:
24224|      1|              "creates a hard link. Does not work on Windows or Plan 9.") {
24225|      1|    janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2027|      1|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
24226|      1|    janet_arity(argc, 2, 3);
24227|       |#if defined(JANET_WINDOWS) || defined(JANET_PLAN9)
24228|       |    (void) argc;
24229|       |    (void) argv;
24230|       |    janet_panic("not supported on Windows or Plan 9");
24231|       |#else
24232|      1|    const char *oldpath = janet_getcstring(argv, 0);
24233|      1|    const char *newpath = janet_getcstring(argv, 1);
24234|      1|    int res = ((argc == 3 && janet_truthy(argv[2])) ? j_symlink : link)(oldpath, newpath);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
                  int res = ((argc == 3 && janet_truthy(argv[2])) ? j_symlink : link)(oldpath, newpath);
  ------------------
  |  |24176|      0|#define j_symlink symlink
  ------------------
  |  Branch (24234:17): [True: 0, False: 1]
  ------------------
24235|      1|    if (-1 == res) janet_panicf("%s: %s -> %s", janet_strerror(errno), oldpath, newpath);
  ------------------
  |  Branch (24235:9): [True: 0, False: 1]
  ------------------
24236|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24237|      1|#endif
24238|      1|}
os_symlink:
24242|      1|              "Create a symlink from oldpath to newpath, returning nil. Same as `(os/link oldpath newpath true)`.") {
24243|      1|    janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2027|      1|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
24244|      1|    janet_fixarity(argc, 2);
24245|       |#if defined(JANET_WINDOWS) || defined(JANET_PLAN9)
24246|       |    (void) argc;
24247|       |    (void) argv;
24248|       |    janet_panic("not supported on Windows or Plan 9");
24249|       |#else
24250|      1|    const char *oldpath = janet_getcstring(argv, 0);
24251|      1|    const char *newpath = janet_getcstring(argv, 1);
24252|      1|    int res = j_symlink(oldpath, newpath);
  ------------------
  |  |24176|      1|#define j_symlink symlink
  ------------------
24253|      1|    if (-1 == res) janet_panicf("%s: %s -> %s", janet_strerror(errno), oldpath, newpath);
  ------------------
  |  Branch (24253:9): [True: 0, False: 1]
  ------------------
24254|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24255|      1|#endif
24256|      1|}
os_touch:
24313|      8|              "times to the current time.") {
24314|      8|    janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2027|      8|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
24315|      8|    janet_arity(argc, 1, 3);
24316|      8|    const char *path = janet_getcstring(argv, 0);
24317|      8|    struct utimbuf timebuf, *bufp;
24318|      8|    if (argc >= 2) {
  ------------------
  |  Branch (24318:9): [True: 5, False: 3]
  ------------------
24319|      5|        bufp = &timebuf;
24320|      5|        timebuf.actime = (time_t) janet_getnumber(argv, 1);
24321|      5|        if (argc >= 3) {
  ------------------
  |  Branch (24321:13): [True: 2, False: 3]
  ------------------
24322|      2|            timebuf.modtime = (time_t) janet_getnumber(argv, 2);
24323|      3|        } else {
24324|      3|            timebuf.modtime = timebuf.actime;
24325|      3|        }
24326|      5|    } else {
24327|      3|        bufp = NULL;
24328|      3|    }
24329|      8|    int res = utime(path, bufp);
24330|      8|    if (-1 == res) janet_panic(janet_strerror(errno));
  ------------------
  |  Branch (24330:9): [True: 2, False: 6]
  ------------------
24331|      6|    return 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24332|      8|}
os_stat:
24636|  6.24k|              "* :modified - timestamp when file last modified (content changed)\n") {
24637|  6.24k|    return os_stat_or_lstat(0, argc, argv);
24638|  6.24k|}
os_dir:
24688|      4|              "with only the file name or directory name and no prefix.") {
24689|      4|    janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2028|      4|#define JANET_SANDBOX_FS_READ 64
  ------------------
24690|      4|    janet_arity(argc, 1, 2);
24691|      4|    const char *dir = janet_getcstring(argv, 0);
24692|      4|    JanetArray *paths = (argc == 2) ? janet_getarray(argv, 1) : janet_array(0);
  ------------------
  |  Branch (24692:25): [True: 1, False: 3]
  ------------------
24693|       |#ifdef JANET_WINDOWS
24694|       |    /* Read directory items with FindFirstFile / FindNextFile / FindClose */
24695|       |    struct _finddata_t afile;
24696|       |    char pattern[MAX_PATH + 1];
24697|       |    if (strlen(dir) > (sizeof(pattern) - 3))
24698|       |        janet_panicf("path too long: %s", dir);
24699|       |    snprintf(pattern, sizeof(pattern), "%s/*", dir);
24700|       |    intptr_t res = _findfirst(pattern, &afile);
24701|       |    if (-1 == res) janet_panicv(janet_cstringv(janet_strerror(errno)));
24702|       |    do {
24703|       |        if (strcmp(".", afile.name) && strcmp("..", afile.name)) {
24704|       |            janet_array_push(paths, janet_cstringv(afile.name));
24705|       |        }
24706|       |    } while (_findnext(res, &afile) != -1);
24707|       |    _findclose(res);
24708|       |#else
24709|       |    /* Read directory items with opendir / readdir / closedir */
24710|      4|    struct dirent *dp;
24711|      4|    DIR *dfd = opendir(dir);
24712|      4|    if (dfd == NULL) janet_panicf("cannot open directory %s: %s", dir, janet_strerror(errno));
  ------------------
  |  Branch (24712:9): [True: 0, False: 4]
  ------------------
24713|      4|    for (;;) {
24714|      0|        errno = 0;
24715|      0|        dp = readdir(dfd);
24716|      0|        if (dp == NULL) {
  ------------------
  |  Branch (24716:13): [True: 0, False: 0]
  ------------------
24717|      0|            if (errno) {
  ------------------
  |  Branch (24717:17): [True: 0, False: 0]
  ------------------
24718|      0|                int olderr = errno;
24719|      0|                closedir(dfd);
24720|      0|                janet_panicf("failed to read directory %s: %s", dir, janet_strerror(olderr));
24721|      0|            }
24722|      0|            break;
24723|      0|        }
24724|      0|        if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) {
  ------------------
  |  Branch (24724:13): [True: 0, False: 0]
  |  Branch (24724:41): [True: 0, False: 0]
  ------------------
24725|      0|            continue;
24726|      0|        }
24727|      0|        janet_array_push(paths, janet_cstringv(dp->d_name));
  ------------------
  |  | 1825|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24728|      0|    }
24729|      4|    closedir(dfd);
24730|      4|#endif
24731|      4|    return janet_wrap_array(paths);
  ------------------
  |  |  845|      4|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24732|      4|}
os_permission_string:
24783|  2.29k|              "include the file/directory/symlink character as rendered by `ls`.") {
24784|  2.29k|    janet_fixarity(argc, 1);
24785|  2.29k|    return os_make_permstring(os_get_unix_mode(argv, 0));
24786|  2.29k|}
os_permission_int:
24790|  1.02k|              "Parse a 9-character permission string and return an integer that can be used by chmod.") {
24791|  1.02k|    janet_fixarity(argc, 1);
24792|  1.02k|    return janet_wrap_integer(os_get_unix_mode(argv, 0));
  ------------------
  |  |  967|  1.02k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  1.02k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
24793|  1.02k|}
os_open:
24833|     41|              "  * :b - FILE\\_FLAG\\_NO\\_BUFFERING\n") {
24834|     41|    janet_arity(argc, 1, 3);
24835|     41|    const char *path = janet_getcstring(argv, 0);
24836|     41|    const uint8_t *opt_flags = janet_optkeyword(argv, argc, 1, (const uint8_t *) "r");
24837|     41|    jmode_t mode = os_optmode(argc, argv, 2, 0666);
24838|     41|    uint32_t stream_flags = 0;
24839|     41|    int disable_stream_mode = 0;
24840|     41|    JanetHandle fd;
24841|       |#ifdef JANET_WINDOWS
24842|       |    (void) mode;
24843|       |    int inherited_handle = 0;
24844|       |    DWORD desiredAccess = 0;
24845|       |    DWORD shareMode = 0;
24846|       |    DWORD creationDisp = 0;
24847|       |    DWORD fileFlags = FILE_FLAG_OVERLAPPED;
24848|       |    DWORD fileAttributes = 0;
24849|       |    /* We map unix-like open flags to the creationDisp parameter */
24850|       |    int creatUnix = 0;
24851|       |#define OCREAT 1
24852|       |#define OEXCL 2
24853|       |#define OTRUNC 4
24854|       |    for (const uint8_t *c = opt_flags; *c; c++) {
24855|       |        switch (*c) {
24856|       |            default:
24857|       |                break;
24858|       |            case 'r':
24859|       |                desiredAccess |= GENERIC_READ;
24860|       |                stream_flags |= JANET_STREAM_READABLE;
24861|       |                janet_sandbox_assert(JANET_SANDBOX_FS_READ);
24862|       |                break;
24863|       |            case 'w':
24864|       |                desiredAccess |= GENERIC_WRITE;
24865|       |                stream_flags |= JANET_STREAM_WRITABLE;
24866|       |                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
24867|       |                break;
24868|       |            case 'a':
24869|       |                desiredAccess |= FILE_APPEND_DATA;
24870|       |                stream_flags |= JANET_STREAM_WRITABLE;
24871|       |                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
24872|       |                break;
24873|       |            case 'c':
24874|       |                creatUnix |= OCREAT;
24875|       |                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
24876|       |                break;
24877|       |            case 'e':
24878|       |                creatUnix |= OEXCL;
24879|       |                break;
24880|       |            case 't':
24881|       |                creatUnix |= OTRUNC;
24882|       |                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
24883|       |                break;
24884|       |            /* Windows only flags */
24885|       |            case 'D':
24886|       |                shareMode |= FILE_SHARE_DELETE;
24887|       |                break;
24888|       |            case 'R':
24889|       |                shareMode |= FILE_SHARE_READ;
24890|       |                break;
24891|       |            case 'W':
24892|       |                shareMode |= FILE_SHARE_WRITE;
24893|       |                break;
24894|       |            case 'H':
24895|       |                fileAttributes |= FILE_ATTRIBUTE_HIDDEN;
24896|       |                break;
24897|       |            case 'O':
24898|       |                fileAttributes |= FILE_ATTRIBUTE_READONLY;
24899|       |                break;
24900|       |            case 'F':
24901|       |                fileAttributes |= FILE_ATTRIBUTE_OFFLINE;
24902|       |                break;
24903|       |            case 'T':
24904|       |                fileAttributes |= FILE_ATTRIBUTE_TEMPORARY;
24905|       |                break;
24906|       |            case 'd':
24907|       |                fileFlags |= FILE_FLAG_DELETE_ON_CLOSE;
24908|       |                break;
24909|       |            case 'b':
24910|       |                fileFlags |= FILE_FLAG_NO_BUFFERING;
24911|       |                break;
24912|       |            case 'I':
24913|       |                inherited_handle = 1;
24914|       |                break;
24915|       |            case 'V':
24916|       |                fileFlags &= ~FILE_FLAG_OVERLAPPED;
24917|       |                disable_stream_mode = 1;
24918|       |                break;
24919|       |                /* we could potentially add more here -
24920|       |                 * https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea
24921|       |                 */
24922|       |        }
24923|       |    }
24924|       |    switch (creatUnix) {
24925|       |        default:
24926|       |            janet_panic("invalid creation flags");
24927|       |        case 0:
24928|       |            creationDisp = OPEN_EXISTING;
24929|       |            break;
24930|       |        case OCREAT:
24931|       |            creationDisp = OPEN_ALWAYS;
24932|       |            janet_sandbox_assert(JANET_SANDBOX_FS_WRITE | JANET_SANDBOX_FS_READ);
24933|       |            break;
24934|       |        case OCREAT + OEXCL:
24935|       |            creationDisp = CREATE_NEW;
24936|       |            janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
24937|       |            break;
24938|       |        case OCREAT + OTRUNC:
24939|       |            creationDisp = CREATE_ALWAYS;
24940|       |            janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
24941|       |            break;
24942|       |        case OTRUNC:
24943|       |            creationDisp = TRUNCATE_EXISTING;
24944|       |            janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
24945|       |            break;
24946|       |    }
24947|       |    if (fileAttributes == 0) {
24948|       |        fileAttributes = FILE_ATTRIBUTE_NORMAL;
24949|       |    }
24950|       |    SECURITY_ATTRIBUTES saAttr;
24951|       |    memset(&saAttr, 0, sizeof(saAttr));
24952|       |    saAttr.nLength = sizeof(saAttr);
24953|       |    if (inherited_handle) {
24954|       |        saAttr.bInheritHandle = TRUE; /* Needed to do interesting things with file */
24955|       |    }
24956|       |    fd = CreateFileA(path, desiredAccess, shareMode, &saAttr, creationDisp, fileFlags | fileAttributes, NULL);
24957|       |    if (fd == INVALID_HANDLE_VALUE) janet_panicv(janet_ev_lasterr());
24958|       |#else
24959|     41|    int open_flags = O_NONBLOCK;
24960|     41|#ifdef JANET_LINUX
24961|     41|    open_flags |= O_CLOEXEC;
24962|     41|#endif
24963|     41|    int read_flag = 0;
24964|     41|    int write_flag = 0;
24965|    688|    for (const uint8_t *c = opt_flags; *c; c++) {
  ------------------
  |  Branch (24965:40): [True: 647, False: 41]
  ------------------
24966|    647|        switch (*c) {
24967|    275|            default:
  ------------------
  |  Branch (24967:13): [True: 275, False: 372]
  ------------------
24968|    275|                break;
24969|    275|            case 'r':
  ------------------
  |  Branch (24969:13): [True: 40, False: 607]
  ------------------
24970|     40|                read_flag = 1;
24971|     40|                stream_flags |= JANET_STREAM_READABLE;
  ------------------
  |  |  625|     40|#define JANET_STREAM_READABLE 0x200
  ------------------
24972|     40|                janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2028|     40|#define JANET_SANDBOX_FS_READ 64
  ------------------
24973|     40|                break;
24974|     13|            case 'w':
  ------------------
  |  Branch (24974:13): [True: 13, False: 634]
  ------------------
24975|     13|                write_flag = 1;
24976|     13|                stream_flags |= JANET_STREAM_WRITABLE;
  ------------------
  |  |  626|     13|#define JANET_STREAM_WRITABLE 0x400
  ------------------
24977|     13|                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2027|     13|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
24978|     13|                break;
24979|     58|            case 'c':
  ------------------
  |  Branch (24979:13): [True: 58, False: 589]
  ------------------
24980|     58|                open_flags |= O_CREAT;
24981|     58|                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2027|     58|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
24982|     58|                break;
24983|     71|            case 'e':
  ------------------
  |  Branch (24983:13): [True: 71, False: 576]
  ------------------
24984|     71|                open_flags |= O_EXCL;
24985|     71|                break;
24986|     33|            case 't':
  ------------------
  |  Branch (24986:13): [True: 33, False: 614]
  ------------------
24987|     33|                open_flags |= O_TRUNC;
24988|     33|                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2027|     33|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
24989|     33|                break;
24990|       |            /* posix only */
24991|      1|            case 'x':
  ------------------
  |  Branch (24991:13): [True: 1, False: 646]
  ------------------
24992|      1|                open_flags |= O_SYNC;
24993|      1|                break;
24994|     40|            case 'C':
  ------------------
  |  Branch (24994:13): [True: 40, False: 607]
  ------------------
24995|     40|                open_flags |= O_NOCTTY;
24996|     40|                break;
24997|     36|            case 'a':
  ------------------
  |  Branch (24997:13): [True: 36, False: 611]
  ------------------
24998|     36|                open_flags |= O_APPEND;
24999|     36|                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2027|     36|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
25000|     36|                break;
25001|     80|            case 'N':
  ------------------
  |  Branch (25001:13): [True: 80, False: 567]
  ------------------
25002|     80|                open_flags &= ~O_NONBLOCK;
25003|     80|                disable_stream_mode = 1;
25004|     80|                break;
25005|    647|        }
25006|    647|    }
25007|       |    /* If both read and write, fix up to O_RDWR */
25008|     41|    if (read_flag && !write_flag) {
  ------------------
  |  Branch (25008:9): [True: 10, False: 31]
  |  Branch (25008:22): [True: 9, False: 1]
  ------------------
25009|      9|        open_flags |= O_RDONLY;
25010|      9|        janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2028|      9|#define JANET_SANDBOX_FS_READ 64
  ------------------
25011|     32|    } else if (write_flag && !read_flag) {
  ------------------
  |  Branch (25011:16): [True: 4, False: 28]
  |  Branch (25011:30): [True: 3, False: 1]
  ------------------
25012|      3|        open_flags |= O_WRONLY;
25013|      3|        janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2027|      3|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
25014|     29|    } else {
25015|     29|        open_flags |= O_RDWR;
25016|     29|        janet_sandbox_assert(JANET_SANDBOX_FS_WRITE | JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2027|     29|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
                      janet_sandbox_assert(JANET_SANDBOX_FS_WRITE | JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2028|     29|#define JANET_SANDBOX_FS_READ 64
  ------------------
25017|     29|    }
25018|       |
25019|     41|    do {
25020|     41|        fd = open(path, open_flags, mode);
25021|     41|    } while (fd == -1 && errno == EINTR);
  ------------------
  |  Branch (25021:14): [True: 29, False: 12]
  |  Branch (25021:26): [True: 0, False: 29]
  ------------------
25022|     41|    if (fd == -1) janet_panicv(janet_ev_lasterr());
  ------------------
  |  Branch (25022:9): [True: 29, False: 12]
  ------------------
25023|     12|#endif
25024|     12|    return janet_wrap_abstract(janet_stream(fd, disable_stream_mode ? 0 : stream_flags, NULL));
  ------------------
  |  |  851|     12|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|     24|    janet_nanbox_from_pointer((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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (825:32): [True: 0, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25025|     41|}
os_pipe:
25035|      7|              "By default, both ends of the pipe are non-blocking for use with the `ev` module.") {
25036|      7|    (void) argv;
25037|      7|    janet_sandbox_assert(JANET_SANDBOX_FS_WRITE | JANET_SANDBOX_FS_TEMP);
  ------------------
  |  | 2027|      7|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
                  janet_sandbox_assert(JANET_SANDBOX_FS_WRITE | JANET_SANDBOX_FS_TEMP);
  ------------------
  |  | 2032|      7|#define JANET_SANDBOX_FS_TEMP 1024
  ------------------
25038|      7|    janet_arity(argc, 0, 1);
25039|      7|    JanetHandle fds[2];
25040|      7|    int flags = 0;
25041|      7|    if (argc > 0 && !janet_checktype(argv[0], 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 (25041:9): [True: 1, False: 6]
  |  Branch (25041:21): [True: 1, False: 0]
  ------------------
25042|      1|        flags = (int) janet_getflags(argv, 0, "WR");
25043|      1|    }
25044|      7|    if (janet_make_pipe(fds, flags)) janet_panicv(janet_ev_lasterr());
  ------------------
  |  Branch (25044:9): [True: 0, False: 7]
  ------------------
25045|      7|    JanetStream *reader = janet_stream(fds[0], (flags & 2) ? 0 : JANET_STREAM_READABLE, NULL);
  ------------------
  |  |  625|     14|#define JANET_STREAM_READABLE 0x200
  ------------------
  |  Branch (25045:48): [True: 0, False: 7]
  ------------------
25046|      7|    JanetStream *writer = janet_stream(fds[1], (flags & 1) ? 0 : JANET_STREAM_WRITABLE, NULL);
  ------------------
  |  |  626|     14|#define JANET_STREAM_WRITABLE 0x400
  ------------------
  |  Branch (25046:48): [True: 0, False: 7]
  ------------------
25047|      7|    Janet tup[2] = {janet_wrap_abstract(reader), janet_wrap_abstract(writer)};
  ------------------
  |  |  851|      7|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  Janet tup[2] = {janet_wrap_abstract(reader), janet_wrap_abstract(writer)};
  ------------------
  |  |  851|      7|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25048|      7|    return janet_wrap_tuple(janet_tuple_n(tup, 2));
  ------------------
  |  |  843|      7|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25049|      7|}
janet_lib_os:
25056|  7.16k|void janet_lib_os(JanetTable *env) {
25057|       |#if !defined(JANET_REDUCED_OS) && defined(JANET_WINDOWS) && defined(JANET_THREADS)
25058|       |    /* During start up, the top-most abstract machine (thread)
25059|       |     * in the thread tree sets up the critical section. */
25060|       |    static volatile long env_lock_initializing = 0;
25061|       |    static volatile long env_lock_initialized = 0;
25062|       |    if (!InterlockedExchange(&env_lock_initializing, 1)) {
25063|       |        InitializeCriticalSection(&env_lock);
25064|       |        InterlockedOr(&env_lock_initialized, 1);
25065|       |    } else {
25066|       |        while (!InterlockedOr(&env_lock_initialized, 0)) {
25067|       |            Sleep(0);
25068|       |        }
25069|       |    }
25070|       |
25071|       |#endif
25072|  7.16k|#ifndef JANET_NO_PROCESSES
25073|  7.16k|#endif
25074|  7.16k|    JanetRegExt os_cfuns[] = {
25075|  7.16k|        JANET_CORE_REG("os/exit", os_exit),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25076|  7.16k|        JANET_CORE_REG("os/which", os_which),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25077|  7.16k|        JANET_CORE_REG("os/arch", os_arch),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25078|  7.16k|        JANET_CORE_REG("os/compiler", os_compiler),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25079|  7.16k|#ifndef JANET_REDUCED_OS
25080|       |
25081|       |        /* misc (un-sandboxed) */
25082|  7.16k|        JANET_CORE_REG("os/cpu-count", os_cpu_count),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25083|  7.16k|        JANET_CORE_REG("os/cwd", os_cwd),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25084|  7.16k|        JANET_CORE_REG("os/cryptorand", os_cryptorand),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25085|  7.16k|        JANET_CORE_REG("os/perm-string", os_permission_string),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25086|  7.16k|        JANET_CORE_REG("os/perm-int", os_permission_int),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25087|  7.16k|        JANET_CORE_REG("os/mktime", os_mktime),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25088|  7.16k|        JANET_CORE_REG("os/time", os_time), /* not high resolution */
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25089|  7.16k|        JANET_CORE_REG("os/date", os_date), /* not high resolution */
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25090|  7.16k|        JANET_CORE_REG("os/strftime", os_strftime),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25091|  7.16k|        JANET_CORE_REG("os/sleep", os_sleep),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25092|  7.16k|        JANET_CORE_REG("os/isatty", os_isatty),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25093|  7.16k|#ifndef JANET_NO_LOCALES
25094|  7.16k|        JANET_CORE_REG("os/setlocale", os_setlocale),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25095|  7.16k|#endif
25096|       |
25097|       |        /* env functions */
25098|  7.16k|#ifndef JANET_PLAN9
25099|  7.16k|        JANET_CORE_REG("os/environ", os_environ),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25100|  7.16k|#endif
25101|  7.16k|        JANET_CORE_REG("os/getenv", os_getenv),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25102|  7.16k|        JANET_CORE_REG("os/setenv", os_setenv),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25103|       |
25104|       |        /* fs read */
25105|  7.16k|        JANET_CORE_REG("os/dir", os_dir),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25106|  7.16k|        JANET_CORE_REG("os/stat", os_stat),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25107|  7.16k|        JANET_CORE_REG("os/lstat", os_lstat),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25108|  7.16k|        JANET_CORE_REG("os/realpath", os_realpath),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25109|  7.16k|        JANET_CORE_REG("os/cd", os_cd),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25110|  7.16k|#ifndef JANET_NO_UMASK
25111|  7.16k|        JANET_CORE_REG("os/umask", os_umask),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25112|  7.16k|#endif
25113|  7.16k|#ifndef JANET_NO_SYMLINKS
25114|  7.16k|        JANET_CORE_REG("os/readlink", os_readlink),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25115|  7.16k|#endif
25116|       |
25117|       |        /* fs write */
25118|  7.16k|        JANET_CORE_REG("os/mkdir", os_mkdir),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25119|  7.16k|        JANET_CORE_REG("os/rmdir", os_rmdir),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25120|  7.16k|        JANET_CORE_REG("os/rm", os_remove),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25121|  7.16k|        JANET_CORE_REG("os/link", os_link),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25122|  7.16k|        JANET_CORE_REG("os/rename", os_rename),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25123|  7.16k|        JANET_CORE_REG("os/chmod", os_chmod),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25124|  7.16k|        JANET_CORE_REG("os/touch", os_touch),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25125|  7.16k|#ifndef JANET_NO_SYMLINKS
25126|  7.16k|        JANET_CORE_REG("os/symlink", os_symlink),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25127|  7.16k|#endif
25128|       |
25129|       |        /* processes */
25130|  7.16k|#ifndef JANET_NO_PROCESSES
25131|  7.16k|        JANET_CORE_REG("os/execute", os_execute),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25132|  7.16k|        JANET_CORE_REG("os/spawn", os_spawn),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25133|  7.16k|        JANET_CORE_REG("os/shell", os_shell),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25134|  7.16k|        JANET_CORE_REG("os/posix-fork", os_posix_fork),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25135|  7.16k|        JANET_CORE_REG("os/posix-exec", os_posix_exec),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25136|  7.16k|        JANET_CORE_REG("os/posix-chroot", os_posix_chroot),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25137|       |        /* no need to sandbox process management if you can't create processes
25138|       |         * (allows for limited functionality if use exposes C-functions to create specific processes) */
25139|  7.16k|        JANET_CORE_REG("os/proc-wait", os_proc_wait),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25140|  7.16k|        JANET_CORE_REG("os/proc-kill", os_proc_kill),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25141|  7.16k|        JANET_CORE_REG("os/proc-close", os_proc_close),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25142|  7.16k|        JANET_CORE_REG("os/getpid", os_proc_getpid),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25143|  7.16k|#ifdef JANET_EV
25144|  7.16k|        JANET_CORE_REG("os/sigaction", os_sigaction),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25145|  7.16k|#endif
25146|  7.16k|#endif
25147|       |
25148|       |        /* high resolution timers */
25149|  7.16k|        JANET_CORE_REG("os/clock", os_clock),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25150|       |
25151|  7.16k|#ifdef JANET_EV
25152|  7.16k|        JANET_CORE_REG("os/open", os_open), /* fs read and write */
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25153|  7.16k|        JANET_CORE_REG("os/pipe", os_pipe),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25154|  7.16k|#endif
25155|  7.16k|#endif
25156|  7.16k|        JANET_REG_END
  ------------------
  |  | 2109|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
25157|  7.16k|    };
25158|       |    janet_core_cfuns_ext(env, NULL, os_cfuns);
25159|  7.16k|}
janet_is_symbol_char:
25219|  6.97M|int janet_is_symbol_char(uint8_t c) {
25220|  6.97M|    return symchars[c >> 5] & ((uint32_t)1 << (c & 0x1F));
25221|  6.97M|}
janet_valid_utf8:
25226|  25.4k|int janet_valid_utf8(const uint8_t *str, int32_t len) {
25227|  25.4k|    int32_t i = 0;
25228|  25.4k|    int32_t j;
25229|   368k|    while (i < len) {
  ------------------
  |  Branch (25229:12): [True: 344k, False: 24.8k]
  ------------------
25230|   344k|        int32_t nexti;
25231|   344k|        uint8_t c = str[i];
25232|       |
25233|       |        /* Check the number of bytes in code point */
25234|   344k|        if (c < 0x80) nexti = i + 1;
  ------------------
  |  Branch (25234:13): [True: 338k, False: 5.49k]
  ------------------
25235|  5.49k|        else if ((c >> 5) == 0x06) nexti = i + 2;
  ------------------
  |  Branch (25235:18): [True: 817, False: 4.68k]
  ------------------
25236|  4.68k|        else if ((c >> 4) == 0x0E) nexti = i + 3;
  ------------------
  |  Branch (25236:18): [True: 1.04k, False: 3.64k]
  ------------------
25237|  3.64k|        else if ((c >> 3) == 0x1E) nexti = i + 4;
  ------------------
  |  Branch (25237:18): [True: 3.18k, False: 453]
  ------------------
25238|       |        /* Don't allow 5 or 6 byte code points */
25239|    453|        else return 0;
25240|       |
25241|       |        /* No overflow */
25242|   343k|        if (nexti > len) return 0;
  ------------------
  |  Branch (25242:13): [True: 61, False: 343k]
  ------------------
25243|       |
25244|       |        /* Ensure trailing bytes are well formed (10XX XXXX) */
25245|   355k|        for (j = i + 1; j < nexti; j++) {
  ------------------
  |  Branch (25245:25): [True: 12.3k, False: 343k]
  ------------------
25246|  12.3k|            if ((str[j] >> 6) != 2) return 0;
  ------------------
  |  Branch (25246:17): [True: 77, False: 12.2k]
  ------------------
25247|  12.3k|        }
25248|       |
25249|       |        /* Check for overlong encoding */
25250|   343k|        if ((nexti == i + 2) && str[i] < 0xC2) return 0;
  ------------------
  |  Branch (25250:13): [True: 722, False: 342k]
  |  Branch (25250:33): [True: 1, False: 721]
  ------------------
25251|   343k|        if ((str[i] == 0xE0) && str[i + 1] < 0xA0) return 0;
  ------------------
  |  Branch (25251:13): [True: 358, False: 343k]
  |  Branch (25251:33): [True: 1, False: 357]
  ------------------
25252|   343k|        if ((str[i] == 0xF0) && str[i + 1] < 0x90) return 0;
  ------------------
  |  Branch (25252:13): [True: 901, False: 342k]
  |  Branch (25252:33): [True: 0, False: 901]
  ------------------
25253|       |
25254|   343k|        i = nexti;
25255|   343k|    }
25256|  24.8k|    return 1;
25257|  25.4k|}
janet_parser_consume:
25861|  12.9M|void janet_parser_consume(JanetParser *parser, uint8_t c) {
25862|  12.9M|    int consumed = 0;
25863|  12.9M|    janet_parser_checkdead(parser);
25864|  12.9M|    if (c == '\r') {
  ------------------
  |  Branch (25864:9): [True: 20.6k, False: 12.9M]
  ------------------
25865|  20.6k|        parser->line++;
25866|  20.6k|        parser->column = 0;
25867|  12.9M|    } else if (c == '\n') {
  ------------------
  |  Branch (25867:16): [True: 214k, False: 12.7M]
  ------------------
25868|   214k|        parser->column = 0;
25869|   214k|        if (parser->lookback != '\r')
  ------------------
  |  Branch (25869:13): [True: 213k, False: 1.22k]
  ------------------
25870|   213k|            parser->line++;
25871|  12.7M|    } else {
25872|  12.7M|        parser->column++;
25873|  12.7M|    }
25874|  28.8M|    while (!consumed && !parser->error) {
  ------------------
  |  Branch (25874:12): [True: 15.8M, False: 12.9M]
  |  Branch (25874:25): [True: 15.8M, False: 777]
  ------------------
25875|  15.8M|        JanetParseState *state = parser->states + parser->statecount - 1;
25876|  15.8M|        consumed = state->consumer(parser, state, c);
25877|  15.8M|    }
25878|  12.9M|    parser->lookback = c;
25879|  12.9M|}
janet_parser_eof:
25881|   103k|void janet_parser_eof(JanetParser *parser) {
25882|   103k|    janet_parser_checkdead(parser);
25883|   103k|    size_t oldcolumn = parser->column;
25884|   103k|    size_t oldline = parser->line;
25885|   103k|    janet_parser_consume(parser, '\n');
25886|   103k|    if (parser->statecount > 1) {
  ------------------
  |  Branch (25886:9): [True: 754, False: 102k]
  ------------------
25887|    754|        delim_error(parser, parser->statecount - 1, 0, "unexpected end of source");
25888|    754|    }
25889|   103k|    parser->line = oldline;
25890|   103k|    parser->column = oldcolumn;
25891|   103k|    parser->flag |= JANET_PARSER_DEAD;
  ------------------
  |  |25193|   103k|#define JANET_PARSER_DEAD 0x1
  ------------------
25892|   103k|}
janet_parser_status:
25894|  12.9M|enum JanetParserStatus janet_parser_status(JanetParser *parser) {
25895|  12.9M|    if (parser->error) return JANET_PARSE_ERROR;
  ------------------
  |  Branch (25895:9): [True: 4.57k, False: 12.9M]
  ------------------
25896|  12.9M|    if (parser->flag) return JANET_PARSE_DEAD;
  ------------------
  |  Branch (25896:9): [True: 102k, False: 12.8M]
  ------------------
25897|  12.8M|    if (parser->statecount > 1) return JANET_PARSE_PENDING;
  ------------------
  |  Branch (25897:9): [True: 12.8M, False: 52.2k]
  ------------------
25898|  52.2k|    return JANET_PARSE_ROOT;
25899|  12.8M|}
janet_parser_flush:
25901|  2.28k|void janet_parser_flush(JanetParser *parser) {
25902|  2.28k|    parser->argcount = 0;
25903|  2.28k|    parser->statecount = 1;
25904|  2.28k|    parser->bufcount = 0;
25905|  2.28k|    parser->pending = 0;
25906|  2.28k|}
janet_parser_error:
25908|  2.28k|const char *janet_parser_error(JanetParser *parser) {
25909|  2.28k|    enum JanetParserStatus status = janet_parser_status(parser);
25910|  2.28k|    if (status == JANET_PARSE_ERROR) {
  ------------------
  |  Branch (25910:9): [True: 2.28k, False: 0]
  ------------------
25911|  2.28k|        const char *e = parser->error;
25912|  2.28k|        parser->error = NULL;
25913|  2.28k|        parser->flag &= ~JANET_PARSER_GENERATED_ERROR;
  ------------------
  |  |25194|  2.28k|#define JANET_PARSER_GENERATED_ERROR 0x2
  ------------------
25914|  2.28k|        janet_parser_flush(parser);
25915|  2.28k|        return e;
25916|  2.28k|    }
25917|      0|    return NULL;
25918|  2.28k|}
janet_parser_produce:
25920|   237k|Janet janet_parser_produce(JanetParser *parser) {
25921|   237k|    Janet ret;
25922|   237k|    size_t i;
25923|   237k|    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 (25923:9): [True: 0, False: 237k]
  ------------------
25924|   237k|    ret = janet_unwrap_tuple(parser->args[0])[0];
  ------------------
  |  |  858|   237k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
25925|   239k|    for (i = 1; i < parser->argcount; i++) {
  ------------------
  |  Branch (25925:17): [True: 1.25k, False: 237k]
  ------------------
25926|  1.25k|        parser->args[i - 1] = parser->args[i];
25927|  1.25k|    }
25928|   237k|    parser->pending--;
25929|   237k|    parser->argcount--;
25930|   237k|    parser->states[0].argn--;
25931|   237k|    return ret;
25932|   237k|}
janet_parser_init:
25948|   109k|void janet_parser_init(JanetParser *parser) {
25949|   109k|    parser->args = NULL;
25950|   109k|    parser->states = NULL;
25951|   109k|    parser->buf = NULL;
25952|   109k|    parser->argcount = 0;
25953|   109k|    parser->argcap = 0;
25954|   109k|    parser->bufcount = 0;
25955|   109k|    parser->bufcap = 0;
25956|   109k|    parser->statecount = 0;
25957|   109k|    parser->statecap = 0;
25958|   109k|    parser->error = NULL;
25959|   109k|    parser->lookback = -1;
25960|   109k|    parser->line = 1;
25961|   109k|    parser->column = 0;
25962|   109k|    parser->pending = 0;
25963|   109k|    parser->flag = 0;
25964|       |
25965|   109k|    pushstate(parser, root, PFLAG_CONTAINER);
  ------------------
  |  |25298|   109k|#define PFLAG_CONTAINER 0x100
  ------------------
25966|   109k|}
janet_parser_deinit:
25968|   109k|void janet_parser_deinit(JanetParser *parser) {
25969|   109k|    janet_free(parser->args);
  ------------------
  |  | 2415|   109k|#define janet_free(X) free((X))
  ------------------
25970|   109k|    janet_free(parser->buf);
  ------------------
  |  | 2415|   109k|#define janet_free(X) free((X))
  ------------------
25971|   109k|    janet_free(parser->states);
  ------------------
  |  | 2415|   109k|#define janet_free(X) free((X))
  ------------------
25972|   109k|}
janet_parser_has_more:
26019|  13.2M|int janet_parser_has_more(JanetParser *parser) {
26020|  13.2M|    return !!parser->pending;
26021|  13.2M|}
cfun_parse_parser:
26067|   102k|              "that can receive bytes and generate a stream of values.") {
26068|   102k|    (void) argv;
26069|   102k|    janet_fixarity(argc, 0);
26070|   102k|    JanetParser *p = janet_abstract(&janet_parser_type, sizeof(JanetParser));
26071|   102k|    janet_parser_init(p);
26072|   102k|    return janet_wrap_abstract(p);
  ------------------
  |  |  851|   102k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|   102k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   102k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   102k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26073|   102k|}
cfun_parse_consume:
26079|     46|              "the number of bytes read.") {
26080|     46|    janet_arity(argc, 2, 3);
26081|     46|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26082|     46|    JanetByteView view = janet_getbytes(argv, 1);
26083|     46|    if (argc == 3) {
  ------------------
  |  Branch (26083:9): [True: 0, False: 46]
  ------------------
26084|      0|        int32_t offset = janet_getinteger(argv, 2);
26085|      0|        if (offset < 0 || offset > view.len)
  ------------------
  |  Branch (26085:13): [True: 0, False: 0]
  |  Branch (26085:27): [True: 0, False: 0]
  ------------------
26086|      0|            janet_panicf("invalid offset %d out of range [0,%d]", offset, view.len);
26087|      0|        view.len -= offset;
26088|      0|        view.bytes += offset;
26089|      0|    }
26090|     46|    int32_t i;
26091|  9.26k|    for (i = 0; i < view.len; i++) {
  ------------------
  |  Branch (26091:17): [True: 9.22k, False: 37]
  ------------------
26092|  9.22k|        janet_parser_consume(p, view.bytes[i]);
26093|  9.22k|        switch (janet_parser_status(p)) {
26094|  1.69k|            case JANET_PARSE_ROOT:
  ------------------
  |  Branch (26094:13): [True: 1.69k, False: 7.53k]
  ------------------
26095|  9.21k|            case JANET_PARSE_PENDING:
  ------------------
  |  Branch (26095:13): [True: 7.52k, False: 1.70k]
  ------------------
26096|  9.21k|                break;
26097|      9|            default:
  ------------------
  |  Branch (26097:13): [True: 9, False: 9.21k]
  ------------------
26098|      9|                return janet_wrap_integer(i + 1);
  ------------------
  |  |  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)
  |  |  ------------------
  ------------------
26099|  9.22k|        }
26100|  9.22k|    }
26101|     37|    return janet_wrap_integer(i);
  ------------------
  |  |  967|     37|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|     37|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
26102|     46|}
cfun_parse_eof:
26106|   102k|              "Indicate to the parser that the end of file was reached. This puts the parser in the :dead state.") {
26107|   102k|    janet_fixarity(argc, 1);
26108|   102k|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26109|   102k|    janet_parser_eof(p);
26110|   102k|    return argv[0];
26111|   102k|}
cfun_parse_insert:
26117|      2|              "and tuples, for example. Returns the parser.") {
26118|      2|    janet_fixarity(argc, 2);
26119|      2|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26120|      2|    JanetParseState *s = p->states + p->statecount - 1;
26121|      2|    if (s->consumer == tokenchar) {
  ------------------
  |  Branch (26121:9): [True: 0, False: 2]
  ------------------
26122|      0|        janet_parser_consume(p, ' ');
26123|      0|        p->column--;
26124|      0|        s = p->states + p->statecount - 1;
26125|      0|    }
26126|      2|    if (s->flags & PFLAG_COMMENT) s--;
  ------------------
  |  |25307|      2|#define PFLAG_COMMENT 0x20000
  ------------------
  |  Branch (26126:9): [True: 0, False: 2]
  ------------------
26127|      2|    if (s->flags & PFLAG_CONTAINER) {
  ------------------
  |  |25298|      2|#define PFLAG_CONTAINER 0x100
  ------------------
  |  Branch (26127:9): [True: 0, False: 2]
  ------------------
26128|      0|        s->argn++;
26129|      0|        if (p->statecount == 1) {
  ------------------
  |  Branch (26129:13): [True: 0, False: 0]
  ------------------
26130|      0|            p->pending++;
26131|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26132|      0|            push_arg(p, tup);
26133|      0|        } else {
26134|      0|            push_arg(p, argv[1]);
26135|      0|        }
26136|      2|    } else if (s->flags & (PFLAG_STRING | PFLAG_LONGSTRING)) {
  ------------------
  |  |25303|      2|#define PFLAG_STRING 0x2000
  ------------------
                  } else if (s->flags & (PFLAG_STRING | PFLAG_LONGSTRING)) {
  ------------------
  |  |25304|      2|#define PFLAG_LONGSTRING 0x4000
  ------------------
  |  Branch (26136:16): [True: 0, False: 2]
  ------------------
26137|      0|        const uint8_t *str = janet_to_string(argv[1]);
26138|      0|        int32_t slen = janet_string_length(str);
  ------------------
  |  | 1812|      0|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|      0|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
26139|      0|        size_t newcount = p->bufcount + slen;
26140|      0|        if (p->bufcap < newcount) {
  ------------------
  |  Branch (26140:13): [True: 0, False: 0]
  ------------------
26141|      0|            size_t newcap = 2 * newcount;
26142|      0|            p->buf = janet_realloc(p->buf, newcap);
  ------------------
  |  | 2409|      0|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
26143|      0|            if (p->buf == NULL) {
  ------------------
  |  Branch (26143:17): [True: 0, False: 0]
  ------------------
26144|      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]
  |  |  ------------------
  ------------------
26145|      0|            }
26146|      0|            p->bufcap = newcap;
26147|      0|        }
26148|      0|        safe_memcpy(p->buf + p->bufcount, str, slen);
26149|      0|        p->bufcount = newcount;
26150|      2|    } else {
26151|      2|        janet_panic("cannot insert value into parser");
26152|      2|    }
26153|      0|    return argv[0];
26154|      2|}
cfun_parse_has_more:
26158|   102k|              "Check if the parser has more values in the value queue.") {
26159|   102k|    janet_fixarity(argc, 1);
26160|   102k|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26161|   102k|    return janet_wrap_boolean(janet_parser_has_more(p));
  ------------------
  |  |  834|   102k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|   102k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   102k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   102k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26162|   102k|}
cfun_parse_status:
26180|   102k|              "* :root - the parser can either read more values or safely terminate.") {
26181|   102k|    janet_fixarity(argc, 1);
26182|   102k|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26183|   102k|    const char *stat = NULL;
26184|   102k|    switch (janet_parser_status(p)) {
  ------------------
  |  Branch (26184:13): [True: 102k, False: 1]
  ------------------
26185|     31|        case JANET_PARSE_PENDING:
  ------------------
  |  Branch (26185:9): [True: 31, False: 102k]
  ------------------
26186|     31|            stat = "pending";
26187|     31|            break;
26188|      9|        case JANET_PARSE_ERROR:
  ------------------
  |  Branch (26188:9): [True: 9, False: 102k]
  ------------------
26189|      9|            stat = "error";
26190|      9|            break;
26191|      1|        case JANET_PARSE_ROOT:
  ------------------
  |  Branch (26191:9): [True: 1, False: 102k]
  ------------------
26192|      1|            stat = "root";
26193|      1|            break;
26194|   102k|        case JANET_PARSE_DEAD:
  ------------------
  |  Branch (26194:9): [True: 102k, False: 42]
  ------------------
26195|   102k|            stat = "dead";
26196|   102k|            break;
26197|   102k|    }
26198|   102k|    return janet_ckeywordv(stat);
  ------------------
  |  | 1842|   102k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|   102k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|   102k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   102k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   102k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26199|   102k|}
cfun_parse_error:
26206|      9|              "`parser/error`.") {
26207|      9|    janet_fixarity(argc, 1);
26208|      9|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26209|      9|    const char *err = janet_parser_error(p);
26210|      9|    if (err) {
  ------------------
  |  Branch (26210:9): [True: 9, False: 0]
  ------------------
26211|      9|        return (p->flag & JANET_PARSER_GENERATED_ERROR)
  ------------------
  |  |25194|      9|#define JANET_PARSER_GENERATED_ERROR 0x2
  ------------------
  |  Branch (26211:16): [True: 0, False: 9]
  ------------------
26212|      9|               ? 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26213|      9|               : janet_cstringv(err);
  ------------------
  |  | 1825|      9|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  848|      9|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26214|      9|    }
26215|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26216|      9|}
cfun_parse_produce:
26224|     33|              "purposes.") {
26225|     33|    janet_arity(argc, 1, 2);
26226|     33|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26227|     33|    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 (26227:9): [True: 0, False: 33]
  ------------------
26228|      0|        return janet_parser_produce_wrapped(p);
26229|     33|    } else {
26230|     33|        return janet_parser_produce(p);
26231|     33|    }
26232|     33|}
cfun_parse_flush:
26238|      2|              "to begin parsing in a new context, create a new parser.") {
26239|      2|    janet_fixarity(argc, 1);
26240|      2|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26241|      2|    janet_parser_flush(p);
26242|      2|    return argv[0];
26243|      2|}
cfun_parse_where:
26249|   102k|              "also provided, the current column number of the parser is also first set to that value.") {
26250|   102k|    janet_arity(argc, 1, 3);
26251|   102k|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26252|   102k|    if (argc > 1) {
  ------------------
  |  Branch (26252:9): [True: 0, False: 102k]
  ------------------
26253|      0|        int32_t line = janet_getinteger(argv, 1);
26254|      0|        if (line < 1)
  ------------------
  |  Branch (26254:13): [True: 0, False: 0]
  ------------------
26255|      0|            janet_panicf("invalid line number %d", line);
26256|      0|        p->line = (size_t) line;
26257|      0|    }
26258|   102k|    if (argc > 2) {
  ------------------
  |  Branch (26258:9): [True: 0, False: 102k]
  ------------------
26259|      0|        int32_t column = janet_getinteger(argv, 2);
26260|      0|        if (column < 0)
  ------------------
  |  Branch (26260:13): [True: 0, False: 0]
  ------------------
26261|      0|            janet_panicf("invalid column number %d", column);
26262|      0|        p->column = (size_t) column;
26263|      0|    }
26264|   102k|    Janet *tup = janet_tuple_begin(2);
26265|   102k|    tup[0] = janet_wrap_integer(p->line);
  ------------------
  |  |  967|   102k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|   102k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
26266|   102k|    tup[1] = janet_wrap_integer(p->column);
  ------------------
  |  |  967|   102k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|   102k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
26267|   102k|    return janet_wrap_tuple(janet_tuple_end(tup));
  ------------------
  |  |  843|   102k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|   102k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   102k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   102k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26268|   102k|}
cfun_parse_state:
26405|   102k|              "type of that expression and some type-specific information.") {
26406|   102k|    janet_arity(argc, 1, 2);
26407|   102k|    const uint8_t *key = NULL;
26408|   102k|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26409|   102k|    if (argc == 2) {
  ------------------
  |  Branch (26409:9): [True: 102k, False: 0]
  ------------------
26410|   102k|        key = janet_getkeyword(argv, 1);
26411|   102k|    }
26412|       |
26413|   102k|    if (key) {
  ------------------
  |  Branch (26413:9): [True: 102k, False: 0]
  ------------------
26414|       |        /* Get one result */
26415|   102k|        for (const struct ParserStateGetter *sg = parser_state_getters;
26416|   204k|                sg->name != NULL; sg++) {
  ------------------
  |  Branch (26416:17): [True: 204k, False: 0]
  ------------------
26417|   204k|            if (janet_cstrcmp(key, sg->name)) continue;
  ------------------
  |  Branch (26417:17): [True: 102k, False: 102k]
  ------------------
26418|   102k|            return sg->fn(p);
26419|   204k|        }
26420|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26421|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26422|   102k|    } else {
26423|       |        /* Put results in table */
26424|      0|        JanetTable *tab = janet_table(0);
26425|      0|        for (const struct ParserStateGetter *sg = parser_state_getters;
26426|      0|                sg->name != NULL; sg++) {
  ------------------
  |  Branch (26426:17): [True: 0, False: 0]
  ------------------
26427|      0|            janet_table_put(tab, janet_ckeywordv(sg->name), sg->fn(p));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26428|      0|        }
26429|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26430|      0|    }
26431|   102k|}
cfun_parse_clone:
26437|      1|              "if parsing later fails. Returns a new parser.") {
26438|      1|    janet_fixarity(argc, 1);
26439|      1|    JanetParser *src = janet_getabstract(argv, 0, &janet_parser_type);
26440|      1|    JanetParser *dest = janet_abstract(&janet_parser_type, sizeof(JanetParser));
26441|      1|    janet_parser_clone(src, dest);
26442|      1|    return janet_wrap_abstract(dest);
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26443|      1|}
janet_lib_parse:
26473|  7.16k|void janet_lib_parse(JanetTable *env) {
26474|  7.16k|    JanetRegExt parse_cfuns[] = {
26475|  7.16k|        JANET_CORE_REG("parser/new", cfun_parse_parser),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26476|  7.16k|        JANET_CORE_REG("parser/clone", cfun_parse_clone),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26477|  7.16k|        JANET_CORE_REG("parser/has-more", cfun_parse_has_more),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26478|  7.16k|        JANET_CORE_REG("parser/produce", cfun_parse_produce),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26479|  7.16k|        JANET_CORE_REG("parser/consume", cfun_parse_consume),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26480|  7.16k|        JANET_CORE_REG("parser/byte", cfun_parse_byte),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26481|  7.16k|        JANET_CORE_REG("parser/error", cfun_parse_error),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26482|  7.16k|        JANET_CORE_REG("parser/status", cfun_parse_status),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26483|  7.16k|        JANET_CORE_REG("parser/flush", cfun_parse_flush),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26484|  7.16k|        JANET_CORE_REG("parser/state", cfun_parse_state),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26485|  7.16k|        JANET_CORE_REG("parser/where", cfun_parse_where),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26486|  7.16k|        JANET_CORE_REG("parser/eof", cfun_parse_eof),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26487|  7.16k|        JANET_CORE_REG("parser/insert", cfun_parse_insert),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26488|  7.16k|        JANET_REG_END
  ------------------
  |  | 2109|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
26489|  7.16k|    };
26490|       |    janet_core_cfuns_ext(env, NULL, parse_cfuns);
26491|  7.16k|}
cfun_peg_compile:
28421|      2|              "`default-peg-grammar` for the grammar of the peg.") {
28422|      2|    janet_fixarity(argc, 1);
28423|      2|    JanetPeg *peg = compile_peg(argv[0]);
28424|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28425|      2|}
cfun_peg_find:
28498|    198|              "Find first index where the peg matches in text. Returns an integer, or nil if not found.") {
28499|    198|    PegCall c = peg_cfun_init(argc, argv, 0);
28500|  4.43k|    for (int32_t i = c.start; i < c.bytes.len; i++) {
  ------------------
  |  Branch (28500:31): [True: 4.30k, False: 130]
  ------------------
28501|  4.30k|        peg_call_reset(&c);
28502|  4.30k|        if (peg_rule(&c.s, c.s.bytecode, c.bytes.bytes + i))
  ------------------
  |  Branch (28502:13): [True: 68, False: 4.24k]
  ------------------
28503|     68|            return janet_wrap_integer(i);
  ------------------
  |  |  967|     68|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|     68|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
28504|  4.30k|    }
28505|    130|    return janet_wrap_nil();
  ------------------
  |  |  831|    130|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    130|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    130|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    130|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28506|    198|}
cfun_peg_find_all:
28510|      1|              "Find all indexes where the peg matches in text. Returns an array of integers.") {
28511|      1|    PegCall c = peg_cfun_init(argc, argv, 0);
28512|      1|    JanetArray *ret = janet_array(0);
28513|      1|    for (int32_t i = c.start; i < c.bytes.len; i++) {
  ------------------
  |  Branch (28513:31): [True: 0, False: 1]
  ------------------
28514|      0|        peg_call_reset(&c);
28515|      0|        if (peg_rule(&c.s, c.s.bytecode, c.bytes.bytes + i))
  ------------------
  |  Branch (28515:13): [True: 0, False: 0]
  ------------------
28516|      0|            janet_array_push(ret, janet_wrap_integer(i));
  ------------------
  |  |  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)
  |  |  ------------------
  ------------------
28517|      0|    }
28518|      1|    return janet_wrap_array(ret);
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28519|      1|}
cfun_peg_replace_all:
28555|     36|              "matching text followed by any captures.") {
28556|     36|    return cfun_peg_replace_generic(argc, argv, 0);
28557|     36|}
cfun_peg_replace:
28565|    410|              "If no matches are found, returns the input string in a new buffer.") {
28566|    410|    return cfun_peg_replace_generic(argc, argv, 1);
28567|    410|}
janet_lib_peg:
28591|  7.16k|void janet_lib_peg(JanetTable *env) {
28592|  7.16k|    JanetRegExt cfuns[] = {
28593|  7.16k|        JANET_CORE_REG("peg/compile", cfun_peg_compile),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28594|  7.16k|        JANET_CORE_REG("peg/match", cfun_peg_match),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28595|  7.16k|        JANET_CORE_REG("peg/find", cfun_peg_find),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28596|  7.16k|        JANET_CORE_REG("peg/find-all", cfun_peg_find_all),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28597|  7.16k|        JANET_CORE_REG("peg/replace", cfun_peg_replace),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28598|  7.16k|        JANET_CORE_REG("peg/replace-all", cfun_peg_replace_all),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28599|  7.16k|        JANET_REG_END
  ------------------
  |  | 2109|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
28600|  7.16k|    };
28601|       |    janet_core_cfuns_ext(env, NULL, cfuns);
28602|  7.16k|    janet_register_abstract_type(&janet_peg_type);
28603|  7.16k|}
janet_to_string_b:
28831|  3.82M|void janet_to_string_b(JanetBuffer *buffer, Janet x) {
28832|  3.82M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  3.82M|    (isnan((x).number) \
  |  |  796|  3.82M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  3.82M|        : JANET_NUMBER)
  ------------------
  |  Branch (28832:13): [True: 2.86M, False: 958k]
  ------------------
28833|    461|        case JANET_NIL:
  ------------------
  |  Branch (28833:9): [True: 461, False: 3.82M]
  ------------------
28834|    461|            janet_buffer_push_cstring(buffer, "");
28835|    461|            break;
28836|     72|        case JANET_BOOLEAN:
  ------------------
  |  Branch (28836:9): [True: 72, False: 3.82M]
  ------------------
28837|     72|            janet_buffer_push_cstring(buffer,
28838|     72|                                      janet_unwrap_boolean(x) ? "true" : "false");
  ------------------
  |  |  838|     72|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  |  |  ------------------
  |  |  |  Branch (838:33): [True: 53, False: 19]
  |  |  ------------------
  ------------------
28839|     72|            break;
28840|   958k|        case JANET_NUMBER:
  ------------------
  |  Branch (28840:9): [True: 958k, False: 2.86M]
  ------------------
28841|   958k|            number_to_string_b(buffer, janet_unwrap_number(x));
  ------------------
  |  |  839|   958k|#define janet_unwrap_number(x) ((x).number)
  ------------------
28842|   958k|            break;
28843|   521k|        case JANET_STRING:
  ------------------
  |  Branch (28843:9): [True: 521k, False: 3.29M]
  ------------------
28844|  2.77M|        case JANET_SYMBOL:
  ------------------
  |  Branch (28844:9): [True: 2.24M, False: 1.57M]
  ------------------
28845|  2.77M|        case JANET_KEYWORD:
  ------------------
  |  Branch (28845:9): [True: 3.80k, False: 3.81M]
  ------------------
28846|  2.77M|            janet_buffer_push_bytes(buffer,
28847|  2.77M|                                    janet_unwrap_string(x),
  ------------------
  |  |  863|  2.77M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
28848|  2.77M|                                    janet_string_length(janet_unwrap_string(x)));
  ------------------
  |  | 1812|  2.77M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|  2.77M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
28849|  2.77M|            break;
28850|  18.2k|        case JANET_BUFFER: {
  ------------------
  |  Branch (28850:9): [True: 18.2k, False: 3.80M]
  ------------------
28851|  18.2k|            JanetBuffer *to = janet_unwrap_buffer(x);
  ------------------
  |  |  862|  18.2k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
28852|       |            /* Prevent resizing buffer while appending */
28853|  18.2k|            if (buffer == to) janet_buffer_extra(buffer, to->count);
  ------------------
  |  Branch (28853:17): [True: 0, False: 18.2k]
  ------------------
28854|  18.2k|            janet_buffer_push_bytes(buffer, to->data, to->count);
28855|  18.2k|            break;
28856|  2.77M|        }
28857|     44|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (28857:9): [True: 44, False: 3.82M]
  ------------------
28858|     44|            JanetAbstract p = janet_unwrap_abstract(x);
  ------------------
  |  |  866|     44|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
28859|     44|            const JanetAbstractType *t = janet_abstract_type(p);
  ------------------
  |  | 1898|     44|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|     44|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
28860|     44|            if (t->tostring != NULL) {
  ------------------
  |  Branch (28860:17): [True: 26, False: 18]
  ------------------
28861|     26|                t->tostring(p, buffer);
28862|     26|            } else {
28863|     18|                string_description_b(buffer, t->name, p);
28864|     18|            }
28865|     44|        }
28866|     44|        return;
28867|     17|        case JANET_CFUNCTION: {
  ------------------
  |  Branch (28867:9): [True: 17, False: 3.82M]
  ------------------
28868|     17|            JanetCFunRegistry *reg = janet_registry_get(janet_unwrap_cfunction(x));
  ------------------
  |  |  869|     17|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
28869|     17|            if (NULL != reg) {
  ------------------
  |  Branch (28869:17): [True: 15, False: 2]
  ------------------
28870|     15|                janet_buffer_push_cstring(buffer, "<cfunction ");
28871|     15|                if (NULL != reg->name_prefix) {
  ------------------
  |  Branch (28871:21): [True: 0, False: 15]
  ------------------
28872|      0|                    janet_buffer_push_cstring(buffer, reg->name_prefix);
28873|      0|                    janet_buffer_push_u8(buffer, '/');
28874|      0|                }
28875|     15|                janet_buffer_push_cstring(buffer, reg->name);
28876|     15|                janet_buffer_push_u8(buffer, '>');
28877|     15|                break;
28878|     15|            }
28879|      2|            goto fallthrough;
28880|     17|        }
28881|  2.17k|        case JANET_FUNCTION: {
  ------------------
  |  Branch (28881:9): [True: 2.17k, False: 3.81M]
  ------------------
28882|  2.17k|            JanetFunction *fun = janet_unwrap_function(x);
  ------------------
  |  |  868|  2.17k|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
28883|  2.17k|            JanetFuncDef *def = fun->def;
28884|  2.17k|            if (def == NULL) {
  ------------------
  |  Branch (28884:17): [True: 0, False: 2.17k]
  ------------------
28885|      0|                janet_buffer_push_cstring(buffer, "<incomplete function>");
28886|      0|                break;
28887|      0|            }
28888|  2.17k|            if (def->name) {
  ------------------
  |  Branch (28888:17): [True: 2.15k, False: 23]
  ------------------
28889|  2.15k|                const uint8_t *n = def->name;
28890|  2.15k|                janet_buffer_push_cstring(buffer, "<function ");
28891|  2.15k|                janet_buffer_push_bytes(buffer, n, janet_string_length(n));
  ------------------
  |  | 1812|  2.15k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|  2.15k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
28892|  2.15k|                janet_buffer_push_u8(buffer, '>');
28893|  2.15k|                break;
28894|  2.15k|            }
28895|     23|            goto fallthrough;
28896|  2.17k|        }
28897|     25|    fallthrough:
28898|  66.9k|        default:
  ------------------
  |  Branch (28898:9): [True: 66.9k, False: 3.75M]
  ------------------
28899|  66.9k|            string_description_b(buffer, janet_type_names[janet_type(x)], janet_unwrap_pointer(x));
  ------------------
  |  |  795|  66.9k|    (isnan((x).number) \
  |  |  796|  66.9k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  66.9k|        : JANET_NUMBER)
  ------------------
                          string_description_b(buffer, janet_type_names[janet_type(x)], janet_unwrap_pointer(x));
  ------------------
  |  |  867|  66.9k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (28899:59): [True: 66.9k, False: 0]
  ------------------
28900|  66.9k|            break;
28901|  3.82M|    }
28902|  3.82M|}
janet_description_b:
28917|   415k|void janet_description_b(JanetBuffer *buffer, Janet x) {
28918|   415k|    switch (janet_type(x)) {
  ------------------
  |  |  795|   415k|    (isnan((x).number) \
  |  |  796|   415k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   415k|        : JANET_NUMBER)
  ------------------
  |  Branch (28918:13): [True: 410k, False: 4.24k]
  ------------------
28919|   403k|        default:
  ------------------
  |  Branch (28919:9): [True: 403k, False: 12.1k]
  ------------------
28920|   403k|            break;
28921|   403k|        case JANET_NIL:
  ------------------
  |  Branch (28921:9): [True: 70, False: 415k]
  ------------------
28922|     70|            janet_buffer_push_cstring(buffer, "nil");
28923|     70|            return;
28924|  3.14k|        case JANET_KEYWORD:
  ------------------
  |  Branch (28924:9): [True: 3.14k, False: 412k]
  ------------------
28925|  3.14k|            janet_buffer_push_u8(buffer, ':');
28926|  3.14k|            break;
28927|  7.32k|        case JANET_STRING:
  ------------------
  |  Branch (28927:9): [True: 7.32k, False: 407k]
  ------------------
28928|  7.32k|            janet_escape_string_b(buffer, janet_unwrap_string(x));
  ------------------
  |  |  863|  7.32k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
28929|  7.32k|            return;
28930|  1.40k|        case JANET_BUFFER: {
  ------------------
  |  Branch (28930:9): [True: 1.40k, False: 413k]
  ------------------
28931|  1.40k|            JanetBuffer *b = janet_unwrap_buffer(x);
  ------------------
  |  |  862|  1.40k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
28932|  1.40k|            janet_escape_buffer_b(buffer, b);
28933|  1.40k|            return;
28934|      0|        }
28935|    229|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (28935:9): [True: 229, False: 415k]
  ------------------
28936|    229|            JanetAbstract p = janet_unwrap_abstract(x);
  ------------------
  |  |  866|    229|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
28937|    229|            const JanetAbstractType *t = janet_abstract_type(p);
  ------------------
  |  | 1898|    229|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|    229|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
28938|    229|            if (t->tostring != NULL) {
  ------------------
  |  Branch (28938:17): [True: 203, False: 26]
  ------------------
28939|    203|                janet_buffer_push_cstring(buffer, "<");
28940|    203|                janet_buffer_push_cstring(buffer, t->name);
28941|    203|                janet_buffer_push_cstring(buffer, " ");
28942|    203|                t->tostring(p, buffer);
28943|    203|                janet_buffer_push_cstring(buffer, ">");
28944|    203|            } else {
28945|     26|                string_description_b(buffer, t->name, p);
28946|     26|            }
28947|    229|            return;
28948|      0|        }
28949|   415k|    }
28950|   406k|    janet_to_string_b(buffer, x);
28951|   406k|}
janet_to_string:
28964|  7.96k|const uint8_t *janet_to_string(Janet x) {
28965|  7.96k|    switch (janet_type(x)) {
  ------------------
  |  |  795|  7.96k|    (isnan((x).number) \
  |  |  796|  7.96k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  7.96k|        : JANET_NUMBER)
  ------------------
  |  Branch (28965:13): [True: 7.90k, False: 65]
  ------------------
28966|    786|        default: {
  ------------------
  |  Branch (28966:9): [True: 786, False: 7.18k]
  ------------------
28967|    786|            JanetBuffer b;
28968|    786|            janet_buffer_init(&b, 10);
28969|    786|            janet_to_string_b(&b, x);
28970|    786|            const uint8_t *ret = janet_string(b.data, b.count);
28971|    786|            janet_buffer_deinit(&b);
28972|    786|            return ret;
28973|      0|        }
28974|      0|        case JANET_BUFFER:
  ------------------
  |  Branch (28974:9): [True: 0, False: 7.96k]
  ------------------
28975|      0|            return janet_string(janet_unwrap_buffer(x)->data, janet_unwrap_buffer(x)->count);
  ------------------
  |  |  862|      0|#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|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
28976|  5.65k|        case JANET_STRING:
  ------------------
  |  Branch (28976:9): [True: 5.65k, False: 2.31k]
  ------------------
28977|  6.55k|        case JANET_SYMBOL:
  ------------------
  |  Branch (28977:9): [True: 904, False: 7.06k]
  ------------------
28978|  7.18k|        case JANET_KEYWORD:
  ------------------
  |  Branch (28978:9): [True: 624, False: 7.34k]
  ------------------
28979|  7.18k|            return janet_unwrap_string(x);
  ------------------
  |  |  863|  7.18k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
28980|  7.96k|    }
28981|  7.96k|}
janet_formatbv:
29575|   268k|void janet_formatbv(JanetBuffer *b, const char *format, va_list args) {
29576|   268k|    const char *format_end = format + strlen(format);
29577|   268k|    const char *c = format;
29578|   268k|    int32_t startlen = b->count;
29579|  2.50M|    while (c < format_end) {
  ------------------
  |  Branch (29579:12): [True: 2.24M, False: 268k]
  ------------------
29580|  2.24M|        if (*c != '%') {
  ------------------
  |  Branch (29580:13): [True: 2.00M, False: 236k]
  ------------------
29581|  2.00M|            janet_buffer_push_u8(b, (uint8_t) *c++);
29582|  2.00M|        } else if (*++c == '%') {
  ------------------
  |  Branch (29582:20): [True: 0, False: 236k]
  ------------------
29583|      0|            janet_buffer_push_u8(b, (uint8_t) *c++);
29584|   236k|        } else {
29585|   236k|            char form[MAX_FORMAT], item[MAX_ITEM];
29586|   236k|            char width[3], precision[3];
29587|   236k|            int nb = 0; /* number of bytes in added item */
29588|   236k|            c = scanformat(c, form, width, precision);
29589|   236k|            switch (*c++) {
29590|     33|                case 'c': {
  ------------------
  |  Branch (29590:17): [True: 33, False: 236k]
  ------------------
29591|     33|                    int n = va_arg(args, int);
29592|     33|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |29498|     33|#define MAX_ITEM  256
  ------------------
29593|     33|                    break;
29594|      0|                }
29595|   102k|                case 'd':
  ------------------
  |  Branch (29595:17): [True: 102k, False: 133k]
  ------------------
29596|   102k|                case 'i': {
  ------------------
  |  Branch (29596:17): [True: 0, False: 236k]
  ------------------
29597|   102k|                    int64_t n = (int64_t) va_arg(args, int32_t);
29598|   102k|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |29498|   102k|#define MAX_ITEM  256
  ------------------
29599|   102k|                    break;
29600|   102k|                }
29601|      0|                case 'D':
  ------------------
  |  Branch (29601:17): [True: 0, False: 236k]
  ------------------
29602|      0|                case 'I': {
  ------------------
  |  Branch (29602:17): [True: 0, False: 236k]
  ------------------
29603|      0|                    int64_t n = va_arg(args, int64_t);
29604|      0|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |29498|      0|#define MAX_ITEM  256
  ------------------
29605|      0|                    break;
29606|      0|                }
29607|     10|                case 'x':
  ------------------
  |  Branch (29607:17): [True: 10, False: 236k]
  ------------------
29608|     10|                case 'X':
  ------------------
  |  Branch (29608:17): [True: 0, False: 236k]
  ------------------
29609|     10|                case 'o':
  ------------------
  |  Branch (29609:17): [True: 0, False: 236k]
  ------------------
29610|     10|                case 'u': {
  ------------------
  |  Branch (29610:17): [True: 0, False: 236k]
  ------------------
29611|     10|                    uint64_t n = va_arg(args, uint64_t);
29612|     10|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |29498|     10|#define MAX_ITEM  256
  ------------------
29613|     10|                    break;
29614|     10|                }
29615|      0|                case 'a':
  ------------------
  |  Branch (29615:17): [True: 0, False: 236k]
  ------------------
29616|      0|                case 'A':
  ------------------
  |  Branch (29616:17): [True: 0, False: 236k]
  ------------------
29617|      0|                case 'e':
  ------------------
  |  Branch (29617:17): [True: 0, False: 236k]
  ------------------
29618|      0|                case 'E':
  ------------------
  |  Branch (29618:17): [True: 0, False: 236k]
  ------------------
29619|      5|                case 'f':
  ------------------
  |  Branch (29619:17): [True: 5, False: 236k]
  ------------------
29620|      5|                case 'g':
  ------------------
  |  Branch (29620:17): [True: 0, False: 236k]
  ------------------
29621|      5|                case 'G': {
  ------------------
  |  Branch (29621:17): [True: 0, False: 236k]
  ------------------
29622|      5|                    double d = va_arg(args, double);
29623|      5|                    nb = snprintf(item, MAX_ITEM, form, d);
  ------------------
  |  |29498|      5|#define MAX_ITEM  256
  ------------------
29624|      5|                    break;
29625|      5|                }
29626|   116k|                case 's':
  ------------------
  |  Branch (29626:17): [True: 116k, False: 119k]
  ------------------
29627|   116k|                case 'S': {
  ------------------
  |  Branch (29627:17): [True: 59, False: 236k]
  ------------------
29628|   116k|                    const char *str = va_arg(args, const char *);
29629|   116k|                    int32_t len = (c[-1] == 's')
  ------------------
  |  Branch (29629:35): [True: 116k, False: 59]
  ------------------
29630|   116k|                                  ? (int32_t) strlen(str)
29631|   116k|                                  : janet_string_length((JanetString) str);
  ------------------
  |  | 1812|     59|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|     59|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
29632|   116k|                    if (form[2] == '\0')
  ------------------
  |  Branch (29632:25): [True: 116k, False: 0]
  ------------------
29633|   116k|                        janet_buffer_push_bytes(b, (const uint8_t *) str, len);
29634|      0|                    else {
29635|      0|                        if (len != (int32_t) strlen((const char *) str))
  ------------------
  |  Branch (29635:29): [True: 0, False: 0]
  ------------------
29636|      0|                            janet_panic("string contains zeros");
29637|      0|                        if (!strchr(form, '.') && len >= 100) {
  ------------------
  |  Branch (29637:29): [True: 0, False: 0]
  |  Branch (29637:51): [True: 0, False: 0]
  ------------------
29638|      0|                            janet_panic("no precision and string is too long to be formatted");
29639|      0|                        } else {
29640|      0|                            nb = snprintf(item, MAX_ITEM, form, str);
  ------------------
  |  |29498|      0|#define MAX_ITEM  256
  ------------------
29641|      0|                        }
29642|      0|                    }
29643|   116k|                    break;
29644|   116k|                }
29645|   116k|                case 'V':
  ------------------
  |  Branch (29645:17): [True: 641, False: 235k]
  ------------------
29646|    641|                    janet_to_string_b(b, va_arg(args, Janet));
29647|    641|                    break;
29648|  14.0k|                case 'v':
  ------------------
  |  Branch (29648:17): [True: 14.0k, False: 222k]
  ------------------
29649|  14.0k|                    janet_description_b(b, va_arg(args, Janet));
29650|  14.0k|                    break;
29651|    164|                case 't':
  ------------------
  |  Branch (29651:17): [True: 164, False: 235k]
  ------------------
29652|    164|                    janet_buffer_push_cstring(b, typestr(va_arg(args, Janet)));
29653|    164|                    break;
29654|    585|                case 'T': {
  ------------------
  |  Branch (29654:17): [True: 585, False: 235k]
  ------------------
29655|    585|                    int types = va_arg(args, int);
29656|    585|                    pushtypes(b, types);
29657|    585|                    break;
29658|   116k|                }
29659|      0|                case 'M':
  ------------------
  |  Branch (29659:17): [True: 0, False: 236k]
  ------------------
29660|      0|                case 'm':
  ------------------
  |  Branch (29660:17): [True: 0, False: 236k]
  ------------------
29661|      0|                case 'N':
  ------------------
  |  Branch (29661:17): [True: 0, False: 236k]
  ------------------
29662|      0|                case 'n':
  ------------------
  |  Branch (29662:17): [True: 0, False: 236k]
  ------------------
29663|      0|                case 'Q':
  ------------------
  |  Branch (29663:17): [True: 0, False: 236k]
  ------------------
29664|  1.68k|                case 'q':
  ------------------
  |  Branch (29664:17): [True: 1.68k, False: 234k]
  ------------------
29665|  1.68k|                case 'P':
  ------------------
  |  Branch (29665:17): [True: 0, False: 236k]
  ------------------
29666|  1.83k|                case 'p': { /* janet pretty , precision = depth */
  ------------------
  |  Branch (29666:17): [True: 156, False: 235k]
  ------------------
29667|  1.83k|                    int depth = atoi(precision);
29668|  1.83k|                    if (depth < 1) depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|  1.83k|#define JANET_RECURSION_GUARD 1024
  ------------------
  |  Branch (29668:25): [True: 1.83k, False: 0]
  ------------------
29669|  1.83k|                    char d = c[-1];
29670|  1.83k|                    int has_color = (d == 'P') || (d == 'Q') || (d == 'M') || (d == 'N');
  ------------------
  |  Branch (29670:37): [True: 0, False: 1.83k]
  |  Branch (29670:51): [True: 0, False: 1.83k]
  |  Branch (29670:65): [True: 0, False: 1.83k]
  |  Branch (29670:79): [True: 0, False: 1.83k]
  ------------------
29671|  1.83k|                    int has_oneline = (d == 'Q') || (d == 'q') || (d == 'N') || (d == 'n');
  ------------------
  |  Branch (29671:39): [True: 0, False: 1.83k]
  |  Branch (29671:53): [True: 1.68k, False: 156]
  |  Branch (29671:67): [True: 0, False: 156]
  |  Branch (29671:81): [True: 0, False: 156]
  ------------------
29672|  1.83k|                    int has_notrunc = (d == 'M') || (d == 'm') || (d == 'N') || (d == 'n');
  ------------------
  |  Branch (29672:39): [True: 0, False: 1.83k]
  |  Branch (29672:53): [True: 0, False: 1.83k]
  |  Branch (29672:67): [True: 0, False: 1.83k]
  |  Branch (29672:81): [True: 0, False: 1.83k]
  ------------------
29673|  1.83k|                    int columns = atoi(width);
29674|  1.83k|                    if (columns == 0) {
  ------------------
  |  Branch (29674:25): [True: 1.83k, False: 0]
  ------------------
29675|  1.83k|                        columns = JANET_COLUMNS;
  ------------------
  |  |29411|  1.83k|#define JANET_COLUMNS 80
  ------------------
29676|  1.83k|                    } else if (columns < 0) {
  ------------------
  |  Branch (29676:32): [True: 0, False: 0]
  ------------------
29677|      0|                        has_oneline = 1;
29678|      0|                    }
29679|  1.83k|                    int flags = 0;
29680|  1.83k|                    flags |= has_color ? JANET_PRETTY_COLOR : 0;
  ------------------
  |  | 1966|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29680:30): [True: 0, False: 1.83k]
  ------------------
29681|  1.83k|                    flags |= has_oneline ? JANET_PRETTY_ONELINE : 0;
  ------------------
  |  | 1967|  1.68k|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (29681:30): [True: 1.68k, False: 156]
  ------------------
29682|  1.83k|                    flags |= has_notrunc ? JANET_PRETTY_NOTRUNC : 0;
  ------------------
  |  | 1968|      0|#define JANET_PRETTY_NOTRUNC 4
  ------------------
  |  Branch (29682:30): [True: 0, False: 1.83k]
  ------------------
29683|  1.83k|                    janet_pretty_(b, depth, columns, flags,
29684|  1.83k|                                  va_arg(args, Janet), startlen, b->count);
29685|  1.83k|                    break;
29686|  1.68k|                }
29687|      0|                case 'j': {
  ------------------
  |  Branch (29687:17): [True: 0, False: 236k]
  ------------------
29688|      0|                    int depth = atoi(precision);
29689|      0|                    if (depth < 1) {
  ------------------
  |  Branch (29689:25): [True: 0, False: 0]
  ------------------
29690|      0|                        depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|      0|#define JANET_RECURSION_GUARD 1024
  ------------------
29691|      0|                    }
29692|      0|                    janet_jdn_(b, depth, va_arg(args, Janet), startlen, b->count);
29693|      0|                    break;
29694|  1.68k|                }
29695|      0|                default: {
  ------------------
  |  Branch (29695:17): [True: 0, False: 236k]
  ------------------
29696|       |                    /* also treat cases 'nLlh' */
29697|      0|                    janet_panicf("invalid conversion '%s' to 'format'",
29698|      0|                                 form);
29699|  1.68k|                }
29700|   236k|            }
29701|   236k|            if (nb >= MAX_ITEM)
  ------------------
  |  |29498|   236k|#define MAX_ITEM  256
  ------------------
  |  Branch (29701:17): [True: 0, False: 236k]
  ------------------
29702|      0|                janet_panic("format buffer overflow");
29703|   236k|            if (nb > 0)
  ------------------
  |  Branch (29703:17): [True: 102k, False: 133k]
  ------------------
29704|   102k|                janet_buffer_push_bytes(b, (uint8_t *) item, nb);
29705|   236k|        }
29706|       |
29707|  2.24M|    }
29708|   268k|}
janet_formatc:
29712|  21.6k|const uint8_t *janet_formatc(const char *format, ...) {
29713|  21.6k|    va_list args;
29714|  21.6k|    const uint8_t *ret;
29715|  21.6k|    JanetBuffer buffer;
29716|  21.6k|    int32_t len = 0;
29717|       |
29718|       |    /* Calculate length, init buffer and args */
29719|   678k|    while (format[len]) len++;
  ------------------
  |  Branch (29719:12): [True: 657k, False: 21.6k]
  ------------------
29720|  21.6k|    janet_buffer_init(&buffer, len);
29721|  21.6k|    va_start(args, format);
29722|       |
29723|       |    /* Run format */
29724|  21.6k|    janet_formatbv(&buffer, format, args);
29725|       |
29726|       |    /* Iterate length */
29727|  21.6k|    va_end(args);
29728|       |
29729|  21.6k|    ret = janet_string(buffer.data, buffer.count);
29730|  21.6k|    janet_buffer_deinit(&buffer);
29731|  21.6k|    return ret;
29732|  21.6k|}
janet_formatb:
29734|  1.11k|JanetBuffer *janet_formatb(JanetBuffer *buffer, const char *format, ...) {
29735|  1.11k|    va_list args;
29736|  1.11k|    va_start(args, format);
29737|  1.11k|    janet_formatbv(buffer, format, args);
29738|       |    va_end(args);
29739|  1.11k|    return buffer;
29740|  1.11k|}
janet_buffer_format:
29749|    883|    Janet *argv) {
29750|    883|    size_t sfl = strlen(strfrmt);
29751|    883|    const char *strfrmt_end = strfrmt + sfl;
29752|    883|    int32_t arg = argstart;
29753|    883|    int32_t startlen = b->count;
29754|  33.0k|    while (strfrmt < strfrmt_end) {
  ------------------
  |  Branch (29754:12): [True: 32.2k, False: 797]
  ------------------
29755|  32.2k|        if (*strfrmt != '%')
  ------------------
  |  Branch (29755:13): [True: 31.1k, False: 1.04k]
  ------------------
29756|  31.1k|            janet_buffer_push_u8(b, (uint8_t) * strfrmt++);
29757|  1.04k|        else if (*++strfrmt == '%')
  ------------------
  |  Branch (29757:18): [True: 71, False: 974]
  ------------------
29758|     71|            janet_buffer_push_u8(b, (uint8_t) * strfrmt++); /* %% */
29759|    974|        else { /* format item */
29760|    974|            char form[MAX_FORMAT], item[MAX_ITEM];
29761|    974|            char width[3], precision[3];
29762|    974|            int nb = 0; /* number of bytes in added item */
29763|       |#ifdef JANET_PLAN9
29764|       |            if (*strfrmt == 'r') {
29765|       |                rerrstr(item, MAX_ITEM);
29766|       |                nb = strlen(item);
29767|       |            } else
29768|       |#endif
29769|    974|                if (++arg >= argc)
  ------------------
  |  Branch (29769:21): [True: 11, False: 963]
  ------------------
29770|     11|                    janet_panic("not enough values for format");
29771|    963|            strfrmt = scanformat(strfrmt, form, width, precision);
29772|    963|            switch (*strfrmt++) {
29773|       |#ifdef JANET_PLAN9
29774|       |                case 'r':
29775|       |                    break;
29776|       |#endif
29777|      7|                case 'c': {
  ------------------
  |  Branch (29777:17): [True: 7, False: 956]
  ------------------
29778|      7|                    nb = snprintf(item, MAX_ITEM, form, (int)
  ------------------
  |  |29498|      7|#define MAX_ITEM  256
  ------------------
29779|      7|                                  janet_getinteger(argv, arg));
29780|      7|                    break;
29781|      0|                }
29782|      1|                case 'D':
  ------------------
  |  Branch (29782:17): [True: 1, False: 962]
  ------------------
29783|      5|                case 'I':
  ------------------
  |  Branch (29783:17): [True: 4, False: 959]
  ------------------
29784|      9|                case 'd':
  ------------------
  |  Branch (29784:17): [True: 4, False: 959]
  ------------------
29785|     12|                case 'i': {
  ------------------
  |  Branch (29785:17): [True: 3, False: 960]
  ------------------
29786|     12|                    int64_t n = janet_getinteger64(argv, arg);
29787|     12|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |29498|     12|#define MAX_ITEM  256
  ------------------
29788|     12|                    break;
29789|      9|                }
29790|      6|                case 'x':
  ------------------
  |  Branch (29790:17): [True: 6, False: 957]
  ------------------
29791|      8|                case 'X':
  ------------------
  |  Branch (29791:17): [True: 2, False: 961]
  ------------------
29792|     11|                case 'o':
  ------------------
  |  Branch (29792:17): [True: 3, False: 960]
  ------------------
29793|     15|                case 'u': {
  ------------------
  |  Branch (29793:17): [True: 4, False: 959]
  ------------------
29794|     15|                    uint64_t n = janet_getuinteger64(argv, arg);
29795|     15|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |29498|     15|#define MAX_ITEM  256
  ------------------
29796|     15|                    break;
29797|     11|                }
29798|      1|                case 'a':
  ------------------
  |  Branch (29798:17): [True: 1, False: 962]
  ------------------
29799|      2|                case 'A':
  ------------------
  |  Branch (29799:17): [True: 1, False: 962]
  ------------------
29800|      3|                case 'e':
  ------------------
  |  Branch (29800:17): [True: 1, False: 962]
  ------------------
29801|      3|                case 'E':
  ------------------
  |  Branch (29801:17): [True: 0, False: 963]
  ------------------
29802|      3|                case 'f':
  ------------------
  |  Branch (29802:17): [True: 0, False: 963]
  ------------------
29803|     12|                case 'g':
  ------------------
  |  Branch (29803:17): [True: 9, False: 954]
  ------------------
29804|     15|                case 'G': {
  ------------------
  |  Branch (29804:17): [True: 3, False: 960]
  ------------------
29805|     15|                    double d = janet_getnumber(argv, arg);
29806|     15|                    nb = snprintf(item, MAX_ITEM, form, d);
  ------------------
  |  |29498|     15|#define MAX_ITEM  256
  ------------------
29807|     15|                    break;
29808|     12|                }
29809|    191|                case 's': {
  ------------------
  |  Branch (29809:17): [True: 191, False: 772]
  ------------------
29810|    191|                    const char *s = janet_getcbytes(argv, arg);
29811|    191|                    if (form[2] == '\0')
  ------------------
  |  Branch (29811:25): [True: 170, False: 21]
  ------------------
29812|    170|                        janet_buffer_push_cstring(b, s);
29813|     21|                    else {
29814|     21|                        nb = snprintf(item, MAX_ITEM, form, s);
  ------------------
  |  |29498|     21|#define MAX_ITEM  256
  ------------------
29815|     21|                    }
29816|    191|                    break;
29817|     12|                }
29818|      6|                case 'V': {
  ------------------
  |  Branch (29818:17): [True: 6, False: 957]
  ------------------
29819|      6|                    janet_to_string_b(b, argv[arg]);
29820|      6|                    break;
29821|     12|                }
29822|      3|                case 'v': {
  ------------------
  |  Branch (29822:17): [True: 3, False: 960]
  ------------------
29823|      3|                    janet_description_b(b, argv[arg]);
29824|      3|                    break;
29825|     12|                }
29826|     27|                case 't':
  ------------------
  |  Branch (29826:17): [True: 27, False: 936]
  ------------------
29827|     27|                    janet_buffer_push_cstring(b, typestr(argv[arg]));
29828|     27|                    break;
29829|     50|                case 'M':
  ------------------
  |  Branch (29829:17): [True: 50, False: 913]
  ------------------
29830|     53|                case 'm':
  ------------------
  |  Branch (29830:17): [True: 3, False: 960]
  ------------------
29831|     59|                case 'N':
  ------------------
  |  Branch (29831:17): [True: 6, False: 957]
  ------------------
29832|     70|                case 'n':
  ------------------
  |  Branch (29832:17): [True: 11, False: 952]
  ------------------
29833|     76|                case 'Q':
  ------------------
  |  Branch (29833:17): [True: 6, False: 957]
  ------------------
29834|     78|                case 'q':
  ------------------
  |  Branch (29834:17): [True: 2, False: 961]
  ------------------
29835|     82|                case 'P':
  ------------------
  |  Branch (29835:17): [True: 4, False: 959]
  ------------------
29836|     85|                case 'p': { /* janet pretty , precision = depth */
  ------------------
  |  Branch (29836:17): [True: 3, False: 960]
  ------------------
29837|     85|                    int depth = atoi(precision);
29838|     85|                    if (depth < 1) depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|     82|#define JANET_RECURSION_GUARD 1024
  ------------------
  |  Branch (29838:25): [True: 82, False: 3]
  ------------------
29839|     85|                    char d = strfrmt[-1];
29840|     85|                    int has_color = (d == 'P') || (d == 'Q') || (d == 'M') || (d == 'N');
  ------------------
  |  Branch (29840:37): [True: 4, False: 81]
  |  Branch (29840:51): [True: 6, False: 75]
  |  Branch (29840:65): [True: 50, False: 25]
  |  Branch (29840:79): [True: 6, False: 19]
  ------------------
29841|     85|                    int has_oneline = (d == 'Q') || (d == 'q') || (d == 'N') || (d == 'n');
  ------------------
  |  Branch (29841:39): [True: 6, False: 79]
  |  Branch (29841:53): [True: 2, False: 77]
  |  Branch (29841:67): [True: 6, False: 71]
  |  Branch (29841:81): [True: 11, False: 60]
  ------------------
29842|     85|                    int has_notrunc = (d == 'M') || (d == 'm') || (d == 'N') || (d == 'n');
  ------------------
  |  Branch (29842:39): [True: 50, False: 35]
  |  Branch (29842:53): [True: 3, False: 32]
  |  Branch (29842:67): [True: 6, False: 26]
  |  Branch (29842:81): [True: 11, False: 15]
  ------------------
29843|     85|                    int columns = atoi(width);
29844|     85|                    if (columns == 0)
  ------------------
  |  Branch (29844:25): [True: 81, False: 4]
  ------------------
29845|     81|                        columns = JANET_COLUMNS;
  ------------------
  |  |29411|     81|#define JANET_COLUMNS 80
  ------------------
29846|      4|                    else if (columns < 0)
  ------------------
  |  Branch (29846:30): [True: 0, False: 4]
  ------------------
29847|      0|                        has_oneline = 1;
29848|     85|                    int flags = 0;
29849|     85|                    flags |= has_color ? JANET_PRETTY_COLOR : 0;
  ------------------
  |  | 1966|     66|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29849:30): [True: 66, False: 19]
  ------------------
29850|     85|                    flags |= has_oneline ? JANET_PRETTY_ONELINE : 0;
  ------------------
  |  | 1967|     25|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (29850:30): [True: 25, False: 60]
  ------------------
29851|     85|                    flags |= has_notrunc ? JANET_PRETTY_NOTRUNC : 0;
  ------------------
  |  | 1968|     70|#define JANET_PRETTY_NOTRUNC 4
  ------------------
  |  Branch (29851:30): [True: 70, False: 15]
  ------------------
29852|     85|                    janet_pretty_(b, depth, columns, flags,
29853|     85|                                  argv[arg], startlen, b->count);
29854|     85|                    break;
29855|     82|                }
29856|    573|                case 'j': {
  ------------------
  |  Branch (29856:17): [True: 573, False: 390]
  ------------------
29857|    573|                    int depth = atoi(precision);
29858|    573|                    if (depth < 1)
  ------------------
  |  Branch (29858:25): [True: 569, False: 4]
  ------------------
29859|    569|                        depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|    569|#define JANET_RECURSION_GUARD 1024
  ------------------
29860|    573|                    janet_jdn_(b, depth, argv[arg], startlen, b->count);
29861|    573|                    break;
29862|     82|                }
29863|     23|                default: {
  ------------------
  |  Branch (29863:17): [True: 23, False: 940]
  ------------------
29864|       |                    /* also treat cases 'nLlh' */
29865|     23|                    janet_panicf("invalid conversion '%s' to 'format'",
29866|     23|                                 form);
29867|     82|                }
29868|    963|            }
29869|    889|            if (nb >= MAX_ITEM)
  ------------------
  |  |29498|    889|#define MAX_ITEM  256
  ------------------
  |  Branch (29869:17): [True: 1, False: 888]
  ------------------
29870|      1|                janet_panic("format buffer overflow");
29871|    888|            if (nb > 0)
  ------------------
  |  Branch (29871:17): [True: 26, False: 862]
  ------------------
29872|     26|                janet_buffer_push_bytes(b, (uint8_t *) item, nb);
29873|    888|        }
29874|  32.2k|    }
29875|    883|}
janetc_regalloc_init:
29915|  2.13M|void janetc_regalloc_init(JanetcRegisterAllocator *ra) {
29916|       |    ra->chunks = NULL;
29917|  2.13M|    ra->count = 0;
29918|  2.13M|    ra->capacity = 0;
29919|  2.13M|    ra->max = 0;
29920|  2.13M|    ra->regtemps = 0;
29921|  2.13M|}
janetc_regalloc_deinit:
29923|  2.16M|void janetc_regalloc_deinit(JanetcRegisterAllocator *ra) {
29924|  2.16M|    janet_free(ra->chunks);
  ------------------
  |  | 2415|  2.16M|#define janet_free(X) free((X))
  ------------------
29925|  2.16M|}
janetc_regalloc_clone:
29950|  30.2k|void janetc_regalloc_clone(JanetcRegisterAllocator *dest, JanetcRegisterAllocator *src) {
29951|  30.2k|    size_t size;
29952|  30.2k|    dest->count = src->count;
29953|  30.2k|    dest->capacity = src->capacity;
29954|  30.2k|    dest->max = src->max;
29955|  30.2k|    size = sizeof(uint32_t) * (size_t) dest->capacity;
29956|  30.2k|    dest->regtemps = 0;
29957|  30.2k|    if (size) {
  ------------------
  |  Branch (29957:9): [True: 28.0k, False: 2.20k]
  ------------------
29958|  28.0k|        dest->chunks = janet_malloc(size);
  ------------------
  |  | 2406|  28.0k|#define janet_malloc(X) malloc((X))
  ------------------
29959|  28.0k|        if (!dest->chunks) {
  ------------------
  |  Branch (29959:13): [True: 0, False: 28.0k]
  ------------------
29960|      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]
  |  |  ------------------
  ------------------
29961|      0|        }
29962|  28.0k|        memcpy(dest->chunks, src->chunks, size);
29963|  28.0k|    } else {
29964|       |        dest->chunks = NULL;
29965|  2.20k|    }
29966|  30.2k|}
janetc_regalloc_touch:
29986|  41.6M|void janetc_regalloc_touch(JanetcRegisterAllocator *ra, int32_t reg) {
29987|  41.6M|    int32_t chunk = reg >> 5;
29988|  41.6M|    int32_t bit = reg & 0x1F;
29989|  43.1M|    while (chunk >= ra->count) pushchunk(ra);
  ------------------
  |  Branch (29989:12): [True: 1.41M, False: 41.6M]
  ------------------
29990|  41.6M|    ra->chunks[chunk] |= ithbit(bit);
  ------------------
  |  |29944|  41.6M|#define ithbit(I) ((uint32_t)1 << (I))
  ------------------
29991|  41.6M|}
janetc_regalloc_1:
29994|  10.6M|int32_t janetc_regalloc_1(JanetcRegisterAllocator *ra) {
29995|       |    /* Get the nth bit in the array */
29996|  10.6M|    int32_t bit, chunk, nchunks, reg;
29997|  10.6M|    bit = -1;
29998|  10.6M|    nchunks = ra->count;
29999|  2.91G|    for (chunk = 0; chunk < nchunks; chunk++) {
  ------------------
  |  Branch (29999:21): [True: 2.91G, False: 892k]
  ------------------
30000|  2.91G|        uint32_t block = ra->chunks[chunk];
30001|  2.91G|        if (block == 0xFFFFFFFF) continue;
  ------------------
  |  Branch (30001:13): [True: 2.90G, False: 9.75M]
  ------------------
30002|  9.75M|        bit = count_trailing_ones(block);
  ------------------
  |  |29930|  9.75M|#define count_trailing_ones(x) __builtin_ctz(~(x))
  ------------------
30003|  9.75M|        break;
30004|  2.91G|    }
30005|       |    /* No reg found */
30006|  10.6M|    if (bit == -1) {
  ------------------
  |  Branch (30006:9): [True: 892k, False: 9.75M]
  ------------------
30007|   892k|        pushchunk(ra);
30008|   892k|        bit = 0;
30009|   892k|        chunk = nchunks;
30010|   892k|    }
30011|       |    /* set the bit at index bit in chunk */
30012|  10.6M|    ra->chunks[chunk] |= ithbit(bit);
  ------------------
  |  |29944|  10.6M|#define ithbit(I) ((uint32_t)1 << (I))
  ------------------
30013|  10.6M|    reg = (chunk << 5) + bit;
30014|  10.6M|    if (reg > ra->max)
  ------------------
  |  Branch (30014:9): [True: 6.79M, False: 3.85M]
  ------------------
30015|  6.79M|        ra->max = reg;
30016|  10.6M|    return reg;
30017|  10.6M|}
janetc_regalloc_free:
30021|  4.19M|void janetc_regalloc_free(JanetcRegisterAllocator *ra, int32_t reg) {
30022|  4.19M|    int32_t chunk = reg >> 5;
30023|  4.19M|    int32_t bit = reg & 0x1F;
30024|  4.19M|    ra->chunks[chunk] &= ~ithbit(bit);
  ------------------
  |  |29944|  4.19M|#define ithbit(I) ((uint32_t)1 << (I))
  ------------------
30025|  4.19M|}
janetc_regalloc_check:
30028|  38.2M|int janetc_regalloc_check(JanetcRegisterAllocator *ra, int32_t reg) {
30029|  38.2M|    int32_t chunk = reg >> 5;
30030|  38.2M|    int32_t bit = reg & 0x1F;
30031|  38.2M|    while (chunk >= ra->count) pushchunk(ra);
  ------------------
  |  Branch (30031:12): [True: 803, False: 38.2M]
  ------------------
30032|  38.2M|    return !!(ra->chunks[chunk] & ithbit(bit));
  ------------------
  |  |29944|  38.2M|#define ithbit(I) ((uint32_t)1 << (I))
  ------------------
30033|  38.2M|}
janetc_regalloc_temp:
30038|  5.36M|int32_t janetc_regalloc_temp(JanetcRegisterAllocator *ra, JanetcRegisterTemp nth) {
30039|  5.36M|    int32_t oldmax = ra->max;
30040|  5.36M|    if (ra->regtemps & (1 << nth)) {
  ------------------
  |  Branch (30040:9): [True: 0, False: 5.36M]
  ------------------
30041|      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]
  |  |  ------------------
  ------------------
30042|      0|    }
30043|  5.36M|    ra->regtemps |= 1 << nth;
30044|  5.36M|    int32_t reg = janetc_regalloc_1(ra);
30045|  5.36M|    if (reg > 0xFF) {
  ------------------
  |  Branch (30045:9): [True: 4.28M, False: 1.07M]
  ------------------
30046|  4.28M|        reg = 0xF0 + nth;
30047|  4.28M|        ra->max = (reg > oldmax) ? reg : oldmax;
  ------------------
  |  Branch (30047:19): [True: 116, False: 4.28M]
  ------------------
30048|  4.28M|    }
30049|  5.36M|    return reg;
30050|  5.36M|}
janetc_regalloc_freetemp:
30052|  5.85M|void janetc_regalloc_freetemp(JanetcRegisterAllocator *ra, int32_t reg, JanetcRegisterTemp nth) {
30053|  5.85M|    ra->regtemps &= ~(1 << nth);
30054|  5.85M|    if (reg < 0xF0)
  ------------------
  |  Branch (30054:9): [True: 1.39M, False: 4.46M]
  ------------------
30055|  1.39M|        janetc_regalloc_free(ra, reg);
30056|  5.85M|}
janet_dobytes:
30092|  7.16k|int janet_dobytes(JanetTable *env, const uint8_t *bytes, int32_t len, const char *sourcePath, Janet *out) {
30093|  7.16k|    JanetParser *parser;
30094|  7.16k|    int errflags = 0, done = 0;
30095|  7.16k|    int32_t index = 0;
30096|  7.16k|    Janet ret = janet_wrap_nil();
  ------------------
  |  |  831|  7.16k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  7.16k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.16k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.16k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30097|  7.16k|    JanetFiber *fiber = NULL;
30098|  7.16k|    const uint8_t *where = sourcePath ? janet_cstring(sourcePath) : NULL;
  ------------------
  |  Branch (30098:28): [True: 7.16k, False: 0]
  ------------------
30099|       |
30100|  7.16k|    if (where) janet_gcroot(janet_wrap_string(where));
  ------------------
  |  |  848|  7.16k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  7.16k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.16k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.16k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30100:9): [True: 7.16k, False: 0]
  ------------------
30101|  7.16k|    if (NULL == sourcePath) sourcePath = "<unknown>";
  ------------------
  |  Branch (30101:9): [True: 0, False: 7.16k]
  ------------------
30102|  7.16k|    parser = janet_abstract(&janet_parser_type, sizeof(JanetParser));
30103|  7.16k|    janet_parser_init(parser);
30104|  7.16k|    janet_gcroot(janet_wrap_abstract(parser));
  ------------------
  |  |  851|  7.16k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  7.16k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.16k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.16k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30105|       |
30106|       |    /* While we haven't seen an error */
30107|  12.8M|    while (!done) {
  ------------------
  |  Branch (30107:12): [True: 12.8M, False: 2.70k]
  ------------------
30108|       |
30109|       |        /* Evaluate parsed values */
30110|  13.1M|        while (janet_parser_has_more(parser)) {
  ------------------
  |  Branch (30110:16): [True: 237k, False: 12.8M]
  ------------------
30111|   237k|            Janet form = janet_parser_produce(parser);
30112|   237k|            JanetCompileResult cres = janet_compile(form, env, where);
30113|   237k|            if (cres.status == JANET_COMPILE_OK) {
  ------------------
  |  Branch (30113:17): [True: 235k, False: 2.42k]
  ------------------
30114|   235k|                JanetFunction *f = janet_thunk(cres.funcdef);
30115|   235k|                fiber = janet_fiber(f, 64, 0, NULL);
30116|   235k|                fiber->env = env;
30117|   235k|                JanetSignal status = janet_continue(fiber, janet_wrap_nil(), &ret);
  ------------------
  |  |  831|   235k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   235k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   235k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   235k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30118|   235k|                if (status != JANET_SIGNAL_OK && status != JANET_SIGNAL_EVENT) {
  ------------------
  |  Branch (30118:21): [True: 3.41k, False: 231k]
  |  Branch (30118:50): [True: 2.03k, False: 1.38k]
  ------------------
30119|  2.03k|                    janet_stacktrace_ext(fiber, ret, "");
30120|  2.03k|                    errflags |= JANET_DO_ERROR_RUNTIME;
  ------------------
  |  | 1735|  2.03k|#define JANET_DO_ERROR_RUNTIME 0x01
  ------------------
30121|  2.03k|                    done = 1;
30122|  2.03k|                }
30123|   235k|            } else {
30124|  2.42k|                int32_t line = (int32_t) parser->line;
30125|  2.42k|                int32_t col = (int32_t) parser->column;
30126|  2.42k|                if ((cres.error_mapping.line > 0) &&
  ------------------
  |  Branch (30126:21): [True: 1.87k, False: 552]
  ------------------
30127|  1.87k|                        (cres.error_mapping.column > 0)) {
  ------------------
  |  Branch (30127:25): [True: 1.87k, False: 0]
  ------------------
30128|  1.87k|                    line = cres.error_mapping.line;
30129|  1.87k|                    col = cres.error_mapping.column;
30130|  1.87k|                }
30131|  2.42k|                JanetString ctx = janet_formatc("%s:%d:%d: compile error",
30132|  2.42k|                                                sourcePath, line, col);
30133|  2.42k|                JanetString errstr = janet_formatc("%s: %s",
30134|  2.42k|                                                   (const char *)ctx,
30135|  2.42k|                                                   (const char *)cres.error);
30136|  2.42k|                ret = janet_wrap_string(errstr);
  ------------------
  |  |  848|  2.42k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  2.42k|    janet_nanbox_from_cpointer((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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30137|  2.42k|                if (cres.macrofiber) {
  ------------------
  |  Branch (30137:21): [True: 313, False: 2.11k]
  ------------------
30138|    313|                    janet_eprintf("%s", (const char *)ctx);
  ------------------
  |  | 2194|    313|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
30139|    313|                    janet_stacktrace_ext(cres.macrofiber, ret, "");
30140|  2.11k|                } else {
30141|  2.11k|                    janet_eprintf("%s\n", (const char *)errstr);
  ------------------
  |  | 2194|  2.11k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
30142|  2.11k|                }
30143|  2.42k|                errflags |= JANET_DO_ERROR_COMPILE;
  ------------------
  |  | 1736|  2.42k|#define JANET_DO_ERROR_COMPILE 0x02
  ------------------
30144|  2.42k|                done = 1;
30145|  2.42k|            }
30146|   237k|        }
30147|       |
30148|  12.8M|        if (done) break;
  ------------------
  |  Branch (30148:13): [True: 4.45k, False: 12.8M]
  ------------------
30149|       |
30150|       |        /* Dispatch based on parse state */
30151|  12.8M|        switch (janet_parser_status(parser)) {
  ------------------
  |  Branch (30151:17): [True: 12.8M, False: 0]
  ------------------
30152|    433|            case JANET_PARSE_DEAD:
  ------------------
  |  Branch (30152:13): [True: 433, False: 12.8M]
  ------------------
30153|    433|                done = 1;
30154|    433|                break;
30155|  2.27k|            case JANET_PARSE_ERROR: {
  ------------------
  |  Branch (30155:13): [True: 2.27k, False: 12.8M]
  ------------------
30156|  2.27k|                errflags |= JANET_DO_ERROR_PARSE;
  ------------------
  |  | 1737|  2.27k|#define JANET_DO_ERROR_PARSE 0x04
  ------------------
30157|  2.27k|                int32_t line = (int32_t) parser->line;
30158|  2.27k|                int32_t col = (int32_t) parser->column;
30159|  2.27k|                JanetString errstr = janet_formatc("%s:%d:%d: parse error: %s",
30160|  2.27k|                                                   sourcePath, line, col,
30161|  2.27k|                                                   janet_parser_error(parser));
30162|  2.27k|                ret = janet_wrap_string(errstr);
  ------------------
  |  |  848|  2.27k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  2.27k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.27k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.27k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30163|  2.27k|                janet_eprintf("%s\n", (const char *)errstr);
  ------------------
  |  | 2194|  2.27k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
30164|  2.27k|                done = 1;
30165|  2.27k|                break;
30166|      0|            }
30167|  50.5k|            case JANET_PARSE_ROOT:
  ------------------
  |  Branch (30167:13): [True: 50.5k, False: 12.8M]
  ------------------
30168|  12.8M|            case JANET_PARSE_PENDING:
  ------------------
  |  Branch (30168:13): [True: 12.8M, False: 53.2k]
  ------------------
30169|  12.8M|                if (index >= len) {
  ------------------
  |  Branch (30169:21): [True: 1.25k, False: 12.8M]
  ------------------
30170|  1.25k|                    janet_parser_eof(parser);
30171|  12.8M|                } else {
30172|  12.8M|                    janet_parser_consume(parser, bytes[index++]);
30173|  12.8M|                }
30174|  12.8M|                break;
30175|  12.8M|        }
30176|       |
30177|  12.8M|    }
30178|       |
30179|       |    /* Clean up and return errors */
30180|  7.16k|    janet_gcunroot(janet_wrap_abstract(parser));
  ------------------
  |  |  851|  7.16k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  7.16k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.16k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.16k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30181|  7.16k|    if (where) janet_gcunroot(janet_wrap_string(where));
  ------------------
  |  |  848|  7.16k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  7.16k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.16k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.16k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30181:9): [True: 7.16k, False: 0]
  ------------------
30182|  7.16k|#ifdef JANET_EV
30183|       |    /* Enter the event loop if we are not already in it */
30184|  7.16k|    if (janet_vm.stackn == 0) {
  ------------------
  |  Branch (30184:9): [True: 0, False: 7.16k]
  ------------------
30185|      0|        if (fiber) {
  ------------------
  |  Branch (30185:13): [True: 0, False: 0]
  ------------------
30186|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30187|      0|        }
30188|      0|        janet_loop();
30189|      0|        if (fiber) {
  ------------------
  |  Branch (30189:13): [True: 0, False: 0]
  ------------------
30190|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30191|      0|            if (!errflags)
  ------------------
  |  Branch (30191:17): [True: 0, False: 0]
  ------------------
30192|      0|                ret = fiber->last_value;
30193|      0|        }
30194|      0|    }
30195|  7.16k|#endif
30196|  7.16k|    if (out) *out = ret;
  ------------------
  |  Branch (30196:9): [True: 7.16k, False: 0]
  ------------------
30197|  7.16k|    return errflags;
30198|  7.16k|}
dohead_destructure:
30606|  17.7k|SlotHeadPair *dohead_destructure(JanetCompiler *c, SlotHeadPair *into, JanetFopts opts, Janet lhs, Janet rhs) {
30607|  17.7k|    if (c->recursion_guard <= 0) {
  ------------------
  |  Branch (30607:9): [True: 0, False: 17.7k]
  ------------------
30608|      0|        janetc_error(c, janet_cstring("C stack recursed too deeply"));
30609|      0|        return NULL;
30610|      0|    }
30611|       |    /* Detect if we can do an optimization to avoid some allocations */
30612|  17.7k|    int can_destructure_lhs = janet_checktype(lhs, JANET_TUPLE)
  ------------------
  |  |  806|  35.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 6.89k, False: 10.8k]
  |  |  |  Branch (806:6): [Folded, False: 17.7k]
  |  |  ------------------
  |  |  807|  35.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|  35.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  17.7k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  17.7k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  17.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  17.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30613|  10.8k|                              || janet_checktype(lhs, JANET_ARRAY);
  ------------------
  |  |  806|  10.8k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 10, False: 10.8k]
  |  |  |  Branch (806:6): [Folded, False: 10.8k]
  |  |  ------------------
  |  |  807|  10.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|  10.8k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  10.8k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  10.8k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  10.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  10.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30614|  17.7k|    int rhs_is_indexed = janet_checktype(rhs, JANET_ARRAY)
  ------------------
  |  |  806|  35.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 34, False: 17.7k]
  |  |  |  Branch (806:6): [Folded, False: 17.7k]
  |  |  ------------------
  |  |  807|  35.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|  35.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  17.7k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  17.7k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  17.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  17.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30615|  17.7k|                         || (janet_checktype(rhs, JANET_TUPLE) && (janet_tuple_flag(janet_unwrap_tuple(rhs)) & JANET_TUPLE_FLAG_BRACKETCTOR));
  ------------------
  |  |  806|  35.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 9.28k, False: 8.41k]
  |  |  |  Branch (806:6): [Folded, False: 17.7k]
  |  |  ------------------
  |  |  807|  35.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|  35.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  17.7k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  17.7k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  17.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  17.7k|#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));
  ------------------
  |  | 1805|  9.28k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1799|  9.28k|#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));
  ------------------
  |  | 1797|  9.28k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (30615:67): [True: 200, False: 9.08k]
  ------------------
30616|  17.7k|    uint32_t has_drop = opts.flags & JANET_FOPTS_DROP;
  ------------------
  |  | 1101|  17.7k|#define JANET_FOPTS_DROP 0x40000
  ------------------
30617|       |
30618|  17.7k|    JanetFopts subopts = janetc_fopts_default(c);
30619|  17.7k|    subopts.flags = opts.flags & ~(JANET_FOPTS_TAIL | JANET_FOPTS_DROP);
  ------------------
  |  | 1099|  17.7k|#define JANET_FOPTS_TAIL 0x10000
  ------------------
                  subopts.flags = opts.flags & ~(JANET_FOPTS_TAIL | JANET_FOPTS_DROP);
  ------------------
  |  | 1101|  17.7k|#define JANET_FOPTS_DROP 0x40000
  ------------------
30620|       |
30621|  17.7k|    if (has_drop && can_destructure_lhs && rhs_is_indexed) {
  ------------------
  |  Branch (30621:9): [True: 11.4k, False: 6.31k]
  |  Branch (30621:21): [True: 1.68k, False: 9.73k]
  |  Branch (30621:44): [True: 108, False: 1.57k]
  ------------------
30622|       |        /* Code is of the form (def [a b] [1 2]), avoid the allocation of two tuples */
30623|    108|        JanetView view_lhs = {0};
30624|    108|        JanetView view_rhs = {0};
30625|    108|        janet_indexed_view(lhs, &view_lhs.items, &view_lhs.len);
30626|    108|        janet_indexed_view(rhs, &view_rhs.items, &view_rhs.len);
30627|    108|        int found_amp = 0;
30628|    108|        int found_splice = 0;
30629|       |        /* Check for (def [x y z] [(splice [1 2 3]) 4 5 6]), bail out of optimization */
30630|    324|        for (int32_t i = 0; i < view_rhs.len; i++) {
  ------------------
  |  Branch (30630:29): [True: 216, False: 108]
  ------------------
30631|    216|            if (!janet_checktype(view_rhs.items[i], JANET_TUPLE)) {
  ------------------
  |  |  806|    216|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 216]
  |  |  ------------------
  |  |  807|    216|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    216|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    216|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    216|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    216|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    216|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30631:17): [True: 108, False: 108]
  ------------------
30632|    108|                continue;
30633|    108|            }
30634|    108|            JanetTuple tup = janet_unwrap_tuple(view_rhs.items[i]);
  ------------------
  |  |  858|    108|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
30635|    108|            if (janet_tuple_length(tup) == 0) {
  ------------------
  |  | 1801|    108|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|    108|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (30635:17): [True: 0, False: 108]
  ------------------
30636|      0|                continue;
30637|      0|            }
30638|    108|            if (janet_symeq(tup[0], "splice")) {
  ------------------
  |  Branch (30638:17): [True: 0, False: 108]
  ------------------
30639|      0|                found_splice = 1;
30640|       |                /* Good error will be generated later. */
30641|      0|                break;
30642|      0|            }
30643|    108|        }
30644|       |        /* Check for (def [x & more] [1 2 3]), bail out of optimization */
30645|  6.01k|        for (int32_t i = 0; i < view_lhs.len; i++) {
  ------------------
  |  Branch (30645:29): [True: 5.90k, False: 105]
  ------------------
30646|  5.90k|            if (janet_symeq(view_lhs.items[i], "&")) {
  ------------------
  |  Branch (30646:17): [True: 3, False: 5.90k]
  ------------------
30647|      3|                found_amp = 1;
30648|       |                /* Good error will be generated later. */
30649|      3|                break;
30650|      3|            }
30651|  5.90k|        }
30652|    108|        if (!found_amp && !found_splice) {
  ------------------
  |  Branch (30652:13): [True: 105, False: 3]
  |  Branch (30652:27): [True: 105, False: 0]
  ------------------
30653|  5.94k|            for (int32_t i = 0; i < view_lhs.len; i++) {
  ------------------
  |  Branch (30653:33): [True: 5.83k, False: 105]
  ------------------
30654|  5.83k|                Janet sub_rhs = view_rhs.len <= i ? janet_wrap_nil() : view_rhs.items[i];
  ------------------
  |  |  831|  5.63k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  5.63k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.63k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.63k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30654:33): [True: 5.63k, False: 209]
  ------------------
30655|  5.83k|                c->recursion_guard--;
30656|  5.83k|                into = dohead_destructure(c, into, subopts, view_lhs.items[i], sub_rhs);
30657|  5.83k|                c->recursion_guard++;
30658|  5.83k|            }
30659|    105|            return into;
30660|    105|        }
30661|    108|    }
30662|       |
30663|       |    /* No optimization, do the simple way */
30664|  17.6k|    subopts.hint = opts.hint;
30665|  17.6k|    JanetSlot ret = janetc_value(subopts, rhs);
30666|  17.6k|    SlotHeadPair shp = {lhs, ret};
30667|       |    janet_v_push(into, shp);
  ------------------
  |  |  712|  17.6k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  17.6k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  17.6k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  5.73k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  5.73k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  5.73k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  5.73k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 11.8k, False: 5.73k]
  |  |  |  |  |  |  |  Branch (723:50): [True: 293, False: 5.44k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|  12.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))
  |  |  ------------------
  |  |  |  |  721|  17.6k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  17.6k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30668|  17.6k|    return into;
30669|  17.7k|}
janetc_special:
31472|   987k|const JanetSpecial *janetc_special(const uint8_t *name) {
31473|   987k|    return janet_strbinsearch(
31474|   987k|               &janetc_specials,
31475|   987k|               sizeof(janetc_specials) / sizeof(JanetSpecial),
31476|   987k|               sizeof(JanetSpecial),
31477|   987k|               name);
31478|   987k|}
janet_string_begin:
31593|  1.75k|uint8_t *janet_string_begin(int32_t length) {
31594|  1.75k|    JanetStringHead *head = janet_gcalloc(JANET_MEMORY_STRING, sizeof(JanetStringHead) + (size_t) length + 1);
31595|  1.75k|    head->length = length;
31596|  1.75k|    uint8_t *data = (uint8_t *)head->data;
31597|  1.75k|    data[length] = 0;
31598|  1.75k|    return data;
31599|  1.75k|}
janet_string_end:
31602|  1.75k|const uint8_t *janet_string_end(uint8_t *str) {
31603|  1.75k|    janet_string_hash(str) = janet_string_calchash(str, janet_string_length(str));
  ------------------
  |  | 1813|  1.75k|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1811|  1.75k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
                  janet_string_hash(str) = janet_string_calchash(str, janet_string_length(str));
  ------------------
  |  | 1812|  1.75k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|  1.75k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
31604|  1.75k|    return str;
31605|  1.75k|}
janet_string:
31608|  11.6M|const uint8_t *janet_string(const uint8_t *buf, int32_t len) {
31609|  11.6M|    JanetStringHead *head = janet_gcalloc(JANET_MEMORY_STRING, sizeof(JanetStringHead) + (size_t) len + 1);
31610|  11.6M|    head->length = len;
31611|  11.6M|    head->hash = janet_string_calchash(buf, len);
31612|  11.6M|    uint8_t *data = (uint8_t *)head->data;
31613|  11.6M|    safe_memcpy(data, buf, len);
31614|  11.6M|    data[len] = 0;
31615|  11.6M|    return data;
31616|  11.6M|}
janet_string_compare:
31619|   306k|int janet_string_compare(const uint8_t *lhs, const uint8_t *rhs) {
31620|   306k|    int32_t xlen = janet_string_length(lhs);
  ------------------
  |  | 1812|   306k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|   306k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
31621|   306k|    int32_t ylen = janet_string_length(rhs);
  ------------------
  |  | 1812|   306k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|   306k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
31622|   306k|    int32_t len = xlen > ylen ? ylen : xlen;
  ------------------
  |  Branch (31622:19): [True: 103k, False: 203k]
  ------------------
31623|   306k|    int res = memcmp(lhs, rhs, len);
31624|   306k|    if (res) return res > 0 ? 1 : -1;
  ------------------
  |  Branch (31624:9): [True: 213k, False: 92.9k]
  |  Branch (31624:21): [True: 83.7k, False: 130k]
  ------------------
31625|  92.9k|    if (xlen == ylen) return 0;
  ------------------
  |  Branch (31625:9): [True: 83.0k, False: 9.86k]
  ------------------
31626|  9.86k|    return xlen < ylen ? -1 : 1;
  ------------------
  |  Branch (31626:12): [True: 5.40k, False: 4.45k]
  ------------------
31627|  92.9k|}
janet_string_equalconst:
31630|   193M|int janet_string_equalconst(const uint8_t *lhs, const uint8_t *rhs, int32_t rlen, int32_t rhash) {
31631|   193M|    int32_t lhash = janet_string_hash(lhs);
  ------------------
  |  | 1813|   193M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1811|   193M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
31632|   193M|    int32_t llen = janet_string_length(lhs);
  ------------------
  |  | 1812|   193M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|   193M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
31633|   193M|    if (lhash != rhash || llen != rlen)
  ------------------
  |  Branch (31633:9): [True: 27.4M, False: 166M]
  |  Branch (31633:27): [True: 28, False: 166M]
  ------------------
31634|  27.5M|        return 0;
31635|   166M|    if (lhs == rhs)
  ------------------
  |  Branch (31635:9): [True: 17.5M, False: 148M]
  ------------------
31636|  17.5M|        return 1;
31637|   148M|    return !memcmp(lhs, rhs, rlen);
31638|   166M|}
janet_string_equal:
31641|  1.13M|int janet_string_equal(const uint8_t *lhs, const uint8_t *rhs) {
31642|  1.13M|    return janet_string_equalconst(lhs, rhs,
31643|  1.13M|                                   janet_string_length(rhs), janet_string_hash(rhs));
  ------------------
  |  | 1812|  1.13M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|  1.13M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
                                                 janet_string_length(rhs), janet_string_hash(rhs));
  ------------------
  |  | 1813|  1.13M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1811|  1.13M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
31644|  1.13M|}
janet_cstring:
31647|   289k|const uint8_t *janet_cstring(const char *str) {
31648|   289k|    return janet_string((const uint8_t *)str, (int32_t)strlen(str));
31649|   289k|}
cfun_string_slice:
31739|  7.98k|              "negative slice range.") {
31740|  7.98k|    JanetByteView view = janet_getbytes(argv, 0);
31741|  7.98k|    JanetRange range = janet_getslice(argc, argv);
31742|  7.98k|    return janet_stringv(view.bytes + range.start, range.end - range.start);
  ------------------
  |  | 1826|  7.98k|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|  7.98k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  7.98k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  7.98k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  7.98k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31743|  7.98k|}
cfun_keyword_slice:
31755|      5|              "Same as string/slice, but returns a keyword.") {
31756|      5|    JanetByteView view = janet_getbytes(argv, 0);
31757|      5|    JanetRange range = janet_getslice(argc, argv);
31758|      5|    return janet_keywordv(view.bytes + range.start, range.end - range.start);
  ------------------
  |  | 1841|      5|#define janet_keywordv(str, len) janet_wrap_keyword(janet_keyword((str), (len)))
  |  |  ------------------
  |  |  |  |  850|      5|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|      5|    janet_nanbox_from_cpointer((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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31759|      5|}
cfun_string_repeat:
31763|  1.11k|              "Returns a string that is `n` copies of `bytes` concatenated.") {
31764|  1.11k|    janet_fixarity(argc, 2);
31765|  1.11k|    JanetByteView view = janet_getbytes(argv, 0);
31766|  1.11k|    int32_t rep = janet_getinteger(argv, 1);
31767|  1.11k|    if (rep < 0) janet_panic("expected non-negative number of repetitions");
  ------------------
  |  Branch (31767:9): [True: 2, False: 1.11k]
  ------------------
31768|  1.11k|    if (rep == 0) return janet_cstringv("");
  ------------------
  |  | 1825|      1|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (31768:9): [True: 1, False: 1.11k]
  ------------------
31769|  1.11k|    int64_t mulres = (int64_t) rep * view.len;
31770|  1.11k|    if (mulres > INT32_MAX) janet_panic("result string is too long");
  ------------------
  |  Branch (31770:9): [True: 2, False: 1.11k]
  ------------------
31771|  1.11k|    uint8_t *newbuf = janet_string_begin((int32_t) mulres);
31772|  1.11k|    uint8_t *end = newbuf + mulres;
31773|   144k|    for (uint8_t *p = newbuf; p < end; p += view.len) {
  ------------------
  |  Branch (31773:31): [True: 143k, False: 1.11k]
  ------------------
31774|   143k|        safe_memcpy(p, view.bytes, view.len);
31775|   143k|    }
31776|  1.11k|    return janet_wrap_string(janet_string_end(newbuf));
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31777|  1.11k|}
cfun_string_bytes:
31781|      8|              "Returns a tuple of integers that are the byte values of the string.") {
31782|      8|    janet_fixarity(argc, 1);
31783|      8|    JanetByteView view = janet_getbytes(argv, 0);
31784|      8|    Janet *tup = janet_tuple_begin(view.len);
31785|      8|    int32_t i;
31786|     80|    for (i = 0; i < view.len; i++) {
  ------------------
  |  Branch (31786:17): [True: 72, False: 8]
  ------------------
31787|     72|        tup[i] = janet_wrap_integer((int32_t) view.bytes[i]);
  ------------------
  |  |  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)
  |  |  ------------------
  ------------------
31788|     72|    }
31789|      8|    return janet_wrap_tuple(janet_tuple_end(tup));
  ------------------
  |  |  843|      8|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|      8|    janet_nanbox_from_cpointer((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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31790|      8|}
cfun_string_frombytes:
31795|      9|              "will be coerced to the range of 1 byte 0-255.") {
31796|      9|    int32_t i;
31797|      9|    uint8_t *buf = janet_string_begin(argc);
31798|     33|    for (i = 0; i < argc; i++) {
  ------------------
  |  Branch (31798:17): [True: 24, False: 9]
  ------------------
31799|     24|        int32_t c = janet_getinteger(argv, i);
31800|     24|        buf[i] = c & 0xFF;
31801|     24|    }
31802|      9|    return janet_wrap_string(janet_string_end(buf));
  ------------------
  |  |  848|      9|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31803|      9|}
cfun_string_asciilower:
31809|     21|              "case check, meaning no unicode support.") {
31810|     21|    janet_fixarity(argc, 1);
31811|     21|    JanetByteView view = janet_getbytes(argv, 0);
31812|     21|    uint8_t *buf = janet_string_begin(view.len);
31813|   124k|    for (int32_t i = 0; i < view.len; i++) {
  ------------------
  |  Branch (31813:25): [True: 124k, False: 21]
  ------------------
31814|   124k|        uint8_t c = view.bytes[i];
31815|   124k|        if (c >= 65 && c <= 90) {
  ------------------
  |  Branch (31815:13): [True: 124k, False: 380]
  |  Branch (31815:24): [True: 89, False: 124k]
  ------------------
31816|     89|            buf[i] = c + 32;
31817|   124k|        } else {
31818|   124k|            buf[i] = c;
31819|   124k|        }
31820|   124k|    }
31821|     21|    return janet_wrap_string(janet_string_end(buf));
  ------------------
  |  |  848|     21|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31822|     21|}
cfun_string_reverse:
31845|     83|              "Returns a string that is the reversed version of `str`.") {
31846|     83|    janet_fixarity(argc, 1);
31847|     83|    JanetByteView view = janet_getbytes(argv, 0);
31848|     83|    uint8_t *buf = janet_string_begin(view.len);
31849|     83|    int32_t i, j;
31850|    171|    for (i = 0, j = view.len - 1; i < view.len; i++, j--) {
  ------------------
  |  Branch (31850:35): [True: 88, False: 83]
  ------------------
31851|     88|        buf[i] = view.bytes[j];
31852|     88|    }
31853|     83|    return janet_wrap_string(janet_string_end(buf));
  ------------------
  |  |  848|     83|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|     83|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     83|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     83|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31854|     83|}
cfun_string_find:
31873|  12.7k|              "otherwise returns nil.") {
31874|  12.7k|    int32_t result;
31875|  12.7k|    struct kmp_state state;
31876|  12.7k|    findsetup(argc, argv, &state, 0);
31877|  12.7k|    result = kmp_next(&state);
31878|  12.7k|    kmp_deinit(&state);
31879|  12.7k|    return result < 0
  ------------------
  |  Branch (31879:12): [True: 12.6k, False: 83]
  ------------------
31880|  12.7k|           ? janet_wrap_nil()
  ------------------
  |  |  831|  12.6k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  12.6k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  12.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  12.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31881|  12.7k|           : janet_wrap_integer(result);
  ------------------
  |  |  967|     83|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|     83|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
31882|  12.7k|}
cfun_string_hasprefix:
31886|  5.58M|              "Tests whether `str` starts with `pfx`.") {
31887|  5.58M|    janet_fixarity(argc, 2);
31888|  5.58M|    JanetByteView prefix = janet_getbytes(argv, 0);
31889|  5.58M|    JanetByteView str = janet_getbytes(argv, 1);
31890|  5.58M|    return str.len < prefix.len
  ------------------
  |  Branch (31890:12): [True: 29.1k, False: 5.55M]
  ------------------
31891|  5.58M|           ? janet_wrap_false()
  ------------------
  |  |  833|  29.1k|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|  29.1k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  29.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  29.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31892|  5.58M|           : janet_wrap_boolean(memcmp(prefix.bytes, str.bytes, prefix.len) == 0);
  ------------------
  |  |  834|  5.55M|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|  5.55M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.55M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.55M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31893|  5.58M|}
cfun_string_hassuffix:
31897|  12.4k|              "Tests whether `str` ends with `sfx`.") {
31898|  12.4k|    janet_fixarity(argc, 2);
31899|  12.4k|    JanetByteView suffix = janet_getbytes(argv, 0);
31900|  12.4k|    JanetByteView str = janet_getbytes(argv, 1);
31901|  12.4k|    return str.len < suffix.len
  ------------------
  |  Branch (31901:12): [True: 11.8k, False: 695]
  ------------------
31902|  12.4k|           ? janet_wrap_false()
  ------------------
  |  |  833|  11.8k|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|  11.8k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  11.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  11.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31903|  12.4k|           : janet_wrap_boolean(memcmp(suffix.bytes,
  ------------------
  |  |  834|    695|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|    695|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    695|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    695|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31904|  12.4k|                                       str.bytes + str.len - suffix.len,
31905|  12.4k|                                       suffix.len) == 0);
31906|  12.4k|}
cfun_string_findall:
31913|     38|              "may contribute to multiple found patterns.") {
31914|     38|    int32_t result;
31915|     38|    struct kmp_state state;
31916|     38|    findsetup(argc, argv, &state, 0);
31917|     38|    JanetArray *array = janet_array(0);
31918|     59|    while ((result = kmp_next(&state)) >= 0) {
  ------------------
  |  Branch (31918:12): [True: 21, False: 38]
  ------------------
31919|     21|        janet_array_push(array, janet_wrap_integer(result));
  ------------------
  |  |  967|     21|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|     21|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
31920|     21|    }
31921|     38|    kmp_deinit(&state);
31922|     38|    return janet_wrap_array(array);
  ------------------
  |  |  845|     38|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|     38|    janet_nanbox_from_pointer((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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31923|     38|}
cfun_string_replace:
31950|     56|              "Will return the new string if `patt` is found, otherwise returns `str`.") {
31951|     56|    int32_t result;
31952|     56|    struct replace_state s;
31953|     56|    uint8_t *buf;
31954|     56|    replacesetup(argc, argv, &s);
31955|     56|    result = kmp_next(&s.kmp);
31956|     56|    if (result < 0) {
  ------------------
  |  Branch (31956:9): [True: 21, False: 35]
  ------------------
31957|     21|        kmp_deinit(&s.kmp);
31958|     21|        return janet_stringv(s.kmp.text, s.kmp.textlen);
  ------------------
  |  | 1826|     21|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|     21|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31959|     21|    }
31960|     35|    JanetByteView subst = janet_text_substitution(&s.subst, s.kmp.text + result, s.kmp.patlen, NULL);
31961|     35|    buf = janet_string_begin(s.kmp.textlen - s.kmp.patlen + subst.len);
31962|     35|    safe_memcpy(buf, s.kmp.text, result);
31963|     35|    safe_memcpy(buf + result, subst.bytes, subst.len);
31964|     35|    safe_memcpy(buf + result + subst.len,
31965|     35|                s.kmp.text + result + s.kmp.patlen,
31966|     35|                s.kmp.textlen - result - s.kmp.patlen);
31967|     35|    kmp_deinit(&s.kmp);
31968|     35|    return janet_wrap_string(janet_string_end(buf));
  ------------------
  |  |  848|     35|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|     35|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     35|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     35|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31969|     56|}
cfun_string_replaceall:
31977|  5.61k|              "Will return the new string if `patt` is found, otherwise returns `str`.") {
31978|  5.61k|    int32_t result;
31979|  5.61k|    struct replace_state s;
31980|  5.61k|    JanetBuffer b;
31981|  5.61k|    int32_t lastindex = 0;
31982|  5.61k|    replacesetup(argc, argv, &s);
31983|  5.61k|    janet_buffer_init(&b, s.kmp.textlen);
31984|  5.61k|    while ((result = kmp_next(&s.kmp)) >= 0) {
  ------------------
  |  Branch (31984:12): [True: 0, False: 5.61k]
  ------------------
31985|      0|        JanetByteView subst = janet_text_substitution(&s.subst, s.kmp.text + result, s.kmp.patlen, NULL);
31986|      0|        janet_buffer_push_bytes(&b, s.kmp.text + lastindex, result - lastindex);
31987|      0|        janet_buffer_push_bytes(&b, subst.bytes, subst.len);
31988|      0|        lastindex = result + s.kmp.patlen;
31989|      0|        kmp_seti(&s.kmp, lastindex);
31990|      0|    }
31991|  5.61k|    janet_buffer_push_bytes(&b, s.kmp.text + lastindex, s.kmp.textlen - lastindex);
31992|  5.61k|    const uint8_t *ret = janet_string(b.data, b.count);
31993|  5.61k|    janet_buffer_deinit(&b);
31994|  5.61k|    kmp_deinit(&s.kmp);
31995|  5.61k|    return janet_wrap_string(ret);
  ------------------
  |  |  848|  5.61k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  5.61k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.61k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.61k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31996|  5.61k|}
cfun_string_split:
32004|    100|              "of `limit` results (if provided).") {
32005|    100|    int32_t result;
32006|    100|    JanetArray *array;
32007|    100|    struct kmp_state state;
32008|    100|    int32_t limit = -1, lastindex = 0;
32009|    100|    if (argc == 4) {
  ------------------
  |  Branch (32009:9): [True: 4, False: 96]
  ------------------
32010|      4|        limit = janet_getinteger(argv, 3);
32011|      4|    }
32012|    100|    findsetup(argc, argv, &state, 1);
32013|    100|    array = janet_array(0);
32014|    327|    while ((result = kmp_next(&state)) >= 0 && --limit) {
  ------------------
  |  Branch (32014:12): [True: 227, False: 100]
  |  Branch (32014:48): [True: 227, False: 0]
  ------------------
32015|    227|        const uint8_t *slice = janet_string(state.text + lastindex, result - lastindex);
32016|    227|        janet_array_push(array, janet_wrap_string(slice));
  ------------------
  |  |  848|    227|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|    227|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    227|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    227|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32017|    227|        lastindex = result + state.patlen;
32018|    227|        kmp_seti(&state, lastindex);
32019|    227|    }
32020|    100|    const uint8_t *slice = janet_string(state.text + lastindex, state.textlen - lastindex);
32021|    100|    janet_array_push(array, janet_wrap_string(slice));
  ------------------
  |  |  848|    100|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|    100|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    100|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    100|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32022|    100|    kmp_deinit(&state);
32023|    100|    return janet_wrap_array(array);
  ------------------
  |  |  845|    100|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|    100|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    100|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    100|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32024|    100|}
cfun_string_checkset:
32030|     22|              "not appear in `set`.") {
32031|     22|    uint32_t bitset[8] = {0, 0, 0, 0, 0, 0, 0, 0};
32032|     22|    janet_fixarity(argc, 2);
32033|     22|    JanetByteView set = janet_getbytes(argv, 0);
32034|     22|    JanetByteView str = janet_getbytes(argv, 1);
32035|       |    /* Populate set */
32036|    145|    for (int32_t i = 0; i < set.len; i++) {
  ------------------
  |  Branch (32036:25): [True: 123, False: 22]
  ------------------
32037|    123|        int index = set.bytes[i] >> 5;
32038|    123|        uint32_t mask = (uint32_t) 1 << (set.bytes[i] & 0x1F);
32039|    123|        bitset[index] |= mask;
32040|    123|    }
32041|       |    /* Check set */
32042|    107|    for (int32_t i = 0; i < str.len; i++) {
  ------------------
  |  Branch (32042:25): [True: 95, False: 12]
  ------------------
32043|     95|        int index = str.bytes[i] >> 5;
32044|     95|        uint32_t mask = (uint32_t) 1 << (str.bytes[i] & 0x1F);
32045|     95|        if (!(bitset[index] & mask)) {
  ------------------
  |  Branch (32045:13): [True: 10, False: 85]
  ------------------
32046|     10|            return janet_wrap_false();
  ------------------
  |  |  833|     10|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|     10|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     10|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     10|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32047|     10|        }
32048|     95|    }
32049|     12|    return janet_wrap_true();
  ------------------
  |  |  832|     12|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32050|     22|}
cfun_string_join:
32055|    523|              "a separator string `sep`.") {
32056|    523|    janet_arity(argc, 1, 2);
32057|    523|    JanetView parts = janet_getindexed(argv, 0);
32058|    523|    JanetByteView joiner;
32059|    523|    if (argc == 2) {
  ------------------
  |  Branch (32059:9): [True: 50, False: 473]
  ------------------
32060|     50|        joiner = janet_getbytes(argv, 1);
32061|    473|    } else {
32062|    473|        joiner.bytes = NULL;
32063|    473|        joiner.len = 0;
32064|    473|    }
32065|       |    /* Check args */
32066|    523|    int32_t i;
32067|    523|    int64_t finallen = 0;
32068|  6.43k|    for (i = 0; i < parts.len; i++) {
  ------------------
  |  Branch (32068:17): [True: 5.91k, False: 522]
  ------------------
32069|  5.91k|        const uint8_t *chunk;
32070|  5.91k|        int32_t chunklen = 0;
32071|  5.91k|        if (!janet_bytes_view(parts.items[i], &chunk, &chunklen)) {
  ------------------
  |  Branch (32071:13): [True: 1, False: 5.91k]
  ------------------
32072|      1|            janet_panicf("item %d of parts is not a byte sequence, got %v", i, parts.items[i]);
32073|      1|        }
32074|  5.91k|        if (i) finallen += joiner.len;
  ------------------
  |  Branch (32074:13): [True: 5.42k, False: 488]
  ------------------
32075|  5.91k|        finallen += chunklen;
32076|  5.91k|        if (finallen > INT32_MAX)
  ------------------
  |  Branch (32076:13): [True: 0, False: 5.91k]
  ------------------
32077|      0|            janet_panic("result string too long");
32078|  5.91k|    }
32079|    522|    uint8_t *buf, *out;
32080|    522|    out = buf = janet_string_begin((int32_t) finallen);
32081|  6.42k|    for (i = 0; i < parts.len; i++) {
  ------------------
  |  Branch (32081:17): [True: 5.90k, False: 522]
  ------------------
32082|  5.90k|        const uint8_t *chunk = NULL;
32083|  5.90k|        int32_t chunklen = 0;
32084|  5.90k|        if (i) {
  ------------------
  |  Branch (32084:13): [True: 5.41k, False: 487]
  ------------------
32085|  5.41k|            safe_memcpy(out, joiner.bytes, joiner.len);
32086|  5.41k|            out += joiner.len;
32087|  5.41k|        }
32088|  5.90k|        janet_bytes_view(parts.items[i], &chunk, &chunklen);
32089|  5.90k|        safe_memcpy(out, chunk, chunklen);
32090|  5.90k|        out += chunklen;
32091|  5.90k|    }
32092|    522|    return janet_wrap_string(janet_string_end(buf));
  ------------------
  |  |  848|    522|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|    522|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    522|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    522|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32093|    523|}
cfun_string_format:
32123|    164|              "- `n`, `N`: pretty format on one line without truncation.\n") {
32124|    164|    janet_arity(argc, 1, -1);
32125|    164|    JanetBuffer *buffer = janet_buffer(0);
32126|    164|    const char *strfrmt = (const char *) janet_getstring(argv, 0);
32127|    164|    janet_buffer_format(buffer, strfrmt, 0, argc, argv);
32128|    164|    return janet_stringv(buffer->data, buffer->count);
  ------------------
  |  | 1826|    164|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|    164|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|    164|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    164|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    164|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32129|    164|}
cfun_string_trim:
32166|     56|              "`set` is provided, consider only characters in `set` to be whitespace.") {
32167|     56|    JanetByteView str, set;
32168|     56|    trim_help_args(argc, argv, &str, &set);
32169|     56|    int32_t left_edge = trim_help_leftedge(str, set);
32170|     56|    int32_t right_edge = trim_help_rightedge(str, set);
32171|     56|    if (right_edge < left_edge)
  ------------------
  |  Branch (32171:9): [True: 1, False: 55]
  ------------------
32172|      1|        return janet_stringv(NULL, 0);
  ------------------
  |  | 1826|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32173|     55|    return janet_stringv(str.bytes + left_edge, right_edge - left_edge);
  ------------------
  |  | 1826|     55|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|     55|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|     55|    janet_nanbox_from_cpointer((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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32174|     56|}
cfun_string_triml:
32179|     35|              "`set` is provided, consider only characters in `set` to be whitespace.") {
32180|     35|    JanetByteView str, set;
32181|     35|    trim_help_args(argc, argv, &str, &set);
32182|     35|    int32_t left_edge = trim_help_leftedge(str, set);
32183|     35|    return janet_stringv(str.bytes + left_edge, str.len - left_edge);
  ------------------
  |  | 1826|     35|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|     35|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|     35|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     35|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     35|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32184|     35|}
cfun_string_trimr:
32189|     53|              "`set` is provided, consider only characters in `set` to be whitespace.") {
32190|     53|    JanetByteView str, set;
32191|     53|    trim_help_args(argc, argv, &str, &set);
32192|     53|    int32_t right_edge = trim_help_rightedge(str, set);
32193|     53|    return janet_stringv(str.bytes, right_edge);
  ------------------
  |  | 1826|     53|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|     53|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|     53|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     53|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     53|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32194|     53|}
janet_lib_string:
32197|  7.16k|void janet_lib_string(JanetTable *env) {
32198|  7.16k|    JanetRegExt string_cfuns[] = {
32199|  7.16k|        JANET_CORE_REG("string/slice", cfun_string_slice),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32200|  7.16k|        JANET_CORE_REG("keyword/slice", cfun_keyword_slice),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32201|  7.16k|        JANET_CORE_REG("symbol/slice", cfun_symbol_slice),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32202|  7.16k|        JANET_CORE_REG("string/repeat", cfun_string_repeat),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32203|  7.16k|        JANET_CORE_REG("string/bytes", cfun_string_bytes),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32204|  7.16k|        JANET_CORE_REG("string/from-bytes", cfun_string_frombytes),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32205|  7.16k|        JANET_CORE_REG("string/ascii-lower", cfun_string_asciilower),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32206|  7.16k|        JANET_CORE_REG("string/ascii-upper", cfun_string_asciiupper),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32207|  7.16k|        JANET_CORE_REG("string/reverse", cfun_string_reverse),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32208|  7.16k|        JANET_CORE_REG("string/find", cfun_string_find),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32209|  7.16k|        JANET_CORE_REG("string/find-all", cfun_string_findall),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32210|  7.16k|        JANET_CORE_REG("string/has-prefix?", cfun_string_hasprefix),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32211|  7.16k|        JANET_CORE_REG("string/has-suffix?", cfun_string_hassuffix),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32212|  7.16k|        JANET_CORE_REG("string/replace", cfun_string_replace),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32213|  7.16k|        JANET_CORE_REG("string/replace-all", cfun_string_replaceall),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32214|  7.16k|        JANET_CORE_REG("string/split", cfun_string_split),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32215|  7.16k|        JANET_CORE_REG("string/check-set", cfun_string_checkset),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32216|  7.16k|        JANET_CORE_REG("string/join", cfun_string_join),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32217|  7.16k|        JANET_CORE_REG("string/format", cfun_string_format),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32218|  7.16k|        JANET_CORE_REG("string/trim", cfun_string_trim),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32219|  7.16k|        JANET_CORE_REG("string/triml", cfun_string_triml),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32220|  7.16k|        JANET_CORE_REG("string/trimr", cfun_string_trimr),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32221|  7.16k|        JANET_REG_END
  ------------------
  |  | 2109|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
32222|  7.16k|    };
32223|       |    janet_core_cfuns_ext(env, NULL, string_cfuns);
32224|  7.16k|}
janet_scan_number_base:
32485|   522k|    double *out) {
32486|   522k|    const uint8_t *end = str + len;
32487|   522k|    int seenadigit = 0;
32488|   522k|    int ex = 0;
32489|   522k|    int seenpoint = 0;
32490|   522k|    int foundexp = 0;
32491|   522k|    int neg = 0;
32492|   522k|    struct BigNat mant;
32493|   522k|    bignat_zero(&mant);
32494|       |
32495|       |    /* Prevent some kinds of overflow bugs relating to the exponent
32496|       |     * overflowing.  For example, if a string was passed 2GB worth of 0s after
32497|       |     * the decimal point, exponent could wrap around and become positive. It's
32498|       |     * easier to reject ridiculously large inputs than to check for overflows.
32499|       |     * */
32500|   522k|    if (len > JANET_NUMBER_LENGTH_RIDICULOUS) goto error;
  ------------------
  |  |32281|   522k|#define JANET_NUMBER_LENGTH_RIDICULOUS 0xFFFF
  ------------------
  |  Branch (32500:9): [True: 4, False: 522k]
  ------------------
32501|       |
32502|       |    /* Get sign */
32503|   522k|    if (str >= end) goto error;
  ------------------
  |  Branch (32503:9): [True: 1, False: 522k]
  ------------------
32504|   522k|    if (*str == '-') {
  ------------------
  |  Branch (32504:9): [True: 367k, False: 155k]
  ------------------
32505|   367k|        neg = 1;
32506|   367k|        str++;
32507|   367k|    } else if (*str == '+') {
  ------------------
  |  Branch (32507:16): [True: 98.7k, False: 56.3k]
  ------------------
32508|  98.7k|        str++;
32509|  98.7k|    }
32510|       |
32511|       |    /* Check for leading 0x or digit digit r */
32512|   522k|    if (base == 0) {
  ------------------
  |  Branch (32512:9): [True: 522k, False: 2]
  ------------------
32513|   522k|        if (str + 1 < end && str[0] == '0' && str[1] == 'x') {
  ------------------
  |  Branch (32513:13): [True: 35.5k, False: 486k]
  |  Branch (32513:30): [True: 9.65k, False: 25.8k]
  |  Branch (32513:47): [True: 87, False: 9.57k]
  ------------------
32514|     87|            base = 16;
32515|     87|            str += 2;
32516|   522k|        } else if (str + 1 < end  &&
  ------------------
  |  Branch (32516:20): [True: 35.4k, False: 486k]
  ------------------
32517|  35.4k|                   str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (32517:20): [True: 32.6k, False: 2.74k]
  |  Branch (32517:37): [True: 27.5k, False: 5.12k]
  ------------------
32518|  27.5k|                   str[1] == 'r') {
  ------------------
  |  Branch (32518:20): [True: 62, False: 27.4k]
  ------------------
32519|     62|            base = str[0] - '0';
32520|     62|            str += 2;
32521|   522k|        } else if (str + 2 < end  &&
  ------------------
  |  Branch (32521:20): [True: 24.4k, False: 497k]
  ------------------
32522|  24.4k|                   str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (32522:20): [True: 23.0k, False: 1.43k]
  |  Branch (32522:37): [True: 20.5k, False: 2.44k]
  ------------------
32523|  20.5k|                   str[1] >= '0' && str[1] <= '9' &&
  ------------------
  |  Branch (32523:20): [True: 19.6k, False: 893]
  |  Branch (32523:37): [True: 15.4k, False: 4.23k]
  ------------------
32524|  15.4k|                   str[2] == 'r') {
  ------------------
  |  Branch (32524:20): [True: 546, False: 14.8k]
  ------------------
32525|    546|            base = 10 * (str[0] - '0') + (str[1] - '0');
32526|    546|            if (base < 2 || base > 36) goto error;
  ------------------
  |  Branch (32526:17): [True: 0, False: 546]
  |  Branch (32526:29): [True: 472, False: 74]
  ------------------
32527|     74|            str += 3;
32528|     74|        }
32529|   522k|    }
32530|       |
32531|       |    /* If still base is 0, set to default (10) */
32532|   521k|    if (base == 0) {
  ------------------
  |  Branch (32532:9): [True: 521k, False: 224]
  ------------------
32533|   521k|        base = 10;
32534|   521k|    }
32535|   521k|    int exp_base = base;
32536|       |
32537|       |    /* Skip leading zeros */
32538|   548k|    while (str < end && (*str == '0' || *str == '.')) {
  ------------------
  |  Branch (32538:12): [True: 297k, False: 250k]
  |  Branch (32538:26): [True: 20.5k, False: 277k]
  |  Branch (32538:41): [True: 6.36k, False: 270k]
  ------------------
32539|  26.8k|        if (seenpoint) ex--;
  ------------------
  |  Branch (32539:13): [True: 1.18k, False: 25.6k]
  ------------------
32540|  26.8k|        if (*str == '.') {
  ------------------
  |  Branch (32540:13): [True: 6.36k, False: 20.5k]
  ------------------
32541|  6.36k|            if (seenpoint) goto error;
  ------------------
  |  Branch (32541:17): [True: 741, False: 5.62k]
  ------------------
32542|  5.62k|            seenpoint = 1;
32543|  20.5k|        } else {
32544|  20.5k|            seenadigit = 1;
32545|  20.5k|        }
32546|  26.1k|        str++;
32547|  26.1k|    }
32548|       |
32549|       |    /* Parse significant digits */
32550|   697k|    while (str < end) {
  ------------------
  |  Branch (32550:12): [True: 411k, False: 286k]
  ------------------
32551|   411k|        if (*str == '.') {
  ------------------
  |  Branch (32551:13): [True: 1.82k, False: 409k]
  ------------------
32552|  1.82k|            if (seenpoint) goto error;
  ------------------
  |  Branch (32552:17): [True: 31, False: 1.79k]
  ------------------
32553|  1.79k|            seenpoint = 1;
32554|   409k|        } else if (*str == '&') {
  ------------------
  |  Branch (32554:20): [True: 636, False: 408k]
  ------------------
32555|    636|            foundexp = 1;
32556|    636|            break;
32557|   408k|        } else if (base == 16 && (*str == 'P' || *str == 'p')) { /* IEEE hex float */
  ------------------
  |  Branch (32557:20): [True: 274, False: 408k]
  |  Branch (32557:35): [True: 11, False: 263]
  |  Branch (32557:50): [True: 5, False: 258]
  ------------------
32558|     16|            foundexp = 1;
32559|     16|            exp_base = 10;
32560|     16|            base = 2;
32561|     16|            ex *= 4; /* We need to correct the current exponent after we change the base */
32562|     16|            break;
32563|   408k|        } else if (base == 10 && (*str == 'E' || *str == 'e')) {
  ------------------
  |  Branch (32563:20): [True: 408k, False: 627]
  |  Branch (32563:35): [True: 346, False: 407k]
  |  Branch (32563:50): [True: 5.33k, False: 402k]
  ------------------
32564|  5.68k|            foundexp = 1;
32565|  5.68k|            break;
32566|   403k|        } else if (*str == '_') {
  ------------------
  |  Branch (32566:20): [True: 4.75k, False: 398k]
  ------------------
32567|  4.75k|            if (!seenadigit) goto error;
  ------------------
  |  Branch (32567:17): [True: 1.35k, False: 3.40k]
  ------------------
32568|   398k|        } else {
32569|   398k|            int digit = digit_lookup[*str & 0x7F];
32570|   398k|            if (*str > 127 || digit >= base) goto error;
  ------------------
  |  Branch (32570:17): [True: 126, False: 398k]
  |  Branch (32570:31): [True: 226k, False: 171k]
  ------------------
32571|   171k|            if (seenpoint) ex--;
  ------------------
  |  Branch (32571:17): [True: 21.0k, False: 150k]
  ------------------
32572|   171k|            bignat_muladd(&mant, base, digit);
32573|   171k|            seenadigit = 1;
32574|   171k|        }
32575|   176k|        str++;
32576|   176k|    }
32577|       |
32578|   292k|    if (!seenadigit)
  ------------------
  |  Branch (32578:9): [True: 241k, False: 51.0k]
  ------------------
32579|   241k|        goto error;
32580|       |
32581|       |    /* Read exponent */
32582|  51.0k|    if (str < end && foundexp) {
  ------------------
  |  Branch (32582:9): [True: 6.26k, False: 44.7k]
  |  Branch (32582:22): [True: 6.26k, False: 0]
  ------------------
32583|  6.26k|        int eneg = 0;
32584|  6.26k|        int32_t ee = 0;
32585|  6.26k|        seenadigit = 0;
32586|  6.26k|        str++;
32587|  6.26k|        if (str >= end) goto error;
  ------------------
  |  Branch (32587:13): [True: 338, False: 5.92k]
  ------------------
32588|  5.92k|        if (*str == '-') {
  ------------------
  |  Branch (32588:13): [True: 1.50k, False: 4.42k]
  ------------------
32589|  1.50k|            eneg = 1;
32590|  1.50k|            str++;
32591|  4.42k|        } else if (*str == '+') {
  ------------------
  |  Branch (32591:20): [True: 7, False: 4.41k]
  ------------------
32592|      7|            str++;
32593|      7|        }
32594|       |        /* Skip leading 0s in exponent */
32595|  16.9k|        while (str < end && *str == '0') {
  ------------------
  |  Branch (32595:16): [True: 13.6k, False: 3.23k]
  |  Branch (32595:29): [True: 11.0k, False: 2.68k]
  ------------------
32596|  11.0k|            str++;
32597|  11.0k|            seenadigit = 1;
32598|  11.0k|        }
32599|  15.5k|        while (str < end) {
  ------------------
  |  Branch (32599:16): [True: 10.2k, False: 5.29k]
  ------------------
32600|  10.2k|            int digit = digit_lookup[*str & 0x7F];
32601|  10.2k|            if (*str > 127 || digit >= exp_base) goto error;
  ------------------
  |  Branch (32601:17): [True: 118, False: 10.1k]
  |  Branch (32601:31): [True: 514, False: 9.66k]
  ------------------
32602|  9.66k|            if (ee < (INT32_MAX / 40)) {
  ------------------
  |  Branch (32602:17): [True: 8.77k, False: 894]
  ------------------
32603|  8.77k|                ee = exp_base * ee + digit;
32604|  8.77k|            }
32605|  9.66k|            str++;
32606|  9.66k|            seenadigit = 1;
32607|  9.66k|        }
32608|  5.29k|        if (eneg) ex -= ee;
  ------------------
  |  Branch (32608:13): [True: 1.33k, False: 3.95k]
  ------------------
32609|  3.95k|        else ex += ee;
32610|  5.29k|    }
32611|       |
32612|  50.0k|    if (!seenadigit)
  ------------------
  |  Branch (32612:9): [True: 121, False: 49.9k]
  ------------------
32613|    121|        goto error;
32614|       |
32615|  49.9k|    *out = convert(neg, &mant, base, ex);
32616|  49.9k|    janet_free(mant.digits);
  ------------------
  |  | 2415|  49.9k|#define janet_free(X) free((X))
  ------------------
32617|  49.9k|    return 0;
32618|       |
32619|   472k|error:
32620|   472k|    janet_free(mant.digits);
  ------------------
  |  | 2415|   472k|#define janet_free(X) free((X))
  ------------------
32621|   472k|    return 1;
32622|  50.0k|}
janet_scan_int64:
32695|  4.17k|int janet_scan_int64(const uint8_t *str, int32_t len, int64_t *out) {
32696|  4.17k|    int neg;
32697|  4.17k|    uint64_t bi;
32698|  4.17k|    if (scan_uint64(str, len, &bi, &neg)) {
  ------------------
  |  Branch (32698:9): [True: 2.48k, False: 1.68k]
  ------------------
32699|  2.48k|        if (neg && bi <= ((UINT64_MAX / 2) + 1)) {
  ------------------
  |  Branch (32699:13): [True: 78, False: 2.41k]
  |  Branch (32699:20): [True: 78, False: 0]
  ------------------
32700|     78|            if (bi > INT64_MAX) {
  ------------------
  |  Branch (32700:17): [True: 0, False: 78]
  ------------------
32701|      0|                *out = INT64_MIN;
32702|     78|            } else {
32703|     78|                *out = -((int64_t) bi);
32704|     78|            }
32705|     78|            return 1;
32706|     78|        }
32707|  2.41k|        if (!neg && bi <= INT64_MAX) {
  ------------------
  |  Branch (32707:13): [True: 2.41k, False: 0]
  |  Branch (32707:21): [True: 2.40k, False: 4]
  ------------------
32708|  2.40k|            *out = (int64_t) bi;
32709|  2.40k|            return 1;
32710|  2.40k|        }
32711|  2.41k|    }
32712|  1.68k|    return 0;
32713|  4.17k|}
janet_scan_uint64:
32715|  2.56k|int janet_scan_uint64(const uint8_t *str, int32_t len, uint64_t *out) {
32716|  2.56k|    int neg;
32717|  2.56k|    uint64_t bi;
32718|  2.56k|    if (scan_uint64(str, len, &bi, &neg)) {
  ------------------
  |  Branch (32718:9): [True: 2.44k, False: 121]
  ------------------
32719|  2.44k|        if (!neg) {
  ------------------
  |  Branch (32719:13): [True: 2.43k, False: 5]
  ------------------
32720|  2.43k|            *out = bi;
32721|  2.43k|            return 1;
32722|  2.43k|        }
32723|  2.44k|    }
32724|    126|    return 0;
32725|  2.56k|}
janet_scan_numeric:
32732|   521k|    Janet *out) {
32733|   521k|    int result;
32734|   521k|    double num;
32735|   521k|    int64_t i64 = 0;
32736|   521k|    uint64_t u64 = 0;
32737|   521k|    if (len < 2 || str[len - 2] != ':') {
  ------------------
  |  Branch (32737:9): [True: 265k, False: 256k]
  |  Branch (32737:20): [True: 247k, False: 8.45k]
  ------------------
32738|   513k|        result = janet_scan_number_base(str, len, 0, &num);
32739|   513k|        *out = janet_wrap_number(num);
  ------------------
  |  |  835|   513k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
32740|   513k|        return result;
32741|   513k|    }
32742|  8.45k|    switch (str[len - 1]) {
32743|    648|        default:
  ------------------
  |  Branch (32743:9): [True: 648, False: 7.80k]
  ------------------
32744|    648|            return 1;
32745|  1.10k|        case 'n':
  ------------------
  |  Branch (32745:9): [True: 1.10k, False: 7.35k]
  ------------------
32746|  1.10k|            result = janet_scan_number_base(str, len - 2, 0, &num);
32747|  1.10k|            *out = janet_wrap_number(num);
  ------------------
  |  |  835|  1.10k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
32748|  1.10k|            return result;
32749|       |        /* Condition is inverted janet_scan_int64 and janet_scan_uint64 */
32750|  4.15k|        case 's':
  ------------------
  |  Branch (32750:9): [True: 4.15k, False: 4.29k]
  ------------------
32751|  4.15k|            result = !janet_scan_int64(str, len - 2, &i64);
32752|  4.15k|            *out = janet_wrap_s64(i64);
32753|  4.15k|            return result;
32754|  2.54k|        case 'u':
  ------------------
  |  Branch (32754:9): [True: 2.54k, False: 5.90k]
  ------------------
32755|  2.54k|            result = !janet_scan_uint64(str, len - 2, &u64);
32756|  2.54k|            *out = janet_wrap_u64(u64);
32757|  2.54k|            return result;
32758|  8.45k|    }
32759|  8.45k|}
janet_buffer_dtostr:
32763|    895|void janet_buffer_dtostr(JanetBuffer *buffer, double x) {
32764|    895|#define BUFSIZE 32
32765|    895|    janet_buffer_extra(buffer, BUFSIZE);
  ------------------
  |  |32764|    895|#define BUFSIZE 32
  ------------------
32766|    895|    int count = snprintf((char *) buffer->data + buffer->count, BUFSIZE, "%.17g", x);
  ------------------
  |  |32764|    895|#define BUFSIZE 32
  ------------------
32767|    895|#undef BUFSIZE
32768|       |    /* fix locale issues with commas */
32769|  4.18k|    for (int i = 0; i < count; i++) {
  ------------------
  |  Branch (32769:21): [True: 3.28k, False: 895]
  ------------------
32770|  3.28k|        char c = buffer->data[buffer->count + i];
32771|  3.28k|        if (c == ',') {
  ------------------
  |  Branch (32771:13): [True: 0, False: 3.28k]
  ------------------
32772|      0|            buffer->data[buffer->count + i] = '.';
32773|      0|        }
32774|  3.28k|    }
32775|    895|    buffer->count += count;
32776|    895|}
janet_struct_begin:
32813|  10.0M|JanetKV *janet_struct_begin(int32_t count) {
32814|       |    /* Calculate capacity as power of 2 after 2 * count. */
32815|  10.0M|    int32_t capacity = janet_tablen(2 * count);
32816|  10.0M|    if (capacity < 0) capacity = janet_tablen(count + 1);
  ------------------
  |  Branch (32816:9): [True: 0, False: 10.0M]
  ------------------
32817|       |
32818|  10.0M|    size_t size = sizeof(JanetStructHead) + (size_t) capacity * sizeof(JanetKV);
32819|  10.0M|    JanetStructHead *head = janet_gcalloc(JANET_MEMORY_STRUCT, size);
32820|  10.0M|    head->length = count;
32821|  10.0M|    head->capacity = capacity;
32822|  10.0M|    head->hash = 0;
32823|  10.0M|    head->proto = NULL;
32824|       |
32825|  10.0M|    JanetKV *st = (JanetKV *)(head->data);
32826|  10.0M|    janet_memempty(st, capacity);
32827|  10.0M|    return st;
32828|  10.0M|}
janet_struct_find:
32832|  20.8M|const JanetKV *janet_struct_find(const JanetKV *st, Janet key) {
32833|  20.8M|    int32_t cap = janet_struct_capacity(st);
  ------------------
  |  | 1848|  20.8M|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1845|  20.8M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
32834|  20.8M|    int32_t index = janet_maphash(cap, janet_hash(key));
  ------------------
  |  |  396|  20.8M|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
32835|  20.8M|    int32_t i;
32836|  21.5M|    for (i = index; i < cap; i++)
  ------------------
  |  Branch (32836:21): [True: 21.5M, False: 9.97k]
  ------------------
32837|  21.5M|        if (janet_checktype(st[i].key, JANET_NIL) || janet_equals(st[i].key, key))
  ------------------
  |  |  806|  43.1M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 15.4M, False: 6.15M]
  |  |  |  Branch (806:6): [Folded, False: 21.5M]
  |  |  ------------------
  |  |  807|  43.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|  43.1M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  21.5M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  21.5M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  21.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  21.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (32837:54): [True: 5.38M, False: 761k]
  ------------------
32838|  20.8M|            return st + i;
32839|  14.1k|    for (i = 0; i < index; i++)
  ------------------
  |  Branch (32839:17): [True: 14.1k, False: 0]
  ------------------
32840|  14.1k|        if (janet_checktype(st[i].key, JANET_NIL) || janet_equals(st[i].key, key))
  ------------------
  |  |  806|  28.3k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1.08k, False: 13.0k]
  |  |  |  Branch (806:6): [Folded, False: 14.1k]
  |  |  ------------------
  |  |  807|  28.3k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  28.3k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  14.1k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  14.1k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  14.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  14.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (32840:54): [True: 8.88k, False: 4.18k]
  ------------------
32841|  9.97k|            return st + i;
32842|      0|    return NULL;
32843|  9.97k|}
janet_struct_put_ext:
32853|   108M|void janet_struct_put_ext(JanetKV *st, Janet key, Janet value, int replace) {
32854|   108M|    int32_t cap = janet_struct_capacity(st);
  ------------------
  |  | 1848|   108M|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1845|   108M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
32855|   108M|    int32_t hash = janet_hash(key);
32856|   108M|    int32_t index = janet_maphash(cap, hash);
  ------------------
  |  |  396|   108M|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
32857|   108M|    int32_t i, j, dist;
32858|   108M|    int32_t bounds[4] = {index, cap, 0, index};
32859|   108M|    if (janet_checktype(key, JANET_NIL) || janet_checktype(value, JANET_NIL)) return;
  ------------------
  |  |  806|   216M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1.24k, False: 108M]
  |  |  |  Branch (806:6): [Folded, False: 108M]
  |  |  ------------------
  |  |  807|   216M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   216M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   108M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   108M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   108M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   108M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (janet_checktype(key, JANET_NIL) || janet_checktype(value, JANET_NIL)) return;
  ------------------
  |  |  806|   108M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 204k, False: 107M]
  |  |  |  Branch (806:6): [Folded, False: 108M]
  |  |  ------------------
  |  |  807|   108M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   108M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   108M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   108M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   108M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   108M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32860|   107M|    if (janet_checktype(key, JANET_NUMBER) && isnan(janet_unwrap_number(key))) return;
  ------------------
  |  |  806|   215M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 9.79k, False: 107M]
  |  |  |  Branch (806:6): [True: 107M, Folded]
  |  |  ------------------
  |  |  807|   215M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|   107M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 9.79k, False: 107M]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 107M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   215M|        : 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 (32860:47): [True: 0, False: 9.79k]
  ------------------
32861|       |    /* Avoid extra items */
32862|   107M|    if (janet_struct_hash(st) == janet_struct_length(st)) return;
  ------------------
  |  | 1849|   107M|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1845|   107M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                  if (janet_struct_hash(st) == janet_struct_length(st)) return;
  ------------------
  |  | 1847|   107M|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1845|   107M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (32862:9): [True: 0, False: 107M]
  ------------------
32863|   107M|    for (dist = 0, j = 0; j < 4; j += 2)
  ------------------
  |  Branch (32863:27): [True: 107M, False: 18.4E]
  ------------------
32864|   117M|        for (i = bounds[j]; i < bounds[j + 1]; i++, dist++) {
  ------------------
  |  Branch (32864:29): [True: 117M, False: 4.96k]
  ------------------
32865|   117M|            int status;
32866|   117M|            int32_t otherhash;
32867|   117M|            int32_t otherindex, otherdist;
32868|   117M|            JanetKV *kv = st + i;
32869|       |            /* We found an empty slot, so just add key and value */
32870|   117M|            if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|   117M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 107M, False: 10.0M]
  |  |  |  Branch (806:6): [Folded, False: 117M]
  |  |  ------------------
  |  |  807|   117M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   117M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   117M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   117M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   117M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   117M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32871|   107M|                kv->key = key;
32872|   107M|                kv->value = value;
32873|       |                /* Update the temporary count */
32874|   107M|                janet_struct_hash(st)++;
  ------------------
  |  | 1849|   107M|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1845|   107M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
32875|   107M|                return;
32876|   107M|            }
32877|       |            /* Robinhood hashing - check if colliding kv pair
32878|       |             * is closer to their source than current. We use robinhood
32879|       |             * hashing to ensure that equivalent structs that are constructed
32880|       |             * with different order have the same internal layout, and therefor
32881|       |             * will compare properly - i.e., {1 2 3 4} should equal {3 4 1 2}.
32882|       |             * Collisions are resolved via an insertion sort insertion. */
32883|  10.0M|            otherhash = janet_hash(kv->key);
32884|  10.0M|            otherindex = janet_maphash(cap, otherhash);
  ------------------
  |  |  396|  10.0M|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
32885|  10.0M|            otherdist = (i + cap - otherindex) & (cap - 1);
32886|  10.0M|            if (dist < otherdist)
  ------------------
  |  Branch (32886:17): [True: 79.1k, False: 9.98M]
  ------------------
32887|  79.1k|                status = -1;
32888|  9.98M|            else if (otherdist < dist)
  ------------------
  |  Branch (32888:22): [True: 2.92k, False: 9.98M]
  ------------------
32889|  2.92k|                status = 1;
32890|  9.98M|            else if (hash < otherhash)
  ------------------
  |  Branch (32890:22): [True: 9.86M, False: 122k]
  ------------------
32891|  9.86M|                status = -1;
32892|   122k|            else if (otherhash < hash)
  ------------------
  |  Branch (32892:22): [True: 108k, False: 13.4k]
  ------------------
32893|   108k|                status = 1;
32894|  13.4k|            else
32895|  13.4k|                status = janet_compare(key, kv->key);
32896|       |            /* If other is closer to their ideal slot */
32897|  10.0M|            if (status == 1) {
  ------------------
  |  Branch (32897:17): [True: 111k, False: 9.95M]
  ------------------
32898|       |                /* Swap current kv pair with pair in slot */
32899|   111k|                JanetKV temp = *kv;
32900|   111k|                kv->key = key;
32901|   111k|                kv->value = value;
32902|   111k|                key = temp.key;
32903|   111k|                value = temp.value;
32904|       |                /* Save dist and hash of new kv pair */
32905|   111k|                dist = otherdist;
32906|   111k|                hash = otherhash;
32907|  9.95M|            } else if (status == 0) {
  ------------------
  |  Branch (32907:24): [True: 13.3k, False: 9.94M]
  ------------------
32908|  13.3k|                if (replace) {
  ------------------
  |  Branch (32908:21): [True: 13.3k, False: 0]
  ------------------
32909|       |                    /* A key was added to the struct more than once - replace old value */
32910|  13.3k|                    kv->value = value;
32911|  13.3k|                }
32912|  13.3k|                return;
32913|  13.3k|            }
32914|  10.0M|        }
32915|   107M|}
janet_struct_put:
32917|   108M|void janet_struct_put(JanetKV *st, Janet key, Janet value) {
32918|   108M|    janet_struct_put_ext(st, key, value, 1);
32919|   108M|}
janet_struct_end:
32922|  9.93M|const JanetKV *janet_struct_end(JanetKV *st) {
32923|  9.93M|    if (janet_struct_hash(st) != janet_struct_length(st)) {
  ------------------
  |  | 1849|  9.93M|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1845|  9.93M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                  if (janet_struct_hash(st) != janet_struct_length(st)) {
  ------------------
  |  | 1847|  9.93M|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1845|  9.93M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (32923:9): [True: 104k, False: 9.82M]
  ------------------
32924|       |        /* Error building struct, probably duplicate values. We need to rebuild
32925|       |         * the struct using only the values that went in. The second creation should always
32926|       |         * succeed. */
32927|   104k|        JanetKV *newst = janet_struct_begin(janet_struct_hash(st));
  ------------------
  |  | 1849|   104k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1845|   104k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
32928|  1.82M|        for (int32_t i = 0; i < janet_struct_capacity(st); i++) {
  ------------------
  |  | 1848|  1.82M|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1845|  1.82M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (32928:29): [True: 1.71M, False: 104k]
  ------------------
32929|  1.71M|            JanetKV *kv = st + i;
32930|  1.71M|            if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  1.71M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 1.71M]
  |  |  ------------------
  |  |  807|  1.71M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.71M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.71M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.71M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (32930:17): [True: 418k, False: 1.29M]
  ------------------
32931|   418k|                janet_struct_put(newst, kv->key, kv->value);
32932|   418k|            }
32933|  1.71M|        }
32934|   104k|        janet_struct_proto(newst) = janet_struct_proto(st);
  ------------------
  |  | 1850|   104k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1845|   104k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                      janet_struct_proto(newst) = janet_struct_proto(st);
  ------------------
  |  | 1850|   104k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1845|   104k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
32935|   104k|        st = newst;
32936|   104k|    }
32937|  9.93M|    janet_struct_hash(st) = janet_kv_calchash(st, janet_struct_capacity(st));
  ------------------
  |  | 1849|  9.93M|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1845|  9.93M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                  janet_struct_hash(st) = janet_kv_calchash(st, janet_struct_capacity(st));
  ------------------
  |  | 1848|  9.93M|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1845|  9.93M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
32938|  9.93M|    if (janet_struct_proto(st)) {
  ------------------
  |  | 1850|  9.93M|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1845|  9.93M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1850:31): [True: 3, False: 9.93M]
  |  |  ------------------
  ------------------
32939|      3|        janet_struct_hash(st) += 2654435761u * janet_struct_hash(janet_struct_proto(st));
  ------------------
  |  | 1849|      3|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1845|      3|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                      janet_struct_hash(st) += 2654435761u * janet_struct_hash(janet_struct_proto(st));
  ------------------
  |  | 1849|      3|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1845|      3|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
32940|      3|    }
32941|  9.93M|    return (const JanetKV *)st;
32942|  9.93M|}
janet_struct_rawget:
32945|  60.4k|Janet janet_struct_rawget(const JanetKV *st, Janet key) {
32946|  60.4k|    const JanetKV *kv = janet_struct_find(st, key);
32947|  60.4k|    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 (32947:12): [True: 60.4k, False: 0]
  ------------------
32948|  60.4k|}
janet_struct_get:
32951|  20.7M|Janet janet_struct_get(const JanetKV *st, Janet key) {
32952|  36.1M|    for (int i = JANET_MAX_PROTO_DEPTH; st && i; --i, st = janet_struct_proto(st)) {
  ------------------
  |  |  299|  20.7M|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
                  for (int i = JANET_MAX_PROTO_DEPTH; st && i; --i, st = janet_struct_proto(st)) {
  ------------------
  |  | 1850|  15.4M|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1845|  15.4M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (32952:41): [True: 20.7M, False: 15.4M]
  |  Branch (32952:47): [True: 20.7M, False: 0]
  ------------------
32953|  20.7M|        const JanetKV *kv = janet_struct_find(st, key);
32954|  20.7M|        if (NULL != kv && !janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  20.7M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 20.7M]
  |  |  ------------------
  |  |  807|  20.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|  20.7M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  20.7M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  20.7M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.7M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.7M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (32954:13): [True: 20.7M, False: 0]
  |  Branch (32954:27): [True: 5.35M, False: 15.4M]
  ------------------
32955|  5.35M|            return kv->value;
32956|  5.35M|        }
32957|  20.7M|    }
32958|  15.4M|    return janet_wrap_nil();
  ------------------
  |  |  831|  15.4M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  15.4M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  15.4M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  15.4M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32959|  20.7M|}
cfun_struct_getproto:
33006|      2|              "Return the prototype of a struct, or nil if it doesn't have one.") {
33007|      2|    janet_fixarity(argc, 1);
33008|      2|    JanetStruct st = janet_getstruct(argv, 0);
33009|      2|    return janet_struct_proto(st)
  ------------------
  |  | 1850|      2|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1845|      2|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1850:31): [True: 0, False: 2]
  |  |  ------------------
  ------------------
33010|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33011|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33012|      2|}
cfun_struct_to_table:
33050|      1|              "table's prototypes into the new struct's prototypes as well.") {
33051|      1|    janet_arity(argc, 1, 2);
33052|      1|    JanetStruct st = janet_getstruct(argv, 0);
33053|      1|    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 (33053:21): [True: 0, False: 1]
  ------------------
33054|      1|    JanetTable *tab = NULL;
33055|      1|    JanetStruct cursor = st;
33056|      1|    JanetTable *tab_cursor = tab;
33057|      1|    do {
33058|      1|        if (tab) {
  ------------------
  |  Branch (33058:13): [True: 0, False: 1]
  ------------------
33059|      0|            tab_cursor->proto = janet_table(janet_struct_length(cursor));
  ------------------
  |  | 1847|      0|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1845|      0|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
33060|      0|            tab_cursor = tab_cursor->proto;
33061|      1|        } else {
33062|      1|            tab = janet_table(janet_struct_length(cursor));
  ------------------
  |  | 1847|      1|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1845|      1|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
33063|      1|            tab_cursor = tab;
33064|      1|        }
33065|       |        /* TODO - implement as memcpy since struct memory should be compatible
33066|       |         * with table memory */
33067|      1|        for (int32_t i = 0; i < janet_struct_capacity(cursor); i++) {
  ------------------
  |  | 1848|      1|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1845|      1|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (33067:29): [True: 0, False: 1]
  ------------------
33068|      0|            const JanetKV *kv = cursor + i;
33069|      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 (33069:17): [True: 0, False: 0]
  ------------------
33070|      0|                janet_table_put(tab_cursor, kv->key, kv->value);
33071|      0|            }
33072|      0|        }
33073|      1|        cursor = janet_struct_proto(cursor);
  ------------------
  |  | 1850|      1|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1845|      1|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
33074|      1|    } while (recursive && cursor);
  ------------------
  |  Branch (33074:14): [True: 0, False: 1]
  |  Branch (33074:27): [True: 0, False: 0]
  ------------------
33075|      1|    return janet_wrap_table(tab);
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33076|      1|}
cfun_struct_rawget:
33082|  60.4k|              "nil without checking the prototype. Returns the value in the struct.") {
33083|  60.4k|    janet_fixarity(argc, 2);
33084|  60.4k|    JanetStruct st = janet_getstruct(argv, 0);
33085|  60.4k|    return janet_struct_rawget(st, argv[1]);
33086|  60.4k|}
janet_lib_struct:
33089|  7.16k|void janet_lib_struct(JanetTable *env) {
33090|  7.16k|    JanetRegExt struct_cfuns[] = {
33091|  7.16k|        JANET_CORE_REG("struct/with-proto", cfun_struct_with_proto),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33092|  7.16k|        JANET_CORE_REG("struct/getproto", cfun_struct_getproto),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33093|  7.16k|        JANET_CORE_REG("struct/proto-flatten", cfun_struct_flatten),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33094|  7.16k|        JANET_CORE_REG("struct/to-table", cfun_struct_to_table),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33095|  7.16k|        JANET_CORE_REG("struct/rawget", cfun_struct_rawget),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33096|  7.16k|        JANET_REG_END
  ------------------
  |  | 2109|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
33097|  7.16k|    };
33098|       |    janet_core_cfuns_ext(env, NULL, struct_cfuns);
33099|  7.16k|}
janet_symcache_init:
33144|  7.64k|void janet_symcache_init() {
33145|  7.64k|    janet_vm.cache_capacity = 1024;
33146|  7.64k|    janet_vm.cache = janet_calloc(1, (size_t) janet_vm.cache_capacity * sizeof(const uint8_t *));
  ------------------
  |  | 2412|  7.64k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
33147|  7.64k|    if (NULL == janet_vm.cache) {
  ------------------
  |  Branch (33147:9): [True: 0, False: 7.64k]
  ------------------
33148|      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]
  |  |  ------------------
  ------------------
33149|      0|    }
33150|  7.64k|    memset(&janet_vm.gensym_counter, '0', sizeof(janet_vm.gensym_counter));
33151|  7.64k|    janet_vm.gensym_counter[0] = '_';
33152|  7.64k|    janet_vm.cache_count = 0;
33153|  7.64k|    janet_vm.cache_deleted = 0;
33154|  7.64k|}
janet_symcache_deinit:
33157|  7.64k|void janet_symcache_deinit() {
33158|  7.64k|    janet_free((void *)janet_vm.cache);
  ------------------
  |  | 2415|  7.64k|#define janet_free(X) free((X))
  ------------------
33159|       |    janet_vm.cache = NULL;
33160|  7.64k|    janet_vm.cache_capacity = 0;
33161|  7.64k|    janet_vm.cache_count = 0;
33162|  7.64k|    janet_vm.cache_deleted = 0;
33163|  7.64k|}
janet_symbol_deinit:
33265|  16.8M|void janet_symbol_deinit(const uint8_t *sym) {
33266|  16.8M|    int status = 0;
33267|  16.8M|    const uint8_t **bucket = janet_symcache_find(sym, &status);
  ------------------
  |  |33220|  16.8M|    janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1812|  16.8M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1811|  16.8M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1813|  16.8M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1811|  16.8M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33268|  16.8M|    if (status) {
  ------------------
  |  Branch (33268:9): [True: 16.8M, False: 1.06k]
  ------------------
33269|  16.8M|        janet_vm.cache_count--;
33270|  16.8M|        janet_vm.cache_deleted++;
33271|  16.8M|        *bucket = JANET_SYMCACHE_DELETED;
33272|  16.8M|    }
33273|  16.8M|}
janet_symbol:
33276|   154M|const uint8_t *janet_symbol(const uint8_t *str, int32_t len) {
33277|   154M|    int32_t hash = janet_string_calchash(str, len);
33278|   154M|    uint8_t *newstr;
33279|   154M|    int success = 0;
33280|   154M|    const uint8_t **bucket = janet_symcache_findmem(str, len, hash, &success);
33281|   154M|    if (success)
  ------------------
  |  Branch (33281:9): [True: 138M, False: 16.1M]
  ------------------
33282|   138M|        return *bucket;
33283|  16.1M|    JanetStringHead *head = janet_gcalloc(JANET_MEMORY_SYMBOL, sizeof(JanetStringHead) + (size_t) len + 1);
33284|  16.1M|    head->hash = hash;
33285|  16.1M|    head->length = len;
33286|  16.1M|    newstr = (uint8_t *)(head->data);
33287|  16.1M|    safe_memcpy(newstr, str, len);
33288|  16.1M|    newstr[len] = 0;
33289|  16.1M|    janet_symcache_put((const uint8_t *)newstr, bucket);
33290|  16.1M|    return newstr;
33291|   154M|}
janet_csymbol:
33294|   133M|const uint8_t *janet_csymbol(const char *cstr) {
33295|   133M|    return janet_symbol((const uint8_t *)cstr, (int32_t) strlen(cstr));
33296|   133M|}
janet_symbol_gen:
33319|   706k|const uint8_t *janet_symbol_gen(void) {
33320|   706k|    const uint8_t **bucket = NULL;
33321|   706k|    uint8_t *sym;
33322|   706k|    int32_t hash = 0;
33323|   706k|    int status;
33324|       |    /* Leave spaces for 6 base 64 digits and two dashes. That means 64^6 possible suffixes, which
33325|       |     * is enough for resolving collisions. */
33326|  2.20M|    do {
33327|  2.20M|        hash = janet_string_calchash(
33328|  2.20M|                   janet_vm.gensym_counter,
33329|  2.20M|                   sizeof(janet_vm.gensym_counter) - 1);
33330|  2.20M|        bucket = janet_symcache_findmem(
33331|  2.20M|                     janet_vm.gensym_counter,
33332|  2.20M|                     sizeof(janet_vm.gensym_counter) - 1,
33333|  2.20M|                     hash,
33334|  2.20M|                     &status);
33335|  2.20M|    } while (status && (inc_gensym(), 1));
  ------------------
  |  Branch (33335:14): [True: 1.50M, False: 706k]
  |  Branch (33335:24): [True: 1.50M, False: 0]
  ------------------
33336|   706k|    JanetStringHead *head = janet_gcalloc(JANET_MEMORY_SYMBOL, sizeof(JanetStringHead) + sizeof(janet_vm.gensym_counter));
33337|   706k|    head->length = sizeof(janet_vm.gensym_counter) - 1;
33338|   706k|    head->hash = hash;
33339|   706k|    sym = (uint8_t *)(head->data);
33340|   706k|    memcpy(sym, janet_vm.gensym_counter, sizeof(janet_vm.gensym_counter));
33341|   706k|    sym[head->length] = 0;
33342|   706k|    janet_symcache_put((const uint8_t *)sym, bucket);
33343|   706k|    return (const uint8_t *)sym;
33344|   706k|}
janet_table_init:
33420|  18.5k|JanetTable *janet_table_init(JanetTable *table, int32_t capacity) {
33421|  18.5k|    return janet_table_init_impl(table, capacity, 1);
33422|  18.5k|}
janet_table_init_raw:
33425|  22.9k|JanetTable *janet_table_init_raw(JanetTable *table, int32_t capacity) {
33426|  22.9k|    return janet_table_init_impl(table, capacity, 0);
33427|  22.9k|}
janet_table_deinit:
33430|  41.5k|void janet_table_deinit(JanetTable *table) {
33431|  41.5k|    if (table->gc.flags & JANET_TABLE_FLAG_STACK) {
  ------------------
  |  |33380|  41.5k|#define JANET_TABLE_FLAG_STACK 0x10000
  ------------------
  |  Branch (33431:9): [True: 18.5k, False: 22.9k]
  ------------------
33432|  18.5k|        janet_sfree(table->data);
33433|  22.9k|    } else {
33434|  22.9k|        janet_free(table->data);
  ------------------
  |  | 2415|  22.9k|#define janet_free(X) free((X))
  ------------------
33435|  22.9k|    }
33436|  41.5k|}
janet_table:
33440|  5.74M|JanetTable *janet_table(int32_t capacity) {
33441|  5.74M|    JanetTable *table = janet_gcalloc(JANET_MEMORY_TABLE, sizeof(JanetTable));
33442|  5.74M|    return janet_table_init_impl(table, capacity, 0);
33443|  5.74M|}
janet_table_weakk:
33445|      5|JanetTable *janet_table_weakk(int32_t capacity) {
33446|      5|    JanetTable *table = janet_gcalloc(JANET_MEMORY_TABLE_WEAKK, sizeof(JanetTable));
33447|      5|    return janet_table_init_impl(table, capacity, 0);
33448|      5|}
janet_table_weakv:
33450|     19|JanetTable *janet_table_weakv(int32_t capacity) {
33451|     19|    JanetTable *table = janet_gcalloc(JANET_MEMORY_TABLE_WEAKV, sizeof(JanetTable));
33452|     19|    return janet_table_init_impl(table, capacity, 0);
33453|     19|}
janet_table_weakkv:
33455|      9|JanetTable *janet_table_weakkv(int32_t capacity) {
33456|      9|    JanetTable *table = janet_gcalloc(JANET_MEMORY_TABLE_WEAKKV, sizeof(JanetTable));
33457|      9|    return janet_table_init_impl(table, capacity, 0);
33458|      9|}
janet_table_find:
33462|   122M|JanetKV *janet_table_find(JanetTable *t, Janet key) {
33463|   122M|    return (JanetKV *) janet_dict_find(t->data, t->capacity, key);
33464|   122M|}
janet_table_get:
33498|  16.5M|Janet janet_table_get(JanetTable *t, Janet key) {
33499|  24.9M|    for (int i = JANET_MAX_PROTO_DEPTH; t && i; t = t->proto, --i) {
  ------------------
  |  |  299|  16.5M|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
  |  Branch (33499:41): [True: 16.9M, False: 7.93M]
  |  Branch (33499:46): [True: 16.9M, False: 58]
  ------------------
33500|  16.9M|        JanetKV *bucket = janet_table_find(t, key);
33501|  16.9M|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL))
  ------------------
  |  |  806|  16.9M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 16.9M]
  |  |  ------------------
  |  |  807|  16.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|  16.9M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  16.9M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  16.9M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  16.9M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  16.9M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33501:13): [True: 16.9M, False: 26]
  |  Branch (33501:31): [True: 8.63M, False: 8.34M]
  ------------------
33502|  8.63M|            return bucket->value;
33503|  16.9M|    }
33504|  7.93M|    return janet_wrap_nil();
  ------------------
  |  |  831|  7.93M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  7.93M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.93M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.93M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33505|  16.5M|}
janet_table_get_keyword:
33508|  1.91M|Janet janet_table_get_keyword(JanetTable *t, const char *keyword) {
33509|  1.91M|    int32_t keyword_len = (int32_t) strlen(keyword);
33510|  2.95M|    for (int i = JANET_MAX_PROTO_DEPTH; t && i; t = t->proto, --i) {
  ------------------
  |  |  299|  1.91M|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
  |  Branch (33510:41): [True: 1.91M, False: 1.04M]
  |  Branch (33510:46): [True: 1.91M, False: 0]
  ------------------
33511|  1.91M|        JanetKV *bucket = (JanetKV *) janet_dict_find_keyword(t->data, t->capacity, (const uint8_t *) keyword, keyword_len);
33512|  1.91M|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL))
  ------------------
  |  |  806|  1.91M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 1.91M]
  |  |  ------------------
  |  |  807|  1.91M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  1.91M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.91M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.91M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.91M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.91M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33512:13): [True: 1.91M, False: 0]
  |  Branch (33512:31): [True: 872k, False: 1.04M]
  ------------------
33513|   872k|            return bucket->value;
33514|  1.91M|    }
33515|  1.04M|    return janet_wrap_nil();
  ------------------
  |  |  831|  1.04M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.04M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33516|  1.91M|}
janet_table_get_ex:
33519|    119|Janet janet_table_get_ex(JanetTable *t, Janet key, JanetTable **which) {
33520|    238|    for (int i = JANET_MAX_PROTO_DEPTH; t && i; t = t->proto, --i) {
  ------------------
  |  |  299|    119|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
  |  Branch (33520:41): [True: 119, False: 119]
  |  Branch (33520:46): [True: 119, False: 0]
  ------------------
33521|    119|        JanetKV *bucket = janet_table_find(t, key);
33522|    119|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
  ------------------
  |  |  806|    119|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 119]
  |  |  ------------------
  |  |  807|    119|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    119|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    119|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    119|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    119|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    119|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33522:13): [True: 119, False: 0]
  |  Branch (33522:31): [True: 0, False: 119]
  ------------------
33523|      0|            *which = t;
33524|      0|            return bucket->value;
33525|      0|        }
33526|    119|    }
33527|    119|    return janet_wrap_nil();
  ------------------
  |  |  831|    119|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    119|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    119|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    119|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33528|    119|}
janet_table_rawget:
33531|  13.7k|Janet janet_table_rawget(JanetTable *t, Janet key) {
33532|  13.7k|    JanetKV *bucket = janet_table_find(t, key);
33533|  13.7k|    if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL))
  ------------------
  |  |  806|  13.7k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 13.7k]
  |  |  ------------------
  |  |  807|  13.7k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  13.7k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  13.7k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  13.7k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  13.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  13.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33533:9): [True: 13.7k, False: 0]
  |  Branch (33533:27): [True: 9.00k, False: 4.75k]
  ------------------
33534|  9.00k|        return bucket->value;
33535|  4.75k|    else
33536|  4.75k|        return janet_wrap_nil();
  ------------------
  |  |  831|  4.75k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  4.75k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.75k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.75k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33537|  13.7k|}
janet_table_remove:
33541|  1.04M|Janet janet_table_remove(JanetTable *t, Janet key) {
33542|  1.04M|    JanetKV *bucket = janet_table_find(t, key);
33543|  1.04M|    if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
  ------------------
  |  |  806|  1.04M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 1.04M]
  |  |  ------------------
  |  |  807|  1.04M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  1.04M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.04M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.04M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.04M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.04M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33543:9): [True: 1.04M, False: 0]
  |  Branch (33543:27): [True: 415k, False: 625k]
  ------------------
33544|   415k|        Janet ret = bucket->value;
33545|   415k|        t->count--;
33546|   415k|        t->deleted++;
33547|   415k|        bucket->key = janet_wrap_nil();
  ------------------
  |  |  831|   415k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   415k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   415k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   415k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33548|   415k|        bucket->value = janet_wrap_false();
  ------------------
  |  |  833|   415k|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|   415k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   415k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   415k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33549|   415k|        return ret;
33550|   625k|    } else {
33551|   625k|        return janet_wrap_nil();
  ------------------
  |  |  831|   625k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   625k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   625k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   625k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33552|   625k|    }
33553|  1.04M|}
janet_table_put:
33556|  38.5M|void janet_table_put(JanetTable *t, Janet key, Janet value) {
33557|  38.5M|    if (janet_checktype(key, JANET_NIL)) return;
  ------------------
  |  |  806|  38.5M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1, False: 38.5M]
  |  |  |  Branch (806:6): [Folded, False: 38.5M]
  |  |  ------------------
  |  |  807|  38.5M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  38.5M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  38.5M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  38.5M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  38.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  38.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33558|  38.5M|    if (janet_checktype(key, JANET_NUMBER) && isnan(janet_unwrap_number(key))) return;
  ------------------
  |  |  806|  77.1M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 10.7k, False: 38.5M]
  |  |  |  Branch (806:6): [True: 38.5M, Folded]
  |  |  ------------------
  |  |  807|  77.1M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|  38.5M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 10.2k, False: 38.5M]
  |  |  |  |  |  Branch (803:28): [True: 210, False: 38.5M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  77.1M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    970|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    970|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    970|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    970|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33558:47): [True: 330, False: 10.3k]
  ------------------
33559|  38.5M|    if (janet_checktype(value, JANET_NIL)) {
  ------------------
  |  |  806|  38.5M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 396k, False: 38.1M]
  |  |  |  Branch (806:6): [Folded, False: 38.5M]
  |  |  ------------------
  |  |  807|  38.5M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  38.5M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  38.5M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  38.5M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  38.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  38.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33560|   396k|        janet_table_remove(t, key);
33561|  38.1M|    } else {
33562|  38.1M|        JanetKV *bucket = janet_table_find(t, key);
33563|  38.1M|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
  ------------------
  |  |  806|  38.1M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 38.1M]
  |  |  ------------------
  |  |  807|  38.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|  38.1M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  38.1M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  38.1M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  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 (33563:13): [True: 38.1M, False: 387]
  |  Branch (33563:31): [True: 426k, False: 37.7M]
  ------------------
33564|   426k|            bucket->value = value;
33565|  37.7M|        } else {
33566|  37.7M|            if (NULL == bucket || 2 * (t->count + t->deleted + 1) > t->capacity) {
  ------------------
  |  Branch (33566:17): [True: 200, False: 37.7M]
  |  Branch (33566:35): [True: 4.55M, False: 33.1M]
  ------------------
33567|  4.56M|                janet_table_rehash(t, janet_tablen(2 * t->count + 2));
33568|  4.56M|            }
33569|  37.7M|            bucket = janet_table_find(t, key);
33570|  37.7M|            if (janet_checktype(bucket->value, JANET_BOOLEAN))
  ------------------
  |  |  806|  37.7M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 37.7M]
  |  |  |  Branch (806:6): [Folded, False: 37.7M]
  |  |  ------------------
  |  |  807|  37.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|  37.7M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  37.7M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  37.7M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  37.7M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  37.7M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33571|      0|                --t->deleted;
33572|  37.7M|            bucket->key = key;
33573|  37.7M|            bucket->value = value;
33574|  37.7M|            ++t->count;
33575|  37.7M|        }
33576|  38.1M|    }
33577|  38.5M|}
janet_table_clear:
33597|     16|void janet_table_clear(JanetTable *t) {
33598|     16|    int32_t capacity = t->capacity;
33599|     16|    JanetKV *data = t->data;
33600|     16|    janet_memempty(data, capacity);
33601|     16|    t->count = 0;
33602|     16|    t->deleted = 0;
33603|     16|}
janet_table_clone:
33606|  3.43k|JanetTable *janet_table_clone(JanetTable *table) {
33607|  3.43k|    JanetTable *newTable = janet_gcalloc(JANET_MEMORY_TABLE, sizeof(JanetTable));
33608|  3.43k|    newTable->count = table->count;
33609|  3.43k|    newTable->capacity = table->capacity;
33610|  3.43k|    newTable->deleted = table->deleted;
33611|  3.43k|    newTable->proto = table->proto;
33612|  3.43k|    newTable->data = array_allocate(sizeof(JanetKV), newTable->capacity);
33613|  3.43k|    if (NULL == newTable->data) {
  ------------------
  |  Branch (33613:9): [True: 0, False: 3.43k]
  ------------------
33614|      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]
  |  |  ------------------
  ------------------
33615|      0|    }
33616|  3.43k|    memcpy(newTable->data, table->data, (size_t) table->capacity * sizeof(JanetKV));
33617|  3.43k|    return newTable;
33618|  3.43k|}
janet_table_merge_struct:
33637|     27|void janet_table_merge_struct(JanetTable *table, const JanetKV *other) {
33638|       |    janet_table_mergekv(table, other, janet_struct_capacity(other));
  ------------------
  |  | 1848|     27|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1845|     27|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
33639|     27|}
janet_table_to_struct:
33642|  22.6k|const JanetKV *janet_table_to_struct(JanetTable *t) {
33643|  22.6k|    JanetKV *st = janet_struct_begin(t->count);
33644|  22.6k|    JanetKV *kv = t->data;
33645|  22.6k|    JanetKV *end = t->data + t->capacity;
33646|   333k|    while (kv < end) {
  ------------------
  |  Branch (33646:12): [True: 311k, False: 22.6k]
  ------------------
33647|   311k|        if (!janet_checktype(kv->key, JANET_NIL))
  ------------------
  |  |  806|   311k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 311k]
  |  |  ------------------
  |  |  807|   311k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   311k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   311k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   311k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   311k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   311k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33647:13): [True: 112k, False: 198k]
  ------------------
33648|   112k|            janet_struct_put(st, kv->key, kv->value);
33649|   311k|        kv++;
33650|   311k|    }
33651|  22.6k|    return janet_struct_end(st);
33652|  22.6k|}
cfun_table_new:
33677|      4|              "Returns the new table.") {
33678|      4|    janet_fixarity(argc, 1);
33679|      4|    int32_t cap = janet_getnat(argv, 0);
33680|      4|    return janet_wrap_table(janet_table(cap));
  ------------------
  |  |  846|      4|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33681|      4|}
cfun_table_weak:
33686|      7|              "Returns the new table.") {
33687|      7|    janet_fixarity(argc, 1);
33688|      7|    int32_t cap = janet_getnat(argv, 0);
33689|      7|    return janet_wrap_table(janet_table_weakkv(cap));
  ------------------
  |  |  846|      7|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33690|      7|}
cfun_table_weak_values:
33704|      1|              "Returns the new table.") {
33705|      1|    janet_fixarity(argc, 1);
33706|      1|    int32_t cap = janet_getnat(argv, 0);
33707|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33708|      1|}
cfun_table_getproto:
33713|     47|              "has no prototype, otherwise returns the prototype.") {
33714|     47|    janet_fixarity(argc, 1);
33715|     47|    JanetTable *t = janet_gettable(argv, 0);
33716|     47|    return t->proto
  ------------------
  |  Branch (33716:12): [True: 0, False: 47]
  ------------------
33717|     47|           ? 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33718|     47|           : janet_wrap_nil();
  ------------------
  |  |  831|     47|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     47|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     47|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     47|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33719|     47|}
cfun_table_setproto:
33723|   102k|              "Set the prototype of a table. Returns the original table `tab`.") {
33724|   102k|    janet_fixarity(argc, 2);
33725|   102k|    JanetTable *table = janet_gettable(argv, 0);
33726|   102k|    JanetTable *proto = NULL;
33727|   102k|    if (!janet_checktype(argv[1], JANET_NIL)) {
  ------------------
  |  |  806|   102k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 102k]
  |  |  ------------------
  |  |  807|   102k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   102k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   102k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   102k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   102k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   102k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33727:9): [True: 102k, False: 2]
  ------------------
33728|   102k|        proto = janet_gettable(argv, 1);
33729|   102k|    }
33730|   102k|    table->proto = proto;
33731|   102k|    return argv[0];
33732|   102k|}
cfun_table_tostruct:
33740|  22.6k|              "prototype.") {
33741|  22.6k|    janet_arity(argc, 1, 2);
33742|  22.6k|    JanetTable *t = janet_gettable(argv, 0);
33743|  22.6k|    JanetStruct proto = janet_optstruct(argv, argc, 1, NULL);
33744|  22.6k|    JanetStruct st = janet_table_to_struct(t);
33745|  22.6k|    janet_struct_proto(st) = proto;
  ------------------
  |  | 1850|  22.6k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1845|  22.6k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
33746|  22.6k|    return janet_wrap_struct(st);
  ------------------
  |  |  842|  22.6k|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|  22.6k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  22.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  22.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33747|  22.6k|}
cfun_table_rawget:
33753|  12.2k|              "nil without checking the prototype. Returns the value in the table.") {
33754|  12.2k|    janet_fixarity(argc, 2);
33755|  12.2k|    JanetTable *table = janet_gettable(argv, 0);
33756|  12.2k|    return janet_table_rawget(table, argv[1]);
33757|  12.2k|}
cfun_table_clear:
33770|     16|              "Remove all key-value pairs in a table and return the modified table `tab`.") {
33771|     16|    janet_fixarity(argc, 1);
33772|     16|    JanetTable *table = janet_gettable(argv, 0);
33773|     16|    janet_table_clear(table);
33774|     16|    return janet_wrap_table(table);
  ------------------
  |  |  846|     16|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|     16|    janet_nanbox_from_pointer((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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33775|     16|}
janet_lib_table:
33786|  7.16k|void janet_lib_table(JanetTable *env) {
33787|  7.16k|    JanetRegExt table_cfuns[] = {
33788|  7.16k|        JANET_CORE_REG("table/new", cfun_table_new),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33789|  7.16k|        JANET_CORE_REG("table/weak", cfun_table_weak),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33790|  7.16k|        JANET_CORE_REG("table/weak-keys", cfun_table_weak_keys),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33791|  7.16k|        JANET_CORE_REG("table/weak-values", cfun_table_weak_values),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33792|  7.16k|        JANET_CORE_REG("table/to-struct", cfun_table_tostruct),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33793|  7.16k|        JANET_CORE_REG("table/getproto", cfun_table_getproto),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33794|  7.16k|        JANET_CORE_REG("table/setproto", cfun_table_setproto),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33795|  7.16k|        JANET_CORE_REG("table/rawget", cfun_table_rawget),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33796|  7.16k|        JANET_CORE_REG("table/clone", cfun_table_clone),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33797|  7.16k|        JANET_CORE_REG("table/clear", cfun_table_clear),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33798|  7.16k|        JANET_CORE_REG("table/proto-flatten", cfun_table_proto_flatten),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33799|  7.16k|        JANET_REG_END
  ------------------
  |  | 2109|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
33800|  7.16k|    };
33801|       |    janet_core_cfuns_ext(env, NULL, table_cfuns);
33802|  7.16k|}
janet_tuple_begin:
33841|  59.4M|Janet *janet_tuple_begin(int32_t length) {
33842|  59.4M|    size_t size = sizeof(JanetTupleHead) + ((size_t) length * sizeof(Janet));
33843|  59.4M|    JanetTupleHead *head = janet_gcalloc(JANET_MEMORY_TUPLE, size);
33844|  59.4M|    head->sm_line = -1;
33845|  59.4M|    head->sm_column = -1;
33846|  59.4M|    head->length = length;
33847|  59.4M|    return (Janet *)(head->data);
33848|  59.4M|}
janet_tuple_end:
33851|  59.4M|const Janet *janet_tuple_end(Janet *tuple) {
33852|  59.4M|    janet_tuple_hash(tuple) = janet_array_calchash(tuple, janet_tuple_length(tuple));
  ------------------
  |  | 1802|  59.4M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1799|  59.4M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                  janet_tuple_hash(tuple) = janet_array_calchash(tuple, janet_tuple_length(tuple));
  ------------------
  |  | 1801|  59.4M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|  59.4M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
33853|  59.4M|    return (const Janet *)tuple;
33854|  59.4M|}
janet_tuple_n:
33857|  49.1M|const Janet *janet_tuple_n(const Janet *values, int32_t n) {
33858|  49.1M|    Janet *t = janet_tuple_begin(n);
33859|  49.1M|    safe_memcpy(t, values, sizeof(Janet) * n);
33860|  49.1M|    return janet_tuple_end(t);
33861|  49.1M|}
cfun_tuple_brackets:
33867|  4.38M|              "Creates a new bracketed tuple containing the elements xs.") {
33868|  4.38M|    const Janet *tup = janet_tuple_n(argv, argc);
33869|  4.38M|    janet_tuple_flag(tup) |= JANET_TUPLE_FLAG_BRACKETCTOR;
  ------------------
  |  | 1805|  4.38M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1799|  4.38M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                  janet_tuple_flag(tup) |= JANET_TUPLE_FLAG_BRACKETCTOR;
  ------------------
  |  | 1797|  4.38M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
33870|  4.38M|    return janet_wrap_tuple(tup);
  ------------------
  |  |  843|  4.38M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  4.38M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.38M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.38M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33871|  4.38M|}
cfun_tuple_slice:
33881|  16.4M|              "negative slice range. Returns the new tuple.") {
33882|  16.4M|    JanetView view = janet_getindexed(argv, 0);
33883|  16.4M|    JanetRange range = janet_getslice(argc, argv);
33884|  16.4M|    return janet_wrap_tuple(janet_tuple_n(view.items + range.start, range.end - range.start));
  ------------------
  |  |  843|  16.4M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  16.4M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  16.4M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  16.4M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33885|  16.4M|}
cfun_tuple_type:
33893|  20.8M|              "the compiler.") {
33894|  20.8M|    janet_fixarity(argc, 1);
33895|  20.8M|    const Janet *tup = janet_gettuple(argv, 0);
33896|  20.8M|    if (janet_tuple_flag(tup) & JANET_TUPLE_FLAG_BRACKETCTOR) {
  ------------------
  |  | 1805|  20.8M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1799|  20.8M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                  if (janet_tuple_flag(tup) & JANET_TUPLE_FLAG_BRACKETCTOR) {
  ------------------
  |  | 1797|  20.8M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (33896:9): [True: 4.38M, False: 16.4M]
  ------------------
33897|  4.38M|        return janet_ckeywordv("brackets");
  ------------------
  |  | 1842|  4.38M|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  4.38M|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  4.38M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  4.38M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  4.38M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33898|  16.4M|    } else {
33899|  16.4M|        return janet_ckeywordv("parens");
  ------------------
  |  | 1842|  16.4M|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  16.4M|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  16.4M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  16.4M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  16.4M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33900|  16.4M|    }
33901|  20.8M|}
cfun_tuple_sourcemap:
33906|  9.27M|              "which is another tuple (line, column).") {
33907|  9.27M|    janet_fixarity(argc, 1);
33908|  9.27M|    const Janet *tup = janet_gettuple(argv, 0);
33909|  9.27M|    Janet contents[2];
33910|  9.27M|    contents[0] = janet_wrap_integer(janet_tuple_head(tup)->sm_line);
  ------------------
  |  |  967|  9.27M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  9.27M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
33911|  9.27M|    contents[1] = janet_wrap_integer(janet_tuple_head(tup)->sm_column);
  ------------------
  |  |  967|  9.27M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  9.27M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
33912|  9.27M|    return janet_wrap_tuple(janet_tuple_n(contents, 2));
  ------------------
  |  |  843|  9.27M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  9.27M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  9.27M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  9.27M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33913|  9.27M|}
cfun_tuple_setmap:
33918|  9.27M|              "should be integers.") {
33919|  9.27M|    janet_fixarity(argc, 3);
33920|  9.27M|    const Janet *tup = janet_gettuple(argv, 0);
33921|  9.27M|    janet_tuple_head(tup)->sm_line = janet_getinteger(argv, 1);
  ------------------
  |  | 1799|  9.27M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
33922|       |    janet_tuple_head(tup)->sm_column = janet_getinteger(argv, 2);
  ------------------
  |  | 1799|  9.27M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
33923|  9.27M|    return argv[0];
33924|  9.27M|}
cfun_tuple_join:
33928|      8|              "Create a tuple by joining together other tuples and arrays.") {
33929|      8|    janet_arity(argc, 0, -1);
33930|      8|    int32_t total_len = 0;
33931|      8|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (33931:25): [True: 1, False: 7]
  ------------------
33932|      1|        int32_t len = 0;
33933|      1|        const Janet *vals = NULL;
33934|      1|        if (!janet_indexed_view(argv[i], &vals, &len)) {
  ------------------
  |  Branch (33934:13): [True: 1, False: 0]
  ------------------
33935|      1|            janet_panicf("expected indexed type for argument %d, got %v", i, argv[i]);
33936|      1|        }
33937|      0|        if (INT32_MAX - total_len < len) {
  ------------------
  |  Branch (33937:13): [True: 0, False: 0]
  ------------------
33938|      0|            janet_panic("tuple too large");
33939|      0|        }
33940|      0|        total_len += len;
33941|      0|    }
33942|      7|    Janet *tup = janet_tuple_begin(total_len);
33943|      7|    Janet *tup_cursor = tup;
33944|      7|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (33944:25): [True: 0, False: 7]
  ------------------
33945|      0|        int32_t len = 0;
33946|      0|        const Janet *vals = NULL;
33947|      0|        janet_indexed_view(argv[i], &vals, &len);
33948|      0|        memcpy(tup_cursor, vals, len * sizeof(Janet));
33949|      0|        tup_cursor += len;
33950|      0|    }
33951|      7|    return janet_wrap_tuple(janet_tuple_end(tup));
  ------------------
  |  |  843|      7|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33952|      8|}
janet_lib_tuple:
33955|  7.16k|void janet_lib_tuple(JanetTable *env) {
33956|  7.16k|    JanetRegExt tuple_cfuns[] = {
33957|  7.16k|        JANET_CORE_REG("tuple/brackets", cfun_tuple_brackets),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33958|  7.16k|        JANET_CORE_REG("tuple/slice", cfun_tuple_slice),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33959|  7.16k|        JANET_CORE_REG("tuple/type", cfun_tuple_type),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33960|  7.16k|        JANET_CORE_REG("tuple/sourcemap", cfun_tuple_sourcemap),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33961|  7.16k|        JANET_CORE_REG("tuple/setmap", cfun_tuple_setmap),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33962|  7.16k|        JANET_CORE_REG("tuple/join", cfun_tuple_join),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33963|  7.16k|        JANET_REG_END
  ------------------
  |  | 2109|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
33964|  7.16k|    };
33965|       |    janet_core_cfuns_ext(env, NULL, tuple_cfuns);
33966|  7.16k|}
janet_hash_mix:
34092|   923M|uint32_t janet_hash_mix(uint32_t input, uint32_t more) {
34093|   923M|    uint32_t mix1 = (more + 0x9e3779b9 + (input << 6) + (input >> 2));
34094|   923M|    return input ^ (0x9e3779b9 + (mix1 << 6) + (mix1 >> 2));
34095|   923M|}
janet_string_calchash:
34099|   170M|int32_t janet_string_calchash(const uint8_t *str, int32_t len) {
34100|   170M|    if (NULL == str || len == 0) return 5381;
  ------------------
  |  Branch (34100:9): [True: 105k, False: 169M]
  |  Branch (34100:24): [True: 68.6k, False: 169M]
  ------------------
34101|   169M|    const uint8_t *end = str + len;
34102|   169M|    uint32_t hash = 5381;
34103|  2.26G|    while (str < end)
  ------------------
  |  Branch (34103:12): [True: 2.09G, False: 169M]
  ------------------
34104|  2.09G|        hash = (hash << 5) + hash + *str++;
34105|   169M|    hash = janet_hash_mix(hash, (uint32_t) len);
34106|   169M|    return (int32_t) hash;
34107|   170M|}
janet_array_calchash:
34222|  59.4M|int32_t janet_array_calchash(const Janet *array, int32_t len) {
34223|  59.4M|    const Janet *end = array + len;
34224|  59.4M|    uint32_t hash = 33;
34225|   186M|    while (array < end) {
  ------------------
  |  Branch (34225:12): [True: 127M, False: 59.4M]
  ------------------
34226|   127M|        hash = janet_hash_mix(hash, janet_hash(*array++));
34227|   127M|    }
34228|  59.4M|    return (int32_t) hash;
34229|  59.4M|}
janet_kv_calchash:
34232|  9.93M|int32_t janet_kv_calchash(const JanetKV *kvs, int32_t len) {
34233|  9.93M|    const JanetKV *end = kvs + len;
34234|  9.93M|    uint32_t hash = 33;
34235|   322M|    while (kvs < end) {
  ------------------
  |  Branch (34235:12): [True: 312M, False: 9.93M]
  ------------------
34236|   312M|        hash = janet_hash_mix(hash, janet_hash(kvs->key));
34237|   312M|        hash = janet_hash_mix(hash, janet_hash(kvs->value));
34238|   312M|        kvs++;
34239|   312M|    }
34240|  9.93M|    return (int32_t) hash;
34241|  9.93M|}
janet_tablen:
34245|  20.3M|int32_t janet_tablen(int32_t n) {
34246|  20.3M|    if (n < 0) return 0;
  ------------------
  |  Branch (34246:9): [True: 0, False: 20.3M]
  ------------------
34247|  20.3M|    n |= n >> 1;
34248|  20.3M|    n |= n >> 2;
34249|  20.3M|    n |= n >> 4;
34250|  20.3M|    n |= n >> 8;
34251|  20.3M|    n |= n >> 16;
34252|  20.3M|    return n == INT32_MAX ? INT32_MAX : n + 1;
  ------------------
  |  Branch (34252:12): [True: 0, False: 20.3M]
  ------------------
34253|  20.3M|}
safe_memcpy:
34256|   121M|void safe_memcpy(void *dest, const void *src, size_t len) {
34257|   121M|    if (!len) return;
  ------------------
  |  Branch (34257:9): [True: 33.1M, False: 88.6M]
  ------------------
34258|  88.6M|    memcpy(dest, src, len);
34259|  88.6M|}
janet_dict_find:
34263|   122M|const JanetKV *janet_dict_find(const JanetKV *buckets, int32_t cap, Janet key) {
34264|   122M|    int32_t index = janet_maphash(cap, janet_hash(key));
  ------------------
  |  |  396|   122M|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
34265|   122M|    int32_t i;
34266|   122M|    const JanetKV *first_bucket = NULL;
34267|       |    /* Higher half */
34268|   306M|    for (i = index; i < cap; i++) {
  ------------------
  |  Branch (34268:21): [True: 306M, False: 499k]
  ------------------
34269|   306M|        const JanetKV *kv = buckets + i;
34270|   306M|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|   306M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 206M, False: 99.6M]
  |  |  |  Branch (806:6): [Folded, False: 306M]
  |  |  ------------------
  |  |  807|   306M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   306M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   306M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   306M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   306M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   306M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34271|   206M|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|   206M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 112M, False: 94.5M]
  |  |  |  Branch (806:6): [Folded, False: 206M]
  |  |  ------------------
  |  |  807|   206M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   206M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   206M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   206M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   206M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   206M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34272|   112M|                return kv;
34273|   112M|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (34273:24): [True: 1.40M, False: 93.1M]
  ------------------
34274|  1.40M|                first_bucket = kv;
34275|  1.40M|            }
34276|   206M|        } else if (janet_equals(kv->key, key)) {
  ------------------
  |  Branch (34276:20): [True: 9.83M, False: 89.8M]
  ------------------
34277|  9.83M|            return buckets + i;
34278|  9.83M|        }
34279|   306M|    }
34280|       |    /* Lower half */
34281|   553k|    for (i = 0; i < index; i++) {
  ------------------
  |  Branch (34281:17): [True: 553k, False: 18.4E]
  ------------------
34282|   553k|        const JanetKV *kv = buckets + i;
34283|   553k|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|   553k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 509k, False: 44.0k]
  |  |  |  Branch (806:6): [Folded, False: 553k]
  |  |  ------------------
  |  |  807|   553k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   553k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   553k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   553k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   553k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   553k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34284|   509k|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|   509k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 505k, False: 4.27k]
  |  |  |  Branch (806:6): [Folded, False: 509k]
  |  |  ------------------
  |  |  807|   509k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   509k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   509k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   509k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   509k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   509k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34285|   505k|                return kv;
34286|   505k|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (34286:24): [True: 882, False: 3.39k]
  ------------------
34287|    882|                first_bucket = kv;
34288|    882|            }
34289|   509k|        } else if (janet_equals(kv->key, key)) {
  ------------------
  |  Branch (34289:20): [True: 7.23k, False: 36.8k]
  ------------------
34290|  7.23k|            return buckets + i;
34291|  7.23k|        }
34292|   553k|    }
34293|  18.4E|    return first_bucket;
34294|   499k|}
janet_dict_find_keyword:
34300|  1.91M|    const uint8_t *cstr, int32_t cstr_len) {
34301|  1.91M|    int32_t hash = janet_string_calchash(cstr, cstr_len);
34302|  1.91M|    int32_t index = janet_maphash(cap, hash);
  ------------------
  |  |  396|  1.91M|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
34303|  1.91M|    int32_t i;
34304|  1.91M|    const JanetKV *first_bucket = NULL;
34305|       |    /* Higher half */
34306|  3.35M|    for (i = index; i < cap; i++) {
  ------------------
  |  Branch (34306:21): [True: 2.95M, False: 396k]
  ------------------
34307|  2.95M|        const JanetKV *kv = buckets + i;
34308|  2.95M|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  2.95M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 646k, False: 2.31M]
  |  |  |  Branch (806:6): [Folded, False: 2.95M]
  |  |  ------------------
  |  |  807|  2.95M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.95M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.95M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.95M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34309|   646k|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|   646k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 646k, False: 493]
  |  |  |  Branch (806:6): [Folded, False: 646k]
  |  |  ------------------
  |  |  807|   646k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   646k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   646k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   646k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   646k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   646k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34310|   646k|                return kv;
34311|   646k|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (34311:24): [True: 145, False: 348]
  ------------------
34312|    145|                first_bucket = kv;
34313|    145|            }
34314|  2.31M|        } else if (janet_checktype(kv->key, JANET_KEYWORD)) {
  ------------------
  |  |  806|  2.31M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1.78M, False: 523k]
  |  |  |  Branch (806:6): [Folded, False: 2.31M]
  |  |  ------------------
  |  |  807|  2.31M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.31M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.31M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.31M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34315|       |            /* Works for symbol and keyword, too */
34316|  1.78M|            JanetString str = janet_unwrap_string(kv->key);
  ------------------
  |  |  863|  1.78M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
34317|  1.78M|            int32_t len = janet_string_length(str);
  ------------------
  |  | 1812|  1.78M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|  1.78M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
34318|  1.78M|            if (hash == janet_string_hash(str) && len == cstr_len && !memcmp(str, cstr, len)) {
  ------------------
  |  | 1813|  3.57M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1811|  1.78M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (34318:17): [True: 872k, False: 916k]
  |  Branch (34318:51): [True: 872k, False: 0]
  |  Branch (34318:70): [True: 872k, False: 0]
  ------------------
34319|   872k|                return buckets + i;
34320|   872k|            }
34321|  1.78M|        }
34322|  2.95M|    }
34323|       |    /* Lower half */
34324|   397k|    for (i = 0; i < index; i++) {
  ------------------
  |  Branch (34324:17): [True: 397k, False: 0]
  ------------------
34325|   397k|        const JanetKV *kv = buckets + i;
34326|   397k|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|   397k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 396k, False: 332]
  |  |  |  Branch (806:6): [Folded, False: 397k]
  |  |  ------------------
  |  |  807|   397k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   397k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   397k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   397k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   397k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   397k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34327|   396k|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  806|   396k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 396k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 396k]
  |  |  ------------------
  |  |  807|   396k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   396k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   396k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   396k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   396k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   396k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34328|   396k|                return kv;
34329|   396k|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (34329:24): [True: 0, False: 0]
  ------------------
34330|      0|                first_bucket = kv;
34331|      0|            }
34332|   396k|        } else if (janet_checktype(kv->key, JANET_KEYWORD)) {
  ------------------
  |  |  806|    332|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 332, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 332]
  |  |  ------------------
  |  |  807|    332|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    332|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    332|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    332|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    332|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    332|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34333|       |            /* Works for symbol and keyword, too */
34334|    332|            JanetString str = janet_unwrap_string(kv->key);
  ------------------
  |  |  863|    332|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
34335|    332|            int32_t len = janet_string_length(str);
  ------------------
  |  | 1812|    332|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|    332|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
34336|    332|            if (hash == janet_string_hash(str) && len == cstr_len && !memcmp(str, cstr, len)) {
  ------------------
  |  | 1813|    664|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1811|    332|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (34336:17): [True: 0, False: 332]
  |  Branch (34336:51): [True: 0, False: 0]
  |  Branch (34336:70): [True: 0, False: 0]
  ------------------
34337|      0|                return buckets + i;
34338|      0|            }
34339|    332|        }
34340|   397k|    }
34341|      0|    return first_bucket;
34342|   396k|}
janet_dictionary_next:
34354|  12.6k|const JanetKV *janet_dictionary_next(const JanetKV *kvs, int32_t cap, const JanetKV *kv) {
34355|  12.6k|    const JanetKV *end = kvs + cap;
34356|  12.6k|    kv = (kv == NULL) ? kvs : kv + 1;
  ------------------
  |  Branch (34356:10): [True: 10.8k, False: 1.82k]
  ------------------
34357|  26.5k|    while (kv < end) {
  ------------------
  |  Branch (34357:12): [True: 15.7k, False: 10.8k]
  ------------------
34358|  15.7k|        if (!janet_checktype(kv->key, JANET_NIL))
  ------------------
  |  |  806|  15.7k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 15.7k]
  |  |  ------------------
  |  |  807|  15.7k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  15.7k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  15.7k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  15.7k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (34358:13): [True: 1.82k, False: 13.9k]
  ------------------
34359|  1.82k|            return kv;
34360|  13.9k|        kv++;
34361|  13.9k|    }
34362|  10.8k|    return NULL;
34363|  12.6k|}
janet_cstrcmp:
34367|  11.5M|int janet_cstrcmp(const uint8_t *str, const char *other) {
34368|  11.5M|    int32_t len = janet_string_length(str);
  ------------------
  |  | 1812|  11.5M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|  11.5M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
34369|  11.5M|    int32_t index;
34370|  29.3M|    for (index = 0; index < len; index++) {
  ------------------
  |  Branch (34370:21): [True: 27.0M, False: 2.34M]
  ------------------
34371|  27.0M|        uint8_t c = str[index];
34372|  27.0M|        uint8_t k = ((const uint8_t *)other)[index];
34373|  27.0M|        if (c < k) return -1;
  ------------------
  |  Branch (34373:13): [True: 2.36M, False: 24.6M]
  ------------------
34374|  24.6M|        if (c > k) return 1;
  ------------------
  |  Branch (34374:13): [True: 6.86M, False: 17.8M]
  ------------------
34375|  17.8M|        if (k == '\0') break;
  ------------------
  |  Branch (34375:13): [True: 0, False: 17.8M]
  ------------------
34376|  17.8M|    }
34377|  2.34M|    return (other[index] == '\0') ? 0 : -1;
  ------------------
  |  Branch (34377:12): [True: 2.34M, False: 1.07k]
  ------------------
34378|  11.5M|}
janet_strbinsearch:
34387|   989k|    const uint8_t *key) {
34388|   989k|    size_t low = 0;
34389|   989k|    size_t hi = tabcount;
34390|   989k|    const char *t = (const char *)tab;
34391|  2.78M|    while (low < hi) {
  ------------------
  |  Branch (34391:12): [True: 2.62M, False: 158k]
  ------------------
34392|  2.62M|        size_t mid = low + ((hi - low) / 2);
34393|  2.62M|        const char **item = (const char **)(t + mid * itemsize);
34394|  2.62M|        const char *name = *item;
34395|  2.62M|        int comp = janet_cstrcmp(key, name);
34396|  2.62M|        if (comp < 0) {
  ------------------
  |  Branch (34396:13): [True: 1.15M, False: 1.47M]
  ------------------
34397|  1.15M|            hi = mid;
34398|  1.47M|        } else if (comp > 0) {
  ------------------
  |  Branch (34398:20): [True: 640k, False: 831k]
  ------------------
34399|   640k|            low = mid + 1;
34400|   831k|        } else {
34401|   831k|            return (const void *)item;
34402|   831k|        }
34403|  2.62M|    }
34404|   158k|    return NULL;
34405|   989k|}
janet_registry_put:
34467|  2.52M|    int32_t source_line) {
34468|  2.52M|    if (janet_vm.registry_count == janet_vm.registry_cap) {
  ------------------
  |  Branch (34468:9): [True: 7.16k, False: 2.51M]
  ------------------
34469|  7.16k|        size_t newcap = (janet_vm.registry_count + 1) * 2;
34470|       |        /* Size it nicely with core by default */
34471|  7.16k|        if (newcap < 512) {
  ------------------
  |  Branch (34471:13): [True: 7.16k, False: 0]
  ------------------
34472|  7.16k|            newcap = 512;
34473|  7.16k|        }
34474|  7.16k|        void *newmem = janet_realloc(janet_vm.registry, newcap * sizeof(JanetCFunRegistry));
  ------------------
  |  | 2409|  7.16k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
34475|  7.16k|        if (NULL == newmem) {
  ------------------
  |  Branch (34475:13): [True: 0, False: 7.16k]
  ------------------
34476|      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]
  |  |  ------------------
  ------------------
34477|      0|        }
34478|  7.16k|        janet_vm.registry = newmem;
34479|  7.16k|        janet_vm.registry_cap = newcap;
34480|  7.16k|    }
34481|  2.52M|    JanetCFunRegistry value = {
34482|  2.52M|        key,
34483|  2.52M|        name,
34484|  2.52M|        name_prefix,
34485|  2.52M|        source_file,
34486|  2.52M|        source_line
34487|  2.52M|    };
34488|  2.52M|    janet_vm.registry[janet_vm.registry_count++] = value;
34489|  2.52M|    janet_vm.registry_dirty = 1;
34490|  2.52M|}
janet_registry_get:
34492|  1.25k|JanetCFunRegistry *janet_registry_get(JanetCFunction key) {
34493|  1.25k|    if (janet_vm.registry_dirty) {
  ------------------
  |  Branch (34493:9): [True: 1.24k, False: 13]
  ------------------
34494|  1.24k|        janet_registry_sort();
34495|  1.24k|    }
34496|   260k|    for (size_t i = 0; i < janet_vm.registry_count; i++) {
  ------------------
  |  Branch (34496:24): [True: 260k, False: 37]
  ------------------
34497|   260k|        if (janet_vm.registry[i].cfun == key) {
  ------------------
  |  Branch (34497:13): [True: 1.22k, False: 259k]
  ------------------
34498|  1.22k|            return janet_vm.registry + i;
34499|  1.22k|        }
34500|   260k|    }
34501|     37|    JanetCFunRegistry *lo = janet_vm.registry;
34502|     37|    JanetCFunRegistry *hi = lo + janet_vm.registry_count;
34503|    333|    while (lo < hi) {
  ------------------
  |  Branch (34503:12): [True: 296, False: 37]
  ------------------
34504|    296|        JanetCFunRegistry *mid = lo + (hi - lo) / 2;
34505|    296|        if (mid->cfun == key) {
  ------------------
  |  Branch (34505:13): [True: 0, False: 296]
  ------------------
34506|      0|            return mid;
34507|      0|        }
34508|    296|        if ((void *)(mid->cfun) > (void *)(key)) {
  ------------------
  |  Branch (34508:13): [True: 0, False: 296]
  ------------------
34509|      0|            hi = mid;
34510|    296|        } else {
34511|    296|            lo = mid + 1;
34512|    296|        }
34513|    296|    }
34514|     37|    return NULL;
34515|     37|}
janet_register_abstract_type:
34616|  64.4k|void janet_register_abstract_type(const JanetAbstractType *at) {
34617|  64.4k|    janet_check_pointer_align((void *) at);
34618|  64.4k|    Janet sym = janet_csymbolv(at->name);
  ------------------
  |  | 1836|  64.4k|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  64.4k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  64.4k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  64.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  64.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34619|  64.4k|    Janet check = janet_table_get(janet_vm.abstract_registry, sym);
34620|  64.4k|    if (!janet_checktype(check, JANET_NIL) && at != janet_unwrap_pointer(check)) {
  ------------------
  |  |  806|   128k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 64.4k]
  |  |  ------------------
  |  |  807|   128k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   128k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  64.4k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  64.4k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  64.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  64.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (!janet_checktype(check, JANET_NIL) && at != janet_unwrap_pointer(check)) {
  ------------------
  |  |  867|      0|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (34620:9): [True: 0, False: 64.4k]
  |  Branch (34620:47): [True: 0, False: 0]
  ------------------
34621|      0|        janet_panicf("cannot register abstract type %s, "
34622|      0|                     "a type with the same name exists", at->name);
34623|      0|    }
34624|  64.4k|    janet_table_put(janet_vm.abstract_registry, sym, janet_wrap_pointer((void *) at));
  ------------------
  |  |  854|  64.4k|#define janet_wrap_pointer(s) janet_nanbox_wrap_((s), JANET_POINTER)
  |  |  ------------------
  |  |  |  |  825|  64.4k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  64.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  64.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34625|  64.4k|}
janet_get_abstract_type:
34627|  1.00k|const JanetAbstractType *janet_get_abstract_type(Janet key) {
34628|  1.00k|    Janet wrapped = janet_table_get(janet_vm.abstract_registry, key);
34629|  1.00k|    if (janet_checktype(wrapped, JANET_NIL)) {
  ------------------
  |  |  806|  1.00k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1, False: 1.00k]
  |  |  |  Branch (806:6): [Folded, False: 1.00k]
  |  |  ------------------
  |  |  807|  1.00k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.00k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.00k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.00k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34630|      1|        return NULL;
34631|      1|    }
34632|  1.00k|    return (JanetAbstractType *)(janet_unwrap_pointer(wrapped));
  ------------------
  |  |  867|  1.00k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
34633|  1.00k|}
janet_core_def_sm:
34636|  21.4k|void janet_core_def_sm(JanetTable *env, const char *name, Janet x, const void *p, const void *sf, int32_t sl) {
34637|  21.4k|    (void) sf;
34638|  21.4k|    (void) sl;
34639|  21.4k|    (void) p;
34640|  21.4k|    Janet key = janet_csymbolv(name);
  ------------------
  |  | 1836|  21.4k|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  21.4k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  21.4k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  21.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  21.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34641|  21.4k|    janet_table_put(env, key, x);
34642|  21.4k|    if (janet_checktype(x, JANET_CFUNCTION)) {
  ------------------
  |  |  806|  21.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 21.4k]
  |  |  |  Branch (806:6): [Folded, False: 21.4k]
  |  |  ------------------
  |  |  807|  21.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|  21.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  21.4k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  21.4k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  21.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  21.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34643|      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))
  ------------------
34644|      0|    }
34645|  21.4k|}
janet_core_cfuns_ext:
34647|   157k|void janet_core_cfuns_ext(JanetTable *env, const char *regprefix, const JanetRegExt *cfuns) {
34648|   157k|    (void) regprefix;
34649|  2.67M|    while (cfuns->name) {
  ------------------
  |  Branch (34649:12): [True: 2.52M, False: 157k]
  ------------------
34650|  2.52M|        janet_check_pointer_align(cfuns->cfun);
34651|  2.52M|        Janet fun = janet_wrap_cfunction(cfuns->cfun);
  ------------------
  |  |  853|  2.52M|#define janet_wrap_cfunction(s) janet_nanbox_wrap_((s), JANET_CFUNCTION)
  |  |  ------------------
  |  |  |  |  825|  2.52M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.52M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.52M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34652|  2.52M|        janet_table_put(env, janet_csymbolv(cfuns->name), fun);
  ------------------
  |  | 1836|  2.52M|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  2.52M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  2.52M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  2.52M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  2.52M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34653|  2.52M|        janet_registry_put(cfuns->cfun, cfuns->name, regprefix, cfuns->source_file, cfuns->source_line);
34654|  2.52M|        cfuns++;
34655|  2.52M|    }
34656|   157k|}
janet_binding_from_entry:
34659|   282k|JanetBinding janet_binding_from_entry(Janet entry) {
34660|   282k|    JanetTable *entry_table;
34661|   282k|    JanetBinding binding = {
34662|   282k|        JANET_BINDING_NONE,
34663|   282k|        janet_wrap_nil(),
  ------------------
  |  |  831|   282k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   282k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   282k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   282k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34664|   282k|        JANET_BINDING_DEP_NONE
34665|   282k|    };
34666|       |
34667|       |    /* Check environment for entry */
34668|   282k|    if (!janet_checktype(entry, JANET_TABLE))
  ------------------
  |  |  806|   282k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 282k]
  |  |  ------------------
  |  |  807|   282k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   282k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   282k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   282k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   282k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   282k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (34668:9): [True: 22.2k, False: 259k]
  ------------------
34669|  22.2k|        return binding;
34670|   259k|    entry_table = janet_unwrap_table(entry);
  ------------------
  |  |  861|   259k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
34671|       |
34672|   259k|    Janet deprecate = janet_table_get_keyword(entry_table, "deprecated");
34673|   259k|    int macro = janet_truthy(janet_table_get_keyword(entry_table, "macro"));
  ------------------
  |  |  818|   259k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|   519k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 259k]
  |  |  |  |  ------------------
  |  |  |  |  807|   519k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|   519k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|   259k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|   259k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   259k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   259k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 198k, False: 61.4k]
  |  |  ------------------
  |  |  819|   259k|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|   396k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 198k]
  |  |  |  |  ------------------
  |  |  |  |  807|   396k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|   396k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|   198k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|   198k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   198k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   198k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 0, False: 198k]
  |  |  |  Branch (819:47): [True: 198k, False: 0]
  |  |  ------------------
  ------------------
34674|   259k|    Janet value = janet_table_get_keyword(entry_table, "value");
34675|   259k|    Janet ref = janet_table_get_keyword(entry_table, "ref");
34676|       |
34677|   259k|    if (janet_checktype(deprecate, JANET_KEYWORD)) {
  ------------------
  |  |  806|   259k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 259k]
  |  |  |  Branch (806:6): [Folded, False: 259k]
  |  |  ------------------
  |  |  807|   259k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   259k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   259k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   259k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   259k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   259k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34678|      0|        JanetKeyword depkw = janet_unwrap_keyword(deprecate);
  ------------------
  |  |  865|      0|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
34679|      0|        if (!janet_cstrcmp(depkw, "relaxed")) {
  ------------------
  |  Branch (34679:13): [True: 0, False: 0]
  ------------------
34680|      0|            binding.deprecation = JANET_BINDING_DEP_RELAXED;
34681|      0|        } else if (!janet_cstrcmp(depkw, "normal")) {
  ------------------
  |  Branch (34681:20): [True: 0, False: 0]
  ------------------
34682|      0|            binding.deprecation = JANET_BINDING_DEP_NORMAL;
34683|      0|        } else if (!janet_cstrcmp(depkw, "strict")) {
  ------------------
  |  Branch (34683:20): [True: 0, False: 0]
  ------------------
34684|      0|            binding.deprecation = JANET_BINDING_DEP_STRICT;
34685|      0|        }
34686|   259k|    } else if (!janet_checktype(deprecate, JANET_NIL)) {
  ------------------
  |  |  806|   259k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 259k]
  |  |  ------------------
  |  |  807|   259k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   259k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   259k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   259k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   259k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   259k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (34686:16): [True: 0, False: 259k]
  ------------------
34687|      0|        binding.deprecation = JANET_BINDING_DEP_NORMAL;
34688|      0|    }
34689|       |
34690|   259k|    int ref_is_valid = janet_checktype(ref, JANET_ARRAY);
  ------------------
  |  |  806|   259k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 259k]
  |  |  ------------------
  |  |  807|   259k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   259k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   259k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   259k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   259k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   259k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34691|   259k|    int redef = ref_is_valid && janet_truthy(janet_table_get_keyword(entry_table, "redef"));
  ------------------
  |  |  818|   259k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|     70|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 35]
  |  |  |  |  ------------------
  |  |  |  |  807|     70|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|     70|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|     35|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|     35|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     35|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     35|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 0, False: 35]
  |  |  ------------------
  |  |  819|   259k|     (!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 (34691:17): [True: 35, False: 259k]
  ------------------
34692|       |
34693|   259k|    if (macro) {
  ------------------
  |  Branch (34693:9): [True: 198k, False: 61.4k]
  ------------------
34694|   198k|        binding.value = redef ? ref : value;
  ------------------
  |  Branch (34694:25): [True: 0, False: 198k]
  ------------------
34695|   198k|        binding.type = redef ? JANET_BINDING_DYNAMIC_MACRO : JANET_BINDING_MACRO;
  ------------------
  |  Branch (34695:24): [True: 0, False: 198k]
  ------------------
34696|   198k|        return binding;
34697|   198k|    }
34698|       |
34699|  61.4k|    if (ref_is_valid) {
  ------------------
  |  Branch (34699:9): [True: 35, False: 61.4k]
  ------------------
34700|     35|        binding.value = ref;
34701|     35|        binding.type = redef ? JANET_BINDING_DYNAMIC_DEF : JANET_BINDING_VAR;
  ------------------
  |  Branch (34701:24): [True: 0, False: 35]
  ------------------
34702|  61.4k|    } else {
34703|  61.4k|        binding.value = value;
34704|  61.4k|        binding.type = JANET_BINDING_DEF;
34705|  61.4k|    }
34706|       |
34707|  61.4k|    return binding;
34708|   259k|}
janet_text_substitution:
34739|    462|    JanetArray *extra_argv) {
34740|    462|    int32_t extra_argc = extra_argv == NULL ? 0 : extra_argv->count;
  ------------------
  |  Branch (34740:26): [True: 23, False: 439]
  ------------------
34741|    462|    JanetType type = janet_type(*subst);
  ------------------
  |  |  795|    462|    (isnan((x).number) \
  |  |  796|    462|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|    462|        : JANET_NUMBER)
  ------------------
  |  Branch (34741:22): [True: 458, False: 4]
  ------------------
34742|    462|    switch (type) {
34743|     79|        case JANET_FUNCTION:
  ------------------
  |  Branch (34743:9): [True: 79, False: 383]
  ------------------
34744|     79|        case JANET_CFUNCTION: {
  ------------------
  |  Branch (34744:9): [True: 0, False: 462]
  ------------------
34745|     79|            int32_t argc = 1 + extra_argc;
34746|     79|            Janet *argv = janet_tuple_begin(argc);
34747|     79|            argv[0] = janet_stringv(bytes, len);
  ------------------
  |  | 1826|     79|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|     79|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|     79|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     79|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     79|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34748|    252|            for (int32_t i = 0; i < extra_argc; i++) {
  ------------------
  |  Branch (34748:33): [True: 173, False: 79]
  ------------------
34749|    173|                argv[i + 1] = extra_argv->data[i];
34750|    173|            }
34751|     79|            janet_tuple_end(argv);
34752|     79|            if (type == JANET_FUNCTION) {
  ------------------
  |  Branch (34752:17): [True: 79, False: 0]
  ------------------
34753|     79|                return to_byte_view(janet_call(janet_unwrap_function(*subst), argc, argv));
  ------------------
  |  |  868|     79|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
34754|     79|            } else {
34755|      0|                return to_byte_view(janet_unwrap_cfunction(*subst)(argc, argv));
  ------------------
  |  |  869|      0|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
34756|      0|            }
34757|     79|        }
34758|    383|        default:
  ------------------
  |  Branch (34758:9): [True: 383, False: 79]
  ------------------
34759|    383|            return memoize_byte_view(subst);
34760|    462|    }
34761|    462|}
janet_resolve_ext:
34763|   282k|JanetBinding janet_resolve_ext(JanetTable *env, const uint8_t *sym) {
34764|   282k|    Janet entry = janet_table_get(env, janet_wrap_symbol(sym));
  ------------------
  |  |  849|   282k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|   282k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   282k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   282k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34765|   282k|    return janet_binding_from_entry(entry);
34766|   282k|}
janet_resolve:
34768|   172k|JanetBindingType janet_resolve(JanetTable *env, const uint8_t *sym, Janet *out) {
34769|   172k|    JanetBinding binding = janet_resolve_ext(env, sym);
34770|   172k|    if (binding.type == JANET_BINDING_DYNAMIC_DEF || binding.type == JANET_BINDING_DYNAMIC_MACRO) {
  ------------------
  |  Branch (34770:9): [True: 0, False: 172k]
  |  Branch (34770:54): [True: 0, False: 172k]
  ------------------
34771|      0|        *out = janet_array_peek(janet_unwrap_array(binding.value));
  ------------------
  |  |  860|      0|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
34772|   172k|    } else {
34773|   172k|        *out = binding.value;
34774|   172k|    }
34775|   172k|    return binding.type;
34776|   172k|}
janet_indexed_view:
34788|  37.8M|int janet_indexed_view(Janet seq, const Janet **data, int32_t *len) {
34789|  37.8M|    if (janet_checktype(seq, JANET_ARRAY)) {
  ------------------
  |  |  806|  37.8M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 11.7M, False: 26.0M]
  |  |  |  Branch (806:6): [Folded, False: 37.8M]
  |  |  ------------------
  |  |  807|  37.8M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  37.8M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  37.8M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  37.8M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34790|  11.7M|        *data = janet_unwrap_array(seq)->data;
  ------------------
  |  |  860|  11.7M|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
34791|  11.7M|        *len = janet_unwrap_array(seq)->count;
  ------------------
  |  |  860|  11.7M|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
34792|  11.7M|        return 1;
34793|  26.0M|    } else if (janet_checktype(seq, JANET_TUPLE)) {
  ------------------
  |  |  806|  26.0M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 26.0M, False: 77]
  |  |  |  Branch (806:6): [Folded, False: 26.0M]
  |  |  ------------------
  |  |  807|  26.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|  26.0M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  26.0M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  26.0M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  26.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  26.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34794|  26.0M|        *data = janet_unwrap_tuple(seq);
  ------------------
  |  |  858|  26.0M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
34795|  26.0M|        *len = janet_tuple_length(janet_unwrap_tuple(seq));
  ------------------
  |  | 1801|  26.0M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|  26.0M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
34796|  26.0M|        return 1;
34797|  26.0M|    }
34798|     77|    return 0;
34799|  37.8M|}
janet_bytes_view:
34803|  11.3M|int janet_bytes_view(Janet str, const uint8_t **data, int32_t *len) {
34804|  11.3M|    JanetType t = janet_type(str);
  ------------------
  |  |  795|  11.3M|    (isnan((x).number) \
  |  |  796|  11.3M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  11.3M|        : JANET_NUMBER)
  ------------------
  |  Branch (34804:19): [True: 11.3M, False: 42]
  ------------------
34805|  11.3M|    if (t == JANET_STRING || t == JANET_SYMBOL || t == JANET_KEYWORD) {
  ------------------
  |  Branch (34805:9): [True: 232k, False: 11.1M]
  |  Branch (34805:30): [True: 11.0M, False: 52.5k]
  |  Branch (34805:51): [True: 3.65k, False: 48.8k]
  ------------------
34806|  11.3M|        *data = janet_unwrap_string(str);
  ------------------
  |  |  863|  11.3M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
34807|  11.3M|        *len = janet_string_length(janet_unwrap_string(str));
  ------------------
  |  | 1812|  11.3M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|  11.3M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
34808|  11.3M|        return 1;
34809|  11.3M|    } else if (t == JANET_BUFFER) {
  ------------------
  |  Branch (34809:16): [True: 46.8k, False: 2.00k]
  ------------------
34810|  46.8k|        *data = janet_unwrap_buffer(str)->data;
  ------------------
  |  |  862|  46.8k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
34811|  46.8k|        *len = janet_unwrap_buffer(str)->count;
  ------------------
  |  |  862|  46.8k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
34812|  46.8k|        return 1;
34813|  46.8k|    } else if (t == JANET_ABSTRACT) {
  ------------------
  |  Branch (34813:16): [True: 22, False: 1.98k]
  ------------------
34814|     22|        void *abst = janet_unwrap_abstract(str);
  ------------------
  |  |  866|     22|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
34815|     22|        const JanetAbstractType *atype = janet_abstract_type(abst);
  ------------------
  |  | 1898|     22|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|     22|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
34816|     22|        if (NULL == atype->bytes) {
  ------------------
  |  Branch (34816:13): [True: 22, False: 0]
  ------------------
34817|     22|            return 0;
34818|     22|        }
34819|      0|        JanetByteView view = atype->bytes(abst, janet_abstract_size(abst));
  ------------------
  |  | 1899|      0|#define janet_abstract_size(u) (janet_abstract_head(u)->size)
  |  |  ------------------
  |  |  |  | 1896|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
34820|      0|        *data = view.bytes;
34821|      0|        *len = view.len;
34822|      0|        return 1;
34823|     22|    }
34824|  1.98k|    return 0;
34825|  11.3M|}
janet_dictionary_view:
34830|  20.7k|int janet_dictionary_view(Janet tab, const JanetKV **data, int32_t *len, int32_t *cap) {
34831|  20.7k|    if (janet_checktype(tab, JANET_TABLE)) {
  ------------------
  |  |  806|  20.7k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 257, False: 20.4k]
  |  |  |  Branch (806:6): [Folded, False: 20.7k]
  |  |  ------------------
  |  |  807|  20.7k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  20.7k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  20.7k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  20.7k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34832|    257|        *data = janet_unwrap_table(tab)->data;
  ------------------
  |  |  861|    257|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
34833|    257|        *cap = janet_unwrap_table(tab)->capacity;
  ------------------
  |  |  861|    257|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
34834|    257|        *len = janet_unwrap_table(tab)->count;
  ------------------
  |  |  861|    257|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
34835|    257|        return 1;
34836|  20.4k|    } else if (janet_checktype(tab, JANET_STRUCT)) {
  ------------------
  |  |  806|  20.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 20.4k, False: 2]
  |  |  |  Branch (806:6): [Folded, False: 20.4k]
  |  |  ------------------
  |  |  807|  20.4k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  20.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  20.4k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  20.4k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  20.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  20.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34837|  20.4k|        *data = janet_unwrap_struct(tab);
  ------------------
  |  |  857|  20.4k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
34838|  20.4k|        *cap = janet_struct_capacity(janet_unwrap_struct(tab));
  ------------------
  |  | 1848|  20.4k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1845|  20.4k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34839|  20.4k|        *len = janet_struct_length(janet_unwrap_struct(tab));
  ------------------
  |  | 1847|  20.4k|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1845|  20.4k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34840|  20.4k|        return 1;
34841|  20.4k|    }
34842|      2|    return 0;
34843|  20.7k|}
janet_checkint:
34845|   131M|int janet_checkint(Janet x) {
34846|   131M|    if (!janet_checktype(x, JANET_NUMBER))
  ------------------
  |  |  806|   131M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [True: 131M, Folded]
  |  |  ------------------
  |  |  807|   131M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|   131M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 129M, False: 2.02M]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 2.02M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   131M|        : 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 (34846:9): [True: 2.02M, False: 129M]
  ------------------
34847|  2.02M|        return 0;
34848|   129M|    double dval = janet_unwrap_number(x);
  ------------------
  |  |  839|   129M|#define janet_unwrap_number(x) ((x).number)
  ------------------
34849|       |    return janet_checkintrange(dval);
  ------------------
  |  |  962|   129M|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  ------------------
  |  |  |  Branch (962:33): [True: 129M, False: 18.4E]
  |  |  |  Branch (962:53): [True: 129M, False: 253]
  |  |  |  Branch (962:73): [True: 129M, False: 29]
  |  |  ------------------
  ------------------
34850|   131M|}
janet_checksize:
34901|      5|int janet_checksize(Janet x) {
34902|      5|    if (!janet_checktype(x, JANET_NUMBER))
  ------------------
  |  |  806|      5|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [True: 5, Folded]
  |  |  ------------------
  |  |  807|      5|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      5|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 3, False: 2]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|      5|        : 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 (34902:9): [True: 2, False: 3]
  ------------------
34903|      2|        return 0;
34904|      3|    double dval = janet_unwrap_number(x);
  ------------------
  |  |  839|      3|#define janet_unwrap_number(x) ((x).number)
  ------------------
34905|      3|    if (dval != (double)((size_t) dval)) return 0;
  ------------------
  |  Branch (34905:9): [True: 0, False: 3]
  ------------------
34906|       |#ifdef JANET_PLAN9
34907|       |    return dval <= SIZE_MAX;
34908|       |#else
34909|      3|    if (SIZE_MAX > JANET_INTMAX_INT64) {
  ------------------
  |  |  167|      3|#define JANET_INTMAX_INT64 9007199254740992
  ------------------
  |  Branch (34909:9): [True: 3, Folded]
  ------------------
34910|      3|        return dval <= JANET_INTMAX_INT64;
  ------------------
  |  |  167|      3|#define JANET_INTMAX_INT64 9007199254740992
  ------------------
34911|      3|    } else {
34912|       |        return dval <= SIZE_MAX;
34913|      0|    }
34914|      3|#endif
34915|      3|}
janet_sorted_keys:
34927|  3.27k|int32_t janet_sorted_keys(const JanetKV *dict, int32_t cap, int32_t *index_buffer) {
34928|       |
34929|       |    /* First, put populated indices into index_buffer */
34930|  3.27k|    int32_t next_index = 0;
34931|  28.6k|    for (int32_t i = 0; i < cap; i++) {
  ------------------
  |  Branch (34931:25): [True: 25.3k, False: 3.27k]
  ------------------
34932|  25.3k|        if (!janet_checktype(dict[i].key, JANET_NIL)) {
  ------------------
  |  |  806|  25.3k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 25.3k]
  |  |  ------------------
  |  |  807|  25.3k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  25.3k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  25.3k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  25.3k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  25.3k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  25.3k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (34932:13): [True: 8.27k, False: 17.1k]
  ------------------
34933|  8.27k|            index_buffer[next_index++] = i;
34934|  8.27k|        }
34935|  25.3k|    }
34936|       |
34937|       |    /* Next, sort those (simple insertion sort here for now) */
34938|  8.40k|    for (int32_t i = 1; i < next_index; i++) {
  ------------------
  |  Branch (34938:25): [True: 5.13k, False: 3.27k]
  ------------------
34939|  5.13k|        int32_t index_to_insert = index_buffer[i];
34940|  5.13k|        Janet lhs = dict[index_to_insert].key;
34941|  26.3k|        for (int32_t j = i - 1; j >= 0; j--) {
  ------------------
  |  Branch (34941:33): [True: 23.1k, False: 3.17k]
  ------------------
34942|  23.1k|            index_buffer[j + 1] = index_buffer[j];
34943|  23.1k|            Janet rhs = dict[index_buffer[j]].key;
34944|  23.1k|            if (janet_compare(lhs, rhs) >= 0) {
  ------------------
  |  Branch (34944:17): [True: 1.96k, False: 21.1k]
  ------------------
34945|  1.96k|                index_buffer[j + 1] = index_to_insert;
34946|  1.96k|                break;
34947|  21.1k|            } else if (j == 0) {
  ------------------
  |  Branch (34947:24): [True: 3.17k, False: 17.9k]
  ------------------
34948|  3.17k|                index_buffer[0] = index_to_insert;
34949|  3.17k|            }
34950|  23.1k|        }
34951|  5.13k|    }
34952|       |
34953|       |    /* Return number of indices found */
34954|  3.27k|    return next_index;
34955|       |
34956|  3.27k|}
janet_gettime:
35015|  4.14k|int janet_gettime(struct timespec *spec, enum JanetTimeSource source) {
35016|  4.14k|    clockid_t cid = CLOCK_REALTIME;
35017|  4.14k|    if (source == JANET_TIME_REALTIME) {
  ------------------
  |  Branch (35017:9): [True: 1, False: 4.14k]
  ------------------
35018|      1|        cid = CLOCK_REALTIME;
35019|  4.14k|    } else if (source == JANET_TIME_MONOTONIC) {
  ------------------
  |  Branch (35019:16): [True: 4.14k, False: 0]
  ------------------
35020|  4.14k|        cid = CLOCK_MONOTONIC;
35021|  4.14k|    } else if (source == JANET_TIME_CPUTIME) {
  ------------------
  |  Branch (35021:16): [True: 0, False: 0]
  ------------------
35022|       |        cid = CLOCK_PROCESS_CPUTIME_ID;
35023|      0|    }
35024|  4.14k|    return clock_gettime(cid, spec);
35025|  4.14k|}
janet_strerror:
35030|     31|const char *janet_strerror(int e) {
35031|       |#ifdef JANET_WINDOWS
35032|       |    /* Microsoft strerror seems sane here and is thread safe by default */
35033|       |    return strerror(e);
35034|       |#elif defined(__GLIBC__)
35035|       |    /* See https://linux.die.net/man/3/strerror_r */
35036|     31|    return strerror_r(e, janet_vm.strerror_buf, sizeof(janet_vm.strerror_buf));
35037|       |#else
35038|       |    strerror_r(e, janet_vm.strerror_buf, sizeof(janet_vm.strerror_buf));
35039|       |    return janet_vm.strerror_buf;
35040|       |#endif
35041|     31|}
janet_cryptorand:
35049|      7|int janet_cryptorand(uint8_t *out, size_t n) {
35050|      7|#ifndef JANET_NO_CRYPTORAND
35051|       |#ifdef JANET_WINDOWS
35052|       |    for (size_t i = 0; i < n; i += sizeof(unsigned int)) {
35053|       |        unsigned int v;
35054|       |        if (rand_s(&v))
35055|       |            return -1;
35056|       |        for (int32_t j = 0; (j < (int32_t) sizeof(unsigned int)) && (i + j < n); j++) {
35057|       |            out[i + j] = v & 0xff;
35058|       |            v = v >> 8;
35059|       |        }
35060|       |    }
35061|       |    return 0;
35062|       |#elif defined(JANET_BSD) || defined(MAC_OS_X_VERSION_10_7)
35063|       |    arc4random_buf(out, n);
35064|       |    return 0;
35065|       |#else
35066|       |    /* We should be able to call getrandom on linux, but it doesn't seem
35067|       |       to be uniformly supported on linux distros.
35068|       |       On Mac, arc4random_buf wasn't available on until 10.7.
35069|       |       In these cases, use this fallback path for now... */
35070|      7|    int rc;
35071|      7|    int randfd;
35072|      7|    RETRY_EINTR(randfd, open("/dev/urandom", O_RDONLY | O_CLOEXEC));
  ------------------
  |  |  532|      7|#define RETRY_EINTR(RC, CALL) do { (RC) = CALL; } while((RC) < 0 && errno == EINTR)
  |  |  ------------------
  |  |  |  Branch (532:57): [True: 0, False: 7]
  |  |  |  Branch (532:69): [True: 0, False: 0]
  |  |  ------------------
  ------------------
35073|      7|    if (randfd < 0)
  ------------------
  |  Branch (35073:9): [True: 0, False: 7]
  ------------------
35074|      0|        return -1;
35075|     13|    while (n > 0) {
  ------------------
  |  Branch (35075:12): [True: 6, False: 7]
  ------------------
35076|      6|        ssize_t nread;
35077|      6|        RETRY_EINTR(nread, read(randfd, out, n));
  ------------------
  |  |  532|      6|#define RETRY_EINTR(RC, CALL) do { (RC) = CALL; } while((RC) < 0 && errno == EINTR)
  |  |  ------------------
  |  |  |  Branch (532:57): [True: 0, False: 6]
  |  |  |  Branch (532:69): [True: 0, False: 0]
  |  |  ------------------
  ------------------
35078|      6|        if (nread <= 0) {
  ------------------
  |  Branch (35078:13): [True: 0, False: 6]
  ------------------
35079|      0|            RETRY_EINTR(rc, close(randfd));
  ------------------
  |  |  532|      0|#define RETRY_EINTR(RC, CALL) do { (RC) = CALL; } while((RC) < 0 && errno == EINTR)
  |  |  ------------------
  |  |  |  Branch (532:57): [True: 0, False: 0]
  |  |  |  Branch (532:69): [True: 0, False: 0]
  |  |  ------------------
  ------------------
35080|      0|            return -1;
35081|      0|        }
35082|      6|        out += nread;
35083|      6|        n -= nread;
35084|      6|    }
35085|      7|    RETRY_EINTR(rc, close(randfd));
  ------------------
  |  |  532|      7|#define RETRY_EINTR(RC, CALL) do { (RC) = CALL; } while((RC) < 0 && errno == EINTR)
  |  |  ------------------
  |  |  |  Branch (532:57): [True: 0, False: 7]
  |  |  |  Branch (532:69): [True: 0, False: 0]
  |  |  ------------------
  ------------------
35086|      7|    return 0;
35087|      7|#endif
35088|       |#else
35089|       |    (void) out;
35090|       |    (void) n;
35091|       |    return -1;
35092|       |#endif
35093|      7|}
array_allocate:
35189|  39.4M|void *array_allocate(size_t element_size, int32_t count) {
35190|  39.4M|    if (count < 0) return NULL;
  ------------------
  |  Branch (35190:9): [True: 0, False: 39.4M]
  ------------------
35191|  39.4M|    if ((size_t) count > (SIZE_MAX / element_size)) return NULL;
  ------------------
  |  Branch (35191:9): [True: 0, False: 39.4M]
  ------------------
35192|  39.4M|    return janet_malloc(element_size * count);
  ------------------
  |  | 2406|  39.4M|#define janet_malloc(X) malloc((X))
  ------------------
35193|  39.4M|}
janet_next_impl:
35328|  36.1M|Janet janet_next_impl(Janet ds, Janet key, int is_interpreter) {
35329|  36.1M|    JanetType t = janet_type(ds);
  ------------------
  |  |  795|  36.1M|    (isnan((x).number) \
  |  |  796|  36.1M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  36.1M|        : JANET_NUMBER)
  ------------------
  |  Branch (35329:19): [True: 36.1M, False: 24]
  ------------------
35330|  36.1M|    switch (t) {
35331|     99|        default:
  ------------------
  |  Branch (35331:9): [True: 99, False: 36.1M]
  ------------------
35332|     99|            janet_panicf("expected iterable type, got %v", ds);
35333|   360k|        case JANET_TABLE:
  ------------------
  |  Branch (35333:9): [True: 360k, False: 35.7M]
  ------------------
35334|   599k|        case JANET_STRUCT: {
  ------------------
  |  Branch (35334:9): [True: 239k, False: 35.9M]
  ------------------
35335|   599k|            const JanetKV *start;
35336|   599k|            int32_t cap;
35337|   599k|            if (t == JANET_TABLE) {
  ------------------
  |  Branch (35337:17): [True: 360k, False: 239k]
  ------------------
35338|   360k|                JanetTable *tab = janet_unwrap_table(ds);
  ------------------
  |  |  861|   360k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
35339|   360k|                cap = tab->capacity;
35340|   360k|                start = tab->data;
35341|   360k|            } else {
35342|   239k|                JanetStruct st = janet_unwrap_struct(ds);
  ------------------
  |  |  857|   239k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
35343|   239k|                cap = janet_struct_capacity(st);
  ------------------
  |  | 1848|   239k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1845|   239k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
35344|   239k|                start = st;
35345|   239k|            }
35346|   599k|            const JanetKV *end = start + cap;
35347|   599k|            const JanetKV *kv = janet_checktype(key, JANET_NIL)
  ------------------
  |  |  806|   599k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 245k, False: 354k]
  |  |  |  Branch (806:6): [Folded, False: 599k]
  |  |  ------------------
  |  |  807|   599k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   599k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   599k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   599k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   599k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   599k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35348|   599k|                                ? start
35349|   599k|                                : janet_dict_find(start, cap, key) + 1;
35350|  1.49M|            while (kv < end) {
  ------------------
  |  Branch (35350:20): [True: 1.26M, False: 226k]
  ------------------
35351|  1.26M|                if (!janet_checktype(kv->key, JANET_NIL)) return kv->key;
  ------------------
  |  |  806|  1.26M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 1.26M]
  |  |  ------------------
  |  |  807|  1.26M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.26M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.26M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.26M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.26M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.26M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35351:21): [True: 373k, False: 895k]
  ------------------
35352|   895k|                kv++;
35353|   895k|            }
35354|   226k|            break;
35355|   599k|        }
35356|   226k|        case JANET_STRING:
  ------------------
  |  Branch (35356:9): [True: 24.1k, False: 36.1M]
  ------------------
35357|  24.4k|        case JANET_KEYWORD:
  ------------------
  |  Branch (35357:9): [True: 305, False: 36.1M]
  ------------------
35358|   165k|        case JANET_SYMBOL:
  ------------------
  |  Branch (35358:9): [True: 141k, False: 36.0M]
  ------------------
35359|   183k|        case JANET_BUFFER:
  ------------------
  |  Branch (35359:9): [True: 17.9k, False: 36.1M]
  ------------------
35360|   910k|        case JANET_ARRAY:
  ------------------
  |  Branch (35360:9): [True: 726k, False: 35.4M]
  ------------------
35361|  35.5M|        case JANET_TUPLE: {
  ------------------
  |  Branch (35361:9): [True: 34.6M, False: 1.51M]
  ------------------
35362|  35.5M|            int32_t i;
35363|  35.5M|            if (janet_checktype(key, JANET_NIL)) {
  ------------------
  |  |  806|  35.5M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 16.4M, False: 19.1M]
  |  |  |  Branch (806:6): [Folded, False: 35.5M]
  |  |  ------------------
  |  |  807|  35.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|  35.5M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  35.5M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  35.5M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  35.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  35.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35364|  16.4M|                i = 0;
35365|  19.1M|            } else if (janet_checkint(key)) {
  ------------------
  |  Branch (35365:24): [True: 19.1M, False: 0]
  ------------------
35366|  19.1M|                i = janet_unwrap_integer(key) + 1;
  ------------------
  |  |  966|  19.1M|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|  19.1M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
35367|  19.1M|            } else {
35368|      0|                break;
35369|      0|            }
35370|  35.5M|            int32_t len;
35371|  35.5M|            if (t == JANET_BUFFER) {
  ------------------
  |  Branch (35371:17): [True: 17.9k, False: 35.5M]
  ------------------
35372|  17.9k|                len = janet_unwrap_buffer(ds)->count;
  ------------------
  |  |  862|  17.9k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
35373|  35.5M|            } else if (t == JANET_ARRAY) {
  ------------------
  |  Branch (35373:24): [True: 726k, False: 34.7M]
  ------------------
35374|   726k|                len = janet_unwrap_array(ds)->count;
  ------------------
  |  |  860|   726k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
35375|  34.7M|            } else if (t == JANET_TUPLE) {
  ------------------
  |  Branch (35375:24): [True: 34.6M, False: 165k]
  ------------------
35376|  34.6M|                len = janet_tuple_length(janet_unwrap_tuple(ds));
  ------------------
  |  | 1801|  34.6M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|  34.6M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
35377|  34.6M|            } else {
35378|   165k|                len = janet_string_length(janet_unwrap_string(ds));
  ------------------
  |  | 1812|   165k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|   165k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
35379|   165k|            }
35380|  35.5M|            if (i < len && i >= 0) {
  ------------------
  |  Branch (35380:17): [True: 24.2M, False: 11.2M]
  |  Branch (35380:28): [True: 24.2M, False: 0]
  ------------------
35381|  24.2M|                return janet_wrap_integer(i);
  ------------------
  |  |  967|  24.2M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  24.2M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35382|  24.2M|            }
35383|  11.2M|            break;
35384|  35.5M|        }
35385|  11.2M|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35385:9): [True: 1.70k, False: 36.1M]
  ------------------
35386|  1.70k|            JanetAbstract abst = janet_unwrap_abstract(ds);
  ------------------
  |  |  866|  1.70k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
35387|  1.70k|            const JanetAbstractType *at = janet_abstract_type(abst);
  ------------------
  |  | 1898|  1.70k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|  1.70k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35388|  1.70k|            if (NULL == at->next) break;
  ------------------
  |  Branch (35388:17): [True: 0, False: 1.70k]
  ------------------
35389|  1.70k|            return at->next(abst, key);
35390|  1.70k|        }
35391|      3|        case JANET_FIBER: {
  ------------------
  |  Branch (35391:9): [True: 3, False: 36.1M]
  ------------------
35392|      3|            JanetFiber *child = janet_unwrap_fiber(ds);
  ------------------
  |  |  859|      3|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
35393|      3|            Janet retreg;
35394|      3|            JanetFiberStatus status = janet_fiber_status(child);
35395|      3|            if (status == JANET_STATUS_ALIVE ||
  ------------------
  |  Branch (35395:17): [True: 0, False: 3]
  ------------------
35396|      3|                    status == JANET_STATUS_DEAD ||
  ------------------
  |  Branch (35396:21): [True: 0, False: 3]
  ------------------
35397|      3|                    status == JANET_STATUS_ERROR ||
  ------------------
  |  Branch (35397:21): [True: 0, False: 3]
  ------------------
35398|      3|                    status == JANET_STATUS_USER0 ||
  ------------------
  |  Branch (35398:21): [True: 0, False: 3]
  ------------------
35399|      3|                    status == JANET_STATUS_USER1 ||
  ------------------
  |  Branch (35399:21): [True: 0, False: 3]
  ------------------
35400|      3|                    status == JANET_STATUS_USER2 ||
  ------------------
  |  Branch (35400:21): [True: 0, False: 3]
  ------------------
35401|      3|                    status == JANET_STATUS_USER3 ||
  ------------------
  |  Branch (35401:21): [True: 0, False: 3]
  ------------------
35402|      3|                    status == JANET_STATUS_USER4) {
  ------------------
  |  Branch (35402:21): [True: 0, False: 3]
  ------------------
35403|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35404|      0|            }
35405|      3|            janet_vm.fiber->child = child;
35406|      3|            JanetSignal sig = janet_continue(child, janet_wrap_nil(), &retreg);
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35407|      3|            if (sig != JANET_SIGNAL_OK && !(child->flags & (1 << sig))) {
  ------------------
  |  Branch (35407:17): [True: 0, False: 3]
  |  Branch (35407:43): [True: 0, False: 0]
  ------------------
35408|      0|                if (is_interpreter) {
  ------------------
  |  Branch (35408:21): [True: 0, False: 0]
  ------------------
35409|      0|                    janet_signalv(sig, retreg);
35410|      0|                } else {
35411|      0|                    janet_vm.fiber->child = NULL;
35412|      0|                    janet_panicv(retreg);
35413|      0|                }
35414|      0|            }
35415|      3|            janet_vm.fiber->child = NULL;
35416|      3|            if (sig == JANET_SIGNAL_OK ||
  ------------------
  |  Branch (35416:17): [True: 3, False: 0]
  ------------------
35417|      0|                    sig == JANET_SIGNAL_ERROR ||
  ------------------
  |  Branch (35417:21): [True: 0, False: 0]
  ------------------
35418|      0|                    sig == JANET_SIGNAL_USER0 ||
  ------------------
  |  Branch (35418:21): [True: 0, False: 0]
  ------------------
35419|      0|                    sig == JANET_SIGNAL_USER1 ||
  ------------------
  |  Branch (35419:21): [True: 0, False: 0]
  ------------------
35420|      0|                    sig == JANET_SIGNAL_USER2 ||
  ------------------
  |  Branch (35420:21): [True: 0, False: 0]
  ------------------
35421|      0|                    sig == JANET_SIGNAL_USER3 ||
  ------------------
  |  Branch (35421:21): [True: 0, False: 0]
  ------------------
35422|      3|                    sig == JANET_SIGNAL_USER4) {
  ------------------
  |  Branch (35422:21): [True: 0, False: 0]
  ------------------
35423|       |                /* Fiber cannot be resumed, so discard last value. */
35424|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35425|      3|            } else {
35426|      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)
  |  |  ------------------
  ------------------
35427|      0|            }
35428|      3|        }
35429|  36.1M|    }
35430|  11.5M|    return janet_wrap_nil();
  ------------------
  |  |  831|  11.5M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  11.5M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  11.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  11.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35431|  36.1M|}
janet_equals:
35447|   547M|int janet_equals(Janet x, Janet y) {
35448|   547M|    janet_vm.traversal = janet_vm.traversal_base;
35449|   547M|    do {
35450|   547M|        if (janet_type(x) != janet_type(y)) return 0;
  ------------------
  |  |  795|   547M|    (isnan((x).number) \
  |  |  796|   547M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   547M|        : JANET_NUMBER)
  ------------------
                      if (janet_type(x) != janet_type(y)) return 0;
  ------------------
  |  |  795|   547M|    (isnan((x).number) \
  |  |  796|   547M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   547M|        : JANET_NUMBER)
  ------------------
  |  Branch (35450:13): [True: 537M, False: 10.7M]
  |  Branch (35450:13): [True: 120M, False: 426M]
  |  Branch (35450:30): [True: 531M, False: 15.8M]
  ------------------
35451|   426M|        switch (janet_type(x)) {
  ------------------
  |  |  795|   426M|    (isnan((x).number) \
  |  |  796|   426M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   426M|        : JANET_NUMBER)
  ------------------
  |  Branch (35451:17): [True: 416M, False: 10.5M]
  ------------------
35452|   391k|            case JANET_NIL:
  ------------------
  |  Branch (35452:13): [True: 391k, False: 426M]
  ------------------
35453|   391k|                break;
35454|  1.43k|            case JANET_BOOLEAN:
  ------------------
  |  Branch (35454:13): [True: 1.43k, False: 426M]
  ------------------
35455|  1.43k|                if (janet_unwrap_boolean(x) != janet_unwrap_boolean(y)) return 0;
  ------------------
  |  |  838|  1.43k|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
                              if (janet_unwrap_boolean(x) != janet_unwrap_boolean(y)) return 0;
  ------------------
  |  |  838|  1.43k|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
  |  Branch (35455:21): [True: 20, False: 1.41k]
  ------------------
35456|  1.41k|                break;
35457|  10.6M|            case JANET_NUMBER:
  ------------------
  |  Branch (35457:13): [True: 10.6M, False: 416M]
  ------------------
35458|  10.6M|                if (janet_unwrap_number(x) != janet_unwrap_number(y)) return 0;
  ------------------
  |  |  839|  10.6M|#define janet_unwrap_number(x) ((x).number)
  ------------------
                              if (janet_unwrap_number(x) != janet_unwrap_number(y)) return 0;
  ------------------
  |  |  839|  10.6M|#define janet_unwrap_number(x) ((x).number)
  ------------------
  |  Branch (35458:21): [True: 392k, False: 10.2M]
  ------------------
35459|  10.2M|                break;
35460|  10.2M|            case JANET_STRING:
  ------------------
  |  Branch (35460:13): [True: 1.13M, False: 425M]
  ------------------
35461|  1.13M|                if (!janet_string_equal(janet_unwrap_string(x), janet_unwrap_string(y))) return 0;
  ------------------
  |  |  863|  1.13M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
                              if (!janet_string_equal(janet_unwrap_string(x), janet_unwrap_string(y))) return 0;
  ------------------
  |  |  863|  1.13M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (35461:21): [True: 427k, False: 706k]
  ------------------
35462|   706k|                break;
35463|   706k|            case JANET_ABSTRACT:
  ------------------
  |  Branch (35463:13): [True: 8.76k, False: 426M]
  ------------------
35464|  8.76k|                if (janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y))) return 0;
  ------------------
  |  |  866|  8.76k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
                              if (janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y))) return 0;
  ------------------
  |  |  866|  8.76k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (35464:21): [True: 2.34k, False: 6.42k]
  ------------------
35465|  6.42k|                break;
35466|   411M|            default:
  ------------------
  |  Branch (35466:13): [True: 411M, False: 15.7M]
  ------------------
35467|   411M|                if (janet_unwrap_pointer(x) != janet_unwrap_pointer(y)) return 0;
  ------------------
  |  |  867|   411M|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
                              if (janet_unwrap_pointer(x) != janet_unwrap_pointer(y)) return 0;
  ------------------
  |  |  867|   411M|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (35467:21): [True: 294M, False: 116M]
  ------------------
35468|   116M|                break;
35469|   116M|            case JANET_TUPLE: {
  ------------------
  |  Branch (35469:13): [True: 3.64M, False: 423M]
  ------------------
35470|  3.64M|                const Janet *t1 = janet_unwrap_tuple(x);
  ------------------
  |  |  858|  3.64M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
35471|  3.64M|                const Janet *t2 = janet_unwrap_tuple(y);
  ------------------
  |  |  858|  3.64M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
35472|  3.64M|                if (t1 == t2) break;
  ------------------
  |  Branch (35472:21): [True: 585k, False: 3.05M]
  ------------------
35473|  3.05M|                if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(t1) ^ janet_tuple_flag(t2))) return 0;
  ------------------
  |  | 1797|  3.05M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
                              if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(t1) ^ janet_tuple_flag(t2))) return 0;
  ------------------
  |  | 1805|  3.05M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1799|  3.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;
  ------------------
  |  | 1805|  3.05M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1799|  3.05M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35473:21): [True: 15.6k, False: 3.04M]
  ------------------
35474|  3.04M|                if (janet_tuple_hash(t1) != janet_tuple_hash(t2)) return 0;
  ------------------
  |  | 1802|  3.04M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1799|  3.04M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_tuple_hash(t1) != janet_tuple_hash(t2)) return 0;
  ------------------
  |  | 1802|  3.04M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1799|  3.04M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35474:21): [True: 2.77M, False: 266k]
  ------------------
35475|   266k|                if (janet_tuple_length(t1) != janet_tuple_length(t2)) return 0;
  ------------------
  |  | 1801|   266k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|   266k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_tuple_length(t1) != janet_tuple_length(t2)) return 0;
  ------------------
  |  | 1801|   266k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|   266k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35475:21): [True: 0, False: 266k]
  ------------------
35476|   266k|                push_traversal_node(janet_tuple_head(t1), janet_tuple_head(t2), 0);
  ------------------
  |  | 1799|   266k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
                              push_traversal_node(janet_tuple_head(t1), janet_tuple_head(t2), 0);
  ------------------
  |  | 1799|   266k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
35477|   266k|                break;
35478|   266k|            }
35479|      0|            break;
35480|  18.4k|            case JANET_STRUCT: {
  ------------------
  |  Branch (35480:13): [True: 18.4k, False: 426M]
  ------------------
35481|  18.4k|                const JanetKV *s1 = janet_unwrap_struct(x);
  ------------------
  |  |  857|  18.4k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
35482|  18.4k|                const JanetKV *s2 = janet_unwrap_struct(y);
  ------------------
  |  |  857|  18.4k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
35483|  18.4k|                if (s1 == s2) break;
  ------------------
  |  Branch (35483:21): [True: 12.8k, False: 5.67k]
  ------------------
35484|  5.67k|                if (janet_struct_hash(s1) != janet_struct_hash(s2)) return 0;
  ------------------
  |  | 1849|  5.67k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1845|  5.67k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_struct_hash(s1) != janet_struct_hash(s2)) return 0;
  ------------------
  |  | 1849|  5.67k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1845|  5.67k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35484:21): [True: 183, False: 5.49k]
  ------------------
35485|  5.49k|                if (janet_struct_length(s1) != janet_struct_length(s2)) return 0;
  ------------------
  |  | 1847|  5.49k|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1845|  5.49k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_struct_length(s1) != janet_struct_length(s2)) return 0;
  ------------------
  |  | 1847|  5.49k|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1845|  5.49k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35485:21): [True: 0, False: 5.49k]
  ------------------
35486|  5.49k|                if (janet_struct_proto(s1) && !janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1850|  10.9k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1845|  5.49k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1850:31): [True: 0, False: 5.49k]
  |  |  ------------------
  ------------------
                              if (janet_struct_proto(s1) && !janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1850|      0|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1845|      0|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35486:47): [True: 0, False: 0]
  ------------------
35487|  5.49k|                if (!janet_struct_proto(s1) && janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1850|  10.9k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1845|  5.49k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                              if (!janet_struct_proto(s1) && janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1850|  5.49k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1845|  5.49k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1850:31): [True: 0, False: 5.49k]
  |  |  ------------------
  ------------------
  |  Branch (35487:21): [True: 5.49k, False: 0]
  ------------------
35488|  5.49k|                push_traversal_node(janet_struct_head(s1), janet_struct_head(s2), 0);
  ------------------
  |  | 1845|  5.49k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
                              push_traversal_node(janet_struct_head(s1), janet_struct_head(s2), 0);
  ------------------
  |  | 1845|  5.49k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
35489|  5.49k|                break;
35490|  5.49k|            }
35491|      0|            break;
35492|   426M|        }
35493|   426M|    } while (!traversal_next(&x, &y));
  ------------------
  |  Branch (35493:14): [True: 572k, False: 128M]
  ------------------
35494|   128M|    return 1;
35495|   547M|}
janet_hash:
35507|  1.01G|int32_t janet_hash(Janet x) {
35508|  1.01G|    int32_t hash = 0;
35509|  1.01G|    switch (janet_type(x)) {
  ------------------
  |  |  795|  1.01G|    (isnan((x).number) \
  |  |  796|  1.01G|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  1.01G|        : JANET_NUMBER)
  ------------------
  |  Branch (35509:13): [True: 984M, False: 29.7M]
  ------------------
35510|   411M|        case JANET_NIL:
  ------------------
  |  Branch (35510:9): [True: 411M, False: 603M]
  ------------------
35511|   411M|            hash = 0;
35512|   411M|            break;
35513|  55.4k|        case JANET_BOOLEAN:
  ------------------
  |  Branch (35513:9): [True: 55.4k, False: 1.01G]
  ------------------
35514|  55.4k|            hash = janet_unwrap_boolean(x);
  ------------------
  |  |  838|  55.4k|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
35515|  55.4k|            break;
35516|  9.07M|        case JANET_STRING:
  ------------------
  |  Branch (35516:9): [True: 9.07M, False: 1.00G]
  ------------------
35517|   318M|        case JANET_SYMBOL:
  ------------------
  |  Branch (35517:9): [True: 309M, False: 705M]
  ------------------
35518|   397M|        case JANET_KEYWORD:
  ------------------
  |  Branch (35518:9): [True: 79.5M, False: 934M]
  ------------------
35519|   397M|            hash = janet_string_hash(janet_unwrap_string(x));
  ------------------
  |  | 1813|   397M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1811|   397M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
35520|   397M|            break;
35521|  48.0M|        case JANET_TUPLE:
  ------------------
  |  Branch (35521:9): [True: 48.0M, False: 966M]
  ------------------
35522|  48.0M|            hash = janet_tuple_hash(janet_unwrap_tuple(x));
  ------------------
  |  | 1802|  48.0M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1799|  48.0M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
35523|  48.0M|            uint32_t inc = (janet_tuple_flag(janet_unwrap_tuple(x)) & JANET_TUPLE_FLAG_BRACKETCTOR) ? 1 : 0;
  ------------------
  |  | 1805|  48.0M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1799|  48.0M|#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;
  ------------------
  |  | 1797|  48.0M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (35523:28): [True: 18.1M, False: 29.9M]
  ------------------
35524|  48.0M|            hash = (int32_t)((uint32_t)hash + inc); /* avoid overflow undefined behavior */
35525|  48.0M|            break;
35526|   127k|        case JANET_STRUCT:
  ------------------
  |  Branch (35526:9): [True: 127k, False: 1.01G]
  ------------------
35527|   127k|            hash = janet_struct_hash(janet_unwrap_struct(x));
  ------------------
  |  | 1849|   127k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1845|   127k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
35528|   127k|            break;
35529|  29.8M|        case JANET_NUMBER: {
  ------------------
  |  Branch (35529:9): [True: 29.8M, False: 984M]
  ------------------
35530|  29.8M|            union {
35531|  29.8M|                double d;
35532|  29.8M|                uint64_t u;
35533|  29.8M|            } as;
35534|  29.8M|            as.d = janet_unwrap_number(x);
  ------------------
  |  |  839|  29.8M|#define janet_unwrap_number(x) ((x).number)
  ------------------
35535|  29.8M|            as.d += 0.0; /* normalize negative 0 */
35536|  29.8M|            as.u = murmur64(as.u);
35537|  29.8M|            uint32_t hi = (uint32_t)(as.u >> 32);
35538|  29.8M|            hash = (int32_t)hi;
35539|  29.8M|            break;
35540|   318M|        }
35541|  85.8k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35541:9): [True: 85.8k, False: 1.01G]
  ------------------
35542|  85.8k|            JanetAbstract xx = janet_unwrap_abstract(x);
  ------------------
  |  |  866|  85.8k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
35543|  85.8k|            const JanetAbstractType *at = janet_abstract_type(xx);
  ------------------
  |  | 1898|  85.8k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|  85.8k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35544|  85.8k|            if (at->hash != NULL) {
  ------------------
  |  Branch (35544:17): [True: 10.9k, False: 74.8k]
  ------------------
35545|  10.9k|                hash = at->hash(xx, janet_abstract_size(xx));
  ------------------
  |  | 1899|  10.9k|#define janet_abstract_size(u) (janet_abstract_head(u)->size)
  |  |  ------------------
  |  |  |  | 1896|  10.9k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35546|  10.9k|                break;
35547|  10.9k|            }
35548|  85.8k|        }
35549|       |        /* fallthrough */
35550|   127M|        default:
  ------------------
  |  Branch (35550:9): [True: 127M, False: 886M]
  ------------------
35551|   127M|            if (sizeof(double) == sizeof(void *)) {
  ------------------
  |  Branch (35551:17): [True: 127M, Folded]
  ------------------
35552|       |                /* Assuming 8 byte pointer (8 byte aligned) */
35553|   127M|                uint64_t i = murmur64(janet_u64(x));
  ------------------
  |  |  788|   127M|#define janet_u64(x) ((x).u64)
  ------------------
35554|   127M|                hash = (int32_t)(i >> 32);
35555|  18.4E|            } else {
35556|       |                /* Assuming 4 byte pointer (or smaller) */
35557|  18.4E|                uintptr_t diff = (uintptr_t) janet_unwrap_pointer(x);
  ------------------
  |  |  867|  18.4E|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
35558|  18.4E|                uint32_t hilo = (uint32_t) diff * 2654435769u;
35559|  18.4E|                hash = (int32_t)((hilo << 16) | (hilo >> 16));
35560|  18.4E|            }
35561|   127M|            break;
35562|  1.01G|    }
35563|  1.01G|    return hash;
35564|  1.01G|}
janet_compare:
35569|   293k|int janet_compare(Janet x, Janet y) {
35570|   293k|    janet_vm.traversal = janet_vm.traversal_base;
35571|   293k|    int status;
35572|   382k|    do {
35573|   382k|        JanetType tx = janet_type(x);
  ------------------
  |  |  795|   382k|    (isnan((x).number) \
  |  |  796|   382k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   382k|        : JANET_NUMBER)
  ------------------
  |  Branch (35573:24): [True: 379k, False: 2.99k]
  ------------------
35574|   382k|        JanetType ty = janet_type(y);
  ------------------
  |  |  795|   382k|    (isnan((x).number) \
  |  |  796|   382k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   382k|        : JANET_NUMBER)
  ------------------
  |  Branch (35574:24): [True: 380k, False: 1.40k]
  ------------------
35575|   382k|        if (tx != ty) return tx < ty ? -1 : 1;
  ------------------
  |  Branch (35575:13): [True: 15.0k, False: 367k]
  |  Branch (35575:30): [True: 12.0k, False: 2.97k]
  ------------------
35576|   367k|        switch (tx) {
35577|  4.85k|            case JANET_NIL:
  ------------------
  |  Branch (35577:13): [True: 4.85k, False: 362k]
  ------------------
35578|  4.85k|                break;
35579|    291|            case JANET_BOOLEAN: {
  ------------------
  |  Branch (35579:13): [True: 291, False: 366k]
  ------------------
35580|    291|                int diff = janet_unwrap_boolean(x) - janet_unwrap_boolean(y);
  ------------------
  |  |  838|    291|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
                              int diff = janet_unwrap_boolean(x) - janet_unwrap_boolean(y);
  ------------------
  |  |  838|    291|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
35581|    291|                if (diff) return diff;
  ------------------
  |  Branch (35581:21): [True: 225, False: 66]
  ------------------
35582|     66|                break;
35583|    291|            }
35584|  1.02k|            case JANET_NUMBER: {
  ------------------
  |  Branch (35584:13): [True: 1.02k, False: 366k]
  ------------------
35585|  1.02k|                double xx = janet_unwrap_number(x);
  ------------------
  |  |  839|  1.02k|#define janet_unwrap_number(x) ((x).number)
  ------------------
35586|  1.02k|                double yy = janet_unwrap_number(y);
  ------------------
  |  |  839|  1.02k|#define janet_unwrap_number(x) ((x).number)
  ------------------
35587|  1.02k|                if (xx == yy) {
  ------------------
  |  Branch (35587:21): [True: 819, False: 205]
  ------------------
35588|    819|                    break;
35589|    819|                } else {
35590|    205|                    return (xx < yy) ? -1 : 1;
  ------------------
  |  Branch (35590:28): [True: 85, False: 120]
  ------------------
35591|    205|                }
35592|  1.02k|            }
35593|  2.15k|            case JANET_STRING:
  ------------------
  |  Branch (35593:13): [True: 2.15k, False: 364k]
  ------------------
35594|   298k|            case JANET_SYMBOL:
  ------------------
  |  Branch (35594:13): [True: 295k, False: 71.1k]
  ------------------
35595|   306k|            case JANET_KEYWORD: {
  ------------------
  |  Branch (35595:13): [True: 8.81k, False: 358k]
  ------------------
35596|   306k|                int diff = janet_string_compare(janet_unwrap_string(x), janet_unwrap_string(y));
  ------------------
  |  |  863|   306k|#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|   306k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
35597|   306k|                if (diff) return diff;
  ------------------
  |  Branch (35597:21): [True: 223k, False: 83.0k]
  ------------------
35598|  83.0k|                break;
35599|   306k|            }
35600|  83.0k|            case JANET_ABSTRACT: {
  ------------------
  |  Branch (35600:13): [True: 206, False: 366k]
  ------------------
35601|    206|                int diff = janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y));
  ------------------
  |  |  866|    206|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
                              int diff = janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y));
  ------------------
  |  |  866|    206|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
35602|    206|                if (diff) return diff;
  ------------------
  |  Branch (35602:21): [True: 128, False: 78]
  ------------------
35603|     78|                break;
35604|    206|            }
35605|  10.1k|            default: {
  ------------------
  |  Branch (35605:13): [True: 10.1k, False: 356k]
  ------------------
35606|  10.1k|                if (janet_unwrap_pointer(x) == janet_unwrap_pointer(y)) {
  ------------------
  |  |  867|  10.1k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
                              if (janet_unwrap_pointer(x) == janet_unwrap_pointer(y)) {
  ------------------
  |  |  867|  10.1k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (35606:21): [True: 2.22k, False: 7.97k]
  ------------------
35607|  2.22k|                    break;
35608|  7.97k|                } else {
35609|  7.97k|                    return janet_unwrap_pointer(x) > janet_unwrap_pointer(y) ? 1 : -1;
  ------------------
  |  |  867|  7.97k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
                                  return janet_unwrap_pointer(x) > janet_unwrap_pointer(y) ? 1 : -1;
  ------------------
  |  |  867|  7.97k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (35609:28): [True: 341, False: 7.63k]
  ------------------
35610|  7.97k|                }
35611|  10.1k|            }
35612|  42.9k|            case JANET_TUPLE: {
  ------------------
  |  Branch (35612:13): [True: 42.9k, False: 324k]
  ------------------
35613|  42.9k|                const Janet *lhs = janet_unwrap_tuple(x);
  ------------------
  |  |  858|  42.9k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
35614|  42.9k|                const Janet *rhs = janet_unwrap_tuple(y);
  ------------------
  |  |  858|  42.9k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
35615|  42.9k|                if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(lhs) ^ janet_tuple_flag(rhs))) {
  ------------------
  |  | 1797|  42.9k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
                              if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(lhs) ^ janet_tuple_flag(rhs))) {
  ------------------
  |  | 1805|  42.9k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1799|  42.9k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                              if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(lhs) ^ janet_tuple_flag(rhs))) {
  ------------------
  |  | 1805|  42.9k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1799|  42.9k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35615:21): [True: 37, False: 42.9k]
  ------------------
35616|     37|                    return (janet_tuple_flag(lhs) & JANET_TUPLE_FLAG_BRACKETCTOR) ? 1 : -1;
  ------------------
  |  | 1805|     37|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1799|     37|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                                  return (janet_tuple_flag(lhs) & JANET_TUPLE_FLAG_BRACKETCTOR) ? 1 : -1;
  ------------------
  |  | 1797|     37|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (35616:28): [True: 5, False: 32]
  ------------------
35617|     37|                }
35618|  42.9k|                push_traversal_node(janet_tuple_head(lhs), janet_tuple_head(rhs), 1);
  ------------------
  |  | 1799|  42.9k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
                              push_traversal_node(janet_tuple_head(lhs), janet_tuple_head(rhs), 1);
  ------------------
  |  | 1799|  42.9k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
35619|  42.9k|                break;
35620|  42.9k|            }
35621|    583|            case JANET_STRUCT: {
  ------------------
  |  Branch (35621:13): [True: 583, False: 366k]
  ------------------
35622|    583|                const JanetKV *lhs = janet_unwrap_struct(x);
  ------------------
  |  |  857|    583|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
35623|    583|                const JanetKV *rhs = janet_unwrap_struct(y);
  ------------------
  |  |  857|    583|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
35624|    583|                int32_t llen = janet_struct_capacity(lhs);
  ------------------
  |  | 1848|    583|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1845|    583|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
35625|    583|                int32_t rlen = janet_struct_capacity(rhs);
  ------------------
  |  | 1848|    583|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1845|    583|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
35626|    583|                int32_t lhash = janet_struct_hash(lhs);
  ------------------
  |  | 1849|    583|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1845|    583|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
35627|    583|                int32_t rhash = janet_struct_hash(rhs);
  ------------------
  |  | 1849|    583|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1845|    583|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
35628|    583|                if (llen < rlen) return -1;
  ------------------
  |  Branch (35628:21): [True: 16, False: 567]
  ------------------
35629|    567|                if (llen > rlen) return 1;
  ------------------
  |  Branch (35629:21): [True: 20, False: 547]
  ------------------
35630|    547|                if (lhash < rhash) return -1;
  ------------------
  |  Branch (35630:21): [True: 59, False: 488]
  ------------------
35631|    488|                if (lhash > rhash) return 1;
  ------------------
  |  Branch (35631:21): [True: 55, False: 433]
  ------------------
35632|    433|                push_traversal_node(janet_struct_head(lhs), janet_struct_head(rhs), 0);
  ------------------
  |  | 1845|    433|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
                              push_traversal_node(janet_struct_head(lhs), janet_struct_head(rhs), 0);
  ------------------
  |  | 1845|    433|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
35633|    433|                break;
35634|    488|            }
35635|   367k|        }
35636|   367k|    } while (!(status = traversal_next(&x, &y)));
  ------------------
  |  Branch (35636:14): [True: 88.8k, False: 45.6k]
  ------------------
35637|  45.6k|    return status - 2;
35638|   293k|}
janet_in:
35651|  91.7M|Janet janet_in(Janet ds, Janet key) {
35652|  91.7M|    Janet value;
35653|  91.7M|    JanetType type = janet_type(ds);
  ------------------
  |  |  795|  91.7M|    (isnan((x).number) \
  |  |  796|  91.7M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  91.7M|        : JANET_NUMBER)
  ------------------
  |  Branch (35653:22): [True: 91.7M, False: 0]
  ------------------
35654|  91.7M|    switch (type) {
35655|      2|        default:
  ------------------
  |  Branch (35655:9): [True: 2, False: 91.7M]
  ------------------
35656|      2|            janet_panicf("expected %T, got %v", JANET_TFLAG_LENGTHABLE, ds);
  ------------------
  |  |  615|      2|#define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  614|      2|#define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      2|#define JANET_TFLAG_TABLE (1 << JANET_TABLE)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  605|      2|#define JANET_TFLAG_STRUCT (1 << JANET_STRUCT)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35657|      0|            break;
35658|  11.3M|        case JANET_STRUCT:
  ------------------
  |  Branch (35658:9): [True: 11.3M, False: 80.3M]
  ------------------
35659|  11.3M|            value = janet_struct_get(janet_unwrap_struct(ds), key);
  ------------------
  |  |  857|  11.3M|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
35660|  11.3M|            break;
35661|   920k|        case JANET_TABLE:
  ------------------
  |  Branch (35661:9): [True: 920k, False: 90.7M]
  ------------------
35662|   920k|            value = janet_table_get(janet_unwrap_table(ds), key);
  ------------------
  |  |  861|   920k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
35663|   920k|            break;
35664|   935k|        case JANET_ARRAY: {
  ------------------
  |  Branch (35664:9): [True: 935k, False: 90.7M]
  ------------------
35665|   935k|            JanetArray *array = janet_unwrap_array(ds);
  ------------------
  |  |  860|   935k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
35666|   935k|            int32_t index = getter_checkint(type, key, array->count);
35667|   935k|            value = array->data[index];
35668|   935k|            break;
35669|      0|        }
35670|  77.8M|        case JANET_TUPLE: {
  ------------------
  |  Branch (35670:9): [True: 77.8M, False: 13.8M]
  ------------------
35671|  77.8M|            const Janet *tuple = janet_unwrap_tuple(ds);
  ------------------
  |  |  858|  77.8M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
35672|  77.8M|            int32_t len = janet_tuple_length(tuple);
  ------------------
  |  | 1801|  77.8M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|  77.8M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
35673|  77.8M|            value = tuple[getter_checkint(type, key, len)];
35674|  77.8M|            break;
35675|      0|        }
35676|  18.7k|        case JANET_BUFFER: {
  ------------------
  |  Branch (35676:9): [True: 18.7k, False: 91.6M]
  ------------------
35677|  18.7k|            JanetBuffer *buffer = janet_unwrap_buffer(ds);
  ------------------
  |  |  862|  18.7k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
35678|  18.7k|            int32_t index = getter_checkint(type, key, buffer->count);
35679|  18.7k|            value = janet_wrap_integer(buffer->data[index]);
  ------------------
  |  |  967|  18.7k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  18.7k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35680|  18.7k|            break;
35681|      0|        }
35682|  59.7k|        case JANET_STRING:
  ------------------
  |  Branch (35682:9): [True: 59.7k, False: 91.6M]
  ------------------
35683|   201k|        case JANET_SYMBOL:
  ------------------
  |  Branch (35683:9): [True: 142k, False: 91.5M]
  ------------------
35684|   202k|        case JANET_KEYWORD: {
  ------------------
  |  Branch (35684:9): [True: 1.09k, False: 91.7M]
  ------------------
35685|   202k|            const uint8_t *str = janet_unwrap_string(ds);
  ------------------
  |  |  863|   202k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
35686|   202k|            int32_t index = getter_checkint(type, key, janet_string_length(str));
  ------------------
  |  | 1812|   202k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|   202k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
35687|   202k|            value = janet_wrap_integer(str[index]);
  ------------------
  |  |  967|   202k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|   202k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35688|   202k|            break;
35689|   201k|        }
35690|   409k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35690:9): [True: 409k, False: 91.3M]
  ------------------
35691|   409k|            JanetAbstractType *type = (JanetAbstractType *)janet_abstract_type(janet_unwrap_abstract(ds));
  ------------------
  |  | 1898|   409k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|   409k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35692|   409k|            if (type->get) {
  ------------------
  |  Branch (35692:17): [True: 409k, False: 0]
  ------------------
35693|   409k|                if (!(type->get)(janet_unwrap_abstract(ds), key, &value))
  ------------------
  |  |  866|   409k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (35693:21): [True: 13, False: 409k]
  ------------------
35694|     13|                    janet_panicf("key %v not found in %v ", key, ds);
35695|   409k|            } else {
35696|      0|                janet_panicf("no getter for %v", ds);
35697|      0|            }
35698|   409k|            break;
35699|   409k|        }
35700|   409k|        case JANET_FIBER: {
  ------------------
  |  Branch (35700:9): [True: 1, False: 91.7M]
  ------------------
35701|       |            /* Bit of a hack to allow iterating over fibers. */
35702|      1|            if (janet_equals(key, janet_wrap_integer(0))) {
  ------------------
  |  |  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)
  |  |  ------------------
  ------------------
  |  Branch (35702:17): [True: 0, False: 1]
  ------------------
35703|      0|                return janet_unwrap_fiber(ds)->last_value;
  ------------------
  |  |  859|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
35704|      1|            } else {
35705|      1|                janet_panicf("expected key 0, got %v", key);
35706|      1|            }
35707|      1|        }
35708|  91.7M|    }
35709|  91.7M|    return value;
35710|  91.7M|}
janet_get:
35712|  13.2M|Janet janet_get(Janet ds, Janet key) {
35713|  13.2M|    JanetType t = janet_type(ds);
  ------------------
  |  |  795|  13.2M|    (isnan((x).number) \
  |  |  796|  13.2M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  13.2M|        : JANET_NUMBER)
  ------------------
  |  Branch (35713:19): [True: 13.2M, False: 428]
  ------------------
35714|  13.2M|    switch (t) {
35715|    530|        default:
  ------------------
  |  Branch (35715:9): [True: 530, False: 13.2M]
  ------------------
35716|    530|            return janet_wrap_nil();
  ------------------
  |  |  831|    530|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    530|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    530|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    530|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35717|   111k|        case JANET_STRING:
  ------------------
  |  Branch (35717:9): [True: 111k, False: 13.1M]
  ------------------
35718|   111k|        case JANET_SYMBOL:
  ------------------
  |  Branch (35718:9): [True: 57, False: 13.2M]
  ------------------
35719|   111k|        case JANET_KEYWORD: {
  ------------------
  |  Branch (35719:9): [True: 1, False: 13.2M]
  ------------------
35720|   111k|            if (!janet_checkint(key)) return janet_wrap_nil();
  ------------------
  |  |  831|    135|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    135|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    135|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    135|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35720:17): [True: 135, False: 110k]
  ------------------
35721|   110k|            int32_t index = janet_unwrap_integer(key);
  ------------------
  |  |  966|   110k|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|   110k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
35722|   110k|            if (index < 0) return janet_wrap_nil();
  ------------------
  |  |  831|      9|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      9|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      9|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      9|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35722:17): [True: 9, False: 110k]
  ------------------
35723|   110k|            const uint8_t *str = janet_unwrap_string(ds);
  ------------------
  |  |  863|   110k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
35724|   110k|            if (index >= janet_string_length(str)) return janet_wrap_nil();
  ------------------
  |  | 1812|   110k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|   110k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
                          if (index >= janet_string_length(str)) return janet_wrap_nil();
  ------------------
  |  |  831|    266|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    266|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    266|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    266|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35724:17): [True: 266, False: 110k]
  ------------------
35725|   110k|            return janet_wrap_integer(str[index]);
  ------------------
  |  |  967|   110k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|   110k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35726|   110k|        }
35727|   317k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35727:9): [True: 317k, False: 12.9M]
  ------------------
35728|   317k|            Janet value;
35729|   317k|            void *abst = janet_unwrap_abstract(ds);
  ------------------
  |  |  866|   317k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
35730|   317k|            JanetAbstractType *type = (JanetAbstractType *)janet_abstract_type(abst);
  ------------------
  |  | 1898|   317k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|   317k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35731|   317k|            if (!type->get) 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 (35731:17): [True: 0, False: 317k]
  ------------------
35732|   317k|            if ((type->get)(abst, key, &value))
  ------------------
  |  Branch (35732:17): [True: 317k, False: 9]
  ------------------
35733|   317k|                return value;
35734|      9|            return janet_wrap_nil();
  ------------------
  |  |  831|      9|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      9|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      9|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      9|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35735|   317k|        }
35736|  29.7k|        case JANET_ARRAY:
  ------------------
  |  Branch (35736:9): [True: 29.7k, False: 13.1M]
  ------------------
35737|  2.15M|        case JANET_TUPLE:
  ------------------
  |  Branch (35737:9): [True: 2.12M, False: 11.1M]
  ------------------
35738|  2.37M|        case JANET_BUFFER: {
  ------------------
  |  Branch (35738:9): [True: 215k, False: 13.0M]
  ------------------
35739|  2.37M|            if (!janet_checkint(key)) return janet_wrap_nil();
  ------------------
  |  |  831|     41|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     41|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     41|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     41|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35739:17): [True: 41, False: 2.37M]
  ------------------
35740|  2.37M|            int32_t index = janet_unwrap_integer(key);
  ------------------
  |  |  966|  2.37M|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|  2.37M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
35741|  2.37M|            if (index < 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 (35741:17): [True: 0, False: 2.37M]
  ------------------
35742|  2.37M|            if (t == JANET_ARRAY) {
  ------------------
  |  Branch (35742:17): [True: 29.7k, False: 2.34M]
  ------------------
35743|  29.7k|                JanetArray *a = janet_unwrap_array(ds);
  ------------------
  |  |  860|  29.7k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
35744|  29.7k|                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 (35744:21): [True: 0, False: 29.7k]
  ------------------
35745|  29.7k|                return a->data[index];
35746|  2.34M|            } else if (t == JANET_BUFFER) {
  ------------------
  |  Branch (35746:24): [True: 215k, False: 2.12M]
  ------------------
35747|   215k|                JanetBuffer *b = janet_unwrap_buffer(ds);
  ------------------
  |  |  862|   215k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
35748|   215k|                if (index >= b->count) return janet_wrap_nil();
  ------------------
  |  |  831|   204k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   204k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   204k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   204k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35748:21): [True: 204k, False: 11.1k]
  ------------------
35749|  11.1k|                return janet_wrap_integer(b->data[index]);
  ------------------
  |  |  967|  11.1k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  11.1k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35750|  2.12M|            } else {
35751|  2.12M|                const Janet *t = janet_unwrap_tuple(ds);
  ------------------
  |  |  858|  2.12M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
35752|  2.12M|                if (index >= janet_tuple_length(t)) return janet_wrap_nil();
  ------------------
  |  | 1801|  2.12M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|  2.12M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                              if (index >= janet_tuple_length(t)) return janet_wrap_nil();
  ------------------
  |  |  831|  1.69k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.69k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.69k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.69k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35752:21): [True: 1.69k, False: 2.12M]
  ------------------
35753|  2.12M|                return t[index];
35754|  2.12M|            }
35755|  2.37M|        }
35756|  1.03M|        case JANET_TABLE: {
  ------------------
  |  Branch (35756:9): [True: 1.03M, False: 12.1M]
  ------------------
35757|  1.03M|            return janet_table_get(janet_unwrap_table(ds), key);
  ------------------
  |  |  861|  1.03M|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
35758|  2.37M|        }
35759|  9.38M|        case JANET_STRUCT: {
  ------------------
  |  Branch (35759:9): [True: 9.38M, False: 3.84M]
  ------------------
35760|  9.38M|            const JanetKV *st = janet_unwrap_struct(ds);
  ------------------
  |  |  857|  9.38M|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
35761|  9.38M|            return janet_struct_get(st, key);
35762|  2.37M|        }
35763|     17|        case JANET_FIBER: {
  ------------------
  |  Branch (35763:9): [True: 17, False: 13.2M]
  ------------------
35764|       |            /* Bit of a hack to allow iterating over fibers. */
35765|     17|            if (janet_equals(key, janet_wrap_integer(0))) {
  ------------------
  |  |  967|     17|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|     17|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
  |  Branch (35765:17): [True: 0, False: 17]
  ------------------
35766|      0|                return janet_unwrap_fiber(ds)->last_value;
  ------------------
  |  |  859|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
35767|     17|            } else {
35768|     17|                return 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35769|     17|            }
35770|     17|        }
35771|  13.2M|    }
35772|  13.2M|}
janet_getindex:
35774|   373k|Janet janet_getindex(Janet ds, int32_t index) {
35775|   373k|    Janet value;
35776|   373k|    if (index < 0) janet_panic("expected non-negative index");
  ------------------
  |  Branch (35776:9): [True: 0, False: 373k]
  ------------------
35777|   373k|    switch (janet_type(ds)) {
  ------------------
  |  |  795|   373k|    (isnan((x).number) \
  |  |  796|   373k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   373k|        : JANET_NUMBER)
  ------------------
  |  Branch (35777:13): [True: 373k, False: 288]
  ------------------
35778|    311|        default:
  ------------------
  |  Branch (35778:9): [True: 311, False: 373k]
  ------------------
35779|    311|            janet_panicf("expected %T, got %v", JANET_TFLAG_LENGTHABLE, ds);
  ------------------
  |  |  615|    311|#define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  612|    311|#define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  599|    311|#define JANET_TFLAG_STRING (1 << JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  600|    311|#define JANET_TFLAG_SYMBOL (1 << JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  606|    311|#define JANET_TFLAG_BUFFER (1 << JANET_BUFFER)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  601|    311|#define JANET_TFLAG_KEYWORD (1 << JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  613|    311|#define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  602|    311|#define JANET_TFLAG_ARRAY (1 << JANET_ARRAY)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  603|    311|#define JANET_TFLAG_TUPLE (1 << JANET_TUPLE)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  614|    311|#define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|    311|#define JANET_TFLAG_TABLE (1 << JANET_TABLE)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  605|    311|#define JANET_TFLAG_STRUCT (1 << JANET_STRUCT)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35780|      0|            break;
35781|  5.86k|        case JANET_STRING:
  ------------------
  |  Branch (35781:9): [True: 5.86k, False: 367k]
  ------------------
35782|  6.99k|        case JANET_SYMBOL:
  ------------------
  |  Branch (35782:9): [True: 1.12k, False: 372k]
  ------------------
35783|  7.14k|        case JANET_KEYWORD:
  ------------------
  |  Branch (35783:9): [True: 158, False: 373k]
  ------------------
35784|  7.14k|            if (index >= janet_string_length(janet_unwrap_string(ds))) {
  ------------------
  |  | 1812|  7.14k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|  7.14k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35784:17): [True: 6.22k, False: 926]
  ------------------
35785|  6.22k|                value = janet_wrap_nil();
  ------------------
  |  |  831|  6.22k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  6.22k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.22k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.22k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35786|  6.22k|            } else {
35787|    926|                value = janet_wrap_integer(janet_unwrap_string(ds)[index]);
  ------------------
  |  |  967|    926|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|    926|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35788|    926|            }
35789|  7.14k|            break;
35790|    112|        case JANET_ARRAY:
  ------------------
  |  Branch (35790:9): [True: 112, False: 373k]
  ------------------
35791|    112|            if (index >= janet_unwrap_array(ds)->count) {
  ------------------
  |  |  860|    112|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (35791:17): [True: 86, False: 26]
  ------------------
35792|     86|                value = janet_wrap_nil();
  ------------------
  |  |  831|     86|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     86|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     86|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     86|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35793|     86|            } else {
35794|     26|                value = janet_unwrap_array(ds)->data[index];
  ------------------
  |  |  860|     26|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
35795|     26|            }
35796|    112|            break;
35797|    218|        case JANET_BUFFER:
  ------------------
  |  Branch (35797:9): [True: 218, False: 373k]
  ------------------
35798|    218|            if (index >= janet_unwrap_buffer(ds)->count) {
  ------------------
  |  |  862|    218|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (35798:17): [True: 137, False: 81]
  ------------------
35799|    137|                value = janet_wrap_nil();
  ------------------
  |  |  831|    137|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    137|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    137|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    137|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35800|    137|            } else {
35801|     81|                value = janet_wrap_integer(janet_unwrap_buffer(ds)->data[index]);
  ------------------
  |  |  967|     81|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|     81|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35802|     81|            }
35803|    218|            break;
35804|   365k|        case JANET_TUPLE:
  ------------------
  |  Branch (35804:9): [True: 365k, False: 7.81k]
  ------------------
35805|   365k|            if (index >= janet_tuple_length(janet_unwrap_tuple(ds))) {
  ------------------
  |  | 1801|   365k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|   365k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35805:17): [True: 70, False: 365k]
  ------------------
35806|     70|                value = janet_wrap_nil();
  ------------------
  |  |  831|     70|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     70|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     70|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     70|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35807|   365k|            } else {
35808|   365k|                value = janet_unwrap_tuple(ds)[index];
  ------------------
  |  |  858|   365k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
35809|   365k|            }
35810|   365k|            break;
35811|      2|        case JANET_TABLE:
  ------------------
  |  Branch (35811:9): [True: 2, False: 373k]
  ------------------
35812|      2|            value = janet_table_get(janet_unwrap_table(ds), janet_wrap_integer(index));
  ------------------
  |  |  861|      2|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
                          value = janet_table_get(janet_unwrap_table(ds), janet_wrap_integer(index));
  ------------------
  |  |  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)
  |  |  ------------------
  ------------------
35813|      2|            break;
35814|     15|        case JANET_STRUCT:
  ------------------
  |  Branch (35814:9): [True: 15, False: 373k]
  ------------------
35815|     15|            value = janet_struct_get(janet_unwrap_struct(ds), janet_wrap_integer(index));
  ------------------
  |  |  857|     15|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
                          value = janet_struct_get(janet_unwrap_struct(ds), janet_wrap_integer(index));
  ------------------
  |  |  967|     15|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|     15|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35816|     15|            break;
35817|     12|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35817:9): [True: 12, False: 373k]
  ------------------
35818|     12|            JanetAbstractType *type = (JanetAbstractType *)janet_abstract_type(janet_unwrap_abstract(ds));
  ------------------
  |  | 1898|     12|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|     12|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35819|     12|            if (type->get) {
  ------------------
  |  Branch (35819:17): [True: 12, False: 0]
  ------------------
35820|     12|                if (!(type->get)(janet_unwrap_abstract(ds), janet_wrap_integer(index), &value))
  ------------------
  |  |  866|     12|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
                              if (!(type->get)(janet_unwrap_abstract(ds), janet_wrap_integer(index), &value))
  ------------------
  |  |  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)
  |  |  ------------------
  ------------------
  |  Branch (35820:21): [True: 12, False: 0]
  ------------------
35821|     12|                    value = 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35822|     12|            } else {
35823|      0|                janet_panicf("no getter for %v", ds);
35824|      0|            }
35825|     12|            break;
35826|     12|        }
35827|     12|        case JANET_FIBER: {
  ------------------
  |  Branch (35827:9): [True: 0, False: 373k]
  ------------------
35828|      0|            if (index == 0) {
  ------------------
  |  Branch (35828:17): [True: 0, False: 0]
  ------------------
35829|      0|                value = janet_unwrap_fiber(ds)->last_value;
  ------------------
  |  |  859|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
35830|      0|            } else {
35831|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35832|      0|            }
35833|      0|            break;
35834|     12|        }
35835|   373k|    }
35836|   373k|    return value;
35837|   373k|}
janet_length:
35839|  16.4M|int32_t janet_length(Janet x) {
35840|  16.4M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  16.4M|    (isnan((x).number) \
  |  |  796|  16.4M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  16.4M|        : JANET_NUMBER)
  ------------------
  |  Branch (35840:13): [True: 16.4M, False: 0]
  ------------------
35841|      0|        default:
  ------------------
  |  Branch (35841:9): [True: 0, False: 16.4M]
  ------------------
35842|      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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35843|    160|        case JANET_STRING:
  ------------------
  |  Branch (35843:9): [True: 160, False: 16.4M]
  ------------------
35844|  8.01k|        case JANET_SYMBOL:
  ------------------
  |  Branch (35844:9): [True: 7.85k, False: 16.4M]
  ------------------
35845|  10.4k|        case JANET_KEYWORD:
  ------------------
  |  Branch (35845:9): [True: 2.46k, False: 16.4M]
  ------------------
35846|  10.4k|            return janet_string_length(janet_unwrap_string(x));
  ------------------
  |  | 1812|  10.4k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|  10.4k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
35847|  2.30M|        case JANET_ARRAY:
  ------------------
  |  Branch (35847:9): [True: 2.30M, False: 14.1M]
  ------------------
35848|  2.30M|            return janet_unwrap_array(x)->count;
  ------------------
  |  |  860|  2.30M|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
35849|      1|        case JANET_BUFFER:
  ------------------
  |  Branch (35849:9): [True: 1, False: 16.4M]
  ------------------
35850|      1|            return janet_unwrap_buffer(x)->count;
  ------------------
  |  |  862|      1|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
35851|  14.1M|        case JANET_TUPLE:
  ------------------
  |  Branch (35851:9): [True: 14.1M, False: 2.31M]
  ------------------
35852|  14.1M|            return janet_tuple_length(janet_unwrap_tuple(x));
  ------------------
  |  | 1801|  14.1M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|  14.1M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
35853|      0|        case JANET_STRUCT:
  ------------------
  |  Branch (35853:9): [True: 0, False: 16.4M]
  ------------------
35854|      0|            return janet_struct_length(janet_unwrap_struct(x));
  ------------------
  |  | 1847|      0|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1845|      0|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
35855|      0|        case JANET_TABLE:
  ------------------
  |  Branch (35855:9): [True: 0, False: 16.4M]
  ------------------
35856|      0|            return janet_unwrap_table(x)->count;
  ------------------
  |  |  861|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
35857|      0|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35857:9): [True: 0, False: 16.4M]
  ------------------
35858|      0|            void *abst = janet_unwrap_abstract(x);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
35859|      0|            const JanetAbstractType *type = janet_abstract_type(abst);
  ------------------
  |  | 1898|      0|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35860|      0|            if (type->length != NULL) {
  ------------------
  |  Branch (35860:17): [True: 0, False: 0]
  ------------------
35861|      0|                size_t len = type->length(abst, janet_abstract_size(abst));
  ------------------
  |  | 1899|      0|#define janet_abstract_size(u) (janet_abstract_head(u)->size)
  |  |  ------------------
  |  |  |  | 1896|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35862|      0|                if (len > INT32_MAX) {
  ------------------
  |  Branch (35862:21): [True: 0, False: 0]
  ------------------
35863|      0|                    janet_panicf("invalid integer length %u", len);
35864|      0|                }
35865|      0|                return (int32_t)(len);
35866|      0|            }
35867|      0|            Janet argv[1] = { x };
35868|      0|            Janet len = janet_mcall("length", 1, argv);
35869|      0|            if (!janet_checkint(len))
  ------------------
  |  Branch (35869:17): [True: 0, False: 0]
  ------------------
35870|      0|                janet_panicf("invalid integer length %v", len);
35871|      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)
  |  |  ------------------
  ------------------
35872|      0|        }
35873|  16.4M|    }
35874|  16.4M|}
janet_lengthv:
35876|  42.3M|Janet janet_lengthv(Janet x) {
35877|  42.3M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  42.3M|    (isnan((x).number) \
  |  |  796|  42.3M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  42.3M|        : JANET_NUMBER)
  ------------------
  |  Branch (35877:13): [True: 42.3M, False: 0]
  ------------------
35878|      0|        default:
  ------------------
  |  Branch (35878:9): [True: 0, False: 42.3M]
  ------------------
35879|      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)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35880|  12.5k|        case JANET_STRING:
  ------------------
  |  Branch (35880:9): [True: 12.5k, False: 42.3M]
  ------------------
35881|  12.8k|        case JANET_SYMBOL:
  ------------------
  |  Branch (35881:9): [True: 278, False: 42.3M]
  ------------------
35882|  13.1k|        case JANET_KEYWORD:
  ------------------
  |  Branch (35882:9): [True: 281, False: 42.3M]
  ------------------
35883|  13.1k|            return janet_wrap_integer(janet_string_length(janet_unwrap_string(x)));
  ------------------
  |  |  967|  13.1k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  13.1k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35884|   220k|        case JANET_ARRAY:
  ------------------
  |  Branch (35884:9): [True: 220k, False: 42.0M]
  ------------------
35885|   220k|            return janet_wrap_integer(janet_unwrap_array(x)->count);
  ------------------
  |  |  967|   220k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|   220k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35886|   154k|        case JANET_BUFFER:
  ------------------
  |  Branch (35886:9): [True: 154k, False: 42.1M]
  ------------------
35887|   154k|            return janet_wrap_integer(janet_unwrap_buffer(x)->count);
  ------------------
  |  |  967|   154k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|   154k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35888|  41.8M|        case JANET_TUPLE:
  ------------------
  |  Branch (35888:9): [True: 41.8M, False: 511k]
  ------------------
35889|  41.8M|            return janet_wrap_integer(janet_tuple_length(janet_unwrap_tuple(x)));
  ------------------
  |  |  967|  41.8M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  41.8M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35890|  35.5k|        case JANET_STRUCT:
  ------------------
  |  Branch (35890:9): [True: 35.5k, False: 42.2M]
  ------------------
35891|  35.5k|            return janet_wrap_integer(janet_struct_length(janet_unwrap_struct(x)));
  ------------------
  |  |  967|  35.5k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  35.5k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35892|  87.5k|        case JANET_TABLE:
  ------------------
  |  Branch (35892:9): [True: 87.5k, False: 42.2M]
  ------------------
35893|  87.5k|            return janet_wrap_integer(janet_unwrap_table(x)->count);
  ------------------
  |  |  967|  87.5k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  87.5k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35894|      1|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35894:9): [True: 1, False: 42.3M]
  ------------------
35895|      1|            void *abst = janet_unwrap_abstract(x);
  ------------------
  |  |  866|      1|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
35896|      1|            const JanetAbstractType *type = janet_abstract_type(abst);
  ------------------
  |  | 1898|      1|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|      1|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35897|      1|            if (type->length != NULL) {
  ------------------
  |  Branch (35897:17): [True: 0, False: 1]
  ------------------
35898|      0|                size_t len = type->length(abst, janet_abstract_size(abst));
  ------------------
  |  | 1899|      0|#define janet_abstract_size(u) (janet_abstract_head(u)->size)
  |  |  ------------------
  |  |  |  | 1896|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35899|       |                /* If len is always less then double, we can never overflow */
35900|       |#ifdef JANET_32
35901|       |                return janet_wrap_number(len);
35902|       |#else
35903|      0|                if (len < (size_t) JANET_INTMAX_INT64) {
  ------------------
  |  |  167|      0|#define JANET_INTMAX_INT64 9007199254740992
  ------------------
  |  Branch (35903:21): [True: 0, False: 0]
  ------------------
35904|      0|                    return janet_wrap_number((double) len);
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
35905|      0|                } else {
35906|      0|                    janet_panicf("integer length %u too large", len);
35907|      0|                }
35908|      0|#endif
35909|      0|            }
35910|      1|            Janet argv[1] = { x };
35911|      1|            return janet_mcall("length", 1, argv);
35912|      1|        }
35913|  42.3M|    }
35914|  42.3M|}
janet_putindex:
35916|     17|void janet_putindex(Janet ds, int32_t index, Janet value) {
35917|     17|    switch (janet_type(ds)) {
  ------------------
  |  |  795|     17|    (isnan((x).number) \
  |  |  796|     17|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|     17|        : JANET_NUMBER)
  ------------------
  |  Branch (35917:13): [True: 17, False: 0]
  ------------------
35918|      0|        default:
  ------------------
  |  Branch (35918:9): [True: 0, False: 17]
  ------------------
35919|      0|            janet_panicf("expected %T, got %v",
35920|      0|                         JANET_TFLAG_ARRAY | JANET_TFLAG_BUFFER | JANET_TFLAG_TABLE, ds);
  ------------------
  |  |  602|      0|#define JANET_TFLAG_ARRAY (1 << JANET_ARRAY)
  ------------------
                                       JANET_TFLAG_ARRAY | JANET_TFLAG_BUFFER | JANET_TFLAG_TABLE, ds);
  ------------------
  |  |  606|      0|#define JANET_TFLAG_BUFFER (1 << JANET_BUFFER)
  ------------------
                                       JANET_TFLAG_ARRAY | JANET_TFLAG_BUFFER | JANET_TFLAG_TABLE, ds);
  ------------------
  |  |  604|      0|#define JANET_TFLAG_TABLE (1 << JANET_TABLE)
  ------------------
35921|     17|        case JANET_ARRAY: {
  ------------------
  |  Branch (35921:9): [True: 17, False: 0]
  ------------------
35922|     17|            JanetArray *array = janet_unwrap_array(ds);
  ------------------
  |  |  860|     17|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
35923|     17|            if (index >= array->count) {
  ------------------
  |  Branch (35923:17): [True: 0, False: 17]
  ------------------
35924|      0|                janet_array_ensure(array, index + 1, 2);
35925|      0|                for (int32_t i = array->count; i < index + 1; i++) {
  ------------------
  |  Branch (35925:48): [True: 0, False: 0]
  ------------------
35926|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35927|      0|                }
35928|      0|                array->count = index + 1;
35929|      0|            }
35930|     17|            array->data[index] = value;
35931|     17|            break;
35932|      0|        }
35933|      0|        case JANET_BUFFER: {
  ------------------
  |  Branch (35933:9): [True: 0, False: 17]
  ------------------
35934|      0|            JanetBuffer *buffer = janet_unwrap_buffer(ds);
  ------------------
  |  |  862|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
35935|      0|            if (!janet_checkint(value))
  ------------------
  |  Branch (35935:17): [True: 0, False: 0]
  ------------------
35936|      0|                janet_panicf("can only put integers in buffers, got %v", value);
35937|      0|            if (index >= buffer->count) {
  ------------------
  |  Branch (35937:17): [True: 0, False: 0]
  ------------------
35938|      0|                janet_buffer_ensure(buffer, index + 1, 2);
35939|      0|                memset(buffer->data + buffer->count, 0, index + 1 - buffer->count);
35940|      0|                buffer->count = index + 1;
35941|      0|            }
35942|      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)
  |  |  ------------------
  ------------------
35943|      0|            break;
35944|      0|        }
35945|      0|        case JANET_TABLE: {
  ------------------
  |  Branch (35945:9): [True: 0, False: 17]
  ------------------
35946|      0|            JanetTable *table = janet_unwrap_table(ds);
  ------------------
  |  |  861|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
35947|      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)
  |  |  ------------------
  ------------------
35948|      0|            break;
35949|      0|        }
35950|      0|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35950:9): [True: 0, False: 17]
  ------------------
35951|      0|            JanetAbstractType *type = (JanetAbstractType *)janet_abstract_type(janet_unwrap_abstract(ds));
  ------------------
  |  | 1898|      0|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35952|      0|            if (type->put) {
  ------------------
  |  Branch (35952:17): [True: 0, False: 0]
  ------------------
35953|      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)
  |  |  ------------------
  ------------------
35954|      0|            } else {
35955|      0|                janet_panicf("no setter for %v ", ds);
35956|      0|            }
35957|      0|            break;
35958|      0|        }
35959|     17|    }
35960|     17|}
janet_put:
35962|   646k|void janet_put(Janet ds, Janet key, Janet value) {
35963|   646k|    JanetType type = janet_type(ds);
  ------------------
  |  |  795|   646k|    (isnan((x).number) \
  |  |  796|   646k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   646k|        : JANET_NUMBER)
  ------------------
  |  Branch (35963:22): [True: 646k, False: 0]
  ------------------
35964|   646k|    switch (type) {
35965|      0|        default:
  ------------------
  |  Branch (35965:9): [True: 0, False: 646k]
  ------------------
35966|      0|            janet_panicf("expected %T, got %v",
35967|      0|                         JANET_TFLAG_ARRAY | JANET_TFLAG_BUFFER | JANET_TFLAG_TABLE, ds);
  ------------------
  |  |  602|      0|#define JANET_TFLAG_ARRAY (1 << JANET_ARRAY)
  ------------------
                                       JANET_TFLAG_ARRAY | JANET_TFLAG_BUFFER | JANET_TFLAG_TABLE, ds);
  ------------------
  |  |  606|      0|#define JANET_TFLAG_BUFFER (1 << JANET_BUFFER)
  ------------------
                                       JANET_TFLAG_ARRAY | JANET_TFLAG_BUFFER | JANET_TFLAG_TABLE, ds);
  ------------------
  |  |  604|      0|#define JANET_TFLAG_TABLE (1 << JANET_TABLE)
  ------------------
35968|   346k|        case JANET_ARRAY: {
  ------------------
  |  Branch (35968:9): [True: 346k, False: 299k]
  ------------------
35969|   346k|            JanetArray *array = janet_unwrap_array(ds);
  ------------------
  |  |  860|   346k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
35970|   346k|            int32_t index = getter_checkint(type, key, INT32_MAX - 1);
35971|   346k|            if (index >= array->count) {
  ------------------
  |  Branch (35971:17): [True: 0, False: 346k]
  ------------------
35972|      0|                janet_array_ensure(array, index + 1, 2);
35973|      0|                for (int32_t i = array->count; i < index + 1; i++) {
  ------------------
  |  Branch (35973:48): [True: 0, False: 0]
  ------------------
35974|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35975|      0|                }
35976|      0|                array->count = index + 1;
35977|      0|            }
35978|   346k|            array->data[index] = value;
35979|   346k|            break;
35980|      0|        }
35981|  6.55k|        case JANET_BUFFER: {
  ------------------
  |  Branch (35981:9): [True: 6.55k, False: 640k]
  ------------------
35982|  6.55k|            JanetBuffer *buffer = janet_unwrap_buffer(ds);
  ------------------
  |  |  862|  6.55k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
35983|  6.55k|            int32_t index = getter_checkint(type, key, INT32_MAX - 1);
35984|  6.55k|            if (!janet_checkint(value))
  ------------------
  |  Branch (35984:17): [True: 0, False: 6.55k]
  ------------------
35985|      0|                janet_panicf("can only put integers in buffers, got %v", value);
35986|  6.55k|            if (index >= buffer->count) {
  ------------------
  |  Branch (35986:17): [True: 0, False: 6.55k]
  ------------------
35987|      0|                janet_buffer_ensure(buffer, index + 1, 2);
35988|      0|                memset(buffer->data + buffer->count, 0, index + 1 - buffer->count);
35989|      0|                buffer->count = index + 1;
35990|      0|            }
35991|  6.55k|            buffer->data[index] = (uint8_t)(janet_unwrap_integer(value) & 0xFF);
  ------------------
  |  |  966|  6.55k|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|  6.55k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
35992|  6.55k|            break;
35993|  6.55k|        }
35994|   293k|        case JANET_TABLE:
  ------------------
  |  Branch (35994:9): [True: 293k, False: 353k]
  ------------------
35995|   293k|            janet_table_put(janet_unwrap_table(ds), key, value);
  ------------------
  |  |  861|   293k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
35996|   293k|            break;
35997|      0|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35997:9): [True: 0, False: 646k]
  ------------------
35998|      0|            JanetAbstractType *type = (JanetAbstractType *)janet_abstract_type(janet_unwrap_abstract(ds));
  ------------------
  |  | 1898|      0|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35999|      0|            if (type->put) {
  ------------------
  |  Branch (35999:17): [True: 0, False: 0]
  ------------------
36000|      0|                (type->put)(janet_unwrap_abstract(ds), key, value);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
36001|      0|            } else {
36002|      0|                janet_panicf("no setter for %v ", ds);
36003|      0|            }
36004|      0|            break;
36005|      0|        }
36006|   646k|    }
36007|   646k|}
janet_v_grow:
36042|  5.47M|void *janet_v_grow(void *v, int32_t increment, int32_t itemsize) {
36043|  5.47M|    int32_t dbl_cur = (NULL != v) ? 2 * janet_v__cap(v) : 0;
  ------------------
  |  |  720|  3.12M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  ------------------
  |  |  |  |  719|  3.12M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
  |  Branch (36043:23): [True: 3.12M, False: 2.35M]
  ------------------
36044|  5.47M|    int32_t min_needed = janet_v_count(v) + increment;
  ------------------
  |  |  714|  5.47M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  3.12M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  3.12M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 3.12M, False: 2.35M]
  |  |  ------------------
  ------------------
36045|  5.47M|    int32_t m = dbl_cur > min_needed ? dbl_cur : min_needed;
  ------------------
  |  Branch (36045:17): [True: 1.49M, False: 3.98M]
  ------------------
36046|  5.47M|    size_t newsize = ((size_t) itemsize) * m + sizeof(int32_t) * 2;
36047|  5.47M|    int32_t *p = (int32_t *) janet_srealloc(v ? janet_v__raw(v) : 0, newsize);
  ------------------
  |  |  719|  3.12M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  ------------------
  |  Branch (36047:45): [True: 3.12M, False: 2.35M]
  ------------------
36048|  5.47M|    if (!v) p[1] = 0;
  ------------------
  |  Branch (36048:9): [True: 2.35M, False: 3.12M]
  ------------------
36049|  5.47M|    p[0] = m;
36050|  5.47M|    return p + 2;
36051|  5.47M|}
janet_v_flattenmem:
36054|  2.06M|void *janet_v_flattenmem(void *v, int32_t itemsize) {
36055|  2.06M|    char *p;
36056|  2.06M|    if (NULL == v) return NULL;
  ------------------
  |  Branch (36056:9): [True: 1.37M, False: 691k]
  ------------------
36057|   691k|    size_t size = (size_t) itemsize * janet_v__cnt(v);
  ------------------
  |  |  721|   691k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  ------------------
  |  |  |  |  719|   691k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
36058|   691k|    p = janet_malloc(size);
  ------------------
  |  | 2406|   691k|#define janet_malloc(X) malloc((X))
  ------------------
36059|   691k|    if (NULL != p) {
  ------------------
  |  Branch (36059:9): [True: 691k, False: 0]
  ------------------
36060|   691k|        safe_memcpy(p, v, size);
36061|   691k|        return p;
36062|   691k|    } else {
36063|       |        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]
  |  |  ------------------
  ------------------
36064|      0|    }
36065|   691k|}
janet_call:
37455|    103|Janet janet_call(JanetFunction *fun, int32_t argc, const Janet *argv) {
37456|       |    /* Check entry conditions */
37457|    103|    if (!janet_vm.fiber)
  ------------------
  |  Branch (37457:9): [True: 0, False: 103]
  ------------------
37458|      0|        janet_panic("janet_call failed because there is no current fiber");
37459|    103|    if (janet_vm.stackn >= JANET_RECURSION_GUARD)
  ------------------
  |  |  296|    103|#define JANET_RECURSION_GUARD 1024
  ------------------
  |  Branch (37459:9): [True: 0, False: 103]
  ------------------
37460|      0|        janet_panic("C stack recursed too deeply");
37461|       |
37462|       |    /* Dirty stack */
37463|    103|    int32_t dirty_stack = janet_vm.fiber->stacktop - janet_vm.fiber->stackstart;
37464|    103|    if (dirty_stack) {
  ------------------
  |  Branch (37464:9): [True: 0, False: 103]
  ------------------
37465|      0|        janet_fiber_cframe(janet_vm.fiber, void_cfunction);
37466|      0|    }
37467|       |
37468|       |    /* Tracing */
37469|    103|    if (fun->gc.flags & JANET_FUNCFLAG_TRACE) {
  ------------------
  |  | 1164|    103|#define JANET_FUNCFLAG_TRACE (1 << 16)
  ------------------
  |  Branch (37469:9): [True: 0, False: 103]
  ------------------
37470|      0|        janet_vm.stackn++;
37471|      0|        vm_do_trace(fun, argc, argv);
  ------------------
  |  |36311|      0|#define vm_do_trace(func, argc, argv) do { \
  |  |36312|      0|    JanetFunction* _func = (func);\
  |  |36313|      0|    if (_func->def->name) {\
  |  |  ------------------
  |  |  |  Branch (36313:9): [True: 0, False: 0]
  |  |  ------------------
  |  |36314|      0|        janet_eprintf("trace (%S", _func->def->name);\
  |  |  ------------------
  |  |  |  | 2194|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36315|      0|    } else {\
  |  |36316|      0|        janet_eprintf("trace (%p", janet_wrap_function(_func));\
  |  |  ------------------
  |  |  |  | 2194|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36317|      0|    }\
  |  |36318|      0|    int32_t _argc = (argc);\
  |  |36319|      0|    for (int32_t i = 0; i < _argc; i++) {\
  |  |  ------------------
  |  |  |  Branch (36319:25): [True: 0, False: 0]
  |  |  ------------------
  |  |36320|      0|        janet_eprintf(" %p", (argv)[i]);\
  |  |  ------------------
  |  |  |  | 2194|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36321|      0|    }\
  |  |36322|      0|    janet_eprintf(")\n");\
  |  |  ------------------
  |  |  |  | 2194|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36323|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (36323:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37472|      0|        janet_vm.stackn--;
37473|      0|    }
37474|       |
37475|       |    /* Push frame */
37476|    103|    janet_fiber_pushn(janet_vm.fiber, argv, argc);
37477|    103|    if (janet_fiber_funcframe(janet_vm.fiber, fun)) {
  ------------------
  |  Branch (37477:9): [True: 6, False: 97]
  ------------------
37478|      6|        int32_t min = fun->def->min_arity;
37479|      6|        int32_t max = fun->def->max_arity;
37480|      6|        Janet funv = janet_wrap_function(fun);
  ------------------
  |  |  852|      6|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  825|      6|    janet_nanbox_from_pointer((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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37481|      6|        if (min == max && min != argc)
  ------------------
  |  Branch (37481:13): [True: 6, False: 0]
  |  Branch (37481:27): [True: 6, False: 0]
  ------------------
37482|      6|            janet_panicf("arity mismatch in %v, expected %d, got %d", funv, min, argc);
37483|      0|        if (min >= 0 && argc < min)
  ------------------
  |  Branch (37483:13): [True: 0, False: 0]
  |  Branch (37483:25): [True: 0, False: 0]
  ------------------
37484|      0|            janet_panicf("arity mismatch in %v, expected at least %d, got %d", funv, min, argc);
37485|      0|        janet_panicf("arity mismatch in %v, expected at most %d, got %d", funv, max, argc);
37486|      0|    }
37487|     97|    janet_fiber_frame(janet_vm.fiber)->flags |= JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  |  810|     97|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  809|     97|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|     97|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_fiber_frame(janet_vm.fiber)->flags |= JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  | 1013|     97|#define JANET_STACKFRAME_ENTRANCE 2
  ------------------
37488|       |
37489|       |    /* Set up */
37490|     97|    int32_t oldn = janet_vm.stackn++;
37491|     97|    int handle = janet_gclock();
37492|       |
37493|       |    /* Run vm */
37494|     97|    janet_vm.fiber->flags |= JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  790|     97|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
                  janet_vm.fiber->flags |= JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  791|     97|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  ------------------
37495|     97|    int old_coerce_error = janet_vm.coerce_error;
37496|     97|    janet_vm.coerce_error = 1;
37497|     97|    JanetSignal signal = run_vm(janet_vm.fiber, janet_wrap_nil());
  ------------------
  |  |  831|     97|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     97|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     97|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     97|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37498|     97|    janet_vm.coerce_error = old_coerce_error;
37499|       |
37500|       |    /* Teardown */
37501|     97|    janet_vm.stackn = oldn;
37502|     97|    janet_gcunlock(handle);
37503|     97|    if (dirty_stack) {
  ------------------
  |  Branch (37503:9): [True: 0, False: 97]
  ------------------
37504|      0|        janet_fiber_popframe(janet_vm.fiber);
37505|      0|        janet_vm.fiber->stacktop += dirty_stack;
37506|      0|    }
37507|       |
37508|     97|    if (signal != JANET_SIGNAL_OK) {
  ------------------
  |  Branch (37508:9): [True: 0, False: 97]
  ------------------
37509|       |        /* Should match logic in janet_signalv */
37510|      0|#ifdef JANET_EV
37511|      0|        if (janet_vm.root_fiber != NULL && signal == JANET_SIGNAL_EVENT) {
  ------------------
  |  Branch (37511:13): [True: 0, False: 0]
  |  Branch (37511:44): [True: 0, False: 0]
  ------------------
37512|      0|            janet_vm.root_fiber->sched_id++;
37513|      0|        }
37514|      0|#endif
37515|      0|        if (signal != JANET_SIGNAL_ERROR) {
  ------------------
  |  Branch (37515:13): [True: 0, False: 0]
  ------------------
37516|      0|            *janet_vm.return_reg = janet_wrap_string(janet_formatc("%v coerced from %s to error", *janet_vm.return_reg, janet_signal_names[signal]));
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37517|      0|        }
37518|      0|        janet_panicv(*janet_vm.return_reg);
37519|      0|    }
37520|       |
37521|     97|    return *janet_vm.return_reg;
37522|     97|}
janet_try_init:
37558|   390k|void janet_try_init(JanetTryState *state) {
37559|   390k|    state->stackn = janet_vm.stackn++;
37560|   390k|    state->gc_handle = janet_vm.gc_suspend;
37561|   390k|    state->vm_fiber = janet_vm.fiber;
37562|   390k|    state->vm_jmp_buf = janet_vm.signal_buf;
37563|   390k|    state->vm_return_reg = janet_vm.return_reg;
37564|   390k|    state->coerce_error = janet_vm.coerce_error;
37565|   390k|    janet_vm.return_reg = &(state->payload);
37566|   390k|    janet_vm.signal_buf = &(state->buf);
37567|   390k|    janet_vm.coerce_error = 0;
37568|   390k|}
janet_restore:
37570|   390k|void janet_restore(JanetTryState *state) {
37571|   390k|    janet_vm.stackn = state->stackn;
37572|   390k|    janet_vm.gc_suspend = state->gc_handle;
37573|   390k|    janet_vm.fiber = state->vm_fiber;
37574|   390k|    janet_vm.signal_buf = state->vm_jmp_buf;
37575|   390k|    janet_vm.return_reg = state->vm_return_reg;
37576|   390k|    janet_vm.coerce_error = state->coerce_error;
37577|   390k|}
janet_continue:
37674|   382k|JanetSignal janet_continue(JanetFiber *fiber, Janet in, Janet *out) {
37675|       |    /* Check conditions */
37676|   382k|    JanetSignal tmp_signal = janet_check_can_resume(fiber, out, 0);
37677|   382k|    if (tmp_signal) return tmp_signal;
  ------------------
  |  Branch (37677:9): [True: 0, False: 382k]
  ------------------
37678|   382k|    return janet_continue_no_check(fiber, in, out);
37679|   382k|}
janet_continue_signal:
37682|    523|JanetSignal janet_continue_signal(JanetFiber *fiber, Janet in, Janet *out, JanetSignal sig) {
37683|    523|    JanetSignal tmp_signal = janet_check_can_resume(fiber, out, sig != JANET_SIGNAL_OK);
37684|    523|    if (tmp_signal) return tmp_signal;
  ------------------
  |  Branch (37684:9): [True: 0, False: 523]
  ------------------
37685|    523|    if (sig != JANET_SIGNAL_OK) {
  ------------------
  |  Branch (37685:9): [True: 0, False: 523]
  ------------------
37686|      0|        JanetFiber *child = fiber;
37687|      0|        while (child->child) child = child->child;
  ------------------
  |  Branch (37687:16): [True: 0, False: 0]
  ------------------
37688|       |        /* NOTE: We are "smuggling" flags in for later use in an unusal place. This is odd but intentional and
37689|       |         * saves a bit of memory per fiber rather than creating a new field. There is likely a better way to do this. */
37690|      0|        child->gc.flags &= ~JANET_FIBER_STATUS_MASK;
  ------------------
  |  |  785|      0|#define JANET_FIBER_STATUS_MASK 0x3F0000
  ------------------
37691|      0|        child->gc.flags |= sig << JANET_FIBER_STATUS_OFFSET;
  ------------------
  |  |  787|      0|#define JANET_FIBER_STATUS_OFFSET 16
  ------------------
37692|      0|        child->flags |= JANET_FIBER_RESUME_SIGNAL;
  ------------------
  |  |  786|      0|#define JANET_FIBER_RESUME_SIGNAL 0x400000
  ------------------
37693|      0|    }
37694|    523|    return janet_continue_no_check(fiber, in, out);
37695|    523|}
janet_mcall:
37717|  3.40k|Janet janet_mcall(const char *name, int32_t argc, Janet *argv) {
37718|       |    /* At least 1 argument */
37719|  3.40k|    if (argc < 1) {
  ------------------
  |  Branch (37719:9): [True: 0, False: 3.40k]
  ------------------
37720|      0|        janet_panicf("method :%s expected at least 1 argument", name);
37721|      0|    }
37722|       |    /* Find method */
37723|  3.40k|    Janet method = janet_method_lookup(argv[0], name);
37724|  3.40k|    if (janet_checktype(method, JANET_NIL)) {
  ------------------
  |  |  806|  3.40k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 19, False: 3.38k]
  |  |  |  Branch (806:6): [Folded, False: 3.40k]
  |  |  ------------------
  |  |  807|  3.40k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.40k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  3.40k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  3.40k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.40k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.40k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37725|     19|        janet_panicf("could not find method :%s for %v", name, argv[0]);
37726|     19|    }
37727|       |    /* Invoke method */
37728|  3.38k|    return janet_method_invoke(method, argc, argv);
37729|  3.40k|}
janet_init:
37732|  7.64k|int janet_init(void) {
37733|       |
37734|       |    /* Garbage collection */
37735|  7.64k|    janet_vm.blocks = NULL;
37736|  7.64k|    janet_vm.weak_blocks = NULL;
37737|  7.64k|    janet_vm.next_collection = 0;
37738|  7.64k|    janet_vm.gc_interval = 0x400000;
37739|  7.64k|    janet_vm.block_count = 0;
37740|  7.64k|    janet_vm.gc_mark_phase = 0;
37741|       |
37742|  7.64k|    janet_symcache_init();
37743|       |
37744|       |    /* Initialize gc roots */
37745|  7.64k|    janet_vm.roots = NULL;
37746|  7.64k|    janet_vm.root_count = 0;
37747|  7.64k|    janet_vm.root_capacity = 0;
37748|       |
37749|       |    /* Scratch memory */
37750|  7.64k|    janet_vm.user = NULL;
37751|  7.64k|    janet_vm.scratch_mem = NULL;
37752|  7.64k|    janet_vm.scratch_len = 0;
37753|  7.64k|    janet_vm.scratch_cap = 0;
37754|       |
37755|       |    /* Sandbox flags */
37756|  7.64k|    janet_vm.sandbox_flags = 0;
37757|       |
37758|       |    /* Initialize registry */
37759|  7.64k|    janet_vm.registry = NULL;
37760|  7.64k|    janet_vm.registry_cap = 0;
37761|  7.64k|    janet_vm.registry_count = 0;
37762|  7.64k|    janet_vm.registry_dirty = 0;
37763|       |
37764|       |    /* Initialize abstract registry */
37765|  7.64k|    janet_vm.abstract_registry = janet_table(0);
37766|  7.64k|    janet_gcroot(janet_wrap_table(janet_vm.abstract_registry));
  ------------------
  |  |  846|  7.64k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|  7.64k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.64k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.64k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37767|       |
37768|       |    /* Traversal */
37769|  7.64k|    janet_vm.traversal = NULL;
37770|  7.64k|    janet_vm.traversal_base = NULL;
37771|  7.64k|    janet_vm.traversal_top = NULL;
37772|       |
37773|       |    /* Core env */
37774|  7.64k|    janet_vm.core_env = NULL;
37775|       |
37776|       |    /* Auto suspension */
37777|  7.64k|    janet_vm.auto_suspend = 0;
37778|       |
37779|       |    /* Dynamic bindings */
37780|  7.64k|    janet_vm.top_dyns = NULL;
37781|       |
37782|       |    /* Seed RNG */
37783|  7.64k|    janet_rng_seed(janet_default_rng(), 0);
37784|       |
37785|       |    /* Fibers */
37786|  7.64k|    janet_vm.fiber = NULL;
37787|  7.64k|    janet_vm.root_fiber = NULL;
37788|  7.64k|    janet_vm.stackn = 0;
37789|       |
37790|  7.64k|#ifdef JANET_EV
37791|  7.64k|    janet_ev_init();
37792|  7.64k|#endif
37793|  7.64k|#ifdef JANET_NET
37794|  7.64k|    janet_net_init();
37795|  7.64k|#endif
37796|  7.64k|    return 0;
37797|  7.64k|}
janet_sandbox_assert:
37805|  7.18k|void janet_sandbox_assert(uint32_t forbidden_flags) {
37806|  7.18k|    if (forbidden_flags & janet_vm.sandbox_flags) {
  ------------------
  |  Branch (37806:9): [True: 0, False: 7.18k]
  ------------------
37807|      0|        janet_panic("operation forbidden by sandbox");
37808|      0|    }
37809|  7.18k|}
janet_deinit:
37812|  7.64k|void janet_deinit(void) {
37813|  7.64k|    janet_clear_memory();
37814|  7.64k|    janet_symcache_deinit();
37815|  7.64k|    janet_free(janet_vm.roots);
  ------------------
  |  | 2415|  7.64k|#define janet_free(X) free((X))
  ------------------
37816|  7.64k|    janet_vm.roots = NULL;
37817|  7.64k|    janet_vm.root_count = 0;
37818|  7.64k|    janet_vm.root_capacity = 0;
37819|  7.64k|    janet_vm.abstract_registry = NULL;
37820|  7.64k|    janet_vm.core_env = NULL;
37821|  7.64k|    janet_vm.top_dyns = NULL;
37822|  7.64k|    janet_vm.user = NULL;
37823|  7.64k|    janet_free(janet_vm.traversal_base);
  ------------------
  |  | 2415|  7.64k|#define janet_free(X) free((X))
  ------------------
37824|  7.64k|    janet_vm.fiber = NULL;
37825|  7.64k|    janet_vm.root_fiber = NULL;
37826|  7.64k|    janet_free(janet_vm.registry);
  ------------------
  |  | 2415|  7.64k|#define janet_free(X) free((X))
  ------------------
37827|       |    janet_vm.registry = NULL;
37828|  7.64k|#ifdef JANET_EV
37829|  7.64k|    janet_ev_deinit();
37830|  7.64k|#endif
37831|  7.64k|#ifdef JANET_NET
37832|  7.64k|    janet_net_deinit();
37833|  7.64k|#endif
37834|  7.64k|}
janet_memalloc_empty:
38002|  10.2M|void *janet_memalloc_empty(int32_t count) {
38003|  10.2M|    int32_t i;
38004|  10.2M|    void *mem = array_allocate(sizeof(JanetKV), count);
38005|  10.2M|    janet_vm.next_collection += (size_t) count * sizeof(JanetKV);
38006|  10.2M|    if (NULL == mem) {
  ------------------
  |  Branch (38006:9): [True: 0, False: 10.2M]
  ------------------
38007|      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]
  |  |  ------------------
  ------------------
38008|      0|    }
38009|  10.2M|    JanetKV *mmem = (JanetKV *)mem;
38010|   160M|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (38010:17): [True: 149M, False: 10.2M]
  ------------------
38011|   149M|        JanetKV *kv = mmem + i;
38012|   149M|        kv->key = janet_wrap_nil();
  ------------------
  |  |  831|   149M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   149M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   149M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   149M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
38013|   149M|        kv->value = janet_wrap_nil();
  ------------------
  |  |  831|   149M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   149M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   149M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   149M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
38014|   149M|    }
38015|  10.2M|    return mem;
38016|  10.2M|}
janet_memempty:
38018|  10.0M|void janet_memempty(JanetKV *mem, int32_t count) {
38019|  10.0M|    int32_t i;
38020|   324M|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (38020:17): [True: 314M, False: 10.0M]
  ------------------
38021|   314M|        mem[i].key = janet_wrap_nil();
  ------------------
  |  |  831|   314M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   314M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   314M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   314M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
38022|   314M|        mem[i].value = janet_wrap_nil();
  ------------------
  |  |  831|   314M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   314M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   314M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   314M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
38023|   314M|    }
38024|  10.0M|}
janet_wrap_number_safe:
38028|  52.5k|Janet janet_wrap_number_safe(double d) {
38029|  52.5k|    Janet ret;
38030|  52.5k|    ret.number = isnan(d) ? NAN : d;
  ------------------
  |  Branch (38030:18): [True: 7.49k, False: 45.0k]
  ------------------
38031|  52.5k|    return ret;
38032|  52.5k|}
janet_nanbox_to_pointer:
38034|  2.30G|void *janet_nanbox_to_pointer(Janet x) {
38035|  2.30G|    x.i64 &= JANET_NANBOX_PAYLOADBITS;
  ------------------
  |  |  791|  2.30G|#define JANET_NANBOX_PAYLOADBITS 0x00007FFFFFFFFFFFllu
  ------------------
38036|  2.30G|    x.u64 <<= JANET_NANBOX_64_POINTER_SHIFT; /* Alignment, usually 0 */
  ------------------
  |  |  341|  2.30G|#define JANET_NANBOX_64_POINTER_SHIFT 0
  ------------------
38037|  2.30G|    return x.pointer;
38038|  2.30G|}
janet_nanbox_from_pointer:
38040|   151M|Janet janet_nanbox_from_pointer(void *p, uint64_t tagmask) {
38041|   151M|    Janet ret;
38042|   151M|    ret.pointer = p;
38043|       |    /* Should be noop when pointer shift is 0 */
38044|       |    /*
38045|       |    janet_assert(!(ret.u64 & (uint64_t) ((1 << JANET_NANBOX_64_POINTER_SHIFT) - 1)), "unaligned pointer wrap");
38046|       |    */
38047|   151M|    ret.u64 >>= JANET_NANBOX_64_POINTER_SHIFT; /* Alignment, usually 0 */
  ------------------
  |  |  341|   151M|#define JANET_NANBOX_64_POINTER_SHIFT 0
  ------------------
38048|   151M|    ret.u64 |= tagmask;
38049|   151M|    return ret;
38050|   151M|}
janet_nanbox_from_cpointer:
38052|   240M|Janet janet_nanbox_from_cpointer(const void *p, uint64_t tagmask) {
38053|   240M|    Janet ret;
38054|   240M|    ret.pointer = (void *)p;
38055|       |    /* Should be noop when pointer shift is 0 */
38056|       |    /*
38057|       |    janet_assert(!(ret.u64 & (uint64_t) ((1 << JANET_NANBOX_64_POINTER_SHIFT) - 1)), "unaligned pointer wrap");
38058|       |    */
38059|   240M|    ret.u64 >>= JANET_NANBOX_64_POINTER_SHIFT; /* Alignment, usually 0 */
  ------------------
  |  |  341|   240M|#define JANET_NANBOX_64_POINTER_SHIFT 0
  ------------------
38060|   240M|    ret.u64 |= tagmask;
38061|   240M|    return ret;
38062|   240M|}
janet_nanbox_from_double:
38064|   330M|Janet janet_nanbox_from_double(double d) {
38065|   330M|    Janet ret;
38066|   330M|    ret.number = d;
38067|   330M|    return ret;
38068|   330M|}
janet_nanbox_from_bits:
38070|  3.37G|Janet janet_nanbox_from_bits(uint64_t bits) {
38071|  3.37G|    Janet ret;
38072|  3.37G|    ret.u64 = bits;
38073|  3.37G|    return ret;
38074|  3.37G|}
janet.c:janet_array_impl:
 1555|   114k|static void janet_array_impl(JanetArray *array, int32_t capacity) {
 1556|   114k|    Janet *data = NULL;
 1557|   114k|    if (capacity > 0) {
  ------------------
  |  Branch (1557:9): [True: 60.6k, False: 53.5k]
  ------------------
 1558|  60.6k|        janet_vm.next_collection += capacity * sizeof(Janet);
 1559|  60.6k|        data = (Janet *) array_allocate(sizeof(Janet), capacity);
 1560|  60.6k|        if (NULL == data) {
  ------------------
  |  Branch (1560:13): [True: 0, False: 60.6k]
  ------------------
 1561|      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]
  |  |  ------------------
  ------------------
 1562|      0|        }
 1563|  60.6k|    }
 1564|   114k|    array->count = 0;
 1565|   114k|    array->capacity = capacity;
 1566|   114k|    array->data = data;
 1567|   114k|}
janet.c:janet_buffer_init_impl:
 3122|  1.51M|static JanetBuffer *janet_buffer_init_impl(JanetBuffer *buffer, int32_t capacity) {
 3123|  1.51M|    uint8_t *data = NULL;
 3124|  1.51M|    if (capacity < 4) capacity = 4;
  ------------------
  |  Branch (3124:9): [True: 1.17M, False: 340k]
  ------------------
 3125|  1.51M|    janet_gcpressure(capacity);
 3126|  1.51M|    data = array_allocate(sizeof(uint8_t), capacity);
 3127|  1.51M|    if (NULL == data) {
  ------------------
  |  Branch (3127:9): [True: 0, False: 1.51M]
  ------------------
 3128|      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]
  |  |  ------------------
  ------------------
 3129|      0|    }
 3130|  1.51M|    buffer->count = 0;
 3131|  1.51M|    buffer->capacity = capacity;
 3132|  1.51M|    buffer->data = data;
 3133|  1.51M|    return buffer;
 3134|  1.51M|}
janet.c:janet_buffer_can_realloc:
 3115|  2.20M|static void janet_buffer_can_realloc(JanetBuffer *buffer) {
 3116|  2.20M|    if (buffer->gc.flags & JANET_BUFFER_FLAG_NO_REALLOC) {
  ------------------
  |  | 1779|  2.20M|#define JANET_BUFFER_FLAG_NO_REALLOC 0x10000
  ------------------
  |  Branch (3116:9): [True: 0, False: 2.20M]
  ------------------
 3117|      0|        janet_panic("buffer cannot reallocate foreign memory");
 3118|      0|    }
 3119|  2.20M|}
janet.c:buffer_push_impl:
 3539|  61.8k|static void buffer_push_impl(JanetBuffer *buffer, Janet *argv, int32_t argc_offset, int32_t argc) {
 3540|   123k|    for (int32_t i = argc_offset; i < argc; i++) {
  ------------------
  |  Branch (3540:35): [True: 61.8k, False: 61.8k]
  ------------------
 3541|  61.8k|        if (janet_checktype(argv[i], JANET_NUMBER)) {
  ------------------
  |  |  806|  61.8k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 48.1k, False: 13.6k]
  |  |  |  Branch (806:6): [True: 61.8k, Folded]
  |  |  ------------------
  |  |  807|  61.8k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|  61.8k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 48.1k, False: 13.6k]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 13.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  61.8k|        : 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3542|  48.1k|            janet_buffer_push_u8(buffer, (uint8_t)(janet_getinteger(argv, i) & 0xFF));
 3543|  48.1k|        } else {
 3544|  13.6k|            JanetByteView view = janet_getbytes(argv, i);
 3545|  13.6k|            if (view.bytes == buffer->data) {
  ------------------
  |  Branch (3545:17): [True: 0, False: 13.6k]
  ------------------
 3546|      0|                janet_buffer_ensure(buffer, buffer->count + view.len, 2);
 3547|      0|                view.bytes = buffer->data;
 3548|      0|            }
 3549|  13.6k|            janet_buffer_push_bytes(buffer, view.bytes, view.len);
 3550|  13.6k|        }
 3551|  61.8k|    }
 3552|  61.8k|}
janet.c:bitloc:
 3626|      9|static void bitloc(int32_t argc, Janet *argv, JanetBuffer **b, int32_t *index, int *bit) {
 3627|      9|    janet_fixarity(argc, 2);
 3628|      9|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3629|      9|    double x = janet_getnumber(argv, 1);
 3630|      9|    int64_t bitindex = (int64_t) x;
 3631|      9|    int64_t byteindex = bitindex >> 3;
 3632|      9|    int which_bit = bitindex & 7;
 3633|      9|    if (bitindex != x || bitindex < 0 || byteindex >= buffer->count)
  ------------------
  |  Branch (3633:9): [True: 4, False: 5]
  |  Branch (3633:26): [True: 0, False: 5]
  |  Branch (3633:42): [True: 3, False: 2]
  ------------------
 3634|      4|        janet_panicf("invalid bit index %v", argv[1]);
 3635|      5|    *b = buffer;
 3636|      5|    *index = (int32_t) byteindex;
 3637|      5|    *bit = which_bit;
 3638|      5|}
janet.c:janet_strlike_cmp:
 4662|  29.5k|static int janet_strlike_cmp(JanetType type, Janet x, const char *cstring) {
 4663|  29.5k|    if (janet_type(x) != type) return 0;
  ------------------
  |  |  795|  29.5k|    (isnan((x).number) \
  |  |  796|  29.5k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  29.5k|        : JANET_NUMBER)
  ------------------
  |  Branch (4663:9): [True: 28.6k, False: 975]
  |  Branch (4663:9): [True: 7.23k, False: 22.3k]
  ------------------
 4664|  22.3k|    return !janet_cstrcmp(janet_unwrap_string(x), cstring);
  ------------------
  |  |  863|  22.3k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
 4665|  29.5k|}
janet.c:maxarity1:
 5072|      7|static int maxarity1(JanetFopts opts, JanetSlot *args) {
 5073|      7|    (void) opts;
 5074|       |    return janet_v_count(args) <= 1;
  ------------------
  |  |  714|      7|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|      6|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|      6|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 6, False: 1]
  |  |  ------------------
  ------------------
 5075|      7|}
janet.c:do_debug:
 5190|      2|static JanetSlot do_debug(JanetFopts opts, JanetSlot *args) {
 5191|      2|    (void)args;
 5192|      2|    int32_t len = janet_v_count(args);
  ------------------
  |  |  714|      2|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|      1|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|      1|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 1, False: 1]
  |  |  ------------------
  ------------------
 5193|      2|    JanetSlot t = janetc_gettarget(opts);
 5194|      2|    janetc_emit_ssu(opts.compiler, JOP_SIGNAL, t,
 5195|      2|                    (len == 1) ? args[0] : 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5195:21): [True: 1, False: 1]
  ------------------
 5196|      2|                    JANET_SIGNAL_DEBUG,
 5197|      2|                    1);
 5198|      2|    return t;
 5199|      2|}
janet.c:fixarity1:
 5068|     77|static int fixarity1(JanetFopts opts, JanetSlot *args) {
 5069|     77|    (void) opts;
 5070|       |    return janet_v_count(args) == 1;
  ------------------
  |  |  714|     77|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|     76|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|     76|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 76, False: 1]
  |  |  ------------------
  ------------------
 5071|     77|}
janet.c:do_error:
 5186|     20|static JanetSlot do_error(JanetFopts opts, JanetSlot *args) {
 5187|     20|    janetc_emit_s(opts.compiler, JOP_ERROR, args[0], 0);
 5188|     20|    return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|     20|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     20|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     20|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     20|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5189|     20|}
janet.c:minarity2:
 5076|  4.31k|static int minarity2(JanetFopts opts, JanetSlot *args) {
 5077|  4.31k|    (void) opts;
 5078|       |    return janet_v_count(args) >= 2;
  ------------------
  |  |  714|  4.31k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  4.31k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  4.31k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 4.31k, False: 0]
  |  |  ------------------
  ------------------
 5079|  4.31k|}
janet.c:do_apply:
 5272|  4.31k|static JanetSlot do_apply(JanetFopts opts, JanetSlot *args) {
 5273|       |    /* Push phase */
 5274|  4.31k|    JanetCompiler *c = opts.compiler;
 5275|  4.31k|    int32_t i;
 5276|  4.31k|    for (i = 1; i < janet_v_count(args) - 3; i += 3)
  ------------------
  |  |  714|  4.31k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  4.31k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  4.31k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 4.31k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (5276:17): [True: 0, False: 4.31k]
  ------------------
 5277|      0|        janetc_emit_sss(c, JOP_PUSH_3, args[i], args[i + 1], args[i + 2], 0);
 5278|  4.31k|    if (i == janet_v_count(args) - 3)
  ------------------
  |  |  714|  4.31k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  4.31k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  4.31k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 4.31k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (5278:9): [True: 0, False: 4.31k]
  ------------------
 5279|      0|        janetc_emit_ss(c, JOP_PUSH_2, args[i], args[i + 1], 0);
 5280|  4.31k|    else if (i == janet_v_count(args) - 2)
  ------------------
  |  |  714|  4.31k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  4.31k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  4.31k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 4.31k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (5280:14): [True: 0, False: 4.31k]
  ------------------
 5281|      0|        janetc_emit_s(c, JOP_PUSH, args[i], 0);
 5282|       |    /* Push array phase */
 5283|  4.31k|    janetc_emit_s(c, JOP_PUSH_ARRAY, janet_v_last(args), 0);
  ------------------
  |  |  715|  4.31k|#define janet_v_last(v)         ((v)[janet_v__cnt(v) - 1])
  |  |  ------------------
  |  |  |  |  721|  4.31k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  4.31k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5284|       |    /* Call phase */
 5285|  4.31k|    JanetSlot target;
 5286|  4.31k|    if (opts.flags & JANET_FOPTS_TAIL) {
  ------------------
  |  | 1099|  4.31k|#define JANET_FOPTS_TAIL 0x10000
  ------------------
  |  Branch (5286:9): [True: 0, False: 4.31k]
  ------------------
 5287|      0|        janetc_emit_s(c, JOP_TAILCALL, args[0], 0);
 5288|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5289|      0|        target.flags |= JANET_SLOT_RETURNED;
  ------------------
  |  |  995|      0|#define JANET_SLOT_RETURNED 0x100000
  ------------------
 5290|  4.31k|    } else {
 5291|  4.31k|        target = janetc_gettarget(opts);
 5292|  4.31k|        janetc_emit_ss(c, JOP_CALL, target, args[0], 1);
 5293|  4.31k|    }
 5294|  4.31k|    return target;
 5295|  4.31k|}
janet.c:do_yield:
 5259|      2|static JanetSlot do_yield(JanetFopts opts, JanetSlot *args) {
 5260|      2|    if (janet_v_count(args) == 0) {
  ------------------
  |  |  714|      2|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|      2|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|      2|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (5260:9): [True: 0, False: 2]
  ------------------
 5261|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5262|      2|    } else {
 5263|      2|        return genericSSI(opts, JOP_SIGNAL, args[0], 3);
 5264|      2|    }
 5265|      2|}
janet.c:genericSSI:
 5097|      2|static JanetSlot genericSSI(JanetFopts opts, int op, JanetSlot s, int32_t imm) {
 5098|      2|    JanetSlot target = janetc_gettarget(opts);
 5099|      2|    janetc_emit_ssi(opts.compiler, op, target, s, imm, 1);
 5100|      2|    return target;
 5101|      2|}
janet.c:arity1or2:
 5058|  2.94k|static int arity1or2(JanetFopts opts, JanetSlot *args) {
 5059|  2.94k|    (void) opts;
 5060|  2.94k|    int32_t arity = janet_v_count(args);
  ------------------
  |  |  714|  2.94k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  2.94k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  2.94k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 2.94k, False: 0]
  |  |  ------------------
  ------------------
 5061|  2.94k|    return arity == 1 || arity == 2;
  ------------------
  |  Branch (5061:12): [True: 46, False: 2.89k]
  |  Branch (5061:26): [True: 2.89k, False: 0]
  ------------------
 5062|  2.94k|}
janet.c:do_resume:
 5266|     46|static JanetSlot do_resume(JanetFopts opts, JanetSlot *args) {
 5267|     46|    return opfunction(opts, args, JOP_RESUME, janet_wrap_nil());
  ------------------
  |  |  831|     46|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     46|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     46|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     46|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5268|     46|}
janet.c:opfunction:
 5108|  2.94k|    Janet defaultArg2) {
 5109|  2.94k|    JanetCompiler *c = opts.compiler;
 5110|  2.94k|    int32_t len;
 5111|  2.94k|    len = janet_v_count(args);
  ------------------
  |  |  714|  2.94k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  2.94k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  2.94k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 2.94k, False: 0]
  |  |  ------------------
  ------------------
 5112|  2.94k|    JanetSlot t;
 5113|  2.94k|    if (len == 1) {
  ------------------
  |  Branch (5113:9): [True: 46, False: 2.89k]
  ------------------
 5114|     46|        t = janetc_gettarget(opts);
 5115|     46|        janetc_emit_sss(c, op, t, args[0], janetc_cslot(defaultArg2), 1);
 5116|     46|        return t;
 5117|  2.89k|    } else {
 5118|       |        /* len == 2 */
 5119|  2.89k|        t = janetc_gettarget(opts);
 5120|  2.89k|        janetc_emit_sss(c, op, t, args[0], args[1], 1);
 5121|  2.89k|    }
 5122|  2.89k|    return t;
 5123|  2.94k|}
janet.c:fixarity2:
 5080|  1.98k|static int fixarity2(JanetFopts opts, JanetSlot *args) {
 5081|  1.98k|    (void) opts;
 5082|       |    return janet_v_count(args) == 2;
  ------------------
  |  |  714|  1.98k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  1.98k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  1.98k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 1.98k, False: 0]
  |  |  ------------------
  ------------------
 5083|  1.98k|}
janet.c:do_in:
 5200|  1.93k|static JanetSlot do_in(JanetFopts opts, JanetSlot *args) {
 5201|  1.93k|    return opreduce(opts, args, JOP_IN, 0, janet_wrap_nil(), janet_wrap_nil());
  ------------------
  |  |  831|  1.93k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.93k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.93k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.93k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  return opreduce(opts, args, JOP_IN, 0, janet_wrap_nil(), janet_wrap_nil());
  ------------------
  |  |  831|  1.93k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.93k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.93k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.93k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5202|  1.93k|}
janet.c:opreduce:
 5147|  3.17k|    Janet unary) {
 5148|  3.17k|    JanetCompiler *c = opts.compiler;
 5149|  3.17k|    int32_t i, len;
 5150|  3.17k|    int8_t imm = 0;
 5151|  3.17k|    len = janet_v_count(args);
  ------------------
  |  |  714|  3.17k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  3.06k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  3.06k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 3.06k, False: 113]
  |  |  ------------------
  ------------------
 5152|  3.17k|    JanetSlot t;
 5153|  3.17k|    if (len == 0) {
  ------------------
  |  Branch (5153:9): [True: 113, False: 3.06k]
  ------------------
 5154|    113|        return janetc_cslot(nullary);
 5155|  3.06k|    } else if (len == 1) {
  ------------------
  |  Branch (5155:16): [True: 153, False: 2.91k]
  ------------------
 5156|    153|        t = janetc_gettarget(opts);
 5157|       |        /* Special case subtract to be times -1 */
 5158|    153|        if (op == JOP_SUBTRACT) {
  ------------------
  |  Branch (5158:13): [True: 11, False: 142]
  ------------------
 5159|     11|            janetc_emit_ssi(c, JOP_MULTIPLY_IMMEDIATE, t, args[0], -1, 1);
 5160|    142|        } else {
 5161|    142|            janetc_emit_sss(c, op, t, janetc_cslot(unary), args[0], 1);
 5162|    142|        }
 5163|    153|        return t;
 5164|    153|    }
 5165|  2.91k|    t = janetc_gettarget(opts);
 5166|  2.91k|    if (opim && can_slot_be_imm(args[1], &imm)) {
  ------------------
  |  Branch (5166:9): [True: 581, False: 2.32k]
  |  Branch (5166:17): [True: 106, False: 475]
  ------------------
 5167|    106|        janetc_emit_ssi(c, opim, t, args[0], imm, 1);
 5168|  2.80k|    } else {
 5169|  2.80k|        janetc_emit_sss(c, op, t, args[0], args[1], 1);
 5170|  2.80k|    }
 5171|  15.6k|    for (i = 2; i < len; i++) {
  ------------------
  |  Branch (5171:17): [True: 12.7k, False: 2.91k]
  ------------------
 5172|  12.7k|        if (opim && can_slot_be_imm(args[i], &imm)) {
  ------------------
  |  Branch (5172:13): [True: 9.56k, False: 3.20k]
  |  Branch (5172:21): [True: 1.23k, False: 8.32k]
  ------------------
 5173|  1.23k|            janetc_emit_ssi(c, opim, t, t, imm, 1);
 5174|  11.5k|        } else {
 5175|  11.5k|            janetc_emit_sss(c, op, t, t, args[i], 1);
 5176|  11.5k|        }
 5177|  12.7k|    }
 5178|  2.91k|    return t;
 5179|  3.17k|}
janet.c:can_slot_be_imm:
 5135|  74.9k|static int can_slot_be_imm(JanetSlot s, int8_t *out) {
 5136|  74.9k|    if (!(s.flags & JANET_SLOT_CONSTANT)) return 0;
  ------------------
  |  |  991|  74.9k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (5136:9): [True: 25.1k, False: 49.8k]
  ------------------
 5137|  49.8k|    return can_be_imm(s.constant, out);
 5138|  74.9k|}
janet.c:can_be_imm:
 5126|  49.8k|static int can_be_imm(Janet x, int8_t *out) {
 5127|  49.8k|    if (!janet_checkint(x)) return 0;
  ------------------
  |  Branch (5127:9): [True: 45.6k, False: 4.12k]
  ------------------
 5128|  4.12k|    int32_t integer = janet_unwrap_integer(x);
  ------------------
  |  |  966|  4.12k|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|  4.12k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
 5129|  4.12k|    if (integer > INT8_MAX || integer < INT8_MIN) return 0;
  ------------------
  |  Branch (5129:9): [True: 1.14k, False: 2.98k]
  |  Branch (5129:31): [True: 174, False: 2.80k]
  ------------------
 5130|  2.80k|    *out = (int8_t) integer;
 5131|  2.80k|    return 1;
 5132|  4.12k|}
janet.c:do_length:
 5256|     42|static JanetSlot do_length(JanetFopts opts, JanetSlot *args) {
 5257|     42|    return genericSS(opts, JOP_LENGTH, args[0]);
 5258|     42|}
janet.c:genericSS:
 5090|     42|static JanetSlot genericSS(JanetFopts opts, int op, JanetSlot s) {
 5091|     42|    JanetSlot target = janetc_gettarget(opts);
 5092|     42|    janetc_emit_ss(opts.compiler, op, target, s, 1);
 5093|     42|    return target;
 5094|     42|}
janet.c:do_add:
 5299|    151|static JanetSlot do_add(JanetFopts opts, JanetSlot *args) {
 5300|    151|    return opreduce(opts, args, JOP_ADD, JOP_ADD_IMMEDIATE, janet_wrap_integer(0), janet_wrap_integer(0));
  ------------------
  |  |  967|    151|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|    151|#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|    151|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|    151|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 5301|    151|}
janet.c:do_sub:
 5302|     98|static JanetSlot do_sub(JanetFopts opts, JanetSlot *args) {
 5303|     98|    return opreduce(opts, args, JOP_SUBTRACT, JOP_SUBTRACT_IMMEDIATE, janet_wrap_integer(0), janet_wrap_integer(0));
  ------------------
  |  |  967|     98|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|     98|#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|     98|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|     98|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 5304|     98|}
janet.c:do_mul:
 5305|     97|static JanetSlot do_mul(JanetFopts opts, JanetSlot *args) {
 5306|     97|    return opreduce(opts, args, JOP_MULTIPLY, JOP_MULTIPLY_IMMEDIATE, janet_wrap_integer(1), janet_wrap_integer(1));
  ------------------
  |  |  967|     97|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|     97|#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|     97|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|     97|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 5307|     97|}
janet.c:do_div:
 5308|    474|static JanetSlot do_div(JanetFopts opts, JanetSlot *args) {
 5309|    474|    return opreduce(opts, args, JOP_DIVIDE, JOP_DIVIDE_IMMEDIATE, janet_wrap_integer(1), janet_wrap_integer(1));
  ------------------
  |  |  967|    474|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|    474|#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|    474|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|    474|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 5310|    474|}
janet.c:do_bor:
 5323|     62|static JanetSlot do_bor(JanetFopts opts, JanetSlot *args) {
 5324|     62|    return opreduce(opts, args, JOP_BOR, 0, janet_wrap_integer(0), janet_wrap_integer(0));
  ------------------
  |  |  967|     62|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|     62|#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|     62|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|     62|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 5325|     62|}
janet.c:do_gt:
 5381|    248|static JanetSlot do_gt(JanetFopts opts, JanetSlot *args) {
 5382|    248|    return compreduce(opts, args, JOP_GREATER_THAN, JOP_GREATER_THAN_IMMEDIATE, 0);
 5383|    248|}
janet.c:compreduce:
 5348|  2.23k|    int invert) {
 5349|  2.23k|    JanetCompiler *c = opts.compiler;
 5350|  2.23k|    int32_t i, len;
 5351|  2.23k|    int8_t imm = 0;
 5352|  2.23k|    len = janet_v_count(args);
  ------------------
  |  |  714|  2.23k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  1.54k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  1.54k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 1.54k, False: 697]
  |  |  ------------------
  ------------------
 5353|  2.23k|    int32_t *labels = NULL;
 5354|  2.23k|    JanetSlot t;
 5355|  2.23k|    if (len < 2) {
  ------------------
  |  Branch (5355:9): [True: 817, False: 1.42k]
  ------------------
 5356|    817|        return invert
  ------------------
  |  Branch (5356:16): [True: 0, False: 817]
  ------------------
 5357|    817|               ? 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5358|    817|               : janetc_cslot(janet_wrap_true());
  ------------------
  |  |  832|    817|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  822|    817|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    817|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    817|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5359|    817|    }
 5360|  1.42k|    t = janetc_gettarget(opts);
 5361|  70.7k|    for (i = 1; i < len; i++) {
  ------------------
  |  Branch (5361:17): [True: 69.3k, False: 1.42k]
  ------------------
 5362|  69.3k|        if (opim && can_slot_be_imm(args[i], &imm)) {
  ------------------
  |  Branch (5362:13): [True: 64.7k, False: 4.52k]
  |  Branch (5362:21): [True: 1.46k, False: 63.3k]
  ------------------
 5363|  1.46k|            janetc_emit_ssi(c, opim, t, args[i - 1], imm, 1);
 5364|  67.8k|        } else {
 5365|  67.8k|            janetc_emit_sss(c, op, t, args[i - 1], args[i], 1);
 5366|  67.8k|        }
 5367|  69.3k|        if (i != (len - 1)) {
  ------------------
  |  Branch (5367:13): [True: 67.8k, False: 1.42k]
  ------------------
 5368|  67.8k|            int32_t label = janetc_emit_si(c, invert ? JOP_JUMP_IF : JOP_JUMP_IF_NOT, t, 0, 1);
  ------------------
  |  Branch (5368:47): [True: 0, False: 67.8k]
  ------------------
 5369|  67.8k|            janet_v_push(labels, label);
  ------------------
  |  |  712|  67.8k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  67.8k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  67.8k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  66.7k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  66.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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  66.7k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  66.7k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 1.14k, False: 66.7k]
  |  |  |  |  |  |  |  Branch (723:50): [True: 3.89k, False: 62.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|  5.03k|#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))
  |  |  ------------------
  |  |  |  |  721|  67.8k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  67.8k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5370|  67.8k|        }
 5371|  69.3k|    }
 5372|  1.42k|    int32_t end = janet_v_count(c->buffer);
  ------------------
  |  |  714|  1.42k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  1.42k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  1.42k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 1.42k, False: 0]
  |  |  ------------------
  ------------------
 5373|  69.3k|    for (i = 0; i < janet_v_count(labels); i++) {
  ------------------
  |  |  714|  69.3k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  69.0k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  69.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 69.0k, False: 279]
  |  |  ------------------
  ------------------
  |  Branch (5373:17): [True: 67.8k, False: 1.42k]
  ------------------
 5374|  67.8k|        int32_t label = labels[i];
 5375|  67.8k|        c->buffer[label] |= ((uint32_t)(end - label) << 16);
 5376|  67.8k|    }
 5377|       |    janet_v_free(labels);
  ------------------
  |  |  711|  1.42k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  719|  1.14k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (711:34): [True: 1.14k, False: 279]
  |  |  ------------------
  ------------------
 5378|  1.42k|    return t;
 5379|  2.23k|}
janet.c:do_lt:
 5384|    986|static JanetSlot do_lt(JanetFopts opts, JanetSlot *args) {
 5385|    986|    return compreduce(opts, args, JOP_LESS_THAN, JOP_LESS_THAN_IMMEDIATE, 0);
 5386|    986|}
janet.c:do_gte:
 5387|     73|static JanetSlot do_gte(JanetFopts opts, JanetSlot *args) {
 5388|     73|    return compreduce(opts, args, JOP_GREATER_THAN_EQUAL, 0, 0);
 5389|     73|}
janet.c:do_lte:
 5390|    198|static JanetSlot do_lte(JanetFopts opts, JanetSlot *args) {
 5391|    198|    return compreduce(opts, args, JOP_LESS_THAN_EQUAL, 0, 0);
 5392|    198|}
janet.c:do_eq:
 5393|    731|static JanetSlot do_eq(JanetFopts opts, JanetSlot *args) {
 5394|    731|    return compreduce(opts, args, JOP_EQUALS, JOP_EQUALS_IMMEDIATE, 0);
 5395|    731|}
janet.c:do_neq:
 5396|      1|static JanetSlot do_neq(JanetFopts opts, JanetSlot *args) {
 5397|      1|    return compreduce(opts, args, JOP_NOT_EQUALS, JOP_NOT_EQUALS_IMMEDIATE, 1);
 5398|      1|}
janet.c:do_propagate:
 5183|     45|static JanetSlot do_propagate(JanetFopts opts, JanetSlot *args) {
 5184|     45|    return opreduce(opts, args, JOP_PROPAGATE, 0, janet_wrap_nil(), janet_wrap_nil());
  ------------------
  |  |  831|     45|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     45|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     45|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     45|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  return opreduce(opts, args, JOP_PROPAGATE, 0, janet_wrap_nil(), janet_wrap_nil());
  ------------------
  |  |  831|     45|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     45|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     45|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     45|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5185|     45|}
janet.c:arity2or3:
 5063|    217|static int arity2or3(JanetFopts opts, JanetSlot *args) {
 5064|    217|    (void) opts;
 5065|    217|    int32_t arity = janet_v_count(args);
  ------------------
  |  |  714|    217|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|    217|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    217|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 217, False: 0]
  |  |  ------------------
  ------------------
 5066|    217|    return arity == 2 || arity == 3;
  ------------------
  |  Branch (5066:12): [True: 185, False: 32]
  |  Branch (5066:26): [True: 27, False: 5]
  ------------------
 5067|    217|}
janet.c:do_get:
 5203|    212|static JanetSlot do_get(JanetFopts opts, JanetSlot *args) {
 5204|    212|    if (janet_v_count(args) == 3) {
  ------------------
  |  |  714|    212|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|    212|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    212|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 212, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (5204:9): [True: 27, False: 185]
  ------------------
 5205|     27|        JanetCompiler *c = opts.compiler;
 5206|     27|        JanetSlot t = janetc_gettarget(opts);
 5207|     27|        int target_is_default = janetc_sequal(t, args[2]);
 5208|     27|        JanetSlot dflt_slot = args[2];
 5209|     27|        if (target_is_default) {
  ------------------
  |  Branch (5209:13): [True: 0, False: 27]
  ------------------
 5210|      0|            dflt_slot = janetc_farslot(c);
 5211|      0|            janetc_copy(c, dflt_slot, t);
 5212|      0|        }
 5213|     27|        janetc_emit_sss(c, JOP_GET, t, args[0], args[1], 1);
 5214|     27|        int32_t label = janetc_emit_si(c, JOP_JUMP_IF_NOT_NIL, t, 0, 0);
 5215|     27|        janetc_copy(c, t, dflt_slot);
 5216|     27|        if (target_is_default) janetc_freeslot(c, dflt_slot);
  ------------------
  |  Branch (5216:13): [True: 0, False: 27]
  ------------------
 5217|     27|        int32_t current = janet_v_count(c->buffer);
  ------------------
  |  |  714|     27|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|     27|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|     27|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 27, False: 0]
  |  |  ------------------
  ------------------
 5218|     27|        c->buffer[label] |= (uint32_t)(current - label) << 16;
 5219|     27|        return t;
 5220|    185|    } else {
 5221|    185|        return opreduce(opts, args, JOP_GET, 0, janet_wrap_nil(), janet_wrap_nil());
  ------------------
  |  |  831|    185|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    185|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    185|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    185|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      return opreduce(opts, args, JOP_GET, 0, janet_wrap_nil(), janet_wrap_nil());
  ------------------
  |  |  831|    185|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    185|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    185|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    185|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5222|    185|    }
 5223|    212|}
janet.c:do_next:
 5224|  2.89k|static JanetSlot do_next(JanetFopts opts, JanetSlot *args) {
 5225|  2.89k|    return opfunction(opts, args, JOP_NEXT, janet_wrap_nil());
  ------------------
  |  |  831|  2.89k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  2.89k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.89k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.89k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5226|  2.89k|}
janet.c:do_modulo:
 5314|     33|static JanetSlot do_modulo(JanetFopts opts, JanetSlot *args) {
 5315|     33|    return opreduce(opts, args, JOP_MODULO, 0, janet_wrap_integer(0), janet_wrap_integer(1));
  ------------------
  |  |  967|     33|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|     33|#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|     33|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|     33|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 5316|     33|}
janet.c:do_remainder:
 5317|    100|static JanetSlot do_remainder(JanetFopts opts, JanetSlot *args) {
 5318|    100|    return opreduce(opts, args, JOP_REMAINDER, 0, janet_wrap_integer(0), janet_wrap_integer(1));
  ------------------
  |  |  967|    100|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|    100|#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|    100|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|    100|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 5319|    100|}
janet.c:do_cmp:
 5227|      1|static JanetSlot do_cmp(JanetFopts opts, JanetSlot *args) {
 5228|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5229|      1|}
janet.c:macroexpand1:
 6272|  1.26M|    const JanetSpecial **spec) {
 6273|  1.26M|    if (!janet_checktype(x, JANET_TUPLE))
  ------------------
  |  |  806|  1.26M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 1.26M]
  |  |  ------------------
  |  |  807|  1.26M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.26M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.26M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.26M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.26M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.26M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6273:9): [True: 254k, False: 1.00M]
  ------------------
 6274|   254k|        return 0;
 6275|  1.00M|    const Janet *form = janet_unwrap_tuple(x);
  ------------------
  |  |  858|  1.00M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
 6276|  1.00M|    if (janet_tuple_length(form) == 0)
  ------------------
  |  | 1801|  1.00M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|  1.00M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (6276:9): [True: 5.15k, False: 1.00M]
  ------------------
 6277|  5.15k|        return 0;
 6278|       |    /* Source map - only set when we get a tuple */
 6279|  1.00M|    if (janet_tuple_sm_line(form) >= 0) {
  ------------------
  |  | 1803|  1.00M|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1799|  1.00M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (6279:9): [True: 500k, False: 503k]
  ------------------
 6280|   500k|        c->current_mapping.line = janet_tuple_sm_line(form);
  ------------------
  |  | 1803|   500k|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1799|   500k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
 6281|   500k|        c->current_mapping.column = janet_tuple_sm_column(form);
  ------------------
  |  | 1804|   500k|#define janet_tuple_sm_column(t) (janet_tuple_head(t)->sm_column)
  |  |  ------------------
  |  |  |  | 1799|   500k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
 6282|   500k|    }
 6283|       |    /* Bracketed tuples are not specials or macros! */
 6284|  1.00M|    if (janet_tuple_flag(form) & JANET_TUPLE_FLAG_BRACKETCTOR)
  ------------------
  |  | 1805|  1.00M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1799|  1.00M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                  if (janet_tuple_flag(form) & JANET_TUPLE_FLAG_BRACKETCTOR)
  ------------------
  |  | 1797|  1.00M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (6284:9): [True: 959, False: 1.00M]
  ------------------
 6285|    959|        return 0;
 6286|  1.00M|    if (!janet_checktype(form[0], JANET_SYMBOL))
  ------------------
  |  |  806|  1.00M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 1.00M]
  |  |  ------------------
  |  |  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|  1.00M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.00M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.00M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.00M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6286:9): [True: 15.1k, False: 987k]
  ------------------
 6287|  15.1k|        return 0;
 6288|   987k|    const uint8_t *name = janet_unwrap_symbol(form[0]);
  ------------------
  |  |  864|   987k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
 6289|   987k|    const JanetSpecial *s = janetc_special(name);
 6290|   987k|    if (s) {
  ------------------
  |  Branch (6290:9): [True: 829k, False: 157k]
  ------------------
 6291|   829k|        *spec = s;
 6292|   829k|        return 0;
 6293|   829k|    }
 6294|   157k|    Janet macroval;
 6295|   157k|    JanetBindingType btype = janet_resolve(c->env, name, &macroval);
 6296|   157k|    if (!(btype == JANET_BINDING_MACRO || btype == JANET_BINDING_DYNAMIC_MACRO) ||
  ------------------
  |  Branch (6296:11): [True: 147k, False: 10.7k]
  |  Branch (6296:43): [True: 0, False: 10.7k]
  ------------------
 6297|   147k|            !janet_checktype(macroval, JANET_FUNCTION))
  ------------------
  |  |  806|   147k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 147k]
  |  |  ------------------
  |  |  807|   147k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   147k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   147k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   147k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   147k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   147k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6297:13): [True: 0, False: 147k]
  ------------------
 6298|  10.7k|        return 0;
 6299|       |
 6300|       |    /* Evaluate macro */
 6301|   147k|    JanetFunction *macro = janet_unwrap_function(macroval);
  ------------------
  |  |  868|   147k|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
 6302|   147k|    int32_t arity = janet_tuple_length(form) - 1;
  ------------------
  |  | 1801|   147k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|   147k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
 6303|   147k|    JanetFiber *fiberp = janet_fiber(macro, 64, arity, form + 1);
 6304|   147k|    if (NULL == fiberp) {
  ------------------
  |  Branch (6304:9): [True: 6, False: 147k]
  ------------------
 6305|      6|        int32_t minar = macro->def->min_arity;
 6306|      6|        int32_t maxar = macro->def->max_arity;
 6307|      6|        const uint8_t *es = NULL;
 6308|      6|        if (minar >= 0 && arity < minar)
  ------------------
  |  Branch (6308:13): [True: 6, False: 0]
  |  Branch (6308:27): [True: 1, False: 5]
  ------------------
 6309|      1|            es = janet_formatc("macro arity mismatch, expected at least %d, got %d", minar, arity);
 6310|      6|        if (maxar >= 0 && arity > maxar)
  ------------------
  |  Branch (6310:13): [True: 6, False: 0]
  |  Branch (6310:27): [True: 5, False: 1]
  ------------------
 6311|      5|            es = janet_formatc("macro arity mismatch, expected at most %d, got %d", maxar, arity);
 6312|      6|        c->result.macrofiber = NULL;
 6313|      6|        janetc_error(c, es);
 6314|      6|        return 0;
 6315|      6|    }
 6316|       |    /* Set env */
 6317|   147k|    fiberp->env = c->env;
 6318|   147k|    int lock = janet_gclock();
 6319|   147k|    Janet mf_kw = janet_ckeywordv("macro-form");
  ------------------
  |  | 1842|   147k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|   147k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|   147k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   147k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   147k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6320|   147k|    janet_table_put(c->env, mf_kw, x);
 6321|   147k|    Janet ml_kw = janet_ckeywordv("macro-lints");
  ------------------
  |  | 1842|   147k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|   147k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|   147k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   147k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   147k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6322|   147k|    if (c->lints) {
  ------------------
  |  Branch (6322:9): [True: 0, False: 147k]
  ------------------
 6323|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6324|      0|    }
 6325|   147k|    Janet tempOut;
 6326|   147k|    JanetSignal status = janet_continue(fiberp, janet_wrap_nil(), &tempOut);
  ------------------
  |  |  831|   147k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   147k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   147k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   147k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6327|   147k|    janet_table_put(c->env, mf_kw, janet_wrap_nil());
  ------------------
  |  |  831|   147k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   147k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   147k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   147k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6328|   147k|    janet_table_put(c->env, ml_kw, janet_wrap_nil());
  ------------------
  |  |  831|   147k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   147k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   147k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   147k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6329|   147k|    janet_gcunlock(lock);
 6330|   147k|    if (status != JANET_SIGNAL_OK) {
  ------------------
  |  Branch (6330:9): [True: 313, False: 146k]
  ------------------
 6331|    313|        const uint8_t *es = janet_formatc("(macro) %V", tempOut);
 6332|    313|        c->result.macrofiber = fiberp;
 6333|    313|        janetc_error(c, es);
 6334|    313|        return 0;
 6335|   146k|    } else {
 6336|   146k|        *out = tempOut;
 6337|   146k|    }
 6338|       |
 6339|   146k|    return 1;
 6340|   147k|}
janet.c:janetc_tuple:
 6242|    959|static JanetSlot janetc_tuple(JanetFopts opts, Janet x) {
 6243|    959|    JanetCompiler *c = opts.compiler;
 6244|    959|    const Janet *t = janet_unwrap_tuple(x);
  ------------------
  |  |  858|    959|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
 6245|    959|    return janetc_maker(opts,
 6246|       |                        janetc_toslots(c, t, janet_tuple_length(t)),
  ------------------
  |  | 1801|    959|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|    959|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
 6247|    959|                        JOP_MAKE_TUPLE);
 6248|    959|}
janet.c:janetc_maker:
 6194|  7.81k|static JanetSlot janetc_maker(JanetFopts opts, JanetSlot *slots, int op) {
 6195|  7.81k|    JanetCompiler *c = opts.compiler;
 6196|  7.81k|    JanetSlot retslot;
 6197|       |
 6198|       |    /* Check if this structure is composed entirely of constants */
 6199|  7.81k|    int can_inline = 1;
 6200|  13.8k|    for (int32_t i = 0; i < janet_v_count(slots); i++) {
  ------------------
  |  |  714|  13.8k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  8.01k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  8.01k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 8.01k, False: 5.79k]
  |  |  ------------------
  ------------------
  |  Branch (6200:25): [True: 6.26k, False: 7.54k]
  ------------------
 6201|  6.26k|        if (!(slots[i].flags & JANET_SLOT_CONSTANT) ||
  ------------------
  |  |  991|  6.26k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (6201:13): [True: 269, False: 6.00k]
  ------------------
 6202|  6.00k|                (slots[i].flags & JANET_SLOT_SPLICED)) {
  ------------------
  |  |  999|  6.00k|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
  |  Branch (6202:17): [True: 6, False: 5.99k]
  ------------------
 6203|    275|            can_inline = 0;
 6204|    275|            break;
 6205|    275|        }
 6206|  6.26k|    }
 6207|       |
 6208|  7.81k|    if (can_inline && (op == JOP_MAKE_STRUCT)) {
  ------------------
  |  Branch (6208:9): [True: 7.54k, False: 275]
  |  Branch (6208:23): [True: 5.81k, False: 1.73k]
  ------------------
 6209|  5.81k|        JanetKV *st = janet_struct_begin(janet_v_count(slots) / 2);
  ------------------
  |  |  714|  5.81k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|    141|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    141|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 141, False: 5.66k]
  |  |  ------------------
  ------------------
 6210|  7.16k|        for (int32_t i = 0; i < janet_v_count(slots); i += 2) {
  ------------------
  |  |  714|  7.16k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  1.49k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  1.49k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 1.49k, False: 5.66k]
  |  |  ------------------
  ------------------
  |  Branch (6210:29): [True: 1.35k, False: 5.81k]
  ------------------
 6211|  1.35k|            Janet k = slots[i].constant;
 6212|  1.35k|            Janet v = slots[i + 1].constant;
 6213|  1.35k|            janet_struct_put(st, k, v);
 6214|  1.35k|        }
 6215|  5.81k|        retslot = janetc_cslot(janet_wrap_struct(janet_struct_end(st)));
  ------------------
  |  |  842|  5.81k|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|  5.81k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.81k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.81k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6216|  5.81k|        janetc_freeslots(c, slots);
 6217|  5.81k|    } else if (can_inline && (op == JOP_MAKE_TUPLE)) {
  ------------------
  |  Branch (6217:16): [True: 1.73k, False: 275]
  |  Branch (6217:30): [True: 808, False: 926]
  ------------------
 6218|    808|        Janet *tup = janet_tuple_begin(janet_v_count(slots));
  ------------------
  |  |  714|    808|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|    808|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    808|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 808, False: 0]
  |  |  ------------------
  ------------------
 6219|  2.96k|        for (int32_t i = 0; i < janet_v_count(slots); i++) {
  ------------------
  |  |  714|  2.96k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  2.96k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  2.96k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 2.96k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (6219:29): [True: 2.15k, False: 808]
  ------------------
 6220|  2.15k|            tup[i] = slots[i].constant;
 6221|  2.15k|        }
 6222|    808|        retslot = janetc_cslot(janet_wrap_tuple(janet_tuple_end(tup)));
  ------------------
  |  |  843|    808|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|    808|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    808|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    808|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6223|    808|        janetc_freeslots(c, slots);
 6224|  1.20k|    } else {
 6225|  1.20k|        janetc_pushslots(c, slots);
 6226|  1.20k|        janetc_freeslots(c, slots);
 6227|  1.20k|        retslot = janetc_gettarget(opts);
 6228|  1.20k|        janetc_emit_s(c, op, retslot, 1);
 6229|  1.20k|    }
 6230|       |
 6231|  7.81k|    return retslot;
 6232|  7.81k|}
janet.c:janetc_call:
 6058|  26.1k|static JanetSlot janetc_call(JanetFopts opts, JanetSlot *slots, JanetSlot fun, const Janet *form) {
 6059|  26.1k|    JanetSlot retslot;
 6060|  26.1k|    JanetCompiler *c = opts.compiler;
 6061|  26.1k|    int specialized = 0;
 6062|  26.1k|    if (fun.flags & JANET_SLOT_CONSTANT && !has_spliced(slots)) {
  ------------------
  |  |  991|  52.3k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (6062:9): [True: 24.5k, False: 1.63k]
  |  Branch (6062:44): [True: 24.0k, False: 509]
  ------------------
 6063|  24.0k|        if (janet_checktype(fun.constant, JANET_FUNCTION)) {
  ------------------
  |  |  806|  24.0k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 14.0k, False: 10.0k]
  |  |  |  Branch (806:6): [Folded, False: 24.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|  24.0k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  24.0k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  24.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  24.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6064|  14.0k|            JanetFunction *f = janet_unwrap_function(fun.constant);
  ------------------
  |  |  868|  14.0k|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
 6065|  14.0k|            const JanetFunOptimizer *o = janetc_funopt(f->def->flags);
 6066|  14.0k|            if (o && (!o->can_optimize || o->can_optimize(opts, slots))) {
  ------------------
  |  Branch (6066:17): [True: 12.8k, False: 1.20k]
  |  Branch (6066:23): [True: 3.25k, False: 9.55k]
  |  Branch (6066:43): [True: 9.51k, False: 35]
  ------------------
 6067|  12.7k|                specialized = 1;
 6068|  12.7k|                retslot = o->optimize(opts, slots);
 6069|  12.7k|            }
 6070|  14.0k|        }
 6071|       |        /* TODO janet function inlining (no c functions)*/
 6072|  24.0k|    }
 6073|  26.1k|    if (!specialized) {
  ------------------
  |  Branch (6073:9): [True: 13.4k, False: 12.7k]
  ------------------
 6074|  13.4k|        int32_t min_arity = janetc_pushslots(c, slots);
 6075|       |        /* Check for provably incorrect function calls */
 6076|  13.4k|        if (fun.flags & JANET_SLOT_CONSTANT) {
  ------------------
  |  |  991|  13.4k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (6076:13): [True: 11.7k, False: 1.63k]
  ------------------
 6077|       |
 6078|       |            /* Check for bad arity type if fun is a constant */
 6079|  11.7k|            switch (janet_type(fun.constant)) {
  ------------------
  |  |  795|  11.7k|    (isnan((x).number) \
  |  |  796|  11.7k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  11.7k|        : JANET_NUMBER)
  ------------------
  |  Branch (6079:21): [True: 11.6k, False: 147]
  ------------------
 6080|  1.63k|                case JANET_FUNCTION: {
  ------------------
  |  Branch (6080:17): [True: 1.63k, False: 10.1k]
  ------------------
 6081|  1.63k|                    JanetFunction *f = janet_unwrap_function(fun.constant);
  ------------------
  |  |  868|  1.63k|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
 6082|  1.63k|                    int32_t min = f->def->min_arity;
 6083|  1.63k|                    int32_t max = f->def->max_arity;
 6084|  1.63k|                    int structarg = f->def->flags & JANET_FUNCDEF_FLAG_STRUCTARG;
  ------------------
  |  | 1105|  1.63k|#define JANET_FUNCDEF_FLAG_STRUCTARG 0x1000000
  ------------------
 6085|  1.63k|                    int namedarg = f->def->flags & JANET_FUNCDEF_FLAG_NAMEDARGS;
  ------------------
  |  | 1107|  1.63k|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
 6086|  1.63k|                    if (min_arity < 0) {
  ------------------
  |  Branch (6086:25): [True: 398, False: 1.24k]
  ------------------
 6087|       |                        /* Call has splices */
 6088|    398|                        min_arity = -1 - min_arity;
 6089|    398|                        if (min_arity > max && max >= 0) {
  ------------------
  |  Branch (6089:29): [True: 11, False: 387]
  |  Branch (6089:48): [True: 11, False: 0]
  ------------------
 6090|     11|                            const uint8_t *es = janet_formatc(
 6091|     11|                                                    "%v expects at most %d argument%s, got at least %d",
 6092|     11|                                                    fun.constant, max, max == 1 ? "" : "s", min_arity);
  ------------------
  |  Branch (6092:72): [True: 6, False: 5]
  ------------------
 6093|     11|                            janetc_error(c, es);
 6094|     11|                        }
 6095|  1.24k|                    } else {
 6096|       |                        /* Call has no splices */
 6097|  1.24k|                        if (min_arity > max && max >= 0) {
  ------------------
  |  Branch (6097:29): [True: 27, False: 1.21k]
  |  Branch (6097:48): [True: 27, False: 0]
  ------------------
 6098|     27|                            const uint8_t *es = janet_formatc(
 6099|     27|                                                    "%v expects at most %d argument%s, got %d",
 6100|     27|                                                    fun.constant, max, max == 1 ? "" : "s", min_arity);
  ------------------
  |  Branch (6100:72): [True: 21, False: 6]
  ------------------
 6101|     27|                            janetc_error(c, es);
 6102|     27|                        }
 6103|  1.24k|                        if (min_arity < min) {
  ------------------
  |  Branch (6103:29): [True: 12, False: 1.22k]
  ------------------
 6104|     12|                            const uint8_t *es = janet_formatc(
 6105|     12|                                                    "%v expects at least %d argument%s, got %d",
 6106|     12|                                                    fun.constant, min, min == 1 ? "" : "s", min_arity);
  ------------------
  |  Branch (6106:72): [True: 1, False: 11]
  ------------------
 6107|     12|                            janetc_error(c, es);
 6108|     12|                        }
 6109|  1.24k|                        if (structarg && (min_arity > f->def->arity) && ((min_arity - f->def->arity) & 1)) {
  ------------------
  |  Branch (6109:29): [True: 20, False: 1.22k]
  |  Branch (6109:42): [True: 18, False: 2]
  |  Branch (6109:73): [True: 4, False: 14]
  ------------------
 6110|       |                            /* If we have an odd number of variadic arguments to a `&keys` function, that is almost certainly wrong. */
 6111|      4|                            if (namedarg) {
  ------------------
  |  Branch (6111:33): [True: 0, False: 4]
  ------------------
 6112|      0|                                janetc_lintf(c, JANET_C_LINT_NORMAL,
 6113|      0|                                             "odd number of named arguments to `&named` function %v", fun.constant);
 6114|      4|                            } else {
 6115|      4|                                janetc_lintf(c, JANET_C_LINT_NORMAL,
 6116|      4|                                             "odd number of named arguments to `&keys` function %v", fun.constant);
 6117|      4|                            }
 6118|      4|                        }
 6119|  1.24k|                        if (namedarg && f->def->named_args_count > 0) {
  ------------------
  |  Branch (6119:29): [True: 0, False: 1.24k]
  |  Branch (6119:41): [True: 0, False: 0]
  ------------------
 6120|       |                            /* For each argument passed in, check if it is one of the used named arguments
 6121|       |                             * by checking the list defined in the function def. If not, raise a normal compiler
 6122|       |                             * lint. We can also do a strict lint for _missing_ named arguments, although in many
 6123|       |                             * cases those are assumed to have some kind of default, or we have dynamic keys. */
 6124|      0|                            int32_t first_arg_key_index = f->def->arity + 1;
 6125|      0|                            for (int32_t i = first_arg_key_index; i < janet_tuple_length(form); i += 2) {
  ------------------
  |  | 1801|      0|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|      0|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (6125:67): [True: 0, False: 0]
  ------------------
 6126|      0|                                Janet argkey = form[i];
 6127|       |                                /* Assumption: The first N constants of a function are its named argument keys. This
 6128|       |                                 * may change if the compiler changes, but is true for all Janet generated functions. */
 6129|      0|                                int found = 0;
 6130|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6131|      0|                                    for (int32_t j = 0; j < f->def->named_args_count && j < f->def->constants_length; j++) {
  ------------------
  |  Branch (6131:57): [True: 0, False: 0]
  |  Branch (6131:89): [True: 0, False: 0]
  ------------------
 6132|      0|                                        if (janet_equals(argkey, f->def->constants[j])) {
  ------------------
  |  Branch (6132:45): [True: 0, False: 0]
  ------------------
 6133|      0|                                            found = 1;
 6134|      0|                                            break;
 6135|      0|                                        }
 6136|      0|                                    }
 6137|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6138|       |                                    /* Possible lint : too dynamic, be dumber
 6139|       |                                     * (defn f [&named x] [x])
 6140|       |                                     * (f (if (coin-flip) :x :w) 10)
 6141|       |                                     * A tuple could be a function call the evaluates to a valid key */
 6142|      0|                                    found = 1;
 6143|      0|                                }
 6144|      0|                                if (!found) {
  ------------------
  |  Branch (6144:37): [True: 0, False: 0]
  ------------------
 6145|      0|                                    janetc_lintf(c, JANET_C_LINT_NORMAL,
 6146|      0|                                                 "unused named argument %v to function %v", argkey, fun.constant);
 6147|      0|                                }
 6148|      0|                            }
 6149|      0|                        }
 6150|  1.24k|                    }
 6151|  1.63k|                }
 6152|  1.63k|                break;
 6153|  6.40k|                case JANET_CFUNCTION:
  ------------------
  |  Branch (6153:17): [True: 6.40k, False: 5.39k]
  ------------------
 6154|  6.41k|                case JANET_ABSTRACT:
  ------------------
  |  Branch (6154:17): [True: 12, False: 11.7k]
  ------------------
 6155|  7.75k|                case JANET_NIL:
  ------------------
  |  Branch (6155:17): [True: 1.33k, False: 10.4k]
  ------------------
 6156|  7.75k|                    break;
 6157|    276|                case JANET_KEYWORD:
  ------------------
  |  Branch (6157:17): [True: 276, False: 11.5k]
  ------------------
 6158|    276|                    if (min_arity == 0) {
  ------------------
  |  Branch (6158:25): [True: 0, False: 276]
  ------------------
 6159|      0|                        const uint8_t *es = janet_formatc("%v expects at least 1 argument, got 0",
 6160|      0|                                                          fun.constant);
 6161|      0|                        janetc_error(c, es);
 6162|      0|                    }
 6163|    276|                    break;
 6164|  2.12k|                default:
  ------------------
  |  Branch (6164:17): [True: 2.12k, False: 9.66k]
  ------------------
 6165|  2.12k|                    if (min_arity > 1 || min_arity == 0) {
  ------------------
  |  Branch (6165:25): [True: 685, False: 1.44k]
  |  Branch (6165:42): [True: 43, False: 1.39k]
  ------------------
 6166|    728|                        const uint8_t *es = janet_formatc("%v expects 1 argument, got %d",
 6167|    728|                                                          fun.constant, min_arity);
 6168|    728|                        janetc_error(c, es);
 6169|    728|                    }
 6170|  2.12k|                    if (min_arity < -2) {
  ------------------
  |  Branch (6170:25): [True: 50, False: 2.07k]
  ------------------
 6171|     50|                        const uint8_t *es = janet_formatc("%v expects 1 argument, got at least %d",
 6172|     50|                                                          fun.constant, -1 - min_arity);
 6173|     50|                        janetc_error(c, es);
 6174|     50|                    }
 6175|  2.12k|                    break;
 6176|  11.7k|            }
 6177|  11.7k|        }
 6178|       |
 6179|  13.4k|        if ((opts.flags & JANET_FOPTS_TAIL) &&
  ------------------
  |  | 1099|  13.4k|#define JANET_FOPTS_TAIL 0x10000
  ------------------
  |  Branch (6179:13): [True: 7.22k, False: 6.20k]
  ------------------
 6180|       |                /* Prevent top level tail calls for better errors */
 6181|  7.22k|                !(c->scope->flags & JANET_SCOPE_TOP)) {
  ------------------
  |  | 1013|  7.22k|#define JANET_SCOPE_TOP 4
  ------------------
  |  Branch (6181:17): [True: 865, False: 6.35k]
  ------------------
 6182|    865|            janetc_emit_s(c, JOP_TAILCALL, fun, 0);
 6183|    865|            retslot = janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|    865|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    865|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    865|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    865|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6184|    865|            retslot.flags = JANET_SLOT_RETURNED;
  ------------------
  |  |  995|    865|#define JANET_SLOT_RETURNED 0x100000
  ------------------
 6185|  12.5k|        } else {
 6186|  12.5k|            retslot = janetc_gettarget(opts);
 6187|  12.5k|            janetc_emit_ss(c, JOP_CALL, retslot, fun, 1);
 6188|  12.5k|        }
 6189|  13.4k|    }
 6190|  26.1k|    janetc_freeslots(c, slots);
 6191|  26.1k|    return retslot;
 6192|  26.1k|}
janet.c:has_spliced:
 6020|  24.5k|static int has_spliced(JanetSlot *slots) {
 6021|  24.5k|    int32_t i;
 6022|   250k|    for (i = 0; i < janet_v_count(slots); i++) {
  ------------------
  |  |  714|   250k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|   248k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   248k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 248k, False: 2.03k]
  |  |  ------------------
  ------------------
  |  Branch (6022:17): [True: 226k, False: 24.0k]
  ------------------
 6023|   226k|        if (slots[i].flags & JANET_SLOT_SPLICED)
  ------------------
  |  |  999|   226k|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
  |  Branch (6023:13): [True: 509, False: 225k]
  ------------------
 6024|    509|            return 1;
 6025|   226k|    }
 6026|  24.0k|    return 0;
 6027|  24.5k|}
janet.c:janetc_array:
 6234|    173|static JanetSlot janetc_array(JanetFopts opts, Janet x) {
 6235|    173|    JanetCompiler *c = opts.compiler;
 6236|    173|    JanetArray *a = janet_unwrap_array(x);
  ------------------
  |  |  860|    173|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
 6237|    173|    return janetc_maker(opts,
 6238|    173|                        janetc_toslots(c, a->data, a->count),
 6239|    173|                        JOP_MAKE_ARRAY);
 6240|    173|}
janet.c:janetc_tablector:
 6250|  5.92k|static JanetSlot janetc_tablector(JanetFopts opts, Janet x, int op) {
 6251|  5.92k|    JanetCompiler *c = opts.compiler;
 6252|  5.92k|    return janetc_maker(opts,
 6253|  5.92k|                        janetc_toslotskv(c, x),
 6254|  5.92k|                        op);
 6255|  5.92k|}
janet.c:janetc_bufferctor:
 6257|    764|static JanetSlot janetc_bufferctor(JanetFopts opts, Janet x) {
 6258|    764|    JanetCompiler *c = opts.compiler;
 6259|    764|    JanetBuffer *b = janet_unwrap_buffer(x);
  ------------------
  |  |  862|    764|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
 6260|    764|    Janet onearg = janet_stringv(b->data, b->count);
  ------------------
  |  | 1826|    764|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|    764|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|    764|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    764|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    764|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6261|    764|    return janetc_maker(opts,
 6262|    764|                        janetc_toslots(c, &onearg, 1),
 6263|    764|                        JOP_MAKE_BUFFER);
 6264|    764|}
janet.c:janetc_init:
 6592|   237k|static void janetc_init(JanetCompiler *c, JanetTable *env, const uint8_t *where, JanetArray *lints) {
 6593|   237k|    c->scope = NULL;
 6594|   237k|    c->buffer = NULL;
 6595|   237k|    c->mapbuffer = NULL;
 6596|   237k|    c->recursion_guard = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|   237k|#define JANET_RECURSION_GUARD 1024
  ------------------
 6597|   237k|    c->env = env;
 6598|   237k|    c->source = where;
 6599|   237k|    c->current_mapping.line = -1;
 6600|   237k|    c->current_mapping.column = -1;
 6601|   237k|    c->lints = lints;
 6602|   237k|    c->is_redef = janet_truthy(janet_table_get_keyword(c->env, "redef"));
  ------------------
  |  |  818|   237k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|   475k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 237k]
  |  |  |  |  ------------------
  |  |  |  |  807|   475k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|   475k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|   237k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|   237k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   237k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   237k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 0, False: 237k]
  |  |  ------------------
  |  |  819|   237k|     (!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]
  |  |  ------------------
  ------------------
 6603|       |    /* Init result */
 6604|   237k|    c->result.error = NULL;
 6605|   237k|    c->result.status = JANET_COMPILE_OK;
 6606|   237k|    c->result.funcdef = NULL;
 6607|       |    c->result.macrofiber = NULL;
 6608|   237k|    c->result.error_mapping.line = -1;
 6609|   237k|    c->result.error_mapping.column = -1;
 6610|   237k|}
janet.c:janetc_deinit:
 6613|   237k|static void janetc_deinit(JanetCompiler *c) {
 6614|   237k|    janet_v_free(c->buffer);
  ------------------
  |  |  711|   237k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  719|   236k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (711:34): [True: 236k, False: 888]
  |  |  ------------------
  ------------------
 6615|   237k|    janet_v_free(c->mapbuffer);
  ------------------
  |  |  711|   237k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  719|   236k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (711:34): [True: 236k, False: 888]
  |  |  ------------------
  ------------------
 6616|       |    c->env = NULL;
 6617|   237k|}
janet.c:janet_dyncstring:
 6806|  24.9k|static const char *janet_dyncstring(const char *name, const char *dflt) {
 6807|  24.9k|    Janet x = janet_dyn(name);
 6808|  24.9k|    if (janet_checktype(x, JANET_NIL)) return dflt;
  ------------------
  |  |  806|  24.9k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 12.4k, False: 12.4k]
  |  |  |  Branch (806:6): [Folded, False: 24.9k]
  |  |  ------------------
  |  |  807|  24.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|  24.9k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  24.9k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  24.9k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  24.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  24.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6809|  12.4k|    if (!janet_checktype(x, JANET_STRING)) {
  ------------------
  |  |  806|  12.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 12.4k]
  |  |  ------------------
  |  |  807|  12.4k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  12.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  12.4k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  12.4k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  12.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  12.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6809:9): [True: 0, False: 12.4k]
  ------------------
 6810|      0|        janet_panicf("expected string, got %v", x);
 6811|      0|    }
 6812|  12.4k|    const uint8_t *jstr = janet_unwrap_string(x);
  ------------------
  |  |  863|  12.4k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
 6813|  12.4k|    const char *cstr = (const char *)jstr;
 6814|  12.4k|    if (strlen(cstr) != (size_t) janet_string_length(jstr)) {
  ------------------
  |  | 1812|  12.4k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|  12.4k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (6814:9): [True: 0, False: 12.4k]
  ------------------
 6815|      0|        janet_panicf("string %v contains embedded 0s", x);
 6816|      0|    }
 6817|  12.4k|    return cstr;
 6818|  12.4k|}
janet.c:is_path_sep:
 6820|   257k|static int is_path_sep(char c) {
 6821|       |#ifdef JANET_WINDOWS
 6822|       |    if (c == '\\') return 1;
 6823|       |#endif
 6824|   257k|    return c == '/';
 6825|   257k|}
janet.c:janet_load_libs:
 7812|  7.16k|static void janet_load_libs(JanetTable *env) {
 7813|  7.16k|    JanetRegExt corelib_cfuns[] = {
 7814|  7.16k|        JANET_CORE_REG("native", janet_core_native),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7815|  7.16k|        JANET_CORE_REG("describe", janet_core_describe),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7816|  7.16k|        JANET_CORE_REG("string", janet_core_string),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7817|  7.16k|        JANET_CORE_REG("symbol", janet_core_symbol),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7818|  7.16k|        JANET_CORE_REG("keyword", janet_core_keyword),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7819|  7.16k|        JANET_CORE_REG("buffer", janet_core_buffer),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7820|  7.16k|        JANET_CORE_REG("abstract?", janet_core_is_abstract),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7821|  7.16k|        JANET_CORE_REG("table", janet_core_table),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7822|  7.16k|        JANET_CORE_REG("array", janet_core_array),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7823|  7.16k|        JANET_CORE_REG("scan-number", janet_core_scannumber),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7824|  7.16k|        JANET_CORE_REG("tuple", janet_core_tuple),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7825|  7.16k|        JANET_CORE_REG("struct", janet_core_struct),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7826|  7.16k|        JANET_CORE_REG("gensym", janet_core_gensym),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7827|  7.16k|        JANET_CORE_REG("gccollect", janet_core_gccollect),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7828|  7.16k|        JANET_CORE_REG("gcsetinterval", janet_core_gcsetinterval),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7829|  7.16k|        JANET_CORE_REG("gcinterval", janet_core_gcinterval),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7830|  7.16k|        JANET_CORE_REG("type", janet_core_type),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7831|  7.16k|        JANET_CORE_REG("hash", janet_core_hash),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7832|  7.16k|        JANET_CORE_REG("getline", janet_core_getline),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7833|  7.16k|        JANET_CORE_REG("dyn", janet_core_dyn),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7834|  7.16k|        JANET_CORE_REG("setdyn", janet_core_setdyn),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7835|  7.16k|        JANET_CORE_REG("trace", janet_core_trace),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7836|  7.16k|        JANET_CORE_REG("untrace", janet_core_untrace),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7837|  7.16k|        JANET_CORE_REG("module/expand-path", janet_core_expand_path),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7838|  7.16k|        JANET_CORE_REG("int?", janet_core_check_int),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7839|  7.16k|        JANET_CORE_REG("nat?", janet_core_check_nat),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7840|  7.16k|        JANET_CORE_REG("bytes?", janet_core_is_bytes),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7841|  7.16k|        JANET_CORE_REG("indexed?", janet_core_is_indexed),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7842|  7.16k|        JANET_CORE_REG("dictionary?", janet_core_is_dictionary),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7843|  7.16k|        JANET_CORE_REG("lengthable?", janet_core_is_lengthable),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7844|  7.16k|        JANET_CORE_REG("slice", janet_core_slice),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7845|  7.16k|        JANET_CORE_REG("range", janet_core_range),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7846|  7.16k|        JANET_CORE_REG("signal", janet_core_signal),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7847|  7.16k|        JANET_CORE_REG("memcmp", janet_core_memcmp),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7848|  7.16k|        JANET_CORE_REG("getproto", janet_core_getproto),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7849|  7.16k|        JANET_CORE_REG("sandbox", janet_core_sandbox),
  ------------------
  |  |  479|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2119|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7850|  7.16k|        JANET_REG_END
  ------------------
  |  | 2109|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 7851|  7.16k|    };
 7852|       |    janet_core_cfuns_ext(env, NULL, corelib_cfuns);
 7853|  7.16k|    janet_lib_io(env);
 7854|  7.16k|    janet_lib_math(env);
 7855|  7.16k|    janet_lib_array(env);
 7856|  7.16k|    janet_lib_tuple(env);
 7857|  7.16k|    janet_lib_buffer(env);
 7858|  7.16k|    janet_lib_table(env);
 7859|  7.16k|    janet_lib_struct(env);
 7860|  7.16k|    janet_lib_fiber(env);
 7861|  7.16k|    janet_lib_os(env);
 7862|  7.16k|    janet_lib_parse(env);
 7863|  7.16k|    janet_lib_compile(env);
 7864|  7.16k|    janet_lib_debug(env);
 7865|  7.16k|    janet_lib_string(env);
 7866|  7.16k|    janet_lib_marsh(env);
 7867|  7.16k|#ifdef JANET_PEG
 7868|  7.16k|    janet_lib_peg(env);
 7869|  7.16k|#endif
 7870|  7.16k|#ifdef JANET_ASSEMBLER
 7871|  7.16k|    janet_lib_asm(env);
 7872|  7.16k|#endif
 7873|  7.16k|#ifdef JANET_INT_TYPES
 7874|  7.16k|    janet_lib_inttypes(env);
 7875|  7.16k|#endif
 7876|  7.16k|#ifdef JANET_EV
 7877|  7.16k|    janet_lib_ev(env);
 7878|  7.16k|#ifdef JANET_FILEWATCH
 7879|  7.16k|    janet_lib_filewatch(env);
 7880|  7.16k|#endif
 7881|  7.16k|#endif
 7882|  7.16k|#ifdef JANET_NET
 7883|  7.16k|    janet_lib_net(env);
 7884|  7.16k|#endif
 7885|  7.16k|#ifdef JANET_FFI
 7886|  7.16k|    janet_lib_ffi(env);
 7887|  7.16k|#endif
 7888|  7.16k|}
janet.c:helper_find:
 8360|      2|static void helper_find(int32_t argc, Janet *argv, JanetFuncDef **def, int32_t *bytecode_offset) {
 8361|      2|    janet_fixarity(argc, 3);
 8362|      2|    const uint8_t *source = janet_getstring(argv, 0);
 8363|      2|    int32_t line = janet_getinteger(argv, 1);
 8364|      2|    int32_t col = janet_getinteger(argv, 2);
 8365|      2|    janet_debug_find(def, bytecode_offset, source, line, col);
 8366|      2|}
janet.c:helper_find_fun:
 8370|     20|static void helper_find_fun(int32_t argc, Janet *argv, JanetFuncDef **def, int32_t *bytecode_offset) {
 8371|     20|    janet_arity(argc, 1, 2);
 8372|     20|    JanetFunction *func = janet_getfunction(argv, 0);
 8373|     20|    int32_t offset = (argc == 2) ? janet_getinteger(argv, 1) : 0;
  ------------------
  |  Branch (8373:22): [True: 6, False: 14]
  ------------------
 8374|     20|    *def = func->def;
 8375|     20|    *bytecode_offset = offset;
 8376|     20|}
janet.c:janetc_movenear:
 8738|  5.57M|                            JanetSlot src) {
 8739|  5.57M|    janet_assert(dest <= 255, "dest slot index must be <= 255");
  ------------------
  |  |  389|  5.57M|#define janet_assert(c, m) do { \
  |  |  390|  5.57M|    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.57M]
  |  |  ------------------
  |  |  391|  5.57M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 5.57M]
  |  |  ------------------
  ------------------
 8740|  5.57M|    if (src.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF)) {
  ------------------
  |  |  991|  5.57M|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
                  if (src.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF)) {
  ------------------
  |  |  994|  5.57M|#define JANET_SLOT_REF 0x80000
  ------------------
  |  Branch (8740:9): [True: 1.79M, False: 3.78M]
  ------------------
 8741|  1.79M|        janetc_loadconst(c, src.constant, dest);
 8742|       |        /* If we also are a reference, deref the one element array */
 8743|  1.79M|        if (src.flags & JANET_SLOT_REF) {
  ------------------
  |  |  994|  1.79M|#define JANET_SLOT_REF 0x80000
  ------------------
  |  Branch (8743:13): [True: 22, False: 1.79M]
  ------------------
 8744|     22|            janetc_emit(c,
 8745|     22|                        ((uint32_t) dest << 16) |
 8746|     22|                        ((uint32_t) dest << 8) |
 8747|     22|                        JOP_GET_INDEX);
 8748|     22|        }
 8749|  3.78M|    } else if (src.envindex >= 0) {
  ------------------
  |  Branch (8749:16): [True: 11.4k, False: 3.77M]
  ------------------
 8750|  11.4k|        janetc_emit(c,
 8751|  11.4k|                    ((uint32_t)(src.index) << 24) |
 8752|  11.4k|                    ((uint32_t)(src.envindex) << 16) |
 8753|  11.4k|                    ((uint32_t)(dest) << 8) |
 8754|  11.4k|                    JOP_LOAD_UPVALUE);
 8755|  3.77M|    } else if (src.index != dest) {
  ------------------
  |  Branch (8755:16): [True: 3.77M, False: 0]
  ------------------
 8756|  3.77M|        janet_assert(src.index >= 0, "bad slot");
  ------------------
  |  |  389|  3.77M|#define janet_assert(c, m) do { \
  |  |  390|  3.77M|    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.77M]
  |  |  ------------------
  |  |  391|  3.77M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 3.77M]
  |  |  ------------------
  ------------------
 8757|  3.77M|        janetc_emit(c,
 8758|  3.77M|                    ((uint32_t)(src.index) << 16) |
 8759|  3.77M|                    ((uint32_t)(dest) << 8) |
 8760|  3.77M|                    JOP_MOVE_NEAR);
 8761|  3.77M|    }
 8762|  5.57M|}
janet.c:janetc_loadconst:
 8700|  1.79M|static void janetc_loadconst(JanetCompiler *c, Janet k, int32_t reg) {
 8701|  1.79M|    switch (janet_type(k)) {
  ------------------
  |  |  795|  1.79M|    (isnan((x).number) \
  |  |  796|  1.79M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  1.79M|        : JANET_NUMBER)
  ------------------
  |  Branch (8701:13): [True: 1.74M, False: 46.7k]
  ------------------
 8702|  94.7k|        case JANET_NIL:
  ------------------
  |  Branch (8702:9): [True: 94.7k, False: 1.69M]
  ------------------
 8703|  94.7k|            janetc_emit(c, ((uint32_t) reg << 8) | JOP_LOAD_NIL);
 8704|  94.7k|            break;
 8705|  1.00k|        case JANET_BOOLEAN:
  ------------------
  |  Branch (8705:9): [True: 1.00k, False: 1.78M]
  ------------------
 8706|  1.00k|            janetc_emit(c, ((uint32_t) reg << 8) |
 8707|  1.00k|                        (janet_unwrap_boolean(k) ? JOP_LOAD_TRUE : JOP_LOAD_FALSE));
  ------------------
  |  |  838|  1.00k|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  |  |  ------------------
  |  |  |  Branch (838:33): [True: 971, False: 38]
  |  |  ------------------
  ------------------
 8708|  1.00k|            break;
 8709|  46.7k|        case JANET_NUMBER: {
  ------------------
  |  Branch (8709:9): [True: 46.7k, False: 1.74M]
  ------------------
 8710|  46.7k|            double dval = janet_unwrap_number(k);
  ------------------
  |  |  839|  46.7k|#define janet_unwrap_number(x) ((x).number)
  ------------------
 8711|  46.7k|            if (dval < INT16_MIN || dval > INT16_MAX)
  ------------------
  |  Branch (8711:17): [True: 527, False: 46.2k]
  |  Branch (8711:37): [True: 2.66k, False: 43.6k]
  ------------------
 8712|  3.18k|                goto do_constant;
 8713|  43.6k|            int32_t i = (int32_t) dval;
 8714|  43.6k|            if (dval != i)
  ------------------
  |  Branch (8714:17): [True: 670, False: 42.9k]
  ------------------
 8715|    670|                goto do_constant;
 8716|  42.9k|            uint32_t iu = (uint32_t)i;
 8717|  42.9k|            janetc_emit(c,
 8718|  42.9k|                        ((uint32_t) iu << 16) |
 8719|  42.9k|                        ((uint32_t) reg << 8) |
 8720|  42.9k|                        JOP_LOAD_INTEGER);
 8721|  42.9k|            break;
 8722|  43.6k|        }
 8723|  1.64M|        default:
  ------------------
  |  Branch (8723:9): [True: 1.64M, False: 142k]
  ------------------
 8724|  1.65M|        do_constant: {
 8725|  1.65M|                int32_t cindex = janetc_const(c, k);
 8726|  1.65M|                janetc_emit(c,
 8727|  1.65M|                            ((uint32_t) cindex << 16) |
 8728|  1.65M|                            ((uint32_t) reg << 8) |
 8729|  1.65M|                            JOP_LOAD_CONSTANT);
 8730|  1.65M|                break;
 8731|  1.64M|            }
 8732|  1.79M|    }
 8733|  1.79M|}
janet.c:janetc_const:
 8675|  1.65M|static int32_t janetc_const(JanetCompiler *c, Janet x) {
 8676|  1.65M|    JanetScope *scope = c->scope;
 8677|  1.65M|    int32_t i, len;
 8678|       |    /* Get the topmost function scope */
 8679|  2.36M|    while (scope) {
  ------------------
  |  Branch (8679:12): [True: 2.36M, False: 0]
  ------------------
 8680|  2.36M|        if (scope->flags & JANET_SCOPE_FUNCTION)
  ------------------
  |  | 1011|  2.36M|#define JANET_SCOPE_FUNCTION 1
  ------------------
  |  Branch (8680:13): [True: 1.65M, False: 712k]
  ------------------
 8681|  1.65M|            break;
 8682|   712k|        scope = scope->parent;
 8683|   712k|    }
 8684|       |    /* Check if already added */
 8685|  1.65M|    len = janet_v_count(scope->consts);
  ------------------
  |  |  714|  1.65M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  1.41M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  1.41M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 1.41M, False: 240k]
  |  |  ------------------
  ------------------
 8686|   211M|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (8686:17): [True: 210M, False: 501k]
  ------------------
 8687|   210M|        if (janet_equals(x, scope->consts[i]))
  ------------------
  |  Branch (8687:13): [True: 1.15M, False: 209M]
  ------------------
 8688|  1.15M|            return i;
 8689|   210M|    }
 8690|       |    /* Ensure not too many constants. */
 8691|   501k|    if (len >= 0xFFFF) {
  ------------------
  |  Branch (8691:9): [True: 0, False: 501k]
  ------------------
 8692|      0|        janetc_cerror(c, "too many constants");
 8693|      0|        return 0;
 8694|      0|    }
 8695|   501k|    janet_v_push(scope->consts, x);
  ------------------
  |  |  712|   501k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|   501k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|   501k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|   261k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|   261k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|   261k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|   261k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 240k, False: 261k]
  |  |  |  |  |  |  |  Branch (723:50): [True: 165k, False: 95.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|   406k|#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))
  |  |  ------------------
  |  |  |  |  721|   501k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   501k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8696|   501k|    return len;
 8697|   501k|}
janet.c:janetc_moveback:
 8767|  4.21M|                            int32_t src) {
 8768|  4.21M|    if (dest.flags & JANET_SLOT_REF) {
  ------------------
  |  |  994|  4.21M|#define JANET_SLOT_REF 0x80000
  ------------------
  |  Branch (8768:9): [True: 0, False: 4.21M]
  ------------------
 8769|      0|        int32_t refreg = janetc_regalloc_temp(&c->scope->ra, JANETC_REGTEMP_5);
 8770|      0|        janetc_loadconst(c, dest.constant, refreg);
 8771|      0|        janetc_emit(c,
 8772|      0|                    ((uint32_t) src << 16) |
 8773|      0|                    ((uint32_t) refreg << 8) |
 8774|      0|                    JOP_PUT_INDEX);
 8775|      0|        janetc_regalloc_freetemp(&c->scope->ra, refreg, JANETC_REGTEMP_5);
 8776|  4.21M|    } else if (dest.envindex >= 0) {
  ------------------
  |  Branch (8776:16): [True: 798, False: 4.21M]
  ------------------
 8777|       |        /* Convert src to near reg */
 8778|    798|        if (src > 255) {
  ------------------
  |  Branch (8778:13): [True: 0, False: 798]
  ------------------
 8779|      0|            int32_t newsrc = JANETC_REGTEMP_5 + 0xF0;
 8780|      0|            janetc_emit(c, JOP_MOVE_NEAR | ((uint32_t)(src) << 16) | ((uint32_t) newsrc << 8));
 8781|      0|            src = newsrc;
 8782|      0|        }
 8783|    798|        janetc_emit(c,
 8784|    798|                    ((uint32_t)(dest.index) << 24) |
 8785|    798|                    ((uint32_t)(dest.envindex) << 16) |
 8786|    798|                    ((uint32_t)(src) << 8) |
 8787|    798|                    JOP_SET_UPVALUE);
 8788|  4.21M|    } else if (dest.index != src) {
  ------------------
  |  Branch (8788:16): [True: 2.18M, False: 2.02M]
  ------------------
 8789|  2.18M|        janet_assert(dest.index >= 0, "bad slot");
  ------------------
  |  |  389|  2.18M|#define janet_assert(c, m) do { \
  |  |  390|  2.18M|    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.18M]
  |  |  ------------------
  |  |  391|  2.18M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 2.18M]
  |  |  ------------------
  ------------------
 8790|       |        /* Convert src to near reg */
 8791|  2.18M|        if (src > 255) {
  ------------------
  |  Branch (8791:13): [True: 0, False: 2.18M]
  ------------------
 8792|      0|            int32_t newsrc = JANETC_REGTEMP_5 + 0xF0;
 8793|      0|            janetc_emit(c, JOP_MOVE_NEAR | ((uint32_t)(src) << 16) | ((uint32_t)newsrc << 8));
 8794|      0|            src = newsrc;
 8795|      0|        }
 8796|  2.18M|        janetc_emit(c,
 8797|  2.18M|                    ((uint32_t)(dest.index) << 16) |
 8798|  2.18M|                    ((uint32_t)(src) << 8) |
 8799|  2.18M|                    JOP_MOVE_FAR);
 8800|  2.18M|    }
 8801|  4.21M|}
janet.c:janetc_regfar:
 8814|  2.79M|static int32_t janetc_regfar(JanetCompiler *c, JanetSlot s, JanetcRegisterTemp tag) {
 8815|       |    /* check if already near register */
 8816|  2.79M|    if (s.envindex < 0 && s.index >= 0) {
  ------------------
  |  Branch (8816:9): [True: 2.78M, False: 7.47k]
  |  Branch (8816:27): [True: 2.30M, False: 483k]
  ------------------
 8817|  2.30M|        return s.index;
 8818|  2.30M|    }
 8819|   490k|    int32_t reg;
 8820|   490k|    int32_t nearreg = janetc_regalloc_temp(&c->scope->ra, tag);
 8821|   490k|    janetc_movenear(c, nearreg, s);
 8822|   490k|    if (nearreg >= 0xF0) {
  ------------------
  |  Branch (8822:9): [True: 172k, False: 318k]
  ------------------
 8823|   172k|        reg = janetc_allocfar(c);
 8824|   172k|        janetc_emit(c, JOP_MOVE_FAR | ((uint32_t) nearreg << 8) | ((uint32_t) reg << 16));
 8825|   172k|        janetc_regalloc_freetemp(&c->scope->ra, nearreg, tag);
 8826|   318k|    } else {
 8827|   318k|        reg = nearreg;
 8828|   318k|        janetc_regalloc_freetemp(&c->scope->ra, nearreg, tag);
 8829|   318k|        janetc_regalloc_touch(&c->scope->ra, reg);
 8830|   318k|    }
 8831|   490k|    return reg;
 8832|  2.79M|}
janet.c:janetc_free_regnear:
 8804|  8.62M|static void janetc_free_regnear(JanetCompiler *c, JanetSlot s, int32_t reg, JanetcRegisterTemp tag) {
 8805|  8.62M|    if (reg != s.index ||
  ------------------
  |  Branch (8805:9): [True: 4.65M, False: 3.96M]
  ------------------
 8806|  3.96M|            s.envindex >= 0 ||
  ------------------
  |  Branch (8806:13): [True: 1.00k, False: 3.96M]
  ------------------
 8807|  4.65M|            s.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF)) {
  ------------------
  |  |  991|  3.96M|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
                          s.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF)) {
  ------------------
  |  |  994|  3.96M|#define JANET_SLOT_REF 0x80000
  ------------------
  |  Branch (8807:13): [True: 0, False: 3.96M]
  ------------------
 8808|       |        /* We need to free the temporary slot */
 8809|  4.65M|        janetc_regalloc_freetemp(&c->scope->ra, reg, tag);
 8810|  4.65M|    }
 8811|  8.62M|}
janet.c:emit1s:
 8890|   529k|static int32_t emit1s(JanetCompiler *c, uint8_t op, JanetSlot s, int32_t rest, int wr) {
 8891|   529k|    int32_t reg = janetc_regnear(c, s, JANETC_REGTEMP_0);
 8892|   529k|    int32_t label = janet_v_count(c->buffer);
  ------------------
  |  |  714|   529k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|   529k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   529k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 529k, False: 11]
  |  |  ------------------
  ------------------
 8893|   529k|    janetc_emit(c, op | ((uint32_t) reg << 8) | ((uint32_t) rest << 16));
 8894|   529k|    if (wr)
  ------------------
  |  Branch (8894:9): [True: 520k, False: 8.51k]
  ------------------
 8895|   520k|        janetc_moveback(c, s, reg);
 8896|   529k|    janetc_free_regnear(c, s, reg, JANETC_REGTEMP_0);
 8897|   529k|    return label;
 8898|   529k|}
janet.c:janetc_regnear:
 8835|  5.82M|static int32_t janetc_regnear(JanetCompiler *c, JanetSlot s, JanetcRegisterTemp tag) {
 8836|       |    /* check if already near register */
 8837|  5.82M|    if (s.envindex < 0 && s.index >= 0 && s.index <= 0xFF) {
  ------------------
  |  Branch (8837:9): [True: 5.82M, False: 4.00k]
  |  Branch (8837:27): [True: 4.52M, False: 1.30M]
  |  Branch (8837:43): [True: 1.66M, False: 2.86M]
  ------------------
 8838|  1.66M|        return s.index;
 8839|  1.66M|    }
 8840|  4.16M|    int32_t reg = janetc_regalloc_temp(&c->scope->ra, tag);
 8841|  4.16M|    janetc_movenear(c, reg, s);
 8842|  4.16M|    return reg;
 8843|  5.82M|}
janet.c:emit2s:
 8931|  1.76M|static int32_t emit2s(JanetCompiler *c, uint8_t op, JanetSlot s1, JanetSlot s2, int32_t rest, int wr) {
 8932|  1.76M|    int32_t reg1 = janetc_regnear(c, s1, JANETC_REGTEMP_0);
 8933|  1.76M|    int32_t reg2 = janetc_regnear(c, s2, JANETC_REGTEMP_1);
 8934|  1.76M|    int32_t label = janet_v_count(c->buffer);
  ------------------
  |  |  714|  1.76M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  1.76M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  1.76M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 1.76M, False: 309]
  |  |  ------------------
  ------------------
 8935|  1.76M|    janetc_emit(c, op | ((uint32_t) reg1 << 8) | ((uint32_t) reg2 << 16) | ((uint32_t)rest << 24));
 8936|  1.76M|    janetc_free_regnear(c, s2, reg2, JANETC_REGTEMP_1);
 8937|  1.76M|    if (wr)
  ------------------
  |  Branch (8937:9): [True: 1.76M, False: 3.07k]
  ------------------
 8938|  1.76M|        janetc_moveback(c, s1, reg1);
 8939|  1.76M|    janetc_free_regnear(c, s1, reg1, JANETC_REGTEMP_0);
 8940|  1.76M|    return label;
 8941|  1.76M|}
janet.c:janet_stream_close_impl:
 9340|     22|static void janet_stream_close_impl(JanetStream *stream) {
 9341|     22|    stream->flags |= JANET_STREAM_CLOSED;
  ------------------
  |  |  622|     22|#define JANET_STREAM_CLOSED 0x1
  ------------------
 9342|     22|    int canclose = !(stream->flags & JANET_STREAM_NOT_CLOSEABLE);
  ------------------
  |  |  629|     22|#define JANET_STREAM_NOT_CLOSEABLE 0x2000
  ------------------
 9343|       |    /* 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)
 9344|       |     * then skip unregister to save a syscall */
 9345|       |#ifdef JANET_WINDOWS
 9346|       |    if (stream->handle != INVALID_HANDLE_VALUE) {
 9347|       |#ifdef JANET_NET
 9348|       |        if (stream->flags & JANET_STREAM_SOCKET) {
 9349|       |            if (canclose) closesocket((SOCKET) stream->handle);
 9350|       |        } else
 9351|       |#endif
 9352|       |        {
 9353|       |            if (canclose) CloseHandle(stream->handle);
 9354|       |        }
 9355|       |        stream->handle = INVALID_HANDLE_VALUE;
 9356|       |    }
 9357|       |#else
 9358|     22|    int canunregister = !(stream->flags & JANET_STREAM_UNREGISTERED);
  ------------------
  |  |  624|     22|#define JANET_STREAM_UNREGISTERED 0x4
  ------------------
 9359|     22|    if (stream->handle != -1) {
  ------------------
  |  Branch (9359:9): [True: 22, False: 0]
  ------------------
 9360|     22|        if (canunregister) janet_unregister_stream(stream);
  ------------------
  |  Branch (9360:13): [True: 16, False: 6]
  ------------------
 9361|     22|        if (canclose) close(stream->handle);
  ------------------
  |  Branch (9361:13): [True: 22, False: 0]
  ------------------
 9362|     22|        stream->handle = -1;
 9363|     22|    }
 9364|     22|#endif
 9365|     22|}
janet.c:janet_unregister_stream:
10767|     16|void janet_unregister_stream(JanetStream *stream) {
10768|     16|    if (stream->flags & JANET_STREAM_NODUPS) return;
  ------------------
  |  |  631|     16|#define JANET_STREAM_NODUPS 0x20000
  ------------------
  |  Branch (10768:9): [True: 6, False: 10]
  ------------------
10769|     10|    int status;
10770|     10|    do {
10771|     10|        status = epoll_ctl(janet_vm.epoll, EPOLL_CTL_DEL, stream->handle, NULL);
10772|     10|    } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (10772:14): [True: 0, False: 10]
  |  Branch (10772:30): [True: 0, False: 0]
  ------------------
10773|     10|    if (status == -1) {
  ------------------
  |  Branch (10773:9): [True: 0, False: 10]
  ------------------
10774|      0|        janet_panicv(janet_ev_lasterr());
10775|      0|    }
10776|     10|    stream->flags |= JANET_STREAM_UNREGISTERED;
  ------------------
  |  |  624|     10|#define JANET_STREAM_UNREGISTERED 0x4
  ------------------
10777|     10|}
janet.c:janet_stream_gc:
 9382|     22|static int janet_stream_gc(void *p, size_t s) {
 9383|     22|    (void) s;
 9384|     22|    JanetStream *stream = (JanetStream *)p;
 9385|     22|    janet_stream_close_impl(stream);
 9386|     22|    return 0;
 9387|     22|}
janet.c:janet_schedule_general:
 9495|    676|static void janet_schedule_general(JanetFiber *fiber, Janet value, JanetSignal sig, int soon) {
 9496|    676|    if (fiber->gc.flags & JANET_FIBER_EV_GCFLAG_CANCELED) return;
  ------------------
  |  |  797|    676|#define JANET_FIBER_EV_GCFLAG_CANCELED 0x1000000
  ------------------
  |  Branch (9496:9): [True: 0, False: 676]
  ------------------
 9497|    676|    if (!(fiber->gc.flags & JANET_FIBER_EV_GCFLAG_ROOT)) {
  ------------------
  |  |  799|    676|#define JANET_FIBER_EV_GCFLAG_ROOT 0x4000000
  ------------------
  |  Branch (9497:9): [True: 633, False: 43]
  ------------------
 9498|    633|        fiber->gc.flags |= JANET_FIBER_EV_GCFLAG_ROOT;
  ------------------
  |  |  799|    633|#define JANET_FIBER_EV_GCFLAG_ROOT 0x4000000
  ------------------
 9499|    633|        Janet task_element = janet_wrap_fiber(fiber);
  ------------------
  |  |  844|    633|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|    633|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    633|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    633|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9500|    633|        janet_table_put(&janet_vm.active_tasks, task_element, janet_wrap_true());
  ------------------
  |  |  832|    633|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  822|    633|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    633|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    633|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9501|    633|    }
 9502|    676|    JanetTask t = { fiber, value, sig, ++fiber->sched_id };
 9503|    676|    if (sig == JANET_SIGNAL_ERROR) fiber->gc.flags |= JANET_FIBER_EV_GCFLAG_CANCELED;
  ------------------
  |  |  797|      0|#define JANET_FIBER_EV_GCFLAG_CANCELED 0x1000000
  ------------------
  |  Branch (9503:9): [True: 0, False: 676]
  ------------------
 9504|    676|    if (soon) {
  ------------------
  |  Branch (9504:9): [True: 0, False: 676]
  ------------------
 9505|      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]
  |  |  ------------------
  ------------------
 9506|    676|    } else {
 9507|       |        janet_assert(!janet_q_push(&janet_vm.spawn, &t, sizeof(t)), "schedule queue overflow");
  ------------------
  |  |  389|    676|#define janet_assert(c, m) do { \
  |  |  390|    676|    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: 676]
  |  |  ------------------
  |  |  391|    676|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 676]
  |  |  ------------------
  ------------------
 9508|    676|    }
 9509|    676|}
janet.c:janet_q_maybe_resize:
 9124|    697|static int janet_q_maybe_resize(JanetQueue *q, size_t itemsize) {
 9125|    697|    int32_t count = janet_q_count(q);
 9126|       |    /* Resize if needed */
 9127|    697|    if (count + 1 >= q->capacity) {
  ------------------
  |  Branch (9127:9): [True: 536, False: 161]
  ------------------
 9128|    536|        if (count + 1 >= JANET_MAX_Q_CAPACITY) return 1;
  ------------------
  |  | 9105|    536|#define JANET_MAX_Q_CAPACITY 0x7FFFFFF
  ------------------
  |  Branch (9128:13): [True: 0, False: 536]
  ------------------
 9129|    536|        int32_t newcap = (count + 2) * 2;
 9130|    536|        if (newcap > JANET_MAX_Q_CAPACITY) newcap = JANET_MAX_Q_CAPACITY;
  ------------------
  |  | 9105|    536|#define JANET_MAX_Q_CAPACITY 0x7FFFFFF
  ------------------
                      if (newcap > JANET_MAX_Q_CAPACITY) newcap = JANET_MAX_Q_CAPACITY;
  ------------------
  |  | 9105|      0|#define JANET_MAX_Q_CAPACITY 0x7FFFFFF
  ------------------
  |  Branch (9130:13): [True: 0, False: 536]
  ------------------
 9131|    536|        q->data = janet_realloc(q->data, itemsize * newcap);
  ------------------
  |  | 2409|    536|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 9132|    536|        if (NULL == q->data) {
  ------------------
  |  Branch (9132:13): [True: 0, False: 536]
  ------------------
 9133|      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]
  |  |  ------------------
  ------------------
 9134|      0|        }
 9135|    536|        if (q->head > q->tail) {
  ------------------
  |  Branch (9135:13): [True: 0, False: 536]
  ------------------
 9136|       |            /* Two segments, fix 2nd seg. */
 9137|      0|            int32_t newhead = q->head + (newcap - q->capacity);
 9138|      0|            size_t seg1 = (size_t)(q->capacity - q->head);
 9139|      0|            if (seg1 > 0) {
  ------------------
  |  Branch (9139:17): [True: 0, False: 0]
  ------------------
 9140|      0|                memmove((char *) q->data + (newhead * itemsize),
 9141|      0|                        (char *) q->data + (q->head * itemsize),
 9142|      0|                        seg1 * itemsize);
 9143|      0|            }
 9144|      0|            q->head = newhead;
 9145|      0|        }
 9146|    536|        q->capacity = newcap;
 9147|    536|    }
 9148|    697|    return 0;
 9149|    697|}
janet.c:janet_q_push:
 9151|    697|static int janet_q_push(JanetQueue *q, void *item, size_t itemsize) {
 9152|    697|    if (janet_q_maybe_resize(q, itemsize)) return 1;
  ------------------
  |  Branch (9152:9): [True: 0, False: 697]
  ------------------
 9153|    697|    memcpy((char *) q->data + itemsize * q->tail, item, itemsize);
 9154|    697|    q->tail = q->tail + 1 < q->capacity ? q->tail + 1 : 0;
  ------------------
  |  Branch (9154:15): [True: 697, False: 0]
  ------------------
 9155|    697|    return 0;
 9156|    697|}
janet.c:janet_q_init:
 9107|  12.2k|static void janet_q_init(JanetQueue *q) {
 9108|       |    q->data = NULL;
 9109|  12.2k|    q->head = 0;
 9110|  12.2k|    q->tail = 0;
 9111|  12.2k|    q->capacity = 0;
 9112|  12.2k|}
janet.c:peek_timeout:
 9189|  11.8k|static int peek_timeout(JanetTimeout *out) {
 9190|  11.8k|    if (janet_vm.tq_count == 0) return 0;
  ------------------
  |  Branch (9190:9): [True: 8.20k, False: 3.61k]
  ------------------
 9191|  3.61k|    *out = janet_vm.tq[0];
 9192|  3.61k|    return 1;
 9193|  11.8k|}
janet.c:handle_timeout_worker:
 9599|  3.61k|static void handle_timeout_worker(JanetTimeout to, int cancel) {
 9600|  3.61k|    if (!to.has_worker) return;
  ------------------
  |  Branch (9600:9): [True: 3.61k, False: 0]
  ------------------
 9601|       |#ifdef JANET_WINDOWS
 9602|       |    if (cancel && to.worker_event) {
 9603|       |        SetEvent(to.worker_event);
 9604|       |    }
 9605|       |    WaitForSingleObject(to.worker, INFINITE);
 9606|       |    CloseHandle(to.worker);
 9607|       |    if (to.worker_event) {
 9608|       |        CloseHandle(to.worker_event);
 9609|       |    }
 9610|       |#else
 9611|       |#ifdef JANET_ANDROID
 9612|       |    if (cancel) janet_assert(!pthread_kill(to.worker, SIGUSR1), "pthread_kill");
 9613|       |#else
 9614|      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 (9614:9): [True: 0, False: 0]
  ------------------
 9615|      0|#endif
 9616|      0|    void *res = NULL;
 9617|       |    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]
  |  |  ------------------
  ------------------
 9618|      0|#endif
 9619|      0|}
janet.c:pop_timeout:
 9196|  3.61k|static void pop_timeout(size_t index) {
 9197|  3.61k|    if (janet_vm.tq_count <= index) return;
  ------------------
  |  Branch (9197:9): [True: 0, False: 3.61k]
  ------------------
 9198|  3.61k|    janet_vm.tq[index] = janet_vm.tq[--janet_vm.tq_count];
 9199|  8.57k|    for (;;) {
 9200|  8.57k|        size_t left = (index << 1) + 1;
 9201|  8.57k|        size_t right = left + 1;
 9202|  8.57k|        size_t smallest = index;
 9203|  8.57k|        if (left < janet_vm.tq_count &&
  ------------------
  |  Branch (9203:13): [True: 7.78k, False: 789]
  ------------------
 9204|  7.78k|                (janet_vm.tq[left].when < janet_vm.tq[smallest].when))
  ------------------
  |  Branch (9204:17): [True: 3.20k, False: 4.58k]
  ------------------
 9205|  3.20k|            smallest = left;
 9206|  8.57k|        if (right < janet_vm.tq_count &&
  ------------------
  |  Branch (9206:13): [True: 7.65k, False: 928]
  ------------------
 9207|  7.65k|                (janet_vm.tq[right].when < janet_vm.tq[smallest].when))
  ------------------
  |  Branch (9207:17): [True: 2.10k, False: 5.54k]
  ------------------
 9208|  2.10k|            smallest = right;
 9209|  8.57k|        if (smallest == index) return;
  ------------------
  |  Branch (9209:13): [True: 3.61k, False: 4.96k]
  ------------------
 9210|  4.96k|        JanetTimeout temp = janet_vm.tq[index];
 9211|  4.96k|        janet_vm.tq[index] = janet_vm.tq[smallest];
 9212|  4.96k|        janet_vm.tq[smallest] = temp;
 9213|  4.96k|        index = smallest;
 9214|  4.96k|    }
 9215|  3.61k|}
janet.c:janet_q_deinit:
 9114|  12.2k|static void janet_q_deinit(JanetQueue *q) {
 9115|  12.2k|    janet_free(q->data);
  ------------------
  |  | 2415|  12.2k|#define janet_free(X) free((X))
  ------------------
 9116|  12.2k|}
janet.c:ts_delta:
 9180|  3.61k|static JanetTimestamp ts_delta(JanetTimestamp ts, double delta) {
 9181|  3.61k|    if (isinf(delta)) {
  ------------------
  |  Branch (9181:9): [True: 8, False: 3.60k]
  ------------------
 9182|      8|        return delta < 0 ? ts : INT64_MAX;
  ------------------
  |  Branch (9182:16): [True: 0, False: 8]
  ------------------
 9183|      8|    }
 9184|  3.60k|    ts += (int64_t)round(delta * 1000);
 9185|  3.60k|    return ts;
 9186|  3.61k|}
janet.c:add_timeout:
 9218|  3.61k|static void add_timeout(JanetTimeout to) {
 9219|  3.61k|    size_t oldcount = janet_vm.tq_count;
 9220|  3.61k|    size_t newcount = oldcount + 1;
 9221|  3.61k|    if (newcount > janet_vm.tq_capacity) {
  ------------------
  |  Branch (9221:9): [True: 254, False: 3.36k]
  ------------------
 9222|    254|        size_t newcap = 2 * newcount;
 9223|    254|        JanetTimeout *tq = janet_realloc(janet_vm.tq, newcap * sizeof(JanetTimeout));
  ------------------
  |  | 2409|    254|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 9224|    254|        if (NULL == tq) {
  ------------------
  |  Branch (9224:13): [True: 0, False: 254]
  ------------------
 9225|      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]
  |  |  ------------------
  ------------------
 9226|      0|        }
 9227|    254|        janet_vm.tq = tq;
 9228|    254|        janet_vm.tq_capacity = newcap;
 9229|    254|    }
 9230|       |    /* Append */
 9231|  3.61k|    janet_vm.tq_count = (int32_t) newcount;
 9232|  3.61k|    janet_vm.tq[oldcount] = to;
 9233|       |    /* Heapify */
 9234|  3.61k|    size_t index = oldcount;
 9235|  4.05k|    while (index > 0) {
  ------------------
  |  Branch (9235:12): [True: 3.88k, False: 168]
  ------------------
 9236|  3.88k|        size_t parent = (index - 1) >> 1;
 9237|  3.88k|        if (janet_vm.tq[parent].when <= janet_vm.tq[index].when) break;
  ------------------
  |  Branch (9237:13): [True: 3.44k, False: 435]
  ------------------
 9238|       |        /* Swap */
 9239|    435|        JanetTimeout tmp = janet_vm.tq[index];
 9240|    435|        janet_vm.tq[index] = janet_vm.tq[parent];
 9241|    435|        janet_vm.tq[parent] = tmp;
 9242|       |        /* Next */
 9243|    435|        index = parent;
 9244|    435|    }
 9245|  3.61k|}
janet.c:janet_channel_pop:
10114|     21|static int janet_channel_pop(JanetChannel *channel, Janet *item, int is_choice) {
10115|     21|    janet_chan_lock(channel);
10116|     21|    return janet_channel_pop_with_lock(channel, item, is_choice);
10117|     21|}
janet.c:janet_chan_init:
 9781|  1.54k|static void janet_chan_init(JanetChannel *chan, int32_t limit, int threaded) {
 9782|  1.54k|    chan->limit = limit;
 9783|  1.54k|    chan->closed = 0;
 9784|  1.54k|    chan->is_threaded = threaded;
 9785|  1.54k|    janet_q_init(&chan->items);
 9786|  1.54k|    janet_q_init(&chan->read_pending);
 9787|  1.54k|    janet_q_init(&chan->write_pending);
 9788|  1.54k|    janet_os_mutex_init((JanetOSMutex *) &chan->lock);
 9789|  1.54k|}
janet.c:janet_chan_lock:
 9791|  1.56k|static void janet_chan_lock(JanetChannel *chan) {
 9792|  1.56k|    if (!janet_chan_is_threaded(chan)) return;
  ------------------
  |  Branch (9792:9): [True: 1.56k, False: 0]
  ------------------
 9793|      0|    janet_os_mutex_lock((JanetOSMutex *) &chan->lock);
 9794|      0|}
janet.c:janet_chan_is_threaded:
 9733|  4.68k|static inline int janet_chan_is_threaded(JanetChannel *chan) {
 9734|  4.68k|    return chan->is_threaded;
 9735|  4.68k|}
janet.c:janet_chan_unlock:
 9796|  1.56k|static void janet_chan_unlock(JanetChannel *chan) {
 9797|  1.56k|    if (!janet_chan_is_threaded(chan)) return;
  ------------------
  |  Branch (9797:9): [True: 1.56k, False: 0]
  ------------------
 9798|      0|    janet_os_mutex_unlock((JanetOSMutex *) &chan->lock);
 9799|      0|}
janet.c:janet_q_count:
 9118|    697|static int32_t janet_q_count(JanetQueue *q) {
 9119|    697|    return (q->head > q->tail)
  ------------------
  |  Branch (9119:12): [True: 0, False: 697]
  ------------------
 9120|    697|           ? (q->tail + q->capacity - q->head)
 9121|    697|           : (q->tail - q->head);
 9122|    697|}
janet.c:janet_channel_pop_with_lock:
10065|     21|static int janet_channel_pop_with_lock(JanetChannel *channel, Janet *item, int is_choice) {
10066|     21|    JanetChannelPending writer;
10067|     21|    if (channel->closed) {
  ------------------
  |  Branch (10067:9): [True: 0, False: 21]
  ------------------
10068|      0|        janet_chan_unlock(channel);
10069|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10070|      0|        return 1;
10071|      0|    }
10072|     21|    int is_threaded = janet_chan_is_threaded(channel);
10073|     21|    if (janet_q_pop(&channel->items, item, sizeof(Janet))) {
  ------------------
  |  Branch (10073:9): [True: 21, False: 0]
  ------------------
10074|       |        /* Queue empty */
10075|     21|        if (is_choice == 2) return 0; /* Skip pending read */
  ------------------
  |  Branch (10075:13): [True: 0, False: 21]
  ------------------
10076|     21|        JanetChannelPending pending;
10077|     21|        pending.thread = &janet_vm;
10078|     21|        pending.fiber = janet_vm.root_fiber,
10079|     21|        pending.sched_id = janet_vm.root_fiber->sched_id;
10080|     21|        pending.mode = is_choice ? JANET_CP_MODE_CHOICE_READ : JANET_CP_MODE_READ;
  ------------------
  |  Branch (10080:24): [True: 0, False: 21]
  ------------------
10081|     21|        janet_q_push(&channel->read_pending, &pending, sizeof(pending));
10082|     21|        janet_chan_unlock(channel);
10083|     21|        if (is_threaded) {
  ------------------
  |  Branch (10083:13): [True: 0, False: 21]
  ------------------
10084|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10085|      0|        }
10086|     21|        return 0;
10087|     21|    }
10088|      0|    janet_assert(!janet_chan_unpack(channel, item, 0), "bad channel packing");
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
10089|      0|    if (!janet_q_pop(&channel->write_pending, &writer, sizeof(writer))) {
  ------------------
  |  Branch (10089:9): [True: 0, False: 0]
  ------------------
10090|       |        /* Pending writer */
10091|      0|        if (is_threaded) {
  ------------------
  |  Branch (10091:13): [True: 0, False: 0]
  ------------------
10092|      0|            JanetVM *vm = writer.thread;
10093|      0|            JanetEVGenericMessage msg;
10094|      0|            msg.tag = writer.mode;
10095|      0|            msg.fiber = writer.fiber;
10096|      0|            msg.argi = (int32_t) writer.sched_id;
10097|      0|            msg.argp = channel;
10098|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10099|      0|            if (vm) {
  ------------------
  |  Branch (10099:17): [True: 0, False: 0]
  ------------------
10100|      0|                janet_ev_post_event(vm, janet_thread_chan_cb, msg);
10101|      0|            }
10102|      0|        } else {
10103|      0|            if (writer.mode == JANET_CP_MODE_CHOICE_WRITE) {
  ------------------
  |  Branch (10103:17): [True: 0, False: 0]
  ------------------
10104|      0|                janet_schedule(writer.fiber, make_write_result(channel));
10105|      0|            } else {
10106|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10107|      0|            }
10108|      0|        }
10109|      0|    }
10110|      0|    janet_chan_unlock(channel);
10111|      0|    return 1;
10112|      0|}
janet.c:fisher_yates_args:
10294|     16|static void fisher_yates_args(int32_t argc, Janet *argv) {
10295|    356|    for (int32_t i = argc; i > 1; i--) {
  ------------------
  |  Branch (10295:28): [True: 340, False: 16]
  ------------------
10296|    340|        int32_t swap_index = janet_rng_u32(&janet_vm.ev_rng) % i;
10297|    340|        Janet temp = argv[swap_index];
10298|    340|        argv[swap_index] = argv[i - 1];
10299|    340|        argv[i - 1] = temp;
10300|    340|    }
10301|     16|}
janet.c:janet_q_pop:
 9169|    544|static int janet_q_pop(JanetQueue *q, void *out, size_t itemsize) {
 9170|    544|    if (q->head == q->tail) return 1;
  ------------------
  |  Branch (9170:9): [True: 21, False: 523]
  ------------------
 9171|    523|    memcpy(out, (char *) q->data + itemsize * q->head, itemsize);
 9172|    523|    q->head = q->head + 1 < q->capacity ? q->head + 1 : 0;
  ------------------
  |  Branch (9172:15): [True: 523, False: 0]
  ------------------
 9173|    523|    return 0;
 9174|    544|}
janet.c:janet_chanat_gc:
 9828|  1.54k|static int janet_chanat_gc(void *p, size_t s) {
 9829|  1.54k|    (void) s;
 9830|  1.54k|    JanetChannel *channel = p;
 9831|  1.54k|    janet_chan_deinit(channel);
 9832|  1.54k|    return 0;
 9833|  1.54k|}
janet.c:janet_chan_deinit:
 9801|  1.54k|static void janet_chan_deinit(JanetChannel *chan) {
 9802|  1.54k|    if (janet_chan_is_threaded(chan)) {
  ------------------
  |  Branch (9802:9): [True: 0, False: 1.54k]
  ------------------
 9803|      0|        Janet item;
 9804|      0|        janet_chan_lock(chan);
 9805|      0|        janet_q_deinit(&chan->read_pending);
 9806|      0|        janet_q_deinit(&chan->write_pending);
 9807|      0|        while (!janet_q_pop(&chan->items, &item, sizeof(item))) {
  ------------------
  |  Branch (9807:16): [True: 0, False: 0]
  ------------------
 9808|      0|            janet_chan_unpack(chan, &item, 1);
 9809|      0|        }
 9810|      0|        janet_q_deinit(&chan->items);
 9811|      0|        janet_chan_unlock(chan);
 9812|  1.54k|    } else {
 9813|  1.54k|        janet_q_deinit(&chan->read_pending);
 9814|  1.54k|        janet_q_deinit(&chan->write_pending);
 9815|  1.54k|        janet_q_deinit(&chan->items);
 9816|  1.54k|    }
 9817|  1.54k|    janet_os_mutex_deinit((JanetOSMutex *) &chan->lock);
 9818|  1.54k|}
janet.c:janet_chanat_get:
10404|      1|static int janet_chanat_get(void *p, Janet key, Janet *out) {
10405|      1|    (void) p;
10406|      1|    if (!janet_checktype(key, JANET_KEYWORD)) return 0;
  ------------------
  |  |  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 (10406:9): [True: 1, False: 0]
  ------------------
10407|      0|    return janet_getmethod(janet_unwrap_keyword(key), ev_chanat_methods, out);
  ------------------
  |  |  865|      0|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
10408|      1|}
janet.c:janet_chanat_gcperthread:
 9851|  1.54k|static int janet_chanat_gcperthread(void *p, size_t s) {
 9852|  1.54k|    (void) s;
 9853|  1.54k|    JanetChannel *chan = p;
 9854|  1.54k|    janet_chan_lock(chan);
 9855|       |    /* Make sure that the internals of the threaded channel no longer reference _this_ thread. Replace
 9856|       |     * those references with NULL. */
 9857|  1.54k|    janet_chanat_remove_vmref(&chan->read_pending);
 9858|  1.54k|    janet_chanat_remove_vmref(&chan->write_pending);
 9859|  1.54k|    janet_chan_unlock(chan);
 9860|  1.54k|    return 0;
 9861|  1.54k|}
janet.c:janet_chanat_remove_vmref:
 9835|  3.08k|static void janet_chanat_remove_vmref(JanetQueue *fq) {
 9836|  3.08k|    JanetChannelPending *pending = fq->data;
 9837|  3.08k|    if (fq->head <= fq->tail) {
  ------------------
  |  Branch (9837:9): [True: 3.08k, False: 0]
  ------------------
 9838|  3.10k|        for (int32_t i = fq->head; i < fq->tail; i++) {
  ------------------
  |  Branch (9838:36): [True: 21, False: 3.08k]
  ------------------
 9839|     21|            if (pending[i].thread == &janet_vm) pending[i].thread = NULL;
  ------------------
  |  Branch (9839:17): [True: 21, False: 0]
  ------------------
 9840|     21|        }
 9841|  3.08k|    } else {
 9842|      0|        for (int32_t i = fq->head; i < fq->capacity; i++) {
  ------------------
  |  Branch (9842:36): [True: 0, False: 0]
  ------------------
 9843|      0|            if (pending[i].thread == &janet_vm) pending[i].thread = NULL;
  ------------------
  |  Branch (9843:17): [True: 0, False: 0]
  ------------------
 9844|      0|        }
 9845|      0|        for (int32_t i = 0; i < fq->tail; i++) {
  ------------------
  |  Branch (9845:29): [True: 0, False: 0]
  ------------------
 9846|      0|            if (pending[i].thread == &janet_vm) pending[i].thread = NULL;
  ------------------
  |  Branch (9846:17): [True: 0, False: 0]
  ------------------
 9847|      0|        }
 9848|      0|    }
 9849|  3.08k|}
janet.c:ts_now:
10724|  4.14k|static JanetTimestamp ts_now(void) {
10725|  4.14k|    struct timespec now;
10726|  4.14k|    janet_assert(-1 != janet_gettime(&now, JANET_TIME_MONOTONIC), "failed to get time");
  ------------------
  |  |  389|  4.14k|#define janet_assert(c, m) do { \
  |  |  390|  4.14k|    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.14k]
  |  |  ------------------
  |  |  391|  4.14k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 4.14k]
  |  |  ------------------
  ------------------
10727|  4.14k|    uint64_t res = 1000 * now.tv_sec;
10728|  4.14k|    res += now.tv_nsec / 1000000;
10729|  4.14k|    return res;
10730|  4.14k|}
janet.c:janet_register_stream:
10755|     22|static void janet_register_stream(JanetStream *stream) {
10756|     22|    janet_register_stream_impl(stream, 0, 1);
10757|     22|}
janet.c:janet_register_stream_impl:
10733|     22|static void janet_register_stream_impl(JanetStream *stream, int mod, int edge_trigger) {
10734|     22|    struct epoll_event ev;
10735|     22|    ev.events = edge_trigger ? EPOLLET : 0;
  ------------------
  |  Branch (10735:17): [True: 22, False: 0]
  ------------------
10736|     22|    if (stream->flags & (JANET_STREAM_READABLE | JANET_STREAM_ACCEPTABLE)) ev.events |= EPOLLIN;
  ------------------
  |  |  625|     22|#define JANET_STREAM_READABLE 0x200
  ------------------
                  if (stream->flags & (JANET_STREAM_READABLE | JANET_STREAM_ACCEPTABLE)) ev.events |= EPOLLIN;
  ------------------
  |  |  627|     22|#define JANET_STREAM_ACCEPTABLE 0x800
  ------------------
  |  Branch (10736:9): [True: 15, False: 7]
  ------------------
10737|     22|    if (stream->flags & JANET_STREAM_WRITABLE) ev.events |= EPOLLOUT;
  ------------------
  |  |  626|     22|#define JANET_STREAM_WRITABLE 0x400
  ------------------
  |  Branch (10737:9): [True: 11, False: 11]
  ------------------
10738|     22|    ev.data.ptr = stream;
10739|     22|    int status;
10740|     22|    do {
10741|     22|        status = epoll_ctl(janet_vm.epoll, mod ? EPOLL_CTL_MOD : EPOLL_CTL_ADD, stream->handle, &ev);
  ------------------
  |  Branch (10741:44): [True: 0, False: 22]
  ------------------
10742|     22|    } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (10742:14): [True: 6, False: 16]
  |  Branch (10742:30): [True: 0, False: 6]
  ------------------
10743|     22|    if (status == -1) {
  ------------------
  |  Branch (10743:9): [True: 6, False: 16]
  ------------------
10744|      6|        if (errno == EPERM) {
  ------------------
  |  Branch (10744:13): [True: 6, False: 0]
  ------------------
10745|       |            /* Couldn't add to event loop, so assume that it completes
10746|       |             * synchronously. */
10747|      6|            stream->flags |= JANET_STREAM_UNREGISTERED;
  ------------------
  |  |  624|      6|#define JANET_STREAM_UNREGISTERED 0x4
  ------------------
10748|      6|        } else {
10749|       |            /* Unexpected error */
10750|      0|            janet_panicv(janet_ev_lasterr());
10751|      0|        }
10752|      6|    }
10753|     22|}
janet.c:janet_ev_handle_selfpipe:
10614|     42|static void janet_ev_handle_selfpipe(void) {
10615|     42|    JanetSelfPipeEvent response;
10616|     42|    int status;
10617|     84|recur:
10618|     84|    do {
10619|     84|        status = read(janet_vm.selfpipe[0], &response, sizeof(response));
10620|     84|    } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (10620:14): [True: 42, False: 42]
  |  Branch (10620:30): [True: 0, False: 42]
  ------------------
10621|     84|    if (status > 0) {
  ------------------
  |  Branch (10621:9): [True: 42, False: 42]
  ------------------
10622|     42|        if (NULL != response.cb) {
  ------------------
  |  Branch (10622:13): [True: 42, False: 0]
  ------------------
10623|     42|            response.cb(response.msg);
10624|     42|            janet_ev_dec_refcount();
10625|     42|        }
10626|     42|        goto recur;
10627|     42|    }
10628|     84|}
janet.c:janet_ev_setup_selfpipe:
10607|  7.64k|static void janet_ev_setup_selfpipe(void) {
10608|  7.64k|    if (janet_make_pipe(janet_vm.selfpipe, 1)) {
  ------------------
  |  Branch (10608:9): [True: 0, False: 7.64k]
  ------------------
10609|       |        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]
  |  |  ------------------
  ------------------
10610|      0|    }
10611|  7.64k|}
janet.c:janet_ev_cleanup_selfpipe:
10630|  7.64k|static void janet_ev_cleanup_selfpipe(void) {
10631|  7.64k|    close(janet_vm.selfpipe[0]);
10632|  7.64k|    close(janet_vm.selfpipe[1]);
10633|  7.64k|}
janet.c:janet_thread_body:
11289|    480|static void *janet_thread_body(void *ptr) {
11290|    480|    JanetEVThreadInit *init = (JanetEVThreadInit *)ptr;
11291|    480|    JanetEVGenericMessage msg = init->msg;
11292|    480|    JanetThreadedSubroutine subr = init->subr;
11293|    480|    JanetThreadedCallback cb = init->cb;
11294|    480|    int fd = init->write_pipe;
11295|    480|    janet_free(init);
  ------------------
  |  | 2415|    480|#define janet_free(X) free((X))
  ------------------
11296|    480|    JanetSelfPipeEvent response;
11297|    480|    memset(&response, 0, sizeof(response));
11298|    480|    response.msg = subr(msg);
11299|    480|    response.cb = cb;
11300|       |    /* handle a bit of back pressure before giving up. */
11301|    480|    int tries = 4;
11302|    487|    while (tries > 0) {
  ------------------
  |  Branch (11302:12): [True: 487, False: 0]
  ------------------
11303|    487|        int status;
11304|    487|        do {
11305|    487|            status = write(fd, &response, sizeof(response));
11306|    487|        } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (11306:18): [True: 7, False: 480]
  |  Branch (11306:34): [True: 0, False: 7]
  ------------------
11307|    487|        if (status > 0) break;
  ------------------
  |  Branch (11307:13): [True: 480, False: 7]
  ------------------
11308|      7|        sleep(1);
11309|      7|        tries--;
11310|      7|    }
11311|       |    return NULL;
11312|    480|}
janet.c:janet_go_thread_subr:
12089|    480|static JanetEVGenericMessage janet_go_thread_subr(JanetEVGenericMessage args) {
12090|    480|    JanetBuffer *buffer = (JanetBuffer *) args.argp;
12091|    480|    const uint8_t *nextbytes = buffer->data;
12092|    480|    const uint8_t *endbytes = nextbytes + buffer->count;
12093|    480|    uint32_t flags = args.tag;
12094|    480|    args.tag = 0;
12095|    480|    args.argp = NULL;
12096|    480|    janet_init();
12097|    480|    janet_vm.sandbox_flags = (uint32_t) args.argi;
12098|    480|    JanetTryState tstate;
12099|    480|    JanetSignal signal = janet_try(&tstate);
  ------------------
  |  | 1980|    480|#define janet_try(state) (janet_try_init(state), (JanetSignal) setjmp((state)->buf))
  ------------------
12100|    480|    if (!signal) {
  ------------------
  |  Branch (12100:9): [True: 480, False: 0]
  ------------------
12101|       |
12102|       |        /* Set abstract registry */
12103|    480|        if (!(flags & 0x2)) {
  ------------------
  |  Branch (12103:13): [True: 478, False: 2]
  ------------------
12104|    478|            Janet aregv = janet_unmarshal(nextbytes, endbytes - nextbytes,
12105|    478|                                          JANET_MARSHAL_UNSAFE, NULL, &nextbytes);
  ------------------
  |  | 1910|    478|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
12106|    478|            janet_assert(janet_checktype(aregv, JANET_TABLE), "expected table for abstract registry");
  ------------------
  |  |  389|    478|#define janet_assert(c, m) do { \
  |  |  390|    956|    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: 478]
  |  |  |  Branch (390:11): [True: 0, False: 0]
  |  |  |  Branch (390:11): [True: 0, False: 0]
  |  |  |  Branch (390:11): [Folded, False: 478]
  |  |  ------------------
  |  |  391|    478|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 478]
  |  |  ------------------
  ------------------
12107|    478|            janet_vm.abstract_registry = janet_unwrap_table(aregv);
  ------------------
  |  |  861|    478|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
12108|    478|            janet_gcroot(janet_wrap_table(janet_vm.abstract_registry));
  ------------------
  |  |  846|    478|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|    478|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    478|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    478|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12109|    478|        }
12110|       |
12111|       |        /* Get supervisor */
12112|    480|        if (flags & JANET_THREAD_SUPERVISOR_FLAG) {
  ------------------
  |  |12086|    480|#define JANET_THREAD_SUPERVISOR_FLAG 0x100
  ------------------
  |  Branch (12112:13): [True: 0, False: 480]
  ------------------
12113|      0|            Janet sup =
12114|      0|                janet_unmarshal(nextbytes, endbytes - nextbytes,
12115|      0|                                JANET_MARSHAL_UNSAFE, NULL, &nextbytes);
  ------------------
  |  | 1910|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
12116|       |            /* Hack - use a global variable to avoid longjmp clobber */
12117|      0|            janet_vm.user = janet_unwrap_pointer(sup);
  ------------------
  |  |  867|      0|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
12118|      0|        }
12119|       |
12120|       |        /* Set cfunction registry */
12121|    480|        if (!(flags & 0x4)) {
  ------------------
  |  Branch (12121:13): [True: 480, False: 0]
  ------------------
12122|    480|            uint32_t count1;
12123|    480|            memcpy(&count1, nextbytes, sizeof(count1));
12124|    480|            size_t count = (size_t) count1;
12125|       |            /* Use division to avoid overflowing size_t */
12126|    480|            janet_assert(count <= (endbytes - nextbytes - sizeof(count1)) / sizeof(JanetCFunRegistry), "thread message invalid");
  ------------------
  |  |  389|    480|#define janet_assert(c, m) do { \
  |  |  390|    480|    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: 480]
  |  |  ------------------
  |  |  391|    480|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 480]
  |  |  ------------------
  ------------------
12127|    480|            janet_vm.registry_count = count;
12128|    480|            janet_vm.registry_cap = count;
12129|    480|            janet_vm.registry = janet_malloc(count * sizeof(JanetCFunRegistry));
  ------------------
  |  | 2406|    480|#define janet_malloc(X) malloc((X))
  ------------------
12130|    480|            if (janet_vm.registry == NULL) {
  ------------------
  |  Branch (12130:17): [True: 0, False: 480]
  ------------------
12131|      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]
  |  |  ------------------
  ------------------
12132|      0|            }
12133|    480|            janet_vm.registry_dirty = 1;
12134|    480|            nextbytes += sizeof(uint32_t);
12135|    480|            memcpy(janet_vm.registry, nextbytes, count * sizeof(JanetCFunRegistry));
12136|    480|            nextbytes += count * sizeof(JanetCFunRegistry);
12137|    480|        }
12138|       |
12139|    480|        Janet fiberv = janet_unmarshal(nextbytes, endbytes - nextbytes,
12140|    480|                                       JANET_MARSHAL_UNSAFE, NULL, &nextbytes);
  ------------------
  |  | 1910|    480|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
12141|    480|        Janet value = janet_unmarshal(nextbytes, endbytes - nextbytes,
12142|    480|                                      JANET_MARSHAL_UNSAFE, NULL, &nextbytes);
  ------------------
  |  | 1910|    480|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
12143|    480|        JanetFiber *fiber;
12144|    480|        if (!janet_checktype(fiberv, JANET_FIBER)) {
  ------------------
  |  |  806|    480|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 480]
  |  |  ------------------
  |  |  807|    480|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    480|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    480|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    480|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    480|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    480|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (12144:13): [True: 210, False: 270]
  ------------------
12145|    210|            janet_assert(janet_checktype(fiberv, JANET_FUNCTION), "expected function or fiber");
  ------------------
  |  |  389|    210|#define janet_assert(c, m) do { \
  |  |  390|    420|    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: 210]
  |  |  |  Branch (390:11): [True: 0, False: 0]
  |  |  |  Branch (390:11): [True: 0, False: 0]
  |  |  |  Branch (390:11): [Folded, False: 210]
  |  |  ------------------
  |  |  391|    210|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 210]
  |  |  ------------------
  ------------------
12146|    210|            JanetFunction *func = janet_unwrap_function(fiberv);
  ------------------
  |  |  868|    210|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
12147|       |            /* 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
12148|       |             * 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. */
12149|    210|            janet_assert(func->def->min_arity >= 0 && func->def->min_arity <= 1, "thread function must accept 0 or 1 arguments");
  ------------------
  |  |  389|    210|#define janet_assert(c, m) do { \
  |  |  390|    420|    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: 210, False: 0]
  |  |  |  Branch (390:11): [True: 210, False: 0]
  |  |  ------------------
  |  |  391|    210|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 210]
  |  |  ------------------
  ------------------
12150|    210|            fiber = janet_fiber(func, 64, func->def->min_arity, &value);
12151|    210|            janet_assert(fiber != NULL, "bad fiber in thread setup");
  ------------------
  |  |  389|    210|#define janet_assert(c, m) do { \
  |  |  390|    210|    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: 210]
  |  |  ------------------
  |  |  391|    210|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 210]
  |  |  ------------------
  ------------------
12152|    210|            fiber->flags |=
12153|    210|                JANET_FIBER_MASK_ERROR |
  ------------------
  |  |  767|    210|#define JANET_FIBER_MASK_ERROR 2
  ------------------
12154|    210|                JANET_FIBER_MASK_USER0 |
  ------------------
  |  |  771|    210|#define JANET_FIBER_MASK_USER0 (16 << 0)
  ------------------
12155|    210|                JANET_FIBER_MASK_USER1 |
  ------------------
  |  |  772|    210|#define JANET_FIBER_MASK_USER1 (16 << 1)
  ------------------
12156|    210|                JANET_FIBER_MASK_USER2 |
  ------------------
  |  |  773|    210|#define JANET_FIBER_MASK_USER2 (16 << 2)
  ------------------
12157|    210|                JANET_FIBER_MASK_USER3 |
  ------------------
  |  |  774|    210|#define JANET_FIBER_MASK_USER3 (16 << 3)
  ------------------
12158|    210|                JANET_FIBER_MASK_USER4;
  ------------------
  |  |  775|    210|#define JANET_FIBER_MASK_USER4 (16 << 4)
  ------------------
12159|    270|        } else {
12160|    270|            fiber = janet_unwrap_fiber(fiberv);
  ------------------
  |  |  859|    270|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
12161|    270|        }
12162|    480|        if (flags & 0x8) {
  ------------------
  |  Branch (12162:13): [True: 0, False: 480]
  ------------------
12163|      0|            if (NULL == fiber->env) fiber->env = janet_table(0);
  ------------------
  |  Branch (12163:17): [True: 0, False: 0]
  ------------------
12164|      0|            janet_table_put(fiber->env, janet_ckeywordv("task-id"), value);
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12165|      0|        }
12166|    480|        fiber->supervisor_channel = janet_vm.user;
12167|    480|        janet_schedule(fiber, value);
12168|    480|        janet_loop();
12169|    480|        args.tag = JANET_EV_TCTAG_NIL;
  ------------------
  |  | 1578|    480|#define JANET_EV_TCTAG_NIL 0          /* resume with nil */
  ------------------
12170|    480|        janet_restore(&tstate);
12171|    480|    } else {
12172|      0|        janet_restore(&tstate);
12173|      0|        void *supervisor = janet_vm.user;
12174|      0|        if (NULL != supervisor) {
  ------------------
  |  Branch (12174:13): [True: 0, False: 0]
  ------------------
12175|       |            /* Got a supervisor, write error there */
12176|      0|            Janet pair[] = {
12177|      0|                janet_ckeywordv("error"),
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12178|      0|                tstate.payload
12179|      0|            };
12180|      0|            janet_channel_push((JanetChannel *)supervisor,
12181|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12182|      0|        } else if (flags & 0x1) {
  ------------------
  |  Branch (12182:20): [True: 0, False: 0]
  ------------------
12183|       |            /* No wait, just print to stderr */
12184|      0|            janet_eprintf("thread start failure: %v\n", tstate.payload);
  ------------------
  |  | 2194|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
12185|      0|        } else {
12186|       |            /* Make ev/thread call from parent thread error */
12187|      0|            if (janet_checktype(tstate.payload, 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12188|      0|                args.tag = 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. */
  ------------------
12189|      0|                JanetString msg = janet_unwrap_string(tstate.payload);
  ------------------
  |  |  863|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
12190|      0|                args.argp = janet_malloc(janet_string_length(msg) + 1);
  ------------------
  |  | 2406|      0|#define janet_malloc(X) malloc((X))
  ------------------
12191|      0|                memcpy(args.argp, msg, janet_string_length(msg) + 1);
  ------------------
  |  | 1812|      0|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|      0|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
12192|      0|            } else {
12193|      0|                args.tag = JANET_EV_TCTAG_ERR_STRING;
  ------------------
  |  | 1583|      0|#define JANET_EV_TCTAG_ERR_STRING 5   /* cancel with janet_cstringv((const char *) argp) */
  ------------------
12194|      0|                args.argp = "failed to start thread";
12195|      0|            }
12196|      0|        }
12197|      0|    }
12198|    480|    janet_buffer_deinit(buffer);
12199|    480|    janet_free(buffer);
  ------------------
  |  | 2415|    480|#define janet_free(X) free((X))
  ------------------
12200|    480|    janet_deinit();
12201|    480|    return args;
12202|    480|}
janet.c:mutexgc:
12446|     10|static int mutexgc(void *p, size_t size) {
12447|     10|    (void) size;
12448|     10|    janet_os_mutex_deinit(p);
12449|     10|    return 0;
12450|     10|}
janet.c:rwlockgc:
12488|     22|static int rwlockgc(void *p, size_t size) {
12489|     22|    (void) size;
12490|     22|    janet_os_rwlock_deinit(p);
12491|     22|    return 0;
12492|     22|}
janet.c:build_struct_type:
13053|    124|static JanetFFIStruct *build_struct_type(int32_t argc, const Janet *argv) {
13054|       |    /* Use :pack to indicate a single packed struct member and :pack-all
13055|       |     * to pack the remaining members */
13056|    124|    int32_t member_count = argc;
13057|    124|    int all_packed = 0;
13058|  1.58k|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (13058:25): [True: 1.46k, False: 124]
  ------------------
13059|  1.46k|        if (janet_keyeq(argv[i], "pack")) {
  ------------------
  |  Branch (13059:13): [True: 49, False: 1.41k]
  ------------------
13060|     49|            member_count--;
13061|  1.41k|        } else if (janet_keyeq(argv[i], "pack-all")) {
  ------------------
  |  Branch (13061:20): [True: 0, False: 1.41k]
  ------------------
13062|      0|            member_count--;
13063|      0|            all_packed = 1;
13064|      0|        }
13065|  1.46k|    }
13066|       |
13067|    124|    JanetFFIStruct *st = janet_abstract(&janet_struct_type,
13068|    124|                                        sizeof(JanetFFIStruct) + argc * sizeof(JanetFFIStructMember));
13069|    124|    st->field_count = 0;
13070|    124|    st->size = 0;
13071|    124|    st->align = 1;
13072|    124|    if (argc == 0) {
  ------------------
  |  Branch (13072:9): [True: 1, False: 123]
  ------------------
13073|      1|        janet_panic("invalid empty struct");
13074|      1|    }
13075|    123|    uint32_t is_aligned = 1;
13076|    123|    int32_t i = 0;
13077|    259|    for (int32_t j = 0; j < argc; j++) {
  ------------------
  |  Branch (13077:25): [True: 148, False: 111]
  ------------------
13078|    148|        int pack_one = 0;
13079|    148|        if (janet_keyeq(argv[j], "pack") || janet_keyeq(argv[j], "pack-all")) {
  ------------------
  |  Branch (13079:13): [True: 19, False: 129]
  |  Branch (13079:45): [True: 0, False: 129]
  ------------------
13080|     19|            pack_one = 1;
13081|     19|            j++;
13082|     19|            if (j == argc) break;
  ------------------
  |  Branch (13082:17): [True: 12, False: 7]
  ------------------
13083|     19|        }
13084|    136|        st->fields[i].type = decode_ffi_type(argv[j]);
13085|    136|        size_t el_size = type_size(st->fields[i].type);
13086|    136|        size_t el_align = type_align(st->fields[i].type);
13087|    136|        if (el_align <= 0) janet_panicf("bad field type %V", argv[j]);
  ------------------
  |  Branch (13087:13): [True: 0, False: 136]
  ------------------
13088|    136|        if (all_packed || pack_one) {
  ------------------
  |  Branch (13088:13): [True: 110, False: 26]
  |  Branch (13088:27): [True: 0, False: 26]
  ------------------
13089|      0|            if (st->size % el_align != 0) is_aligned = 0;
  ------------------
  |  Branch (13089:17): [True: 0, False: 0]
  ------------------
13090|      0|            st->fields[i].offset = st->size;
13091|      0|            st->size += (uint32_t) el_size;
13092|    136|        } else {
13093|    136|            if (el_align > st->align) st->align = (uint32_t) el_align;
  ------------------
  |  Branch (13093:17): [True: 16, False: 120]
  ------------------
13094|    136|            st->fields[i].offset = (uint32_t)(((st->size + el_align - 1) / el_align) * el_align);
13095|    136|            st->size = (uint32_t)(el_size + st->fields[i].offset);
13096|    136|        }
13097|    136|        i++;
13098|    136|    }
13099|    123|    st->is_aligned = is_aligned;
13100|    123|    st->size += (st->align - 1);
13101|    123|    st->size /= st->align;
13102|    123|    st->size *= st->align;
13103|    123|    st->field_count = member_count;
13104|    123|    return st;
13105|    123|}
janet.c:type_size:
12958|     26|static size_t type_size(JanetFFIType t) {
12959|     26|    size_t count = t.array_count < 0 ? 1 : (size_t) t.array_count;
  ------------------
  |  Branch (12959:20): [True: 23, False: 3]
  ------------------
12960|     26|    if (t.prim == JANET_FFI_TYPE_STRUCT) {
  ------------------
  |  Branch (12960:9): [True: 1, False: 25]
  ------------------
12961|      1|        return t.st->size * count;
12962|     25|    } else {
12963|     25|        return janet_ffi_type_info[t.prim].size * count;
12964|     25|    }
12965|     26|}
janet.c:decode_ffi_type:
13107|    144|static JanetFFIType decode_ffi_type(Janet x) {
13108|    144|    if (janet_checktype(x, JANET_KEYWORD)) {
  ------------------
  |  |  806|    144|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 112, False: 32]
  |  |  |  Branch (806:6): [Folded, False: 144]
  |  |  ------------------
  |  |  807|    144|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    144|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    144|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    144|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    144|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    144|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13109|    112|        return prim_type(decode_ffi_prim(janet_unwrap_keyword(x)));
  ------------------
  |  |  865|    112|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
13110|    112|    }
13111|     32|    JanetFFIType ret;
13112|     32|    ret.array_count = -1;
13113|     32|    ret.prim = JANET_FFI_TYPE_STRUCT;
13114|     32|    if (janet_checkabstract(x, &janet_struct_type)) {
  ------------------
  |  Branch (13114:9): [True: 1, False: 31]
  ------------------
13115|      1|        ret.st = janet_unwrap_abstract(x);
  ------------------
  |  |  866|      1|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
13116|      1|        return ret;
13117|      1|    }
13118|     31|    int32_t len;
13119|     31|    const Janet *els;
13120|     31|    if (janet_indexed_view(x, &els, &len)) {
  ------------------
  |  Branch (13120:9): [True: 14, False: 17]
  ------------------
13121|     14|        if (janet_checktype(x, JANET_ARRAY)) {
  ------------------
  |  |  806|     14|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 9, False: 5]
  |  |  |  Branch (806:6): [Folded, False: 14]
  |  |  ------------------
  |  |  807|     14|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     14|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     14|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     14|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     14|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13122|      9|            if (len != 2 && len != 1) janet_panicf("array type must be of form @[type count], got %v", x);
  ------------------
  |  Branch (13122:17): [True: 4, False: 5]
  |  Branch (13122:29): [True: 1, False: 3]
  ------------------
13123|      8|            ret = decode_ffi_type(els[0]);
13124|      8|            int32_t array_count = len == 1 ? 0 : janet_getnat(els, 1);
  ------------------
  |  Branch (13124:35): [True: 1, False: 7]
  ------------------
13125|      8|            ret.array_count = array_count;
13126|      8|        } else {
13127|      5|            ret.st = build_struct_type(len, els);
13128|      5|        }
13129|     13|        return ret;
13130|     17|    } else {
13131|     17|        janet_panicf("bad native type %v", x);
13132|     17|    }
13133|     31|}
janet.c:prim_type:
12950|     28|static JanetFFIType prim_type(JanetFFIPrimType pt) {
12951|     28|    JanetFFIType t;
12952|     28|    t.prim = pt;
12953|       |    t.st = NULL;
12954|     28|    t.array_count = -1;
12955|     28|    return t;
12956|     28|}
janet.c:decode_ffi_prim:
12990|    112|static JanetFFIPrimType decode_ffi_prim(const uint8_t *name) {
12991|    112|    if (!janet_cstrcmp(name, "void")) return JANET_FFI_TYPE_VOID;
  ------------------
  |  Branch (12991:9): [True: 0, False: 112]
  ------------------
12992|    112|    if (!janet_cstrcmp(name, "bool")) return JANET_FFI_TYPE_BOOL;
  ------------------
  |  Branch (12992:9): [True: 0, False: 112]
  ------------------
12993|    112|    if (!janet_cstrcmp(name, "ptr")) return JANET_FFI_TYPE_PTR;
  ------------------
  |  Branch (12993:9): [True: 11, False: 101]
  ------------------
12994|    101|    if (!janet_cstrcmp(name, "pointer")) return JANET_FFI_TYPE_PTR;
  ------------------
  |  Branch (12994:9): [True: 0, False: 101]
  ------------------
12995|    101|    if (!janet_cstrcmp(name, "string")) return JANET_FFI_TYPE_STRING;
  ------------------
  |  Branch (12995:9): [True: 1, False: 100]
  ------------------
12996|    100|    if (!janet_cstrcmp(name, "float")) return JANET_FFI_TYPE_FLOAT;
  ------------------
  |  Branch (12996:9): [True: 0, False: 100]
  ------------------
12997|    100|    if (!janet_cstrcmp(name, "double")) return JANET_FFI_TYPE_DOUBLE;
  ------------------
  |  Branch (12997:9): [True: 0, False: 100]
  ------------------
12998|    100|    if (!janet_cstrcmp(name, "int8")) return JANET_FFI_TYPE_INT8;
  ------------------
  |  Branch (12998:9): [True: 4, False: 96]
  ------------------
12999|     96|    if (!janet_cstrcmp(name, "uint8")) return JANET_FFI_TYPE_UINT8;
  ------------------
  |  Branch (12999:9): [True: 1, False: 95]
  ------------------
13000|     95|    if (!janet_cstrcmp(name, "int16")) return JANET_FFI_TYPE_INT16;
  ------------------
  |  Branch (13000:9): [True: 1, False: 94]
  ------------------
13001|     94|    if (!janet_cstrcmp(name, "uint16")) return JANET_FFI_TYPE_UINT16;
  ------------------
  |  Branch (13001:9): [True: 0, False: 94]
  ------------------
13002|     94|    if (!janet_cstrcmp(name, "int32")) return JANET_FFI_TYPE_INT32;
  ------------------
  |  Branch (13002:9): [True: 0, False: 94]
  ------------------
13003|     94|    if (!janet_cstrcmp(name, "uint32")) return JANET_FFI_TYPE_UINT32;
  ------------------
  |  Branch (13003:9): [True: 0, False: 94]
  ------------------
13004|     94|    if (!janet_cstrcmp(name, "int64")) return JANET_FFI_TYPE_INT64;
  ------------------
  |  Branch (13004:9): [True: 0, False: 94]
  ------------------
13005|     94|    if (!janet_cstrcmp(name, "uint64")) return JANET_FFI_TYPE_UINT64;
  ------------------
  |  Branch (13005:9): [True: 0, False: 94]
  ------------------
13006|     94|#ifdef JANET_64
13007|     94|    if (!janet_cstrcmp(name, "size")) return JANET_FFI_TYPE_UINT64;
  ------------------
  |  Branch (13007:9): [True: 0, False: 94]
  ------------------
13008|     94|    if (!janet_cstrcmp(name, "ssize")) return JANET_FFI_TYPE_INT64;
  ------------------
  |  Branch (13008:9): [True: 0, False: 94]
  ------------------
13009|       |#else
13010|       |    if (!janet_cstrcmp(name, "size")) return JANET_FFI_TYPE_UINT32;
13011|       |    if (!janet_cstrcmp(name, "ssize")) return JANET_FFI_TYPE_INT32;
13012|       |#endif
13013|       |    /* aliases */
13014|     94|    if (!janet_cstrcmp(name, "r32")) return JANET_FFI_TYPE_FLOAT;
  ------------------
  |  Branch (13014:9): [True: 0, False: 94]
  ------------------
13015|     94|    if (!janet_cstrcmp(name, "r64")) return JANET_FFI_TYPE_DOUBLE;
  ------------------
  |  Branch (13015:9): [True: 0, False: 94]
  ------------------
13016|     94|    if (!janet_cstrcmp(name, "s8")) return JANET_FFI_TYPE_INT8;
  ------------------
  |  Branch (13016:9): [True: 0, False: 94]
  ------------------
13017|     94|    if (!janet_cstrcmp(name, "u8")) return JANET_FFI_TYPE_UINT8;
  ------------------
  |  Branch (13017:9): [True: 0, False: 94]
  ------------------
13018|     94|    if (!janet_cstrcmp(name, "s16")) return JANET_FFI_TYPE_INT16;
  ------------------
  |  Branch (13018:9): [True: 0, False: 94]
  ------------------
13019|     94|    if (!janet_cstrcmp(name, "u16")) return JANET_FFI_TYPE_UINT16;
  ------------------
  |  Branch (13019:9): [True: 0, False: 94]
  ------------------
13020|     94|    if (!janet_cstrcmp(name, "s32")) return JANET_FFI_TYPE_INT32;
  ------------------
  |  Branch (13020:9): [True: 0, False: 94]
  ------------------
13021|     94|    if (!janet_cstrcmp(name, "u32")) return JANET_FFI_TYPE_UINT32;
  ------------------
  |  Branch (13021:9): [True: 0, False: 94]
  ------------------
13022|     94|    if (!janet_cstrcmp(name, "s64")) return JANET_FFI_TYPE_INT64;
  ------------------
  |  Branch (13022:9): [True: 0, False: 94]
  ------------------
13023|     94|    if (!janet_cstrcmp(name, "u64")) return JANET_FFI_TYPE_UINT64;
  ------------------
  |  Branch (13023:9): [True: 0, False: 94]
  ------------------
13024|     94|    if (!janet_cstrcmp(name, "char")) return JANET_FFI_TYPE_INT8;
  ------------------
  |  Branch (13024:9): [True: 0, False: 94]
  ------------------
13025|     94|    if (!janet_cstrcmp(name, "short")) return JANET_FFI_TYPE_INT16;
  ------------------
  |  Branch (13025:9): [True: 0, False: 94]
  ------------------
13026|     94|    if (!janet_cstrcmp(name, "int")) return JANET_FFI_TYPE_INT32;
  ------------------
  |  Branch (13026:9): [True: 5, False: 89]
  ------------------
13027|     89|    if (!janet_cstrcmp(name, "long")) return JANET_FFI_TYPE_INT64;
  ------------------
  |  Branch (13027:9): [True: 0, False: 89]
  ------------------
13028|     89|    if (!janet_cstrcmp(name, "byte")) return JANET_FFI_TYPE_UINT8;
  ------------------
  |  Branch (13028:9): [True: 0, False: 89]
  ------------------
13029|     89|    if (!janet_cstrcmp(name, "uchar")) return JANET_FFI_TYPE_UINT8;
  ------------------
  |  Branch (13029:9): [True: 0, False: 89]
  ------------------
13030|     89|    if (!janet_cstrcmp(name, "ushort")) return JANET_FFI_TYPE_UINT16;
  ------------------
  |  Branch (13030:9): [True: 0, False: 89]
  ------------------
13031|     89|    if (!janet_cstrcmp(name, "uint")) return JANET_FFI_TYPE_UINT32;
  ------------------
  |  Branch (13031:9): [True: 5, False: 84]
  ------------------
13032|     84|    if (!janet_cstrcmp(name, "ulong")) return JANET_FFI_TYPE_UINT64;
  ------------------
  |  Branch (13032:9): [True: 0, False: 84]
  ------------------
13033|     84|    janet_panicf("unknown machine type %s", name);
13034|     84|}
janet.c:type_align:
12967|     26|static size_t type_align(JanetFFIType t) {
12968|     26|    if (t.prim == JANET_FFI_TYPE_STRUCT) {
  ------------------
  |  Branch (12968:9): [True: 1, False: 25]
  ------------------
12969|      1|        return t.st->align;
12970|     25|    } else {
12971|     25|        return janet_ffi_type_info[t.prim].align;
12972|     25|    }
12973|     26|}
janet.c:decode_ffi_cc:
12975|      1|static JanetFFICallingConvention decode_ffi_cc(const uint8_t *name) {
12976|      1|    if (!janet_cstrcmp(name, "none")) return JANET_FFI_CC_NONE;
  ------------------
  |  Branch (12976:9): [True: 0, False: 1]
  ------------------
12977|       |#ifdef JANET_FFI_WIN64_ENABLED
12978|       |    if (!janet_cstrcmp(name, "win64")) return JANET_FFI_CC_WIN_64;
12979|       |#endif
12980|      1|#ifdef JANET_FFI_SYSV64_ENABLED
12981|      1|    if (!janet_cstrcmp(name, "sysv64")) return JANET_FFI_CC_SYSV_64;
  ------------------
  |  Branch (12981:9): [True: 0, False: 1]
  ------------------
12982|      1|#endif
12983|       |#ifdef JANET_FFI_AAPCS64_ENABLED
12984|       |    if (!janet_cstrcmp(name, "aapcs64")) return JANET_FFI_CC_AAPCS64;
12985|       |#endif
12986|      1|    if (!janet_cstrcmp(name, "default")) return JANET_FFI_CC_DEFAULT;
  ------------------
  |  |12840|      0|#define JANET_FFI_CC_DEFAULT JANET_FFI_CC_SYSV_64
  ------------------
  |  Branch (12986:9): [True: 0, False: 1]
  ------------------
12987|      1|    janet_panicf("unknown calling convention %s", name);
12988|      1|}
janet.c:janet_ffi_get_callable_pointer:
13182|      2|static void *janet_ffi_get_callable_pointer(const Janet *argv, int32_t n) {
13183|      2|    switch (janet_type(argv[n])) {
  ------------------
  |  |  795|      2|    (isnan((x).number) \
  |  |  796|      2|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|      2|        : JANET_NUMBER)
  ------------------
  |  Branch (13183:13): [True: 1, False: 1]
  ------------------
13184|      2|        default:
  ------------------
  |  Branch (13184:9): [True: 2, False: 0]
  ------------------
13185|      2|            break;
13186|      2|        case JANET_POINTER:
  ------------------
  |  Branch (13186:9): [True: 0, False: 2]
  ------------------
13187|      0|            return janet_unwrap_pointer(argv[n]);
  ------------------
  |  |  867|      0|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
13188|      0|        case JANET_ABSTRACT:
  ------------------
  |  Branch (13188:9): [True: 0, False: 2]
  ------------------
13189|      0|            if (!janet_checkabstract(argv[n], &janet_type_ffijit)) break;
  ------------------
  |  Branch (13189:17): [True: 0, False: 0]
  ------------------
13190|      0|            return ((JanetFFIJittedFn *)janet_unwrap_abstract(argv[n]))->function_pointer;
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
13191|      2|    }
13192|      2|    janet_panicf("bad slot #%d, expected ffi callable pointer type, got %v", n, argv[n]);
13193|      2|}
janet.c:fiber_reset:
14620|   384k|static void fiber_reset(JanetFiber *fiber) {
14621|   384k|    fiber->maxstack = JANET_STACK_MAX;
  ------------------
  |  |  307|   384k|#define JANET_STACK_MAX 0x7fffffff
  ------------------
14622|   384k|    fiber->frame = 0;
14623|   384k|    fiber->stackstart = JANET_FRAME_SIZE;
  ------------------
  |  | 1026|   384k|#define JANET_FRAME_SIZE 4
  ------------------
14624|   384k|    fiber->stacktop = JANET_FRAME_SIZE;
  ------------------
  |  | 1026|   384k|#define JANET_FRAME_SIZE 4
  ------------------
14625|   384k|    fiber->child = NULL;
14626|   384k|    fiber->flags = JANET_FIBER_MASK_YIELD | JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  769|   384k|#define JANET_FIBER_MASK_YIELD 8
  ------------------
                  fiber->flags = JANET_FIBER_MASK_YIELD | JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  790|   384k|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
                  fiber->flags = JANET_FIBER_MASK_YIELD | JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  791|   384k|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  ------------------
14627|   384k|    fiber->env = NULL;
14628|   384k|    fiber->last_value = janet_wrap_nil();
  ------------------
  |  |  831|   384k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   384k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   384k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   384k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14629|   384k|#ifdef JANET_EV
14630|   384k|    fiber->sched_id = 0;
14631|   384k|    fiber->ev_callback = NULL;
14632|   384k|    fiber->ev_state = NULL;
14633|   384k|    fiber->ev_stream = NULL;
14634|   384k|    fiber->supervisor_channel = NULL;
14635|   384k|#endif
14636|   384k|    janet_fiber_set_status(fiber, JANET_STATUS_NEW);
  ------------------
  |  |  804|   384k|#define janet_fiber_set_status(f, s) do {\
  |  |  805|   384k|    (f)->flags &= ~JANET_FIBER_STATUS_MASK;\
  |  |  ------------------
  |  |  |  |  785|   384k|#define JANET_FIBER_STATUS_MASK 0x3F0000
  |  |  ------------------
  |  |  806|   384k|    (f)->flags |= (s) << JANET_FIBER_STATUS_OFFSET;\
  |  |  ------------------
  |  |  |  |  787|   384k|#define JANET_FIBER_STATUS_OFFSET 16
  |  |  ------------------
  |  |  807|   384k|} while (0)
  |  |  ------------------
  |  |  |  Branch (807:10): [Folded, False: 384k]
  |  |  ------------------
  ------------------
14637|   384k|}
janet.c:fiber_alloc:
14639|   384k|static JanetFiber *fiber_alloc(int32_t capacity) {
14640|   384k|    Janet *data;
14641|   384k|    JanetFiber *fiber = janet_gcalloc(JANET_MEMORY_FIBER, sizeof(JanetFiber));
14642|   384k|    if (capacity < 32) {
  ------------------
  |  Branch (14642:9): [True: 0, False: 384k]
  ------------------
14643|      0|        capacity = 32;
14644|      0|    }
14645|   384k|    fiber->capacity = capacity;
14646|   384k|    data = array_allocate(sizeof(Janet), capacity);
14647|   384k|    if (NULL == data) {
  ------------------
  |  Branch (14647:9): [True: 0, False: 384k]
  ------------------
14648|      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]
  |  |  ------------------
  ------------------
14649|      0|    }
14650|   384k|    janet_vm.next_collection += sizeof(Janet) * capacity;
14651|   384k|    fiber->data = data;
14652|   384k|    return fiber;
14653|   384k|}
janet.c:janet_fiber_grow:
14718|  7.52k|static void janet_fiber_grow(JanetFiber *fiber, int32_t needed) {
14719|  7.52k|    int32_t cap = needed > (INT32_MAX / 2) ? INT32_MAX : 2 * needed;
  ------------------
  |  Branch (14719:19): [True: 0, False: 7.52k]
  ------------------
14720|  7.52k|    janet_fiber_setcapacity(fiber, cap);
14721|  7.52k|}
janet.c:make_struct_n:
14769|     38|static Janet make_struct_n(const Janet *args, int32_t n) {
14770|     38|    int32_t i = 0;
14771|     38|    if (n & 1) n--;
  ------------------
  |  Branch (14771:9): [True: 4, False: 34]
  ------------------
14772|     38|    JanetKV *st = janet_struct_begin(n);
14773|  2.34k|    for (; i < n; i += 2) {
  ------------------
  |  Branch (14773:12): [True: 2.30k, False: 38]
  ------------------
14774|  2.30k|        janet_struct_put(st, args[i], args[i + 1]);
14775|  2.30k|    }
14776|     38|    return janet_wrap_struct(janet_struct_end(st));
  ------------------
  |  |  842|     38|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14777|     38|}
janet.c:janet_env_detach:
14843|   118M|static void janet_env_detach(JanetFuncEnv *env) {
14844|       |    /* Check for closure environment */
14845|   118M|    if (env) {
  ------------------
  |  Branch (14845:9): [True: 10.5M, False: 108M]
  ------------------
14846|  10.5M|        janet_env_valid(env);
14847|  10.5M|        int32_t len = env->length; /* Maximum is 256 */
14848|  10.5M|        size_t s = sizeof(Janet) * (size_t) len;
14849|  10.5M|        Janet *vmem = janet_malloc(s);
  ------------------
  |  | 2406|  10.5M|#define janet_malloc(X) malloc((X))
  ------------------
14850|  10.5M|        janet_vm.next_collection += (uint32_t) s;
14851|  10.5M|        if (NULL == vmem) {
  ------------------
  |  Branch (14851:13): [True: 0, False: 10.5M]
  ------------------
14852|      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]
  |  |  ------------------
  ------------------
14853|      0|        }
14854|  10.5M|        Janet *values = env->as.fiber->data + env->offset;
14855|  10.5M|        safe_memcpy(vmem, values, s);
14856|  10.5M|        uint32_t *bitset = janet_stack_frame(values)->func->def->closure_bitset;
  ------------------
  |  |  809|  10.5M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1026|  10.5M|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
14857|  10.5M|        if (bitset) {
  ------------------
  |  Branch (14857:13): [True: 10.5M, False: 0]
  ------------------
14858|       |            /* Clear unneeded references in closure environment */
14859|  21.2M|            for (int32_t i = 0; i < len; i += 32) {
  ------------------
  |  Branch (14859:33): [True: 10.7M, False: 10.5M]
  ------------------
14860|  10.7M|                uint32_t mask = ~(bitset[i >> 5]);
14861|  10.7M|                int32_t maxj = i + 32 > len ? len : i + 32;
  ------------------
  |  Branch (14861:32): [True: 10.5M, False: 204k]
  ------------------
14862|   332M|                for (int32_t j = i; j < maxj; j++) {
  ------------------
  |  Branch (14862:37): [True: 321M, False: 10.7M]
  ------------------
14863|   321M|                    if (mask & 1) vmem[j] = janet_wrap_nil();
  ------------------
  |  |  831|   259M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   259M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   259M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   259M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (14863:25): [True: 259M, False: 61.8M]
  ------------------
14864|   321M|                    mask >>= 1;
14865|   321M|                }
14866|  10.7M|            }
14867|  10.5M|        }
14868|  10.5M|        env->offset = 0;
14869|  10.5M|        env->as.values = vmem;
14870|  10.5M|    }
14871|   118M|}
janet.c:janet_mark_string:
16354|  30.4M|static void janet_mark_string(const uint8_t *str) {
16355|  30.4M|    janet_gc_mark(janet_string_head(str));
  ------------------
  |  |  637|  30.4M|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|  30.4M|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|  30.4M|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16356|  30.4M|}
janet.c:janet_mark_buffer:
16358|  22.4k|static void janet_mark_buffer(JanetBuffer *buffer) {
16359|  22.4k|    janet_gc_mark(buffer);
  ------------------
  |  |  637|  22.4k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|  22.4k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|  22.4k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16360|  22.4k|}
janet.c:janet_mark_abstract:
16362|  16.7k|static void janet_mark_abstract(void *adata) {
16363|  16.7k|#ifdef JANET_EV
16364|       |    /* Check if abstract type is a threaded abstract type. If it is, marking means
16365|       |     * updating the threaded_abstract table. */
16366|  16.7k|    if ((janet_abstract_head(adata)->gc.flags & JANET_MEM_TYPEBITS) == JANET_MEMORY_THREADED_ABSTRACT) {
  ------------------
  |  | 1896|  16.7k|#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) {
  ------------------
  |  |  630|  16.7k|#define JANET_MEM_TYPEBITS 0xFF
  ------------------
  |  Branch (16366:9): [True: 0, False: 16.7k]
  ------------------
16367|      0|        janet_table_put(&janet_vm.threaded_abstracts, janet_wrap_abstract(adata), janet_wrap_true());
  ------------------
  |  |  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_table_put(&janet_vm.threaded_abstracts, janet_wrap_abstract(adata), 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16368|      0|        return;
16369|      0|    }
16370|  16.7k|#endif
16371|  16.7k|    if (janet_gc_reachable(janet_abstract_head(adata)))
  ------------------
  |  |  638|  16.7k|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|  16.7k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|  16.7k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (638:31): [True: 12.2k, False: 4.49k]
  |  |  ------------------
  ------------------
16372|  12.2k|        return;
16373|  4.49k|    janet_gc_mark(janet_abstract_head(adata));
  ------------------
  |  |  637|  4.49k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|  4.49k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|  4.49k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16374|  4.49k|    if (janet_abstract_head(adata)->type->gcmark) {
  ------------------
  |  | 1896|  4.49k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
  |  Branch (16374:9): [True: 1.12k, False: 3.36k]
  ------------------
16375|  1.12k|        janet_abstract_head(adata)->type->gcmark(adata, janet_abstract_size(adata));
  ------------------
  |  | 1896|  1.12k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
                      janet_abstract_head(adata)->type->gcmark(adata, janet_abstract_size(adata));
  ------------------
  |  | 1899|  1.12k|#define janet_abstract_size(u) (janet_abstract_head(u)->size)
  |  |  ------------------
  |  |  |  | 1896|  1.12k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
16376|  1.12k|    }
16377|  4.49k|}
janet.c:janet_mark_array:
16418|  10.1k|static void janet_mark_array(JanetArray *array) {
16419|  10.1k|    if (janet_gc_reachable(array))
  ------------------
  |  |  638|  10.1k|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|  10.1k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|  10.1k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (638:31): [True: 6.70k, False: 3.40k]
  |  |  ------------------
  ------------------
16420|  6.70k|        return;
16421|  3.40k|    janet_gc_mark(array);
  ------------------
  |  |  637|  3.40k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|  3.40k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|  3.40k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16422|  3.40k|    if (janet_gc_type((JanetGCObject *) array) == JANET_MEMORY_ARRAY) {
  ------------------
  |  |  635|  3.40k|#define janet_gc_type(m) (janet_gc_header(m)->flags & 0xFF)
  |  |  ------------------
  |  |  |  |  628|  3.40k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
  |  Branch (16422:9): [True: 3.39k, False: 10]
  ------------------
16423|  3.39k|        janet_mark_many(array->data, array->count);
16424|  3.39k|    }
16425|  3.40k|}
janet.c:janet_mark_many:
16380|  1.72M|static void janet_mark_many(const Janet *values, int32_t n) {
16381|  1.72M|    if (values == NULL)
  ------------------
  |  Branch (16381:9): [True: 300k, False: 1.42M]
  ------------------
16382|   300k|        return;
16383|  1.42M|    const Janet *end = values + n;
16384|   179M|    while (values < end) {
  ------------------
  |  Branch (16384:12): [True: 178M, False: 1.42M]
  ------------------
16385|   178M|        janet_mark(*values);
16386|   178M|        values += 1;
16387|   178M|    }
16388|  1.42M|}
janet.c:janet_mark_table:
16427|   851k|static void janet_mark_table(JanetTable *table) {
16428|   851k|recur: /* Manual tail recursion */
16429|   851k|    if (janet_gc_reachable(table))
  ------------------
  |  |  638|   851k|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|   851k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|   851k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (638:31): [True: 35.9k, False: 815k]
  |  |  ------------------
  ------------------
16430|  35.9k|        return;
16431|   815k|    janet_gc_mark(table);
  ------------------
  |  |  637|   815k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|   815k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|   815k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16432|   815k|    enum JanetMemoryType memtype = janet_gc_type(table);
  ------------------
  |  |  635|   815k|#define janet_gc_type(m) (janet_gc_header(m)->flags & 0xFF)
  |  |  ------------------
  |  |  |  |  628|   815k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
16433|   815k|    if (memtype == JANET_MEMORY_TABLE_WEAKK) {
  ------------------
  |  Branch (16433:9): [True: 0, False: 815k]
  ------------------
16434|      0|        janet_mark_values(table->data, table->capacity);
16435|   815k|    } else if (memtype == JANET_MEMORY_TABLE_WEAKV) {
  ------------------
  |  Branch (16435:16): [True: 0, False: 815k]
  ------------------
16436|      0|        janet_mark_keys(table->data, table->capacity);
16437|   815k|    } else if (memtype == JANET_MEMORY_TABLE) {
  ------------------
  |  Branch (16437:16): [True: 815k, False: 3]
  ------------------
16438|   815k|        janet_mark_kvs(table->data, table->capacity);
16439|   815k|    }
16440|       |    /* do nothing for JANET_MEMORY_TABLE_WEAKKV */
16441|   815k|    if (table->proto) {
  ------------------
  |  Branch (16441:9): [True: 42, False: 815k]
  ------------------
16442|     42|        table = table->proto;
16443|     42|        goto recur;
16444|     42|    }
16445|   815k|}
janet.c:janet_mark_kvs:
16409|   822k|static void janet_mark_kvs(const JanetKV *kvs, int32_t n) {
16410|   822k|    const JanetKV *end = kvs + n;
16411|  14.3M|    while (kvs < end) {
  ------------------
  |  Branch (16411:12): [True: 13.5M, False: 822k]
  ------------------
16412|  13.5M|        janet_mark(kvs->key);
16413|  13.5M|        janet_mark(kvs->value);
16414|  13.5M|        kvs++;
16415|  13.5M|    }
16416|   822k|}
janet.c:janet_mark_struct:
16447|  8.95k|static void janet_mark_struct(const JanetKV *st) {
16448|  8.95k|recur:
16449|  8.95k|    if (janet_gc_reachable(janet_struct_head(st)))
  ------------------
  |  |  638|  8.95k|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|  8.95k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|  8.95k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (638:31): [True: 1.11k, False: 7.83k]
  |  |  ------------------
  ------------------
16450|  1.11k|        return;
16451|  7.83k|    janet_gc_mark(janet_struct_head(st));
  ------------------
  |  |  637|  7.83k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|  7.83k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|  7.83k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16452|  7.83k|    janet_mark_kvs(st, janet_struct_capacity(st));
  ------------------
  |  | 1848|  7.83k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1845|  7.83k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
16453|  7.83k|    st = janet_struct_proto(st);
  ------------------
  |  | 1850|  7.83k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1845|  7.83k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
16454|  7.83k|    if (st) goto recur;
  ------------------
  |  Branch (16454:9): [True: 0, False: 7.83k]
  ------------------
16455|  7.83k|}
janet.c:janet_mark_tuple:
16457|   930k|static void janet_mark_tuple(const Janet *tuple) {
16458|   930k|    if (janet_gc_reachable(janet_tuple_head(tuple)))
  ------------------
  |  |  638|   930k|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|   930k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|   930k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (638:31): [True: 11.2k, False: 919k]
  |  |  ------------------
  ------------------
16459|  11.2k|        return;
16460|   919k|    janet_gc_mark(janet_tuple_head(tuple));
  ------------------
  |  |  637|   919k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|   919k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|   919k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16461|       |    janet_mark_many(tuple, janet_tuple_length(tuple));
  ------------------
  |  | 1801|   919k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|   919k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
16462|   919k|}
janet.c:janet_mark_function:
16503|  1.60M|static void janet_mark_function(JanetFunction *func) {
16504|  1.60M|    int32_t i;
16505|  1.60M|    int32_t numenvs;
16506|  1.60M|    if (janet_gc_reachable(func))
  ------------------
  |  |  638|  1.60M|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|  1.60M|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|  1.60M|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (638:31): [True: 1.17M, False: 429k]
  |  |  ------------------
  ------------------
16507|  1.17M|        return;
16508|   429k|    janet_gc_mark(func);
  ------------------
  |  |  637|   429k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|   429k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|   429k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16509|   429k|    if (NULL != func->def) {
  ------------------
  |  Branch (16509:9): [True: 429k, False: 0]
  ------------------
16510|       |        /* this should always be true, except if function is only partially constructed */
16511|   429k|        numenvs = func->def->environments_length;
16512|   477k|        for (i = 0; i < numenvs; ++i) {
  ------------------
  |  Branch (16512:21): [True: 48.0k, False: 429k]
  ------------------
16513|  48.0k|            janet_mark_funcenv(func->envs[i]);
16514|  48.0k|        }
16515|   429k|        janet_mark_funcdef(func->def);
16516|   429k|    }
16517|   429k|}
janet.c:janet_mark_funcenv:
16465|  48.1k|static void janet_mark_funcenv(JanetFuncEnv *env) {
16466|  48.1k|    if (janet_gc_reachable(env))
  ------------------
  |  |  638|  48.1k|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|  48.1k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|  48.1k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (638:31): [True: 39.1k, False: 9.02k]
  |  |  ------------------
  ------------------
16467|  39.1k|        return;
16468|  9.02k|    janet_gc_mark(env);
  ------------------
  |  |  637|  9.02k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|  9.02k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|  9.02k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16469|       |    /* If closure env references a dead fiber, we can just copy out the stack frame we need so
16470|       |     * we don't need to keep around the whole dead fiber. */
16471|  9.02k|    janet_env_maybe_detach(env);
16472|  9.02k|    if (env->offset > 0) {
  ------------------
  |  Branch (16472:9): [True: 62, False: 8.96k]
  ------------------
16473|       |        /* On stack */
16474|     62|        janet_mark_fiber(env->as.fiber);
16475|  8.96k|    } else {
16476|       |        /* Not on stack */
16477|  8.96k|        janet_mark_many(env->as.values, env->length);
16478|  8.96k|    }
16479|  9.02k|}
janet.c:janet_mark_funcdef:
16482|   795k|static void janet_mark_funcdef(JanetFuncDef *def) {
16483|   795k|    int32_t i;
16484|   795k|    if (janet_gc_reachable(def))
  ------------------
  |  |  638|   795k|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|   795k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|   795k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (638:31): [True: 5.65k, False: 789k]
  |  |  ------------------
  ------------------
16485|  5.65k|        return;
16486|   789k|    janet_gc_mark(def);
  ------------------
  |  |  637|   789k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|   789k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|   789k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16487|   789k|    janet_mark_many(def->constants, def->constants_length);
16488|  1.15M|    for (i = 0; i < def->defs_length; ++i) {
  ------------------
  |  Branch (16488:17): [True: 365k, False: 789k]
  ------------------
16489|   365k|        janet_mark_funcdef(def->defs[i]);
16490|   365k|    }
16491|   789k|    if (def->source)
  ------------------
  |  Branch (16491:9): [True: 752k, False: 36.7k]
  ------------------
16492|   752k|        janet_mark_string(def->source);
16493|   789k|    if (def->name)
  ------------------
  |  Branch (16493:9): [True: 749k, False: 40.1k]
  ------------------
16494|   749k|        janet_mark_string(def->name);
16495|   789k|    if (def->symbolmap) {
  ------------------
  |  Branch (16495:9): [True: 586k, False: 203k]
  ------------------
16496|  21.5M|        for (int i = 0; i < def->symbolmap_length; i++) {
  ------------------
  |  Branch (16496:25): [True: 20.9M, False: 586k]
  ------------------
16497|  20.9M|            janet_mark_string(def->symbolmap[i].symbol);
16498|  20.9M|        }
16499|   586k|    }
16500|       |
16501|   789k|}
janet.c:janet_mark_fiber:
16519|  1.27k|static void janet_mark_fiber(JanetFiber *fiber) {
16520|  1.27k|    int32_t i, j;
16521|  1.27k|    JanetStackFrame *frame;
16522|  1.27k|recur:
16523|  1.27k|    if (janet_gc_reachable(fiber))
  ------------------
  |  |  638|  1.27k|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|  1.27k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|  1.27k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (638:31): [True: 66, False: 1.20k]
  |  |  ------------------
  ------------------
16524|     66|        return;
16525|  1.20k|    janet_gc_mark(fiber);
  ------------------
  |  |  637|  1.20k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|  1.20k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|  1.20k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16526|       |
16527|  1.20k|    janet_mark(fiber->last_value);
16528|       |
16529|       |    /* Mark values on the argument stack */
16530|  1.20k|    janet_mark_many(fiber->data + fiber->stackstart,
16531|  1.20k|                    fiber->stacktop - fiber->stackstart);
16532|       |
16533|  1.20k|    i = fiber->frame;
16534|  1.20k|    j = fiber->stackstart - JANET_FRAME_SIZE;
  ------------------
  |  | 1026|  1.20k|#define JANET_FRAME_SIZE 4
  ------------------
16535|  2.57k|    while (i > 0) {
  ------------------
  |  Branch (16535:12): [True: 1.37k, False: 1.20k]
  ------------------
16536|  1.37k|        frame = (JanetStackFrame *)(fiber->data + i - JANET_FRAME_SIZE);
  ------------------
  |  | 1026|  1.37k|#define JANET_FRAME_SIZE 4
  ------------------
16537|  1.37k|        if (NULL != frame->func)
  ------------------
  |  Branch (16537:13): [True: 1.28k, False: 90]
  ------------------
16538|  1.28k|            janet_mark_function(frame->func);
16539|  1.37k|        if (NULL != frame->env)
  ------------------
  |  Branch (16539:13): [True: 62, False: 1.30k]
  ------------------
16540|     62|            janet_mark_funcenv(frame->env);
16541|       |        /* Mark all values in the stack frame */
16542|  1.37k|        janet_mark_many(fiber->data + i, j - i);
16543|  1.37k|        j = i - JANET_FRAME_SIZE;
  ------------------
  |  | 1026|  1.37k|#define JANET_FRAME_SIZE 4
  ------------------
16544|  1.37k|        i = frame->prevframe;
16545|  1.37k|    }
16546|       |
16547|  1.20k|    if (fiber->env)
  ------------------
  |  Branch (16547:9): [True: 1.20k, False: 0]
  ------------------
16548|  1.20k|        janet_mark_table(fiber->env);
16549|       |
16550|  1.20k|#ifdef JANET_EV
16551|  1.20k|    if (fiber->supervisor_channel) {
  ------------------
  |  Branch (16551:9): [True: 0, False: 1.20k]
  ------------------
16552|      0|        janet_mark_abstract(fiber->supervisor_channel);
16553|      0|    }
16554|  1.20k|    if (fiber->ev_stream) {
  ------------------
  |  Branch (16554:9): [True: 0, False: 1.20k]
  ------------------
16555|      0|        janet_mark_abstract(fiber->ev_stream);
16556|      0|    }
16557|  1.20k|    if (fiber->ev_callback) {
  ------------------
  |  Branch (16557:9): [True: 0, False: 1.20k]
  ------------------
16558|      0|        fiber->ev_callback(fiber, JANET_ASYNC_EVENT_MARK);
16559|      0|    }
16560|  1.20k|#endif
16561|       |
16562|       |    /* Explicit tail recursion */
16563|  1.20k|    if (fiber->child) {
  ------------------
  |  Branch (16563:9): [True: 0, False: 1.20k]
  ------------------
16564|      0|        fiber = fiber->child;
16565|      0|        goto recur;
16566|      0|    }
16567|  1.20k|}
janet.c:janet_check_liveref:
16636|  3.67M|static int janet_check_liveref(Janet x) {
16637|  3.67M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  3.67M|    (isnan((x).number) \
  |  |  796|  3.67M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  3.67M|        : JANET_NUMBER)
  ------------------
  |  Branch (16637:13): [True: 3.67M, False: 0]
  ------------------
16638|  3.67M|        default:
  ------------------
  |  Branch (16638:9): [True: 3.67M, False: 0]
  ------------------
16639|  3.67M|            return 1;
16640|      0|        case JANET_ARRAY:
  ------------------
  |  Branch (16640:9): [True: 0, False: 3.67M]
  ------------------
16641|      0|        case JANET_TABLE:
  ------------------
  |  Branch (16641:9): [True: 0, False: 3.67M]
  ------------------
16642|      0|        case JANET_FUNCTION:
  ------------------
  |  Branch (16642:9): [True: 0, False: 3.67M]
  ------------------
16643|      0|        case JANET_BUFFER:
  ------------------
  |  Branch (16643:9): [True: 0, False: 3.67M]
  ------------------
16644|      0|        case JANET_FIBER:
  ------------------
  |  Branch (16644:9): [True: 0, False: 3.67M]
  ------------------
16645|      0|            return janet_gc_reachable(janet_unwrap_pointer(x));
  ------------------
  |  |  638|      0|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|      0|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|      0|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16646|      0|        case JANET_STRING:
  ------------------
  |  Branch (16646:9): [True: 0, False: 3.67M]
  ------------------
16647|      0|        case JANET_SYMBOL:
  ------------------
  |  Branch (16647:9): [True: 0, False: 3.67M]
  ------------------
16648|      0|        case JANET_KEYWORD:
  ------------------
  |  Branch (16648:9): [True: 0, False: 3.67M]
  ------------------
16649|      0|            return janet_gc_reachable(janet_string_head(janet_unwrap_string(x)));
  ------------------
  |  |  638|      0|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|      0|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|      0|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16650|      0|        case JANET_ABSTRACT:
  ------------------
  |  Branch (16650:9): [True: 0, False: 3.67M]
  ------------------
16651|      0|            return janet_gc_reachable(janet_abstract_head(janet_unwrap_abstract(x)));
  ------------------
  |  |  638|      0|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|      0|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|      0|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16652|      0|        case JANET_TUPLE:
  ------------------
  |  Branch (16652:9): [True: 0, False: 3.67M]
  ------------------
16653|      0|            return janet_gc_reachable(janet_tuple_head(janet_unwrap_tuple(x)));
  ------------------
  |  |  638|      0|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|      0|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|      0|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16654|      0|        case JANET_STRUCT:
  ------------------
  |  Branch (16654:9): [True: 0, False: 3.67M]
  ------------------
16655|      0|            return janet_gc_reachable(janet_struct_head(janet_unwrap_struct(x)));
  ------------------
  |  |  638|      0|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  628|      0|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  631|      0|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16656|  3.67M|    }
16657|  3.67M|}
janet.c:janet_deinit_block:
16570|   216M|static void janet_deinit_block(JanetGCObject *mem) {
16571|   216M|    switch (mem->flags & JANET_MEM_TYPEBITS) {
  ------------------
  |  |  630|   216M|#define JANET_MEM_TYPEBITS 0xFF
  ------------------
16572|  81.1M|        default:
  ------------------
  |  Branch (16572:9): [True: 81.1M, False: 135M]
  ------------------
16573|   164M|        case JANET_MEMORY_FUNCTION:
  ------------------
  |  Branch (16573:9): [True: 83.5M, False: 132M]
  ------------------
16574|   164M|            break; /* Do nothing for non gc types */
16575|  16.8M|        case JANET_MEMORY_SYMBOL:
  ------------------
  |  Branch (16575:9): [True: 16.8M, False: 199M]
  ------------------
16576|  16.8M|            janet_symbol_deinit(((JanetStringHead *) mem)->data);
16577|  16.8M|            break;
16578|  12.0M|        case JANET_MEMORY_ARRAY:
  ------------------
  |  Branch (16578:9): [True: 12.0M, False: 204M]
  ------------------
16579|  12.0M|        case JANET_MEMORY_ARRAY_WEAK:
  ------------------
  |  Branch (16579:9): [True: 7, False: 216M]
  ------------------
16580|  12.0M|            janet_free(((JanetArray *) mem)->data);
  ------------------
  |  | 2415|  12.0M|#define janet_free(X) free((X))
  ------------------
16581|  12.0M|            break;
16582|  5.74M|        case JANET_MEMORY_TABLE:
  ------------------
  |  Branch (16582:9): [True: 5.74M, False: 210M]
  ------------------
16583|  5.74M|        case JANET_MEMORY_TABLE_WEAKK:
  ------------------
  |  Branch (16583:9): [True: 0, False: 216M]
  ------------------
16584|  5.74M|        case JANET_MEMORY_TABLE_WEAKV:
  ------------------
  |  Branch (16584:9): [True: 0, False: 216M]
  ------------------
16585|  5.74M|        case JANET_MEMORY_TABLE_WEAKKV:
  ------------------
  |  Branch (16585:9): [True: 0, False: 216M]
  ------------------
16586|  5.74M|            janet_free(((JanetTable *) mem)->data);
  ------------------
  |  | 2415|  5.74M|#define janet_free(X) free((X))
  ------------------
16587|  5.74M|            break;
16588|   384k|        case JANET_MEMORY_FIBER: {
  ------------------
  |  Branch (16588:9): [True: 384k, False: 216M]
  ------------------
16589|   384k|            JanetFiber *f = (JanetFiber *)mem;
16590|   384k|#ifdef JANET_EV
16591|   384k|            if (f->ev_state && !(f->flags & JANET_FIBER_EV_FLAG_IN_FLIGHT)) {
  ------------------
  |  |  802|      0|#define JANET_FIBER_EV_FLAG_IN_FLIGHT 0x1
  ------------------
  |  Branch (16591:17): [True: 0, False: 384k]
  |  Branch (16591:32): [True: 0, False: 0]
  ------------------
16592|      0|                janet_ev_dec_refcount();
16593|      0|                janet_free(f->ev_state);
  ------------------
  |  | 2415|      0|#define janet_free(X) free((X))
  ------------------
16594|   384k|            } else if (f->gc.flags & JANET_FIBER_EV_GCFLAG_SUSPENDED) {
  ------------------
  |  |  798|   384k|#define JANET_FIBER_EV_GCFLAG_SUSPENDED 0x2000000
  ------------------
  |  Branch (16594:24): [True: 0, False: 384k]
  ------------------
16595|      0|                janet_ev_dec_refcount();
16596|      0|            }
16597|   384k|#endif
16598|   384k|            janet_free(f->data);
  ------------------
  |  | 2415|   384k|#define janet_free(X) free((X))
  ------------------
16599|   384k|        }
16600|   384k|        break;
16601|  1.23M|        case JANET_MEMORY_BUFFER:
  ------------------
  |  Branch (16601:9): [True: 1.23M, False: 215M]
  ------------------
16602|  1.23M|            janet_buffer_deinit((JanetBuffer *) mem);
16603|  1.23M|            break;
16604|   152k|        case JANET_MEMORY_ABSTRACT: {
  ------------------
  |  Branch (16604:9): [True: 152k, False: 216M]
  ------------------
16605|   152k|            JanetAbstractHead *head = (JanetAbstractHead *)mem;
16606|   152k|            if (head->type->gcperthread) {
  ------------------
  |  Branch (16606:17): [True: 1.54k, False: 150k]
  ------------------
16607|  1.54k|                janet_assert(!head->type->gcperthread(head->data, head->size), "per-thread finalizer failed");
  ------------------
  |  |  389|  1.54k|#define janet_assert(c, m) do { \
  |  |  390|  1.54k|    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.54k]
  |  |  ------------------
  |  |  391|  1.54k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 1.54k]
  |  |  ------------------
  ------------------
16608|  1.54k|            }
16609|   152k|            if (head->type->gc) {
  ------------------
  |  Branch (16609:17): [True: 133k, False: 19.2k]
  ------------------
16610|   133k|                janet_assert(!head->type->gc(head->data, head->size), "finalizer failed");
  ------------------
  |  |  389|   133k|#define janet_assert(c, m) do { \
  |  |  390|   133k|    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: 133k]
  |  |  ------------------
  |  |  391|   133k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 133k]
  |  |  ------------------
  ------------------
16611|   133k|            }
16612|   152k|        }
16613|   152k|        break;
16614|  10.6M|        case JANET_MEMORY_FUNCENV: {
  ------------------
  |  Branch (16614:9): [True: 10.6M, False: 205M]
  ------------------
16615|  10.6M|            JanetFuncEnv *env = (JanetFuncEnv *)mem;
16616|  10.6M|            if (0 == env->offset)
  ------------------
  |  Branch (16616:17): [True: 10.5M, False: 19.2k]
  ------------------
16617|  10.5M|                janet_free(env->as.values);
  ------------------
  |  | 2415|  10.5M|#define janet_free(X) free((X))
  ------------------
16618|  10.6M|        }
16619|  10.6M|        break;
16620|  4.78M|        case JANET_MEMORY_FUNCDEF: {
  ------------------
  |  Branch (16620:9): [True: 4.78M, False: 211M]
  ------------------
16621|  4.78M|            JanetFuncDef *def = (JanetFuncDef *)mem;
16622|       |            /* TODO - get this all with one alloc and one free */
16623|  4.78M|            janet_free(def->defs);
  ------------------
  |  | 2415|  4.78M|#define janet_free(X) free((X))
  ------------------
16624|  4.78M|            janet_free(def->environments);
  ------------------
  |  | 2415|  4.78M|#define janet_free(X) free((X))
  ------------------
16625|  4.78M|            janet_free(def->constants);
  ------------------
  |  | 2415|  4.78M|#define janet_free(X) free((X))
  ------------------
16626|  4.78M|            janet_free(def->bytecode);
  ------------------
  |  | 2415|  4.78M|#define janet_free(X) free((X))
  ------------------
16627|  4.78M|            janet_free(def->sourcemap);
  ------------------
  |  | 2415|  4.78M|#define janet_free(X) free((X))
  ------------------
16628|  4.78M|            janet_free(def->closure_bitset);
  ------------------
  |  | 2415|  4.78M|#define janet_free(X) free((X))
  ------------------
16629|  4.78M|            janet_free(def->symbolmap);
  ------------------
  |  | 2415|  4.78M|#define janet_free(X) free((X))
  ------------------
16630|  4.78M|        }
16631|  4.78M|        break;
16632|   216M|    }
16633|   216M|}
janet.c:janet_free_all_scratch:
16820|  8.75k|static void janet_free_all_scratch(void) {
16821|   104k|    for (size_t i = 0; i < janet_vm.scratch_len; i++) {
  ------------------
  |  Branch (16821:24): [True: 96.1k, False: 8.75k]
  ------------------
16822|  96.1k|        free_one_scratch(janet_vm.scratch_mem[i]);
16823|  96.1k|    }
16824|  8.75k|    janet_vm.scratch_len = 0;
16825|  8.75k|}
janet.c:janet_gc_idequals:
16883|  50.8k|static int janet_gc_idequals(Janet lhs, Janet rhs) {
16884|  50.8k|    if (janet_type(lhs) != janet_type(rhs))
  ------------------
  |  |  795|  50.8k|    (isnan((x).number) \
  |  |  796|  50.8k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  50.8k|        : JANET_NUMBER)
  ------------------
                  if (janet_type(lhs) != janet_type(rhs))
  ------------------
  |  |  795|  50.8k|    (isnan((x).number) \
  |  |  796|  50.8k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  50.8k|        : JANET_NUMBER)
  ------------------
  |  Branch (16884:9): [True: 50.8k, False: 0]
  |  Branch (16884:9): [True: 36.3k, False: 14.4k]
  |  Branch (16884:28): [True: 50.8k, False: 0]
  ------------------
16885|  36.3k|        return 0;
16886|  14.4k|    switch (janet_type(lhs)) {
  ------------------
  |  |  795|  14.4k|    (isnan((x).number) \
  |  |  796|  14.4k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  14.4k|        : JANET_NUMBER)
  ------------------
  |  Branch (16886:13): [True: 14.4k, False: 0]
  ------------------
16887|      0|        case JANET_BOOLEAN:
  ------------------
  |  Branch (16887:9): [True: 0, False: 14.4k]
  ------------------
16888|      0|        case JANET_NIL:
  ------------------
  |  Branch (16888:9): [True: 0, False: 14.4k]
  ------------------
16889|      0|        case JANET_NUMBER:
  ------------------
  |  Branch (16889:9): [True: 0, False: 14.4k]
  ------------------
16890|       |            /* These values don't really matter to the gc so returning 1 all the time is fine. */
16891|      0|            return 1;
16892|  14.4k|        default:
  ------------------
  |  Branch (16892:9): [True: 14.4k, False: 0]
  ------------------
16893|  14.4k|            return janet_unwrap_pointer(lhs) == janet_unwrap_pointer(rhs);
  ------------------
  |  |  867|  14.4k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
                          return janet_unwrap_pointer(lhs) == janet_unwrap_pointer(rhs);
  ------------------
  |  |  867|  14.4k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
16894|  14.4k|    }
16895|  14.4k|}
janet.c:janet_mem2scratch:
16827|  6.12M|static JanetScratch *janet_mem2scratch(void *mem) {
16828|  6.12M|    JanetScratch *s = (JanetScratch *)mem;
16829|  6.12M|    return s - 1;
16830|  6.12M|}
janet.c:free_one_scratch:
16812|  3.09M|static void free_one_scratch(JanetScratch *s) {
16813|  3.09M|    if (NULL != s->finalize) {
  ------------------
  |  Branch (16813:9): [True: 0, False: 3.09M]
  ------------------
16814|      0|        s->finalize((char *) s->mem);
16815|      0|    }
16816|  3.09M|    janet_free(s);
  ------------------
  |  | 2415|  3.09M|#define janet_free(X) free((X))
  ------------------
16817|  3.09M|}
janet.c:int64_marshal:
17100|     16|static void int64_marshal(void *p, JanetMarshalContext *ctx) {
17101|     16|    janet_marshal_abstract(ctx, p);
17102|     16|    janet_marshal_int64(ctx, *((int64_t *)p));
17103|     16|}
janet.c:int64_unmarshal:
17105|     15|static void *int64_unmarshal(JanetMarshalContext *ctx) {
17106|     15|    int64_t *p = janet_unmarshal_abstract(ctx, sizeof(int64_t));
17107|     15|    p[0] = janet_unmarshal_int64(ctx);
17108|     15|    return p;
17109|     15|}
janet.c:it_s64_tostring:
17111|     92|static void it_s64_tostring(void *p, JanetBuffer *buffer) {
17112|     92|    char str[32];
17113|       |    snprintf(str, sizeof(str), "%" PRId64, *((int64_t *)p));
17114|     92|    janet_buffer_push_cstring(buffer, str);
17115|     92|}
janet.c:janet_int64_compare:
17088|    902|static int janet_int64_compare(void *p1, void *p2) {
17089|    902|    int64_t x = *((int64_t *)p1);
17090|    902|    int64_t y = *((int64_t *)p2);
17091|    902|    return x == y ? 0 : x < y ? -1 : 1;
  ------------------
  |  Branch (17091:12): [True: 338, False: 564]
  |  Branch (17091:25): [True: 215, False: 349]
  ------------------
17092|    902|}
janet.c:janet_int64_hash:
17082|  10.9k|static int32_t janet_int64_hash(void *p1, size_t size) {
17083|  10.9k|    (void) size;
17084|  10.9k|    int32_t *words = p1;
17085|  10.9k|    return words[0] ^ words[1];
17086|  10.9k|}
janet.c:it_u64_tostring:
17117|    137|static void it_u64_tostring(void *p, JanetBuffer *buffer) {
17118|    137|    char str[32];
17119|       |    snprintf(str, sizeof(str), "%" PRIu64, *((uint64_t *)p));
17120|    137|    janet_buffer_push_cstring(buffer, str);
17121|    137|}
janet.c:janet_uint64_compare:
17094|  1.62k|static int janet_uint64_compare(void *p1, void *p2) {
17095|  1.62k|    uint64_t x = *((uint64_t *)p1);
17096|  1.62k|    uint64_t y = *((uint64_t *)p2);
17097|  1.62k|    return x == y ? 0 : x < y ? -1 : 1;
  ------------------
  |  Branch (17097:12): [True: 711, False: 917]
  |  Branch (17097:25): [True: 251, False: 666]
  ------------------
17098|  1.62k|}
janet.c:cfun_it_s64_add:
17456|     88|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17457|     88|    janet_arity(argc, 2, -1); \
17458|     88|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17459|     88|    *box = janet_unwrap_##type(argv[0]); \
17460|    175|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17460:25): [True: 87, False: 88]
  ------------------
17461|     88|        /* This avoids undefined behavior. See above for why. */ \
17462|     88|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17463|     88|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|     88|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|     88|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     88|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     88|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17464|     88|} \
janet.c:cfun_it_s64_sub:
17456|  9.05k|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17457|  9.05k|    janet_arity(argc, 2, -1); \
17458|  9.05k|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17459|  9.05k|    *box = janet_unwrap_##type(argv[0]); \
17460|  23.9k|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17460:25): [True: 14.8k, False: 9.05k]
  ------------------
17461|  9.05k|        /* This avoids undefined behavior. See above for why. */ \
17462|  14.8k|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17463|  9.05k|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|  9.05k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  9.05k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  9.05k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  9.05k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17464|  9.05k|} \
janet.c:cfun_it_s64_subi:
17467|      1|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name##i(int32_t argc, Janet *argv) { \
17468|      1|    janet_fixarity(argc, 2); \
17469|      1|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17470|      1|    *box = janet_unwrap_##type(argv[1]); \
17471|      1|    /* This avoids undefined behavior. See above for why. */ \
17472|      1|    *box = (T) ((uint64_t) *box) oper ((uint64_t) janet_unwrap_##type(argv[0])); \
17473|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17474|      1|} \
janet.c:cfun_it_s64_mul:
17456|     27|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17457|     27|    janet_arity(argc, 2, -1); \
17458|     27|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17459|     27|    *box = janet_unwrap_##type(argv[0]); \
17460|     94|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17460:25): [True: 67, False: 27]
  ------------------
17461|     27|        /* This avoids undefined behavior. See above for why. */ \
17462|     67|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17463|     27|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|     27|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|     27|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     27|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     27|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17464|     27|} \
janet.c:cfun_it_s64_mod:
17561|     94|static JANET_CFUNCTION_ALIGN Janet cfun_it_s64_mod(int32_t argc, Janet *argv) {
17562|     94|    janet_fixarity(argc, 2);
17563|     94|    int64_t *box = janet_abstract(&janet_s64_type, sizeof(int64_t));
17564|     94|    int64_t op1 = janet_unwrap_s64(argv[0]);
17565|     94|    int64_t op2 = janet_unwrap_s64(argv[1]);
17566|     94|    if (op2 == 0) {
  ------------------
  |  Branch (17566:9): [True: 31, False: 63]
  ------------------
17567|     31|        *box = op1;
17568|     63|    } else {
17569|     63|        int64_t x = op1 % op2;
17570|     63|        *box = (((op1 ^ op2) < 0) && (x != 0)) ? x + op2 : x;
  ------------------
  |  Branch (17570:17): [True: 11, False: 52]
  |  Branch (17570:38): [True: 8, False: 3]
  ------------------
17571|     63|    }
17572|     94|    return janet_wrap_abstract(box);
  ------------------
  |  |  851|     94|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|     94|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     94|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     94|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17573|     94|}
janet.c:cfun_it_s64_modi:
17575|      5|static JANET_CFUNCTION_ALIGN Janet cfun_it_s64_modi(int32_t argc, Janet *argv) {
17576|      5|    janet_fixarity(argc, 2);
17577|      5|    int64_t *box = janet_abstract(&janet_s64_type, sizeof(int64_t));
17578|      5|    int64_t op2 = janet_unwrap_s64(argv[0]);
17579|      5|    int64_t op1 = janet_unwrap_s64(argv[1]);
17580|      5|    if (op2 == 0) {
  ------------------
  |  Branch (17580:9): [True: 1, False: 4]
  ------------------
17581|      1|        *box = op1;
17582|      4|    } else {
17583|      4|        int64_t x = op1 % op2;
17584|      4|        *box = (((op1 ^ op2) < 0) && (x != 0)) ? x + op2 : x;
  ------------------
  |  Branch (17584:17): [True: 2, False: 2]
  |  Branch (17584:38): [True: 2, False: 0]
  ------------------
17585|      4|    }
17586|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17587|      5|}
janet.c:cfun_it_s64_and:
17456|     14|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17457|     14|    janet_arity(argc, 2, -1); \
17458|     14|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17459|     14|    *box = janet_unwrap_##type(argv[0]); \
17460|     31|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17460:25): [True: 17, False: 14]
  ------------------
17461|     14|        /* This avoids undefined behavior. See above for why. */ \
17462|     17|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17463|     14|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|     14|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|     14|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     14|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     14|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17464|     14|} \
janet.c:cfun_it_s64_or:
17456|     15|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17457|     15|    janet_arity(argc, 2, -1); \
17458|     15|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17459|     15|    *box = janet_unwrap_##type(argv[0]); \
17460|     30|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17460:25): [True: 15, False: 15]
  ------------------
17461|     15|        /* This avoids undefined behavior. See above for why. */ \
17462|     15|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17463|     15|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|     15|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|     15|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     15|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     15|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17464|     15|} \
janet.c:cfun_it_s64_xor:
17456|     16|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17457|     16|    janet_arity(argc, 2, -1); \
17458|     16|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17459|     16|    *box = janet_unwrap_##type(argv[0]); \
17460|     77|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17460:25): [True: 61, False: 16]
  ------------------
17461|     16|        /* This avoids undefined behavior. See above for why. */ \
17462|     61|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17463|     16|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|     16|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|     16|    janet_nanbox_from_pointer((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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17464|     16|} \
janet.c:cfun_it_s64_rshift:
17456|      2|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17457|      2|    janet_arity(argc, 2, -1); \
17458|      2|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17459|      2|    *box = janet_unwrap_##type(argv[0]); \
17460|      4|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17460:25): [True: 2, False: 2]
  ------------------
17461|      2|        /* This avoids undefined behavior. See above for why. */ \
17462|      2|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17463|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17464|      2|} \
janet.c:cfun_it_s64_compare:
17373|      1|static JANET_CFUNCTION_ALIGN Janet cfun_it_s64_compare(int32_t argc, Janet *argv) {
17374|      1|    janet_fixarity(argc, 2);
17375|      1|    if (janet_is_int(argv[0]) != JANET_INT_S64) {
  ------------------
  |  Branch (17375:9): [True: 0, False: 1]
  ------------------
17376|      0|        janet_panic("compare method requires int/s64 as first argument");
17377|      0|    }
17378|      1|    int64_t x = janet_unwrap_s64(argv[0]);
17379|      1|    switch (janet_type(argv[1])) {
  ------------------
  |  |  795|      1|    (isnan((x).number) \
  |  |  796|      1|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|      1|        : JANET_NUMBER)
  ------------------
  |  Branch (17379:13): [True: 1, False: 0]
  ------------------
17380|      1|        default:
  ------------------
  |  Branch (17380:9): [True: 1, False: 0]
  ------------------
17381|      1|            break;
17382|      1|        case JANET_NUMBER : {
  ------------------
  |  Branch (17382:9): [True: 0, False: 1]
  ------------------
17383|      0|            double y = janet_unwrap_number(argv[1]);
  ------------------
  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  ------------------
17384|      0|            return janet_wrap_number(compare_int64_double(x, y));
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
17385|      0|        }
17386|      0|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (17386:9): [True: 0, False: 1]
  ------------------
17387|      0|            void *abst = janet_unwrap_abstract(argv[1]);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
17388|      0|            if (janet_abstract_type(abst) == &janet_s64_type) {
  ------------------
  |  | 1898|      0|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (17388:17): [True: 0, False: 0]
  ------------------
17389|      0|                int64_t y = *(int64_t *)abst;
17390|      0|                return janet_wrap_number((x < y) ? -1 : (x > y ? 1 : 0));
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |  |  Branch (835:55): [True: 0, False: 0]
  |  |  |  Branch (835:55): [True: 0, False: 0]
  |  |  ------------------
  ------------------
17391|      0|            } else if (janet_abstract_type(abst) == &janet_u64_type) {
  ------------------
  |  | 1898|      0|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (17391:24): [True: 0, False: 0]
  ------------------
17392|      0|                uint64_t y = *(uint64_t *)abst;
17393|      0|                if (x < 0) {
  ------------------
  |  Branch (17393:21): [True: 0, False: 0]
  ------------------
17394|      0|                    return janet_wrap_number(-1);
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
17395|      0|                } else if (y > INT64_MAX) {
  ------------------
  |  Branch (17395:28): [True: 0, False: 0]
  ------------------
17396|      0|                    return janet_wrap_number(-1);
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
17397|      0|                } else {
17398|      0|                    int64_t y2 = (int64_t) y;
17399|      0|                    return janet_wrap_number((x < y2) ? -1 : (x > y2 ? 1 : 0));
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |  |  Branch (835:55): [True: 0, False: 0]
  |  |  |  Branch (835:55): [True: 0, False: 0]
  |  |  ------------------
  ------------------
17400|      0|                }
17401|      0|            }
17402|      0|            break;
17403|      0|        }
17404|      1|    }
17405|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17406|      1|}
janet.c:janet_uint64_next:
17686|  1.70k|static Janet janet_uint64_next(void *p, Janet key) {
17687|  1.70k|    (void) p;
17688|  1.70k|    return janet_nextmethod(it_u64_methods, key);
17689|  1.70k|}
janet.c:cfun_it_u64_add:
17456|     40|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17457|     40|    janet_arity(argc, 2, -1); \
17458|     40|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17459|     40|    *box = janet_unwrap_##type(argv[0]); \
17460|     83|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17460:25): [True: 43, False: 40]
  ------------------
17461|     40|        /* This avoids undefined behavior. See above for why. */ \
17462|     43|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17463|     40|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|     40|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|     40|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     40|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     40|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17464|     40|} \
janet.c:cfun_it_u64_sub:
17456|    263|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17457|    263|    janet_arity(argc, 2, -1); \
17458|    263|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17459|    263|    *box = janet_unwrap_##type(argv[0]); \
17460|    530|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17460:25): [True: 267, False: 263]
  ------------------
17461|    263|        /* This avoids undefined behavior. See above for why. */ \
17462|    267|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17463|    263|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|    263|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|    263|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    263|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    263|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17464|    263|} \
janet.c:cfun_it_u64_subi:
17467|     18|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name##i(int32_t argc, Janet *argv) { \
17468|     18|    janet_fixarity(argc, 2); \
17469|     18|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17470|     18|    *box = janet_unwrap_##type(argv[1]); \
17471|     18|    /* This avoids undefined behavior. See above for why. */ \
17472|     18|    *box = (T) ((uint64_t) *box) oper ((uint64_t) janet_unwrap_##type(argv[0])); \
17473|     18|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|     18|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17474|     18|} \
janet.c:cfun_it_u64_mul:
17456|     22|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17457|     22|    janet_arity(argc, 2, -1); \
17458|     22|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17459|     22|    *box = janet_unwrap_##type(argv[0]); \
17460|     72|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17460:25): [True: 50, False: 22]
  ------------------
17461|     22|        /* This avoids undefined behavior. See above for why. */ \
17462|     50|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17463|     22|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|     22|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|     22|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     22|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     22|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17464|     22|} \
janet.c:cfun_it_u64_div:
17490|     63|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17491|     63|    janet_arity(argc, 2, -1);                       \
17492|     63|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17493|     63|    *box = janet_unwrap_##type(argv[0]); \
17494|    128|    for (int32_t i = 1; i < argc; i++) { \
  ------------------
  |  Branch (17494:25): [True: 69, False: 59]
  ------------------
17495|     69|      T value = janet_unwrap_##type(argv[i]); \
17496|     69|      if (value == 0) DIVZERO(name); \
  ------------------
  |  |17484|      4|#define DIVZERO(name) DIVZERO_##name
  |  |  ------------------
  |  |  |  |17485|      4|#define DIVZERO_div janet_panic("division by zero")
  |  |  ------------------
  ------------------
  |  Branch (17496:11): [True: 4, False: 65]
  ------------------
17497|     69|      *box oper##= value; \
17498|     65|    } \
17499|     63|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|     59|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|     59|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     59|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     59|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17500|     63|} \
janet.c:cfun_it_u64_mod:
17490|     18|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17491|     18|    janet_arity(argc, 2, -1);                       \
17492|     18|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17493|     18|    *box = janet_unwrap_##type(argv[0]); \
17494|     36|    for (int32_t i = 1; i < argc; i++) { \
  ------------------
  |  Branch (17494:25): [True: 18, False: 18]
  ------------------
17495|     18|      T value = janet_unwrap_##type(argv[i]); \
17496|     18|      if (value == 0) DIVZERO(name); \
  ------------------
  |  |17484|      0|#define DIVZERO(name) DIVZERO_##name
  |  |  ------------------
  |  |  |  |17487|      0|#define DIVZERO_mod return janet_wrap_abstract(box)
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (17496:11): [True: 0, False: 18]
  ------------------
17497|     18|      *box oper##= value; \
17498|     18|    } \
17499|     18|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|     18|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17500|     18|} \
janet.c:cfun_it_u64_modi:
17503|      3|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name##i(int32_t argc, Janet *argv) { \
17504|      3|    janet_fixarity(argc, 2);                       \
17505|      3|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17506|      3|    *box = janet_unwrap_##type(argv[1]); \
17507|      3|    T value = janet_unwrap_##type(argv[0]); \
17508|      3|    if (value == 0) DIVZERO(name); \
  ------------------
  |  |17484|      0|#define DIVZERO(name) DIVZERO_##name
  |  |  ------------------
  |  |  |  |17487|      0|#define DIVZERO_mod return janet_wrap_abstract(box)
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (17508:9): [True: 0, False: 3]
  ------------------
17509|      3|    *box oper##= value; \
17510|      3|    return janet_wrap_abstract(box); \
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17511|      3|} \
janet.c:cfun_it_u64_rem:
17490|    206|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17491|    206|    janet_arity(argc, 2, -1);                       \
17492|    206|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17493|    206|    *box = janet_unwrap_##type(argv[0]); \
17494|    420|    for (int32_t i = 1; i < argc; i++) { \
  ------------------
  |  Branch (17494:25): [True: 215, False: 205]
  ------------------
17495|    215|      T value = janet_unwrap_##type(argv[i]); \
17496|    215|      if (value == 0) DIVZERO(name); \
  ------------------
  |  |17484|      1|#define DIVZERO(name) DIVZERO_##name
  |  |  ------------------
  |  |  |  |17486|      1|#define DIVZERO_rem janet_panic("division by zero")
  |  |  ------------------
  ------------------
  |  Branch (17496:11): [True: 1, False: 214]
  ------------------
17497|    215|      *box oper##= value; \
17498|    214|    } \
17499|    206|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|    205|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|    205|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    205|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    205|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17500|    206|} \
janet.c:cfun_it_u64_remi:
17503|     17|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name##i(int32_t argc, Janet *argv) { \
17504|     17|    janet_fixarity(argc, 2);                       \
17505|     17|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17506|     17|    *box = janet_unwrap_##type(argv[1]); \
17507|     17|    T value = janet_unwrap_##type(argv[0]); \
17508|     17|    if (value == 0) DIVZERO(name); \
  ------------------
  |  |17484|      1|#define DIVZERO(name) DIVZERO_##name
  |  |  ------------------
  |  |  |  |17486|      1|#define DIVZERO_rem janet_panic("division by zero")
  |  |  ------------------
  ------------------
  |  Branch (17508:9): [True: 1, False: 16]
  ------------------
17509|     17|    *box oper##= value; \
17510|     16|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|     16|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|     16|    janet_nanbox_from_pointer((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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17511|     17|} \
janet.c:cfun_it_u64_and:
17456|     14|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17457|     14|    janet_arity(argc, 2, -1); \
17458|     14|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17459|     14|    *box = janet_unwrap_##type(argv[0]); \
17460|     41|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17460:25): [True: 27, False: 14]
  ------------------
17461|     14|        /* This avoids undefined behavior. See above for why. */ \
17462|     27|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17463|     14|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|     14|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|     14|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     14|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     14|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17464|     14|} \
janet.c:cfun_it_u64_or:
17456|    105|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17457|    105|    janet_arity(argc, 2, -1); \
17458|    105|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17459|    105|    *box = janet_unwrap_##type(argv[0]); \
17460|    210|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17460:25): [True: 105, False: 105]
  ------------------
17461|    105|        /* This avoids undefined behavior. See above for why. */ \
17462|    105|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17463|    105|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|    105|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|    105|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    105|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    105|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17464|    105|} \
janet.c:cfun_it_u64_xor:
17456|  1.50k|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17457|  1.50k|    janet_arity(argc, 2, -1); \
17458|  1.50k|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17459|  1.50k|    *box = janet_unwrap_##type(argv[0]); \
17460|  6.03k|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17460:25): [True: 4.52k, False: 1.50k]
  ------------------
17461|  1.50k|        /* This avoids undefined behavior. See above for why. */ \
17462|  4.52k|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17463|  1.50k|    return janet_wrap_abstract(box); \
  ------------------
  |  |  851|  1.50k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  825|  1.50k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.50k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.50k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17464|  1.50k|} \
janet.c:it_s64_get:
17691|  9.57k|static int it_s64_get(void *p, Janet key, Janet *out) {
17692|  9.57k|    (void) p;
17693|  9.57k|    if (!janet_checktype(key, JANET_KEYWORD))
  ------------------
  |  |  806|  9.57k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 9.57k]
  |  |  ------------------
  |  |  807|  9.57k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.57k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  9.57k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  9.57k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (17693:9): [True: 4, False: 9.57k]
  ------------------
17694|      4|        return 0;
17695|  9.57k|    return janet_getmethod(janet_unwrap_keyword(key), it_s64_methods, out);
  ------------------
  |  |  865|  9.57k|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
17696|  9.57k|}
janet.c:it_u64_get:
17698|  3.91k|static int it_u64_get(void *p, Janet key, Janet *out) {
17699|  3.91k|    (void) p;
17700|  3.91k|    if (!janet_checktype(key, JANET_KEYWORD))
  ------------------
  |  |  806|  3.91k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 3.91k]
  |  |  ------------------
  |  |  807|  3.91k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.91k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  3.91k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  3.91k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.91k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.91k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (17700:9): [True: 10, False: 3.90k]
  ------------------
17701|     10|        return 0;
17702|  3.90k|    return janet_getmethod(janet_unwrap_keyword(key), it_u64_methods, out);
  ------------------
  |  |  865|  3.90k|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
17703|  3.91k|}
janet.c:checkflags:
17791|      5|static int32_t checkflags(const uint8_t *str) {
17792|      5|    int32_t flags = 0;
17793|      5|    int32_t i;
17794|      5|    int32_t len = janet_string_length(str);
  ------------------
  |  | 1812|      5|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|      5|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
17795|      5|    if (!len || len > 10)
  ------------------
  |  Branch (17795:9): [True: 0, False: 5]
  |  Branch (17795:17): [True: 1, False: 4]
  ------------------
17796|      1|        janet_panic("file mode must have a length between 1 and 10");
17797|      4|    switch (*str) {
17798|      0|        default:
  ------------------
  |  Branch (17798:9): [True: 0, False: 4]
  ------------------
17799|      0|            janet_panicf("invalid flag %c, expected w, a, or r", *str);
17800|      0|            break;
17801|      3|        case 'w':
  ------------------
  |  Branch (17801:9): [True: 3, False: 1]
  ------------------
17802|      3|            flags |= JANET_FILE_WRITE;
  ------------------
  |  | 2274|      3|#define JANET_FILE_WRITE 1
  ------------------
17803|      3|            janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2027|      3|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
17804|      3|            break;
17805|      0|        case 'a':
  ------------------
  |  Branch (17805:9): [True: 0, False: 4]
  ------------------
17806|      0|            flags |= JANET_FILE_APPEND;
  ------------------
  |  | 2276|      0|#define JANET_FILE_APPEND 4
  ------------------
17807|      0|            janet_sandbox_assert(JANET_SANDBOX_FS);
  ------------------
  |  | 2038|      0|#define JANET_SANDBOX_FS (JANET_SANDBOX_FS_WRITE | JANET_SANDBOX_FS_READ | JANET_SANDBOX_FS_TEMP)
  |  |  ------------------
  |  |  |  | 2027|      0|#define JANET_SANDBOX_FS_WRITE 32
  |  |  ------------------
  |  |               #define JANET_SANDBOX_FS (JANET_SANDBOX_FS_WRITE | JANET_SANDBOX_FS_READ | JANET_SANDBOX_FS_TEMP)
  |  |  ------------------
  |  |  |  | 2028|      0|#define JANET_SANDBOX_FS_READ 64
  |  |  ------------------
  |  |               #define JANET_SANDBOX_FS (JANET_SANDBOX_FS_WRITE | JANET_SANDBOX_FS_READ | JANET_SANDBOX_FS_TEMP)
  |  |  ------------------
  |  |  |  | 2032|      0|#define JANET_SANDBOX_FS_TEMP 1024
  |  |  ------------------
  ------------------
17808|      0|            break;
17809|      1|        case 'r':
  ------------------
  |  Branch (17809:9): [True: 1, False: 3]
  ------------------
17810|      1|            flags |= JANET_FILE_READ;
  ------------------
  |  | 2275|      1|#define JANET_FILE_READ 2
  ------------------
17811|      1|            janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2028|      1|#define JANET_SANDBOX_FS_READ 64
  ------------------
17812|      1|            break;
17813|      4|    }
17814|      8|    for (i = 1; i < len; i++) {
  ------------------
  |  Branch (17814:17): [True: 6, False: 2]
  ------------------
17815|      6|        switch (str[i]) {
17816|      1|            default:
  ------------------
  |  Branch (17816:13): [True: 1, False: 5]
  ------------------
17817|      1|                janet_panicf("invalid flag %c, expected +, b, or n", str[i]);
17818|      0|                break;
17819|      0|            case '+':
  ------------------
  |  Branch (17819:13): [True: 0, False: 6]
  ------------------
17820|      0|                if (flags & JANET_FILE_UPDATE) return -1;
  ------------------
  |  | 2277|      0|#define JANET_FILE_UPDATE 8
  ------------------
  |  Branch (17820:21): [True: 0, False: 0]
  ------------------
17821|      0|                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2027|      0|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
17822|      0|                flags |= JANET_FILE_UPDATE;
  ------------------
  |  | 2277|      0|#define JANET_FILE_UPDATE 8
  ------------------
17823|      0|                break;
17824|      2|            case 'b':
  ------------------
  |  Branch (17824:13): [True: 2, False: 4]
  ------------------
17825|      2|                if (flags & JANET_FILE_BINARY) return -1;
  ------------------
  |  | 2280|      2|#define JANET_FILE_BINARY 64
  ------------------
  |  Branch (17825:21): [True: 0, False: 2]
  ------------------
17826|      2|                flags |= JANET_FILE_BINARY;
  ------------------
  |  | 2280|      2|#define JANET_FILE_BINARY 64
  ------------------
17827|      2|                break;
17828|      3|            case 'n':
  ------------------
  |  Branch (17828:13): [True: 3, False: 3]
  ------------------
17829|      3|                if (flags & JANET_FILE_NONIL) return -1;
  ------------------
  |  | 2282|      3|#define JANET_FILE_NONIL 512
  ------------------
  |  Branch (17829:21): [True: 1, False: 2]
  ------------------
17830|      2|                flags |= JANET_FILE_NONIL;
  ------------------
  |  | 2282|      2|#define JANET_FILE_NONIL 512
  ------------------
17831|      2|                break;
17832|      6|        }
17833|      6|    }
17834|      2|    return flags;
17835|      4|}
janet.c:makef:
17837|  21.4k|static void *makef(FILE *f, int32_t flags, size_t bufsize) {
17838|  21.4k|    JanetFile *iof = (JanetFile *) janet_abstract(&janet_file_type, sizeof(JanetFile));
17839|  21.4k|    iof->file = f;
17840|  21.4k|    iof->flags = flags;
17841|  21.4k|    iof->vbufsize = bufsize;
17842|  21.4k|#if !(defined(JANET_WINDOWS) || defined(JANET_PLAN9))
17843|       |    /* While we would like fopen to set cloexec by default (like O_CLOEXEC) with the e flag, that is
17844|       |     * not standard. */
17845|  21.4k|    if (!(flags & JANET_FILE_NOT_CLOSEABLE))
  ------------------
  |  | 2278|  21.4k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
  |  Branch (17845:9): [True: 3, False: 21.4k]
  ------------------
17846|      3|        fcntl(fileno(f), F_SETFD, FD_CLOEXEC);
17847|  21.4k|#endif
17848|  21.4k|    return iof;
17849|  21.4k|}
janet.c:cfun_io_gc:
18040|  22.4k|static int cfun_io_gc(void *p, size_t len) {
18041|  22.4k|    (void) len;
18042|  22.4k|    JanetFile *iof = (JanetFile *)p;
18043|  22.4k|    janet_file_close(iof);
18044|  22.4k|    return 0;
18045|  22.4k|}
janet.c:io_file_get:
18124|      7|static int io_file_get(void *p, Janet key, Janet *out) {
18125|      7|    (void) p;
18126|      7|    if (!janet_checktype(key, 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 (18126:9): [True: 0, False: 7]
  ------------------
18127|      0|        return 0;
18128|      7|    return janet_getmethod(janet_unwrap_keyword(key), io_file_methods, out);
  ------------------
  |  |  865|      7|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
18129|      7|}
janet.c:io_file_marshal:
18136|    990|static void io_file_marshal(void *p, JanetMarshalContext *ctx) {
18137|    990|    JanetFile *iof = (JanetFile *)p;
18138|    990|    if (janet_marshal_flags(ctx) & JANET_MARSHAL_UNSAFE) {
  ------------------
  |  | 1910|    990|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (18138:9): [True: 990, False: 0]
  ------------------
18139|    990|        janet_marshal_abstract(ctx, p);
18140|    990|        int fno = -1;
18141|       |#ifdef JANET_WINDOWS
18142|       |        if (iof->flags & JANET_FILE_NOT_CLOSEABLE) {
18143|       |            fno = _fileno(iof->file);
18144|       |        } else {
18145|       |            fno = _dup(_fileno(iof->file));
18146|       |        }
18147|       |#else
18148|    990|        if (iof->flags & JANET_FILE_NOT_CLOSEABLE) {
  ------------------
  |  | 2278|    990|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
  |  Branch (18148:13): [True: 990, False: 0]
  ------------------
18149|    990|            fno = fileno(iof->file);
18150|    990|        } else {
18151|       |#ifdef JANET_PLAN9
18152|       |            fno = dup(fileno(iof->file), -1);
18153|       |#else
18154|      0|            fno = dup(fileno(iof->file));
18155|      0|#endif
18156|      0|        }
18157|    990|#endif
18158|    990|        janet_marshal_int(ctx, fno);
18159|    990|        janet_marshal_int(ctx, iof->flags);
18160|    990|        janet_marshal_size(ctx, iof->vbufsize);
18161|    990|    } else {
18162|      0|        janet_panic("cannot marshal file in safe mode");
18163|      0|    }
18164|    990|}
janet.c:io_file_unmarshal:
18166|    990|static void *io_file_unmarshal(JanetMarshalContext *ctx) {
18167|    990|    if (janet_unmarshal_flags(ctx) & JANET_MARSHAL_UNSAFE) {
  ------------------
  |  | 1910|    990|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (18167:9): [True: 990, False: 0]
  ------------------
18168|    990|        JanetFile *iof = janet_unmarshal_abstract(ctx, sizeof(JanetFile));
18169|    990|        int32_t fd = janet_unmarshal_int(ctx);
18170|    990|        int32_t flags = janet_unmarshal_int(ctx);
18171|    990|        char fmt[4] = {0};
18172|    990|        int index = 0;
18173|    990|        if (flags & JANET_FILE_READ) fmt[index++] = 'r';
  ------------------
  |  | 2275|    990|#define JANET_FILE_READ 2
  ------------------
  |  Branch (18173:13): [True: 330, False: 660]
  ------------------
18174|    990|        if (flags & JANET_FILE_APPEND) {
  ------------------
  |  | 2276|    990|#define JANET_FILE_APPEND 4
  ------------------
  |  Branch (18174:13): [True: 660, False: 330]
  ------------------
18175|    660|            fmt[index++] = 'a';
18176|    660|        } else if (flags & JANET_FILE_WRITE) {
  ------------------
  |  | 2274|    330|#define JANET_FILE_WRITE 1
  ------------------
  |  Branch (18176:20): [True: 0, False: 330]
  ------------------
18177|      0|            fmt[index++] = 'w';
18178|      0|        }
18179|       |#ifdef JANET_WINDOWS
18180|       |        iof->file = _fdopen(fd, fmt);
18181|       |#else
18182|    990|        iof->file = fdopen(fd, fmt);
18183|    990|#endif
18184|    990|        if (iof->file == NULL) {
  ------------------
  |  Branch (18184:13): [True: 0, False: 990]
  ------------------
18185|      0|            iof->flags = JANET_FILE_CLOSED;
  ------------------
  |  | 2279|      0|#define JANET_FILE_CLOSED 32
  ------------------
18186|    990|        } else {
18187|    990|            iof->flags = flags;
18188|    990|        }
18189|    990|        iof->vbufsize = janet_unmarshal_size(ctx);
18190|    990|        if (iof->vbufsize != BUFSIZ) {
  ------------------
  |  Branch (18190:13): [True: 0, False: 990]
  ------------------
18191|      0|            int result = setvbuf(iof->file, NULL, iof->vbufsize ? _IOFBF : _IONBF, iof->vbufsize);
  ------------------
  |  Branch (18191:51): [True: 0, False: 0]
  ------------------
18192|      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]
  |  |  ------------------
  ------------------
18193|      0|        }
18194|    990|        return iof;
18195|    990|    } else {
18196|      0|        janet_panic("cannot unmarshal file in safe mode");
18197|      0|    }
18198|    990|}
janet.c:cfun_io_print_impl:
18279|  1.73k|                                int newline, const char *name, FILE *dflt_file) {
18280|  1.73k|    Janet x = janet_dyn(name);
18281|  1.73k|    return cfun_io_print_impl_x(argc, argv, newline, dflt_file, 0, x);
18282|  1.73k|}
janet.c:cfun_io_print_impl_x:
18210|  1.75k|                                  FILE *dflt_file, int32_t offset, Janet x) {
18211|  1.75k|    FILE *f;
18212|  1.75k|    switch (janet_type(x)) {
  ------------------
  |  |  795|  1.75k|    (isnan((x).number) \
  |  |  796|  1.75k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  1.75k|        : JANET_NUMBER)
  ------------------
  |  Branch (18212:13): [True: 1.75k, False: 0]
  ------------------
18213|      1|        default:
  ------------------
  |  Branch (18213:9): [True: 1, False: 1.75k]
  ------------------
18214|      1|            janet_panicf("cannot print to %v", x);
18215|      0|        case JANET_BUFFER: {
  ------------------
  |  Branch (18215:9): [True: 0, False: 1.75k]
  ------------------
18216|       |            /* Special case buffer */
18217|      0|            JanetBuffer *buf = janet_unwrap_buffer(x);
  ------------------
  |  |  862|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
18218|      0|            for (int32_t i = offset; i < argc; ++i) {
  ------------------
  |  Branch (18218:38): [True: 0, False: 0]
  ------------------
18219|      0|                janet_to_string_b(buf, argv[i]);
18220|      0|            }
18221|      0|            if (newline)
  ------------------
  |  Branch (18221:17): [True: 0, False: 0]
  ------------------
18222|      0|                janet_buffer_push_u8(buf, '\n');
18223|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18224|      0|        }
18225|     23|        case JANET_FUNCTION: {
  ------------------
  |  Branch (18225:9): [True: 23, False: 1.73k]
  ------------------
18226|       |            /* Special case function */
18227|     23|            JanetFunction *fun = janet_unwrap_function(x);
  ------------------
  |  |  868|     23|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
18228|     23|            JanetBuffer *buf = janet_buffer(0);
18229|  65.9k|            for (int32_t i = offset; i < argc; ++i) {
  ------------------
  |  Branch (18229:38): [True: 65.8k, False: 23]
  ------------------
18230|  65.8k|                janet_to_string_b(buf, argv[i]);
18231|  65.8k|            }
18232|     23|            if (newline)
  ------------------
  |  Branch (18232:17): [True: 2, False: 21]
  ------------------
18233|      2|                janet_buffer_push_u8(buf, '\n');
18234|     23|            Janet args[1] = { janet_wrap_buffer(buf) };
  ------------------
  |  |  847|     23|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|     23|    janet_nanbox_from_pointer((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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18235|     23|            janet_call(fun, 1, args);
18236|     23|            return janet_wrap_nil();
  ------------------
  |  |  831|     23|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     23|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     23|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     23|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18237|      0|        }
18238|  1.73k|        case JANET_NIL:
  ------------------
  |  Branch (18238:9): [True: 1.73k, False: 24]
  ------------------
18239|  1.73k|            f = dflt_file;
18240|  1.73k|            if (f == NULL) janet_panic("cannot print to nil");
  ------------------
  |  Branch (18240:17): [True: 0, False: 1.73k]
  ------------------
18241|  1.73k|            break;
18242|  1.73k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (18242:9): [True: 0, False: 1.75k]
  ------------------
18243|      0|            void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18244|      0|            if (janet_abstract_type(abstract) != &janet_file_type)
  ------------------
  |  | 1898|      0|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (18244:17): [True: 0, False: 0]
  ------------------
18245|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18246|      0|            JanetFile *iofile = abstract;
18247|      0|            io_assert_writeable(iofile);
18248|      0|            f = iofile->file;
18249|      0|            break;
18250|      0|        }
18251|  1.75k|    }
18252|  6.90k|    for (int32_t i = offset; i < argc; ++i) {
  ------------------
  |  Branch (18252:30): [True: 5.17k, False: 1.73k]
  ------------------
18253|  5.17k|        int32_t len;
18254|  5.17k|        const uint8_t *vstr;
18255|  5.17k|        if (janet_checktype(argv[i], JANET_BUFFER)) {
  ------------------
  |  |  806|  5.17k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 81, False: 5.09k]
  |  |  |  Branch (806:6): [Folded, False: 5.17k]
  |  |  ------------------
  |  |  807|  5.17k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.17k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  5.17k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  5.17k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.17k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.17k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18256|     81|            JanetBuffer *b = janet_unwrap_buffer(argv[i]);
  ------------------
  |  |  862|     81|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
18257|     81|            vstr = b->data;
18258|     81|            len = b->count;
18259|  5.09k|        } else {
18260|  5.09k|            vstr = janet_to_string(argv[i]);
18261|  5.09k|            len = janet_string_length(vstr);
  ------------------
  |  | 1812|  5.09k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|  5.09k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
18262|  5.09k|        }
18263|  5.17k|        if (len) {
  ------------------
  |  Branch (18263:13): [True: 4.50k, False: 667]
  ------------------
18264|  4.50k|            if (1 != fwrite(vstr, len, 1, f)) {
  ------------------
  |  Branch (18264:17): [True: 0, False: 4.50k]
  ------------------
18265|      0|                if (f == dflt_file) {
  ------------------
  |  Branch (18265:21): [True: 0, False: 0]
  ------------------
18266|      0|                    janet_panicf("cannot print %d bytes", len);
18267|      0|                } else {
18268|      0|                    janet_panicf("cannot print %d bytes to %v", len, x);
18269|      0|                }
18270|      0|            }
18271|  4.50k|        }
18272|  5.17k|    }
18273|  1.73k|    if (newline)
  ------------------
  |  Branch (18273:9): [True: 1.71k, False: 23]
  ------------------
18274|  1.71k|        putc('\n', f);
18275|  1.73k|    return janet_wrap_nil();
  ------------------
  |  |  831|  1.73k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.73k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.73k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.73k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18276|  1.73k|}
janet.c:cfun_io_printf_impl:
18387|    175|                                 const char *name, FILE *dflt_file) {
18388|    175|    janet_arity(argc, 1, -1);
18389|    175|    Janet x = janet_dyn(name);
18390|    175|    return cfun_io_printf_impl_x(argc, argv, newline, dflt_file, 0, x);
18391|       |
18392|    175|}
janet.c:cfun_io_printf_impl_x:
18330|    178|                                   FILE *dflt_file, int32_t offset, Janet x) {
18331|    178|    FILE *f;
18332|    178|    const char *fmt = janet_getcstring(argv, offset);
18333|    178|    switch (janet_type(x)) {
  ------------------
  |  |  795|    178|    (isnan((x).number) \
  |  |  796|    178|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|    178|        : JANET_NUMBER)
  ------------------
  |  Branch (18333:13): [True: 173, False: 5]
  ------------------
18334|      2|        default:
  ------------------
  |  Branch (18334:9): [True: 2, False: 176]
  ------------------
18335|      2|            janet_panicf("cannot print to %v", x);
18336|      0|        case JANET_BUFFER: {
  ------------------
  |  Branch (18336:9): [True: 0, False: 178]
  ------------------
18337|       |            /* Special case buffer */
18338|      0|            JanetBuffer *buf = janet_unwrap_buffer(x);
  ------------------
  |  |  862|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
18339|      0|            janet_buffer_format(buf, fmt, offset, argc, argv);
18340|      0|            if (newline) janet_buffer_push_u8(buf, '\n');
  ------------------
  |  Branch (18340:17): [True: 0, False: 0]
  ------------------
18341|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18342|      0|        }
18343|      1|        case JANET_FUNCTION: {
  ------------------
  |  Branch (18343:9): [True: 1, False: 177]
  ------------------
18344|       |            /* Special case function */
18345|      1|            JanetFunction *fun = janet_unwrap_function(x);
  ------------------
  |  |  868|      1|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
18346|      1|            JanetBuffer *buf = janet_buffer(0);
18347|      1|            janet_buffer_format(buf, fmt, offset, argc, argv);
18348|      1|            if (newline) janet_buffer_push_u8(buf, '\n');
  ------------------
  |  Branch (18348:17): [True: 0, False: 1]
  ------------------
18349|      1|            Janet args[1] = { janet_wrap_buffer(buf) };
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18350|      1|            janet_call(fun, 1, args);
18351|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18352|      0|        }
18353|    171|        case JANET_NIL:
  ------------------
  |  Branch (18353:9): [True: 171, False: 7]
  ------------------
18354|    171|            f = dflt_file;
18355|    171|            if (f == NULL) janet_panic("cannot print to nil");
  ------------------
  |  Branch (18355:17): [True: 0, False: 171]
  ------------------
18356|    171|            break;
18357|    171|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (18357:9): [True: 0, False: 178]
  ------------------
18358|      0|            void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18359|      0|            if (janet_abstract_type(abstract) != &janet_file_type)
  ------------------
  |  | 1898|      0|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (18359:17): [True: 0, False: 0]
  ------------------
18360|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18361|      0|            JanetFile *iofile = abstract;
18362|      0|            if (iofile->flags & JANET_FILE_CLOSED) {
  ------------------
  |  | 2279|      0|#define JANET_FILE_CLOSED 32
  ------------------
  |  Branch (18362:17): [True: 0, False: 0]
  ------------------
18363|      0|                janet_panic("cannot print to closed file");
18364|      0|            }
18365|      0|            io_assert_writeable(iofile);
18366|      0|            f = iofile->file;
18367|      0|            break;
18368|      0|        }
18369|    178|    }
18370|    171|    JanetBuffer *buf = janet_buffer(10);
18371|    171|    janet_buffer_format(buf, fmt, offset, argc, argv);
18372|    171|    if (newline) janet_buffer_push_u8(buf, '\n');
  ------------------
  |  Branch (18372:9): [True: 2, False: 169]
  ------------------
18373|    171|    if (buf->count) {
  ------------------
  |  Branch (18373:9): [True: 90, False: 81]
  ------------------
18374|     90|        if (1 != fwrite(buf->data, buf->count, 1, f)) {
  ------------------
  |  Branch (18374:13): [True: 0, False: 90]
  ------------------
18375|      0|            janet_panicf("could not print %d bytes to file", buf->count);
18376|      0|        }
18377|     90|    }
18378|       |    /* Clear buffer to make things easier for GC */
18379|    171|    buf->count = 0;
18380|    171|    buf->capacity = 0;
18381|    171|    janet_free(buf->data);
  ------------------
  |  | 2415|    171|#define janet_free(X) free((X))
  ------------------
18382|    171|    buf->data = NULL;
18383|    171|    return janet_wrap_nil();
  ------------------
  |  |  831|    171|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    171|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    171|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    171|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18384|    171|}
janet.c:janet_flusher:
18432|      2|static void janet_flusher(const char *name, FILE *dflt_file) {
18433|      2|    Janet x = janet_dyn(name);
18434|      2|    switch (janet_type(x)) {
  ------------------
  |  |  795|      2|    (isnan((x).number) \
  |  |  796|      2|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|      2|        : JANET_NUMBER)
  ------------------
  |  Branch (18434:13): [True: 2, False: 0]
  ------------------
18435|      0|        default:
  ------------------
  |  Branch (18435:9): [True: 0, False: 2]
  ------------------
18436|      0|            break;
18437|      2|        case JANET_NIL:
  ------------------
  |  Branch (18437:9): [True: 2, False: 0]
  ------------------
18438|      2|            fflush(dflt_file);
18439|      2|            break;
18440|      0|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (18440:9): [True: 0, False: 2]
  ------------------
18441|      0|            void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18442|      0|            if (janet_abstract_type(abstract) != &janet_file_type) break;
  ------------------
  |  | 1898|      0|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (18442:17): [True: 0, False: 0]
  ------------------
18443|      0|            JanetFile *iofile = abstract;
18444|      0|            fflush(iofile->file);
18445|      0|            break;
18446|      0|        }
18447|      2|    }
18448|      2|}
janet.c:push64:
18769|  1.00k|static void push64(MarshalState *st, uint64_t x) {
18770|  1.00k|    if (x <= 0xF0) {
  ------------------
  |  Branch (18770:9): [True: 10, False: 996]
  ------------------
18771|       |        /* Single byte */
18772|     10|        pushbyte(st, (uint8_t) x);
18773|    996|    } else {
18774|       |        /* Multibyte, little endian */
18775|    996|        uint8_t bytes[9];
18776|    996|        int nbytes = 0;
18777|  2.99k|        while (x) {
  ------------------
  |  Branch (18777:16): [True: 2.00k, False: 996]
  ------------------
18778|  2.00k|            bytes[++nbytes] = x & 0xFF;
18779|  2.00k|            x >>= 8;
18780|  2.00k|        }
18781|    996|        bytes[0] = 0xF0 + nbytes;
18782|    996|        pushbytes(st, bytes, nbytes + 1);
18783|    996|    }
18784|  1.00k|}
janet.c:pushint:
18737|  25.9M|static void pushint(MarshalState *st, int32_t x) {
18738|  25.9M|    if (x >= 0 && x < 128) {
  ------------------
  |  Branch (18738:9): [True: 24.8M, False: 1.09M]
  |  Branch (18738:19): [True: 20.5M, False: 4.37M]
  ------------------
18739|  20.5M|        janet_buffer_push_u8(st->buf, x);
18740|  20.5M|    } else if (x <= 8191 && x >= -8192) {
  ------------------
  |  Branch (18740:16): [True: 5.09M, False: 379k]
  |  Branch (18740:29): [True: 5.08M, False: 336]
  ------------------
18741|  5.08M|        uint8_t intbuf[2];
18742|  5.08M|        intbuf[0] = ((x >> 8) & 0x3F) | 0x80;
18743|  5.08M|        intbuf[1] = x & 0xFF;
18744|  5.08M|        janet_buffer_push_bytes(st->buf, intbuf, 2);
18745|  5.08M|    } else {
18746|   379k|        uint8_t intbuf[5];
18747|   379k|        intbuf[0] = LB_INTEGER;
18748|   379k|        intbuf[1] = (x >> 24) & 0xFF;
18749|   379k|        intbuf[2] = (x >> 16) & 0xFF;
18750|   379k|        intbuf[3] = (x >> 8) & 0xFF;
18751|   379k|        intbuf[4] = x & 0xFF;
18752|   379k|        janet_buffer_push_bytes(st->buf, intbuf, 5);
18753|   379k|    }
18754|  25.9M|}
janet.c:pushpointer:
18764|  4.30k|static void pushpointer(MarshalState *st, const void *ptr) {
18765|  4.30k|    janet_buffer_push_bytes(st->buf, (const uint8_t *) &ptr, sizeof(ptr));
18766|  4.30k|}
janet.c:pushbyte:
18756|  28.9M|static void pushbyte(MarshalState *st, uint8_t b) {
18757|  28.9M|    janet_buffer_push_u8(st->buf, b);
18758|  28.9M|}
janet.c:pushbytes:
18760|  1.34M|static void pushbytes(MarshalState *st, const uint8_t *bytes, int32_t len) {
18761|  1.34M|    janet_buffer_push_bytes(st->buf, bytes, len);
18762|  1.34M|}
janet.c:marshal_one:
19070|  6.97M|static void marshal_one(MarshalState *st, Janet x, int flags) {
19071|  6.97M|    MARSH_STACKCHECK;
  ------------------
  |  |18793|  6.97M|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  296|  6.97M|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (18793:30): [True: 0, False: 6.97M]
  |  |  ------------------
  ------------------
19072|  6.97M|    JanetType type = janet_type(x);
  ------------------
  |  |  795|  6.97M|    (isnan((x).number) \
  |  |  796|  6.97M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  6.97M|        : JANET_NUMBER)
  ------------------
  |  Branch (19072:22): [True: 6.51M, False: 459k]
  ------------------
19073|       |
19074|       |    /* Check simple primitives (non reference types, no benefit from memoization) */
19075|  6.97M|    switch (type) {
19076|  6.32M|        default:
  ------------------
  |  Branch (19076:9): [True: 6.32M, False: 648k]
  ------------------
19077|  6.32M|            break;
19078|  6.32M|        case JANET_NIL:
  ------------------
  |  Branch (19078:9): [True: 145k, False: 6.83M]
  ------------------
19079|   145k|            pushbyte(st, LB_NIL);
19080|   145k|            return;
19081|  43.5k|        case JANET_BOOLEAN:
  ------------------
  |  Branch (19081:9): [True: 43.5k, False: 6.93M]
  ------------------
19082|  43.5k|            pushbyte(st, janet_unwrap_boolean(x) ? LB_TRUE : LB_FALSE);
  ------------------
  |  |  838|  43.5k|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  |  |  ------------------
  |  |  |  Branch (838:33): [True: 43.5k, False: 9]
  |  |  ------------------
  ------------------
19083|  43.5k|            return;
19084|   459k|        case JANET_NUMBER: {
  ------------------
  |  Branch (19084:9): [True: 459k, False: 6.51M]
  ------------------
19085|   459k|            double xval = janet_unwrap_number(x);
  ------------------
  |  |  839|   459k|#define janet_unwrap_number(x) ((x).number)
  ------------------
19086|   459k|            if (janet_checkintrange(xval)) {
  ------------------
  |  |  962|   459k|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  ------------------
  |  |  |  Branch (962:33): [True: 458k, False: 995]
  |  |  |  Branch (962:53): [True: 457k, False: 1.68k]
  |  |  |  Branch (962:73): [True: 456k, False: 667]
  |  |  ------------------
  ------------------
19087|   456k|                pushint(st, (int32_t) xval);
19088|   456k|                return;
19089|   456k|            }
19090|  3.34k|            break;
19091|   459k|        }
19092|  6.97M|    }
19093|       |
19094|       |    /* Check reference and registry value */
19095|  6.33M|    {
19096|  6.33M|        Janet check;
19097|  6.33M|        if (st->maybe_cycles) {
  ------------------
  |  Branch (19097:13): [True: 6.33M, False: 0]
  ------------------
19098|  6.33M|            check = janet_table_get(&st->seen, x);
19099|  6.33M|            if (janet_checkint(check)) {
  ------------------
  |  Branch (19099:17): [True: 4.35M, False: 1.98M]
  ------------------
19100|  4.35M|                pushbyte(st, LB_REFERENCE);
19101|  4.35M|                pushint(st, janet_unwrap_integer(check));
  ------------------
  |  |  966|  4.35M|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|  4.35M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
19102|  4.35M|                return;
19103|  4.35M|            }
19104|  6.33M|        }
19105|  1.98M|        if (st->rreg) {
  ------------------
  |  Branch (19105:13): [True: 134, False: 1.98M]
  ------------------
19106|    134|            check = janet_table_get(st->rreg, x);
19107|    134|            if (janet_checktype(check, JANET_SYMBOL)) {
  ------------------
  |  |  806|    134|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 134]
  |  |  |  Branch (806:6): [Folded, False: 134]
  |  |  ------------------
  |  |  807|    134|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    134|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    134|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    134|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    134|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    134|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19108|      0|                MARK_SEEN();
  ------------------
  |  |19025|      0|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (19025:14): [True: 0, False: 0]
  |  |  ------------------
  |  |19026|      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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |19027|      0|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (19027:16): [Folded, False: 0]
  |  |  ------------------
  ------------------
19109|      0|                const uint8_t *regname = janet_unwrap_symbol(check);
  ------------------
  |  |  864|      0|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
19110|      0|                pushbyte(st, LB_REGISTRY);
19111|      0|                pushint(st, janet_string_length(regname));
  ------------------
  |  | 1812|      0|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|      0|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
19112|      0|                pushbytes(st, regname, janet_string_length(regname));
  ------------------
  |  | 1812|      0|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|      0|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
19113|      0|                return;
19114|      0|            }
19115|    134|        }
19116|  1.98M|    }
19117|       |
19118|       |    /* Reference types */
19119|  1.98M|    switch (type) {
19120|  2.35k|        case JANET_NUMBER: {
  ------------------
  |  Branch (19120:9): [True: 2.35k, False: 1.97M]
  ------------------
19121|  2.35k|            union {
19122|  2.35k|                double d;
19123|  2.35k|                uint8_t bytes[8];
19124|  2.35k|            } u;
19125|  2.35k|            u.d = janet_unwrap_number(x);
  ------------------
  |  |  839|  2.35k|#define janet_unwrap_number(x) ((x).number)
  ------------------
19126|       |#ifdef JANET_BIG_ENDIAN
19127|       |            /* Swap byte order */
19128|       |            uint8_t temp;
19129|       |            temp = u.bytes[7];
19130|       |            u.bytes[7] = u.bytes[0];
19131|       |            u.bytes[0] = temp;
19132|       |            temp = u.bytes[6];
19133|       |            u.bytes[6] = u.bytes[1];
19134|       |            u.bytes[1] = temp;
19135|       |            temp = u.bytes[5];
19136|       |            u.bytes[5] = u.bytes[2];
19137|       |            u.bytes[2] = temp;
19138|       |            temp = u.bytes[4];
19139|       |            u.bytes[4] = u.bytes[3];
19140|       |            u.bytes[3] = temp;
19141|       |#endif
19142|  2.35k|            pushbyte(st, LB_REAL);
19143|  2.35k|            pushbytes(st, u.bytes, 8);
19144|  2.35k|            MARK_SEEN();
  ------------------
  |  |19025|  2.35k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (19025:14): [True: 2.35k, False: 0]
  |  |  ------------------
  |  |19026|  2.35k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|  2.35k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|  2.35k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |19027|  2.35k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (19027:16): [Folded, False: 2.35k]
  |  |  ------------------
  ------------------
19145|  2.35k|            return;
19146|      0|        }
19147|   495k|        case JANET_STRING:
  ------------------
  |  Branch (19147:9): [True: 495k, False: 1.48M]
  ------------------
19148|  1.13M|        case JANET_SYMBOL:
  ------------------
  |  Branch (19148:9): [True: 643k, False: 1.33M]
  ------------------
19149|  1.21M|        case JANET_KEYWORD: {
  ------------------
  |  Branch (19149:9): [True: 78.2k, False: 1.90M]
  ------------------
19150|  1.21M|            const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  863|  1.21M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
19151|  1.21M|            int32_t length = janet_string_length(str);
  ------------------
  |  | 1812|  1.21M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|  1.21M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
19152|       |            /* Record reference */
19153|  1.21M|            MARK_SEEN();
  ------------------
  |  |19025|  1.21M|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (19025:14): [True: 1.21M, False: 3]
  |  |  ------------------
  |  |19026|  1.21M|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|  1.21M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|  1.21M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |19027|  1.21M|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (19027:16): [Folded, False: 1.21M]
  |  |  ------------------
  ------------------
19154|  1.21M|            uint8_t lb = (type == JANET_STRING) ? LB_STRING :
  ------------------
  |  Branch (19154:26): [True: 495k, False: 721k]
  ------------------
19155|  1.21M|                         (type == JANET_SYMBOL) ? LB_SYMBOL :
  ------------------
  |  Branch (19155:26): [True: 643k, False: 78.2k]
  ------------------
19156|   721k|                         LB_KEYWORD;
19157|  1.21M|            pushbyte(st, lb);
19158|  1.21M|            pushint(st, length);
19159|  1.21M|            pushbytes(st, str, length);
19160|  1.21M|            return;
19161|  1.13M|        }
19162|  4.76k|        case JANET_BUFFER: {
  ------------------
  |  Branch (19162:9): [True: 4.76k, False: 1.97M]
  ------------------
19163|  4.76k|            JanetBuffer *buffer = janet_unwrap_buffer(x);
  ------------------
  |  |  862|  4.76k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
19164|       |            /* Record reference */
19165|  4.76k|            MARK_SEEN();
  ------------------
  |  |19025|  4.76k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (19025:14): [True: 4.76k, False: 0]
  |  |  ------------------
  |  |19026|  4.76k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|  4.76k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|  4.76k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |19027|  4.76k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (19027:16): [Folded, False: 4.76k]
  |  |  ------------------
  ------------------
19166|  4.76k|#ifdef JANET_EV
19167|  4.76k|            if ((flags & JANET_MARSHAL_UNSAFE) &&
  ------------------
  |  | 1910|  4.76k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (19167:17): [True: 332, False: 4.43k]
  ------------------
19168|    332|                    (buffer->gc.flags & JANET_BUFFER_FLAG_NO_REALLOC)) {
  ------------------
  |  | 1779|    332|#define JANET_BUFFER_FLAG_NO_REALLOC 0x10000
  ------------------
  |  Branch (19168:21): [True: 0, False: 332]
  ------------------
19169|      0|                pushbyte(st, LB_POINTER_BUFFER);
19170|      0|                pushint(st, buffer->count);
19171|      0|                pushint(st, buffer->capacity);
19172|      0|                pushpointer(st, buffer->data);
19173|      0|                return;
19174|      0|            }
19175|  4.76k|#endif
19176|  4.76k|            pushbyte(st, LB_BUFFER);
19177|  4.76k|            pushint(st, buffer->count);
19178|  4.76k|            pushbytes(st, buffer->data, buffer->count);
19179|  4.76k|            return;
19180|  4.76k|        }
19181|    995|        case JANET_ARRAY: {
  ------------------
  |  Branch (19181:9): [True: 995, False: 1.97M]
  ------------------
19182|    995|            int32_t i;
19183|    995|            JanetArray *a = janet_unwrap_array(x);
  ------------------
  |  |  860|    995|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
19184|    995|            MARK_SEEN();
  ------------------
  |  |19025|    995|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (19025:14): [True: 995, False: 0]
  |  |  ------------------
  |  |19026|    995|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|    995|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|    995|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |19027|    995|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (19027:16): [Folded, False: 995]
  |  |  ------------------
  ------------------
19185|    995|            enum JanetMemoryType memtype = janet_gc_type(a);
  ------------------
  |  |  635|    995|#define janet_gc_type(m) (janet_gc_header(m)->flags & 0xFF)
  |  |  ------------------
  |  |  |  |  628|    995|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
19186|    995|            pushbyte(st, memtype == JANET_MEMORY_ARRAY_WEAK ? LB_ARRAY_WEAK : LB_ARRAY);
  ------------------
  |  Branch (19186:26): [True: 0, False: 995]
  ------------------
19187|    995|            pushint(st, a->count);
19188|  8.60k|            for (i = 0; i < a->count; i++)
  ------------------
  |  Branch (19188:25): [True: 7.60k, False: 995]
  ------------------
19189|  7.60k|                marshal_one(st, a->data[i], flags + 1);
19190|    995|            return;
19191|  4.76k|        }
19192|   258k|        case JANET_TUPLE: {
  ------------------
  |  Branch (19192:9): [True: 258k, False: 1.72M]
  ------------------
19193|   258k|            int32_t i, count, flag;
19194|   258k|            const Janet *tup = janet_unwrap_tuple(x);
  ------------------
  |  |  858|   258k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
19195|   258k|            count = janet_tuple_length(tup);
  ------------------
  |  | 1801|   258k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|   258k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
19196|   258k|            flag = janet_tuple_flag(tup) >> 16;
  ------------------
  |  | 1805|   258k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1799|   258k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
19197|   258k|            pushbyte(st, LB_TUPLE);
19198|   258k|            pushint(st, count);
19199|   258k|            pushint(st, flag);
19200|   993k|            for (i = 0; i < count; i++)
  ------------------
  |  Branch (19200:25): [True: 734k, False: 258k]
  ------------------
19201|   734k|                marshal_one(st, tup[i], flags + 1);
19202|       |            /* Mark as seen AFTER marshaling */
19203|   258k|            MARK_SEEN();
  ------------------
  |  |19025|   258k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (19025:14): [True: 258k, False: 0]
  |  |  ------------------
  |  |19026|   258k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|   258k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|   258k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |19027|   258k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (19027:16): [Folded, False: 258k]
  |  |  ------------------
  ------------------
19204|   258k|            return;
19205|  4.76k|        }
19206|   241k|        case JANET_TABLE: {
  ------------------
  |  Branch (19206:9): [True: 241k, False: 1.73M]
  ------------------
19207|   241k|            JanetTable *t = janet_unwrap_table(x);
  ------------------
  |  |  861|   241k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
19208|   241k|            MARK_SEEN();
  ------------------
  |  |19025|   241k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (19025:14): [True: 241k, False: 0]
  |  |  ------------------
  |  |19026|   241k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|   241k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|   241k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |19027|   241k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (19027:16): [Folded, False: 241k]
  |  |  ------------------
  ------------------
19209|   241k|            enum JanetMemoryType memtype = janet_gc_type(t);
  ------------------
  |  |  635|   241k|#define janet_gc_type(m) (janet_gc_header(m)->flags & 0xFF)
  |  |  ------------------
  |  |  |  |  628|   241k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
19210|   241k|            if (memtype == JANET_MEMORY_TABLE_WEAKK) {
  ------------------
  |  Branch (19210:17): [True: 0, False: 241k]
  ------------------
19211|      0|                pushbyte(st, t->proto ? LB_TABLE_WEAKK_PROTO : LB_TABLE_WEAKK);
  ------------------
  |  Branch (19211:30): [True: 0, False: 0]
  ------------------
19212|   241k|            } else if (memtype == JANET_MEMORY_TABLE_WEAKV) {
  ------------------
  |  Branch (19212:24): [True: 0, False: 241k]
  ------------------
19213|      0|                pushbyte(st, t->proto ? LB_TABLE_WEAKV_PROTO : LB_TABLE_WEAKV);
  ------------------
  |  Branch (19213:30): [True: 0, False: 0]
  ------------------
19214|   241k|            } else if (memtype == JANET_MEMORY_TABLE_WEAKKV) {
  ------------------
  |  Branch (19214:24): [True: 0, False: 241k]
  ------------------
19215|      0|                pushbyte(st, t->proto ? LB_TABLE_WEAKKV_PROTO : LB_TABLE_WEAKKV);
  ------------------
  |  Branch (19215:30): [True: 0, False: 0]
  ------------------
19216|   241k|            } else {
19217|   241k|                pushbyte(st, t->proto ? LB_TABLE_PROTO : LB_TABLE);
  ------------------
  |  Branch (19217:30): [True: 0, False: 241k]
  ------------------
19218|   241k|            }
19219|   241k|            pushint(st, t->count);
19220|   241k|            if (t->proto)
  ------------------
  |  Branch (19220:17): [True: 0, False: 241k]
  ------------------
19221|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19222|  4.21M|            for (int32_t i = 0; i < t->capacity; i++) {
  ------------------
  |  Branch (19222:33): [True: 3.97M, False: 241k]
  ------------------
19223|  3.97M|                if (janet_checktype(t->data[i].key, JANET_NIL))
  ------------------
  |  |  806|  3.97M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 2.54M, False: 1.43M]
  |  |  |  Branch (806:6): [Folded, False: 3.97M]
  |  |  ------------------
  |  |  807|  3.97M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.97M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  3.97M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  3.97M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.97M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.97M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19224|  2.54M|                    continue;
19225|  1.43M|                marshal_one(st, t->data[i].key, flags + 1);
19226|  1.43M|                marshal_one(st, t->data[i].value, flags + 1);
19227|  1.43M|            }
19228|   241k|            return;
19229|  4.76k|        }
19230|  2.32k|        case JANET_STRUCT: {
  ------------------
  |  Branch (19230:9): [True: 2.32k, False: 1.97M]
  ------------------
19231|  2.32k|            int32_t count;
19232|  2.32k|            const JanetKV *struct_ = janet_unwrap_struct(x);
  ------------------
  |  |  857|  2.32k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
19233|  2.32k|            count = janet_struct_length(struct_);
  ------------------
  |  | 1847|  2.32k|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1845|  2.32k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
19234|  2.32k|            pushbyte(st, janet_struct_proto(struct_) ? LB_STRUCT_PROTO : LB_STRUCT);
  ------------------
  |  | 1850|  2.32k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1845|  2.32k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1850:31): [True: 0, False: 2.32k]
  |  |  ------------------
  ------------------
19235|  2.32k|            pushint(st, count);
19236|  2.32k|            if (janet_struct_proto(struct_))
  ------------------
  |  | 1850|  2.32k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1845|  2.32k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1850:31): [True: 0, False: 2.32k]
  |  |  ------------------
  ------------------
19237|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19238|  42.2k|            for (int32_t i = 0; i < janet_struct_capacity(struct_); i++) {
  ------------------
  |  | 1848|  42.2k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1845|  42.2k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (19238:33): [True: 39.9k, False: 2.32k]
  ------------------
19239|  39.9k|                if (janet_checktype(struct_[i].key, JANET_NIL))
  ------------------
  |  |  806|  39.9k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 24.7k, False: 15.1k]
  |  |  |  Branch (806:6): [Folded, False: 39.9k]
  |  |  ------------------
  |  |  807|  39.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|  39.9k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  39.9k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  39.9k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  39.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  39.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19240|  24.7k|                    continue;
19241|  15.1k|                marshal_one(st, struct_[i].key, flags + 1);
19242|  15.1k|                marshal_one(st, struct_[i].value, flags + 1);
19243|  15.1k|            }
19244|       |            /* Mark as seen AFTER marshaling */
19245|  2.32k|            MARK_SEEN();
  ------------------
  |  |19025|  2.32k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (19025:14): [True: 2.32k, False: 0]
  |  |  ------------------
  |  |19026|  2.32k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|  2.32k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|  2.32k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |19027|  2.32k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (19027:16): [Folded, False: 2.32k]
  |  |  ------------------
  ------------------
19246|  2.32k|            return;
19247|  4.76k|        }
19248|  1.00k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (19248:9): [True: 1.00k, False: 1.97M]
  ------------------
19249|  1.00k|            marshal_one_abstract(st, x, flags);
19250|  1.00k|            return;
19251|  4.76k|        }
19252|   131k|        case JANET_FUNCTION: {
  ------------------
  |  Branch (19252:9): [True: 131k, False: 1.84M]
  ------------------
19253|   131k|            pushbyte(st, LB_FUNCTION);
19254|   131k|            JanetFunction *func = janet_unwrap_function(x);
  ------------------
  |  |  868|   131k|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
19255|   131k|            pushint(st, func->def->environments_length);
19256|       |            /* Mark seen before reading def */
19257|   131k|            MARK_SEEN();
  ------------------
  |  |19025|   131k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (19025:14): [True: 131k, False: 0]
  |  |  ------------------
  |  |19026|   131k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|   131k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|   131k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |19027|   131k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (19027:16): [Folded, False: 131k]
  |  |  ------------------
  ------------------
19258|   131k|            marshal_one_def(st, func->def, flags);
19259|   145k|            for (int32_t i = 0; i < func->def->environments_length; i++)
  ------------------
  |  Branch (19259:33): [True: 14.1k, False: 131k]
  ------------------
19260|  14.1k|                marshal_one_env(st, func->envs[i], flags + 1);
19261|   131k|            return;
19262|  4.76k|        }
19263|    331|        case JANET_FIBER: {
  ------------------
  |  Branch (19263:9): [True: 331, False: 1.98M]
  ------------------
19264|    331|            MARK_SEEN();
  ------------------
  |  |19025|    331|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (19025:14): [True: 331, False: 0]
  |  |  ------------------
  |  |19026|    331|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|    331|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|    331|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |19027|    331|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (19027:16): [Folded, False: 331]
  |  |  ------------------
  ------------------
19265|    331|            pushbyte(st, LB_FIBER);
19266|    331|            marshal_one_fiber(st, janet_unwrap_fiber(x), flags + 1);
  ------------------
  |  |  859|    331|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
19267|    331|            return;
19268|  4.76k|        }
19269|   116k|        case JANET_CFUNCTION: {
  ------------------
  |  Branch (19269:9): [True: 116k, False: 1.86M]
  ------------------
19270|   116k|            if (!(flags & JANET_MARSHAL_UNSAFE)) goto no_registry;
  ------------------
  |  | 1910|   116k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (19270:17): [True: 1, False: 116k]
  ------------------
19271|   116k|            MARK_SEEN();
  ------------------
  |  |19025|   116k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (19025:14): [True: 116k, False: 0]
  |  |  ------------------
  |  |19026|   116k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|   116k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|   116k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |19027|   116k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (19027:16): [Folded, False: 116k]
  |  |  ------------------
  ------------------
19272|   116k|            pushbyte(st, LB_UNSAFE_CFUNCTION);
19273|   116k|            JanetCFunction cfn = janet_unwrap_cfunction(x);
  ------------------
  |  |  869|   116k|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
19274|   116k|            pushbytes(st, (uint8_t *) &cfn, sizeof(JanetCFunction));
19275|   116k|            return;
19276|   116k|        }
19277|  4.30k|        case JANET_POINTER: {
  ------------------
  |  Branch (19277:9): [True: 4.30k, False: 1.97M]
  ------------------
19278|  4.30k|            if (!(flags & JANET_MARSHAL_UNSAFE)) goto no_registry;
  ------------------
  |  | 1910|  4.30k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (19278:17): [True: 0, False: 4.30k]
  ------------------
19279|  4.30k|            MARK_SEEN();
  ------------------
  |  |19025|  4.30k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (19025:14): [True: 4.30k, False: 0]
  |  |  ------------------
  |  |19026|  4.30k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  967|  4.30k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|  4.30k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |19027|  4.30k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (19027:16): [Folded, False: 4.30k]
  |  |  ------------------
  ------------------
19280|  4.30k|            pushbyte(st, LB_UNSAFE_POINTER);
19281|  4.30k|            pushpointer(st, janet_unwrap_pointer(x));
  ------------------
  |  |  867|  4.30k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
19282|  4.30k|            return;
19283|  4.30k|        }
19284|      1|    no_registry:
19285|      1|        default: {
  ------------------
  |  Branch (19285:9): [True: 0, False: 1.98M]
  ------------------
19286|      1|            janet_panicf("no registry value and cannot marshal %p", x);
19287|      1|        }
19288|  1.98M|    }
19289|  1.98M|#undef MARK_SEEN
19290|  1.98M|}
janet.c:marshal_one_abstract:
19040|  1.00k|static void marshal_one_abstract(MarshalState *st, Janet x, int flags) {
19041|  1.00k|    void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  866|  1.00k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
19042|  1.00k|#ifdef JANET_EV
19043|       |    /* Threaded abstract types get passed through as pointers in the unsafe mode */
19044|  1.00k|    if ((flags & JANET_MARSHAL_UNSAFE) &&
  ------------------
  |  | 1910|  1.00k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (19044:9): [True: 1.00k, False: 1]
  ------------------
19045|  1.00k|            (JANET_MEMORY_THREADED_ABSTRACT == (janet_abstract_head(abstract)->gc.flags & JANET_MEM_TYPEBITS))) {
  ------------------
  |  | 1896|  1.00k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
                          (JANET_MEMORY_THREADED_ABSTRACT == (janet_abstract_head(abstract)->gc.flags & JANET_MEM_TYPEBITS))) {
  ------------------
  |  |  630|  1.00k|#define JANET_MEM_TYPEBITS 0xFF
  ------------------
  |  Branch (19045:13): [True: 0, False: 1.00k]
  ------------------
19046|       |
19047|       |        /* Increment refcount before sending message. This prevents a "death in transit" problem
19048|       |         * where a message is garbage collected while in transit between two threads - i.e., the sending threads
19049|       |         * loses the reference and runs a garbage collection before the receiving thread gets the message. */
19050|      0|        janet_abstract_incref(abstract);
19051|      0|        pushbyte(st, LB_THREADED_ABSTRACT);
19052|      0|        pushbytes(st, (uint8_t *) &abstract, sizeof(abstract));
19053|      0|        MARK_SEEN();
  ------------------
  |  |19025|      0|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (19025:14): [True: 0, False: 0]
  |  |  ------------------
  |  |19026|      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)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |19027|      0|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (19027:16): [Folded, False: 0]
  |  |  ------------------
  ------------------
19054|      0|        return;
19055|      0|    }
19056|  1.00k|#endif
19057|  1.00k|    const JanetAbstractType *at = janet_abstract_type(abstract);
  ------------------
  |  | 1898|  1.00k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|  1.00k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
19058|  1.00k|    if (at->marshal) {
  ------------------
  |  Branch (19058:9): [True: 1.00k, False: 0]
  ------------------
19059|  1.00k|        pushbyte(st, LB_ABSTRACT);
19060|  1.00k|        marshal_one(st, janet_csymbolv(at->name), flags + 1);
  ------------------
  |  | 1836|  1.00k|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  1.00k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.00k|    janet_nanbox_from_cpointer((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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19061|  1.00k|        JanetMarshalContext context = {st, NULL, flags + 1, NULL, at};
19062|  1.00k|        at->marshal(abstract, &context);
19063|  1.00k|    } else {
19064|      0|        janet_panicf("cannot marshal %p", x);
19065|      0|    }
19066|  1.00k|}
janet.c:marshal_one_def:
18860|   293k|static void marshal_one_def(MarshalState *st, JanetFuncDef *def, int flags) {
18861|   293k|    MARSH_STACKCHECK;
  ------------------
  |  |18793|   293k|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  296|   293k|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (18793:30): [True: 0, False: 293k]
  |  |  ------------------
  ------------------
18862|   259M|    for (int32_t i = 0; i < janet_v_count(st->seen_defs); i++) {
  ------------------
  |  |  714|   259M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|   259M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   259M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 259M, False: 5.02k]
  |  |  ------------------
  ------------------
  |  Branch (18862:25): [True: 259M, False: 292k]
  ------------------
18863|   259M|        if (st->seen_defs[i] == def) {
  ------------------
  |  Branch (18863:13): [True: 1.32k, False: 259M]
  ------------------
18864|  1.32k|            pushbyte(st, LB_FUNCDEF_REF);
18865|  1.32k|            pushint(st, i);
18866|  1.32k|            return;
18867|  1.32k|        }
18868|   259M|    }
18869|       |    /* Add to lookup */
18870|   292k|    janet_v_push(st->seen_defs, def);
  ------------------
  |  |  712|   292k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|   292k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|   292k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|   287k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|   287k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|   287k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|   287k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 5.00k, False: 287k]
  |  |  |  |  |  |  |  Branch (723:50): [True: 17.0k, False: 270k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|  22.0k|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  721|   292k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   292k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18871|       |
18872|   292k|    pushint(st, def->flags);
18873|   292k|    pushint(st, def->slotcount);
18874|   292k|    pushint(st, def->arity);
18875|   292k|    pushint(st, def->min_arity);
18876|   292k|    pushint(st, def->max_arity);
18877|   292k|    pushint(st, def->constants_length);
18878|   292k|    pushint(st, def->bytecode_length);
18879|   292k|    if (def->flags & JANET_FUNCDEF_FLAG_NAMEDARGS)
  ------------------
  |  | 1107|   292k|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (18879:9): [True: 660, False: 291k]
  ------------------
18880|    660|        pushint(st, def->named_args_count);
18881|   292k|    if (def->flags & JANET_FUNCDEF_FLAG_HASENVS)
  ------------------
  |  | 1103|   292k|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (18881:9): [True: 281k, False: 10.9k]
  ------------------
18882|   281k|        pushint(st, def->environments_length);
18883|   292k|    if (def->flags & JANET_FUNCDEF_FLAG_HASDEFS)
  ------------------
  |  | 1102|   292k|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (18883:9): [True: 106k, False: 185k]
  ------------------
18884|   106k|        pushint(st, def->defs_length);
18885|   292k|    if (def->flags & JANET_FUNCDEF_FLAG_HASSYMBOLMAP)
  ------------------
  |  | 1099|   292k|#define JANET_FUNCDEF_FLAG_HASSYMBOLMAP 0x40000
  ------------------
  |  Branch (18885:9): [True: 172k, False: 119k]
  ------------------
18886|   172k|        pushint(st, def->symbolmap_length);
18887|   292k|    if (def->flags & JANET_FUNCDEF_FLAG_HASNAME)
  ------------------
  |  | 1100|   292k|#define JANET_FUNCDEF_FLAG_HASNAME 0x80000
  ------------------
  |  Branch (18887:9): [True: 280k, False: 11.8k]
  ------------------
18888|   280k|        marshal_one(st, janet_wrap_string(def->name), flags);
  ------------------
  |  |  848|   280k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|   280k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   280k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   280k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18889|   292k|    if (def->flags & JANET_FUNCDEF_FLAG_HASSOURCE)
  ------------------
  |  | 1101|   292k|#define JANET_FUNCDEF_FLAG_HASSOURCE 0x100000
  ------------------
  |  Branch (18889:9): [True: 281k, False: 10.9k]
  ------------------
18890|   281k|        marshal_one(st, janet_wrap_string(def->source), flags);
  ------------------
  |  |  848|   281k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|   281k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   281k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   281k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18891|       |
18892|       |    /* marshal constants */
18893|  1.06M|    for (int32_t i = 0; i < def->constants_length; i++)
  ------------------
  |  Branch (18893:25): [True: 773k, False: 292k]
  ------------------
18894|   773k|        marshal_one(st, def->constants[i], flags + 1);
18895|       |
18896|       |    /* Marshal symbol map, if needed */
18897|  2.11M|    for (int32_t i = 0; i < def->symbolmap_length; i++) {
  ------------------
  |  Branch (18897:25): [True: 1.82M, False: 292k]
  ------------------
18898|  1.82M|        pushint(st, (int32_t) def->symbolmap[i].birth_pc);
18899|  1.82M|        pushint(st, (int32_t) def->symbolmap[i].death_pc);
18900|  1.82M|        pushint(st, (int32_t) def->symbolmap[i].slot_index);
18901|  1.82M|        marshal_one(st, janet_wrap_symbol(def->symbolmap[i].symbol), flags + 1);
  ------------------
  |  |  849|  1.82M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|  1.82M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.82M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.82M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18902|  1.82M|    }
18903|       |
18904|       |    /* marshal the bytecode */
18905|   292k|    janet_marshal_u32s(st, def->bytecode, def->bytecode_length);
18906|       |
18907|       |    /* marshal the environments if needed */
18908|   357k|    for (int32_t i = 0; i < def->environments_length; i++)
  ------------------
  |  Branch (18908:25): [True: 65.3k, False: 292k]
  ------------------
18909|  65.3k|        pushint(st, def->environments[i]);
18910|       |
18911|       |    /* marshal the sub funcdefs if needed */
18912|   454k|    for (int32_t i = 0; i < def->defs_length; i++)
  ------------------
  |  Branch (18912:25): [True: 161k, False: 292k]
  ------------------
18913|   161k|        marshal_one_def(st, def->defs[i], flags + 1);
18914|       |
18915|       |    /* marshal source maps if needed */
18916|   292k|    if (def->flags & JANET_FUNCDEF_FLAG_HASSOURCEMAP) {
  ------------------
  |  | 1104|   292k|#define JANET_FUNCDEF_FLAG_HASSOURCEMAP 0x800000
  ------------------
  |  Branch (18916:9): [True: 281k, False: 10.9k]
  ------------------
18917|   281k|        int32_t current = 0;
18918|  5.72M|        for (int32_t i = 0; i < def->bytecode_length; i++) {
  ------------------
  |  Branch (18918:29): [True: 5.44M, False: 281k]
  ------------------
18919|  5.44M|            JanetSourceMapping map = def->sourcemap[i];
18920|  5.44M|            pushint(st, map.line - current);
18921|  5.44M|            pushint(st, map.column);
18922|  5.44M|            current = map.line;
18923|  5.44M|        }
18924|   281k|    }
18925|       |
18926|       |    /* Marshal closure bitset, if needed */
18927|   292k|    if (def->flags & JANET_FUNCDEF_FLAG_HASCLOBITSET) {
  ------------------
  |  | 1106|   292k|#define JANET_FUNCDEF_FLAG_HASCLOBITSET 0x2000000
  ------------------
  |  Branch (18927:9): [True: 19.4k, False: 272k]
  ------------------
18928|  19.4k|        janet_marshal_u32s(st, def->closure_bitset, ((def->slotcount + 31) >> 5));
18929|  19.4k|    }
18930|   292k|}
janet.c:janet_marshal_u32s:
18850|   311k|static void janet_marshal_u32s(MarshalState *st, const uint32_t *u32s, int32_t n) {
18851|  5.90M|    for (int32_t i = 0; i < n; i++) {
  ------------------
  |  Branch (18851:25): [True: 5.59M, False: 311k]
  ------------------
18852|  5.59M|        pushbyte(st, u32s[i] & 0xFF);
18853|  5.59M|        pushbyte(st, (u32s[i] >> 8) & 0xFF);
18854|  5.59M|        pushbyte(st, (u32s[i] >> 16) & 0xFF);
18855|  5.59M|        pushbyte(st, (u32s[i] >> 24) & 0xFF);
18856|  5.59M|    }
18857|   311k|}
janet.c:marshal_one_env:
18809|  14.1k|static void marshal_one_env(MarshalState *st, JanetFuncEnv *env, int flags) {
18810|  14.1k|    MARSH_STACKCHECK;
  ------------------
  |  |18793|  14.1k|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  296|  14.1k|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (18793:30): [True: 0, False: 14.1k]
  |  |  ------------------
  ------------------
18811|  81.5k|    for (int32_t i = 0; i < janet_v_count(st->seen_envs); i++) {
  ------------------
  |  |  714|  81.5k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  81.1k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  81.1k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 81.1k, False: 330]
  |  |  ------------------
  ------------------
  |  Branch (18811:25): [True: 78.8k, False: 2.64k]
  ------------------
18812|  78.8k|        if (st->seen_envs[i] == env) {
  ------------------
  |  Branch (18812:13): [True: 11.5k, False: 67.3k]
  ------------------
18813|  11.5k|            pushbyte(st, LB_FUNCENV_REF);
18814|  11.5k|            pushint(st, i);
18815|  11.5k|            return;
18816|  11.5k|        }
18817|  78.8k|    }
18818|  2.64k|    janet_env_valid(env);
18819|  2.64k|    janet_v_push(st->seen_envs, env);
  ------------------
  |  |  712|  2.64k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  2.64k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  2.64k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  2.31k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  2.31k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  2.31k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  2.31k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 330, False: 2.31k]
  |  |  |  |  |  |  |  Branch (723:50): [True: 1.32k, False: 990]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|  1.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))
  |  |  ------------------
  |  |  |  |  721|  2.64k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  2.64k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18820|       |
18821|       |    /* Special case for early detachment */
18822|  2.64k|    if (env->offset > 0 && fiber_cannot_be_marshalled(env->as.fiber)) {
  ------------------
  |  Branch (18822:9): [True: 0, False: 2.64k]
  |  Branch (18822:28): [True: 0, False: 0]
  ------------------
18823|      0|        pushint(st, 0);
18824|      0|        pushint(st, env->length);
18825|      0|        Janet *values = env->as.fiber->data + env->offset;
18826|      0|        uint32_t *bitset = janet_stack_frame(values)->func->def->closure_bitset;
  ------------------
  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
18827|      0|        for (int32_t i = 0; i < env->length; i++) {
  ------------------
  |  Branch (18827:29): [True: 0, False: 0]
  ------------------
18828|      0|            if (1 & (bitset[i >> 5] >> (i & 0x1F))) {
  ------------------
  |  Branch (18828:17): [True: 0, False: 0]
  ------------------
18829|      0|                marshal_one(st, values[i], flags + 1);
18830|      0|            } else {
18831|      0|                pushbyte(st, LB_NIL);
18832|      0|            }
18833|      0|        }
18834|  2.64k|    } else {
18835|  2.64k|        janet_env_maybe_detach(env);
18836|  2.64k|        pushint(st, env->offset);
18837|  2.64k|        pushint(st, env->length);
18838|  2.64k|        if (env->offset > 0) {
  ------------------
  |  Branch (18838:13): [True: 0, False: 2.64k]
  ------------------
18839|       |            /* On stack variant */
18840|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18841|  2.64k|        } else {
18842|       |            /* Off stack variant */
18843|  33.9k|            for (int32_t i = 0; i < env->length; i++)
  ------------------
  |  Branch (18843:33): [True: 31.3k, False: 2.64k]
  ------------------
18844|  31.3k|                marshal_one(st, env->as.values[i], flags + 1);
18845|  2.64k|        }
18846|  2.64k|    }
18847|  2.64k|}
janet.c:marshal_one_fiber:
18937|    331|static void marshal_one_fiber(MarshalState *st, JanetFiber *fiber, int flags) {
18938|    331|    MARSH_STACKCHECK;
  ------------------
  |  |18793|    331|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  296|    331|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (18793:30): [True: 0, False: 331]
  |  |  ------------------
  ------------------
18939|    331|    int32_t fflags = fiber->flags;
18940|    331|    if (fiber->child) fflags |= JANET_FIBER_FLAG_HASCHILD;
  ------------------
  |  |18932|      0|#define JANET_FIBER_FLAG_HASCHILD (1 << 29)
  ------------------
  |  Branch (18940:9): [True: 0, False: 331]
  ------------------
18941|    331|    if (fiber->env) fflags |= JANET_FIBER_FLAG_HASENV;
  ------------------
  |  |18933|    331|#define JANET_FIBER_FLAG_HASENV   (1 << 30)
  ------------------
  |  Branch (18941:9): [True: 331, False: 0]
  ------------------
18942|    331|    if (janet_fiber_status(fiber) == JANET_STATUS_ALIVE)
  ------------------
  |  Branch (18942:9): [True: 0, False: 331]
  ------------------
18943|      0|        janet_panic("cannot marshal alive fiber");
18944|    331|    pushint(st, fflags);
18945|    331|    pushint(st, fiber->frame);
18946|    331|    pushint(st, fiber->stackstart);
18947|    331|    pushint(st, fiber->stacktop);
18948|    331|    pushint(st, fiber->maxstack);
18949|       |    /* Do frames */
18950|    331|    int32_t i = fiber->frame;
18951|    331|    int32_t j = fiber->stackstart - JANET_FRAME_SIZE;
  ------------------
  |  | 1026|    331|#define JANET_FRAME_SIZE 4
  ------------------
18952|    662|    while (i > 0) {
  ------------------
  |  Branch (18952:12): [True: 331, False: 331]
  ------------------
18953|    331|        JanetStackFrame *frame = (JanetStackFrame *)(fiber->data + i - JANET_FRAME_SIZE);
  ------------------
  |  | 1026|    331|#define JANET_FRAME_SIZE 4
  ------------------
18954|    331|        if (frame->env) frame->flags |= JANET_STACKFRAME_HASENV;
  ------------------
  |  |18934|      0|#define JANET_STACKFRAME_HASENV   (INT32_MIN)
  ------------------
  |  Branch (18954:13): [True: 0, False: 331]
  ------------------
18955|    331|        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 (18955:13): [True: 0, False: 331]
  ------------------
18956|    331|        pushint(st, frame->flags);
18957|    331|        pushint(st, frame->prevframe);
18958|    331|        int32_t pcdiff = (int32_t)(frame->pc - frame->func->def->bytecode);
18959|    331|        pushint(st, pcdiff);
18960|    331|        marshal_one(st, janet_wrap_function(frame->func), flags + 1);
  ------------------
  |  |  852|    331|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  825|    331|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    331|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    331|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18961|    331|        if (frame->env) marshal_one_env(st, frame->env, flags + 1);
  ------------------
  |  Branch (18961:13): [True: 0, False: 331]
  ------------------
18962|       |        /* Marshal all values in the stack frame */
18963|   125k|        for (int32_t k = i; k < j; k++)
  ------------------
  |  Branch (18963:29): [True: 125k, False: 331]
  ------------------
18964|   125k|            marshal_one(st, fiber->data[k], flags + 1);
18965|    331|        j = i - JANET_FRAME_SIZE;
  ------------------
  |  | 1026|    331|#define JANET_FRAME_SIZE 4
  ------------------
18966|    331|        i = frame->prevframe;
18967|    331|    }
18968|    331|    if (fiber->env) {
  ------------------
  |  Branch (18968:9): [True: 331, False: 0]
  ------------------
18969|    331|        marshal_one(st, janet_wrap_table(fiber->env), flags + 1);
  ------------------
  |  |  846|    331|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|    331|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    331|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    331|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18970|    331|    }
18971|    331|    if (fiber->child)
  ------------------
  |  Branch (18971:9): [True: 0, False: 331]
  ------------------
18972|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18973|    331|    marshal_one(st, fiber->last_value, flags + 1);
18974|    331|}
janet.c:readint:
19326|   524M|static int32_t readint(UnmarshalState *st, const uint8_t **atdata) {
19327|   524M|    const uint8_t *data = *atdata;
19328|   524M|    int32_t ret;
19329|   524M|    MARSH_EOS(st, data);
  ------------------
  |  |19321|   524M|#define MARSH_EOS(st, data) do { \
  |  |19322|   524M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19322:9): [True: 1, False: 524M]
  |  |  ------------------
  |  |19323|   524M|} while (0)
  |  |  ------------------
  |  |  |  Branch (19323:10): [Folded, False: 524M]
  |  |  ------------------
  ------------------
19330|   524M|    if (*data < 128) {
  ------------------
  |  Branch (19330:9): [True: 426M, False: 97.9M]
  ------------------
19331|   426M|        ret = *data++;
19332|   426M|    } else if (*data < 192) {
  ------------------
  |  Branch (19332:16): [True: 93.1M, False: 4.84M]
  ------------------
19333|  93.1M|        MARSH_EOS(st, data + 1);
  ------------------
  |  |19321|  93.1M|#define MARSH_EOS(st, data) do { \
  |  |19322|  93.1M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19322:9): [True: 0, False: 93.1M]
  |  |  ------------------
  |  |19323|  93.1M|} while (0)
  |  |  ------------------
  |  |  |  Branch (19323:10): [Folded, False: 93.1M]
  |  |  ------------------
  ------------------
19334|  93.1M|        uint32_t uret = ((data[0] & 0x3F) << 8) + data[1];
19335|       |        /* Sign extend 18 MSBs */
19336|  93.1M|        uret |= (uret >> 13) ? 0xFFFFC000 : 0;
  ------------------
  |  Branch (19336:17): [True: 24.9M, False: 68.1M]
  ------------------
19337|  93.1M|        ret = (int32_t)uret;
19338|  93.1M|        data += 2;
19339|  93.1M|    } else if (*data == LB_INTEGER) {
  ------------------
  |  Branch (19339:16): [True: 5.40M, False: 18.4E]
  ------------------
19340|  5.40M|        MARSH_EOS(st, data + 4);
  ------------------
  |  |19321|  5.40M|#define MARSH_EOS(st, data) do { \
  |  |19322|  5.40M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19322:9): [True: 1, False: 5.40M]
  |  |  ------------------
  |  |19323|  5.40M|} while (0)
  |  |  ------------------
  |  |  |  Branch (19323:10): [Folded, False: 5.40M]
  |  |  ------------------
  ------------------
19341|  5.40M|        uint32_t ui = ((uint32_t)(data[1]) << 24) |
19342|  5.40M|                      ((uint32_t)(data[2]) << 16) |
19343|  5.40M|                      ((uint32_t)(data[3]) << 8) |
19344|  5.40M|                      (uint32_t)(data[4]);
19345|  5.40M|        ret = (int32_t)ui;
19346|  5.40M|        data += 5;
19347|  18.4E|    } else {
19348|  18.4E|        janet_panicf("expected integer, got byte %x at index %d",
19349|  18.4E|                     *data,
19350|  18.4E|                     data - st->start);
19351|      0|        ret = 0;
19352|      0|    }
19353|   525M|    *atdata = data;
19354|   525M|    return ret;
19355|   524M|}
janet.c:read64:
19367|  1.00k|static uint64_t read64(UnmarshalState *st, const uint8_t **atdata) {
19368|  1.00k|    uint64_t ret;
19369|  1.00k|    const uint8_t *data = *atdata;
19370|  1.00k|    MARSH_EOS(st, data);
  ------------------
  |  |19321|  1.00k|#define MARSH_EOS(st, data) do { \
  |  |19322|  1.00k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19322:9): [True: 0, False: 1.00k]
  |  |  ------------------
  |  |19323|  1.00k|} while (0)
  |  |  ------------------
  |  |  |  Branch (19323:10): [Folded, False: 1.00k]
  |  |  ------------------
  ------------------
19371|  1.00k|    if (*data <= 0xF0) {
  ------------------
  |  Branch (19371:9): [True: 10, False: 995]
  ------------------
19372|       |        /* Single byte */
19373|     10|        ret = *data;
19374|     10|        *atdata = data + 1;
19375|    995|    } else {
19376|       |        /* Multibyte, little endian */
19377|    995|        int nbytes = *data - 0xF0;
19378|    995|        ret = 0;
19379|    995|        if (nbytes > 8) janet_panic("invalid 64 bit integer");
  ------------------
  |  Branch (19379:13): [True: 0, False: 995]
  ------------------
19380|    995|        MARSH_EOS(st, data + nbytes);
  ------------------
  |  |19321|    995|#define MARSH_EOS(st, data) do { \
  |  |19322|    995|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19322:9): [True: 0, False: 995]
  |  |  ------------------
  |  |19323|    995|} while (0)
  |  |  ------------------
  |  |  |  Branch (19323:10): [Folded, False: 995]
  |  |  ------------------
  ------------------
19381|  2.98k|        for (int i = nbytes; i > 0; i--)
  ------------------
  |  Branch (19381:30): [True: 1.99k, False: 995]
  ------------------
19382|  1.99k|            ret = (ret << 8) + data[i];
19383|    995|        *atdata = data + nbytes + 1;
19384|    995|    }
19385|  1.00k|    return ret;
19386|  1.00k|}
janet.c:unmarshal_one:
19933|   139M|    int flags) {
19934|   139M|    uint8_t lead;
19935|   139M|    MARSH_STACKCHECK;
  ------------------
  |  |18793|   139M|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  296|   139M|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (18793:30): [True: 0, False: 139M]
  |  |  ------------------
  ------------------
19936|   139M|    MARSH_EOS(st, data);
  ------------------
  |  |19321|   139M|#define MARSH_EOS(st, data) do { \
  |  |19322|   139M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19322:9): [True: 2, False: 139M]
  |  |  ------------------
  |  |19323|   139M|} while (0)
  |  |  ------------------
  |  |  |  Branch (19323:10): [Folded, False: 139M]
  |  |  ------------------
  ------------------
19937|   139M|    lead = data[0];
19938|   139M|    if (lead < LB_REAL) {
  ------------------
  |  Branch (19938:9): [True: 10.3M, False: 129M]
  ------------------
19939|  10.3M|        *out = janet_wrap_integer(readint(st, &data));
  ------------------
  |  |  967|  10.3M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  10.3M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
19940|  10.3M|        return data;
19941|  10.3M|    }
19942|   129M|    switch (lead) {
19943|   568k|        case LB_NIL:
  ------------------
  |  Branch (19943:9): [True: 568k, False: 128M]
  ------------------
19944|   568k|            *out = janet_wrap_nil();
  ------------------
  |  |  831|   568k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   568k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   568k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   568k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19945|   568k|            return data + 1;
19946|    101|        case LB_FALSE:
  ------------------
  |  Branch (19946:9): [True: 101, False: 129M]
  ------------------
19947|    101|            *out = janet_wrap_false();
  ------------------
  |  |  833|    101|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|    101|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    101|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    101|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19948|    101|            return data + 1;
19949|   989k|        case LB_TRUE:
  ------------------
  |  Branch (19949:9): [True: 989k, False: 128M]
  ------------------
19950|   989k|            *out = janet_wrap_true();
  ------------------
  |  |  832|   989k|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  822|   989k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   989k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   989k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19951|   989k|            return data + 1;
19952|  22.5k|        case LB_INTEGER:
  ------------------
  |  Branch (19952:9): [True: 22.5k, False: 129M]
  ------------------
19953|       |            /* Long integer */
19954|  22.5k|            MARSH_EOS(st, data + 4);
  ------------------
  |  |19321|  22.5k|#define MARSH_EOS(st, data) do { \
  |  |19322|  22.5k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19322:9): [True: 0, False: 22.5k]
  |  |  ------------------
  |  |19323|  22.5k|} while (0)
  |  |  ------------------
  |  |  |  Branch (19323:10): [Folded, False: 22.5k]
  |  |  ------------------
  ------------------
19955|  22.5k|            uint32_t ui = ((uint32_t)(data[4])) |
19956|  22.5k|                          ((uint32_t)(data[3]) << 8) |
19957|  22.5k|                          ((uint32_t)(data[2]) << 16) |
19958|  22.5k|                          ((uint32_t)(data[1]) << 24);
19959|  22.5k|            int32_t si = (int32_t)ui;
19960|  22.5k|            *out = janet_wrap_integer(si);
  ------------------
  |  |  967|  22.5k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  22.5k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
19961|  22.5k|            return data + 5;
19962|  52.5k|        case LB_REAL:
  ------------------
  |  Branch (19962:9): [True: 52.5k, False: 129M]
  ------------------
19963|       |            /* Real */
19964|  52.5k|        {
19965|  52.5k|            union {
19966|  52.5k|                double d;
19967|  52.5k|                uint8_t bytes[8];
19968|  52.5k|            } u;
19969|  52.5k|            MARSH_EOS(st, data + 8);
  ------------------
  |  |19321|  52.5k|#define MARSH_EOS(st, data) do { \
  |  |19322|  52.5k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19322:9): [True: 3, False: 52.5k]
  |  |  ------------------
  |  |19323|  52.5k|} while (0)
  |  |  ------------------
  |  |  |  Branch (19323:10): [Folded, False: 52.5k]
  |  |  ------------------
  ------------------
19970|       |#ifdef JANET_BIG_ENDIAN
19971|       |            u.bytes[0] = data[8];
19972|       |            u.bytes[1] = data[7];
19973|       |            u.bytes[2] = data[6];
19974|       |            u.bytes[3] = data[5];
19975|       |            u.bytes[4] = data[4];
19976|       |            u.bytes[5] = data[3];
19977|       |            u.bytes[6] = data[2];
19978|       |            u.bytes[7] = data[1];
19979|       |#else
19980|  52.5k|            memcpy(&u.bytes, data + 1, sizeof(double));
19981|  52.5k|#endif
19982|  52.5k|            *out = janet_wrap_number_safe(u.d);
19983|  52.5k|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  712|  52.5k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  52.5k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  52.5k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  52.4k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  52.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  52.4k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  52.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 5, False: 52.4k]
  |  |  |  |  |  |  |  Branch (723:50): [True: 20, False: 52.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|     25|#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))
  |  |  ------------------
  |  |  |  |  721|  52.5k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  52.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19984|  52.5k|            return data + 9;
19985|  52.5k|        }
19986|  11.0M|        case LB_STRING:
  ------------------
  |  Branch (19986:9): [True: 11.0M, False: 118M]
  ------------------
19987|  25.3M|        case LB_SYMBOL:
  ------------------
  |  Branch (19987:9): [True: 14.2M, False: 115M]
  ------------------
19988|  25.3M|        case LB_BUFFER:
  ------------------
  |  Branch (19988:9): [True: 7.49k, False: 129M]
  ------------------
19989|  27.1M|        case LB_KEYWORD:
  ------------------
  |  Branch (19989:9): [True: 1.77M, False: 127M]
  ------------------
19990|  29.6M|        case LB_REGISTRY: {
  ------------------
  |  Branch (19990:9): [True: 2.54M, False: 126M]
  ------------------
19991|  29.6M|            data++;
19992|  29.6M|            int32_t len = readnat(st, &data);
19993|  29.6M|            MARSH_EOS(st, data - 1 + len);
  ------------------
  |  |19321|  29.6M|#define MARSH_EOS(st, data) do { \
  |  |19322|  29.6M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19322:9): [True: 3, False: 29.6M]
  |  |  ------------------
  |  |19323|  29.6M|} while (0)
  |  |  ------------------
  |  |  |  Branch (19323:10): [Folded, False: 29.6M]
  |  |  ------------------
  ------------------
19994|  29.6M|            if (lead == LB_STRING) {
  ------------------
  |  Branch (19994:17): [True: 11.0M, False: 18.6M]
  ------------------
19995|  11.0M|                const uint8_t *str = janet_string(data, len);
19996|  11.0M|                *out = janet_wrap_string(str);
  ------------------
  |  |  848|  11.0M|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  11.0M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  11.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  11.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19997|  18.6M|            } else if (lead == LB_SYMBOL) {
  ------------------
  |  Branch (19997:24): [True: 14.2M, False: 4.32M]
  ------------------
19998|  14.2M|                const uint8_t *str = janet_symbol(data, len);
19999|  14.2M|                *out = janet_wrap_symbol(str);
  ------------------
  |  |  849|  14.2M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|  14.2M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  14.2M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  14.2M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20000|  14.2M|            } else if (lead == LB_KEYWORD) {
  ------------------
  |  Branch (20000:24): [True: 1.77M, False: 2.55M]
  ------------------
20001|  1.77M|                const uint8_t *str = janet_keyword(data, len);
  ------------------
  |  | 1839|  1.77M|#define janet_keyword janet_symbol
  ------------------
20002|  1.77M|                *out = janet_wrap_keyword(str);
  ------------------
  |  |  850|  1.77M|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  ------------------
  |  |  |  |  828|  1.77M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.77M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.77M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20003|  2.55M|            } else if (lead == LB_REGISTRY) {
  ------------------
  |  Branch (20003:24): [True: 2.54M, False: 7.04k]
  ------------------
20004|  2.54M|                if (st->reg) {
  ------------------
  |  Branch (20004:21): [True: 2.54M, False: 1]
  ------------------
20005|  2.54M|                    Janet regkey = janet_symbolv(data, len);
  ------------------
  |  | 1835|  2.54M|#define janet_symbolv(str, len) janet_wrap_symbol(janet_symbol((str), (len)))
  |  |  ------------------
  |  |  |  |  849|  2.54M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  2.54M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  2.54M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  2.54M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20006|  2.54M|                    *out = janet_table_get(st->reg, regkey);
20007|  2.54M|                } else {
20008|      1|                    *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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20009|      1|                }
20010|  2.54M|            } else { /* (lead == LB_BUFFER) */
20011|  7.04k|                JanetBuffer *buffer = janet_buffer(len);
20012|  7.04k|                buffer->count = len;
20013|  7.04k|                safe_memcpy(buffer->data, data, len);
20014|  7.04k|                *out = janet_wrap_buffer(buffer);
  ------------------
  |  |  847|  7.04k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|  7.04k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20015|  7.04k|            }
20016|  29.6M|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  712|  29.6M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  29.6M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  29.6M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  29.6M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  29.6M|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  29.6M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  29.6M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 2.98k, False: 29.6M]
  |  |  |  |  |  |  |  Branch (723:50): [True: 77.0k, False: 29.5M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|  77.3k|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  721|  29.6M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  29.6M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20017|  29.6M|            return data + len;
20018|  29.6M|        }
20019|    342|        case LB_FIBER: {
  ------------------
  |  Branch (20019:9): [True: 342, False: 129M]
  ------------------
20020|    342|            JanetFiber *fiber;
20021|    342|            data = unmarshal_one_fiber(st, data + 1, &fiber, flags + 1);
20022|    342|            *out = janet_wrap_fiber(fiber);
  ------------------
  |  |  844|    342|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|    342|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    342|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    342|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20023|    342|            return data;
20024|  29.6M|        }
20025|  2.87M|        case LB_FUNCTION: {
  ------------------
  |  Branch (20025:9): [True: 2.87M, False: 126M]
  ------------------
20026|  2.87M|            JanetFunction *func;
20027|  2.87M|            JanetFuncDef *def;
20028|  2.87M|            data++;
20029|  2.87M|            int32_t len = readnat(st, &data);
20030|  2.87M|            if (len > 255) {
  ------------------
  |  Branch (20030:17): [True: 1, False: 2.87M]
  ------------------
20031|      1|                janet_panicf("invalid function - too many environments (%d)", len);
20032|      1|            }
20033|  2.87M|            func = janet_gcalloc(JANET_MEMORY_FUNCTION, sizeof(JanetFunction) +
20034|  2.87M|                                 len * sizeof(JanetFuncEnv));
20035|  2.87M|            func->def = NULL;
20036|  3.19M|            for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (20036:33): [True: 322k, False: 2.87M]
  ------------------
20037|   322k|                func->envs[i] = NULL;
20038|   322k|            }
20039|  2.87M|            *out = janet_wrap_function(func);
  ------------------
  |  |  852|  2.87M|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  825|  2.87M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.87M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.87M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20040|  2.87M|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  712|  2.87M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  2.87M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  2.87M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  2.87M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  2.87M|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  2.87M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  2.87M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 196, False: 2.87M]
  |  |  |  |  |  |  |  Branch (723:50): [True: 7.82k, False: 2.86M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|  8.06k|#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))
  |  |  ------------------
  |  |  |  |  721|  2.87M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  2.87M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20041|  2.87M|            data = unmarshal_one_def(st, data, &def, flags + 1);
20042|  2.87M|            func->def = def;
20043|  3.19M|            for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (20043:33): [True: 322k, False: 2.87M]
  ------------------
20044|   322k|                data = unmarshal_one_env(st, data, &(func->envs[i]), flags + 1);
20045|   322k|            }
20046|  2.87M|            return data;
20047|  2.87M|        }
20048|  1.00k|        case LB_ABSTRACT: {
  ------------------
  |  Branch (20048:9): [True: 1.00k, False: 129M]
  ------------------
20049|  1.00k|            data++;
20050|  1.00k|            return unmarshal_one_abstract(st, data, out, flags);
20051|  2.87M|        }
20052|  83.9M|        case LB_REFERENCE:
  ------------------
  |  Branch (20052:9): [True: 83.9M, False: 45.3M]
  ------------------
20053|  83.9M|        case LB_ARRAY:
  ------------------
  |  Branch (20053:9): [True: 22.4k, False: 129M]
  ------------------
20054|  83.9M|        case LB_ARRAY_WEAK:
  ------------------
  |  Branch (20054:9): [True: 12, False: 129M]
  ------------------
20055|  89.6M|        case LB_TUPLE:
  ------------------
  |  Branch (20055:9): [True: 5.62M, False: 123M]
  ------------------
20056|  89.6M|        case LB_STRUCT:
  ------------------
  |  Branch (20056:9): [True: 52.4k, False: 129M]
  ------------------
20057|  89.6M|        case LB_STRUCT_PROTO:
  ------------------
  |  Branch (20057:9): [True: 8, False: 129M]
  ------------------
20058|  95.1M|        case LB_TABLE:
  ------------------
  |  Branch (20058:9): [True: 5.47M, False: 123M]
  ------------------
20059|  95.1M|        case LB_TABLE_PROTO:
  ------------------
  |  Branch (20059:9): [True: 3, False: 129M]
  ------------------
20060|  95.1M|        case LB_TABLE_WEAKK:
  ------------------
  |  Branch (20060:9): [True: 2, False: 129M]
  ------------------
20061|  95.1M|        case LB_TABLE_WEAKV:
  ------------------
  |  Branch (20061:9): [True: 19, False: 129M]
  ------------------
20062|  95.1M|        case LB_TABLE_WEAKKV:
  ------------------
  |  Branch (20062:9): [True: 5, False: 129M]
  ------------------
20063|  95.1M|        case LB_TABLE_WEAKK_PROTO:
  ------------------
  |  Branch (20063:9): [True: 4, False: 129M]
  ------------------
20064|  95.1M|        case LB_TABLE_WEAKV_PROTO:
  ------------------
  |  Branch (20064:9): [True: 1, False: 129M]
  ------------------
20065|  95.1M|        case LB_TABLE_WEAKKV_PROTO:
  ------------------
  |  Branch (20065:9): [True: 1, False: 129M]
  ------------------
20066|       |            /* Things that open with integers */
20067|  95.1M|        {
20068|  95.1M|            data++;
20069|  95.1M|            int32_t len = readnat(st, &data);
20070|       |            /* DOS check */
20071|  95.1M|            if (lead != LB_REFERENCE) {
  ------------------
  |  Branch (20071:17): [True: 11.1M, False: 83.9M]
  ------------------
20072|  11.1M|                MARSH_EOS(st, data - 1 + len);
  ------------------
  |  |19321|  11.1M|#define MARSH_EOS(st, data) do { \
  |  |19322|  11.1M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19322:9): [True: 1, False: 11.1M]
  |  |  ------------------
  |  |19323|  11.1M|} while (0)
  |  |  ------------------
  |  |  |  Branch (19323:10): [Folded, False: 11.1M]
  |  |  ------------------
  ------------------
20073|  11.1M|            }
20074|  95.1M|            if (lead == LB_ARRAY || lead == LB_ARRAY_WEAK) {
  ------------------
  |  Branch (20074:17): [True: 32.4k, False: 95.1M]
  |  Branch (20074:37): [True: 922, False: 95.1M]
  ------------------
20075|       |                /* Array */
20076|  22.4k|                JanetArray *array = (lead == LB_ARRAY_WEAK) ? janet_array_weak(len) : janet_array(len);
  ------------------
  |  Branch (20076:37): [True: 10, False: 22.4k]
  ------------------
20077|  22.4k|                array->count = len;
20078|  22.4k|                *out = janet_wrap_array(array);
  ------------------
  |  |  845|  22.4k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  22.4k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  22.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  22.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20079|  22.4k|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  712|  22.4k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  22.4k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  22.4k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  22.4k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  22.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  22.4k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  22.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 6, False: 22.4k]
  |  |  |  |  |  |  |  Branch (723:50): [True: 9, False: 22.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|     15|#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))
  |  |  ------------------
  |  |  |  |  721|  22.4k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  22.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20080|   194k|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (20080:37): [True: 172k, False: 22.4k]
  ------------------
20081|   172k|                    data = unmarshal_one(st, data, array->data + i, flags + 1);
20082|   172k|                }
20083|  95.1M|            } else if (lead == LB_TUPLE) {
  ------------------
  |  Branch (20083:24): [True: 5.62M, False: 89.4M]
  ------------------
20084|       |                /* Tuple */
20085|  5.62M|                Janet *tup = janet_tuple_begin(len);
20086|  5.62M|                int32_t flag = readint(st, &data);
20087|  5.62M|                janet_tuple_flag(tup) |= (int32_t) (((uint32_t) flag) << 16); /* Avoid left shift of negative value */
  ------------------
  |  | 1805|  5.62M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1799|  5.62M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
20088|  22.2M|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (20088:37): [True: 16.6M, False: 5.62M]
  ------------------
20089|  16.6M|                    data = unmarshal_one(st, data, tup + i, flags + 1);
20090|  16.6M|                }
20091|  5.62M|                *out = janet_wrap_tuple(janet_tuple_end(tup));
  ------------------
  |  |  843|  5.62M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  5.62M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.62M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.62M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20092|  5.62M|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  712|  5.62M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  5.62M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  5.62M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  5.62M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  5.62M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  5.62M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  5.62M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 18.4E, False: 5.62M]
  |  |  |  |  |  |  |  Branch (723:50): [True: 269, False: 5.62M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|    275|#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))
  |  |  ------------------
  |  |  |  |  721|  5.62M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  5.62M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20093|  89.4M|            } else if (lead == LB_STRUCT || lead == LB_STRUCT_PROTO) {
  ------------------
  |  Branch (20093:24): [True: 53.4k, False: 89.4M]
  |  Branch (20093:45): [True: 18.4E, False: 89.4M]
  ------------------
20094|       |                /* Struct */
20095|  52.4k|                JanetKV *struct_ = janet_struct_begin(len);
20096|  52.4k|                if (lead == LB_STRUCT_PROTO) {
  ------------------
  |  Branch (20096:21): [True: 7, False: 52.4k]
  ------------------
20097|      7|                    Janet proto;
20098|      7|                    data = unmarshal_one(st, data, &proto, flags + 1);
20099|      7|                    janet_asserttype(proto, JANET_STRUCT, st);
20100|      7|                    janet_struct_proto(struct_) = janet_unwrap_struct(proto);
  ------------------
  |  | 1850|      7|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1845|      7|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                                  janet_struct_proto(struct_) = janet_unwrap_struct(proto);
  ------------------
  |  |  857|      7|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
20101|      7|                }
20102|   397k|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (20102:37): [True: 344k, False: 52.4k]
  ------------------
20103|   344k|                    Janet key, value;
20104|   344k|                    data = unmarshal_one(st, data, &key, flags + 1);
20105|   344k|                    data = unmarshal_one(st, data, &value, flags + 1);
20106|   344k|                    janet_struct_put(struct_, key, value);
20107|   344k|                }
20108|  52.4k|                *out = janet_wrap_struct(janet_struct_end(struct_));
  ------------------
  |  |  842|  52.4k|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|  52.4k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  52.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  52.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20109|  52.4k|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  712|  52.4k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  52.4k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  52.4k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  52.4k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  52.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  52.4k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  52.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 11, False: 52.4k]
  |  |  |  |  |  |  |  Branch (723:50): [True: 10, False: 52.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|     17|#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))
  |  |  ------------------
  |  |  |  |  721|  52.4k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  52.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20110|  89.4M|            } else if (lead == LB_REFERENCE) {
  ------------------
  |  Branch (20110:24): [True: 83.9M, False: 5.46M]
  ------------------
20111|  83.9M|                if (len >= janet_v_count(st->lookup))
  ------------------
  |  |  714|  18.4E|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  83.9M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  83.9M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 83.9M, False: 18.4E]
  |  |  ------------------
  ------------------
  |  Branch (20111:21): [True: 0, False: 83.9M]
  ------------------
20112|      0|                    janet_panicf("invalid reference %d", len);
20113|  83.9M|                *out = st->lookup[len];
20114|  83.9M|            } else {
20115|       |                /* Table */
20116|  5.46M|                JanetTable *t;
20117|  5.47M|                if (lead == LB_TABLE_WEAKK_PROTO || lead == LB_TABLE_WEAKK) {
  ------------------
  |  Branch (20117:21): [True: 18.4E, False: 5.47M]
  |  Branch (20117:53): [True: 18.4E, False: 5.47M]
  ------------------
20118|      5|                    t = janet_table_weakk(len);
20119|  5.47M|                } else if (lead == LB_TABLE_WEAKV_PROTO || lead == LB_TABLE_WEAKV) {
  ------------------
  |  Branch (20119:28): [True: 18.4E, False: 5.47M]
  |  Branch (20119:60): [True: 14, False: 5.47M]
  ------------------
20120|     19|                    t = janet_table_weakv(len);
20121|  5.47M|                } else if (lead == LB_TABLE_WEAKKV_PROTO || lead == LB_TABLE_WEAKKV) {
  ------------------
  |  Branch (20121:28): [True: 18.4E, False: 5.47M]
  |  Branch (20121:61): [True: 5, False: 5.47M]
  ------------------
20122|      6|                    t = janet_table_weakkv(len);
20123|  5.46M|                } else {
20124|  5.46M|                    t = janet_table(len);
20125|  5.46M|                }
20126|  5.46M|                *out = janet_wrap_table(t);
  ------------------
  |  |  846|  5.46M|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|  5.46M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.46M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.46M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20127|  5.46M|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  712|  5.46M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  5.46M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  5.46M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  5.46M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  5.46M|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  5.46M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  5.46M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 18.4E, False: 5.46M]
  |  |  |  |  |  |  |  Branch (723:50): [True: 14.4k, False: 5.44M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|  22.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))
  |  |  ------------------
  |  |  |  |  721|  5.46M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  5.46M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20128|  5.46M|                if (lead == LB_TABLE_PROTO || lead == LB_TABLE_WEAKK_PROTO || lead == LB_TABLE_WEAKV_PROTO || lead == LB_TABLE_WEAKKV_PROTO) {
  ------------------
  |  Branch (20128:21): [True: 18.4E, False: 5.46M]
  |  Branch (20128:47): [True: 15, False: 5.46M]
  |  Branch (20128:79): [True: 2, False: 5.46M]
  |  Branch (20128:111): [True: 1, False: 5.46M]
  ------------------
20129|      7|                    Janet proto;
20130|      7|                    data = unmarshal_one(st, data, &proto, flags + 1);
20131|      7|                    janet_asserttype(proto, JANET_TABLE, st);
20132|      7|                    t->proto = janet_unwrap_table(proto);
  ------------------
  |  |  861|      7|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
20133|      7|                }
20134|  33.2M|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (20134:37): [True: 27.7M, False: 5.46M]
  ------------------
20135|  27.7M|                    Janet key, value;
20136|  27.7M|                    data = unmarshal_one(st, data, &key, flags + 1);
20137|  27.7M|                    data = unmarshal_one(st, data, &value, flags + 1);
20138|  27.7M|                    janet_table_put(t, key, value);
20139|  27.7M|                }
20140|  5.46M|            }
20141|  95.1M|            return data;
20142|  95.1M|        }
20143|  4.30k|        case LB_UNSAFE_POINTER: {
  ------------------
  |  Branch (20143:9): [True: 4.30k, False: 129M]
  ------------------
20144|  4.30k|            MARSH_EOS(st, data + sizeof(void *));
  ------------------
  |  |19321|  4.30k|#define MARSH_EOS(st, data) do { \
  |  |19322|  4.30k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19322:9): [True: 0, False: 4.30k]
  |  |  ------------------
  |  |19323|  4.30k|} while (0)
  |  |  ------------------
  |  |  |  Branch (19323:10): [Folded, False: 4.30k]
  |  |  ------------------
  ------------------
20145|  4.30k|            data++;
20146|  4.30k|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1910|  4.30k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (20146:17): [True: 0, False: 4.30k]
  ------------------
20147|      0|                janet_panicf("unsafe flag not given, "
20148|      0|                             "will not unmarshal raw pointer at index %d",
20149|      0|                             (int)(data - st->start));
20150|      0|            }
20151|  4.30k|            union {
20152|  4.30k|                void *ptr;
20153|  4.30k|                uint8_t bytes[sizeof(void *)];
20154|  4.30k|            } u;
20155|  4.30k|            memcpy(u.bytes, data, sizeof(void *));
20156|  4.30k|            data += sizeof(void *);
20157|  4.30k|            *out = janet_wrap_pointer(u.ptr);
  ------------------
  |  |  854|  4.30k|#define janet_wrap_pointer(s) janet_nanbox_wrap_((s), JANET_POINTER)
  |  |  ------------------
  |  |  |  |  825|  4.30k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.30k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.30k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20158|  4.30k|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  712|  4.30k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  4.30k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  4.30k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  4.30k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  4.30k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  4.30k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  4.30k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 0, False: 4.30k]
  |  |  |  |  |  |  |  Branch (723:50): [True: 478, False: 3.82k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|    478|#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))
  |  |  ------------------
  |  |  |  |  721|  4.30k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  4.30k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20159|  4.30k|            return data;
20160|  4.30k|        }
20161|      0|#ifdef JANET_EV
20162|      1|        case LB_POINTER_BUFFER: {
  ------------------
  |  Branch (20162:9): [True: 1, False: 129M]
  ------------------
20163|      1|            data++;
20164|      1|            int32_t count = readnat(st, &data);
20165|      1|            int32_t capacity = readnat(st, &data);
20166|      1|            MARSH_EOS(st, data + sizeof(void *));
  ------------------
  |  |19321|      1|#define MARSH_EOS(st, data) do { \
  |  |19322|      1|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19322:9): [True: 0, False: 1]
  |  |  ------------------
  |  |19323|      1|} while (0)
  |  |  ------------------
  |  |  |  Branch (19323:10): [Folded, False: 1]
  |  |  ------------------
  ------------------
20167|      1|            union {
20168|      1|                void *ptr;
20169|      1|                uint8_t bytes[sizeof(void *)];
20170|      1|            } u;
20171|      1|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1910|      1|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (20171:17): [True: 1, False: 0]
  ------------------
20172|      1|                janet_panicf("unsafe flag not given, "
20173|      1|                             "will not unmarshal raw pointer at index %d",
20174|      1|                             (int)(data - st->start));
20175|      1|            }
20176|      0|            memcpy(u.bytes, data, sizeof(void *));
20177|      0|            data += sizeof(void *);
20178|      0|            JanetBuffer *buffer = janet_pointer_buffer_unsafe(u.ptr, capacity, count);
20179|      0|            *out = janet_wrap_buffer(buffer);
  ------------------
  |  |  847|      0|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20180|      0|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  712|      0|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|      0|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|      0|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|      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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|      0|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (723:50): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|      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))
  |  |  ------------------
  |  |  |  |  721|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20181|      0|            return data;
20182|      1|        }
20183|      0|#endif
20184|   116k|        case LB_UNSAFE_CFUNCTION: {
  ------------------
  |  Branch (20184:9): [True: 116k, False: 129M]
  ------------------
20185|   116k|            MARSH_EOS(st, data + sizeof(JanetCFunction));
  ------------------
  |  |19321|   116k|#define MARSH_EOS(st, data) do { \
  |  |19322|   116k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19322:9): [True: 0, False: 116k]
  |  |  ------------------
  |  |19323|   116k|} while (0)
  |  |  ------------------
  |  |  |  Branch (19323:10): [Folded, False: 116k]
  |  |  ------------------
  ------------------
20186|   116k|            data++;
20187|   116k|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1910|   116k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (20187:17): [True: 0, False: 116k]
  ------------------
20188|      0|                janet_panicf("unsafe flag not given, "
20189|      0|                             "will not unmarshal function pointer at index %d",
20190|      0|                             (int)(data - st->start));
20191|      0|            }
20192|   116k|            union {
20193|   116k|                JanetCFunction ptr;
20194|   116k|                uint8_t bytes[sizeof(JanetCFunction)];
20195|   116k|            } u;
20196|   116k|            memcpy(u.bytes, data, sizeof(JanetCFunction));
20197|   116k|            data += sizeof(JanetCFunction);
20198|   116k|            *out = janet_wrap_cfunction(u.ptr);
  ------------------
  |  |  853|   116k|#define janet_wrap_cfunction(s) janet_nanbox_wrap_((s), JANET_CFUNCTION)
  |  |  ------------------
  |  |  |  |  825|   116k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   116k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   116k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20199|   116k|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  712|   116k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|   116k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|   116k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|   116k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|   116k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|   116k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|   116k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 0, False: 116k]
  |  |  |  |  |  |  |  Branch (723:50): [True: 291, False: 115k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|    291|#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))
  |  |  ------------------
  |  |  |  |  721|   116k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   116k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20200|   116k|            return data;
20201|   116k|        }
20202|      0|#ifdef JANET_EV
20203|      1|        case LB_THREADED_ABSTRACT: {
  ------------------
  |  Branch (20203:9): [True: 1, False: 129M]
  ------------------
20204|      1|            MARSH_EOS(st, data + sizeof(void *));
  ------------------
  |  |19321|      1|#define MARSH_EOS(st, data) do { \
  |  |19322|      1|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19322:9): [True: 1, False: 0]
  |  |  ------------------
  |  |19323|      1|} while (0)
  |  |  ------------------
  |  |  |  Branch (19323:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
20205|      0|            data++;
20206|      0|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1910|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (20206:17): [True: 0, False: 0]
  ------------------
20207|      0|                janet_panicf("unsafe flag not given, "
20208|      0|                             "will not unmarshal threaded abstract pointer at index %d",
20209|      0|                             (int)(data - st->start));
20210|      0|            }
20211|      0|            union {
20212|      0|                void *ptr;
20213|      0|                uint8_t bytes[sizeof(void *)];
20214|      0|            } u;
20215|      0|            memcpy(u.bytes, data, sizeof(void *));
20216|      0|            data += sizeof(void *);
20217|       |
20218|      0|            if (flags & JANET_MARSHAL_DECREF) {
  ------------------
  |  |  387|      0|#define JANET_MARSHAL_DECREF 0x40000
  ------------------
  |  Branch (20218:17): [True: 0, False: 0]
  ------------------
20219|       |                /* Decrement immediately and don't bother putting into heap */
20220|      0|                janet_abstract_decref(u.ptr);
20221|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20222|      0|            } else {
20223|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20224|      0|                Janet check = janet_table_get(&janet_vm.threaded_abstracts, *out);
20225|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20226|       |                    /* Transfers reference from threaded channel buffer to current heap */
20227|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20228|      0|                } else {
20229|       |                    /* Heap reference already accounted for, remove threaded channel reference. */
20230|      0|                    janet_abstract_decref(u.ptr);
20231|      0|                }
20232|      0|            }
20233|       |
20234|      0|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  712|      0|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|      0|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|      0|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|      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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|      0|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (723:50): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|      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))
  |  |  ------------------
  |  |  |  |  721|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20235|      0|            return data;
20236|      0|        }
20237|      0|#endif
20238|      4|        default: {
  ------------------
  |  Branch (20238:9): [True: 4, False: 129M]
  ------------------
20239|      4|            janet_panicf("unknown byte %x at index %d",
20240|      4|                         *data,
20241|      4|                         (int)(data - st->start));
20242|      0|            return NULL;
20243|      0|        }
20244|   129M|    }
20245|   129M|}
janet.c:readnat:
19358|   160M|static int32_t readnat(UnmarshalState *st, const uint8_t **atdata) {
19359|   160M|    int32_t ret = readint(st, atdata);
19360|   160M|    if (ret < 0) {
  ------------------
  |  Branch (19360:9): [True: 8, False: 160M]
  ------------------
19361|      8|        janet_panicf("expected integer >= 0, got %d", ret);
19362|      8|    }
19363|   160M|    return ret;
19364|   160M|}
janet.c:unmarshal_one_fiber:
19676|    342|    int flags) {
19677|       |
19678|       |    /* Initialize a new fiber with gc friendly defaults */
19679|    342|    JanetFiber *fiber = janet_gcalloc(JANET_MEMORY_FIBER, sizeof(JanetFiber));
19680|    342|    fiber->flags = 0;
19681|    342|    fiber->frame = 0;
19682|    342|    fiber->stackstart = 0;
19683|    342|    fiber->stacktop = 0;
19684|    342|    fiber->capacity = 0;
19685|    342|    fiber->maxstack = 0;
19686|    342|    fiber->data = NULL;
19687|    342|    fiber->child = NULL;
19688|    342|    fiber->env = NULL;
19689|    342|    fiber->last_value = janet_wrap_nil();
  ------------------
  |  |  831|    342|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    342|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    342|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    342|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19690|    342|#ifdef JANET_EV
19691|    342|    fiber->sched_id = 0;
19692|    342|    fiber->supervisor_channel = NULL;
19693|    342|    fiber->ev_state = NULL;
19694|    342|    fiber->ev_callback = NULL;
19695|    342|    fiber->ev_stream = NULL;
19696|    342|#endif
19697|       |
19698|       |    /* Push fiber to seen stack */
19699|    342|    janet_v_push(st->lookup, janet_wrap_fiber(fiber));
  ------------------
  |  |  712|    342|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|    342|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|    342|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|      1|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|      1|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|      1|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|      1|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 341, False: 1]
  |  |  |  |  |  |  |  Branch (723:50): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|    342|#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))
  |  |  ------------------
  |  |  |  |  721|    342|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    342|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19700|       |
19701|       |    /* Read ints */
19702|    342|    int32_t fiber_flags = readint(st, &data);
19703|    342|    int32_t frame = readnat(st, &data);
19704|    342|    int32_t fiber_stackstart = readnat(st, &data);
19705|    342|    int32_t fiber_stacktop = readnat(st, &data);
19706|    342|    int32_t fiber_maxstack = readnat(st, &data);
19707|    342|    JanetTable *fiber_env = NULL;
19708|       |
19709|       |    /* Check for bad flags and ints */
19710|    342|    if ((int32_t)(frame + JANET_FRAME_SIZE) > fiber_stackstart ||
  ------------------
  |  | 1026|    342|#define JANET_FRAME_SIZE 4
  ------------------
  |  Branch (19710:9): [True: 9, False: 333]
  ------------------
19711|    333|            fiber_stackstart > fiber_stacktop ||
  ------------------
  |  Branch (19711:13): [True: 1, False: 332]
  ------------------
19712|    332|            fiber_stacktop > fiber_maxstack) {
  ------------------
  |  Branch (19712:13): [True: 1, False: 331]
  ------------------
19713|      4|        janet_panic("fiber has incorrect stack setup");
19714|      4|    }
19715|       |
19716|       |    /* Allocate stack memory */
19717|    338|    if (fiber_stacktop < INT32_MAX - 10) {
  ------------------
  |  Branch (19717:9): [True: 331, False: 7]
  ------------------
19718|    331|        fiber->capacity = fiber_stacktop + 10;
19719|    331|    } else {
19720|       |        /* Extra capacity is usually nice to avoid immediately reallocing on pushed arguments, but not needed */
19721|      7|        fiber->capacity = INT32_MAX;
19722|      7|    }
19723|    338|    fiber->data = array_allocate(sizeof(Janet), fiber->capacity);
19724|    338|    if (!fiber->data) {
  ------------------
  |  Branch (19724:9): [True: 0, False: 338]
  ------------------
19725|      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]
  |  |  ------------------
  ------------------
19726|      0|    }
19727|   131k|    for (int32_t i = 0; i < fiber->capacity; i++) {
  ------------------
  |  Branch (19727:25): [True: 131k, False: 338]
  ------------------
19728|   131k|        fiber->data[i] = janet_wrap_nil();
  ------------------
  |  |  831|   131k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   131k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   131k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   131k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19729|   131k|    }
19730|       |
19731|       |    /* get frames */
19732|    338|    int32_t stack = frame;
19733|    338|    int32_t stacktop = fiber_stackstart - JANET_FRAME_SIZE;
  ------------------
  |  | 1026|    338|#define JANET_FRAME_SIZE 4
  ------------------
19734|    669|    while (stack > 0) {
  ------------------
  |  Branch (19734:12): [True: 331, False: 338]
  ------------------
19735|    331|        JanetFunction *func = NULL;
19736|    331|        JanetFuncDef *def = NULL;
19737|    331|        JanetFuncEnv *env = NULL;
19738|    331|        int32_t frameflags = readint(st, &data);
19739|    331|        int32_t prevframe = readnat(st, &data);
19740|    331|        int32_t pcdiff = readnat(st, &data);
19741|       |
19742|       |        /* Get frame items */
19743|    331|        Janet *framestack = fiber->data + stack;
19744|    331|        JanetStackFrame *framep = janet_stack_frame(framestack);
  ------------------
  |  |  809|    331|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1026|    331|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
19745|       |
19746|       |        /* Get function */
19747|    331|        Janet funcv;
19748|    331|        data = unmarshal_one(st, data, &funcv, flags + 1);
19749|    331|        janet_asserttype(funcv, JANET_FUNCTION, st);
19750|    331|        func = janet_unwrap_function(funcv);
  ------------------
  |  |  868|    331|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
19751|    331|        def = func->def;
19752|       |
19753|       |        /* Check env */
19754|    331|        if (frameflags & JANET_STACKFRAME_HASENV) {
  ------------------
  |  |18934|    331|#define JANET_STACKFRAME_HASENV   (INT32_MIN)
  ------------------
  |  Branch (19754:13): [True: 0, False: 331]
  ------------------
19755|      0|            frameflags &= ~JANET_STACKFRAME_HASENV;
  ------------------
  |  |18934|      0|#define JANET_STACKFRAME_HASENV   (INT32_MIN)
  ------------------
19756|      0|            data = unmarshal_one_env(st, data, &env, flags + 1);
19757|      0|        }
19758|       |
19759|       |        /* Error checking */
19760|    331|        int32_t expected_framesize = def->slotcount;
19761|    331|        if (expected_framesize != stacktop - stack) {
  ------------------
  |  Branch (19761:13): [True: 0, False: 331]
  ------------------
19762|      0|            janet_panic("fiber stackframe size mismatch");
19763|      0|        }
19764|    331|        if (pcdiff >= def->bytecode_length) {
  ------------------
  |  Branch (19764:13): [True: 0, False: 331]
  ------------------
19765|      0|            janet_panic("fiber stackframe has invalid pc");
19766|      0|        }
19767|    331|        if ((int32_t)(prevframe + JANET_FRAME_SIZE) > stack) {
  ------------------
  |  | 1026|    331|#define JANET_FRAME_SIZE 4
  ------------------
  |  Branch (19767:13): [True: 0, False: 331]
  ------------------
19768|      0|            janet_panic("fiber stackframe does not align with previous frame");
19769|      0|        }
19770|       |
19771|       |        /* Get stack items */
19772|   125k|        for (int32_t i = stack; i < stacktop; i++)
  ------------------
  |  Branch (19772:33): [True: 125k, False: 331]
  ------------------
19773|   125k|            data = unmarshal_one(st, data, fiber->data + i, flags + 1);
19774|       |
19775|       |        /* Set frame */
19776|    331|        framep->env = env;
19777|    331|        framep->pc = def->bytecode + pcdiff;
19778|    331|        framep->prevframe = prevframe;
19779|    331|        framep->flags = frameflags;
19780|    331|        framep->func = func;
19781|       |
19782|       |        /* Goto previous frame */
19783|    331|        stacktop = stack - JANET_FRAME_SIZE;
  ------------------
  |  | 1026|    331|#define JANET_FRAME_SIZE 4
  ------------------
19784|    331|        stack = prevframe;
19785|    331|    }
19786|    338|    if (stack < 0) {
  ------------------
  |  Branch (19786:9): [True: 0, False: 338]
  ------------------
19787|      0|        janet_panic("fiber has too many stackframes");
19788|      0|    }
19789|       |
19790|       |    /* Check for fiber env */
19791|    338|    if (fiber_flags & JANET_FIBER_FLAG_HASENV) {
  ------------------
  |  |18933|    338|#define JANET_FIBER_FLAG_HASENV   (1 << 30)
  ------------------
  |  Branch (19791:9): [True: 331, False: 7]
  ------------------
19792|    331|        Janet envv;
19793|    331|        fiber_flags &= ~JANET_FIBER_FLAG_HASENV;
  ------------------
  |  |18933|    331|#define JANET_FIBER_FLAG_HASENV   (1 << 30)
  ------------------
19794|    331|        data = unmarshal_one(st, data, &envv, flags + 1);
19795|    331|        janet_asserttype(envv, JANET_TABLE, st);
19796|    331|        fiber_env = janet_unwrap_table(envv);
  ------------------
  |  |  861|    331|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
19797|    331|    }
19798|       |
19799|       |    /* Check for child fiber */
19800|    338|    if (fiber_flags & JANET_FIBER_FLAG_HASCHILD) {
  ------------------
  |  |18932|    338|#define JANET_FIBER_FLAG_HASCHILD (1 << 29)
  ------------------
  |  Branch (19800:9): [True: 0, False: 338]
  ------------------
19801|      0|        Janet fiberv;
19802|      0|        fiber_flags &= ~JANET_FIBER_FLAG_HASCHILD;
  ------------------
  |  |18932|      0|#define JANET_FIBER_FLAG_HASCHILD (1 << 29)
  ------------------
19803|      0|        data = unmarshal_one(st, data, &fiberv, flags + 1);
19804|      0|        janet_asserttype(fiberv, JANET_FIBER, st);
19805|      0|        fiber->child = janet_unwrap_fiber(fiberv);
  ------------------
  |  |  859|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
19806|      0|    }
19807|       |
19808|       |    /* Get the fiber last value */
19809|    338|    data = unmarshal_one(st, data, &fiber->last_value, flags + 1);
19810|       |
19811|       |    /* We have valid fiber, finally construct remaining fields. */
19812|    338|    fiber->frame = frame;
19813|    338|    fiber->flags = fiber_flags;
19814|    338|    fiber->stackstart = fiber_stackstart;
19815|    338|    fiber->stacktop = fiber_stacktop;
19816|    338|    fiber->maxstack = fiber_maxstack;
19817|    338|    fiber->env = fiber_env;
19818|       |
19819|    338|    int status = janet_fiber_status(fiber);
19820|    338|    if (status < 0 || status > JANET_STATUS_ALIVE) {
  ------------------
  |  Branch (19820:9): [True: 7, False: 331]
  |  Branch (19820:23): [True: 0, False: 331]
  ------------------
19821|      0|        janet_panic("invalid fiber status");
19822|      0|    }
19823|       |
19824|       |    /* Return data */
19825|    338|    *out = fiber;
19826|    338|    return data;
19827|    338|}
janet.c:unmarshal_one_def:
19497|  4.13M|    int flags) {
19498|  4.13M|    MARSH_EOS(st, data);
  ------------------
  |  |19321|  4.13M|#define MARSH_EOS(st, data) do { \
  |  |19322|  4.13M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19322:9): [True: 0, False: 4.13M]
  |  |  ------------------
  |  |19323|  4.13M|} while (0)
  |  |  ------------------
  |  |  |  Branch (19323:10): [Folded, False: 4.13M]
  |  |  ------------------
  ------------------
19499|  4.13M|    if (*data == LB_FUNCDEF_REF) {
  ------------------
  |  Branch (19499:9): [True: 29.9k, False: 4.10M]
  ------------------
19500|  29.9k|        data++;
19501|  29.9k|        int32_t index = readint(st, &data);
19502|  29.9k|        if (index < 0 || index >= janet_v_count(st->lookup_defs))
  ------------------
  |  |  714|  29.9k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  29.9k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  29.9k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 29.9k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (19502:13): [True: 0, False: 29.9k]
  |  Branch (19502:26): [True: 0, False: 29.9k]
  ------------------
19503|      0|            janet_panicf("invalid funcdef reference %d", index);
19504|  29.9k|        *out = st->lookup_defs[index];
19505|  4.10M|    } else {
19506|       |        /* Initialize with values that will not break garbage collection
19507|       |         * if unmarshalling fails. */
19508|  4.10M|        JanetFuncDef *def = janet_gcalloc(JANET_MEMORY_FUNCDEF, sizeof(JanetFuncDef));
19509|  4.10M|        def->environments_length = 0;
19510|  4.10M|        def->defs_length = 0;
19511|  4.10M|        def->constants_length = 0;
19512|  4.10M|        def->bytecode_length = 0;
19513|  4.10M|        def->name = NULL;
19514|  4.10M|        def->source = NULL;
19515|  4.10M|        def->closure_bitset = NULL;
19516|  4.10M|        def->defs = NULL;
19517|  4.10M|        def->environments = NULL;
19518|  4.10M|        def->constants = NULL;
19519|  4.10M|        def->bytecode = NULL;
19520|  4.10M|        def->sourcemap = NULL;
19521|  4.10M|        def->symbolmap = NULL;
19522|  4.10M|        def->symbolmap_length = 0;
19523|  4.10M|        def->named_args_count = 0;
19524|  4.10M|        janet_v_push(st->lookup_defs, def);
  ------------------
  |  |  712|  4.10M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  4.10M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  4.10M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  4.09M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  4.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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  4.09M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  4.09M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 7.71k, False: 4.09M]
  |  |  |  |  |  |  |  Branch (723:50): [True: 75.4k, False: 4.01M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|  83.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))
  |  |  ------------------
  |  |  |  |  721|  4.10M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  4.10M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19525|       |
19526|       |        /* Set default lengths to zero */
19527|  4.10M|        int32_t bytecode_length = 0;
19528|  4.10M|        int32_t constants_length = 0;
19529|  4.10M|        int32_t environments_length = 0;
19530|  4.10M|        int32_t defs_length = 0;
19531|  4.10M|        int32_t symbolmap_length = 0;
19532|       |
19533|       |        /* Read flags and other fixed values */
19534|  4.10M|        def->flags = readint(st, &data);
19535|  4.10M|        def->slotcount = readnat(st, &data);
19536|  4.10M|        def->arity = readnat(st, &data);
19537|  4.10M|        def->min_arity = readnat(st, &data);
19538|  4.10M|        def->max_arity = readnat(st, &data);
19539|       |
19540|       |        /* Read some lengths */
19541|  4.10M|        constants_length = readnat(st, &data);
19542|  4.10M|        bytecode_length = readnat(st, &data);
19543|  4.10M|        if (def->flags & JANET_FUNCDEF_FLAG_NAMEDARGS)
  ------------------
  |  | 1107|  4.10M|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (19543:13): [True: 14.9k, False: 4.08M]
  ------------------
19544|  14.9k|            def->named_args_count = readnat(st, &data);
19545|  4.10M|        if (def->flags & JANET_FUNCDEF_FLAG_HASENVS)
  ------------------
  |  | 1103|  4.10M|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (19545:13): [True: 3.85M, False: 247k]
  ------------------
19546|  3.85M|            environments_length = readnat(st, &data);
19547|  4.10M|        if (def->flags & JANET_FUNCDEF_FLAG_HASDEFS)
  ------------------
  |  | 1102|  4.10M|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (19547:13): [True: 581k, False: 3.51M]
  ------------------
19548|   581k|            defs_length = readnat(st, &data);
19549|  4.10M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSYMBOLMAP)
  ------------------
  |  | 1099|  4.10M|#define JANET_FUNCDEF_FLAG_HASSYMBOLMAP 0x40000
  ------------------
  |  Branch (19549:13): [True: 3.72M, False: 375k]
  ------------------
19550|  3.72M|            symbolmap_length = readnat(st, &data);
19551|       |
19552|       |        /* Check name and source (optional) */
19553|  4.10M|        if (def->flags & JANET_FUNCDEF_FLAG_HASNAME) {
  ------------------
  |  | 1100|  4.10M|#define JANET_FUNCDEF_FLAG_HASNAME 0x80000
  ------------------
  |  Branch (19553:13): [True: 3.83M, False: 269k]
  ------------------
19554|  3.83M|            Janet x;
19555|  3.83M|            data = unmarshal_one(st, data, &x, flags + 1);
19556|  3.83M|            janet_asserttype(x, JANET_STRING, st);
19557|  3.83M|            def->name = janet_unwrap_string(x);
  ------------------
  |  |  863|  3.83M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
19558|  3.83M|        }
19559|  4.10M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSOURCE) {
  ------------------
  |  | 1101|  4.10M|#define JANET_FUNCDEF_FLAG_HASSOURCE 0x100000
  ------------------
  |  Branch (19559:13): [True: 3.85M, False: 247k]
  ------------------
19560|  3.85M|            Janet x;
19561|  3.85M|            data = unmarshal_one(st, data, &x, flags + 1);
19562|  3.85M|            janet_asserttype(x, JANET_STRING, st);
19563|  3.85M|            def->source = janet_unwrap_string(x);
  ------------------
  |  |  863|  3.85M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
19564|  3.85M|        }
19565|       |
19566|       |        /* Unmarshal constants */
19567|  4.10M|        if (constants_length) {
  ------------------
  |  Branch (19567:13): [True: 3.08M, False: 1.01M]
  ------------------
19568|  3.08M|            def->constants = array_allocate(sizeof(Janet), constants_length);
19569|  3.08M|            if (!def->constants) {
  ------------------
  |  Branch (19569:17): [True: 0, False: 3.08M]
  ------------------
19570|      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]
  |  |  ------------------
  ------------------
19571|      0|            }
19572|  20.0M|            for (int32_t i = 0; i < constants_length; i++)
  ------------------
  |  Branch (19572:33): [True: 17.0M, False: 3.08M]
  ------------------
19573|  17.0M|                data = unmarshal_one(st, data, def->constants + i, flags + 1);
19574|  3.08M|        } else {
19575|  1.01M|            def->constants = NULL;
19576|  1.01M|        }
19577|  4.10M|        def->constants_length = constants_length;
19578|       |
19579|       |        /* Unmarshal symbol map, if needed */
19580|  4.10M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSYMBOLMAP) {
  ------------------
  |  | 1099|  4.10M|#define JANET_FUNCDEF_FLAG_HASSYMBOLMAP 0x40000
  ------------------
  |  Branch (19580:13): [True: 3.72M, False: 375k]
  ------------------
19581|  3.72M|            def->symbolmap = array_allocate(sizeof(JanetSymbolMap), symbolmap_length);
19582|  3.72M|            if (def->symbolmap == NULL) {
  ------------------
  |  Branch (19582:17): [True: 0, False: 3.72M]
  ------------------
19583|      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]
  |  |  ------------------
  ------------------
19584|      0|            }
19585|  44.9M|            for (int32_t i = 0; i < symbolmap_length; i++) {
  ------------------
  |  Branch (19585:33): [True: 41.2M, False: 3.72M]
  ------------------
19586|  41.2M|                def->symbolmap[i].birth_pc = (uint32_t) readint(st, &data);
19587|  41.2M|                def->symbolmap[i].death_pc = (uint32_t) readint(st, &data);
19588|  41.2M|                def->symbolmap[i].slot_index = (uint32_t) readint(st, &data);
19589|  41.2M|                Janet value;
19590|  41.2M|                data = unmarshal_one(st, data, &value, flags + 1);
19591|  41.2M|                if (!janet_checktype(value, JANET_SYMBOL)) {
  ------------------
  |  |  806|  41.2M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 41.2M]
  |  |  ------------------
  |  |  807|  41.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|  41.2M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  41.2M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  41.2M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  41.2M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  41.2M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (19591:21): [True: 0, False: 41.2M]
  ------------------
19592|      0|                    janet_panicf("corrupted symbolmap when unmarshalling debug info, got %v", value);
19593|      0|                }
19594|  41.2M|                def->symbolmap[i].symbol = janet_unwrap_symbol(value);
  ------------------
  |  |  864|  41.2M|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
19595|  41.2M|            }
19596|  3.72M|            def->symbolmap_length = (uint32_t) symbolmap_length;
19597|  3.72M|        }
19598|       |
19599|       |        /* Unmarshal bytecode */
19600|  4.10M|        def->bytecode = array_allocate(sizeof(uint32_t), bytecode_length);
19601|  4.10M|        if (!def->bytecode) {
  ------------------
  |  Branch (19601:13): [True: 0, False: 4.10M]
  ------------------
19602|      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]
  |  |  ------------------
  ------------------
19603|      0|        }
19604|  4.10M|        data = janet_unmarshal_u32s(st, data, def->bytecode, bytecode_length);
19605|  4.10M|        def->bytecode_length = bytecode_length;
19606|       |
19607|       |        /* Unmarshal environments */
19608|  4.10M|        if (def->flags & JANET_FUNCDEF_FLAG_HASENVS) {
  ------------------
  |  | 1103|  4.10M|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (19608:13): [True: 3.85M, False: 247k]
  ------------------
19609|  3.85M|            def->environments = janet_calloc(1, sizeof(int32_t) * (size_t) environments_length);
  ------------------
  |  | 2412|  3.85M|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
19610|  3.85M|            if (!def->environments) {
  ------------------
  |  Branch (19610:17): [True: 0, False: 3.85M]
  ------------------
19611|      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]
  |  |  ------------------
  ------------------
19612|      0|            }
19613|  5.33M|            for (int32_t i = 0; i < environments_length; i++) {
  ------------------
  |  Branch (19613:33): [True: 1.48M, False: 3.85M]
  ------------------
19614|  1.48M|                def->environments[i] = readint(st, &data);
19615|  1.48M|            }
19616|  3.85M|        } else {
19617|   247k|            def->environments = NULL;
19618|   247k|        }
19619|  4.10M|        def->environments_length = environments_length;
19620|       |
19621|       |        /* Unmarshal sub funcdefs */
19622|  4.10M|        if (def->flags & JANET_FUNCDEF_FLAG_HASDEFS) {
  ------------------
  |  | 1102|  4.10M|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (19622:13): [True: 581k, False: 3.51M]
  ------------------
19623|   581k|            def->defs = janet_calloc(1, sizeof(JanetFuncDef *) * (size_t) defs_length);
  ------------------
  |  | 2412|   581k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
19624|   581k|            if (!def->defs) {
  ------------------
  |  Branch (19624:17): [True: 0, False: 581k]
  ------------------
19625|      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]
  |  |  ------------------
  ------------------
19626|      0|            }
19627|  1.84M|            for (int32_t i = 0; i < defs_length; i++) {
  ------------------
  |  Branch (19627:33): [True: 1.26M, False: 581k]
  ------------------
19628|  1.26M|                data = unmarshal_one_def(st, data, def->defs + i, flags + 1);
19629|  1.26M|            }
19630|  3.51M|        } else {
19631|  3.51M|            def->defs = NULL;
19632|  3.51M|        }
19633|  4.10M|        def->defs_length = defs_length;
19634|       |
19635|       |        /* Unmarshal source maps if needed */
19636|  4.10M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSOURCEMAP) {
  ------------------
  |  | 1104|  4.10M|#define JANET_FUNCDEF_FLAG_HASSOURCEMAP 0x800000
  ------------------
  |  Branch (19636:13): [True: 3.85M, False: 247k]
  ------------------
19637|  3.85M|            int32_t current = 0;
19638|  3.85M|            def->sourcemap = array_allocate(sizeof(JanetSourceMapping), bytecode_length);
19639|  3.85M|            if (!def->sourcemap) {
  ------------------
  |  Branch (19639:17): [True: 0, False: 3.85M]
  ------------------
19640|      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]
  |  |  ------------------
  ------------------
19641|      0|            }
19642|   113M|            for (int32_t i = 0; i < bytecode_length; i++) {
  ------------------
  |  Branch (19642:33): [True: 109M, False: 3.85M]
  ------------------
19643|   109M|                current += readint(st, &data);
19644|   109M|                def->sourcemap[i].line = current;
19645|   109M|                def->sourcemap[i].column = readint(st, &data);
19646|   109M|            }
19647|  3.85M|        } else {
19648|   247k|            def->sourcemap = NULL;
19649|   247k|        }
19650|       |
19651|       |        /* Unmarshal closure bitset if needed */
19652|  4.10M|        if (def->flags & JANET_FUNCDEF_FLAG_HASCLOBITSET) {
  ------------------
  |  | 1106|  4.10M|#define JANET_FUNCDEF_FLAG_HASCLOBITSET 0x2000000
  ------------------
  |  Branch (19652:13): [True: 442k, False: 3.65M]
  ------------------
19653|   442k|            int32_t n = (def->slotcount + 31) >> 5;
19654|   442k|            def->closure_bitset = array_allocate(sizeof(uint32_t), n);
19655|   442k|            if (NULL == def->closure_bitset) {
  ------------------
  |  Branch (19655:17): [True: 0, False: 442k]
  ------------------
19656|      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]
  |  |  ------------------
  ------------------
19657|      0|            }
19658|   442k|            data = janet_unmarshal_u32s(st, data, def->closure_bitset, n);
19659|   442k|        }
19660|       |
19661|       |        /* Validate */
19662|  4.10M|        if (janet_verify(def))
  ------------------
  |  Branch (19662:13): [True: 0, False: 4.10M]
  ------------------
19663|      0|            janet_panic("funcdef has invalid bytecode");
19664|       |
19665|       |        /* Set def */
19666|  4.10M|        *out = def;
19667|  4.10M|    }
19668|  4.13M|    return data;
19669|  4.13M|}
janet.c:janet_unmarshal_u32s:
19479|  4.54M|static const uint8_t *janet_unmarshal_u32s(UnmarshalState *st, const uint8_t *data, uint32_t *into, int32_t n) {
19480|   117M|    for (int32_t i = 0; i < n; i++) {
  ------------------
  |  Branch (19480:25): [True: 113M, False: 4.54M]
  ------------------
19481|   113M|        MARSH_EOS(st, data + 3);
  ------------------
  |  |19321|   113M|#define MARSH_EOS(st, data) do { \
  |  |19322|   113M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19322:9): [True: 0, False: 113M]
  |  |  ------------------
  |  |19323|   113M|} while (0)
  |  |  ------------------
  |  |  |  Branch (19323:10): [Folded, False: 113M]
  |  |  ------------------
  ------------------
19482|   113M|        into[i] =
19483|   113M|            (uint32_t)(data[0]) |
19484|   113M|            ((uint32_t)(data[1]) << 8) |
19485|   113M|            ((uint32_t)(data[2]) << 16) |
19486|   113M|            ((uint32_t)(data[3]) << 24);
19487|   113M|        data += 4;
19488|   113M|    }
19489|  4.54M|    return data;
19490|  4.54M|}
janet.c:unmarshal_one_env:
19435|   322k|    int flags) {
19436|   322k|    MARSH_EOS(st, data);
  ------------------
  |  |19321|   322k|#define MARSH_EOS(st, data) do { \
  |  |19322|   322k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19322:9): [True: 0, False: 322k]
  |  |  ------------------
  |  |19323|   322k|} while (0)
  |  |  ------------------
  |  |  |  Branch (19323:10): [Folded, False: 322k]
  |  |  ------------------
  ------------------
19437|   322k|    if (*data == LB_FUNCENV_REF) {
  ------------------
  |  Branch (19437:9): [True: 262k, False: 59.9k]
  ------------------
19438|   262k|        data++;
19439|   262k|        int32_t index = readint(st, &data);
19440|   262k|        if (index < 0 || index >= janet_v_count(st->lookup_envs))
  ------------------
  |  |  714|   262k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|   262k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   262k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 262k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (19440:13): [True: 0, False: 262k]
  |  Branch (19440:26): [True: 0, False: 262k]
  ------------------
19441|      0|            janet_panicf("invalid funcenv reference %d", index);
19442|   262k|        *out = st->lookup_envs[index];
19443|   262k|    } else {
19444|  59.9k|        JanetFuncEnv *env = janet_gcalloc(JANET_MEMORY_FUNCENV, sizeof(JanetFuncEnv));
19445|  59.9k|        env->length = 0;
19446|  59.9k|        env->offset = 0;
19447|  59.9k|        env->as.values = NULL;
19448|  59.9k|        janet_v_push(st->lookup_envs, env);
  ------------------
  |  |  712|  59.9k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  59.9k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  59.9k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  52.4k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  52.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  52.4k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  52.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 7.49k, False: 52.4k]
  |  |  |  |  |  |  |  Branch (723:50): [True: 29.9k, False: 22.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|  37.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))
  |  |  ------------------
  |  |  |  |  721|  59.9k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  59.9k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19449|  59.9k|        int32_t offset = readnat(st, &data);
19450|  59.9k|        int32_t length = readnat(st, &data);
19451|  59.9k|        if (offset > 0) {
  ------------------
  |  Branch (19451:13): [True: 0, False: 59.9k]
  ------------------
19452|      0|            Janet fiberv;
19453|       |            /* On stack variant */
19454|      0|            data = unmarshal_one(st, data, &fiberv, flags);
19455|      0|            janet_asserttype(fiberv, JANET_FIBER, st);
19456|      0|            env->as.fiber = janet_unwrap_fiber(fiberv);
  ------------------
  |  |  859|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
19457|       |            /* Negative offset indicates untrusted input */
19458|      0|            env->offset = -offset;
19459|  59.9k|        } else {
19460|       |            /* Off stack variant */
19461|  59.9k|            if (length == 0) {
  ------------------
  |  Branch (19461:17): [True: 0, False: 59.9k]
  ------------------
19462|      0|                janet_panic("invalid funcenv length");
19463|      0|            }
19464|  59.9k|            env->as.values = array_allocate(sizeof(Janet), length);
19465|  59.9k|            if (!env->as.values) {
  ------------------
  |  Branch (19465:17): [True: 0, False: 59.9k]
  ------------------
19466|      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]
  |  |  ------------------
  ------------------
19467|      0|            }
19468|  59.9k|            env->offset = 0;
19469|   771k|            for (int32_t i = 0; i < length; i++)
  ------------------
  |  Branch (19469:33): [True: 711k, False: 59.9k]
  ------------------
19470|   711k|                data = unmarshal_one(st, data, env->as.values + i, flags);
19471|  59.9k|        }
19472|  59.9k|        env->length = length;
19473|  59.9k|        *out = env;
19474|  59.9k|    }
19475|   322k|    return data;
19476|   322k|}
janet.c:unmarshal_one_abstract:
19911|  1.00k|static const uint8_t *unmarshal_one_abstract(UnmarshalState *st, const uint8_t *data, Janet *out, int flags) {
19912|  1.00k|    Janet key;
19913|  1.00k|    data = unmarshal_one(st, data, &key, flags + 1);
19914|  1.00k|    const JanetAbstractType *at = janet_get_abstract_type(key);
19915|  1.00k|    if (at == NULL) janet_panic("unknown abstract type");
  ------------------
  |  Branch (19915:9): [True: 1, False: 1.00k]
  ------------------
19916|  1.00k|    if (at->unmarshal) {
  ------------------
  |  Branch (19916:9): [True: 1.00k, False: 0]
  ------------------
19917|  1.00k|        JanetMarshalContext context = {NULL, st, flags, data, at};
19918|  1.00k|        void *abst = at->unmarshal(&context);
19919|  1.00k|        janet_assert(abst != NULL, "null pointer abstract");
  ------------------
  |  |  389|  1.00k|#define janet_assert(c, m) do { \
  |  |  390|  1.00k|    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.00k]
  |  |  ------------------
  |  |  391|  1.00k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 1.00k]
  |  |  ------------------
  ------------------
19920|  1.00k|        *out = janet_wrap_abstract(abst);
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19921|  1.00k|        if (context.at != NULL) {
  ------------------
  |  Branch (19921:13): [True: 0, False: 1.00k]
  ------------------
19922|      0|            janet_panic("janet_unmarshal_abstract not called");
19923|      0|        }
19924|  1.00k|        return context.data;
19925|  1.00k|    }
19926|      0|    janet_panic("invalid abstract type - no unmarshal function pointer");
19927|  1.00k|}
janet.c:janet_asserttype:
19397|  7.68M|static void janet_asserttype(Janet x, JanetType t, UnmarshalState *st) {
19398|  7.68M|    if (!janet_checktype(x, t)) {
  ------------------
  |  |  806|  7.68M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [True: 0, False: 7.68M]
  |  |  ------------------
  |  |  807|  7.68M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.68M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  7.68M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  7.68M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.68M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.68M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (19398:9): [True: 3, False: 7.68M]
  ------------------
19399|       |#ifdef JANET_MARSHAL_DEBUG
19400|       |        dump_reference_table(st);
19401|       |#else
19402|      3|        (void) st;
19403|      3|#endif
19404|      3|        janet_panicf("expected type %T, got %v", 1 << t, x);
19405|      3|    }
19406|  7.68M|}
janet.c:janet_rng_get:
20557|     10|static int janet_rng_get(void *p, Janet key, Janet *out) {
20558|     10|    (void) p;
20559|     10|    if (!janet_checktype(key, JANET_KEYWORD)) return 0;
  ------------------
  |  |  806|     10|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (20559:9): [True: 1, False: 9]
  ------------------
20560|      9|    return janet_getmethod(janet_unwrap_keyword(key), rng_methods, out);
  ------------------
  |  |  865|      9|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
20561|     10|}
janet.c:janet_net_socknoblock:
20900|      6|static void janet_net_socknoblock(JSock s) {
20901|       |#ifdef JANET_WINDOWS
20902|       |    unsigned long arg = 1;
20903|       |    ioctlsocket(s, FIONBIO, &arg);
20904|       |#else
20905|       |#if !defined(SOCK_CLOEXEC) && defined(O_CLOEXEC)
20906|       |    int extra = O_CLOEXEC;
20907|       |#else
20908|      6|    int extra = 0;
20909|      6|#endif
20910|      6|    fcntl(s, F_SETFL, fcntl(s, F_GETFL, 0) | O_NONBLOCK | extra);
20911|       |#ifdef SO_NOSIGPIPE
20912|       |    int enable = 1;
20913|       |    setsockopt(s, SOL_SOCKET, SO_NOSIGPIPE, &enable, sizeof(int));
20914|       |#endif
20915|      6|#endif
20916|      6|}
janet.c:janet_get_sockettype:
21179|     21|static int janet_get_sockettype(Janet *argv, int32_t argc, int32_t n) {
21180|     21|    JanetKeyword stype = janet_optkeyword(argv, argc, n, NULL);
21181|     21|    int socktype = SOCK_DGRAM;
21182|     21|    if ((NULL == stype) || !janet_cstrcmp(stype, "stream")) {
  ------------------
  |  Branch (21182:9): [True: 10, False: 11]
  |  Branch (21182:28): [True: 0, False: 11]
  ------------------
21183|      9|        socktype = SOCK_STREAM;
21184|     12|    } else if (janet_cstrcmp(stype, "datagram")) {
  ------------------
  |  Branch (21184:16): [True: 11, False: 1]
  ------------------
21185|     11|        janet_panicf("expected socket type as :stream or :datagram, got %v", argv[n]);
21186|     11|    }
21187|     10|    return socktype;
21188|     21|}
janet.c:janet_get_addrinfo:
21193|      3|static struct addrinfo *janet_get_addrinfo(Janet *argv, int32_t offset, int socktype, int passive, int *is_unix, socklen_t *sizeout) {
21194|       |    /* Unix socket support - not yet supported on windows. */
21195|      3|#ifndef JANET_WINDOWS
21196|      3|    if (janet_keyeq(argv[offset], "unix")) {
  ------------------
  |  Branch (21196:9): [True: 0, False: 3]
  ------------------
21197|      0|        const char *path = janet_getcstring(argv, offset + 1);
21198|      0|        struct sockaddr_un *saddr = janet_calloc(1, sizeof(struct sockaddr_un));
  ------------------
  |  | 2412|      0|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
21199|      0|        if (saddr == NULL) {
  ------------------
  |  Branch (21199:13): [True: 0, False: 0]
  ------------------
21200|      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]
  |  |  ------------------
  ------------------
21201|      0|        }
21202|      0|        saddr->sun_family = AF_UNIX;
21203|      0|        size_t path_size = sizeof(saddr->sun_path);
21204|      0|        snprintf(saddr->sun_path, path_size, "%s", path);
21205|      0|        *sizeout = sizeof(struct sockaddr_un);
21206|      0|#ifdef JANET_LINUX
21207|      0|        if (path[0] == '@') {
  ------------------
  |  Branch (21207:13): [True: 0, False: 0]
  ------------------
21208|      0|            saddr->sun_path[0] = '\0';
21209|      0|            *sizeout = offsetof(struct sockaddr_un, sun_path) + janet_string_length(path);
  ------------------
  |  | 1812|      0|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|      0|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
21210|      0|        }
21211|      0|#endif
21212|      0|        *is_unix = 1;
21213|      0|        return (struct addrinfo *) saddr;
21214|      0|    }
21215|      3|#endif
21216|       |    /* Get host and port */
21217|      3|    char *host = (char *)janet_getcstring(argv, offset);
21218|      3|    char *port = NULL;
21219|      3|    if (janet_checkint(argv[offset + 1])) {
  ------------------
  |  Branch (21219:9): [True: 0, False: 3]
  ------------------
21220|      0|        port = (char *)janet_to_string(argv[offset + 1]);
21221|      3|    } else {
21222|      3|        port = (char *)janet_optcstring(argv, offset + 2, offset + 1, NULL);
21223|      3|    }
21224|       |    /* getaddrinfo */
21225|      3|    struct addrinfo *ai = NULL;
21226|      3|    struct addrinfo hints;
21227|      3|    memset(&hints, 0, sizeof(hints));
21228|      3|    hints.ai_family = AF_UNSPEC;
21229|      3|    hints.ai_socktype = socktype;
21230|      3|    hints.ai_flags = passive ? AI_PASSIVE : 0;
  ------------------
  |  Branch (21230:22): [True: 0, False: 3]
  ------------------
21231|      3|    int status = getaddrinfo(host, port, &hints, &ai);
21232|      3|    if (status) {
  ------------------
  |  Branch (21232:9): [True: 1, False: 2]
  ------------------
21233|      1|        janet_panicf("could not get address info: %s", gai_strerror(status));
21234|      1|    }
21235|      2|    *is_unix = 0;
21236|       |#ifdef JANET_WINDOWS
21237|       |    *sizeout = 0;
21238|       |#else
21239|      2|    *sizeout = sizeof(struct sockaddr_un);
21240|      2|#endif
21241|      2|    return ai;
21242|      3|}
janet.c:make_stream:
22042|      6|static JanetStream *make_stream(JSock handle, uint32_t flags) {
22043|      6|    return janet_stream((JanetHandle) handle, flags | JANET_STREAM_SOCKET | JANET_STREAM_NODUPS, net_stream_methods);
  ------------------
  |  |  623|      6|#define JANET_STREAM_SOCKET 0x2
  ------------------
                  return janet_stream((JanetHandle) handle, flags | JANET_STREAM_SOCKET | JANET_STREAM_NODUPS, net_stream_methods);
  ------------------
  |  |  631|      6|#define JANET_STREAM_NODUPS 0x20000
  ------------------
22044|      6|}
janet.c:get_signal_kw:
22876|      1|static int get_signal_kw(const Janet *argv, int32_t n) {
22877|      1|    JanetKeyword signal_kw = janet_getkeyword(argv, n);
22878|      1|    const struct keyword_signal *ptr = signal_keywords;
22879|      1|    while (ptr->keyword) {
  ------------------
  |  Branch (22879:12): [True: 0, False: 1]
  ------------------
22880|      0|        if (!janet_cstrcmp(signal_kw, ptr->keyword)) {
  ------------------
  |  Branch (22880:13): [True: 0, False: 0]
  ------------------
22881|      0|            return ptr->signal;
22882|      0|        }
22883|      0|        ptr++;
22884|      0|    }
22885|      1|    janet_panicf("undefined signal %v", argv[n]);
22886|      1|}
janet.c:os_execute_impl:
23272|      3|static Janet os_execute_impl(int32_t argc, Janet *argv, JanetExecuteMode mode) {
23273|      3|    janet_sandbox_assert(JANET_SANDBOX_SUBPROCESS);
  ------------------
  |  | 2023|      3|#define JANET_SANDBOX_SUBPROCESS 2
  ------------------
23274|      3|    janet_arity(argc, 1, 3);
23275|       |
23276|       |    /* Get flags */
23277|      3|    int is_spawn = mode == JANET_EXECUTE_SPAWN;
23278|      3|    uint64_t flags = 0;
23279|      3|    if (argc > 1) {
  ------------------
  |  Branch (23279:9): [True: 2, False: 1]
  ------------------
23280|      2|        flags = janet_getflags(argv, 1, "epxd");
23281|      2|    }
23282|       |
23283|       |    /* Get environment */
23284|      3|    int use_environ = !janet_flag_at(flags, 0);
  ------------------
  |  | 1995|      3|#define janet_flag_at(F, I) ((F) & ((1ULL) << (I)))
  ------------------
23285|      3|    EnvBlock envp = os_execute_env(argc, argv);
23286|       |
23287|       |    /* Get arguments */
23288|      3|    JanetView exargs = janet_getindexed(argv, 0);
23289|      3|    if (exargs.len < 1) {
  ------------------
  |  Branch (23289:9): [True: 0, False: 3]
  ------------------
23290|      0|        janet_panic("expected at least 1 command line argument");
23291|      0|    }
23292|       |
23293|       |    /* Optional stdio redirections */
23294|      3|    JanetAbstract orig_in = NULL, orig_out = NULL, orig_err = NULL;
23295|      3|    JanetHandle new_in = JANET_HANDLE_NONE, new_out = JANET_HANDLE_NONE, new_err = JANET_HANDLE_NONE;
  ------------------
  |  |  438|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
                  JanetHandle new_in = JANET_HANDLE_NONE, new_out = JANET_HANDLE_NONE, new_err = JANET_HANDLE_NONE;
  ------------------
  |  |  438|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
                  JanetHandle new_in = JANET_HANDLE_NONE, new_out = JANET_HANDLE_NONE, new_err = JANET_HANDLE_NONE;
  ------------------
  |  |  438|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
23296|      3|    JanetHandle pipe_in = JANET_HANDLE_NONE, pipe_out = JANET_HANDLE_NONE, pipe_err = JANET_HANDLE_NONE;
  ------------------
  |  |  438|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
                  JanetHandle pipe_in = JANET_HANDLE_NONE, pipe_out = JANET_HANDLE_NONE, pipe_err = JANET_HANDLE_NONE;
  ------------------
  |  |  438|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
                  JanetHandle pipe_in = JANET_HANDLE_NONE, pipe_out = JANET_HANDLE_NONE, pipe_err = JANET_HANDLE_NONE;
  ------------------
  |  |  438|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
23297|      3|    int stderr_is_stdout = 0;
23298|      3|    int pipe_errflag = 0; /* Track errors setting up pipes */
23299|      3|    int pipe_owner_flags = (is_spawn && (flags & 0x8)) ? JANET_PROC_ALLOW_ZOMBIE : 0;
  ------------------
  |  |22613|      0|#define JANET_PROC_ALLOW_ZOMBIE 128
  ------------------
  |  Branch (23299:29): [True: 0, False: 3]
  |  Branch (23299:41): [True: 0, False: 0]
  ------------------
23300|       |
23301|       |    /* Get optional redirections */
23302|      3|    if (argc > 2 && (mode != JANET_EXECUTE_EXEC)) {
  ------------------
  |  Branch (23302:9): [True: 0, False: 3]
  |  Branch (23302:21): [True: 0, False: 0]
  ------------------
23303|      0|        JanetDictView tab = janet_getdictionary(argv, 2);
23304|      0|        Janet maybe_stdin = janet_dictionary_get(tab.kvs, tab.cap, janet_ckeywordv("in"));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23305|      0|        Janet maybe_stdout = janet_dictionary_get(tab.kvs, tab.cap, janet_ckeywordv("out"));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23306|      0|        Janet maybe_stderr = janet_dictionary_get(tab.kvs, tab.cap, janet_ckeywordv("err"));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23307|      0|        if (is_spawn && janet_keyeq(maybe_stdin, "pipe")) {
  ------------------
  |  Branch (23307:13): [True: 0, False: 0]
  |  Branch (23307:25): [True: 0, False: 0]
  ------------------
23308|      0|            new_in = make_pipes(&pipe_in, 1, &pipe_errflag);
23309|      0|            pipe_owner_flags |= JANET_PROC_OWNS_STDIN;
  ------------------
  |  |22610|      0|#define JANET_PROC_OWNS_STDIN 16
  ------------------
23310|      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 (23310:20): [True: 0, False: 0]
  ------------------
23311|      0|            new_in = janet_getjstream(&maybe_stdin, 0, &orig_in);
23312|      0|        }
23313|      0|        if (is_spawn && janet_keyeq(maybe_stdout, "pipe")) {
  ------------------
  |  Branch (23313:13): [True: 0, False: 0]
  |  Branch (23313:25): [True: 0, False: 0]
  ------------------
23314|      0|            new_out = make_pipes(&pipe_out, 0, &pipe_errflag);
23315|      0|            pipe_owner_flags |= JANET_PROC_OWNS_STDOUT;
  ------------------
  |  |22611|      0|#define JANET_PROC_OWNS_STDOUT 32
  ------------------
23316|      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 (23316:20): [True: 0, False: 0]
  ------------------
23317|      0|            new_out = janet_getjstream(&maybe_stdout, 0, &orig_out);
23318|      0|        }
23319|      0|        if (is_spawn && janet_keyeq(maybe_stderr, "pipe")) {
  ------------------
  |  Branch (23319:13): [True: 0, False: 0]
  |  Branch (23319:25): [True: 0, False: 0]
  ------------------
23320|      0|            new_err = make_pipes(&pipe_err, 0, &pipe_errflag);
23321|      0|            pipe_owner_flags |= JANET_PROC_OWNS_STDERR;
  ------------------
  |  |22612|      0|#define JANET_PROC_OWNS_STDERR 64
  ------------------
23322|      0|        } else if (janet_keyeq(maybe_stderr, "out")) {
  ------------------
  |  Branch (23322:20): [True: 0, False: 0]
  ------------------
23323|      0|            stderr_is_stdout = 1;
23324|      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 (23324:20): [True: 0, False: 0]
  ------------------
23325|      0|            new_err = janet_getjstream(&maybe_stderr, 0, &orig_err);
23326|      0|        }
23327|      0|    }
23328|       |
23329|       |    /* Optional working directory. Available for both os/execute and os/spawn. */
23330|      3|    const char *chdir_path = NULL;
23331|      3|    if (argc > 2) {
  ------------------
  |  Branch (23331:9): [True: 0, False: 3]
  ------------------
23332|      0|        JanetDictView tab = janet_getdictionary(argv, 2);
23333|      0|        Janet workdir = janet_dictionary_get(tab.kvs, tab.cap, janet_ckeywordv("cd"));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23334|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23335|      0|            chdir_path = (const char *) janet_unwrap_string(workdir);
  ------------------
  |  |  863|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
23336|       |#ifndef JANET_SPAWN_CHDIR
23337|       |            janet_panicf(":cd argument not supported on this system - %s", chdir_path);
23338|       |#endif
23339|      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 (23339:20): [True: 0, False: 0]
  ------------------
23340|      0|            janet_panicf("expected string for :cd argumnet, got %v", workdir);
23341|      0|        }
23342|      0|    }
23343|       |
23344|       |    /* Clean up if any of the pipes have any issues */
23345|      3|    if (pipe_errflag) {
  ------------------
  |  Branch (23345:9): [True: 0, False: 3]
  ------------------
23346|      0|        if (pipe_in != JANET_HANDLE_NONE) close_handle(pipe_in);
  ------------------
  |  |  438|      0|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23346:13): [True: 0, False: 0]
  ------------------
23347|      0|        if (pipe_out != JANET_HANDLE_NONE) close_handle(pipe_out);
  ------------------
  |  |  438|      0|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23347:13): [True: 0, False: 0]
  ------------------
23348|      0|        if (pipe_err != JANET_HANDLE_NONE) close_handle(pipe_err);
  ------------------
  |  |  438|      0|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23348:13): [True: 0, False: 0]
  ------------------
23349|      0|        janet_panic("failed to create pipes");
23350|      0|    }
23351|       |
23352|       |#ifdef JANET_WINDOWS
23353|       |
23354|       |    HANDLE pHandle, tHandle;
23355|       |    SECURITY_ATTRIBUTES saAttr;
23356|       |    PROCESS_INFORMATION processInfo;
23357|       |    STARTUPINFO startupInfo;
23358|       |    LPCSTR lpCurrentDirectory = NULL;
23359|       |    memset(&saAttr, 0, sizeof(saAttr));
23360|       |    memset(&processInfo, 0, sizeof(processInfo));
23361|       |    memset(&startupInfo, 0, sizeof(startupInfo));
23362|       |    startupInfo.cb = sizeof(startupInfo);
23363|       |    startupInfo.dwFlags |= STARTF_USESTDHANDLES;
23364|       |    saAttr.nLength = sizeof(saAttr);
23365|       |
23366|       |    JanetBuffer *buf = os_exec_escape(exargs);
23367|       |    if (buf->count > 8191) {
23368|       |        if (pipe_in != JANET_HANDLE_NONE) CloseHandle(pipe_in);
23369|       |        if (pipe_out != JANET_HANDLE_NONE) CloseHandle(pipe_out);
23370|       |        if (pipe_err != JANET_HANDLE_NONE) CloseHandle(pipe_err);
23371|       |        janet_panic("command line string too long (max 8191 characters)");
23372|       |    }
23373|       |    const char *path = (const char *) janet_unwrap_string(exargs.items[0]);
23374|       |
23375|       |    if (chdir_path != NULL) {
23376|       |        lpCurrentDirectory = chdir_path;
23377|       |    }
23378|       |
23379|       |    /* Do IO redirection */
23380|       |
23381|       |    if (pipe_in != JANET_HANDLE_NONE) {
23382|       |        startupInfo.hStdInput = pipe_in;
23383|       |    } else if (new_in != JANET_HANDLE_NONE) {
23384|       |        startupInfo.hStdInput = new_in;
23385|       |    } else {
23386|       |        startupInfo.hStdInput = (HANDLE) _get_osfhandle(_fileno(stdin));
23387|       |    }
23388|       |
23389|       |    if (pipe_out != JANET_HANDLE_NONE) {
23390|       |        startupInfo.hStdOutput = pipe_out;
23391|       |    } else if (new_out != JANET_HANDLE_NONE) {
23392|       |        startupInfo.hStdOutput = new_out;
23393|       |    } else {
23394|       |        startupInfo.hStdOutput = (HANDLE) _get_osfhandle(_fileno(stdout));
23395|       |    }
23396|       |
23397|       |    if (pipe_err != JANET_HANDLE_NONE) {
23398|       |        startupInfo.hStdError = pipe_err;
23399|       |    } else if (new_err != NULL) {
23400|       |        startupInfo.hStdError = new_err;
23401|       |    } else if (stderr_is_stdout) {
23402|       |        startupInfo.hStdError = startupInfo.hStdOutput;
23403|       |    } else {
23404|       |        startupInfo.hStdError = (HANDLE) _get_osfhandle(_fileno(stderr));
23405|       |    }
23406|       |
23407|       |    int cp_failed = 0;
23408|       |    DWORD cp_error_code = 0;
23409|       |    if (!CreateProcess(janet_flag_at(flags, 1) ? NULL : path,
23410|       |                       (char *) buf->data, /* Single CLI argument */
23411|       |                       &saAttr, /* no proc inheritance */
23412|       |                       &saAttr, /* no thread inheritance */
23413|       |                       TRUE, /* handle inheritance */
23414|       |                       0, /* flags */
23415|       |                       use_environ ? NULL : envp, /* pass in environment */
23416|       |                       lpCurrentDirectory,
23417|       |                       &startupInfo,
23418|       |                       &processInfo)) {
23419|       |        cp_failed = 1;
23420|       |        cp_error_code = GetLastError();
23421|       |    }
23422|       |
23423|       |    if (pipe_in != JANET_HANDLE_NONE) CloseHandle(pipe_in);
23424|       |    if (pipe_out != JANET_HANDLE_NONE) CloseHandle(pipe_out);
23425|       |    if (pipe_err != JANET_HANDLE_NONE) CloseHandle(pipe_err);
23426|       |
23427|       |    os_execute_cleanup(envp, NULL);
23428|       |
23429|       |    if (cp_failed)  {
23430|       |        char msgbuf[256];
23431|       |        msgbuf[0] = '\0';
23432|       |        FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
23433|       |                      NULL,
23434|       |                      cp_error_code,
23435|       |                      MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
23436|       |                      msgbuf,
23437|       |                      sizeof(msgbuf),
23438|       |                      NULL);
23439|       |        if (!*msgbuf) snprintf(msgbuf, sizeof(msgbuf), "%" PRIu32, (uint32_t) cp_error_code);
23440|       |        char *c = msgbuf;
23441|       |        while (*c) {
23442|       |            if (*c == '\n' || *c == '\r') {
23443|       |                *c = '\0';
23444|       |                break;
23445|       |            }
23446|       |            c++;
23447|       |        }
23448|       |        janet_panicf("failed to create process: %s", janet_cstringv(msgbuf));
23449|       |    }
23450|       |
23451|       |    pHandle = processInfo.hProcess;
23452|       |    tHandle = processInfo.hThread;
23453|       |
23454|       |#else
23455|       |
23456|       |    /* Result */
23457|      3|    int status = 0;
23458|       |
23459|      3|    const char **child_argv = janet_smalloc(sizeof(char *) * ((size_t) exargs.len + 1));
23460|      3|    for (int32_t i = 0; i < exargs.len; i++)
  ------------------
  |  Branch (23460:25): [True: 0, False: 3]
  ------------------
23461|      0|        child_argv[i] = janet_getcstring(exargs.items, i);
23462|      3|    child_argv[exargs.len] = NULL;
23463|       |    /* Coerce to form that works for spawn. I'm fairly confident no implementation
23464|       |     * of posix_spawn would modify the argv array passed in. */
23465|      3|    char *const *cargv = (char *const *)child_argv;
23466|       |
23467|      3|    if (use_environ) {
  ------------------
  |  Branch (23467:9): [True: 0, False: 3]
  ------------------
23468|      0|        janet_lock_environ();
23469|      0|    }
23470|       |
23471|       |    /* exec mode */
23472|      3|    if (mode == JANET_EXECUTE_EXEC) {
  ------------------
  |  Branch (23472:9): [True: 0, False: 3]
  ------------------
23473|      0|        int status;
23474|       |#ifdef JANET_PLAN9
23475|       |        status = exec(cargv[0], cargv);
23476|       |#else
23477|      0|        if (!use_environ) {
  ------------------
  |  Branch (23477:13): [True: 0, False: 0]
  ------------------
23478|      0|            environ = envp;
23479|      0|        }
23480|      0|        do {
23481|      0|            if (janet_flag_at(flags, 1)) {
  ------------------
  |  | 1995|      0|#define janet_flag_at(F, I) ((F) & ((1ULL) << (I)))
  |  |  ------------------
  |  |  |  Branch (1995:29): [True: 0, False: 0]
  |  |  ------------------
  ------------------
23482|      0|                status = execvp(cargv[0], cargv);
23483|      0|            } else {
23484|      0|                status = execv(cargv[0], cargv);
23485|      0|            }
23486|      0|        } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (23486:18): [True: 0, False: 0]
  |  Branch (23486:34): [True: 0, False: 0]
  ------------------
23487|      0|#endif
23488|      0|        janet_panicf("%p: %s", cargv[0], janet_strerror(errno ? errno : ENOENT));
  ------------------
  |  Branch (23488:57): [True: 0, False: 0]
  ------------------
23489|      0|    }
23490|       |
23491|      3|#ifndef JANET_NO_SPAWN
23492|       |    /* Use posix_spawn to spawn new process */
23493|       |
23494|       |    /* Posix spawn setup */
23495|      3|    posix_spawn_file_actions_t actions;
23496|      3|    posix_spawn_file_actions_init(&actions);
23497|      3|#ifdef JANET_SPAWN_CHDIR
23498|      3|    if (chdir_path != NULL) {
  ------------------
  |  Branch (23498:9): [True: 0, False: 3]
  ------------------
23499|       |#ifdef JANET_SPAWN_CHDIR_NO_NP
23500|       |        posix_spawn_file_actions_addchdir(&actions, chdir_path);
23501|       |#else
23502|      0|        posix_spawn_file_actions_addchdir_np(&actions, chdir_path);
23503|      0|#endif
23504|      0|    }
23505|      3|#endif
23506|      3|    if (pipe_in != JANET_HANDLE_NONE) {
  ------------------
  |  |  438|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23506:9): [True: 0, False: 3]
  ------------------
23507|      0|        posix_spawn_file_actions_adddup2(&actions, pipe_in, 0);
23508|      0|        posix_spawn_file_actions_addclose(&actions, pipe_in);
23509|      3|    } else if (new_in != JANET_HANDLE_NONE && new_in != 0) {
  ------------------
  |  |  438|      6|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23509:16): [True: 0, False: 3]
  |  Branch (23509:47): [True: 0, False: 0]
  ------------------
23510|      0|        posix_spawn_file_actions_adddup2(&actions, new_in, 0);
23511|      0|        if (new_in != new_out && new_in != new_err)
  ------------------
  |  Branch (23511:13): [True: 0, False: 0]
  |  Branch (23511:34): [True: 0, False: 0]
  ------------------
23512|      0|            posix_spawn_file_actions_addclose(&actions, new_in);
23513|      0|    }
23514|      3|    if (pipe_out != JANET_HANDLE_NONE) {
  ------------------
  |  |  438|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23514:9): [True: 0, False: 3]
  ------------------
23515|      0|        posix_spawn_file_actions_adddup2(&actions, pipe_out, 1);
23516|      0|        posix_spawn_file_actions_addclose(&actions, pipe_out);
23517|      3|    } else if (new_out != JANET_HANDLE_NONE && new_out != 1) {
  ------------------
  |  |  438|      6|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23517:16): [True: 0, False: 3]
  |  Branch (23517:48): [True: 0, False: 0]
  ------------------
23518|      0|        posix_spawn_file_actions_adddup2(&actions, new_out, 1);
23519|      0|        if (new_out != new_err)
  ------------------
  |  Branch (23519:13): [True: 0, False: 0]
  ------------------
23520|      0|            posix_spawn_file_actions_addclose(&actions, new_out);
23521|      0|    }
23522|      3|    if (pipe_err != JANET_HANDLE_NONE) {
  ------------------
  |  |  438|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23522:9): [True: 0, False: 3]
  ------------------
23523|      0|        posix_spawn_file_actions_adddup2(&actions, pipe_err, 2);
23524|      0|        posix_spawn_file_actions_addclose(&actions, pipe_err);
23525|      3|    } else if (new_err != JANET_HANDLE_NONE && new_err != 2) {
  ------------------
  |  |  438|      6|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23525:16): [True: 0, False: 3]
  |  Branch (23525:48): [True: 0, False: 0]
  ------------------
23526|      0|        posix_spawn_file_actions_adddup2(&actions, new_err, 2);
23527|      0|        posix_spawn_file_actions_addclose(&actions, new_err);
23528|      3|    } else if (stderr_is_stdout) {
  ------------------
  |  Branch (23528:16): [True: 0, False: 3]
  ------------------
23529|      0|        posix_spawn_file_actions_adddup2(&actions, 1, 2);
23530|      0|    }
23531|       |
23532|      3|    pid_t pid;
23533|      3|    if (janet_flag_at(flags, 1)) {
  ------------------
  |  | 1995|      3|#define janet_flag_at(F, I) ((F) & ((1ULL) << (I)))
  |  |  ------------------
  |  |  |  Branch (1995:29): [True: 0, False: 3]
  |  |  ------------------
  ------------------
23534|      0|        status = posix_spawnp(&pid,
23535|      0|                              child_argv[0], &actions, NULL, cargv,
23536|      0|                              use_environ ? environ : envp);
  ------------------
  |  Branch (23536:31): [True: 0, False: 0]
  ------------------
23537|      3|    } else {
23538|      3|        status = posix_spawn(&pid,
23539|      3|                             child_argv[0], &actions, NULL, cargv,
23540|      3|                             use_environ ? environ : envp);
  ------------------
  |  Branch (23540:30): [True: 0, False: 3]
  ------------------
23541|      3|    }
23542|       |
23543|      3|    posix_spawn_file_actions_destroy(&actions);
23544|       |
23545|      3|    if (pipe_in != JANET_HANDLE_NONE) close(pipe_in);
  ------------------
  |  |  438|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23545:9): [True: 0, False: 3]
  ------------------
23546|      3|    if (pipe_out != JANET_HANDLE_NONE) close(pipe_out);
  ------------------
  |  |  438|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23546:9): [True: 0, False: 3]
  ------------------
23547|      3|    if (pipe_err != JANET_HANDLE_NONE) close(pipe_err);
  ------------------
  |  |  438|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23547:9): [True: 0, False: 3]
  ------------------
23548|       |
23549|      3|    if (use_environ) {
  ------------------
  |  Branch (23549:9): [True: 0, False: 3]
  ------------------
23550|      0|        janet_unlock_environ();
23551|      0|    }
23552|       |
23553|      3|    os_execute_cleanup(envp, child_argv);
23554|      3|    if (status) {
  ------------------
  |  Branch (23554:9): [True: 0, False: 3]
  ------------------
23555|       |        /* correct for macos bug where errno is not set */
23556|      0|        janet_panicf("%p: %s", argv[0], janet_strerror(errno ? errno : ENOENT));
  ------------------
  |  Branch (23556:56): [True: 0, False: 0]
  ------------------
23557|      0|    }
23558|       |
23559|      3|#endif
23560|      3|#endif
23561|      3|#ifndef JANET_NO_SPAWN
23562|      3|    JanetProc *proc = janet_abstract(&ProcAT, sizeof(JanetProc));
23563|      3|    proc->return_code = -1;
23564|       |#ifdef JANET_WINDOWS
23565|       |    proc->pHandle = pHandle;
23566|       |    proc->tHandle = tHandle;
23567|       |#else
23568|      3|    proc->pid = pid;
23569|      3|#endif
23570|      3|    proc->in = NULL;
23571|      3|    proc->out = NULL;
23572|      3|    proc->err = NULL;
23573|      3|    proc->flags = pipe_owner_flags;
23574|      3|    if (janet_flag_at(flags, 2)) {
  ------------------
  |  | 1995|      3|#define janet_flag_at(F, I) ((F) & ((1ULL) << (I)))
  |  |  ------------------
  |  |  |  Branch (1995:29): [True: 0, False: 3]
  |  |  ------------------
  ------------------
23575|      0|        proc->flags |= JANET_PROC_ERROR_NONZERO;
  ------------------
  |  |22609|      0|#define JANET_PROC_ERROR_NONZERO 8
  ------------------
23576|      0|    }
23577|      3|    if (is_spawn) {
  ------------------
  |  Branch (23577:9): [True: 0, False: 3]
  ------------------
23578|       |        /* Only set up pointers to stdin, stdout, and stderr if os/spawn. */
23579|      0|        if (new_in != JANET_HANDLE_NONE) {
  ------------------
  |  |  438|      0|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23579:13): [True: 0, False: 0]
  ------------------
23580|      0|            proc->in = get_stdio_for_handle(new_in, orig_in, 1);
23581|      0|            if (NULL == proc->in) janet_panic("failed to construct proc");
  ------------------
  |  Branch (23581:17): [True: 0, False: 0]
  ------------------
23582|      0|        }
23583|      0|        if (new_out != JANET_HANDLE_NONE) {
  ------------------
  |  |  438|      0|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23583:13): [True: 0, False: 0]
  ------------------
23584|      0|            proc->out = get_stdio_for_handle(new_out, orig_out, 0);
23585|      0|            if (NULL == proc->out) janet_panic("failed to construct proc");
  ------------------
  |  Branch (23585:17): [True: 0, False: 0]
  ------------------
23586|      0|        }
23587|      0|        if (new_err != JANET_HANDLE_NONE) {
  ------------------
  |  |  438|      0|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23587:13): [True: 0, False: 0]
  ------------------
23588|      0|            proc->err = get_stdio_for_handle(new_err, orig_err, 0);
23589|      0|            if (NULL == proc->err) janet_panic("failed to construct proc");
  ------------------
  |  Branch (23589:17): [True: 0, False: 0]
  ------------------
23590|      0|        }
23591|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23592|      3|    } else {
23593|      3|#ifdef JANET_EV
23594|      3|        os_proc_wait_impl(proc);
23595|       |#else
23596|       |        return os_proc_wait_impl(proc);
23597|       |#endif
23598|      3|    }
23599|      3|#endif
23600|      3|}
janet.c:os_execute_env:
22457|      3|static EnvBlock os_execute_env(int32_t argc, const Janet *argv) {
22458|      3|    if (argc <= 2) return NULL;
  ------------------
  |  Branch (22458:9): [True: 1, False: 2]
  ------------------
22459|      2|    JanetDictView dict = janet_getdictionary(argv, 2);
22460|       |#ifdef JANET_WINDOWS
22461|       |    JanetBuffer *temp = janet_buffer(10);
22462|       |    for (int32_t i = 0; i < dict.cap; i++) {
22463|       |        const JanetKV *kv = dict.kvs + i;
22464|       |        if (!janet_checktype(kv->key, JANET_STRING)) continue;
22465|       |        if (!janet_checktype(kv->value, JANET_STRING)) continue;
22466|       |        const uint8_t *keys = janet_unwrap_string(kv->key);
22467|       |        const uint8_t *vals = janet_unwrap_string(kv->value);
22468|       |        janet_buffer_push_bytes(temp, keys, janet_string_length(keys));
22469|       |        janet_buffer_push_u8(temp, '=');
22470|       |        janet_buffer_push_bytes(temp, vals, janet_string_length(vals));
22471|       |        janet_buffer_push_u8(temp, '\0');
22472|       |    }
22473|       |    /* Windows environment blocks must be double-NULL terminated */
22474|       |    if (temp->count == 0) janet_buffer_push_u8(temp, '\0');
22475|       |    janet_buffer_push_u8(temp, '\0');
22476|       |    char *ret = janet_smalloc(temp->count);
22477|       |    memcpy(ret, temp->data, temp->count);
22478|       |    return ret;
22479|       |#else
22480|      2|    char **envp = janet_smalloc(sizeof(char *) * ((size_t)dict.len + 1));
22481|      2|    int32_t j = 0;
22482|      2|    for (int32_t i = 0; i < dict.cap; i++) {
  ------------------
  |  Branch (22482:25): [True: 0, False: 2]
  ------------------
22483|      0|        const JanetKV *kv = dict.kvs + i;
22484|      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 (22484:13): [True: 0, False: 0]
  ------------------
22485|      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 (22485:13): [True: 0, False: 0]
  ------------------
22486|      0|        const uint8_t *keys = janet_unwrap_string(kv->key);
  ------------------
  |  |  863|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
22487|      0|        const uint8_t *vals = janet_unwrap_string(kv->value);
  ------------------
  |  |  863|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
22488|      0|        int32_t klen = janet_string_length(keys);
  ------------------
  |  | 1812|      0|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|      0|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
22489|      0|        int32_t vlen = janet_string_length(vals);
  ------------------
  |  | 1812|      0|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|      0|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
22490|       |        /* Check keys has no embedded 0s or =s. */
22491|      0|        int skip = 0;
22492|      0|        for (int32_t k = 0; k < klen; k++) {
  ------------------
  |  Branch (22492:29): [True: 0, False: 0]
  ------------------
22493|      0|            if (keys[k] == '\0' || keys[k] == '=') {
  ------------------
  |  Branch (22493:17): [True: 0, False: 0]
  |  Branch (22493:36): [True: 0, False: 0]
  ------------------
22494|      0|                skip = 1;
22495|      0|                break;
22496|      0|            }
22497|      0|        }
22498|      0|        if (skip) continue;
  ------------------
  |  Branch (22498:13): [True: 0, False: 0]
  ------------------
22499|      0|        char *envitem = janet_smalloc((size_t) klen + (size_t) vlen + 2);
22500|      0|        memcpy(envitem, keys, klen);
22501|      0|        envitem[klen] = '=';
22502|      0|        memcpy(envitem + klen + 1, vals, vlen);
22503|      0|        envitem[klen + vlen + 1] = 0;
22504|      0|        envp[j++] = envitem;
22505|      0|    }
22506|       |    envp[j] = NULL;
22507|      2|    return envp;
22508|      3|#endif
22509|      3|}
janet.c:janet_lock_environ:
22225|      3|static void janet_lock_environ(void) {
22226|      3|}
janet.c:janet_unlock_environ:
22227|      3|static void janet_unlock_environ(void) {
22228|      3|}
janet.c:time_to_tm:
23972|      3|static struct tm *time_to_tm(const Janet *argv, int32_t argc, int32_t n, struct tm *t_infos) {
23973|      3|    time_t t;
23974|      3|    if (argc > n && !janet_checktype(argv[n], 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 (23974:9): [True: 0, False: 3]
  |  Branch (23974:21): [True: 0, False: 0]
  ------------------
23975|      0|        int64_t integer = janet_getinteger64(argv, n);
23976|      0|        t = (time_t) integer;
23977|      3|    } else {
23978|      3|        time(&t);
23979|      3|    }
23980|      3|    struct tm *t_info = NULL;
23981|      3|    if (argc > n + 1 && janet_truthy(argv[n + 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 (23981:9): [True: 0, False: 3]
  ------------------
23982|       |        /* local time */
23983|       |#ifdef JANET_WINDOWS
23984|       |        _tzset();
23985|       |        localtime_s(t_infos, &t);
23986|       |        t_info = t_infos;
23987|       |#elif defined(JANET_PLAN9)
23988|       |        t_info = localtime(&t);
23989|       |#else
23990|      0|        tzset();
23991|      0|        t_info = localtime_r(&t, t_infos);
23992|      0|#endif
23993|      3|    } else {
23994|       |        /* utc time */
23995|       |#ifdef JANET_WINDOWS
23996|       |        gmtime_s(t_infos, &t);
23997|       |        t_info = t_infos;
23998|       |#elif defined(JANET_PLAN9)
23999|       |        t_info = gmtime(&t);
24000|       |#else
24001|      3|        t_info = gmtime_r(&t, t_infos);
24002|      3|#endif
24003|      3|    }
24004|      3|    return t_info;
24005|      3|}
janet.c:os_stat_or_lstat:
24566|  6.24k|static Janet os_stat_or_lstat(int do_lstat, int32_t argc, Janet *argv) {
24567|  6.24k|    janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2028|  6.24k|#define JANET_SANDBOX_FS_READ 64
  ------------------
24568|  6.24k|    janet_arity(argc, 1, 2);
24569|  6.24k|    const char *path = janet_getcstring(argv, 0);
24570|  6.24k|    JanetTable *tab = NULL;
24571|  6.24k|    const uint8_t *key = NULL;
24572|  6.24k|    if (argc == 2) {
  ------------------
  |  Branch (24572:9): [True: 6.24k, False: 0]
  ------------------
24573|  6.24k|        if (janet_checktype(argv[1], JANET_KEYWORD)) {
  ------------------
  |  |  806|  6.24k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 6.24k, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 6.24k]
  |  |  ------------------
  |  |  807|  6.24k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.24k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  6.24k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  6.24k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.24k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.24k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24574|  6.24k|            key = janet_getkeyword(argv, 1);
24575|  6.24k|        } else {
24576|      0|            tab = janet_gettable(argv, 1);
24577|      0|        }
24578|  6.24k|    } else {
24579|      0|        tab = janet_table(0);
24580|      0|    }
24581|       |
24582|       |    /* Build result */
24583|  6.24k|    jstat_t st;
24584|       |#ifdef JANET_WINDOWS
24585|       |    (void) do_lstat;
24586|       |    int res = _stat(path, &st);
24587|       |#elif defined(JANET_PLAN9)
24588|       |    (void)do_lstat;
24589|       |    int res = stat(path, &st);
24590|       |#else
24591|  6.24k|    int res;
24592|  6.24k|    if (do_lstat) {
  ------------------
  |  Branch (24592:9): [True: 0, False: 6.24k]
  ------------------
24593|      0|        res = lstat(path, &st);
24594|  6.24k|    } else {
24595|  6.24k|        res = stat(path, &st);
24596|  6.24k|    }
24597|  6.24k|#endif
24598|  6.24k|    if (-1 == res) {
  ------------------
  |  Branch (24598:9): [True: 6.24k, False: 0]
  ------------------
24599|  6.24k|        return janet_wrap_nil();
  ------------------
  |  |  831|  6.24k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  6.24k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.24k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.24k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24600|  6.24k|    }
24601|       |
24602|      0|    if (NULL == key) {
  ------------------
  |  Branch (24602:9): [True: 0, False: 0]
  ------------------
24603|       |        /* Put results in table */
24604|      0|        for (const struct OsStatGetter *sg = os_stat_getters; sg->name != NULL; sg++) {
  ------------------
  |  Branch (24604:63): [True: 0, False: 0]
  ------------------
24605|      0|            janet_table_put(tab, janet_ckeywordv(sg->name), sg->fn(&st));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24606|      0|        }
24607|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24608|      0|    } else {
24609|       |        /* Get one result */
24610|      0|        for (const struct OsStatGetter *sg = os_stat_getters; sg->name != NULL; sg++) {
  ------------------
  |  Branch (24610:63): [True: 0, False: 0]
  ------------------
24611|      0|            if (janet_cstrcmp(key, sg->name)) continue;
  ------------------
  |  Branch (24611:17): [True: 0, False: 0]
  ------------------
24612|      0|            return sg->fn(&st);
24613|      0|        }
24614|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24615|      0|    }
24616|      0|}
janet.c:os_getmode:
24480|      1|static jmode_t os_getmode(const Janet *argv, int32_t n) {
24481|      1|    return janet_perm_from_unix(os_get_unix_mode(argv, n));
24482|      1|}
janet.c:janet_perm_from_unix:
24408|     35|static mode_t janet_perm_from_unix(int32_t x) {
24409|     35|    return (mode_t) x;
24410|     35|}
janet.c:os_make_permstring:
24446|  2.29k|static Janet os_make_permstring(int32_t permissions) {
24447|  2.29k|    uint8_t bytes[9] = {0};
24448|  2.29k|    bytes[0] = (permissions & 0400) ? 'r' : '-';
  ------------------
  |  Branch (24448:16): [True: 2.26k, False: 30]
  ------------------
24449|  2.29k|    bytes[1] = (permissions & 0200) ? 'w' : '-';
  ------------------
  |  Branch (24449:16): [True: 16, False: 2.27k]
  ------------------
24450|  2.29k|    bytes[2] = (permissions & 0100) ? 'x' : '-';
  ------------------
  |  Branch (24450:16): [True: 19, False: 2.27k]
  ------------------
24451|  2.29k|    bytes[3] = (permissions & 0040) ? 'r' : '-';
  ------------------
  |  Branch (24451:16): [True: 14, False: 2.27k]
  ------------------
24452|  2.29k|    bytes[4] = (permissions & 0020) ? 'w' : '-';
  ------------------
  |  Branch (24452:16): [True: 16, False: 2.27k]
  ------------------
24453|  2.29k|    bytes[5] = (permissions & 0010) ? 'x' : '-';
  ------------------
  |  Branch (24453:16): [True: 12, False: 2.27k]
  ------------------
24454|  2.29k|    bytes[6] = (permissions & 0004) ? 'r' : '-';
  ------------------
  |  Branch (24454:16): [True: 12, False: 2.27k]
  ------------------
24455|  2.29k|    bytes[7] = (permissions & 0002) ? 'w' : '-';
  ------------------
  |  Branch (24455:16): [True: 14, False: 2.27k]
  ------------------
24456|  2.29k|    bytes[8] = (permissions & 0001) ? 'x' : '-';
  ------------------
  |  Branch (24456:16): [True: 18, False: 2.27k]
  ------------------
24457|  2.29k|    return janet_stringv(bytes, sizeof(bytes));
  ------------------
  |  | 1826|  2.29k|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|  2.29k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  2.29k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  2.29k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  2.29k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24458|  2.29k|}
janet.c:os_get_unix_mode:
24460|  3.31k|static int32_t os_get_unix_mode(const Janet *argv, int32_t n) {
24461|  3.31k|    int32_t unix_mode;
24462|  3.31k|    if (janet_checkint(argv[n])) {
  ------------------
  |  Branch (24462:9): [True: 3.30k, False: 14]
  ------------------
24463|       |        /* Integer mode */
24464|  3.30k|        int32_t x = janet_unwrap_integer(argv[n]);
  ------------------
  |  |  966|  3.30k|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|  3.30k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
24465|  3.30k|        if (x < 0 || x > 0777) {
  ------------------
  |  Branch (24465:13): [True: 1, False: 3.30k]
  |  Branch (24465:22): [True: 1, False: 3.29k]
  ------------------
24466|      2|            janet_panicf("bad slot #%d, expected integer in range [0, 8r777], got %v", n, argv[n]);
24467|      2|        }
24468|  3.29k|        unix_mode = x;
24469|  3.29k|    } else {
24470|       |        /* Bytes mode */
24471|     14|        JanetByteView bytes = janet_getbytes(argv, n);
24472|     14|        if (bytes.len != 9) {
  ------------------
  |  Branch (24472:13): [True: 0, False: 14]
  ------------------
24473|      0|            janet_panicf("bad slot #%d: expected byte sequence of length 9, got %v", n, argv[n]);
24474|      0|        }
24475|     14|        unix_mode = os_parse_permstring(bytes.bytes);
24476|     14|    }
24477|  3.31k|    return unix_mode;
24478|  3.31k|}
janet.c:os_parse_permstring:
24432|     12|static int32_t os_parse_permstring(const uint8_t *perm) {
24433|     12|    int32_t m = 0;
24434|     12|    if (perm[0] == 'r') m |= 0400;
  ------------------
  |  Branch (24434:9): [True: 1, False: 11]
  ------------------
24435|     12|    if (perm[1] == 'w') m |= 0200;
  ------------------
  |  Branch (24435:9): [True: 7, False: 5]
  ------------------
24436|     12|    if (perm[2] == 'x') m |= 0100;
  ------------------
  |  Branch (24436:9): [True: 8, False: 4]
  ------------------
24437|     12|    if (perm[3] == 'r') m |= 0040;
  ------------------
  |  Branch (24437:9): [True: 6, False: 6]
  ------------------
24438|     12|    if (perm[4] == 'w') m |= 0020;
  ------------------
  |  Branch (24438:9): [True: 5, False: 7]
  ------------------
24439|     12|    if (perm[5] == 'x') m |= 0010;
  ------------------
  |  Branch (24439:9): [True: 5, False: 7]
  ------------------
24440|     12|    if (perm[6] == 'r') m |= 0004;
  ------------------
  |  Branch (24440:9): [True: 3, False: 9]
  ------------------
24441|     12|    if (perm[7] == 'w') m |= 0002;
  ------------------
  |  Branch (24441:9): [True: 6, False: 6]
  ------------------
24442|     12|    if (perm[8] == 'x') m |= 0001;
  ------------------
  |  Branch (24442:9): [True: 6, False: 6]
  ------------------
24443|     12|    return m;
24444|     12|}
janet.c:os_optmode:
24801|     36|static jmode_t os_optmode(int32_t argc, const Janet *argv, int32_t n, int32_t dflt) {
24802|     36|    if (argc > n) return os_getmode(argv, n);
  ------------------
  |  Branch (24802:9): [True: 1, False: 35]
  ------------------
24803|     35|    return janet_perm_from_unix(dflt);
24804|     36|}
janet.c:janet_parser_checkdead:
25854|  13.0M|static void janet_parser_checkdead(JanetParser *parser) {
25855|  13.0M|    if (parser->flag) janet_panic("parser is dead, cannot consume");
  ------------------
  |  Branch (25855:9): [True: 0, False: 13.0M]
  ------------------
25856|  13.0M|    if (parser->error) janet_panic("parser has unchecked error, cannot consume");
  ------------------
  |  Branch (25856:9): [True: 0, False: 13.0M]
  ------------------
25857|  13.0M|}
janet.c:delim_error:
25364|  1.41k|static void delim_error(JanetParser *parser, size_t stack_index, char c, const char *msg) {
25365|  1.41k|    JanetParseState *s = parser->states + stack_index;
25366|  1.41k|    JanetBuffer *buffer = janet_buffer(40);
25367|  1.41k|    if (msg) {
  ------------------
  |  Branch (25367:9): [True: 1.41k, False: 0]
  ------------------
25368|  1.41k|        janet_buffer_push_cstring(buffer, msg);
25369|  1.41k|    }
25370|  1.41k|    if (c) {
  ------------------
  |  Branch (25370:9): [True: 661, False: 754]
  ------------------
25371|    661|        janet_buffer_push_u8(buffer, c);
25372|    661|    }
25373|  1.41k|    if (stack_index > 0) {
  ------------------
  |  Branch (25373:9): [True: 790, False: 625]
  ------------------
25374|    790|        janet_buffer_push_cstring(buffer, ", ");
25375|    790|        if (s->flags & PFLAG_PARENS) {
  ------------------
  |  |25300|    790|#define PFLAG_PARENS 0x400
  ------------------
  |  Branch (25375:13): [True: 147, False: 643]
  ------------------
25376|    147|            janet_buffer_push_u8(buffer, '(');
25377|    643|        } else if (s->flags & PFLAG_SQRBRACKETS) {
  ------------------
  |  |25301|    643|#define PFLAG_SQRBRACKETS 0x800
  ------------------
  |  Branch (25377:20): [True: 21, False: 622]
  ------------------
25378|     21|            janet_buffer_push_u8(buffer, '[');
25379|    622|        } else if (s->flags & PFLAG_CURLYBRACKETS) {
  ------------------
  |  |25302|    622|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
  |  Branch (25379:20): [True: 41, False: 581]
  ------------------
25380|     41|            janet_buffer_push_u8(buffer, '{');
25381|    581|        } else if (s->flags & PFLAG_STRING) {
  ------------------
  |  |25303|    581|#define PFLAG_STRING 0x2000
  ------------------
  |  Branch (25381:20): [True: 149, False: 432]
  ------------------
25382|    149|            janet_buffer_push_u8(buffer, '"');
25383|    432|        } else if (s->flags & PFLAG_LONGSTRING) {
  ------------------
  |  |25304|    432|#define PFLAG_LONGSTRING 0x4000
  ------------------
  |  Branch (25383:20): [True: 171, False: 261]
  ------------------
25384|    171|            int32_t i;
25385|  66.5k|            for (i = 0; i < s->argn; i++) {
  ------------------
  |  Branch (25385:25): [True: 66.4k, False: 171]
  ------------------
25386|  66.4k|                janet_buffer_push_u8(buffer, '`');
25387|  66.4k|            }
25388|    171|        }
25389|    790|        janet_formatb(buffer, " opened at line %d, column %d", (int32_t) s->line, (int32_t) s->column);
25390|    790|    }
25391|  1.41k|    parser->error = (const char *) janet_string(buffer->data, buffer->count);
25392|  1.41k|    parser->flag |= JANET_PARSER_GENERATED_ERROR;
  ------------------
  |  |25194|  1.41k|#define JANET_PARSER_GENERATED_ERROR 0x2
  ------------------
25393|  1.41k|}
janet.c:pushstate:
25310|  6.65M|static void pushstate(JanetParser *p, Consumer consumer, int flags) {
25311|  6.65M|    JanetParseState s;
25312|  6.65M|    s.counter = 0;
25313|  6.65M|    s.argn = 0;
25314|  6.65M|    s.flags = flags;
25315|  6.65M|    s.consumer = consumer;
25316|  6.65M|    s.line = p->line;
25317|  6.65M|    s.column = p->column;
25318|  6.65M|    _pushstate(p, s);
25319|  6.65M|}
janet.c:root:
25781|  7.93M|static int root(JanetParser *p, JanetParseState *state, uint8_t c) {
25782|  7.93M|    switch (c) {
25783|  2.79M|        default:
  ------------------
  |  Branch (25783:9): [True: 2.79M, False: 5.14M]
  ------------------
25784|  2.79M|            if (is_whitespace(c)) return 1;
  ------------------
  |  Branch (25784:17): [True: 1.38M, False: 1.40M]
  ------------------
25785|  1.40M|            if (!janet_is_symbol_char(c)) {
  ------------------
  |  Branch (25785:17): [True: 328, False: 1.40M]
  ------------------
25786|    328|                p->error = "unexpected character";
25787|    328|                return 1;
25788|    328|            }
25789|  1.40M|            pushstate(p, tokenchar, PFLAG_TOKEN);
  ------------------
  |  |25308|  1.40M|#define PFLAG_TOKEN 0x40000
  ------------------
25790|  1.40M|            return 0;
25791|   231k|        case '\'':
  ------------------
  |  Branch (25791:9): [True: 231k, False: 7.69M]
  ------------------
25792|   248k|        case ',':
  ------------------
  |  Branch (25792:9): [True: 16.1k, False: 7.91M]
  ------------------
25793|   263k|        case ';':
  ------------------
  |  Branch (25793:9): [True: 15.4k, False: 7.91M]
  ------------------
25794|  2.66M|        case '~':
  ------------------
  |  Branch (25794:9): [True: 2.40M, False: 5.52M]
  ------------------
25795|  4.52M|        case '|':
  ------------------
  |  Branch (25795:9): [True: 1.85M, False: 6.07M]
  ------------------
25796|  4.52M|            pushstate(p, root, PFLAG_READERMAC | c);
  ------------------
  |  |25305|  4.52M|#define PFLAG_READERMAC 0x8000
  ------------------
25797|  4.52M|            return 1;
25798|  45.4k|        case '"':
  ------------------
  |  Branch (25798:9): [True: 45.4k, False: 7.88M]
  ------------------
25799|  45.4k|            pushstate(p, stringchar, PFLAG_STRING);
  ------------------
  |  |25303|  45.4k|#define PFLAG_STRING 0x2000
  ------------------
25800|  45.4k|            return 1;
25801|    974|        case '#':
  ------------------
  |  Branch (25801:9): [True: 974, False: 7.93M]
  ------------------
25802|    974|            pushstate(p, comment, PFLAG_COMMENT);
  ------------------
  |  |25307|    974|#define PFLAG_COMMENT 0x20000
  ------------------
25803|    974|            return 1;
25804|  84.3k|        case '@':
  ------------------
  |  Branch (25804:9): [True: 84.3k, False: 7.84M]
  ------------------
25805|  84.3k|            pushstate(p, atsign, PFLAG_ATSYM);
  ------------------
  |  |25306|  84.3k|#define PFLAG_ATSYM 0x10000
  ------------------
25806|  84.3k|            return 1;
25807|  8.32k|        case '`':
  ------------------
  |  Branch (25807:9): [True: 8.32k, False: 7.92M]
  ------------------
25808|  8.32k|            pushstate(p, longstring, PFLAG_LONGSTRING);
  ------------------
  |  |25304|  8.32k|#define PFLAG_LONGSTRING 0x4000
  ------------------
25809|  8.32k|            return 1;
25810|  34.1k|        case ')':
  ------------------
  |  Branch (25810:9): [True: 34.1k, False: 7.89M]
  ------------------
25811|  37.2k|        case ']':
  ------------------
  |  Branch (25811:9): [True: 3.07k, False: 7.92M]
  ------------------
25812|  83.3k|        case '}': {
  ------------------
  |  Branch (25812:9): [True: 46.1k, False: 7.88M]
  ------------------
25813|  83.3k|            Janet ds;
25814|  83.3k|            if (p->statecount == 1) {
  ------------------
  |  Branch (25814:17): [True: 625, False: 82.6k]
  ------------------
25815|    625|                delim_error(p, 0, c, "unexpected closing delimiter ");
25816|    625|                return 1;
25817|    625|            }
25818|  82.6k|            if ((c == ')' && (state->flags & PFLAG_PARENS)) ||
  ------------------
  |  |25300|  33.5k|#define PFLAG_PARENS 0x400
  ------------------
  |  Branch (25818:18): [True: 33.5k, False: 49.1k]
  |  Branch (25818:30): [True: 33.5k, False: 16]
  ------------------
25819|  49.1k|                    (c == ']' && (state->flags & PFLAG_SQRBRACKETS))) {
  ------------------
  |  |25301|  3.04k|#define PFLAG_SQRBRACKETS 0x800
  ------------------
  |  Branch (25819:22): [True: 3.04k, False: 46.1k]
  |  Branch (25819:34): [True: 3.03k, False: 11]
  ------------------
25820|  36.5k|                if (state->flags & PFLAG_ATSYM) {
  ------------------
  |  |25306|  36.5k|#define PFLAG_ATSYM 0x10000
  ------------------
  |  Branch (25820:21): [True: 1.22k, False: 35.3k]
  ------------------
25821|  1.22k|                    ds = close_array(p, state);
25822|  35.3k|                } else {
25823|  35.3k|                    ds = close_tuple(p, state, c == ']' ? JANET_TUPLE_FLAG_BRACKETCTOR : 0);
  ------------------
  |  | 1797|  2.86k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (25823:48): [True: 2.86k, False: 32.4k]
  ------------------
25824|  35.3k|                }
25825|  46.1k|            } else if (c == '}' && (state->flags & PFLAG_CURLYBRACKETS)) {
  ------------------
  |  |25302|  46.0k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
  |  Branch (25825:24): [True: 46.0k, False: 27]
  |  Branch (25825:36): [True: 46.0k, False: 9]
  ------------------
25826|  46.0k|                if (state->argn & 1) {
  ------------------
  |  Branch (25826:21): [True: 5, False: 46.0k]
  ------------------
25827|      5|                    p->error = "struct and table literals expect even number of arguments";
25828|      5|                    return 1;
25829|      5|                }
25830|  46.0k|                if (state->flags & PFLAG_ATSYM) {
  ------------------
  |  |25306|  46.0k|#define PFLAG_ATSYM 0x10000
  ------------------
  |  Branch (25830:21): [True: 649, False: 45.4k]
  ------------------
25831|    649|                    ds = close_table(p, state);
25832|  45.4k|                } else {
25833|  45.4k|                    ds = close_struct(p, state);
25834|  45.4k|                }
25835|  46.0k|            } else {
25836|     36|                delim_error(p, p->statecount - 1, c, "mismatched delimiter ");
25837|     36|                return 1;
25838|     36|            }
25839|  82.6k|            popstate(p, ds);
25840|  82.6k|        }
25841|      0|        return 1;
25842|   109k|        case '(':
  ------------------
  |  Branch (25842:9): [True: 109k, False: 7.82M]
  ------------------
25843|   109k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS);
  ------------------
  |  |25298|   109k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS);
  ------------------
  |  |25300|   109k|#define PFLAG_PARENS 0x400
  ------------------
25844|   109k|            return 1;
25845|   164k|        case '[':
  ------------------
  |  Branch (25845:9): [True: 164k, False: 7.76M]
  ------------------
25846|   164k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS);
  ------------------
  |  |25298|   164k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS);
  ------------------
  |  |25301|   164k|#define PFLAG_SQRBRACKETS 0x800
  ------------------
25847|   164k|            return 1;
25848|   121k|        case '{':
  ------------------
  |  Branch (25848:9): [True: 121k, False: 7.81M]
  ------------------
25849|   121k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS);
  ------------------
  |  |25298|   121k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS);
  ------------------
  |  |25302|   121k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
25850|   121k|            return 1;
25851|  7.93M|    }
25852|  7.93M|}
janet.c:is_whitespace:
25197|  2.79M|static int is_whitespace(uint8_t c) {
25198|  2.79M|    return c == ' '
  ------------------
  |  Branch (25198:12): [True: 12.8k, False: 2.77M]
  ------------------
25199|  2.77M|           || c == '\t'
  ------------------
  |  Branch (25199:15): [True: 14.5k, False: 2.76M]
  ------------------
25200|  2.76M|           || c == '\n'
  ------------------
  |  Branch (25200:15): [True: 196k, False: 2.56M]
  ------------------
25201|  2.56M|           || c == '\r'
  ------------------
  |  Branch (25201:15): [True: 6.35k, False: 2.56M]
  ------------------
25202|  2.56M|           || c == '\0'
  ------------------
  |  Branch (25202:15): [True: 1.14M, False: 1.41M]
  ------------------
25203|  1.41M|           || c == '\v'
  ------------------
  |  Branch (25203:15): [True: 3.75k, False: 1.41M]
  ------------------
25204|  1.41M|           || c == '\f';
  ------------------
  |  Branch (25204:15): [True: 14.2k, False: 1.40M]
  ------------------
25205|  2.79M|}
janet.c:stringchar:
25576|   801k|static int stringchar(JanetParser *p, JanetParseState *state, uint8_t c) {
25577|       |    /* Enter escape */
25578|   801k|    if (c == '\\') {
  ------------------
  |  Branch (25578:9): [True: 4.36k, False: 796k]
  ------------------
25579|  4.36k|        state->consumer = escape1;
25580|  4.36k|        return 1;
25581|  4.36k|    }
25582|       |    /* String end */
25583|   796k|    if (c == '"') {
  ------------------
  |  Branch (25583:9): [True: 47.3k, False: 749k]
  ------------------
25584|  47.3k|        return stringend(p, state);
25585|  47.3k|    }
25586|       |    /* normal char */
25587|   749k|    if (c != '\n' && c != '\r')
  ------------------
  |  Branch (25587:9): [True: 743k, False: 6.38k]
  |  Branch (25587:22): [True: 733k, False: 10.0k]
  ------------------
25588|   733k|        push_buf(p, c);
25589|   749k|    return 1;
25590|   796k|}
janet.c:escape1:
25491|  4.36k|static int escape1(JanetParser *p, JanetParseState *state, uint8_t c) {
25492|  4.36k|    int e = checkescape(c);
25493|  4.36k|    if (e < 0) {
  ------------------
  |  Branch (25493:9): [True: 29, False: 4.33k]
  ------------------
25494|     29|        p->error = "invalid string escape sequence";
25495|     29|        return 1;
25496|     29|    }
25497|  4.33k|    if (c == 'x') {
  ------------------
  |  Branch (25497:9): [True: 673, False: 3.66k]
  ------------------
25498|    673|        state->counter = 2;
25499|    673|        state->argn = 0;
25500|    673|        state->consumer = escapeh;
25501|  3.66k|    } else if (c == 'u' || c == 'U') {
  ------------------
  |  Branch (25501:16): [True: 1.31k, False: 2.34k]
  |  Branch (25501:28): [True: 63, False: 2.28k]
  ------------------
25502|  1.37k|        state->counter = c == 'u' ? 4 : 6;
  ------------------
  |  Branch (25502:26): [True: 1.31k, False: 63]
  ------------------
25503|  1.37k|        state->argn = 0;
25504|  1.37k|        state->consumer = escapeu;
25505|  2.28k|    } else {
25506|  2.28k|        push_buf(p, (uint8_t) e);
25507|  2.28k|        state->consumer = stringchar;
25508|  2.28k|    }
25509|  4.33k|    return 1;
25510|  4.36k|}
janet.c:checkescape:
25395|  4.36k|static int checkescape(uint8_t c) {
25396|  4.36k|    switch (c) {
25397|     29|        default:
  ------------------
  |  Branch (25397:9): [True: 29, False: 4.33k]
  ------------------
25398|     29|            return -1;
25399|    673|        case 'x':
  ------------------
  |  Branch (25399:9): [True: 673, False: 3.69k]
  ------------------
25400|  1.98k|        case 'u':
  ------------------
  |  Branch (25400:9): [True: 1.31k, False: 3.05k]
  ------------------
25401|  2.05k|        case 'U':
  ------------------
  |  Branch (25401:9): [True: 63, False: 4.30k]
  ------------------
25402|  2.05k|            return 1;
25403|     17|        case 'n':
  ------------------
  |  Branch (25403:9): [True: 17, False: 4.34k]
  ------------------
25404|     17|            return '\n';
25405|      6|        case 't':
  ------------------
  |  Branch (25405:9): [True: 6, False: 4.36k]
  ------------------
25406|      6|            return '\t';
25407|     81|        case 'r':
  ------------------
  |  Branch (25407:9): [True: 81, False: 4.28k]
  ------------------
25408|     81|            return '\r';
25409|    143|        case '0':
  ------------------
  |  Branch (25409:9): [True: 143, False: 4.22k]
  ------------------
25410|    143|            return '\0';
25411|    208|        case 'z':
  ------------------
  |  Branch (25411:9): [True: 208, False: 4.15k]
  ------------------
25412|    208|            return '\0';
25413|      7|        case 'f':
  ------------------
  |  Branch (25413:9): [True: 7, False: 4.35k]
  ------------------
25414|      7|            return '\f';
25415|     13|        case 'v':
  ------------------
  |  Branch (25415:9): [True: 13, False: 4.35k]
  ------------------
25416|     13|            return '\v';
25417|     63|        case 'a':
  ------------------
  |  Branch (25417:9): [True: 63, False: 4.30k]
  ------------------
25418|     63|            return '\a';
25419|    268|        case 'b':
  ------------------
  |  Branch (25419:9): [True: 268, False: 4.09k]
  ------------------
25420|    268|            return '\b';
25421|    249|        case '\'':
  ------------------
  |  Branch (25421:9): [True: 249, False: 4.11k]
  ------------------
25422|    249|            return '\'';
25423|     79|        case '?':
  ------------------
  |  Branch (25423:9): [True: 79, False: 4.28k]
  ------------------
25424|     79|            return '?';
25425|      9|        case 'e':
  ------------------
  |  Branch (25425:9): [True: 9, False: 4.35k]
  ------------------
25426|      9|            return 27;
25427|    229|        case '"':
  ------------------
  |  Branch (25427:9): [True: 229, False: 4.13k]
  ------------------
25428|    229|            return '"';
25429|    914|        case '\\':
  ------------------
  |  Branch (25429:9): [True: 914, False: 3.45k]
  ------------------
25430|    914|            return '\\';
25431|  4.36k|    }
25432|  4.36k|}
janet.c:escapeh:
25455|  1.34k|static int escapeh(JanetParser *p, JanetParseState *state, uint8_t c) {
25456|  1.34k|    int digit = to_hex(c);
25457|  1.34k|    if (digit < 0) {
  ------------------
  |  Branch (25457:9): [True: 2, False: 1.34k]
  ------------------
25458|      2|        p->error = "invalid hex digit in hex escape";
25459|      2|        return 1;
25460|      2|    }
25461|  1.34k|    state->argn = (state->argn << 4) + digit;
25462|  1.34k|    state->counter--;
25463|  1.34k|    if (!state->counter) {
  ------------------
  |  Branch (25463:9): [True: 671, False: 672]
  ------------------
25464|    671|        push_buf(p, (uint8_t)(state->argn & 0xFF));
25465|    671|        state->argn = 0;
25466|    671|        state->consumer = stringchar;
25467|    671|    }
25468|  1.34k|    return 1;
25469|  1.34k|}
janet.c:to_hex:
25260|  6.95k|static int to_hex(uint8_t c) {
25261|  6.95k|    if (c >= '0' && c <= '9') {
  ------------------
  |  Branch (25261:9): [True: 6.94k, False: 12]
  |  Branch (25261:21): [True: 4.71k, False: 2.22k]
  ------------------
25262|  4.71k|        return c - '0';
25263|  4.71k|    } else if (c >= 'A' && c <= 'F') {
  ------------------
  |  Branch (25263:16): [True: 2.22k, False: 14]
  |  Branch (25263:28): [True: 1.38k, False: 842]
  ------------------
25264|  1.38k|        return 10 + c - 'A';
25265|  1.38k|    } else if (c >= 'a' && c <= 'f') {
  ------------------
  |  Branch (25265:16): [True: 841, False: 15]
  |  Branch (25265:28): [True: 835, False: 6]
  ------------------
25266|    835|        return 10 + c - 'a';
25267|    835|    } else {
25268|     21|        return -1;
25269|     21|    }
25270|  6.95k|}
janet.c:escapeu:
25471|  5.60k|static int escapeu(JanetParser *p, JanetParseState *state, uint8_t c) {
25472|  5.60k|    int digit = to_hex(c);
25473|  5.60k|    if (digit < 0) {
  ------------------
  |  Branch (25473:9): [True: 19, False: 5.58k]
  ------------------
25474|     19|        p->error = "invalid hex digit in unicode escape";
25475|     19|        return 1;
25476|     19|    }
25477|  5.58k|    state->argn = (state->argn << 4) + digit;
25478|  5.58k|    state->counter--;
25479|  5.58k|    if (!state->counter) {
  ------------------
  |  Branch (25479:9): [True: 1.35k, False: 4.22k]
  ------------------
25480|  1.35k|        if (state->argn > 0x10FFFF) {
  ------------------
  |  Branch (25480:13): [True: 0, False: 1.35k]
  ------------------
25481|      0|            p->error = "invalid unicode codepoint";
25482|      0|            return 1;
25483|      0|        }
25484|  1.35k|        write_codepoint(p, state->argn);
25485|  1.35k|        state->argn = 0;
25486|  1.35k|        state->consumer = stringchar;
25487|  1.35k|    }
25488|  5.58k|    return 1;
25489|  5.58k|}
janet.c:write_codepoint:
25437|  1.35k|static void write_codepoint(JanetParser *p, int32_t codepoint) {
25438|  1.35k|    if (codepoint <= 0x7F) {
  ------------------
  |  Branch (25438:9): [True: 338, False: 1.02k]
  ------------------
25439|    338|        push_buf(p, (uint8_t) codepoint);
25440|  1.02k|    } else if (codepoint <= 0x7FF) {
  ------------------
  |  Branch (25440:16): [True: 202, False: 819]
  ------------------
25441|    202|        push_buf(p, (uint8_t)((codepoint >>  6) & 0x1F) | 0xC0);
25442|    202|        push_buf(p, (uint8_t)((codepoint >>  0) & 0x3F) | 0x80);
25443|    819|    } else if (codepoint <= 0xFFFF) {
  ------------------
  |  Branch (25443:16): [True: 760, False: 59]
  ------------------
25444|    760|        push_buf(p, (uint8_t)((codepoint >> 12) & 0x0F) | 0xE0);
25445|    760|        push_buf(p, (uint8_t)((codepoint >>  6) & 0x3F) | 0x80);
25446|    760|        push_buf(p, (uint8_t)((codepoint >>  0) & 0x3F) | 0x80);
25447|    760|    } else {
25448|     59|        push_buf(p, (uint8_t)((codepoint >> 18) & 0x07) | 0xF0);
25449|     59|        push_buf(p, (uint8_t)((codepoint >> 12) & 0x3F) | 0x80);
25450|     59|        push_buf(p, (uint8_t)((codepoint >>  6) & 0x3F) | 0x80);
25451|     59|        push_buf(p, (uint8_t)((codepoint >>  0) & 0x3F) | 0x80);
25452|     59|    }
25453|  1.35k|}
janet.c:stringend:
25512|   105k|static int stringend(JanetParser *p, JanetParseState *state) {
25513|   105k|    Janet ret;
25514|   105k|    uint8_t *bufstart = p->buf;
25515|   105k|    int32_t buflen = (int32_t) p->bufcount;
25516|   105k|    if (state->flags & PFLAG_LONGSTRING) {
  ------------------
  |  |25304|   105k|#define PFLAG_LONGSTRING 0x4000
  ------------------
  |  Branch (25516:9): [True: 58.6k, False: 47.3k]
  ------------------
25517|       |        /* Post process to remove leading whitespace */
25518|  58.6k|        JanetParseState top = p->states[p->statecount - 1];
25519|  58.6k|        int32_t indent_col = (int32_t) top.column - 1;
25520|  58.6k|        uint8_t *r = bufstart, *end = r + buflen;
25521|       |        /* Unless there are only spaces before EOLs, disable reindenting */
25522|  58.6k|        int reindent = 1;
25523|  1.05M|        while (reindent && (r < end)) {
  ------------------
  |  Branch (25523:16): [True: 1.05M, False: 774]
  |  Branch (25523:28): [True: 997k, False: 57.8k]
  ------------------
25524|   997k|            if (*r++ == '\n') {
  ------------------
  |  Branch (25524:17): [True: 7.52k, False: 990k]
  ------------------
25525|  7.95k|                for (int32_t j = 0; (r < end) && (*r != '\n') && (j < indent_col); j++, r++) {
  ------------------
  |  Branch (25525:37): [True: 6.84k, False: 1.10k]
  |  Branch (25525:50): [True: 3.87k, False: 2.97k]
  |  Branch (25525:66): [True: 1.21k, False: 2.65k]
  ------------------
25526|  1.21k|                    if (*r != ' ') {
  ------------------
  |  Branch (25526:25): [True: 784, False: 432]
  ------------------
25527|    784|                        reindent = 0;
25528|    784|                        break;
25529|    784|                    }
25530|  1.21k|                }
25531|  7.52k|                if ((r + 1) < end && *r == '\r' && *(r + 1) == '\n') reindent = 1;
  ------------------
  |  Branch (25531:21): [True: 6.25k, False: 1.26k]
  |  Branch (25531:38): [True: 504, False: 5.75k]
  |  Branch (25531:52): [True: 299, False: 205]
  ------------------
25532|  7.52k|            }
25533|   997k|        }
25534|       |        /* Now reindent if able */
25535|  58.6k|        if (reindent) {
  ------------------
  |  Branch (25535:13): [True: 57.8k, False: 774]
  ------------------
25536|  57.8k|            uint8_t *w = bufstart;
25537|  57.8k|            r = bufstart;
25538|   984k|            while (r < end) {
  ------------------
  |  Branch (25538:20): [True: 926k, False: 57.8k]
  ------------------
25539|   926k|                if (*r == '\n') {
  ------------------
  |  Branch (25539:21): [True: 5.78k, False: 920k]
  ------------------
25540|  5.78k|                    *w++ = *r++;
25541|  6.17k|                    for (int32_t j = 0; (r < end) && (*r != '\n') && (j < indent_col); j++, r++);
  ------------------
  |  Branch (25541:41): [True: 5.07k, False: 1.10k]
  |  Branch (25541:54): [True: 3.04k, False: 2.02k]
  |  Branch (25541:70): [True: 390, False: 2.65k]
  ------------------
25542|  5.78k|                    if ((r + 1) < end && *r == '\r' && *(r + 1) == '\n') *w++ = *r++;
  ------------------
  |  Branch (25542:25): [True: 4.62k, False: 1.15k]
  |  Branch (25542:42): [True: 470, False: 4.15k]
  |  Branch (25542:56): [True: 289, False: 181]
  ------------------
25543|   920k|                } else {
25544|   920k|                    *w++ = *r++;
25545|   920k|                }
25546|   926k|            }
25547|  57.8k|            buflen = (int32_t)(w - bufstart);
25548|  57.8k|        }
25549|       |        /* Check for leading EOL so we can remove it */
25550|  58.6k|        if (buflen > 1 && bufstart[0] == '\r' && bufstart[1] == '\n') { /* Windows EOL */
  ------------------
  |  Branch (25550:13): [True: 56.1k, False: 2.43k]
  |  Branch (25550:27): [True: 738, False: 55.4k]
  |  Branch (25550:50): [True: 333, False: 405]
  ------------------
25551|    333|            buflen = buflen - 2;
25552|    333|            bufstart = bufstart + 2;
25553|  58.2k|        } else if (buflen > 0 && bufstart[0] == '\n') { /* Unix EOL */
  ------------------
  |  Branch (25553:20): [True: 58.2k, False: 0]
  |  Branch (25553:34): [True: 572, False: 57.7k]
  ------------------
25554|    572|            buflen--;
25555|    572|            bufstart++;
25556|    572|        }
25557|       |        /* Check for trailing EOL so we can remove it */
25558|  58.6k|        if (buflen > 1 && bufstart[buflen - 2] == '\r' && bufstart[buflen - 1] == '\n') { /* Windows EOL */
  ------------------
  |  Branch (25558:13): [True: 56.0k, False: 2.54k]
  |  Branch (25558:27): [True: 416, False: 55.6k]
  |  Branch (25558:59): [True: 19, False: 397]
  ------------------
25559|     19|            buflen = buflen - 2;
25560|  58.5k|        } else if (buflen > 0 && bufstart[buflen - 1] == '\n') { /* Unix EOL */
  ------------------
  |  Branch (25560:20): [True: 58.2k, False: 353]
  |  Branch (25560:34): [True: 751, False: 57.4k]
  ------------------
25561|    751|            buflen--;
25562|    751|        }
25563|  58.6k|    }
25564|   105k|    if (state->flags & PFLAG_BUFFER) {
  ------------------
  |  |25299|   105k|#define PFLAG_BUFFER 0x200
  ------------------
  |  Branch (25564:9): [True: 52.5k, False: 53.4k]
  ------------------
25565|  52.5k|        JanetBuffer *b = janet_buffer(buflen);
25566|  52.5k|        janet_buffer_push_bytes(b, bufstart, buflen);
25567|  52.5k|        ret = janet_wrap_buffer(b);
  ------------------
  |  |  847|  52.5k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|  52.5k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  52.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  52.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25568|  53.4k|    } else {
25569|  53.4k|        ret = janet_wrap_string(janet_string(bufstart, buflen));
  ------------------
  |  |  848|  53.4k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  53.4k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  53.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  53.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25570|  53.4k|    }
25571|   105k|    p->bufcount = 0;
25572|   105k|    popstate(p, ret);
25573|   105k|    return 1;
25574|   105k|}
janet.c:comment:
25658|   172k|static int comment(JanetParser *p, JanetParseState *state, uint8_t c) {
25659|   172k|    (void) state;
25660|   172k|    if (c == '\n') {
  ------------------
  |  Branch (25660:9): [True: 933, False: 171k]
  ------------------
25661|    933|        p->statecount--;
25662|    933|        p->bufcount = 0;
25663|   171k|    } else {
25664|   171k|        push_buf(p, c);
25665|   171k|    }
25666|   172k|    return 1;
25667|   172k|}
janet.c:atsign:
25753|  84.3k|static int atsign(JanetParser *p, JanetParseState *state, uint8_t c) {
25754|  84.3k|    (void) state;
25755|  84.3k|    p->statecount--;
25756|  84.3k|    switch (c) {
25757|    706|        case '{':
  ------------------
  |  Branch (25757:9): [True: 706, False: 83.6k]
  ------------------
25758|    706|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |25298|    706|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |25302|    706|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |25306|    706|#define PFLAG_ATSYM 0x10000
  ------------------
25759|    706|            return 1;
25760|  2.05k|        case '"':
  ------------------
  |  Branch (25760:9): [True: 2.05k, False: 82.3k]
  ------------------
25761|  2.05k|            pushstate(p, stringchar, PFLAG_BUFFER | PFLAG_STRING);
  ------------------
  |  |25299|  2.05k|#define PFLAG_BUFFER 0x200
  ------------------
                          pushstate(p, stringchar, PFLAG_BUFFER | PFLAG_STRING);
  ------------------
  |  |25303|  2.05k|#define PFLAG_STRING 0x2000
  ------------------
25762|  2.05k|            return 1;
25763|  50.4k|        case '`':
  ------------------
  |  Branch (25763:9): [True: 50.4k, False: 33.9k]
  ------------------
25764|  50.4k|            pushstate(p, longstring, PFLAG_BUFFER | PFLAG_LONGSTRING);
  ------------------
  |  |25299|  50.4k|#define PFLAG_BUFFER 0x200
  ------------------
                          pushstate(p, longstring, PFLAG_BUFFER | PFLAG_LONGSTRING);
  ------------------
  |  |25304|  50.4k|#define PFLAG_LONGSTRING 0x4000
  ------------------
25765|  50.4k|            return 1;
25766|    468|        case '[':
  ------------------
  |  Branch (25766:9): [True: 468, False: 83.9k]
  ------------------
25767|    468|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |25298|    468|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |25301|    468|#define PFLAG_SQRBRACKETS 0x800
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |25306|    468|#define PFLAG_ATSYM 0x10000
  ------------------
25768|    468|            return 1;
25769|  18.4k|        case '(':
  ------------------
  |  Branch (25769:9): [True: 18.4k, False: 65.8k]
  ------------------
25770|  18.4k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS | PFLAG_ATSYM);
  ------------------
  |  |25298|  18.4k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS | PFLAG_ATSYM);
  ------------------
  |  |25300|  18.4k|#define PFLAG_PARENS 0x400
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS | PFLAG_ATSYM);
  ------------------
  |  |25306|  18.4k|#define PFLAG_ATSYM 0x10000
  ------------------
25771|  18.4k|            return 1;
25772|  12.1k|        default:
  ------------------
  |  Branch (25772:9): [True: 12.1k, False: 72.1k]
  ------------------
25773|  12.1k|            break;
25774|  84.3k|    }
25775|  12.1k|    pushstate(p, tokenchar, PFLAG_TOKEN);
  ------------------
  |  |25308|  12.1k|#define PFLAG_TOKEN 0x40000
  ------------------
25776|  12.1k|    push_buf(p, '@'); /* Push the leading at-sign that was dropped */
25777|  12.1k|    return 0;
25778|  84.3k|}
janet.c:longstring:
25709|  1.43M|static int longstring(JanetParser *p, JanetParseState *state, uint8_t c) {
25710|  1.43M|    if (state->flags & PFLAG_INSTRING) {
  ------------------
  |  |25707|  1.43M|#define PFLAG_INSTRING 0x100000
  ------------------
  |  Branch (25710:9): [True: 1.13M, False: 300k]
  ------------------
25711|       |        /* We are inside the long string */
25712|  1.13M|        if (c == '`') {
  ------------------
  |  Branch (25712:13): [True: 61.2k, False: 1.07M]
  ------------------
25713|  61.2k|            state->flags |= PFLAG_END_CANDIDATE;
  ------------------
  |  |25708|  61.2k|#define PFLAG_END_CANDIDATE 0x200000
  ------------------
25714|  61.2k|            state->flags &= ~PFLAG_INSTRING;
  ------------------
  |  |25707|  61.2k|#define PFLAG_INSTRING 0x100000
  ------------------
25715|  61.2k|            state->counter = 1; /* Use counter to keep track of number of '=' seen */
25716|  61.2k|            return 1;
25717|  61.2k|        }
25718|  1.07M|        push_buf(p, c);
25719|  1.07M|        return 1;
25720|  1.13M|    } else if (state->flags & PFLAG_END_CANDIDATE) {
  ------------------
  |  |25708|   300k|#define PFLAG_END_CANDIDATE 0x200000
  ------------------
  |  Branch (25720:16): [True: 159k, False: 140k]
  ------------------
25721|   159k|        int i;
25722|       |        /* We are checking a potential end of the string */
25723|   159k|        if (state->counter == state->argn) {
  ------------------
  |  Branch (25723:13): [True: 58.6k, False: 101k]
  ------------------
25724|  58.6k|            stringend(p, state);
25725|  58.6k|            return 0;
25726|  58.6k|        }
25727|   101k|        if (c == '`' && state->counter < state->argn) {
  ------------------
  |  Branch (25727:13): [True: 98.5k, False: 2.66k]
  |  Branch (25727:25): [True: 98.5k, False: 0]
  ------------------
25728|  98.5k|            state->counter++;
25729|  98.5k|            return 1;
25730|  98.5k|        }
25731|       |        /* Failed end candidate */
25732|  88.2k|        for (i = 0; i < state->counter; i++) {
  ------------------
  |  Branch (25732:21): [True: 85.5k, False: 2.66k]
  ------------------
25733|  85.5k|            push_buf(p, '`');
25734|  85.5k|        }
25735|  2.66k|        push_buf(p, c);
25736|  2.66k|        state->counter = 0;
25737|  2.66k|        state->flags &= ~PFLAG_END_CANDIDATE;
  ------------------
  |  |25708|  2.66k|#define PFLAG_END_CANDIDATE 0x200000
  ------------------
25738|  2.66k|        state->flags |= PFLAG_INSTRING;
  ------------------
  |  |25707|  2.66k|#define PFLAG_INSTRING 0x100000
  ------------------
25739|  2.66k|        return 1;
25740|   140k|    } else {
25741|       |        /* We are at beginning of string */
25742|   140k|        state->argn++;
25743|   140k|        if (c != '`') {
  ------------------
  |  Branch (25743:13): [True: 58.7k, False: 81.9k]
  ------------------
25744|  58.7k|            state->flags |= PFLAG_INSTRING;
  ------------------
  |  |25707|  58.7k|#define PFLAG_INSTRING 0x100000
  ------------------
25745|  58.7k|            push_buf(p, c);
25746|  58.7k|        }
25747|   140k|        return 1;
25748|   140k|    }
25749|  1.43M|}
janet.c:close_array:
25677|  1.22k|static Janet close_array(JanetParser *p, JanetParseState *state) {
25678|  1.22k|    JanetArray *array = janet_array(state->argn);
25679|  14.5k|    for (int32_t i = state->argn - 1; i >= 0; i--)
  ------------------
  |  Branch (25679:39): [True: 13.3k, False: 1.22k]
  ------------------
25680|  13.3k|        array->data[i] = p->args[--p->argcount];
25681|  1.22k|    array->count = state->argn;
25682|  1.22k|    return janet_wrap_array(array);
  ------------------
  |  |  845|  1.22k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25683|  1.22k|}
janet.c:close_tuple:
25669|  35.3k|static Janet close_tuple(JanetParser *p, JanetParseState *state, int32_t flag) {
25670|  35.3k|    Janet *ret = janet_tuple_begin(state->argn);
25671|  35.3k|    janet_tuple_flag(ret) |= flag;
  ------------------
  |  | 1805|  35.3k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1799|  35.3k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
25672|  1.10M|    for (int32_t i = state->argn - 1; i >= 0; i--)
  ------------------
  |  Branch (25672:39): [True: 1.06M, False: 35.3k]
  ------------------
25673|  1.06M|        ret[i] = p->args[--p->argcount];
25674|  35.3k|    return janet_wrap_tuple(janet_tuple_end(ret));
  ------------------
  |  |  843|  35.3k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  35.3k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  35.3k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  35.3k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25675|  35.3k|}
janet.c:close_table:
25696|    649|static Janet close_table(JanetParser *p, JanetParseState *state) {
25697|    649|    JanetTable *table = janet_table(state->argn >> 1);
25698|  1.79k|    for (size_t i = p->argcount - state->argn; i < p->argcount; i += 2) {
  ------------------
  |  Branch (25698:48): [True: 1.14k, False: 649]
  ------------------
25699|  1.14k|        Janet key = p->args[i];
25700|  1.14k|        Janet value = p->args[i + 1];
25701|  1.14k|        janet_table_put(table, key, value);
25702|  1.14k|    }
25703|    649|    p->argcount -= state->argn;
25704|    649|    return janet_wrap_table(table);
  ------------------
  |  |  846|    649|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|    649|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    649|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    649|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25705|    649|}
janet.c:close_struct:
25685|  45.4k|static Janet close_struct(JanetParser *p, JanetParseState *state) {
25686|  45.4k|    JanetKV *st = janet_struct_begin(state->argn >> 1);
25687|  77.7k|    for (size_t i = p->argcount - state->argn; i < p->argcount; i += 2) {
  ------------------
  |  Branch (25687:48): [True: 32.3k, False: 45.4k]
  ------------------
25688|  32.3k|        Janet key = p->args[i];
25689|  32.3k|        Janet value = p->args[i + 1];
25690|  32.3k|        janet_struct_put(st, key, value);
25691|  32.3k|    }
25692|  45.4k|    p->argcount -= state->argn;
25693|  45.4k|    return janet_wrap_struct(janet_struct_end(st));
  ------------------
  |  |  842|  45.4k|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|  45.4k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  45.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  45.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25694|  45.4k|}
janet.c:popstate:
25321|  1.60M|static void popstate(JanetParser *p, Janet val) {
25322|  6.10M|    for (;;) {
25323|  6.10M|        JanetParseState top = p->states[--p->statecount];
25324|  6.10M|        JanetParseState *newtop = p->states + p->statecount - 1;
25325|       |        /* Source mapping info */
25326|  6.10M|        if (janet_checktype(val, JANET_TUPLE)) {
  ------------------
  |  |  806|  6.10M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 4.54M, False: 1.56M]
  |  |  |  Branch (806:6): [Folded, False: 6.10M]
  |  |  ------------------
  |  |  807|  6.10M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.10M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  6.10M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  6.10M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.10M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.10M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25327|  4.54M|            janet_tuple_sm_line(janet_unwrap_tuple(val)) = (int32_t) top.line;
  ------------------
  |  | 1803|  4.54M|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1799|  4.54M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
25328|  4.54M|            janet_tuple_sm_column(janet_unwrap_tuple(val)) = (int32_t) top.column;
  ------------------
  |  | 1804|  4.54M|#define janet_tuple_sm_column(t) (janet_tuple_head(t)->sm_column)
  |  |  ------------------
  |  |  |  | 1799|  4.54M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
25329|  4.54M|        }
25330|  6.10M|        if (newtop->flags & PFLAG_CONTAINER) {
  ------------------
  |  |25298|  6.10M|#define PFLAG_CONTAINER 0x100
  ------------------
  |  Branch (25330:13): [True: 1.60M, False: 4.50M]
  ------------------
25331|  1.60M|            newtop->argn++;
25332|       |            /* Keep track of number of values in the root state */
25333|  1.60M|            if (p->statecount == 1) {
  ------------------
  |  Branch (25333:17): [True: 239k, False: 1.36M]
  ------------------
25334|   239k|                p->pending++;
25335|       |                /* Root items are always wrapped in a tuple for source map info. */
25336|   239k|                const Janet *tup = janet_tuple_n(&val, 1);
25337|   239k|                janet_tuple_sm_line(tup) = (int32_t) top.line;
  ------------------
  |  | 1803|   239k|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1799|   239k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
25338|   239k|                janet_tuple_sm_column(tup) = (int32_t) top.column;
  ------------------
  |  | 1804|   239k|#define janet_tuple_sm_column(t) (janet_tuple_head(t)->sm_column)
  |  |  ------------------
  |  |  |  | 1799|   239k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
25339|   239k|                val = janet_wrap_tuple(tup);
  ------------------
  |  |  843|   239k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|   239k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   239k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   239k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25340|   239k|            }
25341|  1.60M|            push_arg(p, val);
25342|  1.60M|            return;
25343|  4.50M|        } else if (newtop->flags & PFLAG_READERMAC) {
  ------------------
  |  |25305|  4.50M|#define PFLAG_READERMAC 0x8000
  ------------------
  |  Branch (25343:20): [True: 4.50M, False: 0]
  ------------------
25344|  4.50M|            Janet *t = janet_tuple_begin(2);
25345|  4.50M|            int c = newtop->flags & 0xFF;
25346|  4.50M|            const char *which =
25347|  4.50M|                (c == '\'') ? "quote" :
  ------------------
  |  Branch (25347:17): [True: 231k, False: 4.27M]
  ------------------
25348|  4.50M|                (c == ',') ? "unquote" :
  ------------------
  |  Branch (25348:17): [True: 16.0k, False: 4.26M]
  ------------------
25349|  4.27M|                (c == ';') ? "splice" :
  ------------------
  |  Branch (25349:17): [True: 15.2k, False: 4.24M]
  ------------------
25350|  4.26M|                (c == '|') ? "short-fn" :
  ------------------
  |  Branch (25350:17): [True: 1.84M, False: 2.39M]
  ------------------
25351|  4.24M|                (c == '~') ? "quasiquote" : "<unknown>";
  ------------------
  |  Branch (25351:17): [True: 2.39M, False: 0]
  ------------------
25352|  4.50M|            t[0] = janet_csymbolv(which);
  ------------------
  |  | 1836|  4.50M|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  849|  4.50M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  4.50M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  4.50M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  4.50M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25353|  4.50M|            t[1] = val;
25354|       |            /* Quote source mapping info */
25355|  4.50M|            janet_tuple_sm_line(t) = (int32_t) newtop->line;
  ------------------
  |  | 1803|  4.50M|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1799|  4.50M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
25356|  4.50M|            janet_tuple_sm_column(t) = (int32_t) newtop->column;
  ------------------
  |  | 1804|  4.50M|#define janet_tuple_sm_column(t) (janet_tuple_head(t)->sm_column)
  |  |  ------------------
  |  |  |  | 1799|  4.50M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
25357|  4.50M|            val = janet_wrap_tuple(janet_tuple_end(t));
  ------------------
  |  |  843|  4.50M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  4.50M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  4.50M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  4.50M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25358|  4.50M|        } else {
25359|      0|            return;
25360|      0|        }
25361|  6.10M|    }
25362|  1.60M|}
janet.c:parsergc:
26038|   109k|static int parsergc(void *p, size_t size) {
26039|   109k|    JanetParser *parser = (JanetParser *)p;
26040|   109k|    (void) size;
26041|   109k|    janet_parser_deinit(parser);
26042|   109k|    return 0;
26043|   109k|}
janet.c:parsermark:
26025|  1.12k|static int parsermark(void *p, size_t size) {
26026|  1.12k|    size_t i;
26027|  1.12k|    JanetParser *parser = (JanetParser *)p;
26028|  1.12k|    (void) size;
26029|  1.12k|    for (i = 0; i < parser->argcount; i++) {
  ------------------
  |  Branch (26029:17): [True: 0, False: 1.12k]
  ------------------
26030|      0|        janet_mark(parser->args[i]);
26031|      0|    }
26032|  1.12k|    if (parser->flag & JANET_PARSER_GENERATED_ERROR) {
  ------------------
  |  |25194|  1.12k|#define JANET_PARSER_GENERATED_ERROR 0x2
  ------------------
  |  Branch (26032:9): [True: 0, False: 1.12k]
  ------------------
26033|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26034|      0|    }
26035|  1.12k|    return 0;
26036|  1.12k|}
janet.c:tokenchar:
25605|  5.43M|static int tokenchar(JanetParser *p, JanetParseState *state, uint8_t c) {
25606|  5.43M|    Janet ret;
25607|  5.43M|    double numval;
25608|  5.43M|    int32_t blen;
25609|  5.43M|    if (janet_is_symbol_char(c)) {
  ------------------
  |  Branch (25609:9): [True: 4.02M, False: 1.41M]
  ------------------
25610|  4.02M|        push_buf(p, (uint8_t) c);
25611|  4.02M|        if (c > 127) state->argn = 1; /* Use to indicate non ascii */
  ------------------
  |  Branch (25611:13): [True: 19.8k, False: 4.00M]
  ------------------
25612|  4.02M|        return 1;
25613|  4.02M|    }
25614|       |    /* Token finished */
25615|  1.41M|    blen = (int32_t) p->bufcount;
25616|  1.41M|    int start_dig = p->buf[0] >= '0' && p->buf[0] <= '9';
  ------------------
  |  Branch (25616:21): [True: 518k, False: 894k]
  |  Branch (25616:41): [True: 49.6k, False: 468k]
  ------------------
25617|  1.41M|    int start_num = start_dig || p->buf[0] == '-' || p->buf[0] == '+' || p->buf[0] == '.';
  ------------------
  |  Branch (25617:21): [True: 49.6k, False: 1.36M]
  |  Branch (25617:34): [True: 369k, False: 994k]
  |  Branch (25617:54): [True: 97.4k, False: 896k]
  |  Branch (25617:74): [True: 5.77k, False: 891k]
  ------------------
25618|  1.41M|    if (p->buf[0] == ':') {
  ------------------
  |  Branch (25618:9): [True: 29.0k, False: 1.38M]
  ------------------
25619|       |        /* Don't do full utf-8 check unless we have seen non ascii characters. */
25620|  29.0k|        int valid = (!state->argn) || janet_valid_utf8(p->buf + 1, blen - 1);
  ------------------
  |  Branch (25620:21): [True: 28.9k, False: 84]
  |  Branch (25620:39): [True: 67, False: 17]
  ------------------
25621|  29.0k|        if (!valid) {
  ------------------
  |  Branch (25621:13): [True: 17, False: 28.9k]
  ------------------
25622|     17|            p->error = "invalid utf-8 in keyword";
25623|     17|            return 0;
25624|     17|        }
25625|  28.9k|        ret = janet_keywordv(p->buf + 1, blen - 1);
  ------------------
  |  | 1841|  28.9k|#define janet_keywordv(str, len) janet_wrap_keyword(janet_keyword((str), (len)))
  |  |  ------------------
  |  |  |  |  850|  28.9k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  28.9k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  28.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  28.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25626|  28.9k|#ifdef JANET_INT_TYPES
25627|  1.38M|    } else if (start_num && !janet_scan_numeric(p->buf, blen, &ret)) {
  ------------------
  |  Branch (25627:16): [True: 521k, False: 862k]
  |  Branch (25627:29): [True: 53.7k, False: 468k]
  ------------------
25628|  53.7k|        (void) numval;
25629|       |#else
25630|       |    } else if (start_num && !janet_scan_number(p->buf, blen, &numval)) {
25631|       |        ret = janet_wrap_number(numval);
25632|       |#endif
25633|  1.33M|    } else if (!check_str_const("nil", p->buf, blen)) {
  ------------------
  |  Branch (25633:16): [True: 337, False: 1.32M]
  ------------------
25634|    337|        ret = janet_wrap_nil();
  ------------------
  |  |  831|    337|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    337|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    337|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    337|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25635|  1.32M|    } else if (!check_str_const("false", p->buf, blen)) {
  ------------------
  |  Branch (25635:16): [True: 75, False: 1.32M]
  ------------------
25636|     75|        ret = janet_wrap_false();
  ------------------
  |  |  833|     75|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|     75|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     75|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     75|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25637|  1.32M|    } else if (!check_str_const("true", p->buf, blen)) {
  ------------------
  |  Branch (25637:16): [True: 1.02k, False: 1.32M]
  ------------------
25638|  1.02k|        ret = janet_wrap_true();
  ------------------
  |  |  832|  1.02k|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  822|  1.02k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25639|  1.32M|    } else {
25640|  1.32M|        if (start_dig) {
  ------------------
  |  Branch (25640:13): [True: 184, False: 1.32M]
  ------------------
25641|    184|            p->error = "symbol literal cannot start with a digit";
25642|    184|            return 0;
25643|  1.32M|        } else {
25644|       |            /* Don't do full utf-8 check unless we have seen non ascii characters. */
25645|  1.32M|            int valid = (!state->argn) || janet_valid_utf8(p->buf, blen);
  ------------------
  |  Branch (25645:25): [True: 1.32M, False: 4.78k]
  |  Branch (25645:43): [True: 4.20k, False: 576]
  ------------------
25646|  1.32M|            if (!valid) {
  ------------------
  |  Branch (25646:17): [True: 576, False: 1.32M]
  ------------------
25647|    576|                p->error = "invalid utf-8 in symbol";
25648|    576|                return 0;
25649|    576|            }
25650|  1.32M|            ret = janet_symbolv(p->buf, blen);
  ------------------
  |  | 1835|  1.32M|#define janet_symbolv(str, len) janet_wrap_symbol(janet_symbol((str), (len)))
  |  |  ------------------
  |  |  |  |  849|  1.32M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.32M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.32M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.32M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25651|  1.32M|        }
25652|  1.32M|    }
25653|  1.41M|    p->bufcount = 0;
25654|  1.41M|    popstate(p, ret);
25655|  1.41M|    return 0;
25656|  1.41M|}
janet.c:check_str_const:
25593|  3.99M|static int check_str_const(const char *cstr, const uint8_t *str, int32_t len) {
25594|  3.99M|    int32_t index;
25595|  4.01M|    for (index = 0; index < len; index++) {
  ------------------
  |  Branch (25595:21): [True: 4.00M, False: 14.0k]
  ------------------
25596|  4.00M|        uint8_t c = str[index];
25597|  4.00M|        uint8_t k = ((const uint8_t *)cstr)[index];
25598|  4.00M|        if (c < k) return -1;
  ------------------
  |  Branch (25598:13): [True: 3.76M, False: 230k]
  ------------------
25599|   230k|        if (c > k) return 1;
  ------------------
  |  Branch (25599:13): [True: 206k, False: 23.8k]
  ------------------
25600|  23.8k|        if (k == '\0') break;
  ------------------
  |  Branch (25600:13): [True: 0, False: 23.8k]
  ------------------
25601|  23.8k|    }
25602|  14.0k|    return (cstr[index] == '\0') ? 0 : -1;
  ------------------
  |  Branch (25602:12): [True: 1.43k, False: 12.5k]
  ------------------
25603|  3.99M|}
janet.c:parser_state_delimiters:
26343|   102k|static Janet parser_state_delimiters(const JanetParser *_p) {
26344|   102k|    JanetParser *p = (JanetParser *)_p;
26345|   102k|    size_t i;
26346|   102k|    const uint8_t *str;
26347|   102k|    size_t oldcount;
26348|   102k|    oldcount = p->bufcount;
26349|   204k|    for (i = 0; i < p->statecount; i++) {
  ------------------
  |  Branch (26349:17): [True: 102k, False: 102k]
  ------------------
26350|   102k|        JanetParseState *s = p->states + i;
26351|   102k|        if (s->flags & PFLAG_PARENS) {
  ------------------
  |  |25300|   102k|#define PFLAG_PARENS 0x400
  ------------------
  |  Branch (26351:13): [True: 0, False: 102k]
  ------------------
26352|      0|            push_buf(p, '(');
26353|   102k|        } else if (s->flags & PFLAG_SQRBRACKETS) {
  ------------------
  |  |25301|   102k|#define PFLAG_SQRBRACKETS 0x800
  ------------------
  |  Branch (26353:20): [True: 0, False: 102k]
  ------------------
26354|      0|            push_buf(p, '[');
26355|   102k|        } else if (s->flags & PFLAG_CURLYBRACKETS) {
  ------------------
  |  |25302|   102k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
  |  Branch (26355:20): [True: 0, False: 102k]
  ------------------
26356|      0|            push_buf(p, '{');
26357|   102k|        } else if (s->flags & PFLAG_STRING) {
  ------------------
  |  |25303|   102k|#define PFLAG_STRING 0x2000
  ------------------
  |  Branch (26357:20): [True: 0, False: 102k]
  ------------------
26358|      0|            push_buf(p, '"');
26359|   102k|        } else if (s->flags & PFLAG_LONGSTRING) {
  ------------------
  |  |25304|   102k|#define PFLAG_LONGSTRING 0x4000
  ------------------
  |  Branch (26359:20): [True: 0, False: 102k]
  ------------------
26360|      0|            int32_t i;
26361|      0|            for (i = 0; i < s->argn; i++) {
  ------------------
  |  Branch (26361:25): [True: 0, False: 0]
  ------------------
26362|      0|                push_buf(p, '`');
26363|      0|            }
26364|      0|        }
26365|   102k|    }
26366|       |    /* avoid ptr arithmetic on NULL */
26367|   102k|    str = janet_string(oldcount ? p->buf + oldcount : p->buf, (int32_t)(p->bufcount - oldcount));
  ------------------
  |  Branch (26367:24): [True: 0, False: 102k]
  ------------------
26368|   102k|    p->bufcount = oldcount;
26369|   102k|    return janet_wrap_string(str);
  ------------------
  |  |  848|   102k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|   102k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   102k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   102k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26370|   102k|}
janet.c:parserget:
26461|   714k|static int parserget(void *p, Janet key, Janet *out) {
26462|   714k|    (void) p;
26463|   714k|    if (!janet_checktype(key, JANET_KEYWORD)) return 0;
  ------------------
  |  |  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 (26463:9): [True: 0, False: 714k]
  ------------------
26464|   714k|    return janet_getmethod(janet_unwrap_keyword(key), parser_methods, out);
  ------------------
  |  |  865|   714k|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
26465|   714k|}
janet.c:size_padded:
28124|    964|static size_t size_padded(size_t offset, size_t size) {
28125|    964|    size_t x = size + offset - 1;
28126|    964|    return x - (x % size);
28127|    964|}
janet.c:compile_peg:
28390|    637|static JanetPeg *compile_peg(Janet x) {
28391|    637|    Builder builder;
28392|    637|    builder.grammar = janet_table(0);
28393|    637|    builder.default_grammar = NULL;
28394|    637|    {
28395|    637|        Janet default_grammarv = janet_dyn("peg-grammar");
28396|    637|        if (janet_checktype(default_grammarv, JANET_TABLE)) {
  ------------------
  |  |  806|    637|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 637, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 637]
  |  |  ------------------
  |  |  807|    637|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    637|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    637|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    637|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    637|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    637|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28397|    637|            builder.default_grammar = janet_unwrap_table(default_grammarv);
  ------------------
  |  |  861|    637|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
28398|    637|        }
28399|    637|    }
28400|    637|    builder.tags = janet_table(0);
28401|    637|    builder.constants = NULL;
28402|    637|    builder.bytecode = NULL;
28403|    637|    builder.nexttag = 1;
28404|    637|    builder.form = x;
28405|    637|    builder.depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|    637|#define JANET_RECURSION_GUARD 1024
  ------------------
28406|    637|    builder.has_backref = 0;
28407|    637|    peg_compile1(&builder, x);
28408|    637|    JanetPeg *peg = make_peg(&builder);
28409|    637|    builder_cleanup(&builder);
28410|    637|    return peg;
28411|    637|}
janet.c:peg_compile1:
27941|  2.43k|static uint32_t peg_compile1(Builder *b, Janet peg) {
27942|       |
27943|       |    /* Keep track of the form being compiled for error purposes */
27944|  2.43k|    Janet old_form = b->form;
27945|  2.43k|    JanetTable *old_grammar = b->grammar;
27946|  2.43k|    b->form = peg;
27947|       |
27948|       |    /* Resolve keyword references */
27949|  2.43k|    int i = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|  2.43k|#define JANET_RECURSION_GUARD 1024
  ------------------
27950|  2.43k|    JanetTable *grammar = old_grammar;
27951|  2.54k|    for (; i > 0 && janet_checktype(peg, JANET_KEYWORD); --i) {
  ------------------
  |  |  806|  2.54k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 119, False: 2.43k]
  |  |  |  Branch (806:6): [Folded, False: 2.54k]
  |  |  ------------------
  |  |  807|  2.54k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.54k|        : 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 (27951:12): [True: 2.54k, False: 0]
  ------------------
27952|    119|        Janet nextPeg = janet_table_get_ex(grammar, peg, &grammar);
27953|    119|        if (!grammar || janet_checktype(nextPeg, JANET_NIL)) {
  ------------------
  |  |  806|    119|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 119, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 119]
  |  |  ------------------
  |  |  807|    119|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    119|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    119|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    119|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    119|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    119|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (27953:13): [True: 0, False: 119]
  ------------------
27954|    119|            nextPeg = (b->default_grammar == NULL)
  ------------------
  |  Branch (27954:23): [True: 0, False: 119]
  ------------------
27955|    119|                      ? 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27956|    119|                      : janet_table_get(b->default_grammar, peg);
27957|    119|            if (janet_checktype(nextPeg, JANET_NIL)) {
  ------------------
  |  |  806|    119|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 119]
  |  |  |  Branch (806:6): [Folded, False: 119]
  |  |  ------------------
  |  |  807|    119|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    119|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    119|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    119|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    119|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    119|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27958|      0|                peg_panic(b, "unknown rule");
27959|      0|            }
27960|    119|        }
27961|    119|        peg = nextPeg;
27962|    119|        b->form = peg;
27963|    119|        b->grammar = grammar;
27964|    119|    }
27965|  2.43k|    if (i == 0)
  ------------------
  |  Branch (27965:9): [True: 0, False: 2.43k]
  ------------------
27966|      0|        peg_panic(b, "reference chain too deep");
27967|       |
27968|       |    /* Check cache - for tuples we check only the local cache, as
27969|       |     * in a different grammar, the same tuple can compile to a different
27970|       |     * rule - for example, (+ :a :b) depends on whatever :a and :b are bound to. */
27971|  2.43k|    Janet check = janet_checktype(peg, JANET_TUPLE)
  ------------------
  |  |  806|  2.43k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1.51k, False: 913]
  |  |  |  Branch (806:6): [Folded, False: 2.43k]
  |  |  ------------------
  |  |  807|  2.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|  2.43k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.43k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.43k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.43k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.43k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27972|  2.43k|                  ? janet_table_rawget(grammar, peg)
27973|  2.43k|                  : janet_table_get(grammar, peg);
27974|  2.43k|    if (!janet_checktype(check, JANET_NIL)) {
  ------------------
  |  |  806|  2.43k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 2.43k]
  |  |  ------------------
  |  |  807|  2.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|  2.43k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.43k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.43k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.43k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.43k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (27974:9): [True: 133, False: 2.29k]
  ------------------
27975|    133|        b->form = old_form;
27976|    133|        b->grammar = old_grammar;
27977|    133|        return (uint32_t) janet_unwrap_number(check);
  ------------------
  |  |  839|    133|#define janet_unwrap_number(x) ((x).number)
  ------------------
27978|    133|    }
27979|       |
27980|       |    /* Check depth */
27981|  2.29k|    if (b->depth-- == 0)
  ------------------
  |  Branch (27981:9): [True: 0, False: 2.29k]
  ------------------
27982|      0|        peg_panic(b, "peg grammar recursed too deeply");
27983|       |
27984|       |    /* The final rule to return */
27985|  2.29k|    uint32_t rule = janet_v_count(b->bytecode);
  ------------------
  |  |  714|  2.29k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  1.66k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  1.66k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 1.66k, False: 637]
  |  |  ------------------
  ------------------
27986|       |
27987|       |    /* Add to cache. Do not cache structs, as we don't yet know
27988|       |     * what rule they will return! We can just as effectively cache
27989|       |     * the structs main rule. */
27990|  2.29k|    if (!janet_checktype(peg, JANET_STRUCT)) {
  ------------------
  |  |  806|  2.29k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 2.29k]
  |  |  ------------------
  |  |  807|  2.29k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.29k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.29k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.29k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.29k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.29k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (27990:9): [True: 2.28k, False: 12]
  ------------------
27991|  2.28k|        JanetTable *which_grammar = grammar;
27992|       |        /* If we are a primitive pattern, add to the global cache (root grammar table) */
27993|  2.28k|        if (!janet_checktype(peg, JANET_TUPLE)) {
  ------------------
  |  |  806|  2.28k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 2.28k]
  |  |  ------------------
  |  |  807|  2.28k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  2.28k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.28k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.28k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (27993:13): [True: 772, False: 1.51k]
  ------------------
27994|    772|            while (which_grammar->proto)
  ------------------
  |  Branch (27994:20): [True: 0, False: 772]
  ------------------
27995|      0|                which_grammar = which_grammar->proto;
27996|    772|        }
27997|  2.28k|        janet_table_put(which_grammar, peg, janet_wrap_number(rule));
  ------------------
  |  |  835|  2.28k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
27998|  2.28k|    }
27999|       |
28000|  2.29k|    switch (janet_type(peg)) {
  ------------------
  |  |  795|  2.29k|    (isnan((x).number) \
  |  |  796|  2.29k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  2.29k|        : JANET_NUMBER)
  ------------------
  |  Branch (28000:13): [True: 2.13k, False: 167]
  ------------------
28001|     18|        default:
  ------------------
  |  Branch (28001:9): [True: 18, False: 2.27k]
  ------------------
28002|     18|            peg_panic(b, "unexpected peg source");
28003|      0|            return 0;
28004|       |
28005|      7|        case JANET_BOOLEAN: {
  ------------------
  |  Branch (28005:9): [True: 7, False: 2.29k]
  ------------------
28006|      7|            int n = janet_unwrap_boolean(peg);
  ------------------
  |  |  838|      7|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
28007|      7|            Reserve r = reserve(b, 2);
28008|      7|            emit_1(r, n ? RULE_NCHAR : RULE_NOTNCHAR, 0);
  ------------------
  |  Branch (28008:23): [True: 3, False: 4]
  ------------------
28009|      7|            break;
28010|      0|        }
28011|    167|        case JANET_NUMBER: {
  ------------------
  |  Branch (28011:9): [True: 167, False: 2.13k]
  ------------------
28012|    167|            int32_t n = peg_getinteger(b, peg);
28013|    167|            Reserve r = reserve(b, 2);
28014|    167|            if (n < 0) {
  ------------------
  |  Branch (28014:17): [True: 31, False: 136]
  ------------------
28015|     31|                emit_1(r, RULE_NOTNCHAR, -n);
28016|    136|            } else {
28017|    136|                emit_1(r, RULE_NCHAR, n);
28018|    136|            }
28019|    167|            break;
28020|      0|        }
28021|    386|        case JANET_STRING: {
  ------------------
  |  Branch (28021:9): [True: 386, False: 1.91k]
  ------------------
28022|    386|            const uint8_t *str = janet_unwrap_string(peg);
  ------------------
  |  |  863|    386|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
28023|    386|            int32_t len = janet_string_length(str);
  ------------------
  |  | 1812|    386|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|    386|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
28024|    386|            emit_bytes(b, RULE_LITERAL, len, str);
28025|    386|            break;
28026|      0|        }
28027|    188|        case JANET_BUFFER: {
  ------------------
  |  Branch (28027:9): [True: 188, False: 2.10k]
  ------------------
28028|    188|            const JanetBuffer *buf = janet_unwrap_buffer(peg);
  ------------------
  |  |  862|    188|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
28029|    188|            emit_bytes(b, RULE_LITERAL, buf->count, buf->data);
28030|    188|            break;
28031|      0|        }
28032|      6|        case JANET_TABLE: {
  ------------------
  |  Branch (28032:9): [True: 6, False: 2.29k]
  ------------------
28033|       |            /* Build grammar table */
28034|      6|            JanetTable *new_grammar = janet_table_clone(janet_unwrap_table(peg));
  ------------------
  |  |  861|      6|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
28035|      6|            new_grammar->proto = grammar;
28036|      6|            b->grammar = grammar = new_grammar;
28037|       |            /* Run the main rule */
28038|      6|            Janet main_rule = janet_table_rawget(grammar, janet_ckeywordv("main"));
  ------------------
  |  | 1842|      6|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28039|      6|            if (janet_checktype(main_rule, JANET_NIL))
  ------------------
  |  |  806|      6|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 6, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 6]
  |  |  ------------------
  |  |  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|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28040|      6|                peg_panic(b, "grammar requires :main rule");
28041|      0|            rule = peg_compile1(b, main_rule);
28042|      0|            break;
28043|      6|        }
28044|     12|        case JANET_STRUCT: {
  ------------------
  |  Branch (28044:9): [True: 12, False: 2.28k]
  ------------------
28045|       |            /* Build grammar table */
28046|     12|            const JanetKV *st = janet_unwrap_struct(peg);
  ------------------
  |  |  857|     12|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
28047|     12|            JanetTable *new_grammar = janet_table(2 * janet_struct_capacity(st));
  ------------------
  |  | 1848|     12|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1845|     12|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
28048|    205|            for (int32_t i = 0; i < janet_struct_capacity(st); i++) {
  ------------------
  |  | 1848|    205|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1845|    205|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (28048:33): [True: 193, False: 12]
  ------------------
28049|    193|                if (janet_checktype(st[i].key, JANET_KEYWORD)) {
  ------------------
  |  |  806|    193|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 14, False: 179]
  |  |  |  Branch (806:6): [Folded, False: 193]
  |  |  ------------------
  |  |  807|    193|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    193|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    193|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    193|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    193|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    193|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28050|     14|                    janet_table_put(new_grammar, st[i].key, st[i].value);
28051|     14|                }
28052|    193|            }
28053|     12|            new_grammar->proto = grammar;
28054|     12|            b->grammar = grammar = new_grammar;
28055|       |            /* Run the main rule */
28056|     12|            Janet main_rule = janet_table_rawget(grammar, janet_ckeywordv("main"));
  ------------------
  |  | 1842|     12|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|     12|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28057|     12|            if (janet_checktype(main_rule, JANET_NIL))
  ------------------
  |  |  806|     12|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 12, False: 0]
  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28058|     12|                peg_panic(b, "grammar requires :main rule");
28059|      0|            rule = peg_compile1(b, main_rule);
28060|      0|            break;
28061|     12|        }
28062|  1.51k|        case JANET_TUPLE: {
  ------------------
  |  Branch (28062:9): [True: 1.51k, False: 784]
  ------------------
28063|  1.51k|            const Janet *tup = janet_unwrap_tuple(peg);
  ------------------
  |  |  858|  1.51k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
28064|  1.51k|            int32_t len = janet_tuple_length(tup);
  ------------------
  |  | 1801|  1.51k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|  1.51k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
28065|  1.51k|            if (len == 0) peg_panic(b, "tuple in grammar must have non-zero length");
  ------------------
  |  Branch (28065:17): [True: 1, False: 1.51k]
  ------------------
28066|  1.51k|            if (janet_checkint(tup[0])) {
  ------------------
  |  Branch (28066:17): [True: 59, False: 1.45k]
  ------------------
28067|     59|                int32_t n = janet_unwrap_integer(tup[0]);
  ------------------
  |  |  966|     59|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|     59|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
28068|     59|                if (n < 0) {
  ------------------
  |  Branch (28068:21): [True: 4, False: 55]
  ------------------
28069|      4|                    peg_panicf(b, "expected non-negative integer, got %d", n);
  ------------------
  |  |27382|      4|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
28070|      4|                }
28071|     55|                spec_repeat(b, len, tup);
28072|     55|                break;
28073|     59|            }
28074|  1.45k|            if (!janet_checktype(tup[0], JANET_SYMBOL))
  ------------------
  |  |  806|  1.45k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 1.45k]
  |  |  ------------------
  |  |  807|  1.45k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.45k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.45k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.45k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.45k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.45k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (28074:17): [True: 7, False: 1.44k]
  ------------------
28075|      7|                peg_panicf(b, "expected grammar command, found %v", tup[0]);
  ------------------
  |  |27382|      7|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
28076|  1.44k|            const uint8_t *sym = janet_unwrap_symbol(tup[0]);
  ------------------
  |  |  864|  1.44k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
28077|  1.44k|            const SpecialPair *sp = janet_strbinsearch(
28078|  1.44k|                                        &peg_specials,
28079|  1.44k|                                        sizeof(peg_specials) / sizeof(SpecialPair),
28080|  1.44k|                                        sizeof(SpecialPair),
28081|  1.44k|                                        sym);
28082|  1.44k|            if (sp) {
  ------------------
  |  Branch (28082:17): [True: 1.38k, False: 59]
  ------------------
28083|  1.38k|                sp->special(b, len - 1, tup + 1);
28084|  1.38k|            } else {
28085|     59|                peg_panicf(b, "unknown special %S", sym);
  ------------------
  |  |27382|     59|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
28086|     59|            }
28087|  1.38k|            break;
28088|  1.44k|        }
28089|  2.29k|    }
28090|       |
28091|       |    /* Increase depth again */
28092|  1.95k|    b->depth++;
28093|  1.95k|    b->form = old_form;
28094|  1.95k|    b->grammar = old_grammar;
28095|  1.95k|    return rule;
28096|  2.29k|}
janet.c:peg_panic:
27377|    155|JANET_NO_RETURN static void peg_panic(Builder *b, const char *msg) {
27378|    155|    builder_cleanup(b);
27379|    155|    janet_panicf("grammar error in %p, %s", b->form, msg);
27380|    155|}
janet.c:reserve:
27468|  1.40k|static Reserve reserve(Builder *b, int32_t size) {
27469|  1.40k|    Reserve r;
27470|  1.40k|    r.index = janet_v_count(b->bytecode);
  ------------------
  |  |  714|  1.40k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  1.05k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  1.05k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 1.05k, False: 353]
  |  |  ------------------
  ------------------
27471|  1.40k|    r.builder = b;
27472|  1.40k|    r.size = size;
27473|  5.84k|    for (int32_t i = 0; i < size; i++)
  ------------------
  |  Branch (27473:25): [True: 4.43k, False: 1.40k]
  ------------------
27474|       |        janet_v_push(b->bytecode, 0);
  ------------------
  |  |  712|  4.43k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  4.43k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  4.43k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  4.08k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  4.08k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  4.08k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  4.08k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 353, False: 4.08k]
  |  |  |  |  |  |  |  Branch (723:50): [True: 1.02k, False: 3.05k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|  1.37k|#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))
  |  |  ------------------
  |  |  |  |  721|  4.43k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  4.43k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27475|  1.40k|    return r;
27476|  1.40k|}
janet.c:emit_1:
27497|    224|static void emit_1(Reserve r, uint32_t op, uint32_t arg) {
27498|    224|    emit_rule(r, op, 1, &arg);
27499|    224|}
janet.c:emit_rule:
27479|  1.22k|static void emit_rule(Reserve r, int32_t op, int32_t n, const uint32_t *body) {
27480|  1.22k|    janet_assert(r.size == n + 1, "bad reserve");
  ------------------
  |  |  389|  1.22k|#define janet_assert(c, m) do { \
  |  |  390|  1.22k|    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.22k]
  |  |  ------------------
  |  |  391|  1.22k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 1.22k]
  |  |  ------------------
  ------------------
27481|  1.22k|    r.builder->bytecode[r.index] = op;
27482|  1.22k|    memcpy(r.builder->bytecode + r.index + 1, body, n * sizeof(uint32_t));
27483|  1.22k|}
janet.c:peg_getinteger:
27418|    240|static int32_t peg_getinteger(Builder *b, Janet x) {
27419|    240|    if (!janet_checkint(x))
  ------------------
  |  Branch (27419:9): [True: 8, False: 232]
  ------------------
27420|      8|        peg_panicf(b, "expected integer, got %v", x);
  ------------------
  |  |27382|      8|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27421|    232|    return janet_unwrap_integer(x);
  ------------------
  |  |  966|    232|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|    232|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
27422|    240|}
janet.c:emit_bytes:
27486|    574|static void emit_bytes(Builder *b, uint32_t op, int32_t len, const uint8_t *bytes) {
27487|    574|    uint32_t next_rule = janet_v_count(b->bytecode);
  ------------------
  |  |  714|    574|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|    551|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    551|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 551, False: 23]
  |  |  ------------------
  ------------------
27488|    574|    janet_v_push(b->bytecode, op);
  ------------------
  |  |  712|    574|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|    574|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|    574|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|    551|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|    551|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|    551|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|    551|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 23, False: 551]
  |  |  |  |  |  |  |  Branch (723:50): [True: 79, False: 472]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|    102|#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))
  |  |  ------------------
  |  |  |  |  721|    574|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    574|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27489|    574|    janet_v_push(b->bytecode, len);
  ------------------
  |  |  712|    574|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|    574|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|    574|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|    574|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|    574|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|    574|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|    574|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 0, False: 574]
  |  |  |  |  |  |  |  Branch (723:50): [True: 100, False: 474]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|    100|#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))
  |  |  ------------------
  |  |  |  |  721|    574|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    574|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27490|    574|    int32_t words = ((len + 3) >> 2);
27491|  90.6k|    for (int32_t i = 0; i < words; i++)
  ------------------
  |  Branch (27491:25): [True: 90.0k, False: 574]
  ------------------
27492|       |        janet_v_push(b->bytecode, 0);
  ------------------
  |  |  712|  90.0k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  90.0k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  90.0k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  90.0k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  90.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  90.0k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  90.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 0, False: 90.0k]
  |  |  |  |  |  |  |  Branch (723:50): [True: 280, False: 89.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|    280|#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))
  |  |  ------------------
  |  |  |  |  721|  90.0k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  90.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27493|    574|    memcpy(b->bytecode + next_rule + 2, bytes, len);
27494|    574|}
janet.c:spec_repeat:
27641|     55|static void spec_repeat(Builder *b, int32_t argc, const Janet *argv) {
27642|     55|    peg_fixarity(b, argc, 2);
27643|     55|    Reserve r = reserve(b, 4);
27644|     55|    int32_t n = peg_getnat(b, argv[0]);
27645|     55|    uint32_t subrule = peg_compile1(b, argv[1]);
27646|     55|    emit_3(r, RULE_BETWEEN, n, n, subrule);
27647|     55|}
janet.c:peg_fixarity:
27384|    107|static void peg_fixarity(Builder *b, int32_t argc, int32_t arity) {
27385|    107|    if (argc != arity) {
  ------------------
  |  Branch (27385:9): [True: 7, False: 100]
  ------------------
27386|      7|        peg_panicf(b, "expected %d argument%s, got %d",
  ------------------
  |  |27382|     14|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  |  |  ------------------
  |  |  |  Branch (27382:71): [True: 4, False: 3]
  |  |  ------------------
  ------------------
27387|      7|                   arity,
27388|      7|                   arity == 1 ? "" : "s",
27389|      7|                   argc);
27390|      7|    }
27391|    107|}
janet.c:peg_getnat:
27424|     52|static int32_t peg_getnat(Builder *b, Janet x) {
27425|     52|    int32_t i = peg_getinteger(b, x);
27426|     52|    if (i < 0)
  ------------------
  |  Branch (27426:9): [True: 0, False: 52]
  ------------------
27427|      0|        peg_panicf(b, "expected non-negative integer, got %v", x);
  ------------------
  |  |27382|      0|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27428|     52|    return i;
27429|     52|}
janet.c:emit_3:
27504|     68|static void emit_3(Reserve r, uint32_t op, uint32_t arg1, uint32_t arg2, uint32_t arg3) {
27505|     68|    uint32_t arr[3] = {arg1, arg2, arg3};
27506|     68|    emit_rule(r, op, 3, arr);
27507|     68|}
janet.c:spec_not:
27657|     11|static void spec_not(Builder *b, int32_t argc, const Janet *argv) {
27658|     11|    spec_onerule(b, argc, argv, RULE_NOT);
27659|     11|}
janet.c:spec_onerule:
27650|     11|static void spec_onerule(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
27651|     11|    peg_fixarity(b, argc, 1);
27652|     11|    Reserve r = reserve(b, 2);
27653|     11|    uint32_t rule = peg_compile1(b, argv[0]);
27654|     11|    emit_1(r, op, rule);
27655|     11|}
janet.c:spec_position:
27749|     12|static void spec_position(Builder *b, int32_t argc, const Janet *argv) {
27750|     12|    spec_tag1(b, argc, argv, RULE_POSITION);
27751|     12|}
janet.c:spec_tag1:
27741|     12|static void spec_tag1(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
27742|     12|    peg_arity(b, argc, 0, 1);
27743|     12|    Reserve r = reserve(b, 2);
27744|     12|    uint32_t tag = (argc) ? emit_tag(b, argv[0]) : 0;
  ------------------
  |  Branch (27744:20): [True: 2, False: 10]
  ------------------
27745|     12|    (void) argv;
27746|     12|    emit_1(r, op, tag);
27747|     12|}
janet.c:peg_arity:
27393|  1.16k|static void peg_arity(Builder *b, int32_t arity, int32_t min, int32_t max) {
27394|  1.16k|    if (min >= 0 && arity < min)
  ------------------
  |  Branch (27394:9): [True: 1.16k, False: 0]
  |  Branch (27394:21): [True: 4, False: 1.15k]
  ------------------
27395|      4|        peg_panicf(b, "arity mismatch, expected at least %d, got %d", min, arity);
  ------------------
  |  |27382|      4|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27396|  1.15k|    if (max >= 0 && arity > max)
  ------------------
  |  Branch (27396:9): [True: 1.07k, False: 81]
  |  Branch (27396:21): [True: 23, False: 1.05k]
  ------------------
27397|     23|        peg_panicf(b, "arity mismatch, expected at most %d, got %d", max, arity);
  ------------------
  |  |27382|     23|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27398|  1.15k|}
janet.c:emit_tag:
27441|      6|static uint32_t emit_tag(Builder *b, Janet t) {
27442|      6|    if (!janet_checktype(t, JANET_KEYWORD))
  ------------------
  |  |  806|      6|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 6]
  |  |  ------------------
  |  |  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|      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 (27442:9): [True: 6, False: 0]
  ------------------
27443|      6|        peg_panicf(b, "expected keyword for capture tag, got %v", t);
  ------------------
  |  |27382|      6|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27444|      0|    Janet check = janet_table_get(b->tags, t);
27445|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27446|      0|        uint32_t tag = b->nexttag++;
27447|      0|        if (tag > 255) {
  ------------------
  |  Branch (27447:13): [True: 0, False: 0]
  ------------------
27448|      0|            peg_panic(b, "too many tags - up to 255 tags are supported per peg");
27449|      0|        }
27450|      0|        Janet val = janet_wrap_number(tag);
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
27451|      0|        janet_table_put(b->tags, t, val);
27452|      0|        return tag;
27453|      0|    } else {
27454|      0|        return (uint32_t) janet_unwrap_number(check);
  ------------------
  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  ------------------
27455|      0|    }
27456|      0|}
janet.c:spec_accumulate:
27694|     15|static void spec_accumulate(Builder *b, int32_t argc, const Janet *argv) {
27695|     15|    spec_cap1(b, argc, argv, RULE_ACCUMULATE);
27696|     15|}
janet.c:spec_cap1:
27683|    993|static void spec_cap1(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
27684|    993|    peg_arity(b, argc, 1, 2);
27685|    993|    Reserve r = reserve(b, 3);
27686|    993|    uint32_t tag = (argc == 2) ? emit_tag(b, argv[1]) : 0;
  ------------------
  |  Branch (27686:20): [True: 1, False: 992]
  ------------------
27687|    993|    uint32_t rule = peg_compile1(b, argv[0]);
27688|    993|    emit_2(r, op, rule, tag);
27689|    993|}
janet.c:emit_2:
27500|    867|static void emit_2(Reserve r, uint32_t op, uint32_t arg1, uint32_t arg2) {
27501|    867|    uint32_t arr[2] = {arg1, arg2};
27502|    867|    emit_rule(r, op, 2, arr);
27503|    867|}
janet.c:spec_sequence:
27572|     79|static void spec_sequence(Builder *b, int32_t argc, const Janet *argv) {
27573|     79|    spec_variadic(b, argc, argv, RULE_SEQUENCE);
27574|     79|}
janet.c:spec_variadic:
27557|    172|static void spec_variadic(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
27558|    172|    uint32_t rule = janet_v_count(b->bytecode);
  ------------------
  |  |  714|    172|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|     34|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|     34|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 34, False: 138]
  |  |  ------------------
  ------------------
27559|    172|    janet_v_push(b->bytecode, op);
  ------------------
  |  |  712|    172|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|    172|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|    172|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|     34|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|     34|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|     34|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|     34|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 138, False: 34]
  |  |  |  |  |  |  |  Branch (723:50): [True: 12, False: 22]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|    150|#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))
  |  |  ------------------
  |  |  |  |  721|    172|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    172|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27560|    172|    janet_v_push(b->bytecode, argc);
  ------------------
  |  |  712|    172|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|    172|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|    172|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|    172|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|    172|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|    172|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|    172|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 0, False: 172]
  |  |  |  |  |  |  |  Branch (723:50): [True: 140, False: 32]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|    140|#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))
  |  |  ------------------
  |  |  |  |  721|    172|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    172|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27561|  2.34k|    for (int32_t i = 0; i < argc; i++)
  ------------------
  |  Branch (27561:25): [True: 2.17k, False: 172]
  ------------------
27562|  2.17k|        janet_v_push(b->bytecode, 0);
  ------------------
  |  |  712|  2.17k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  2.17k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  2.17k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  2.17k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  2.17k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  2.17k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  2.17k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 0, False: 2.17k]
  |  |  |  |  |  |  |  Branch (723:50): [True: 282, False: 1.89k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|    282|#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))
  |  |  ------------------
  |  |  |  |  721|  2.17k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  2.17k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27563|    824|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (27563:25): [True: 652, False: 172]
  ------------------
27564|    652|        uint32_t rulei = peg_compile1(b, argv[i]);
27565|    652|        b->bytecode[rule + 2 + i] = rulei;
27566|    652|    }
27567|    172|}
janet.c:spec_choice:
27569|     93|static void spec_choice(Builder *b, int32_t argc, const Janet *argv) {
27570|     93|    spec_variadic(b, argc, argv, RULE_CHOICE);
27571|     93|}
janet.c:spec_reference:
27732|      3|static void spec_reference(Builder *b, int32_t argc, const Janet *argv) {
27733|      3|    peg_arity(b, argc, 1, 2);
27734|      3|    Reserve r = reserve(b, 3);
27735|      3|    uint32_t search = emit_tag(b, argv[0]);
27736|      3|    uint32_t tag = (argc == 2) ? emit_tag(b, argv[1]) : 0;
  ------------------
  |  Branch (27736:20): [True: 0, False: 3]
  ------------------
27737|      3|    b->has_backref = 1;
27738|      3|    emit_2(r, RULE_GETTAG, search, tag);
27739|      3|}
janet.c:spec_replace:
27787|     40|static void spec_replace(Builder *b, int32_t argc, const Janet *argv) {
27788|     40|    peg_arity(b, argc, 2, 3);
27789|     40|    Reserve r = reserve(b, 4);
27790|     40|    uint32_t subrule = peg_compile1(b, argv[0]);
27791|     40|    uint32_t constant = emit_constant(b, argv[1]);
27792|     40|    uint32_t tag = (argc == 3) ? emit_tag(b, argv[2]) : 0;
  ------------------
  |  Branch (27792:20): [True: 2, False: 38]
  ------------------
27793|     40|    emit_3(r, RULE_REPLACE, subrule, constant, tag);
27794|     40|}
janet.c:emit_constant:
27435|     23|static uint32_t emit_constant(Builder *b, Janet c) {
27436|     23|    uint32_t cindex = (uint32_t) janet_v_count(b->constants);
  ------------------
  |  |  714|     23|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 0, False: 23]
  |  |  ------------------
  ------------------
27437|       |    janet_v_push(b->constants, c);
  ------------------
  |  |  712|     23|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|     23|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|     23|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|      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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|      0|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 23, False: 0]
  |  |  |  |  |  |  |  Branch (723:50): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|     23|#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))
  |  |  ------------------
  |  |  |  |  721|     23|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|     23|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27438|     23|    return cindex;
27439|     23|}
janet.c:spec_capture:
27691|    978|static void spec_capture(Builder *b, int32_t argc, const Janet *argv) {
27692|    978|    spec_cap1(b, argc, argv, RULE_CAPTURE);
27693|    978|}
janet.c:spec_look:
27547|     33|static void spec_look(Builder *b, int32_t argc, const Janet *argv) {
27548|     33|    peg_arity(b, argc, 1, 2);
27549|     33|    Reserve r = reserve(b, 3);
27550|     33|    int32_t rulearg = argc == 2 ? 1 : 0;
  ------------------
  |  Branch (27550:23): [True: 21, False: 12]
  ------------------
27551|     33|    int32_t offset = argc == 2 ? peg_getinteger(b, argv[0]) : 0;
  ------------------
  |  Branch (27551:22): [True: 21, False: 12]
  ------------------
27552|     33|    uint32_t subrule = peg_compile1(b, argv[rulearg]);
27553|     33|    emit_2(r, RULE_LOOK, (uint32_t) offset, subrule);
27554|     33|}
janet.c:spec_opt:
27634|      3|static void spec_opt(Builder *b, int32_t argc, const Janet *argv) {
27635|      3|    peg_fixarity(b, argc, 1);
27636|      3|    Reserve r = reserve(b, 4);
27637|      3|    uint32_t subrule = peg_compile1(b, argv[0]);
27638|      3|    emit_3(r, RULE_BETWEEN, 0, 1, subrule);
27639|      3|}
janet.c:spec_debug:
27779|      1|static void spec_debug(Builder *b, int32_t argc, const Janet *argv) {
27780|      1|    peg_arity(b, argc, 0, 0);
27781|      1|    Reserve r = reserve(b, 1);
27782|      1|    uint32_t empty = 0;
27783|      1|    (void) argv;
27784|      1|    emit_rule(r, RULE_DEBUG, 0, &empty);
27785|      1|}
janet.c:spec_branch:
27577|     20|static void spec_branch(Builder *b, int32_t argc, const Janet *argv, uint32_t rule) {
27578|     20|    peg_fixarity(b, argc, 2);
27579|     20|    Reserve r = reserve(b, 3);
27580|     20|    uint32_t rule_a = peg_compile1(b, argv[0]);
27581|     20|    uint32_t rule_b = peg_compile1(b, argv[1]);
27582|     20|    emit_2(r, rule, rule_a, rule_b);
27583|     20|}
janet.c:spec_ifnot:
27588|     20|static void spec_ifnot(Builder *b, int32_t argc, const Janet *argv) {
27589|     20|    spec_branch(b, argc, argv, RULE_IFNOT);
27590|     20|}
janet.c:spec_range:
27517|     81|static void spec_range(Builder *b, int32_t argc, const Janet *argv) {
27518|     81|    peg_arity(b, argc, 1, -1);
27519|     81|    if (argc == 1) {
  ------------------
  |  Branch (27519:9): [True: 38, False: 43]
  ------------------
27520|     38|        Reserve r = reserve(b, 2);
27521|     38|        const uint8_t *str = peg_getrange(b, argv[0]);
27522|     38|        uint32_t arg = str[0] | (str[1] << 16);
27523|     38|        emit_1(r, RULE_RANGE, arg);
27524|     43|    } else {
27525|       |        /* Compile as a set */
27526|     43|        Reserve r = reserve(b, 9);
27527|     43|        uint32_t bitmap[8] = {0};
27528|    132|        for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (27528:29): [True: 89, False: 43]
  ------------------
27529|     89|            const uint8_t *str = peg_getrange(b, argv[i]);
27530|  2.31k|            for (uint32_t c = str[0]; c <= str[1]; c++)
  ------------------
  |  Branch (27530:39): [True: 2.22k, False: 89]
  ------------------
27531|  2.22k|                bitmap_set(bitmap, c);
27532|     89|        }
27533|     43|        emit_rule(r, RULE_SET, 8, bitmap);
27534|     43|    }
27535|     81|}
janet.c:peg_getrange:
27407|    127|static const uint8_t *peg_getrange(Builder *b, Janet x) {
27408|    127|    if (!janet_checktype(x, JANET_STRING))
  ------------------
  |  |  806|    127|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 127]
  |  |  ------------------
  |  |  807|    127|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    127|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    127|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    127|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    127|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    127|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (27408:9): [True: 0, False: 127]
  ------------------
27409|      0|        peg_panic(b, "expected string for character range");
27410|    127|    const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  863|    127|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
27411|    127|    if (janet_string_length(str) != 2)
  ------------------
  |  | 1812|    127|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|    127|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (27411:9): [True: 0, False: 127]
  ------------------
27412|      0|        peg_panicf(b, "expected string to have length 2, got %v", x);
  ------------------
  |  |27382|      0|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27413|    127|    if (str[1] < str[0])
  ------------------
  |  Branch (27413:9): [True: 0, False: 127]
  ------------------
27414|      0|        peg_panicf(b, "range %v is empty", x);
  ------------------
  |  |27382|      0|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27415|    127|    return str;
27416|    127|}
janet.c:bitmap_set:
27513|  2.35k|static void bitmap_set(uint32_t *bitmap, uint8_t c) {
27514|  2.35k|    bitmap[c >> 5] |= ((uint32_t)1) << (c & 0x1F);
27515|  2.35k|}
janet.c:spec_set:
27537|     18|static void spec_set(Builder *b, int32_t argc, const Janet *argv) {
27538|     18|    peg_fixarity(b, argc, 1);
27539|     18|    Reserve r = reserve(b, 9);
27540|     18|    const uint8_t *str = peg_getset(b, argv[0]);
27541|     18|    uint32_t bitmap[8] = {0};
27542|    144|    for (int32_t i = 0; i < janet_string_length(str); i++)
  ------------------
  |  | 1812|    144|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|    144|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (27542:25): [True: 126, False: 18]
  ------------------
27543|    126|        bitmap_set(bitmap, str[i]);
27544|     18|    emit_rule(r, RULE_SET, 8, bitmap);
27545|     18|}
janet.c:peg_getset:
27400|     18|static const uint8_t *peg_getset(Builder *b, Janet x) {
27401|     18|    if (!janet_checktype(x, JANET_STRING))
  ------------------
  |  |  806|     18|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 18]
  |  |  ------------------
  |  |  807|     18|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     18|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     18|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     18|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     18|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     18|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (27401:9): [True: 0, False: 18]
  ------------------
27402|      0|        peg_panic(b, "expected string for character set");
27403|     18|    const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  863|     18|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
27404|     18|    return str;
27405|     18|}
janet.c:make_peg:
28371|    482|static JanetPeg *make_peg(Builder *b) {
28372|    482|    size_t bytecode_start = size_padded(sizeof(JanetPeg), sizeof(uint32_t));
28373|    482|    size_t bytecode_size = janet_v_count(b->bytecode) * sizeof(uint32_t);
  ------------------
  |  |  714|    482|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|    482|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    482|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 482, False: 0]
  |  |  ------------------
  ------------------
28374|    482|    size_t constants_start = size_padded(bytecode_start + bytecode_size, sizeof(Janet));
28375|    482|    size_t constants_size = janet_v_count(b->constants) * sizeof(Janet);
  ------------------
  |  |  714|    482|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|     21|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|     21|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 21, False: 461]
  |  |  ------------------
  ------------------
28376|    482|    size_t total_size = constants_start + constants_size;
28377|    482|    char *mem = janet_abstract(&janet_peg_type, total_size);
28378|    482|    JanetPeg *peg = (JanetPeg *)mem;
28379|    482|    peg->bytecode = (uint32_t *)(mem + bytecode_start);
28380|    482|    peg->constants = (Janet *)(mem + constants_start);
28381|    482|    peg->num_constants = janet_v_count(b->constants);
  ------------------
  |  |  714|    482|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|     21|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|     21|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 21, False: 461]
  |  |  ------------------
  ------------------
28382|    482|    safe_memcpy(peg->bytecode, b->bytecode, bytecode_size);
28383|    482|    safe_memcpy(peg->constants, b->constants, constants_size);
28384|       |    peg->bytecode_len = janet_v_count(b->bytecode);
  ------------------
  |  |  714|    482|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|    482|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    482|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 482, False: 0]
  |  |  ------------------
  ------------------
28385|    482|    peg->has_backref = b->has_backref;
28386|    482|    return peg;
28387|    482|}
janet.c:builder_cleanup:
27372|    637|static void builder_cleanup(Builder *b) {
27373|    637|    janet_v_free(b->constants);
  ------------------
  |  |  711|    637|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  719|     23|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (711:34): [True: 23, False: 614]
  |  |  ------------------
  ------------------
27374|       |    janet_v_free(b->bytecode);
  ------------------
  |  |  711|    637|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  719|    514|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (711:34): [True: 514, False: 123]
  |  |  ------------------
  ------------------
27375|    637|}
janet.c:peg_cfun_init:
28437|    645|static PegCall peg_cfun_init(int32_t argc, Janet *argv, int get_replace) {
28438|    645|    PegCall ret;
28439|    645|    int32_t min = get_replace ? 3 : 2;
  ------------------
  |  Branch (28439:19): [True: 446, False: 199]
  ------------------
28440|    645|    janet_arity(argc, min, -1);
28441|    645|    if (janet_checktype(argv[0], JANET_ABSTRACT) &&
  ------------------
  |  |  806|  1.29k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1, False: 644]
  |  |  |  Branch (806:6): [Folded, False: 645]
  |  |  ------------------
  |  |  807|  1.29k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.29k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    645|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    645|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    645|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    645|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28442|      1|            janet_abstract_type(janet_unwrap_abstract(argv[0])) == &janet_peg_type) {
  ------------------
  |  | 1898|      1|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|      1|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (28442:13): [True: 0, False: 1]
  ------------------
28443|      0|        ret.peg = janet_unwrap_abstract(argv[0]);
  ------------------
  |  |  866|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
28444|    645|    } else {
28445|    645|        ret.peg = compile_peg(argv[0]);
28446|    645|    }
28447|    645|    if (get_replace) {
  ------------------
  |  Branch (28447:9): [True: 332, False: 313]
  ------------------
28448|    332|        ret.subst = argv[1];
28449|    332|        ret.bytes = janet_getbytes(argv, 2);
28450|    332|    } else {
28451|    313|        ret.bytes = janet_getbytes(argv, 1);
28452|    313|    }
28453|    645|    if (argc > min) {
  ------------------
  |  Branch (28453:9): [True: 191, False: 454]
  ------------------
28454|    191|        ret.start = janet_gethalfrange(argv, min, ret.bytes.len, "offset");
28455|    191|        ret.s.extrac = argc - min - 1;
28456|    191|        ret.s.extrav = janet_tuple_n(argv + min + 1, argc - min - 1);
28457|    454|    } else {
28458|    454|        ret.start = 0;
28459|    454|        ret.s.extrac = 0;
28460|    454|        ret.s.extrav = NULL;
28461|    454|    }
28462|    645|    ret.s.mode = PEG_MODE_NORMAL;
28463|    645|    ret.s.text_start = ret.bytes.bytes;
28464|    645|    ret.s.text_end = ret.bytes.bytes + ret.bytes.len;
28465|    645|    ret.s.outer_text_end = ret.s.text_end;
28466|    645|    ret.s.depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|    645|#define JANET_RECURSION_GUARD 1024
  ------------------
28467|    645|    ret.s.captures = janet_array(0);
28468|    645|    ret.s.tagged_captures = janet_array(0);
28469|    645|    ret.s.scratch = janet_buffer(10);
28470|    645|    ret.s.tags = janet_buffer(10);
28471|    645|    ret.s.constants = ret.peg->constants;
28472|    645|    ret.s.bytecode = ret.peg->bytecode;
28473|       |    ret.s.linemap = NULL;
28474|    645|    ret.s.linemaplen = -1;
28475|    645|    ret.s.has_backref = ret.peg->has_backref;
28476|    645|    return ret;
28477|    645|}
janet.c:peg_rule:
26680|   177k|    const uint8_t *text) {
26681|   185k|tail:
26682|   185k|    switch (*rule) {
26683|      0|        default:
  ------------------
  |  Branch (26683:9): [True: 0, False: 185k]
  ------------------
26684|      0|            janet_panic("unexpected opcode");
26685|      0|            return NULL;
26686|       |
26687|   152k|        case RULE_LITERAL: {
  ------------------
  |  Branch (26687:9): [True: 152k, False: 32.2k]
  ------------------
26688|   152k|            uint32_t len = rule[1];
26689|   152k|            if (text + len > s->text_end) return NULL;
  ------------------
  |  Branch (26689:17): [True: 3.98k, False: 148k]
  ------------------
26690|   148k|            return memcmp(text, rule + 2, len) ? NULL : text + len;
  ------------------
  |  Branch (26690:20): [True: 17.0k, False: 131k]
  ------------------
26691|   152k|        }
26692|       |
26693|      0|        case RULE_DEBUG: {
  ------------------
  |  Branch (26693:9): [True: 0, False: 185k]
  ------------------
26694|      0|            char buffer[32] = {0};
26695|      0|            size_t len = (size_t)(s->outer_text_end - text);
26696|      0|            memcpy(buffer, text, (len > 31 ? 31 : len));
  ------------------
  |  Branch (26696:35): [True: 0, False: 0]
  ------------------
26697|      0|            janet_eprintf("?? at [%s] (index %d)\n", buffer, (int32_t)(text - s->text_start));
  ------------------
  |  | 2194|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
26698|      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]
  |  |  ------------------
  ------------------
26699|       |            /* Accumulate buffer */
26700|      0|            if (s->scratch->count) {
  ------------------
  |  Branch (26700:17): [True: 0, False: 0]
  ------------------
26701|      0|                janet_eprintf("accumulate buffer: %v\n", janet_wrap_buffer(s->scratch));
  ------------------
  |  | 2194|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
26702|      0|            }
26703|       |            /* Normal captures */
26704|      0|            if (s->captures->count) {
  ------------------
  |  Branch (26704:17): [True: 0, False: 0]
  ------------------
26705|      0|                janet_eprintf("stack [%d]:\n", s->captures->count);
  ------------------
  |  | 2194|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
26706|      0|                for (int32_t i = 0; i < s->captures->count; i++) {
  ------------------
  |  Branch (26706:37): [True: 0, False: 0]
  ------------------
26707|      0|                    if (has_color) {
  ------------------
  |  Branch (26707:25): [True: 0, False: 0]
  ------------------
26708|      0|                        janet_eprintf("  [%d]: %M\n", i, s->captures->data[i]);
  ------------------
  |  | 2194|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
26709|      0|                    } else {
26710|      0|                        janet_eprintf("  [%d]: %m\n", i, s->captures->data[i]);
  ------------------
  |  | 2194|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
26711|      0|                    }
26712|      0|                }
26713|      0|            }
26714|       |            /* Tagged captures */
26715|      0|            if (s->tagged_captures->count) {
  ------------------
  |  Branch (26715:17): [True: 0, False: 0]
  ------------------
26716|      0|                janet_eprintf("tag stack [%d]:\n", s->tagged_captures->count);
  ------------------
  |  | 2194|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
26717|      0|                for (int32_t i = 0; i < s->tagged_captures->count; i++) {
  ------------------
  |  Branch (26717:37): [True: 0, False: 0]
  ------------------
26718|      0|                    if (has_color) {
  ------------------
  |  Branch (26718:25): [True: 0, False: 0]
  ------------------
26719|      0|                        janet_eprintf("  [%d] tag=%d: %M\n", i, (int32_t) s->tags->data[i], s->tagged_captures->data[i]);
  ------------------
  |  | 2194|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
26720|      0|                    } else {
26721|      0|                        janet_eprintf("  [%d] tag=%d: %m\n", i, (int32_t) s->tags->data[i], s->tagged_captures->data[i]);
  ------------------
  |  | 2194|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
26722|      0|                    }
26723|      0|                }
26724|      0|            }
26725|      0|            return text;
26726|   152k|        }
26727|       |
26728|    985|        case RULE_NCHAR: {
  ------------------
  |  Branch (26728:9): [True: 985, False: 184k]
  ------------------
26729|    985|            uint32_t n = rule[1];
26730|    985|            return (text + n > s->text_end) ? NULL : text + n;
  ------------------
  |  Branch (26730:20): [True: 396, False: 589]
  ------------------
26731|   152k|        }
26732|       |
26733|    491|        case RULE_NOTNCHAR: {
  ------------------
  |  Branch (26733:9): [True: 491, False: 184k]
  ------------------
26734|    491|            uint32_t n = rule[1];
26735|    491|            return (text + n > s->text_end) ? text : NULL;
  ------------------
  |  Branch (26735:20): [True: 121, False: 370]
  ------------------
26736|   152k|        }
26737|       |
26738|  3.32k|        case RULE_RANGE: {
  ------------------
  |  Branch (26738:9): [True: 3.32k, False: 181k]
  ------------------
26739|  3.32k|            uint8_t lo = rule[1] & 0xFF;
26740|  3.32k|            uint8_t hi = (rule[1] >> 16) & 0xFF;
26741|  3.32k|            return (text < s->text_end &&
  ------------------
  |  Branch (26741:21): [True: 3.32k, False: 0]
  ------------------
26742|  3.32k|                    text[0] >= lo &&
  ------------------
  |  Branch (26742:21): [True: 749, False: 2.58k]
  ------------------
26743|    749|                    text[0] <= hi)
  ------------------
  |  Branch (26743:21): [True: 105, False: 644]
  ------------------
26744|  3.32k|                   ? text + 1
26745|  3.32k|                   : NULL;
26746|   152k|        }
26747|       |
26748|    392|        case RULE_SET: {
  ------------------
  |  Branch (26748:9): [True: 392, False: 184k]
  ------------------
26749|    392|            if (text >= s->text_end) return NULL;
  ------------------
  |  Branch (26749:17): [True: 0, False: 392]
  ------------------
26750|    392|            uint32_t word = rule[1 + (text[0] >> 5)];
26751|    392|            uint32_t mask = (uint32_t)1 << (text[0] & 0x1F);
26752|    392|            return (word & mask)
  ------------------
  |  Branch (26752:20): [True: 38, False: 354]
  ------------------
26753|    392|                   ? text + 1
26754|    392|                   : NULL;
26755|    392|        }
26756|       |
26757|  1.02k|        case RULE_LOOK: {
  ------------------
  |  Branch (26757:9): [True: 1.02k, False: 184k]
  ------------------
26758|  1.02k|            text += ((int32_t *)rule)[1];
26759|  1.02k|            if (text < s->text_start || text > s->text_end) return NULL;
  ------------------
  |  Branch (26759:17): [True: 301, False: 727]
  |  Branch (26759:41): [True: 76, False: 651]
  ------------------
26760|    651|            down1(s);
  ------------------
  |  |26665|    651|#define down1(s) do { \
  |  |26666|    651|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 651]
  |  |  ------------------
  |  |26667|    651|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 651]
  |  |  ------------------
  ------------------
26761|    651|            const uint8_t *result = peg_rule(s, s->bytecode + rule[2], text);
26762|    651|            up1(s);
  ------------------
  |  |26668|    651|#define up1(s) ((s)->depth++)
  ------------------
26763|    651|            text -= ((int32_t *)rule)[1];
26764|    651|            return result ? text : NULL;
  ------------------
  |  Branch (26764:20): [True: 3, False: 648]
  ------------------
26765|    651|        }
26766|       |
26767|  7.46k|        case RULE_CHOICE: {
  ------------------
  |  Branch (26767:9): [True: 7.46k, False: 177k]
  ------------------
26768|  7.46k|            uint32_t len = rule[1];
26769|  7.46k|            const uint32_t *args = rule + 2;
26770|  7.46k|            if (len == 0) return NULL;
  ------------------
  |  Branch (26770:17): [True: 256, False: 7.21k]
  ------------------
26771|  7.21k|            down1(s);
  ------------------
  |  |26665|  7.21k|#define down1(s) do { \
  |  |26666|  7.21k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 7.21k]
  |  |  ------------------
  |  |26667|  7.21k|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 7.21k]
  |  |  ------------------
  ------------------
26772|  7.21k|            CapState cs = cap_save(s);
26773|  17.8k|            for (uint32_t i = 0; i < len - 1; i++) {
  ------------------
  |  Branch (26773:34): [True: 10.6k, False: 7.18k]
  ------------------
26774|  10.6k|                const uint8_t *result = peg_rule(s, s->bytecode + args[i], text);
26775|  10.6k|                if (result) {
  ------------------
  |  Branch (26775:21): [True: 23, False: 10.6k]
  ------------------
26776|     23|                    up1(s);
  ------------------
  |  |26668|     23|#define up1(s) ((s)->depth++)
  ------------------
26777|     23|                    return result;
26778|     23|                }
26779|  10.6k|                cap_load(s, cs);
26780|  10.6k|            }
26781|  7.18k|            up1(s);
  ------------------
  |  |26668|  7.18k|#define up1(s) ((s)->depth++)
  ------------------
26782|  7.18k|            rule = s->bytecode + args[len - 1];
26783|  7.18k|            goto tail;
26784|  7.21k|        }
26785|       |
26786|  9.27k|        case RULE_SEQUENCE: {
  ------------------
  |  Branch (26786:9): [True: 9.27k, False: 175k]
  ------------------
26787|  9.27k|            uint32_t len = rule[1];
26788|  9.27k|            const uint32_t *args = rule + 2;
26789|  9.27k|            if (len == 0) return text;
  ------------------
  |  Branch (26789:17): [True: 8.01k, False: 1.26k]
  ------------------
26790|  1.26k|            down1(s);
  ------------------
  |  |26665|  1.26k|#define down1(s) do { \
  |  |26666|  1.26k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 1.26k]
  |  |  ------------------
  |  |26667|  1.26k|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 1.26k]
  |  |  ------------------
  ------------------
26791|  2.37k|            for (uint32_t i = 0; text && i < len - 1; i++)
  ------------------
  |  Branch (26791:34): [True: 1.69k, False: 684]
  |  Branch (26791:42): [True: 1.11k, False: 576]
  ------------------
26792|  1.11k|                text = peg_rule(s, s->bytecode + args[i], text);
26793|  1.26k|            up1(s);
  ------------------
  |  |26668|  1.26k|#define up1(s) ((s)->depth++)
  ------------------
26794|  1.26k|            if (!text) return NULL;
  ------------------
  |  Branch (26794:17): [True: 684, False: 576]
  ------------------
26795|    576|            rule = s->bytecode + args[len - 1];
26796|    576|            goto tail;
26797|  1.26k|        }
26798|       |
26799|      0|        case RULE_IF: {
  ------------------
  |  Branch (26799:9): [True: 0, False: 185k]
  ------------------
26800|      0|            const uint32_t *rule_a = s->bytecode + rule[1];
26801|      0|            const uint32_t *rule_b = s->bytecode + rule[2];
26802|      0|            down1(s);
  ------------------
  |  |26665|      0|#define down1(s) do { \
  |  |26666|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26667|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
26803|      0|            const uint8_t *result = peg_rule(s, rule_a, text);
26804|      0|            up1(s);
  ------------------
  |  |26668|      0|#define up1(s) ((s)->depth++)
  ------------------
26805|      0|            if (!result) return NULL;
  ------------------
  |  Branch (26805:17): [True: 0, False: 0]
  ------------------
26806|      0|            rule = rule_b;
26807|      0|            goto tail;
26808|      0|        }
26809|    119|        case RULE_IFNOT: {
  ------------------
  |  Branch (26809:9): [True: 119, False: 185k]
  ------------------
26810|    119|            const uint32_t *rule_a = s->bytecode + rule[1];
26811|    119|            const uint32_t *rule_b = s->bytecode + rule[2];
26812|    119|            down1(s);
  ------------------
  |  |26665|    119|#define down1(s) do { \
  |  |26666|    119|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 119]
  |  |  ------------------
  |  |26667|    119|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 119]
  |  |  ------------------
  ------------------
26813|    119|            CapState cs = cap_save(s);
26814|    119|            const uint8_t *result = peg_rule(s, rule_a, text);
26815|    119|            if (!!result) {
  ------------------
  |  Branch (26815:17): [True: 101, False: 18]
  ------------------
26816|    101|                up1(s);
  ------------------
  |  |26668|    101|#define up1(s) ((s)->depth++)
  ------------------
26817|    101|                return NULL;
26818|    101|            } else {
26819|     18|                cap_load(s, cs);
26820|     18|                up1(s);
  ------------------
  |  |26668|     18|#define up1(s) ((s)->depth++)
  ------------------
26821|     18|                rule = rule_b;
26822|     18|                goto tail;
26823|     18|            }
26824|    119|        }
26825|       |
26826|    256|        case RULE_NOT: {
  ------------------
  |  Branch (26826:9): [True: 256, False: 184k]
  ------------------
26827|    256|            const uint32_t *rule_a = s->bytecode + rule[1];
26828|    256|            down1(s);
  ------------------
  |  |26665|    256|#define down1(s) do { \
  |  |26666|    256|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 256]
  |  |  ------------------
  |  |26667|    256|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 256]
  |  |  ------------------
  ------------------
26829|    256|            CapState cs = cap_save(s);
26830|    256|            const uint8_t *result = peg_rule(s, rule_a, text);
26831|    256|            if (result) {
  ------------------
  |  Branch (26831:17): [True: 249, False: 7]
  ------------------
26832|    249|                up1(s);
  ------------------
  |  |26668|    249|#define up1(s) ((s)->depth++)
  ------------------
26833|    249|                return NULL;
26834|    249|            } else {
26835|      7|                cap_load(s, cs);
26836|      7|                up1(s);
  ------------------
  |  |26668|      7|#define up1(s) ((s)->depth++)
  ------------------
26837|      7|                return text;
26838|      7|            }
26839|    256|        }
26840|       |
26841|      0|        case RULE_THRU:
  ------------------
  |  Branch (26841:9): [True: 0, False: 185k]
  ------------------
26842|      0|        case RULE_TO: {
  ------------------
  |  Branch (26842:9): [True: 0, False: 185k]
  ------------------
26843|      0|            const uint32_t *rule_a = s->bytecode + rule[1];
26844|      0|            const uint8_t *next_text = NULL;
26845|      0|            CapState cs = cap_save(s);
26846|      0|            down1(s);
  ------------------
  |  |26665|      0|#define down1(s) do { \
  |  |26666|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26667|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
26847|      0|            while (text <= s->text_end) {
  ------------------
  |  Branch (26847:20): [True: 0, False: 0]
  ------------------
26848|      0|                CapState cs2 = cap_save(s);
26849|      0|                next_text = peg_rule(s, rule_a, text);
26850|      0|                if (next_text) {
  ------------------
  |  Branch (26850:21): [True: 0, False: 0]
  ------------------
26851|      0|                    if (rule[0] == RULE_TO) cap_load(s, cs2);
  ------------------
  |  Branch (26851:25): [True: 0, False: 0]
  ------------------
26852|      0|                    break;
26853|      0|                }
26854|      0|                cap_load(s, cs2);
26855|      0|                text++;
26856|      0|            }
26857|      0|            up1(s);
  ------------------
  |  |26668|      0|#define up1(s) ((s)->depth++)
  ------------------
26858|      0|            if (text > s->text_end) {
  ------------------
  |  Branch (26858:17): [True: 0, False: 0]
  ------------------
26859|      0|                cap_load(s, cs);
26860|      0|                return NULL;
26861|      0|            }
26862|      0|            return rule[0] == RULE_TO ? text : next_text;
  ------------------
  |  Branch (26862:20): [True: 0, False: 0]
  ------------------
26863|      0|        }
26864|       |
26865|    533|        case RULE_BETWEEN: {
  ------------------
  |  Branch (26865:9): [True: 533, False: 184k]
  ------------------
26866|    533|            uint32_t lo = rule[1];
26867|    533|            uint32_t hi = rule[2];
26868|    533|            const uint32_t *rule_a = s->bytecode + rule[3];
26869|    533|            uint32_t captured = 0;
26870|    533|            const uint8_t *next_text;
26871|    533|            CapState cs = cap_save(s);
26872|    533|            down1(s);
  ------------------
  |  |26665|    533|#define down1(s) do { \
  |  |26666|    533|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 533]
  |  |  ------------------
  |  |26667|    533|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 533]
  |  |  ------------------
  ------------------
26873|   141k|            while (captured < hi) {
  ------------------
  |  Branch (26873:20): [True: 141k, False: 39]
  ------------------
26874|   141k|                CapState cs2 = cap_save(s);
26875|   141k|                next_text = peg_rule(s, rule_a, text);
26876|   141k|                if (!next_text || ((next_text == text) && (hi == UINT32_MAX))) {
  ------------------
  |  Branch (26876:21): [True: 494, False: 140k]
  |  Branch (26876:36): [True: 140k, False: 97]
  |  Branch (26876:59): [True: 0, False: 140k]
  ------------------
26877|    494|                    cap_load(s, cs2);
26878|    494|                    break;
26879|    494|                }
26880|   140k|                captured++;
26881|   140k|                text = next_text;
26882|   140k|            }
26883|    533|            up1(s);
  ------------------
  |  |26668|    533|#define up1(s) ((s)->depth++)
  ------------------
26884|    533|            if (captured < lo) {
  ------------------
  |  Branch (26884:17): [True: 493, False: 40]
  ------------------
26885|    493|                cap_load(s, cs);
26886|    493|                return NULL;
26887|    493|            }
26888|     40|            return text;
26889|    533|        }
26890|       |
26891|       |        /* Capturing rules */
26892|       |
26893|      0|        case RULE_GETTAG: {
  ------------------
  |  Branch (26893:9): [True: 0, False: 185k]
  ------------------
26894|      0|            uint32_t search = rule[1];
26895|      0|            uint32_t tag = rule[2];
26896|      0|            for (int32_t i = s->tags->count - 1; i >= 0; i--) {
  ------------------
  |  Branch (26896:50): [True: 0, False: 0]
  ------------------
26897|      0|                if (s->tags->data[i] == search) {
  ------------------
  |  Branch (26897:21): [True: 0, False: 0]
  ------------------
26898|      0|                    pushcap(s, s->tagged_captures->data[i], tag);
26899|      0|                    return text;
26900|      0|                }
26901|      0|            }
26902|      0|            return NULL;
26903|      0|        }
26904|       |
26905|  1.16k|        case RULE_POSITION: {
  ------------------
  |  Branch (26905:9): [True: 1.16k, False: 184k]
  ------------------
26906|  1.16k|            pushcap(s, janet_wrap_number((double)(text - s->text_start)), rule[1]);
  ------------------
  |  |  835|  1.16k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
26907|  1.16k|            return text;
26908|      0|        }
26909|       |
26910|      0|        case RULE_LINE: {
  ------------------
  |  Branch (26910:9): [True: 0, False: 185k]
  ------------------
26911|      0|            LineCol lc = get_linecol_from_position(s, (int32_t)(text - s->text_start));
26912|      0|            pushcap(s, janet_wrap_number((double)(lc.line)), rule[1]);
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
26913|      0|            return text;
26914|      0|        }
26915|       |
26916|      0|        case RULE_COLUMN: {
  ------------------
  |  Branch (26916:9): [True: 0, False: 185k]
  ------------------
26917|      0|            LineCol lc = get_linecol_from_position(s, (int32_t)(text - s->text_start));
26918|      0|            pushcap(s, janet_wrap_number((double)(lc.col)), rule[1]);
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
26919|      0|            return text;
26920|      0|        }
26921|       |
26922|      0|        case RULE_ARGUMENT: {
  ------------------
  |  Branch (26922:9): [True: 0, False: 185k]
  ------------------
26923|      0|            int32_t index = ((int32_t *)rule)[1];
26924|      0|            Janet capture = (index >= s->extrac) ? janet_wrap_nil() : s->extrav[index];
  ------------------
  |  |  831|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (26924:29): [True: 0, False: 0]
  ------------------
26925|      0|            pushcap(s, capture, rule[2]);
26926|      0|            return text;
26927|      0|        }
26928|       |
26929|      0|        case RULE_CONSTANT: {
  ------------------
  |  Branch (26929:9): [True: 0, False: 185k]
  ------------------
26930|      0|            pushcap(s, s->constants[rule[1]], rule[2]);
26931|      0|            return text;
26932|      0|        }
26933|       |
26934|  6.60k|        case RULE_CAPTURE: {
  ------------------
  |  Branch (26934:9): [True: 6.60k, False: 178k]
  ------------------
26935|  6.60k|            down1(s);
  ------------------
  |  |26665|  6.60k|#define down1(s) do { \
  |  |26666|  6.60k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 6.60k]
  |  |  ------------------
  |  |26667|  6.60k|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 6.60k]
  |  |  ------------------
  ------------------
26936|  6.60k|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
26937|  6.60k|            up1(s);
  ------------------
  |  |26668|  6.60k|#define up1(s) ((s)->depth++)
  ------------------
26938|  6.60k|            if (!result) return NULL;
  ------------------
  |  Branch (26938:17): [True: 5.18k, False: 1.41k]
  ------------------
26939|       |            /* Specialized pushcap - avoid intermediate string creation */
26940|  1.41k|            if (!s->has_backref && s->mode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (26940:17): [True: 1.41k, False: 0]
  |  Branch (26940:36): [True: 1, False: 1.41k]
  ------------------
26941|      1|                janet_buffer_push_bytes(s->scratch, text, (int32_t)(result - text));
26942|  1.41k|            } else {
26943|  1.41k|                uint32_t tag = rule[2];
26944|  1.41k|                pushcap(s, janet_stringv(text, (int32_t)(result - text)), tag);
  ------------------
  |  | 1826|  1.41k|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|  1.41k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  1.41k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.41k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.41k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26945|  1.41k|            }
26946|  1.41k|            return result;
26947|  6.60k|        }
26948|       |
26949|      0|        case RULE_CAPTURE_NUM: {
  ------------------
  |  Branch (26949:9): [True: 0, False: 185k]
  ------------------
26950|      0|            down1(s);
  ------------------
  |  |26665|      0|#define down1(s) do { \
  |  |26666|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26667|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
26951|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
26952|      0|            up1(s);
  ------------------
  |  |26668|      0|#define up1(s) ((s)->depth++)
  ------------------
26953|      0|            if (!result) return NULL;
  ------------------
  |  Branch (26953:17): [True: 0, False: 0]
  ------------------
26954|       |            /* check number parsing */
26955|      0|            double x = 0.0;
26956|      0|            int32_t base = (int32_t) rule[2];
26957|      0|            if (janet_scan_number_base(text, (int32_t)(result - text), base, &x)) return NULL;
  ------------------
  |  Branch (26957:17): [True: 0, False: 0]
  ------------------
26958|       |            /* Specialized pushcap - avoid intermediate string creation */
26959|      0|            if (!s->has_backref && s->mode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (26959:17): [True: 0, False: 0]
  |  Branch (26959:36): [True: 0, False: 0]
  ------------------
26960|      0|                janet_buffer_push_bytes(s->scratch, text, (int32_t)(result - text));
26961|      0|            } else {
26962|      0|                uint32_t tag = rule[3];
26963|      0|                pushcap(s, janet_wrap_number(x), tag);
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
26964|      0|            }
26965|      0|            return result;
26966|      0|        }
26967|       |
26968|    101|        case RULE_ACCUMULATE: {
  ------------------
  |  Branch (26968:9): [True: 101, False: 185k]
  ------------------
26969|    101|            uint32_t tag = rule[2];
26970|    101|            int oldmode = s->mode;
26971|    101|            if (!tag && oldmode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (26971:17): [True: 101, False: 0]
  |  Branch (26971:25): [True: 0, False: 101]
  ------------------
26972|      0|                rule = s->bytecode + rule[1];
26973|      0|                goto tail;
26974|      0|            }
26975|    101|            CapState cs = cap_save(s);
26976|    101|            s->mode = PEG_MODE_ACCUMULATE;
26977|    101|            down1(s);
  ------------------
  |  |26665|    101|#define down1(s) do { \
  |  |26666|    101|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 101]
  |  |  ------------------
  |  |26667|    101|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 101]
  |  |  ------------------
  ------------------
26978|    101|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
26979|    101|            up1(s);
  ------------------
  |  |26668|    101|#define up1(s) ((s)->depth++)
  ------------------
26980|    101|            s->mode = oldmode;
26981|    101|            if (!result) return NULL;
  ------------------
  |  Branch (26981:17): [True: 97, False: 4]
  ------------------
26982|      4|            Janet cap = janet_stringv(s->scratch->data + cs.scratch,
  ------------------
  |  | 1826|      4|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  848|      4|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26983|      4|                                      s->scratch->count - cs.scratch);
26984|      4|            cap_load_keept(s, cs);
26985|      4|            pushcap(s, cap, tag);
26986|      4|            return result;
26987|    101|        }
26988|       |
26989|      0|        case RULE_DROP: {
  ------------------
  |  Branch (26989:9): [True: 0, False: 185k]
  ------------------
26990|      0|            CapState cs = cap_save(s);
26991|      0|            down1(s);
  ------------------
  |  |26665|      0|#define down1(s) do { \
  |  |26666|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26667|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
26992|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
26993|      0|            up1(s);
  ------------------
  |  |26668|      0|#define up1(s) ((s)->depth++)
  ------------------
26994|      0|            if (!result) return NULL;
  ------------------
  |  Branch (26994:17): [True: 0, False: 0]
  ------------------
26995|      0|            cap_load(s, cs);
26996|      0|            return result;
26997|      0|        }
26998|       |
26999|      0|        case RULE_ONLY_TAGS: {
  ------------------
  |  Branch (26999:9): [True: 0, False: 185k]
  ------------------
27000|      0|            CapState cs = cap_save(s);
27001|      0|            down1(s);
  ------------------
  |  |26665|      0|#define down1(s) do { \
  |  |26666|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26667|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27002|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
27003|      0|            up1(s);
  ------------------
  |  |26668|      0|#define up1(s) ((s)->depth++)
  ------------------
27004|      0|            if (!result) return NULL;
  ------------------
  |  Branch (27004:17): [True: 0, False: 0]
  ------------------
27005|      0|            cap_load_keept(s, cs);
27006|      0|            return result;
27007|      0|        }
27008|       |
27009|      0|        case RULE_GROUP: {
  ------------------
  |  Branch (27009:9): [True: 0, False: 185k]
  ------------------
27010|      0|            uint32_t tag = rule[2];
27011|      0|            int oldmode = s->mode;
27012|      0|            CapState cs = cap_save(s);
27013|      0|            s->mode = PEG_MODE_NORMAL;
27014|      0|            down1(s);
  ------------------
  |  |26665|      0|#define down1(s) do { \
  |  |26666|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26667|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27015|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
27016|      0|            up1(s);
  ------------------
  |  |26668|      0|#define up1(s) ((s)->depth++)
  ------------------
27017|      0|            s->mode = oldmode;
27018|      0|            if (!result) return NULL;
  ------------------
  |  Branch (27018:17): [True: 0, False: 0]
  ------------------
27019|      0|            int32_t num_sub_captures = s->captures->count - cs.cap;
27020|      0|            JanetArray *sub_captures = janet_array(num_sub_captures);
27021|      0|            safe_memcpy(sub_captures->data,
27022|      0|                        s->captures->data + cs.cap,
27023|      0|                        sizeof(Janet) * num_sub_captures);
27024|      0|            sub_captures->count = num_sub_captures;
27025|      0|            cap_load_keept(s, cs);
27026|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27027|      0|            return result;
27028|      0|        }
27029|       |
27030|      0|        case RULE_NTH: {
  ------------------
  |  Branch (27030:9): [True: 0, False: 185k]
  ------------------
27031|      0|            uint32_t nth = rule[1];
27032|      0|            if (nth > INT32_MAX) nth = INT32_MAX;
  ------------------
  |  Branch (27032:17): [True: 0, False: 0]
  ------------------
27033|      0|            uint32_t tag = rule[3];
27034|      0|            int oldmode = s->mode;
27035|      0|            CapState cs = cap_save(s);
27036|      0|            s->mode = PEG_MODE_NORMAL;
27037|      0|            down1(s);
  ------------------
  |  |26665|      0|#define down1(s) do { \
  |  |26666|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26667|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27038|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[2], text);
27039|      0|            up1(s);
  ------------------
  |  |26668|      0|#define up1(s) ((s)->depth++)
  ------------------
27040|      0|            s->mode = oldmode;
27041|      0|            if (!result) return NULL;
  ------------------
  |  Branch (27041:17): [True: 0, False: 0]
  ------------------
27042|      0|            int32_t num_sub_captures = s->captures->count - cs.cap;
27043|      0|            Janet cap;
27044|      0|            if (num_sub_captures > (int32_t) nth) {
  ------------------
  |  Branch (27044:17): [True: 0, False: 0]
  ------------------
27045|      0|                cap = s->captures->data[cs.cap + nth];
27046|      0|            } else {
27047|      0|                return NULL;
27048|      0|            }
27049|      0|            cap_load_keept(s, cs);
27050|      0|            pushcap(s, cap, tag);
27051|      0|            return result;
27052|      0|        }
27053|       |
27054|      0|        case RULE_SUB: {
  ------------------
  |  Branch (27054:9): [True: 0, False: 185k]
  ------------------
27055|      0|            const uint8_t *text_start = text;
27056|      0|            const uint32_t *rule_window = s->bytecode + rule[1];
27057|      0|            const uint32_t *rule_subpattern = s->bytecode + rule[2];
27058|      0|            down1(s);
  ------------------
  |  |26665|      0|#define down1(s) do { \
  |  |26666|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26667|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27059|      0|            const uint8_t *window_end = peg_rule(s, rule_window, text);
27060|      0|            up1(s);
  ------------------
  |  |26668|      0|#define up1(s) ((s)->depth++)
  ------------------
27061|      0|            if (!window_end) {
  ------------------
  |  Branch (27061:17): [True: 0, False: 0]
  ------------------
27062|      0|                return NULL;
27063|      0|            }
27064|      0|            const uint8_t *saved_end = s->text_end;
27065|      0|            s->text_end = window_end;
27066|      0|            down1(s);
  ------------------
  |  |26665|      0|#define down1(s) do { \
  |  |26666|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26667|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27067|      0|            const uint8_t *next_text = peg_rule(s, rule_subpattern, text_start);
27068|      0|            up1(s);
  ------------------
  |  |26668|      0|#define up1(s) ((s)->depth++)
  ------------------
27069|      0|            s->text_end = saved_end;
27070|       |
27071|      0|            if (!next_text) {
  ------------------
  |  Branch (27071:17): [True: 0, False: 0]
  ------------------
27072|      0|                return NULL;
27073|      0|            }
27074|       |
27075|      0|            return window_end;
27076|      0|        }
27077|       |
27078|      0|        case RULE_TIL: {
  ------------------
  |  Branch (27078:9): [True: 0, False: 185k]
  ------------------
27079|      0|            const uint32_t *rule_terminus = s->bytecode + rule[1];
27080|      0|            const uint32_t *rule_subpattern = s->bytecode + rule[2];
27081|       |
27082|      0|            const uint8_t *terminus_start = text;
27083|      0|            const uint8_t *terminus_end = NULL;
27084|      0|            down1(s);
  ------------------
  |  |26665|      0|#define down1(s) do { \
  |  |26666|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26667|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27085|      0|            while (terminus_start <= s->text_end) {
  ------------------
  |  Branch (27085:20): [True: 0, False: 0]
  ------------------
27086|      0|                CapState cs2 = cap_save(s);
27087|      0|                terminus_end = peg_rule(s, rule_terminus, terminus_start);
27088|      0|                cap_load(s, cs2);
27089|      0|                if (terminus_end) {
  ------------------
  |  Branch (27089:21): [True: 0, False: 0]
  ------------------
27090|      0|                    break;
27091|      0|                }
27092|      0|                terminus_start++;
27093|      0|            }
27094|      0|            up1(s);
  ------------------
  |  |26668|      0|#define up1(s) ((s)->depth++)
  ------------------
27095|       |
27096|      0|            if (!terminus_end) {
  ------------------
  |  Branch (27096:17): [True: 0, False: 0]
  ------------------
27097|      0|                return NULL;
27098|      0|            }
27099|       |
27100|      0|            const uint8_t *saved_end = s->text_end;
27101|      0|            s->text_end = terminus_start;
27102|      0|            down1(s);
  ------------------
  |  |26665|      0|#define down1(s) do { \
  |  |26666|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26667|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27103|      0|            const uint8_t *matched = peg_rule(s, rule_subpattern, text);
27104|      0|            up1(s);
  ------------------
  |  |26668|      0|#define up1(s) ((s)->depth++)
  ------------------
27105|      0|            s->text_end = saved_end;
27106|       |
27107|      0|            if (!matched) {
  ------------------
  |  Branch (27107:17): [True: 0, False: 0]
  ------------------
27108|      0|                return NULL;
27109|      0|            }
27110|       |
27111|      0|            return terminus_end;
27112|      0|        }
27113|       |
27114|      0|        case RULE_SPLIT: {
  ------------------
  |  Branch (27114:9): [True: 0, False: 185k]
  ------------------
27115|      0|            const uint8_t *saved_end = s->text_end;
27116|      0|            const uint32_t *rule_separator = s->bytecode + rule[1];
27117|      0|            const uint32_t *rule_subpattern = s->bytecode + rule[2];
27118|       |
27119|      0|            const uint8_t *chunk_start = text;
27120|      0|            const uint8_t *chunk_end = NULL;
27121|       |
27122|      0|            while (text <= saved_end) {
  ------------------
  |  Branch (27122:20): [True: 0, False: 0]
  ------------------
27123|       |                /* Find next split (or end of text) */
27124|      0|                CapState cs = cap_save(s);
27125|      0|                down1(s);
  ------------------
  |  |26665|      0|#define down1(s) do { \
  |  |26666|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26667|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27126|      0|                while (text <= saved_end) {
  ------------------
  |  Branch (27126:24): [True: 0, False: 0]
  ------------------
27127|      0|                    chunk_end = text;
27128|      0|                    const uint8_t *check = peg_rule(s, rule_separator, text);
27129|      0|                    cap_load(s, cs);
27130|      0|                    if (check) {
  ------------------
  |  Branch (27130:25): [True: 0, False: 0]
  ------------------
27131|      0|                        text = check;
27132|      0|                        break;
27133|      0|                    }
27134|      0|                    text++;
27135|      0|                }
27136|      0|                up1(s);
  ------------------
  |  |26668|      0|#define up1(s) ((s)->depth++)
  ------------------
27137|       |
27138|       |                /* Match between splits */
27139|      0|                s->text_end = chunk_end;
27140|      0|                down1(s);
  ------------------
  |  |26665|      0|#define down1(s) do { \
  |  |26666|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26667|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27141|      0|                const uint8_t *subpattern_end = peg_rule(s, rule_subpattern, chunk_start);
27142|      0|                up1(s);
  ------------------
  |  |26668|      0|#define up1(s) ((s)->depth++)
  ------------------
27143|      0|                s->text_end = saved_end;
27144|      0|                if (!subpattern_end) return NULL; /* Don't match anything */
  ------------------
  |  Branch (27144:21): [True: 0, False: 0]
  ------------------
27145|       |
27146|       |                /* Ensure forward progress */
27147|      0|                if (text == chunk_start) return NULL;
  ------------------
  |  Branch (27147:21): [True: 0, False: 0]
  ------------------
27148|      0|                chunk_start = text;
27149|      0|            }
27150|       |
27151|      0|            s->text_end = saved_end;
27152|      0|            return s->text_end;
27153|      0|        }
27154|       |
27155|    553|        case RULE_REPLACE:
  ------------------
  |  Branch (27155:9): [True: 553, False: 184k]
  ------------------
27156|    553|        case RULE_MATCHSPLICE:
  ------------------
  |  Branch (27156:9): [True: 0, False: 185k]
  ------------------
27157|    553|        case RULE_MATCHTIME: {
  ------------------
  |  Branch (27157:9): [True: 0, False: 185k]
  ------------------
27158|    553|            uint32_t tag = rule[3];
27159|    553|            int oldmode = s->mode;
27160|    553|            CapState cs = cap_save(s);
27161|    553|            s->mode = PEG_MODE_NORMAL;
27162|    553|            down1(s);
  ------------------
  |  |26665|    553|#define down1(s) do { \
  |  |26666|    553|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 553]
  |  |  ------------------
  |  |26667|    553|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 553]
  |  |  ------------------
  ------------------
27163|    553|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
27164|    553|            up1(s);
  ------------------
  |  |26668|    553|#define up1(s) ((s)->depth++)
  ------------------
27165|    553|            s->mode = oldmode;
27166|    553|            if (!result) return NULL;
  ------------------
  |  Branch (27166:17): [True: 548, False: 5]
  ------------------
27167|       |
27168|      5|            Janet cap = janet_wrap_nil();
  ------------------
  |  |  831|      5|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      5|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      5|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      5|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27169|      5|            Janet constant = s->constants[rule[2]];
27170|      5|            switch (janet_type(constant)) {
  ------------------
  |  |  795|      5|    (isnan((x).number) \
  |  |  796|      5|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|      5|        : JANET_NUMBER)
  ------------------
  |  Branch (27170:21): [True: 5, False: 0]
  ------------------
27171|      5|                default:
  ------------------
  |  Branch (27171:17): [True: 5, False: 0]
  ------------------
27172|      5|                    cap = constant;
27173|      5|                    break;
27174|      0|                case JANET_STRUCT:
  ------------------
  |  Branch (27174:17): [True: 0, False: 5]
  ------------------
27175|      0|                    if (s->captures->count) {
  ------------------
  |  Branch (27175:25): [True: 0, False: 0]
  ------------------
27176|      0|                        cap = janet_struct_get(janet_unwrap_struct(constant),
  ------------------
  |  |  857|      0|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
27177|      0|                                               s->captures->data[s->captures->count - 1]);
27178|      0|                    }
27179|      0|                    break;
27180|      0|                case JANET_TABLE:
  ------------------
  |  Branch (27180:17): [True: 0, False: 5]
  ------------------
27181|      0|                    if (s->captures->count) {
  ------------------
  |  Branch (27181:25): [True: 0, False: 0]
  ------------------
27182|      0|                        cap = janet_table_get(janet_unwrap_table(constant),
  ------------------
  |  |  861|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
27183|      0|                                              s->captures->data[s->captures->count - 1]);
27184|      0|                    }
27185|      0|                    break;
27186|      0|                case JANET_CFUNCTION:
  ------------------
  |  Branch (27186:17): [True: 0, False: 5]
  ------------------
27187|      0|                    cap = janet_unwrap_cfunction(constant)(s->captures->count - cs.cap,
  ------------------
  |  |  869|      0|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
27188|      0|                                                           s->captures->data + cs.cap);
27189|      0|                    break;
27190|      0|                case JANET_FUNCTION:
  ------------------
  |  Branch (27190:17): [True: 0, False: 5]
  ------------------
27191|      0|                    cap = janet_call(janet_unwrap_function(constant),
  ------------------
  |  |  868|      0|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
27192|      0|                                     s->captures->count - cs.cap,
27193|      0|                                     s->captures->data + cs.cap);
27194|      0|                    break;
27195|      5|            }
27196|      5|            cap_load_keept(s, cs);
27197|      5|            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 (27197:17): [True: 0, False: 5]
  ------------------
27198|      5|            const Janet *elements = NULL;
27199|      5|            int32_t len = 0;
27200|      5|            if ((rule[0] == RULE_MATCHSPLICE) && janet_indexed_view(cap, &elements, &len)) {
  ------------------
  |  Branch (27200:17): [True: 0, False: 5]
  |  Branch (27200:50): [True: 0, False: 0]
  ------------------
27201|       |                /* unpack and flatten capture */
27202|      0|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (27202:37): [True: 0, False: 0]
  ------------------
27203|      0|                    pushcap(s, elements[i], tag);
27204|      0|                }
27205|      5|            } else {
27206|      5|                pushcap(s, cap, tag);
27207|      5|            }
27208|      5|            return result;
27209|      5|        }
27210|       |
27211|      0|        case RULE_ERROR: {
  ------------------
  |  Branch (27211:9): [True: 0, False: 185k]
  ------------------
27212|      0|            int oldmode = s->mode;
27213|      0|            s->mode = PEG_MODE_NORMAL;
27214|      0|            int32_t old_cap = s->captures->count;
27215|      0|            down1(s);
  ------------------
  |  |26665|      0|#define down1(s) do { \
  |  |26666|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26667|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27216|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
27217|      0|            up1(s);
  ------------------
  |  |26668|      0|#define up1(s) ((s)->depth++)
  ------------------
27218|      0|            s->mode = oldmode;
27219|      0|            if (!result) return NULL;
  ------------------
  |  Branch (27219:17): [True: 0, False: 0]
  ------------------
27220|      0|            if (s->captures->count > old_cap) {
  ------------------
  |  Branch (27220:17): [True: 0, False: 0]
  ------------------
27221|       |                /* Throw last capture */
27222|      0|                janet_panicv(s->captures->data[s->captures->count - 1]);
27223|      0|            } else {
27224|       |                /* Throw generic error */
27225|      0|                int32_t start = (int32_t)(text - s->text_start);
27226|      0|                LineCol lc = get_linecol_from_position(s, start);
27227|      0|                janet_panicf("match error at line %d, column %d", lc.line, lc.col);
27228|      0|            }
27229|      0|            return NULL;
27230|      0|        }
27231|       |
27232|      0|        case RULE_BACKMATCH: {
  ------------------
  |  Branch (27232:9): [True: 0, False: 185k]
  ------------------
27233|      0|            uint32_t search = rule[1];
27234|      0|            for (int32_t i = s->tags->count - 1; i >= 0; i--) {
  ------------------
  |  Branch (27234:50): [True: 0, False: 0]
  ------------------
27235|      0|                if (s->tags->data[i] == search) {
  ------------------
  |  Branch (27235:21): [True: 0, False: 0]
  ------------------
27236|      0|                    Janet capture = s->tagged_captures->data[i];
27237|      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 (27237:25): [True: 0, False: 0]
  ------------------
27238|      0|                        return NULL;
27239|      0|                    const uint8_t *bytes = janet_unwrap_string(capture);
  ------------------
  |  |  863|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
27240|      0|                    int32_t len = janet_string_length(bytes);
  ------------------
  |  | 1812|      0|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|      0|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
27241|      0|                    if (text + len > s->text_end)
  ------------------
  |  Branch (27241:25): [True: 0, False: 0]
  ------------------
27242|      0|                        return NULL;
27243|      0|                    return memcmp(text, bytes, len) ? NULL : text + len;
  ------------------
  |  Branch (27243:28): [True: 0, False: 0]
  ------------------
27244|      0|                }
27245|      0|            }
27246|      0|            return NULL;
27247|      0|        }
27248|       |
27249|      0|        case RULE_LENPREFIX: {
  ------------------
  |  Branch (27249:9): [True: 0, False: 185k]
  ------------------
27250|      0|            int oldmode = s->mode;
27251|      0|            s->mode = PEG_MODE_NORMAL;
27252|      0|            const uint8_t *next_text;
27253|      0|            CapState cs = cap_save(s);
27254|      0|            down1(s);
  ------------------
  |  |26665|      0|#define down1(s) do { \
  |  |26666|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26667|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27255|      0|            next_text = peg_rule(s, s->bytecode + rule[1], text);
27256|      0|            up1(s);
  ------------------
  |  |26668|      0|#define up1(s) ((s)->depth++)
  ------------------
27257|      0|            if (NULL == next_text) return NULL;
  ------------------
  |  Branch (27257:17): [True: 0, False: 0]
  ------------------
27258|      0|            s->mode = oldmode;
27259|      0|            int32_t num_sub_captures = s->captures->count - cs.cap;
27260|      0|            Janet lencap;
27261|      0|            if (num_sub_captures <= 0 ||
  ------------------
  |  Branch (27261:17): [True: 0, False: 0]
  ------------------
27262|      0|                    (lencap = s->captures->data[cs.cap], !janet_checkint(lencap))) {
  ------------------
  |  Branch (27262:21): [True: 0, False: 0]
  ------------------
27263|      0|                cap_load(s, cs);
27264|      0|                return NULL;
27265|      0|            }
27266|      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)
  |  |  ------------------
  ------------------
27267|       |            /* drop captures from len pattern */
27268|      0|            cap_load(s, cs);
27269|      0|            for (int32_t i = 0; i < nrep; i++) {
  ------------------
  |  Branch (27269:33): [True: 0, False: 0]
  ------------------
27270|      0|                down1(s);
  ------------------
  |  |26665|      0|#define down1(s) do { \
  |  |26666|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26667|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27271|      0|                next_text = peg_rule(s, s->bytecode + rule[2], next_text);
27272|      0|                up1(s);
  ------------------
  |  |26668|      0|#define up1(s) ((s)->depth++)
  ------------------
27273|      0|                if (NULL == next_text) {
  ------------------
  |  Branch (27273:21): [True: 0, False: 0]
  ------------------
27274|      0|                    cap_load(s, cs);
27275|      0|                    return NULL;
27276|      0|                }
27277|      0|            }
27278|      0|            return next_text;
27279|      0|        }
27280|       |
27281|      0|        case RULE_READINT: {
  ------------------
  |  Branch (27281:9): [True: 0, False: 185k]
  ------------------
27282|      0|            uint32_t tag = rule[2];
27283|      0|            uint32_t signedness = rule[1] & 0x10;
27284|      0|            uint32_t endianness = rule[1] & 0x20;
27285|      0|            int width = (int)(rule[1] & 0xF);
27286|      0|            if (text + width > s->text_end) return NULL;
  ------------------
  |  Branch (27286:17): [True: 0, False: 0]
  ------------------
27287|      0|            uint64_t accum = 0;
27288|      0|            if (endianness) {
  ------------------
  |  Branch (27288:17): [True: 0, False: 0]
  ------------------
27289|       |                /* BE */
27290|      0|                for (int i = 0; i < width; i++) accum = (accum << 8) | text[i];
  ------------------
  |  Branch (27290:33): [True: 0, False: 0]
  ------------------
27291|      0|            } else {
27292|       |                /* LE */
27293|      0|                for (int i = width - 1; i >= 0; i--) accum = (accum << 8) | text[i];
  ------------------
  |  Branch (27293:41): [True: 0, False: 0]
  ------------------
27294|      0|            }
27295|       |
27296|      0|            Janet capture_value;
27297|       |            /* We can only parse integeres of greater than 6 bytes reliable if int-types are enabled.
27298|       |             * Otherwise, we may lose precision, so 6 is the maximum size when int-types are disabled. */
27299|      0|#ifdef JANET_INT_TYPES
27300|      0|            if (width > 6) {
  ------------------
  |  Branch (27300:17): [True: 0, False: 0]
  ------------------
27301|      0|                if (signedness) {
  ------------------
  |  Branch (27301:21): [True: 0, False: 0]
  ------------------
27302|      0|                    capture_value = janet_wrap_s64(peg_convert_u64_s64(accum, width));
27303|      0|                } else {
27304|      0|                    capture_value = janet_wrap_u64(accum);
27305|      0|                }
27306|      0|            } else
27307|      0|#endif
27308|      0|            {
27309|      0|                double double_value;
27310|      0|                if (signedness) {
  ------------------
  |  Branch (27310:21): [True: 0, False: 0]
  ------------------
27311|      0|                    double_value = (double)(peg_convert_u64_s64(accum, width));
27312|      0|                } else {
27313|      0|                    double_value = (double)accum;
27314|      0|                }
27315|      0|                capture_value = janet_wrap_number(double_value);
  ------------------
  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
27316|      0|            }
27317|       |
27318|      0|            pushcap(s, capture_value, tag);
27319|      0|            return text + width;
27320|      0|        }
27321|       |
27322|      0|        case RULE_UNREF: {
  ------------------
  |  Branch (27322:9): [True: 0, False: 185k]
  ------------------
27323|      0|            int32_t tcap = s->tags->count;
27324|      0|            down1(s);
  ------------------
  |  |26665|      0|#define down1(s) do { \
  |  |26666|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26666:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26667|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26667:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27325|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
27326|      0|            up1(s);
  ------------------
  |  |26668|      0|#define up1(s) ((s)->depth++)
  ------------------
27327|      0|            if (!result) return NULL;
  ------------------
  |  Branch (27327:17): [True: 0, False: 0]
  ------------------
27328|      0|            int32_t final_tcap = s->tags->count;
27329|       |            /* Truncate tagged captures to not include items of the given tag */
27330|      0|            int32_t w = tcap;
27331|       |            /* If no tag is given, drop ALL tagged captures */
27332|      0|            if (rule[2]) {
  ------------------
  |  Branch (27332:17): [True: 0, False: 0]
  ------------------
27333|      0|                for (int32_t i = tcap; i < final_tcap; i++) {
  ------------------
  |  Branch (27333:40): [True: 0, False: 0]
  ------------------
27334|      0|                    if (s->tags->data[i] != (0xFF & rule[2])) {
  ------------------
  |  Branch (27334:25): [True: 0, False: 0]
  ------------------
27335|      0|                        s->tags->data[w] = s->tags->data[i];
27336|      0|                        s->tagged_captures->data[w] = s->tagged_captures->data[i];
27337|      0|                        w++;
27338|      0|                    }
27339|      0|                }
27340|      0|            }
27341|      0|            s->tags->count = w;
27342|      0|            s->tagged_captures->count = w;
27343|      0|            return result;
27344|      0|        }
27345|       |
27346|   185k|    }
27347|   185k|}
janet.c:cap_save:
26570|   149k|static CapState cap_save(PegState *s) {
26571|   149k|    CapState cs;
26572|   149k|    cs.scratch = s->scratch->count;
26573|   149k|    cs.cap = s->captures->count;
26574|   149k|    cs.tcap = s->tagged_captures->count;
26575|   149k|    return cs;
26576|   149k|}
janet.c:cap_load:
26579|  11.6k|static void cap_load(PegState *s, CapState cs) {
26580|  11.6k|    s->scratch->count = cs.scratch;
26581|  11.6k|    s->captures->count = cs.cap;
26582|  11.6k|    s->tags->count = cs.tcap;
26583|  11.6k|    s->tagged_captures->count = cs.tcap;
26584|  11.6k|}
janet.c:pushcap:
26594|  2.58k|static void pushcap(PegState *s, Janet capture, uint32_t tag) {
26595|  2.58k|    if (s->mode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (26595:9): [True: 0, False: 2.58k]
  ------------------
26596|      0|        janet_to_string_b(s->scratch, capture);
26597|      0|    }
26598|  2.58k|    if (s->mode == PEG_MODE_NORMAL) {
  ------------------
  |  Branch (26598:9): [True: 2.58k, False: 0]
  ------------------
26599|  2.58k|        janet_array_push(s->captures, capture);
26600|  2.58k|    }
26601|  2.58k|    if (s->has_backref) {
  ------------------
  |  Branch (26601:9): [True: 0, False: 2.58k]
  ------------------
26602|      0|        janet_array_push(s->tagged_captures, capture);
26603|      0|        janet_buffer_push_u8(s->tags, tag);
26604|      0|    }
26605|  2.58k|}
janet.c:cap_load_keept:
26588|      9|static void cap_load_keept(PegState *s, CapState cs) {
26589|      9|    s->scratch->count = cs.scratch;
26590|      9|    s->captures->count = cs.cap;
26591|      9|}
janet.c:peg_call_reset:
28479|  16.2k|static void peg_call_reset(PegCall *c) {
28480|  16.2k|    c->s.depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  296|  16.2k|#define JANET_RECURSION_GUARD 1024
  ------------------
28481|  16.2k|    c->s.captures->count = 0;
28482|  16.2k|    c->s.tagged_captures->count = 0;
28483|  16.2k|    c->s.scratch->count = 0;
28484|  16.2k|    c->s.tags->count = 0;
28485|  16.2k|}
janet.c:cfun_peg_replace_generic:
28521|    446|static Janet cfun_peg_replace_generic(int32_t argc, Janet *argv, int only_one) {
28522|    446|    PegCall c = peg_cfun_init(argc, argv, 1);
28523|    446|    JanetBuffer *ret = janet_buffer(0);
28524|    446|    int32_t trail = 0;
28525|  12.3k|    for (int32_t i = c.start; i < c.bytes.len;) {
  ------------------
  |  Branch (28525:31): [True: 11.9k, False: 410]
  ------------------
28526|  11.9k|        peg_call_reset(&c);
28527|  11.9k|        const uint8_t *result = peg_rule(&c.s, c.s.bytecode, c.bytes.bytes + i);
28528|  11.9k|        if (NULL != result) {
  ------------------
  |  Branch (28528:13): [True: 439, False: 11.5k]
  ------------------
28529|    439|            if (trail < i) {
  ------------------
  |  Branch (28529:17): [True: 271, False: 168]
  ------------------
28530|    271|                janet_buffer_push_bytes(ret, c.bytes.bytes + trail, (i - trail));
28531|    271|                trail = i;
28532|    271|            }
28533|    439|            int32_t nexti = (int32_t)(result - c.bytes.bytes);
28534|    439|            JanetByteView subst = janet_text_substitution(&c.subst, c.bytes.bytes + i, nexti - i, c.s.captures);
28535|    439|            janet_buffer_push_bytes(ret, subst.bytes, subst.len);
28536|    439|            trail = nexti;
28537|    439|            if (nexti == i) nexti++;
  ------------------
  |  Branch (28537:17): [True: 258, False: 181]
  ------------------
28538|    439|            i = nexti;
28539|    439|            if (only_one) break;
  ------------------
  |  Branch (28539:17): [True: 36, False: 403]
  ------------------
28540|  11.5k|        } else {
28541|  11.5k|            i++;
28542|  11.5k|        }
28543|  11.9k|    }
28544|    446|    if (trail < c.bytes.len) {
  ------------------
  |  Branch (28544:9): [True: 220, False: 226]
  ------------------
28545|    220|        janet_buffer_push_bytes(ret, c.bytes.bytes + trail, (c.bytes.len - trail));
28546|    220|    }
28547|    446|    return janet_wrap_buffer(ret);
  ------------------
  |  |  847|    446|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|    446|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    446|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    446|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28548|    446|}
janet.c:number_to_string_b:
28656|   958k|static void number_to_string_b(JanetBuffer *buffer, double x) {
28657|   958k|    janet_buffer_ensure(buffer, buffer->count + BUFSIZE, 2);
  ------------------
  |  |28650|   958k|#define BUFSIZE 64
  ------------------
28658|   958k|    const char *fmt = (x == floor(x) &&
  ------------------
  |  Branch (28658:24): [True: 958k, False: 198]
  ------------------
28659|   958k|                       x <= JANET_INTMAX_DOUBLE &&
  ------------------
  |  |  165|  1.91M|#define JANET_INTMAX_DOUBLE 9007199254740992.0
  ------------------
  |  Branch (28659:24): [True: 958k, False: 173]
  ------------------
28660|   958k|                       x >= JANET_INTMIN_DOUBLE) ? "%.0f" : ("%." STR(DBL_DIG) "g");
  ------------------
  |  |  166|   958k|#define JANET_INTMIN_DOUBLE (-9007199254740992.0)
  ------------------
  |  Branch (28660:24): [True: 958k, False: 31]
  ------------------
28661|   958k|    int count;
28662|   958k|    if (x == 0.0) {
  ------------------
  |  Branch (28662:9): [True: 74.1k, False: 884k]
  ------------------
28663|       |        /* Prevent printing of '-0' */
28664|  74.1k|        count = 1;
28665|  74.1k|        buffer->data[buffer->count] = '0';
28666|   884k|    } else {
28667|   884k|        count = snprintf((char *) buffer->data + buffer->count, BUFSIZE, fmt, x);
  ------------------
  |  |28650|   884k|#define BUFSIZE 64
  ------------------
28668|   884k|    }
28669|   958k|    buffer->count += count;
28670|   958k|}
janet.c:string_description_b:
28716|  67.0k|static void string_description_b(JanetBuffer *buffer, const char *title, void *pointer) {
28717|  67.0k|    janet_buffer_ensure(buffer, buffer->count + BUFSIZE, 2);
  ------------------
  |  |28650|  67.0k|#define BUFSIZE 64
  ------------------
28718|  67.0k|    uint8_t *c = buffer->data + buffer->count;
28719|  67.0k|    int32_t i;
28720|  67.0k|    union {
28721|  67.0k|        uint8_t bytes[sizeof(void *)];
28722|  67.0k|        void *p;
28723|  67.0k|    } pbuf;
28724|       |
28725|  67.0k|    pbuf.p = pointer;
28726|  67.0k|    *c++ = '<';
28727|       |    /* Maximum of 32 bytes for abstract type name */
28728|   402k|    for (i = 0; i < 32 && title[i]; ++i)
  ------------------
  |  Branch (28728:17): [True: 402k, False: 0]
  |  Branch (28728:27): [True: 335k, False: 67.0k]
  ------------------
28729|   335k|        *c++ = ((uint8_t *)title) [i];
28730|  67.0k|    *c++ = ' ';
28731|  67.0k|    *c++ = '0';
28732|  67.0k|    *c++ = 'x';
28733|  67.0k|#if defined(JANET_64)
28734|  67.0k|#define POINTSIZE 6
28735|       |#else
28736|       |#define POINTSIZE (sizeof(void *))
28737|       |#endif
28738|   469k|    for (i = POINTSIZE; i > 0; --i) {
  ------------------
  |  |28734|  67.0k|#define POINTSIZE 6
  ------------------
  |  Branch (28738:25): [True: 402k, False: 67.0k]
  ------------------
28739|   402k|        uint8_t byte = pbuf.bytes[i - 1];
28740|   402k|        *c++ = HEX(byte >> 4);
  ------------------
  |  |28712|   402k|#define HEX(i) (((uint8_t *) janet_base64)[(i)])
  ------------------
28741|   402k|        *c++ = HEX(byte & 0xF);
  ------------------
  |  |28712|   402k|#define HEX(i) (((uint8_t *) janet_base64)[(i)])
  ------------------
28742|   402k|    }
28743|  67.0k|    *c++ = '>';
28744|  67.0k|    buffer->count = (int32_t)(c - buffer->data);
28745|  67.0k|#undef POINTSIZE
28746|  67.0k|}
janet.c:janet_escape_string_b:
28818|  7.32k|static void janet_escape_string_b(JanetBuffer *buffer, const uint8_t *str) {
28819|       |    janet_escape_string_impl(buffer, str, janet_string_length(str));
  ------------------
  |  | 1812|  7.32k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|  7.32k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
28820|  7.32k|}
janet.c:janet_escape_string_impl:
28748|  8.72k|static int janet_escape_string_impl(JanetBuffer *buffer, const uint8_t *str, int32_t len) {
28749|  8.72k|    janet_buffer_push_u8(buffer, '"');
28750|  8.72k|    int align = 1;
28751|  98.4k|    for (int32_t i = 0; i < len; ++i) {
  ------------------
  |  Branch (28751:25): [True: 89.7k, False: 8.72k]
  ------------------
28752|  89.7k|        uint8_t c = str[i];
28753|  89.7k|        switch (c) {
28754|    850|            case '"':
  ------------------
  |  Branch (28754:13): [True: 850, False: 88.8k]
  ------------------
28755|    850|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\\"", 2);
28756|    850|                align += 2;
28757|    850|                break;
28758|  1.28k|            case '\n':
  ------------------
  |  Branch (28758:13): [True: 1.28k, False: 88.4k]
  ------------------
28759|  1.28k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\n", 2);
28760|  1.28k|                align += 2;
28761|  1.28k|                break;
28762|    535|            case '\r':
  ------------------
  |  Branch (28762:13): [True: 535, False: 89.1k]
  ------------------
28763|    535|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\r", 2);
28764|    535|                align += 2;
28765|    535|                break;
28766|  14.8k|            case '\0':
  ------------------
  |  Branch (28766:13): [True: 14.8k, False: 74.8k]
  ------------------
28767|  14.8k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\0", 2);
28768|  14.8k|                align += 2;
28769|  14.8k|                break;
28770|  1.07k|            case '\f':
  ------------------
  |  Branch (28770:13): [True: 1.07k, False: 88.6k]
  ------------------
28771|  1.07k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\f", 2);
28772|  1.07k|                align += 2;
28773|  1.07k|                break;
28774|    331|            case '\v':
  ------------------
  |  Branch (28774:13): [True: 331, False: 89.3k]
  ------------------
28775|    331|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\v", 2);
28776|    331|                align += 2;
28777|    331|                break;
28778|    312|            case '\a':
  ------------------
  |  Branch (28778:13): [True: 312, False: 89.3k]
  ------------------
28779|    312|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\a", 2);
28780|    312|                align += 2;
28781|    312|                break;
28782|    318|            case '\b':
  ------------------
  |  Branch (28782:13): [True: 318, False: 89.3k]
  ------------------
28783|    318|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\b", 2);
28784|    318|                align += 2;
28785|    318|                break;
28786|    238|            case 27:
  ------------------
  |  Branch (28786:13): [True: 238, False: 89.4k]
  ------------------
28787|    238|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\e", 2);
28788|    238|                align += 2;
28789|    238|                break;
28790|  2.08k|            case '\\':
  ------------------
  |  Branch (28790:13): [True: 2.08k, False: 87.6k]
  ------------------
28791|  2.08k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\\\", 2);
28792|  2.08k|                align += 2;
28793|  2.08k|                break;
28794|    498|            case '\t':
  ------------------
  |  Branch (28794:13): [True: 498, False: 89.2k]
  ------------------
28795|    498|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\t", 2);
28796|    498|                align += 2;
28797|    498|                break;
28798|  67.3k|            default:
  ------------------
  |  Branch (28798:13): [True: 67.3k, False: 22.3k]
  ------------------
28799|  67.3k|                if (c < 32 || c > 126) {
  ------------------
  |  Branch (28799:21): [True: 1.65k, False: 65.6k]
  |  Branch (28799:31): [True: 8.43k, False: 57.2k]
  ------------------
28800|  10.0k|                    uint8_t buf[4];
28801|  10.0k|                    buf[0] = '\\';
28802|  10.0k|                    buf[1] = 'x';
28803|  10.0k|                    buf[2] = janet_base64[(c >> 4) & 0xF];
28804|  10.0k|                    buf[3] = janet_base64[c & 0xF];
28805|  10.0k|                    janet_buffer_push_bytes(buffer, buf, 4);
28806|  10.0k|                    align += 4;
28807|  57.2k|                } else {
28808|  57.2k|                    janet_buffer_push_u8(buffer, c);
28809|  57.2k|                    align++;
28810|  57.2k|                }
28811|  67.3k|                break;
28812|  89.7k|        }
28813|  89.7k|    }
28814|  8.72k|    janet_buffer_push_u8(buffer, '"');
28815|  8.72k|    return align + 1;
28816|  8.72k|}
janet.c:janet_escape_buffer_b:
28822|  1.40k|static void janet_escape_buffer_b(JanetBuffer *buffer, JanetBuffer *bx) {
28823|  1.40k|    if (bx == buffer) {
  ------------------
  |  Branch (28823:9): [True: 0, False: 1.40k]
  ------------------
28824|       |        /* Ensures buffer won't resize while escaping */
28825|      0|        janet_buffer_ensure(bx, bx->count + 5 * bx->count + 3, 1);
28826|      0|    }
28827|  1.40k|    janet_buffer_push_u8(buffer, '@');
28828|  1.40k|    janet_escape_string_impl(buffer, bx->data, bx->count);
28829|  1.40k|}
janet.c:janet_pretty_:
29414|  1.92k|                                  int flags, Janet x, int32_t startlen, int32_t lookback_barrier) {
29415|  1.92k|    struct pretty S;
29416|  1.92k|    if (NULL == buffer) {
  ------------------
  |  Branch (29416:9): [True: 0, False: 1.92k]
  ------------------
29417|      0|        buffer = janet_buffer(0);
29418|      0|    }
29419|  1.92k|    S.buffer = buffer;
29420|  1.92k|    S.depth = depth;
29421|  1.92k|    S.width = width;
29422|  1.92k|    S.align = 0;
29423|  1.92k|    S.flags = flags;
29424|  1.92k|    S.bufstartlen = startlen;
29425|  1.92k|    S.lookback_barrier = lookback_barrier;
29426|  1.92k|    S.keysort_capacity = 0;
29427|       |    S.keysort_buffer = NULL;
29428|  1.92k|    S.keysort_start = 0;
29429|  1.92k|    janet_table_init(&S.seen, 10);
29430|  1.92k|    janet_pretty_one(&S, x);
29431|  1.92k|    backtrack_newlines(&S);
29432|  1.92k|    janet_table_deinit(&S.seen);
29433|  1.92k|    return S.buffer;
29434|  1.92k|}
janet.c:janet_pretty_one:
29183|   644k|static void janet_pretty_one(struct pretty *S, Janet x) {
29184|       |    /* Add to seen */
29185|   644k|    switch (janet_type(x)) {
  ------------------
  |  |  795|   644k|    (isnan((x).number) \
  |  |  796|   644k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   644k|        : JANET_NUMBER)
  ------------------
  |  Branch (29185:13): [True: 643k, False: 635]
  ------------------
29186|      0|        case JANET_NIL:
  ------------------
  |  Branch (29186:9): [True: 0, False: 644k]
  ------------------
29187|    635|        case JANET_NUMBER:
  ------------------
  |  Branch (29187:9): [True: 635, False: 643k]
  ------------------
29188|   375k|        case JANET_SYMBOL:
  ------------------
  |  Branch (29188:9): [True: 375k, False: 268k]
  ------------------
29189|   375k|        case JANET_BOOLEAN:
  ------------------
  |  Branch (29189:9): [True: 13, False: 644k]
  ------------------
29190|   375k|            break;
29191|   268k|        default: {
  ------------------
  |  Branch (29191:9): [True: 268k, False: 375k]
  ------------------
29192|   268k|            Janet seenid = janet_table_get(&S->seen, x);
29193|   268k|            if (janet_checktype(seenid, JANET_NUMBER)) {
  ------------------
  |  |  806|   268k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 0, False: 268k]
  |  |  |  Branch (806:6): [True: 268k, Folded]
  |  |  ------------------
  |  |  807|   268k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|   268k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 268k]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 268k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   268k|        : 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29194|      0|                if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1966|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29194:21): [True: 0, False: 0]
  ------------------
29195|      0|                    janet_buffer_push_cstring(S->buffer, janet_cycle_color);
29196|      0|                }
29197|      0|                janet_buffer_push_cstring(S->buffer, "<cycle ");
29198|      0|                S->align += 8 + integer_to_string_b(S->buffer, janet_unwrap_integer(seenid));
  ------------------
  |  |  966|      0|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
29199|      0|                janet_buffer_push_u8(S->buffer, '>');
29200|      0|                if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1966|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29200:21): [True: 0, False: 0]
  ------------------
29201|      0|                    janet_buffer_push_cstring(S->buffer, "\x1B[0m");
29202|      0|                }
29203|      0|                return;
29204|   268k|            } else {
29205|   268k|                janet_table_put(&S->seen, x, janet_wrap_integer(S->seen.count));
  ------------------
  |  |  967|   268k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|   268k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
29206|   268k|                break;
29207|   268k|            }
29208|   268k|        }
29209|   644k|    }
29210|       |
29211|   644k|    switch (janet_type(x)) {
  ------------------
  |  |  795|   644k|    (isnan((x).number) \
  |  |  796|   644k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   644k|        : JANET_NUMBER)
  ------------------
  |  Branch (29211:13): [True: 643k, False: 635]
  ------------------
29212|   378k|        default: {
  ------------------
  |  Branch (29212:9): [True: 378k, False: 265k]
  ------------------
29213|   378k|            const char *color = janet_pretty_colors[janet_type(x)];
  ------------------
  |  |  795|   378k|    (isnan((x).number) \
  |  |  796|   378k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   378k|        : JANET_NUMBER)
  ------------------
  |  Branch (29213:53): [True: 378k, False: 635]
  ------------------
29214|   378k|            if (color && (S->flags & JANET_PRETTY_COLOR)) {
  ------------------
  |  | 1966|   378k|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29214:17): [True: 378k, False: 0]
  |  Branch (29214:26): [True: 579, False: 378k]
  ------------------
29215|    579|                janet_buffer_push_cstring(S->buffer, color);
29216|    579|            }
29217|   378k|            if (janet_checktype(x, JANET_BUFFER) && janet_unwrap_buffer(x) == S->buffer) {
  ------------------
  |  |  806|   757k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 110, False: 378k]
  |  |  |  Branch (806:6): [Folded, False: 378k]
  |  |  ------------------
  |  |  807|   757k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   757k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   378k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   378k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   378k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   378k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          if (janet_checktype(x, JANET_BUFFER) && janet_unwrap_buffer(x) == S->buffer) {
  ------------------
  |  |  862|    110|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (29217:53): [True: 0, False: 110]
  ------------------
29218|      0|                janet_buffer_ensure(S->buffer, S->buffer->count + S->bufstartlen * 4 + 3, 1);
29219|      0|                janet_buffer_push_u8(S->buffer, '@');
29220|       |                /* Use start len to print to self better */
29221|      0|                S->align += 1 + janet_escape_string_impl(S->buffer, S->buffer->data, S->bufstartlen);
29222|   378k|            } else {
29223|   378k|                S->align -= S->buffer->count;
29224|   378k|                janet_description_b(S->buffer, x);
29225|   378k|                S->align += S->buffer->count;
29226|   378k|            }
29227|   378k|            if (color && (S->flags & JANET_PRETTY_COLOR)) {
  ------------------
  |  | 1966|   378k|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29227:17): [True: 378k, False: 0]
  |  Branch (29227:26): [True: 579, False: 378k]
  ------------------
29228|    579|                janet_buffer_push_cstring(S->buffer, "\x1B[0m");
29229|    579|            }
29230|   378k|            break;
29231|      0|        }
29232|    140|        case JANET_ARRAY:
  ------------------
  |  Branch (29232:9): [True: 140, False: 644k]
  ------------------
29233|   262k|        case JANET_TUPLE: {
  ------------------
  |  Branch (29233:9): [True: 262k, False: 381k]
  ------------------
29234|   262k|            int32_t i = 0, len = 0;
29235|   262k|            const Janet *arr = NULL;
29236|   262k|            int isarray = janet_checktype(x, JANET_ARRAY);
  ------------------
  |  |  806|   262k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 262k]
  |  |  ------------------
  |  |  807|   262k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   262k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   262k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   262k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   262k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   262k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29237|   262k|            janet_indexed_view(x, &arr, &len);
29238|   262k|            int hasbrackets = !isarray && (janet_tuple_flag(arr) & JANET_TUPLE_FLAG_BRACKETCTOR);
  ------------------
  |  | 1805|   262k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1799|   262k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                          int hasbrackets = !isarray && (janet_tuple_flag(arr) & JANET_TUPLE_FLAG_BRACKETCTOR);
  ------------------
  |  | 1797|   262k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (29238:31): [True: 262k, False: 140]
  |  Branch (29238:43): [True: 129, False: 262k]
  ------------------
29239|   262k|            const char *startstr = isarray ? "@[" : hasbrackets ? "[" : "(";
  ------------------
  |  Branch (29239:36): [True: 140, False: 262k]
  |  Branch (29239:53): [True: 129, False: 262k]
  ------------------
29240|   262k|            const char endchar = isarray ? ']' : hasbrackets ? ']' : ')';
  ------------------
  |  Branch (29240:34): [True: 140, False: 262k]
  |  Branch (29240:50): [True: 129, False: 262k]
  ------------------
29241|   262k|            janet_buffer_push_cstring(S->buffer, startstr);
29242|   262k|            S->align += strlen(startstr);
29243|   262k|            const int align = S->leaf_align = S->align;
29244|   262k|            S->depth--;
29245|   262k|            if (S->depth == 0) {
  ------------------
  |  Branch (29245:17): [True: 44, False: 262k]
  ------------------
29246|     44|                janet_buffer_push_cstring(S->buffer, "...");
29247|     44|                S->align += 3;
29248|   262k|            } else {
29249|   262k|                if (len > JANET_PRETTY_ARRAY_LIMIT && !(S->flags & JANET_PRETTY_NOTRUNC)) {
  ------------------
  |  |29180|   524k|#define JANET_PRETTY_ARRAY_LIMIT 160
  ------------------
                              if (len > JANET_PRETTY_ARRAY_LIMIT && !(S->flags & JANET_PRETTY_NOTRUNC)) {
  ------------------
  |  | 1968|     29|#define JANET_PRETTY_NOTRUNC 4
  ------------------
  |  Branch (29249:21): [True: 29, False: 262k]
  |  Branch (29249:55): [True: 29, False: 0]
  ------------------
29250|    116|                    for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (29250:33): [True: 87, False: 29]
  ------------------
29251|     87|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (29251:29): [True: 58, False: 29]
  ------------------
29252|     87|                        janet_pretty_one(S, arr[i]);
29253|     87|                    }
29254|     29|                    print_newline(S, align);
29255|     29|                    janet_buffer_push_cstring(S->buffer, "...");
29256|     29|                    S->align += 3;
29257|    116|                    for (i = len - 3; i < len; i++) {
  ------------------
  |  Branch (29257:39): [True: 87, False: 29]
  ------------------
29258|     87|                        print_newline(S, align);
29259|     87|                        janet_pretty_one(S, arr[i]);
29260|     87|                    }
29261|   262k|                } else {
29262|   892k|                    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (29262:33): [True: 629k, False: 262k]
  ------------------
29263|   629k|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (29263:29): [True: 367k, False: 262k]
  ------------------
29264|   629k|                        janet_pretty_one(S, arr[i]);
29265|   629k|                    }
29266|   262k|                }
29267|   262k|            }
29268|   262k|            S->depth++;
29269|   262k|            janet_buffer_push_u8(S->buffer, endchar);
29270|   262k|            S->align++;
29271|   262k|            break;
29272|    140|        }
29273|  3.02k|        case JANET_STRUCT:
  ------------------
  |  Branch (29273:9): [True: 3.02k, False: 641k]
  ------------------
29274|  3.05k|        case JANET_TABLE: {
  ------------------
  |  Branch (29274:9): [True: 28, False: 644k]
  ------------------
29275|  3.05k|            int istable = janet_checktype(x, JANET_TABLE);
  ------------------
  |  |  806|  3.05k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 3.05k]
  |  |  ------------------
  |  |  807|  3.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|  3.05k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  3.05k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  3.05k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.05k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.05k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29276|       |
29277|       |            /* For object-like tables, print class name */
29278|  3.05k|            if (istable) {
  ------------------
  |  Branch (29278:17): [True: 28, False: 3.02k]
  ------------------
29279|     28|                JanetTable *t = janet_unwrap_table(x);
  ------------------
  |  |  861|     28|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
29280|     28|                JanetTable *proto = t->proto;
29281|     28|                S->align++;
29282|     28|                janet_buffer_push_cstring(S->buffer, "@");
29283|     28|                if (NULL != proto) {
  ------------------
  |  Branch (29283:21): [True: 1, False: 27]
  ------------------
29284|      1|                    Janet name = janet_table_get(proto, janet_ckeywordv("_name"));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29285|      1|                    const uint8_t *n;
29286|      1|                    int32_t len;
29287|      1|                    if (janet_bytes_view(name, &n, &len)) {
  ------------------
  |  Branch (29287:25): [True: 0, False: 1]
  ------------------
29288|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1966|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29288:29): [True: 0, False: 0]
  ------------------
29289|      0|                            janet_buffer_push_cstring(S->buffer, janet_class_color);
29290|      0|                        }
29291|      0|                        janet_buffer_push_bytes(S->buffer, n, len);
29292|      0|                        S->align += len;
29293|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1966|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29293:29): [True: 0, False: 0]
  ------------------
29294|      0|                            janet_buffer_push_cstring(S->buffer, "\x1B[0m");
29295|      0|                        }
29296|      0|                    }
29297|      1|                }
29298|  3.02k|            } else {
29299|  3.02k|                JanetStruct st = janet_unwrap_struct(x);
  ------------------
  |  |  857|  3.02k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
29300|  3.02k|                JanetStruct proto = janet_struct_proto(st);
  ------------------
  |  | 1850|  3.02k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1845|  3.02k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
29301|  3.02k|                if (NULL != proto) {
  ------------------
  |  Branch (29301:21): [True: 0, False: 3.02k]
  ------------------
29302|      0|                    Janet name = janet_struct_get(proto, janet_ckeywordv("_name"));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29303|      0|                    const uint8_t *n;
29304|      0|                    int32_t len;
29305|      0|                    if (janet_bytes_view(name, &n, &len)) {
  ------------------
  |  Branch (29305:25): [True: 0, False: 0]
  ------------------
29306|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1966|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29306:29): [True: 0, False: 0]
  ------------------
29307|      0|                            janet_buffer_push_cstring(S->buffer, janet_class_color);
29308|      0|                        }
29309|      0|                        janet_buffer_push_bytes(S->buffer, n, len);
29310|      0|                        S->align += len;
29311|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1966|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29311:29): [True: 0, False: 0]
  ------------------
29312|      0|                            janet_buffer_push_cstring(S->buffer, "\x1B[0m");
29313|      0|                        }
29314|      0|                    }
29315|      0|                }
29316|  3.02k|            }
29317|  3.05k|            janet_buffer_push_u8(S->buffer, '{');
29318|  3.05k|            const int align = S->leaf_align = ++S->align;
29319|       |
29320|  3.05k|            S->depth--;
29321|  3.05k|            if (S->depth == 0) {
  ------------------
  |  Branch (29321:17): [True: 0, False: 3.05k]
  ------------------
29322|      0|                janet_buffer_push_cstring(S->buffer, "...");
29323|      0|                S->align += 3;
29324|  3.05k|            } else {
29325|  3.05k|                int32_t len = 0, cap = 0;
29326|  3.05k|                const JanetKV *kvs = NULL;
29327|  3.05k|                janet_dictionary_view(x, &kvs, &len, &cap);
29328|  3.05k|                int32_t ks_start = S->keysort_start;
29329|  3.05k|                int truncated = 0;
29330|       |
29331|       |                /* Shortcut for huge dictionaries, don't bother sorting keys */
29332|  3.05k|                if (len > JANET_PRETTY_DICT_KEYSORT_LIMIT) {
  ------------------
  |  |29179|  3.05k|#define JANET_PRETTY_DICT_KEYSORT_LIMIT 2000
  ------------------
  |  Branch (29332:21): [True: 0, False: 3.05k]
  ------------------
29333|      0|                    if (!(S->flags & JANET_PRETTY_NOTRUNC)) {
  ------------------
  |  | 1968|      0|#define JANET_PRETTY_NOTRUNC 4
  ------------------
  |  Branch (29333:25): [True: 0, False: 0]
  ------------------
29334|      0|                        len = JANET_PRETTY_DICT_LIMIT;
  ------------------
  |  |29178|      0|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
29335|      0|                        truncated = 1;
29336|      0|                    }
29337|      0|                    int32_t j = 0;
29338|      0|                    for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (29338:41): [True: 0, False: 0]
  ------------------
29339|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29340|      0|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (29340:29): [True: 0, False: 0]
  ------------------
29341|      0|                        janet_pretty_one(S, kvs[j].key);
29342|      0|                        janet_buffer_push_u8(S->buffer, ' ');
29343|      0|                        S->align++;
29344|      0|                        janet_pretty_one(S, kvs[j].value);
29345|      0|                        j++;
29346|      0|                    }
29347|      0|                    if (truncated) {
  ------------------
  |  Branch (29347:25): [True: 0, False: 0]
  ------------------
29348|      0|                        print_newline(S, align);
29349|      0|                        janet_buffer_push_cstring(S->buffer, "...");
29350|      0|                        S->align += 3;
29351|      0|                    }
29352|  3.05k|                } else {
29353|       |                    /* Sorted keys dictionaries */
29354|       |
29355|       |                    /* Ensure buffer is large enough to sort keys. */
29356|  3.05k|                    int64_t mincap = (int64_t) len + (int64_t) ks_start;
29357|  3.05k|                    if (mincap > INT32_MAX) {
  ------------------
  |  Branch (29357:25): [True: 0, False: 3.05k]
  ------------------
29358|      0|                        truncated = 1;
29359|      0|                        len = 0;
29360|      0|                        mincap = ks_start;
29361|      0|                    }
29362|       |
29363|  3.05k|                    if (S->keysort_capacity < mincap) {
  ------------------
  |  Branch (29363:25): [True: 72, False: 2.98k]
  ------------------
29364|     72|                        if (mincap >= INT32_MAX / 2) {
  ------------------
  |  Branch (29364:29): [True: 0, False: 72]
  ------------------
29365|      0|                            S->keysort_capacity = INT32_MAX;
29366|     72|                        } else {
29367|     72|                            S->keysort_capacity = (int32_t)(mincap * 2);
29368|     72|                        }
29369|     72|                        S->keysort_buffer = janet_srealloc(S->keysort_buffer, sizeof(int32_t) * S->keysort_capacity);
29370|     72|                        if (NULL == S->keysort_buffer) {
  ------------------
  |  Branch (29370:29): [True: 0, False: 72]
  ------------------
29371|      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]
  |  |  ------------------
  ------------------
29372|      0|                        }
29373|     72|                    }
29374|       |
29375|  3.05k|                    janet_sorted_keys(kvs, cap, S->keysort_buffer == NULL ? NULL : S->keysort_buffer + ks_start);
  ------------------
  |  Branch (29375:49): [True: 60, False: 2.99k]
  ------------------
29376|  3.05k|                    S->keysort_start += len;
29377|  3.05k|                    if (!(S->flags & JANET_PRETTY_NOTRUNC) && (len > JANET_PRETTY_DICT_LIMIT)) {
  ------------------
  |  | 1968|  3.05k|#define JANET_PRETTY_NOTRUNC 4
  ------------------
                                  if (!(S->flags & JANET_PRETTY_NOTRUNC) && (len > JANET_PRETTY_DICT_LIMIT)) {
  ------------------
  |  |29178|  3.05k|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
  |  Branch (29377:25): [True: 3.05k, False: 3]
  |  Branch (29377:63): [True: 0, False: 3.05k]
  ------------------
29378|      0|                        len = JANET_PRETTY_DICT_LIMIT;
  ------------------
  |  |29178|      0|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
29379|      0|                        truncated = 1;
29380|      0|                    }
29381|       |
29382|  9.15k|                    for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (29382:41): [True: 6.10k, False: 3.05k]
  ------------------
29383|  6.10k|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (29383:29): [True: 3.18k, False: 2.92k]
  ------------------
29384|  6.10k|                        int32_t j = S->keysort_buffer[i + ks_start];
29385|  6.10k|                        janet_pretty_one(S, kvs[j].key);
29386|  6.10k|                        janet_buffer_push_u8(S->buffer, ' ');
29387|  6.10k|                        S->align++;
29388|  6.10k|                        janet_pretty_one(S, kvs[j].value);
29389|  6.10k|                    }
29390|       |
29391|  3.05k|                    if (truncated) {
  ------------------
  |  Branch (29391:25): [True: 0, False: 3.05k]
  ------------------
29392|      0|                        print_newline(S, align);
29393|      0|                        janet_buffer_push_cstring(S->buffer, "...");
29394|      0|                        S->align += 3;
29395|      0|                    }
29396|       |
29397|  3.05k|                }
29398|  3.05k|                S->keysort_start = ks_start;
29399|  3.05k|            }
29400|  3.05k|            S->depth++;
29401|  3.05k|            janet_buffer_push_u8(S->buffer, '}');
29402|  3.05k|            S->align++;
29403|  3.05k|            break;
29404|  3.05k|        }
29405|   644k|    }
29406|       |    /* Remove from seen */
29407|   644k|    janet_table_remove(&S->seen, x);
29408|   644k|    return;
29409|   644k|}
janet.c:print_newline:
29142|   371k|static void print_newline(struct pretty *S, int align) {
29143|   371k|    int i;
29144|   371k|    if (S->flags & JANET_PRETTY_ONELINE) {
  ------------------
  |  | 1967|   371k|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (29144:9): [True: 331k, False: 40.1k]
  ------------------
29145|   331k|        janet_buffer_push_u8(S->buffer, ' ');
29146|   331k|        return;
29147|   331k|    }
29148|  40.1k|    backtrack_newlines(S);
29149|  40.1k|    janet_buffer_push_u8(S->buffer, '\n');
29150|  40.1k|    S->leaf_align = S->align = align;
29151|  4.85M|    for (i = 0; i < S->align; i++) {
  ------------------
  |  Branch (29151:17): [True: 4.81M, False: 40.1k]
  ------------------
29152|  4.81M|        janet_buffer_push_u8(S->buffer, ' ');
29153|  4.81M|    }
29154|  40.1k|}
janet.c:backtrack_newlines:
29082|  42.0k|static void backtrack_newlines(const struct pretty *S) {
29083|  42.0k|    if (S->flags & JANET_PRETTY_ONELINE || S->buffer->count <= 0)
  ------------------
  |  | 1967|  84.0k|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (29083:9): [True: 1.70k, False: 40.3k]
  |  Branch (29083:44): [True: 0, False: 40.3k]
  ------------------
29084|  1.70k|        return;
29085|  40.3k|    switch (S->buffer->data[S->buffer->count - 1]) {
29086|  2.73k|        case ')':
  ------------------
  |  Branch (29086:9): [True: 2.73k, False: 37.6k]
  ------------------
29087|  2.76k|        case '}':
  ------------------
  |  Branch (29087:9): [True: 36, False: 40.3k]
  ------------------
29088|  2.77k|        case ']':
  ------------------
  |  Branch (29088:9): [True: 11, False: 40.3k]
  ------------------
29089|  2.77k|            break;
29090|  37.5k|        default:
  ------------------
  |  Branch (29090:9): [True: 37.5k, False: 2.77k]
  ------------------
29091|  37.5k|            return;
29092|  40.3k|    }
29093|  2.77k|    int32_t removed = 0;
29094|  2.77k|    int32_t old_count = S->buffer->count;
29095|  2.77k|    int32_t offset = old_count;
29096|  2.77k|    int32_t b0 = S->lookback_barrier;
29097|  2.77k|    int32_t columns = S->width;
29098|  2.77k|    int32_t align = 0;
29099|   119k|    while (--offset >= b0) {
  ------------------
  |  Branch (29099:12): [True: 119k, False: 49]
  ------------------
29100|   119k|        const char *s = (const char *)S->buffer->data + offset;
29101|   119k|        if (*s == '\n') {
  ------------------
  |  Branch (29101:13): [True: 4.26k, False: 115k]
  ------------------
29102|  4.26k|            if (align < S->leaf_align) {
  ------------------
  |  Branch (29102:17): [True: 1.92k, False: 2.34k]
  ------------------
29103|  1.92k|                break;
29104|  1.92k|            }
29105|  2.34k|            columns += align;
29106|  2.34k|            removed += align;
29107|  2.34k|            align = 0;
29108|   115k|        } else if (*s == ' ') {
  ------------------
  |  Branch (29108:20): [True: 55.3k, False: 60.2k]
  ------------------
29109|  55.3k|            align++;
29110|  60.2k|        } else {
29111|  60.2k|            align = 0;
29112|       |            /* Don't count color sequences: \x1B(0|3\d)m */
29113|  60.2k|            if (S->flags & JANET_PRETTY_COLOR && *s == 'm') {
  ------------------
  |  | 1966|   120k|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29113:17): [True: 3.39k, False: 56.8k]
  |  Branch (29113:50): [True: 938, False: 2.46k]
  ------------------
29114|    938|                if (offset >= (3 + b0) && strncmp("\x1B[0m", s - 3, 4) == 0) {
  ------------------
  |  Branch (29114:21): [True: 938, False: 0]
  |  Branch (29114:43): [True: 384, False: 554]
  ------------------
29115|    384|                    offset -= 3;
29116|    384|                    columns++;
29117|    554|                } else if (offset >= (4 + b0) && strncmp("\x1B[3", s - 4, 3) == 0) {
  ------------------
  |  Branch (29117:28): [True: 554, False: 0]
  |  Branch (29117:50): [True: 382, False: 172]
  ------------------
29118|    382|                    offset -= 4;
29119|    382|                    columns++;
29120|    382|                }
29121|    938|            }
29122|  60.2k|        }
29123|   117k|        if (--columns <= 0) {
  ------------------
  |  Branch (29123:13): [True: 807, False: 117k]
  ------------------
29124|    807|            return;
29125|    807|        }
29126|   117k|    }
29127|  1.97k|    offset++; /* Don't mess with the last newline we found */
29128|  1.97k|    janet_assert(offset >= b0, "bad buffer index");
  ------------------
  |  |  389|  1.97k|#define janet_assert(c, m) do { \
  |  |  390|  1.97k|    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.97k]
  |  |  ------------------
  |  |  391|  1.97k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 1.97k]
  |  |  ------------------
  ------------------
29129|  1.97k|    S->buffer->count -= removed;
29130|  42.1k|    for (int32_t i = offset; i < S->buffer->count; i++) {
  ------------------
  |  Branch (29130:30): [True: 40.1k, False: 1.97k]
  ------------------
29131|  40.1k|        if (S->buffer->data[offset] == '\n') {
  ------------------
  |  Branch (29131:13): [True: 1.99k, False: 38.1k]
  ------------------
29132|  1.99k|            S->buffer->data[i] = ' ';
29133|  13.4k|            while (S->buffer->data[++offset] == ' ') {
  ------------------
  |  Branch (29133:20): [True: 11.4k, False: 1.99k]
  ------------------
29134|  11.4k|                janet_assert(offset < old_count, "bad replacement of newline");
  ------------------
  |  |  389|  11.4k|#define janet_assert(c, m) do { \
  |  |  390|  11.4k|    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.4k]
  |  |  ------------------
  |  |  391|  11.4k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 11.4k]
  |  |  ------------------
  ------------------
29135|  11.4k|            }
29136|  38.1k|        } else {
29137|  38.1k|            S->buffer->data[i] = S->buffer->data[offset++];
29138|  38.1k|        }
29139|  40.1k|    }
29140|  1.97k|}
janet.c:janet_jdn_:
29443|    573|static JanetBuffer *janet_jdn_(JanetBuffer *buffer, int depth, Janet x, int32_t startlen, int32_t lookback_barrier) {
29444|    573|    struct pretty S;
29445|    573|    if (NULL == buffer) {
  ------------------
  |  Branch (29445:9): [True: 0, False: 573]
  ------------------
29446|      0|        buffer = janet_buffer(0);
29447|      0|    }
29448|    573|    S.buffer = buffer;
29449|    573|    S.depth = depth;
29450|    573|    S.align = 0;
29451|    573|    S.flags = 0;
29452|    573|    S.bufstartlen = startlen;
29453|    573|    S.lookback_barrier = lookback_barrier;
29454|    573|    S.keysort_capacity = 0;
29455|    573|    S.keysort_buffer = NULL;
29456|    573|    S.keysort_start = 0;
29457|    573|    janet_table_init(&S.seen, 10);
29458|    573|    int res = print_jdn_one(&S, x, depth);
29459|    573|    janet_table_deinit(&S.seen);
29460|    573|    if (res) {
  ------------------
  |  Branch (29460:9): [True: 8, False: 565]
  ------------------
29461|      8|        janet_panic("could not print to jdn format");
29462|      8|    }
29463|    565|    return S.buffer;
29464|    573|}
janet.c:print_jdn_one:
29000|  39.0k|static int print_jdn_one(struct pretty *S, Janet x, int depth) {
29001|  39.0k|    if (depth == 0) return 1;
  ------------------
  |  Branch (29001:9): [True: 1, False: 39.0k]
  ------------------
29002|  39.0k|    switch (janet_type(x)) {
  ------------------
  |  |  795|  39.0k|    (isnan((x).number) \
  |  |  796|  39.0k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  39.0k|        : JANET_NUMBER)
  ------------------
  |  Branch (29002:13): [True: 38.1k, False: 897]
  ------------------
29003|      8|        case JANET_NIL:
  ------------------
  |  Branch (29003:9): [True: 8, False: 39.0k]
  ------------------
29004|     10|        case JANET_BOOLEAN:
  ------------------
  |  Branch (29004:9): [True: 2, False: 39.0k]
  ------------------
29005|     24|        case JANET_BUFFER:
  ------------------
  |  Branch (29005:9): [True: 14, False: 39.0k]
  ------------------
29006|    162|        case JANET_STRING:
  ------------------
  |  Branch (29006:9): [True: 138, False: 38.8k]
  ------------------
29007|    162|            janet_description_b(S->buffer, x);
29008|    162|            break;
29009|    897|        case JANET_NUMBER:
  ------------------
  |  Branch (29009:9): [True: 897, False: 38.1k]
  ------------------
29010|    897|            janet_buffer_ensure(S->buffer, S->buffer->count + BUFSIZE, 2);
  ------------------
  |  |28650|    897|#define BUFSIZE 64
  ------------------
29011|    897|            double num = janet_unwrap_number(x);
  ------------------
  |  |  839|    897|#define janet_unwrap_number(x) ((x).number)
  ------------------
29012|    897|            if (isnan(num)) return 1;
  ------------------
  |  Branch (29012:17): [True: 0, False: 897]
  ------------------
29013|    897|            if (isinf(num)) return 1;
  ------------------
  |  Branch (29013:17): [True: 2, False: 895]
  ------------------
29014|    895|            janet_buffer_dtostr(S->buffer, num);
29015|    895|            break;
29016|  20.2k|        case JANET_SYMBOL:
  ------------------
  |  Branch (29016:9): [True: 20.2k, False: 18.7k]
  ------------------
29017|  20.5k|        case JANET_KEYWORD:
  ------------------
  |  Branch (29017:9): [True: 290, False: 38.7k]
  ------------------
29018|  20.5k|            if (contains_bad_chars(janet_unwrap_keyword(x), janet_type(x) == JANET_SYMBOL)) return 1;
  ------------------
  |  |  865|  20.5k|#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|  20.5k|    (isnan((x).number) \
  |  |  796|  20.5k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  20.5k|        : JANET_NUMBER)
  ------------------
  |  Branch (29018:17): [True: 0, False: 20.5k]
  |  Branch (29018:61): [True: 20.5k, False: 0]
  ------------------
29019|  20.5k|            janet_description_b(S->buffer, x);
29020|  20.5k|            break;
29021|  16.8k|        case JANET_TUPLE: {
  ------------------
  |  Branch (29021:9): [True: 16.8k, False: 22.1k]
  ------------------
29022|  16.8k|            JanetTuple t = janet_unwrap_tuple(x);
  ------------------
  |  |  858|  16.8k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
29023|  16.8k|            int isb = janet_tuple_flag(t) & JANET_TUPLE_FLAG_BRACKETCTOR;
  ------------------
  |  | 1805|  16.8k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1799|  16.8k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                          int isb = janet_tuple_flag(t) & JANET_TUPLE_FLAG_BRACKETCTOR;
  ------------------
  |  | 1797|  16.8k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
29024|  16.8k|            janet_buffer_push_u8(S->buffer, isb ? '[' : '(');
  ------------------
  |  Branch (29024:45): [True: 14, False: 16.8k]
  ------------------
29025|  50.1k|            for (int32_t i = 0; i < janet_tuple_length(t); i++) {
  ------------------
  |  | 1801|  50.1k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|  50.1k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (29025:33): [True: 34.5k, False: 15.6k]
  ------------------
29026|  34.5k|                if (i) janet_buffer_push_u8(S->buffer, ' ');
  ------------------
  |  Branch (29026:21): [True: 17.7k, False: 16.8k]
  ------------------
29027|  34.5k|                if (print_jdn_one(S, t[i], depth - 1)) return 1;
  ------------------
  |  Branch (29027:21): [True: 1.28k, False: 33.2k]
  ------------------
29028|  34.5k|            }
29029|  15.6k|            janet_buffer_push_u8(S->buffer, isb ? ']' : ')');
  ------------------
  |  Branch (29029:45): [True: 14, False: 15.5k]
  ------------------
29030|  15.6k|        }
29031|      0|        break;
29032|    100|        case JANET_ARRAY: {
  ------------------
  |  Branch (29032:9): [True: 100, False: 38.9k]
  ------------------
29033|    100|            janet_table_put(&S->seen, x, janet_wrap_true());
  ------------------
  |  |  832|    100|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  822|    100|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    100|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    100|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29034|    100|            JanetArray *a = janet_unwrap_array(x);
  ------------------
  |  |  860|    100|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
29035|    100|            janet_buffer_push_cstring(S->buffer, "@[");
29036|  1.87k|            for (int32_t i = 0; i < a->count; i++) {
  ------------------
  |  Branch (29036:33): [True: 1.77k, False: 97]
  ------------------
29037|  1.77k|                if (i) janet_buffer_push_u8(S->buffer, ' ');
  ------------------
  |  Branch (29037:21): [True: 1.69k, False: 79]
  ------------------
29038|  1.77k|                if (print_jdn_one(S, a->data[i], depth - 1)) return 1;
  ------------------
  |  Branch (29038:21): [True: 3, False: 1.77k]
  ------------------
29039|  1.77k|            }
29040|     97|            janet_buffer_push_u8(S->buffer, ']');
29041|     97|        }
29042|      0|        break;
29043|     24|        case JANET_TABLE: {
  ------------------
  |  Branch (29043:9): [True: 24, False: 39.0k]
  ------------------
29044|     24|            janet_table_put(&S->seen, x, janet_wrap_true());
  ------------------
  |  |  832|     24|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29045|     24|            JanetTable *tab = janet_unwrap_table(x);
  ------------------
  |  |  861|     24|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
29046|     24|            janet_buffer_push_cstring(S->buffer, "@{");
29047|     24|            int isFirst = 1;
29048|    119|            for (int32_t i = 0; i < tab->capacity; i++) {
  ------------------
  |  Branch (29048:33): [True: 95, False: 24]
  ------------------
29049|     95|                const JanetKV *kv = tab->data + i;
29050|     95|                if (janet_checktype(kv->key, JANET_NIL)) continue;
  ------------------
  |  |  806|     95|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 64, False: 31]
  |  |  |  Branch (806:6): [Folded, False: 95]
  |  |  ------------------
  |  |  807|     95|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     95|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     95|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     95|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     95|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     95|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29051|     31|                if (!isFirst) janet_buffer_push_u8(S->buffer, ' ');
  ------------------
  |  Branch (29051:21): [True: 18, False: 13]
  ------------------
29052|     31|                isFirst = 0;
29053|     31|                if (print_jdn_one(S, kv->key, depth - 1)) return 1;
  ------------------
  |  Branch (29053:21): [True: 0, False: 31]
  ------------------
29054|     31|                janet_buffer_push_u8(S->buffer, ' ');
29055|     31|                if (print_jdn_one(S, kv->value, depth - 1)) return 1;
  ------------------
  |  Branch (29055:21): [True: 0, False: 31]
  ------------------
29056|     31|            }
29057|     24|            janet_buffer_push_u8(S->buffer, '}');
29058|     24|        }
29059|      0|        break;
29060|    406|        case JANET_STRUCT: {
  ------------------
  |  Branch (29060:9): [True: 406, False: 38.6k]
  ------------------
29061|    406|            JanetStruct st = janet_unwrap_struct(x);
  ------------------
  |  |  857|    406|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
29062|    406|            janet_buffer_push_u8(S->buffer, '{');
29063|    406|            int isFirst = 1;
29064|  3.24k|            for (int32_t i = 0; i < janet_struct_capacity(st); i++) {
  ------------------
  |  | 1848|  3.24k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1845|  3.24k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (29064:33): [True: 2.84k, False: 404]
  ------------------
29065|  2.84k|                const JanetKV *kv = st + i;
29066|  2.84k|                if (janet_checktype(kv->key, JANET_NIL)) continue;
  ------------------
  |  |  806|  2.84k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1.81k, False: 1.02k]
  |  |  |  Branch (806:6): [Folded, False: 2.84k]
  |  |  ------------------
  |  |  807|  2.84k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.84k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  2.84k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  2.84k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.84k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.84k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29067|  1.02k|                if (!isFirst) janet_buffer_push_u8(S->buffer, ' ');
  ------------------
  |  Branch (29067:21): [True: 674, False: 353]
  ------------------
29068|  1.02k|                isFirst = 0;
29069|  1.02k|                if (print_jdn_one(S, kv->key, depth - 1)) return 1;
  ------------------
  |  Branch (29069:21): [True: 1, False: 1.02k]
  ------------------
29070|  1.02k|                janet_buffer_push_u8(S->buffer, ' ');
29071|  1.02k|                if (print_jdn_one(S, kv->value, depth - 1)) return 1;
  ------------------
  |  Branch (29071:21): [True: 1, False: 1.02k]
  ------------------
29072|  1.02k|            }
29073|    404|            janet_buffer_push_u8(S->buffer, '}');
29074|    404|        }
29075|      0|        break;
29076|      5|        default:
  ------------------
  |  Branch (29076:9): [True: 5, False: 39.0k]
  ------------------
29077|      5|            return 1;
29078|  39.0k|    }
29079|  37.7k|    return 0;
29080|  39.0k|}
janet.c:contains_bad_chars:
28907|  20.5k|static int contains_bad_chars(const uint8_t *sym, int issym) {
28908|  20.5k|    int32_t len = janet_string_length(sym);
  ------------------
  |  | 1812|  20.5k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|  20.5k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
28909|  20.5k|    if (len && issym && sym[0] >= '0' && sym[0] <= '9') return 1;
  ------------------
  |  Branch (28909:9): [True: 20.3k, False: 237]
  |  Branch (28909:16): [True: 20.2k, False: 53]
  |  Branch (28909:25): [True: 19.4k, False: 833]
  |  Branch (28909:42): [True: 0, False: 19.4k]
  ------------------
28910|  20.5k|    if (!janet_valid_utf8(sym, len)) return 1;
  ------------------
  |  Branch (28910:9): [True: 0, False: 20.5k]
  ------------------
28911|   157k|    for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (28911:25): [True: 136k, False: 20.5k]
  ------------------
28912|   136k|        if (!janet_is_symbol_char(sym[i])) return 1;
  ------------------
  |  Branch (28912:13): [True: 0, False: 136k]
  ------------------
28913|   136k|    }
28914|  20.5k|    return 0;
28915|  20.5k|}
janet.c:scanformat:
29533|   237k|    char precision[3]) {
29534|   237k|    const char *p = strfrmt;
29535|       |
29536|       |    /* Parse strfrmt */
29537|   237k|    memset(width, '\0', 3);
29538|   237k|    memset(precision, '\0', 3);
29539|   237k|    while (*p != '\0' && strchr(FMT_FLAGS, *p) != NULL)
  ------------------
  |  |29499|   237k|#define FMT_FLAGS "-+ #0"
  ------------------
  |  Branch (29539:12): [True: 237k, False: 3]
  |  Branch (29539:26): [True: 157, False: 237k]
  ------------------
29540|    157|        p++; /* skip flags */
29541|   237k|    if ((size_t)(p - strfrmt) >= sizeof(FMT_FLAGS)) janet_panic("invalid format (repeated flags)");
  ------------------
  |  |29499|   237k|#define FMT_FLAGS "-+ #0"
  ------------------
  |  Branch (29541:9): [True: 4, False: 237k]
  ------------------
29542|   237k|    if (isdigit((int)(*p)))
  ------------------
  |  Branch (29542:9): [True: 6, False: 237k]
  ------------------
29543|      6|        width[0] = *p++; /* skip width */
29544|   237k|    if (isdigit((int)(*p)))
  ------------------
  |  Branch (29544:9): [True: 2, False: 237k]
  ------------------
29545|      2|        width[1] = *p++; /* (2 digits at most) */
29546|   237k|    if (*p == '.') {
  ------------------
  |  Branch (29546:9): [True: 18, False: 237k]
  ------------------
29547|     18|        p++;
29548|     18|        if (isdigit((int)(*p)))
  ------------------
  |  Branch (29548:13): [True: 14, False: 4]
  ------------------
29549|     14|            precision[0] = *p++; /* skip precision */
29550|     18|        if (isdigit((int)(*p)))
  ------------------
  |  Branch (29550:13): [True: 5, False: 13]
  ------------------
29551|      5|            precision[1] = *p++; /* (2 digits at most) */
29552|     18|    }
29553|   237k|    if (isdigit((int)(*p)))
  ------------------
  |  Branch (29553:9): [True: 2, False: 237k]
  ------------------
29554|      2|        janet_panic("invalid format (width or precision too long)");
29555|       |
29556|       |    /* Write to form - replace characters with fixed size stuff */
29557|   237k|    *(form++) = '%';
29558|   237k|    const char *p2 = strfrmt;
29559|   474k|    while (p2 <= p) {
  ------------------
  |  Branch (29559:12): [True: 237k, False: 237k]
  ------------------
29560|   237k|        char *loc = strchr(FMT_REPLACE_INTTYPES, *p2);
  ------------------
  |  |29500|   237k|#define FMT_REPLACE_INTTYPES "diouxX"
  ------------------
29561|   237k|        if (loc != NULL && *loc != '\0') {
  ------------------
  |  Branch (29561:13): [True: 102k, False: 134k]
  |  Branch (29561:28): [True: 102k, False: 3]
  ------------------
29562|   102k|            const char *mapping = get_fmt_mapping(*p2++);
29563|   102k|            size_t len = strlen(mapping);
29564|   102k|            memcpy(form, mapping, len);
29565|   102k|            form += len;
29566|   134k|        } else {
29567|   134k|            *(form++) = *(p2++);
29568|   134k|        }
29569|   237k|    }
29570|   237k|    *form = '\0';
29571|       |
29572|   237k|    return p;
29573|   237k|}
janet.c:get_fmt_mapping:
29521|   102k|static const char *get_fmt_mapping(char c) {
29522|   308k|    for (size_t i = 0; i < (sizeof(format_mappings) / sizeof(struct FmtMapping)); i++) {
  ------------------
  |  Branch (29522:24): [True: 308k, False: 0]
  ------------------
29523|   308k|        if (format_mappings[i].c == c)
  ------------------
  |  Branch (29523:13): [True: 102k, False: 205k]
  ------------------
29524|   102k|            return format_mappings[i].mapping;
29525|   308k|    }
29526|      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]
  |  |  ------------------
  ------------------
29527|      0|}
janet.c:typestr:
29470|    191|static const char *typestr(Janet x) {
29471|    191|    JanetType t = janet_type(x);
  ------------------
  |  |  795|    191|    (isnan((x).number) \
  |  |  796|    191|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|    191|        : JANET_NUMBER)
  ------------------
  |  Branch (29471:19): [True: 167, False: 24]
  ------------------
29472|    191|    return (t == JANET_ABSTRACT)
  ------------------
  |  Branch (29472:12): [True: 3, False: 188]
  ------------------
29473|    191|           ? janet_abstract_type(janet_unwrap_abstract(x))->name
  ------------------
  |  | 1898|      3|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|      3|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
29474|    191|           : janet_type_names[t];
29475|    191|}
janet.c:pushtypes:
29477|    585|static void pushtypes(JanetBuffer *buffer, int types) {
29478|    585|    int first = 1;
29479|    585|    int i = 0;
29480|  6.73k|    while (types) {
  ------------------
  |  Branch (29480:12): [True: 6.15k, False: 585]
  ------------------
29481|  6.15k|        if (1 & types) {
  ------------------
  |  Branch (29481:13): [True: 3.07k, False: 3.07k]
  ------------------
29482|  3.07k|            if (first) {
  ------------------
  |  Branch (29482:17): [True: 585, False: 2.49k]
  ------------------
29483|    585|                first = 0;
29484|  2.49k|            } else {
29485|  2.49k|                janet_buffer_push_cstring(buffer, (types == 1) ? " or " : ", ");
  ------------------
  |  Branch (29485:51): [True: 440, False: 2.05k]
  ------------------
29486|  2.49k|            }
29487|  3.07k|            janet_buffer_push_cstring(buffer, janet_type_names[i]);
29488|  3.07k|        }
29489|  6.15k|        i++;
29490|  6.15k|        types >>= 1;
29491|  6.15k|    }
29492|    585|}
janet.c:pushchunk:
29969|  2.30M|static void pushchunk(JanetcRegisterAllocator *ra) {
29970|       |    /* Registers 240-255 are always allocated (reserved) */
29971|  2.30M|    uint32_t chunk = ra->count == 7 ? 0xFFFF0000 : 0;
  ------------------
  |  Branch (29971:22): [True: 11.1k, False: 2.29M]
  ------------------
29972|  2.30M|    int32_t newcount = ra->count + 1;
29973|  2.30M|    if (newcount > ra->capacity) {
  ------------------
  |  Branch (29973:9): [True: 1.44M, False: 863k]
  ------------------
29974|  1.44M|        int32_t newcapacity = newcount * 2;
29975|  1.44M|        ra->chunks = janet_realloc(ra->chunks, (size_t) newcapacity * sizeof(uint32_t));
  ------------------
  |  | 2409|  1.44M|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
29976|  1.44M|        if (!ra->chunks) {
  ------------------
  |  Branch (29976:13): [True: 0, False: 1.44M]
  ------------------
29977|      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]
  |  |  ------------------
  ------------------
29978|      0|        }
29979|  1.44M|        ra->capacity = newcapacity;
29980|  1.44M|    }
29981|  2.30M|    ra->chunks[ra->count] = chunk;
29982|  2.30M|    ra->count = newcount;
29983|  2.30M|}
janet.c:janetc_break:
31039|     10|static JanetSlot janetc_break(JanetFopts opts, int32_t argn, const Janet *argv) {
31040|     10|    JanetCompiler *c = opts.compiler;
31041|     10|    JanetScope *scope = c->scope;
31042|     10|    if (argn > 1) {
  ------------------
  |  Branch (31042:9): [True: 1, False: 9]
  ------------------
31043|      1|        janetc_cerror(c, "expected at most 1 argument");
31044|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31045|      1|    }
31046|       |
31047|       |    /* Find scope to break from */
31048|     10|    while (scope) {
  ------------------
  |  Branch (31048:12): [True: 10, False: 0]
  ------------------
31049|     10|        if (scope->flags & (JANET_SCOPE_FUNCTION | JANET_SCOPE_WHILE))
  ------------------
  |  | 1011|     10|#define JANET_SCOPE_FUNCTION 1
  ------------------
                      if (scope->flags & (JANET_SCOPE_FUNCTION | JANET_SCOPE_WHILE))
  ------------------
  |  | 1016|     10|#define JANET_SCOPE_WHILE 32
  ------------------
  |  Branch (31049:13): [True: 9, False: 1]
  ------------------
31050|      9|            break;
31051|      1|        scope = scope->parent;
31052|      1|    }
31053|      9|    if (NULL == scope) {
  ------------------
  |  Branch (31053:9): [True: 0, False: 9]
  ------------------
31054|      0|        janetc_cerror(c, "break must occur in while loop or closure");
31055|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31056|      0|    }
31057|       |
31058|       |    /* Emit code to break from that scope */
31059|      9|    JanetFopts subopts = janetc_fopts_default(c);
31060|      9|    if (scope->flags & JANET_SCOPE_FUNCTION) {
  ------------------
  |  | 1011|      9|#define JANET_SCOPE_FUNCTION 1
  ------------------
  |  Branch (31060:9): [True: 3, False: 6]
  ------------------
31061|      3|        if (!(scope->flags & JANET_SCOPE_WHILE) && argn) {
  ------------------
  |  | 1016|      3|#define JANET_SCOPE_WHILE 32
  ------------------
  |  Branch (31061:13): [True: 3, False: 0]
  |  Branch (31061:52): [True: 0, False: 3]
  ------------------
31062|       |            /* Closure body with return argument */
31063|      0|            subopts.flags |= JANET_FOPTS_TAIL;
  ------------------
  |  | 1099|      0|#define JANET_FOPTS_TAIL 0x10000
  ------------------
31064|      0|            janetc_value(subopts, argv[0]);
31065|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31066|      3|        } else {
31067|       |            /* while loop IIFE or no argument */
31068|      3|            if (argn) {
  ------------------
  |  Branch (31068:17): [True: 0, False: 3]
  ------------------
31069|      0|                subopts.flags |= JANET_FOPTS_DROP;
  ------------------
  |  | 1101|      0|#define JANET_FOPTS_DROP 0x40000
  ------------------
31070|      0|                janetc_value(subopts, argv[0]);
31071|      0|            }
31072|      3|            janetc_emit(c, JOP_RETURN_NIL);
31073|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31074|      3|        }
31075|      6|    } else {
31076|      6|        if (argn) {
  ------------------
  |  Branch (31076:13): [True: 0, False: 6]
  ------------------
31077|      0|            subopts.flags |= JANET_FOPTS_DROP;
  ------------------
  |  | 1101|      0|#define JANET_FOPTS_DROP 0x40000
  ------------------
31078|      0|            janetc_value(subopts, argv[0]);
31079|      0|        }
31080|       |        /* Tag the instruction so the while special can turn it into a proper jump */
31081|      6|        janetc_emit(c, 0x80 | JOP_JUMP);
31082|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31083|      6|    }
31084|      9|}
janet.c:janetc_def:
30816|  10.4k|static JanetSlot janetc_def(JanetFopts opts, int32_t argn, const Janet *argv) {
30817|  10.4k|    JanetCompiler *c = opts.compiler;
30818|  10.4k|    JanetTable *attr_table = handleattr(c, "def", argn, argv);
30819|  10.4k|    if (c->result.status == JANET_COMPILE_ERROR) {
  ------------------
  |  Branch (30819:9): [True: 15, False: 10.4k]
  ------------------
30820|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30821|     15|    }
30822|  10.4k|    check_metadata_lint(c, attr_table);
30823|  10.4k|    opts.flags &= ~JANET_FOPTS_HINT;
  ------------------
  |  | 1100|  10.4k|#define JANET_FOPTS_HINT 0x20000
  ------------------
30824|  10.4k|    SlotHeadPair *into = NULL;
30825|  10.4k|    into = dohead_destructure(c, into, opts, argv[0], argv[argn - 1]);
30826|  10.4k|    if (c->result.status == JANET_COMPILE_ERROR) {
  ------------------
  |  Branch (30826:9): [True: 190, False: 10.2k]
  ------------------
30827|    190|        janet_v_free(into);
  ------------------
  |  |  711|    190|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  719|    190|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (711:34): [True: 190, False: 0]
  |  |  ------------------
  ------------------
30828|    190|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|    190|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    190|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    190|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    190|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30829|    190|    }
30830|  10.2k|    JanetSlot ret = janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|  10.2k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  10.2k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  10.2k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  10.2k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30831|  26.3k|    for (int32_t i = 0; i < janet_v_count(into); i++) {
  ------------------
  |  |  714|  26.3k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  26.3k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  26.3k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 26.3k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (30831:25): [True: 16.0k, False: 10.2k]
  ------------------
30832|  16.0k|        destructure(c, into[i].lhs, into[i].rhs, defleaf, attr_table);
30833|  16.0k|        ret = into[i].rhs;
30834|  16.0k|    }
30835|       |    janet_v_free(into);
  ------------------
  |  |  711|  10.2k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  719|  10.2k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (711:34): [True: 10.2k, False: 0]
  |  |  ------------------
  ------------------
30836|  10.2k|    return ret;
30837|  10.4k|}
janet.c:handleattr:
30568|  11.9k|static JanetTable *handleattr(JanetCompiler *c, const char *kind, int32_t argn, const Janet *argv) {
30569|  11.9k|    int32_t i;
30570|  11.9k|    if (argn < 2) {
  ------------------
  |  Branch (30570:9): [True: 1, False: 11.9k]
  ------------------
30571|      1|        janetc_error(c, janet_formatc("expected at least 2 arguments to %s", kind));
30572|      1|        return NULL;
30573|      1|    }
30574|  11.9k|    JanetTable *tab = janet_table(2);
30575|  11.9k|    const char *binding_name = janet_type(argv[0]) == JANET_SYMBOL
  ------------------
  |  |  795|  11.9k|    (isnan((x).number) \
  |  |  796|  11.9k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  11.9k|        : JANET_NUMBER)
  ------------------
  |  Branch (30575:32): [True: 11.9k, False: 11]
  |  Branch (30575:32): [True: 10.0k, False: 1.85k]
  ------------------
30576|  11.9k|                               ? ((const char *)janet_unwrap_symbol(argv[0]))
  ------------------
  |  |  864|  10.0k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
30577|  11.9k|                               : "<multiple bindings>";
30578|  19.6k|    for (i = 1; i < argn - 1; i++) {
  ------------------
  |  Branch (30578:17): [True: 7.67k, False: 11.9k]
  ------------------
30579|  7.67k|        Janet attr = argv[i];
30580|  7.67k|        switch (janet_type(attr)) {
  ------------------
  |  |  795|  7.67k|    (isnan((x).number) \
  |  |  796|  7.67k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  7.67k|        : JANET_NUMBER)
  ------------------
  |  Branch (30580:17): [True: 7.50k, False: 172]
  ------------------
30581|  4.97k|            case JANET_TUPLE:
  ------------------
  |  Branch (30581:13): [True: 4.97k, False: 2.69k]
  ------------------
30582|  4.97k|                janetc_cerror(c, "unexpected form - did you intend to use defn?");
30583|  4.97k|                break;
30584|    672|            default:
  ------------------
  |  Branch (30584:13): [True: 672, False: 7.00k]
  ------------------
30585|    672|                janetc_error(c, janet_formatc("cannot add metadata %v to binding %s", attr, binding_name));
30586|    672|                break;
30587|  1.56k|            case JANET_KEYWORD:
  ------------------
  |  Branch (30587:13): [True: 1.56k, False: 6.11k]
  ------------------
30588|  1.56k|                janet_table_put(tab, attr, janet_wrap_true());
  ------------------
  |  |  832|  1.56k|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30589|  1.56k|                break;
30590|    434|            case JANET_STRING:
  ------------------
  |  Branch (30590:13): [True: 434, False: 7.24k]
  ------------------
30591|    434|                janet_table_put(tab, janet_ckeywordv("doc"), attr);
  ------------------
  |  | 1842|    434|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|    434|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|    434|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    434|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    434|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30592|    434|                break;
30593|     27|            case JANET_STRUCT:
  ------------------
  |  Branch (30593:13): [True: 27, False: 7.64k]
  ------------------
30594|     27|                janet_table_merge_struct(tab, janet_unwrap_struct(attr));
  ------------------
  |  |  857|     27|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
30595|     27|                break;
30596|  7.67k|        }
30597|  7.67k|    }
30598|  11.9k|    return tab;
30599|  11.9k|}
janet.c:check_metadata_lint:
30739|  11.8k|static void check_metadata_lint(JanetCompiler *c, JanetTable *attr_table) {
30740|  11.8k|    if (!(c->scope->flags & JANET_SCOPE_TOP) && attr_table && attr_table->count) {
  ------------------
  |  | 1013|  11.8k|#define JANET_SCOPE_TOP 4
  ------------------
  |  Branch (30740:9): [True: 11.6k, False: 224]
  |  Branch (30740:49): [True: 11.6k, False: 0]
  |  Branch (30740:63): [True: 1.57k, False: 10.0k]
  ------------------
30741|       |        /* A macro is a normal lint, other metadata is a strict lint */
30742|  1.57k|        if (janet_truthy(janet_table_get_keyword(attr_table, "macro"))) {
  ------------------
  |  |  818|  1.57k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|  3.15k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 1.57k]
  |  |  |  |  ------------------
  |  |  |  |  807|  3.15k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!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.15k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  1.57k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  1.57k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.57k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.57k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:5): [True: 0, False: 1.57k]
  |  |  |  Branch (818:6): [True: 0, False: 1.57k]
  |  |  ------------------
  |  |  819|  1.57k|     (!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]
  |  |  ------------------
  ------------------
30743|      0|            janetc_lintf(c, JANET_C_LINT_NORMAL, "macro tag is ignored in inner scopes");
30744|      0|        }
30745|  1.57k|    }
30746|  11.8k|}
janet.c:destructure:
30399|  1.81M|                       JanetTable *attr) {
30400|  1.81M|    if (c->recursion_guard <= 0) {
  ------------------
  |  Branch (30400:9): [True: 428, False: 1.80M]
  ------------------
30401|    428|        janetc_error(c, janet_cstring("C stack recursed too deeply"));
30402|    428|        return 1;
30403|    428|    }
30404|  1.80M|    switch (janet_type(left)) {
  ------------------
  |  |  795|  1.80M|    (isnan((x).number) \
  |  |  796|  1.80M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  1.80M|        : JANET_NUMBER)
  ------------------
  |  Branch (30404:13): [True: 1.80M, False: 2.65k]
  ------------------
30405|  11.0k|        default:
  ------------------
  |  Branch (30405:9): [True: 11.0k, False: 1.79M]
  ------------------
30406|  11.0k|            janetc_error(c, janet_formatc("unexpected type in destructuring, got %v", left));
30407|  11.0k|            return 1;
30408|   954k|        case JANET_SYMBOL:
  ------------------
  |  Branch (30408:9): [True: 954k, False: 855k]
  ------------------
30409|       |            /* Leaf, assign right to left */
30410|   954k|            return leaf(c, janet_unwrap_symbol(left), right, attr);
  ------------------
  |  |  864|   954k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
30411|   843k|        case JANET_TUPLE:
  ------------------
  |  Branch (30411:9): [True: 843k, False: 966k]
  ------------------
30412|   843k|        case JANET_ARRAY: {
  ------------------
  |  Branch (30412:9): [True: 176, False: 1.80M]
  ------------------
30413|   843k|            int32_t len = 0;
30414|   843k|            const Janet *values = NULL;
30415|   843k|            janet_indexed_view(left, &values, &len);
30416|  2.62M|            for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (30416:33): [True: 1.77M, False: 842k]
  ------------------
30417|  1.77M|                JanetSlot nextright = janetc_farslot(c);
30418|  1.77M|                Janet subval = values[i];
30419|       |
30420|  1.77M|                if (janet_checktype(subval, JANET_SYMBOL) && !janet_cstrcmp(janet_unwrap_symbol(subval), "&")) {
  ------------------
  |  |  806|  3.55M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 944k, False: 832k]
  |  |  |  Branch (806:6): [Folded, False: 1.77M]
  |  |  ------------------
  |  |  807|  3.55M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.55M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.77M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.77M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.77M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.77M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                              if (janet_checktype(subval, JANET_SYMBOL) && !janet_cstrcmp(janet_unwrap_symbol(subval), "&")) {
  ------------------
  |  |  864|   944k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (30420:62): [True: 377, False: 943k]
  ------------------
30421|    377|                    if (i + 1 >= len) {
  ------------------
  |  Branch (30421:25): [True: 212, False: 165]
  ------------------
30422|    212|                        janetc_cerror(c, "expected symbol following '& in destructuring pattern");
30423|    212|                        return 1;
30424|    212|                    }
30425|       |
30426|    165|                    if (i + 2 < len) {
  ------------------
  |  Branch (30426:25): [True: 127, False: 38]
  ------------------
30427|    127|                        int32_t num_extra = len - i - 1;
30428|    127|                        Janet *extra = janet_tuple_begin(num_extra);
30429|    127|                        janet_tuple_flag(extra) |= JANET_TUPLE_FLAG_BRACKETCTOR;
  ------------------
  |  | 1805|    127|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1799|    127|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                                      janet_tuple_flag(extra) |= JANET_TUPLE_FLAG_BRACKETCTOR;
  ------------------
  |  | 1797|    127|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
30430|       |
30431|   203k|                        for (int32_t j = 0; j < num_extra; ++j) {
  ------------------
  |  Branch (30431:45): [True: 203k, False: 127]
  ------------------
30432|   203k|                            extra[j] = values[j + i + 1];
30433|   203k|                        }
30434|       |
30435|    127|                        janetc_error(c, janet_formatc("expected a single symbol follow '& in destructuring pattern, found %q", janet_wrap_tuple(janet_tuple_end(extra))));
  ------------------
  |  |  843|    127|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|    127|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    127|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    127|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30436|    127|                        return 1;
30437|    127|                    }
30438|       |
30439|     38|                    if (!janet_checktype(values[i + 1], JANET_SYMBOL)) {
  ------------------
  |  |  806|     38|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 38]
  |  |  ------------------
  |  |  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|     38|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     38|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     38|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     38|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30439:25): [True: 6, False: 32]
  ------------------
30440|      6|                        janetc_error(c, janet_formatc("expected symbol following '& in destructuring pattern, found %q", values[i + 1]));
30441|      6|                        return 1;
30442|      6|                    }
30443|       |
30444|     32|                    JanetSlot argi = janetc_farslot(c);
30445|     32|                    JanetSlot arg  = janetc_farslot(c);
30446|     32|                    JanetSlot len  = janetc_farslot(c);
30447|       |
30448|     32|                    janetc_emit_si(c, JOP_LOAD_INTEGER, argi, i, 0);
30449|     32|                    janetc_emit_ss(c, JOP_LENGTH, len, right, 0);
30450|       |
30451|       |                    /* loop condition - reuse arg slot for the condition result */
30452|     32|                    int32_t label_loop_start = janetc_emit_sss(c, JOP_LESS_THAN, arg, argi, len, 0);
30453|     32|                    int32_t label_loop_cond_jump = janetc_emit_si(c, JOP_JUMP_IF_NOT, arg, 0, 0);
30454|       |
30455|       |                    /* loop body */
30456|     32|                    janetc_emit_sss(c, JOP_GET, arg, right, argi, 0);
30457|     32|                    janetc_emit_s(c, JOP_PUSH, arg, 0);
30458|     32|                    janetc_emit_ssi(c, JOP_ADD_IMMEDIATE, argi, argi, 1, 0);
30459|       |
30460|       |                    /* loop - jump back to the start of the loop */
30461|     32|                    int32_t label_loop_loop = janet_v_count(c->buffer);
  ------------------
  |  |  714|     32|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|     32|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|     32|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 32, False: 0]
  |  |  ------------------
  ------------------
30462|     32|                    janetc_emit(c, JOP_JUMP);
30463|     32|                    int32_t label_loop_exit = janet_v_count(c->buffer);
  ------------------
  |  |  714|     32|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|     32|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|     32|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 32, False: 0]
  |  |  ------------------
  ------------------
30464|       |
30465|       |                    /* avoid shifting negative numbers */
30466|     32|                    check_16bit_jump(c, label_loop_cond_jump, label_loop_exit);
30467|     32|                    check_24bit_jump(c, label_loop_start, label_loop_loop);
30468|     32|                    c->buffer[label_loop_cond_jump] |= (uint32_t)(label_loop_exit - label_loop_cond_jump) << 16;
30469|     32|                    c->buffer[label_loop_loop] |= (uint32_t)(label_loop_start - label_loop_loop) << 8;
30470|       |
30471|     32|                    janetc_freeslot(c, argi);
30472|     32|                    janetc_freeslot(c, arg);
30473|     32|                    janetc_freeslot(c, len);
30474|       |
30475|     32|                    janetc_emit_s(c, JOP_MAKE_TUPLE, nextright, 1);
30476|       |
30477|     32|                    leaf(c, janet_unwrap_symbol(values[i + 1]), nextright, attr);
  ------------------
  |  |  864|     32|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
30478|     32|                    janetc_freeslot(c, nextright);
30479|     32|                    break;
30480|     38|                }
30481|       |
30482|  1.77M|                if (i < 0x100) {
  ------------------
  |  Branch (30482:21): [True: 1.75M, False: 18.9k]
  ------------------
30483|  1.75M|                    janetc_emit_ssu(c, JOP_GET_INDEX, nextright, right, (uint8_t) i, 1);
30484|  1.75M|                } else {
30485|  18.9k|                    JanetSlot k = janetc_cslot(janet_wrap_integer(i));
  ------------------
  |  |  967|  18.9k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  18.9k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
30486|  18.9k|                    janetc_emit_sss(c, JOP_IN, nextright, right, k, 1);
30487|  18.9k|                }
30488|  1.77M|                c->recursion_guard--;
30489|  1.77M|                if (destructure(c, subval, nextright, leaf, attr))
  ------------------
  |  Branch (30489:21): [True: 1.77M, False: 0]
  ------------------
30490|  1.77M|                    janetc_freeslot(c, nextright);
30491|  1.77M|                c->recursion_guard++;
30492|  1.77M|            }
30493|   843k|        }
30494|   842k|        return 1;
30495|     67|        case JANET_TABLE:
  ------------------
  |  Branch (30495:9): [True: 67, False: 1.80M]
  ------------------
30496|    904|        case JANET_STRUCT: {
  ------------------
  |  Branch (30496:9): [True: 837, False: 1.80M]
  ------------------
30497|    904|            const JanetKV *kvs = NULL;
30498|    904|            int32_t cap = 0, len = 0;
30499|    904|            janet_dictionary_view(left, &kvs, &len, &cap);
30500|  7.19k|            for (int32_t i = 0; i < cap; i++) {
  ------------------
  |  Branch (30500:33): [True: 6.28k, False: 904]
  ------------------
30501|  6.28k|                if (janet_checktype(kvs[i].key, JANET_NIL)) continue;
  ------------------
  |  |  806|  6.28k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 4.38k, False: 1.90k]
  |  |  |  Branch (806:6): [Folded, False: 6.28k]
  |  |  ------------------
  |  |  807|  6.28k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  6.28k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  6.28k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  6.28k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  6.28k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  6.28k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30502|  1.90k|                JanetSlot nextright = janetc_farslot(c);
30503|  1.90k|                JanetSlot k = janetc_value(janetc_fopts_default(c), kvs[i].key);
30504|  1.90k|                janetc_emit_sss(c, JOP_IN, nextright, right, k, 1);
30505|  1.90k|                c->recursion_guard--;
30506|  1.90k|                if (destructure(c, kvs[i].value, nextright, leaf, attr))
  ------------------
  |  Branch (30506:21): [True: 1.90k, False: 0]
  ------------------
30507|  1.90k|                    janetc_freeslot(c, nextright);
30508|  1.90k|                c->recursion_guard++;
30509|  1.90k|            }
30510|    904|        }
30511|    904|        return 1;
30512|  1.80M|    }
30513|  1.80M|}
janet.c:check_16bit_jump:
30264|  6.57k|static void check_16bit_jump(JanetCompiler *c, int32_t lab1, int32_t lab2) {
30265|  6.57k|    if (bad_16bit_jump(lab1, lab2)) {
  ------------------
  |  Branch (30265:9): [True: 49, False: 6.52k]
  ------------------
30266|     49|        janetc_cerror(c, "bad 16-bit jump, too large");
30267|     49|    }
30268|  6.57k|}
janet.c:bad_16bit_jump:
30258|  6.57k|static int bad_16bit_jump(int32_t lab1, int32_t lab2) {
30259|  6.57k|    if (lab2 - lab1 > INT16_MAX) return 1;
  ------------------
  |  Branch (30259:9): [True: 49, False: 6.52k]
  ------------------
30260|  6.52k|    if (lab2 - lab1 < INT16_MIN) return 1;
  ------------------
  |  Branch (30260:9): [True: 0, False: 6.52k]
  ------------------
30261|  6.52k|    return 0;
30262|  6.52k|}
janet.c:check_24bit_jump:
30276|  1.99k|static void check_24bit_jump(JanetCompiler *c, int32_t lab1, int32_t lab2) {
30277|  1.99k|    if (bad_24bit_jump(lab1, lab2)) {
  ------------------
  |  Branch (30277:9): [True: 0, False: 1.99k]
  ------------------
30278|      0|        janetc_cerror(c, "bad 24-bit jump, too large");
30279|      0|    }
30280|  1.99k|}
janet.c:bad_24bit_jump:
30270|  1.99k|static int bad_24bit_jump(int32_t lab1, int32_t lab2) {
30271|  1.99k|    if (lab2 - lab1 > 0xFFFFFF) return 1;
  ------------------
  |  Branch (30271:9): [True: 0, False: 1.99k]
  ------------------
30272|  1.99k|    if (lab2 - lab1 < -0x1000000) return 1;
  ------------------
  |  Branch (30272:9): [True: 0, False: 1.99k]
  ------------------
30273|  1.99k|    return 0;
30274|  1.99k|}
janet.c:defleaf:
30774|   945k|    JanetTable *tab) {
30775|   945k|    JanetTable *entry = NULL;
30776|   945k|    int is_redef = 0;
30777|   945k|    if (c->scope->flags & JANET_SCOPE_TOP) {
  ------------------
  |  | 1013|   945k|#define JANET_SCOPE_TOP 4
  ------------------
  |  Branch (30777:9): [True: 380, False: 945k]
  ------------------
30778|    380|        entry = janet_table_clone(tab);
30779|    380|        janet_table_put(entry, janet_ckeywordv("source-map"),
  ------------------
  |  | 1842|    380|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|    380|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|    380|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    380|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    380|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30780|    380|                        janet_wrap_tuple(janetc_make_sourcemap(c)));
  ------------------
  |  |  843|    380|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|    380|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    380|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    380|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30781|       |
30782|    380|        is_redef = c->is_redef;
30783|    380|        if (is_redef) janet_table_put(entry, janet_ckeywordv("redef"), janet_wrap_true());
  ------------------
  |  | 1842|      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 (30783:13): [True: 0, False: 380]
  ------------------
30784|       |
30785|    380|        if (is_redef) {
  ------------------
  |  Branch (30785:13): [True: 0, False: 380]
  ------------------
30786|      0|            JanetBinding binding = janet_resolve_ext(c->env, sym);
30787|      0|            JanetArray *ref;
30788|      0|            if (binding.type == JANET_BINDING_DYNAMIC_DEF || binding.type == JANET_BINDING_DYNAMIC_MACRO) {
  ------------------
  |  Branch (30788:17): [True: 0, False: 0]
  |  Branch (30788:62): [True: 0, False: 0]
  ------------------
30789|      0|                ref = janet_unwrap_array(binding.value);
  ------------------
  |  |  860|      0|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
30790|      0|            } else {
30791|      0|                ref = janet_array(1);
30792|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30793|      0|            }
30794|      0|            janet_table_put(entry, janet_ckeywordv("ref"), janet_wrap_array(ref));
  ------------------
  |  | 1842|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30795|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30796|      0|            janetc_emit_ssu(c, JOP_PUT_INDEX, refslot, s, 0, 0);
30797|    380|        } else {
30798|    380|            JanetSlot valsym = janetc_cslot(janet_ckeywordv("value"));
  ------------------
  |  | 1842|    380|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|    380|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|    380|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    380|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    380|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30799|    380|            JanetSlot tabslot = janetc_cslot(janet_wrap_table(entry));
  ------------------
  |  |  846|    380|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|    380|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    380|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    380|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30800|    380|            janetc_emit_sss(c, JOP_PUT, tabslot, valsym, s, 0);
30801|    380|        }
30802|    380|    }
30803|   945k|    int no_unused = tab && tab->count && janet_truthy(janet_table_get_keyword(tab, "unused"));
  ------------------
  |  |  818|   947k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|  3.38k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 1.69k]
  |  |  |  |  ------------------
  |  |  |  |  807|  3.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|  3.38k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  1.69k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  1.69k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.69k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.69k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 1.54k, False: 151]
  |  |  ------------------
  |  |  819|   947k|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|  3.08k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 1.54k]
  |  |  |  |  ------------------
  |  |  |  |  807|  3.08k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|  3.08k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  1.54k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  1.54k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.54k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.54k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 0, False: 1.54k]
  |  |  |  Branch (819:47): [True: 1.54k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (30803:21): [True: 862k, False: 83.3k]
  |  Branch (30803:28): [True: 1.69k, False: 860k]
  ------------------
30804|   945k|    int no_shadow = is_redef || (tab && tab->count && janet_truthy(janet_table_get_keyword(tab, "shadow")));
  ------------------
  |  |  818|  1.69k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|  3.38k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 1.69k]
  |  |  |  |  ------------------
  |  |  |  |  807|  3.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|  3.38k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|  1.69k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|  1.69k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  1.69k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  1.69k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 0, False: 1.69k]
  |  |  ------------------
  |  |  819|  1.69k|     (!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 (30804:21): [True: 0, False: 945k]
  |  Branch (30804:34): [True: 862k, False: 83.3k]
  |  Branch (30804:41): [True: 1.69k, False: 860k]
  ------------------
30805|   945k|    uint32_t def_flags = 0;
30806|   945k|    if (no_unused) def_flags |= JANET_DEFFLAG_NO_UNUSED;
  ------------------
  |  | 1135|  1.54k|#define JANET_DEFFLAG_NO_UNUSED 2
  ------------------
  |  Branch (30806:9): [True: 1.54k, False: 944k]
  ------------------
30807|   945k|    if (no_shadow) def_flags |= JANET_DEFFLAG_NO_SHADOWCHECK;
  ------------------
  |  | 1134|      0|#define JANET_DEFFLAG_NO_SHADOWCHECK 1
  ------------------
  |  Branch (30807:9): [True: 0, False: 945k]
  ------------------
30808|   945k|    int result = namelocal(c, sym, 0, s, def_flags);
30809|   945k|    if (entry) {
  ------------------
  |  Branch (30809:9): [True: 380, False: 945k]
  ------------------
30810|       |        /* Add env entry to env AFTER namelocal to avoid the shadowcheck false positive */
30811|    380|        janet_table_put(c->env, janet_wrap_symbol(sym), janet_wrap_table(entry));
  ------------------
  |  |  849|    380|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|    380|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    380|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    380|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      janet_table_put(c->env, janet_wrap_symbol(sym), janet_wrap_table(entry));
  ------------------
  |  |  846|    380|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|    380|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    380|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    380|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30812|    380|    }
30813|   945k|    return result;
30814|   945k|}
janet.c:janetc_make_sourcemap:
30516|  3.42k|static const Janet *janetc_make_sourcemap(JanetCompiler *c) {
30517|  3.42k|    Janet *tup = janet_tuple_begin(3);
30518|  3.42k|    tup[0] = c->source ? janet_wrap_string(c->source) : janet_wrap_nil();
  ------------------
  |  |  848|  3.42k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|  3.42k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.42k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.42k|#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|  3.42k|    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 (30518:14): [True: 3.42k, False: 0]
  ------------------
30519|  3.42k|    tup[1] = janet_wrap_integer(c->current_mapping.line);
  ------------------
  |  |  967|  3.42k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  3.42k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
30520|  3.42k|    tup[2] = janet_wrap_integer(c->current_mapping.column);
  ------------------
  |  |  967|  3.42k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  3.42k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
30521|  3.42k|    return janet_tuple_end(tup);
30522|  3.42k|}
janet.c:namelocal:
30672|   951k|static int namelocal(JanetCompiler *c, const uint8_t *head, int32_t flags, JanetSlot ret, uint32_t def_flags) {
30673|   951k|    int isUnnamedRegister = !(ret.flags & JANET_SLOT_NAMED) &&
  ------------------
  |  |  992|   951k|#define JANET_SLOT_NAMED 0x20000
  ------------------
  |  Branch (30673:29): [True: 951k, False: 478]
  ------------------
30674|   951k|                            ret.index > 0 &&
  ------------------
  |  Branch (30674:29): [True: 945k, False: 5.27k]
  ------------------
30675|   945k|                            ret.envindex >= 0;
  ------------------
  |  Branch (30675:29): [True: 0, False: 945k]
  ------------------
30676|       |    /* optimization for `(def x my-def)` - don't emit a movn/movf instruction, we can just alias my-def */
30677|       |    /* TODO - implement optimization for `(def x my-var)` correctly as well w/ de-aliasing */
30678|   951k|    int canAlias = !(flags & JANET_SLOT_MUTABLE) &&
  ------------------
  |  |  993|   951k|#define JANET_SLOT_MUTABLE 0x40000
  ------------------
  |  Branch (30678:20): [True: 945k, False: 5.85k]
  ------------------
30679|   945k|                   !(ret.flags & JANET_SLOT_MUTABLE) &&
  ------------------
  |  |  993|   945k|#define JANET_SLOT_MUTABLE 0x40000
  ------------------
  |  Branch (30679:20): [True: 945k, False: 69]
  ------------------
30680|   945k|                   (ret.flags & JANET_SLOT_NAMED) &&
  ------------------
  |  |  992|   945k|#define JANET_SLOT_NAMED 0x20000
  ------------------
  |  Branch (30680:20): [True: 409, False: 945k]
  ------------------
30681|    409|                   (ret.index >= 0) &&
  ------------------
  |  Branch (30681:20): [True: 409, False: 0]
  ------------------
30682|    409|                   (ret.envindex == -1);
  ------------------
  |  Branch (30682:20): [True: 408, False: 1]
  ------------------
30683|   951k|    if (canAlias) {
  ------------------
  |  Branch (30683:9): [True: 408, False: 951k]
  ------------------
30684|    408|        ret.flags &= ~JANET_SLOT_MUTABLE;
  ------------------
  |  |  993|    408|#define JANET_SLOT_MUTABLE 0x40000
  ------------------
30685|    408|        isUnnamedRegister = 1; /* don't free slot after use - is an alias for another slot */
30686|   951k|    } else if (!isUnnamedRegister) {
  ------------------
  |  Branch (30686:16): [True: 951k, False: 0]
  ------------------
30687|       |        /* Slot is not able to be named */
30688|   951k|        JanetSlot localslot = janetc_farslot(c);
30689|   951k|        janetc_copy(c, localslot, ret);
30690|   951k|        ret = localslot;
30691|   951k|    }
30692|   951k|    ret.flags |= flags;
30693|   951k|    if (c->scope->flags & JANET_SCOPE_TOP) {
  ------------------
  |  | 1013|   951k|#define JANET_SCOPE_TOP 4
  ------------------
  |  Branch (30693:9): [True: 380, False: 951k]
  ------------------
30694|    380|        def_flags |= JANET_DEFFLAG_NO_UNUSED;
  ------------------
  |  | 1135|    380|#define JANET_DEFFLAG_NO_UNUSED 2
  ------------------
30695|    380|    }
30696|   951k|    janetc_nameslot(c, head, ret, def_flags);
30697|   951k|    return !isUnnamedRegister;
30698|   951k|}
janet.c:janetc_do:
30976|  8.24k|static JanetSlot janetc_do(JanetFopts opts, int32_t argn, const Janet *argv) {
30977|  8.24k|    int32_t i;
30978|  8.24k|    JanetSlot ret = janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|  8.24k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  8.24k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  8.24k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  8.24k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30979|  8.24k|    JanetCompiler *c = opts.compiler;
30980|  8.24k|    JanetFopts subopts = janetc_fopts_default(c);
30981|  8.24k|    JanetScope tempscope;
30982|  8.24k|    janetc_scope(&tempscope, c, 0, "do");
30983|  26.5k|    for (i = 0; i < argn; i++) {
  ------------------
  |  Branch (30983:17): [True: 18.2k, False: 8.24k]
  ------------------
30984|  18.2k|        if (i != argn - 1) {
  ------------------
  |  Branch (30984:13): [True: 10.0k, False: 8.22k]
  ------------------
30985|  10.0k|            subopts.flags = JANET_FOPTS_DROP;
  ------------------
  |  | 1101|  10.0k|#define JANET_FOPTS_DROP 0x40000
  ------------------
30986|  10.0k|        } else {
30987|  8.22k|            subopts = opts;
30988|  8.22k|            subopts.flags &= ~JANET_FOPTS_ACCEPT_SPLICE;
  ------------------
  |  | 1102|  8.22k|#define JANET_FOPTS_ACCEPT_SPLICE 0x80000
  ------------------
30989|  8.22k|        }
30990|  18.2k|        ret = janetc_value(subopts, argv[i]);
30991|  18.2k|        if (i != argn - 1) {
  ------------------
  |  Branch (30991:13): [True: 10.0k, False: 8.22k]
  ------------------
30992|  10.0k|            janetc_freeslot(c, ret);
30993|  10.0k|        }
30994|  18.2k|    }
30995|  8.24k|    janetc_popscope_keepslot(c, ret);
30996|  8.24k|    return ret;
30997|  8.24k|}
janet.c:janetc_fn:
31230|   459k|static JanetSlot janetc_fn(JanetFopts opts, int32_t argn, const Janet *argv) {
31231|   459k|    JanetCompiler *c = opts.compiler;
31232|   459k|    JanetFuncDef *def;
31233|   459k|    JanetSlot ret;
31234|   459k|    Janet head;
31235|   459k|    JanetScope fnscope;
31236|   459k|    int32_t paramcount, argi, parami, arity, min_arity = 0, max_arity, defindex, i;
31237|   459k|    JanetFopts subopts = janetc_fopts_default(c);
31238|   459k|    const Janet *params;
31239|   459k|    const char *errmsg = NULL;
31240|       |
31241|       |    /* Function flags */
31242|   459k|    int vararg = 0;
31243|   459k|    int structarg = 0;
31244|   459k|    int allow_extra = 0;
31245|   459k|    int selfref = 0;
31246|   459k|    int hasname = 0;
31247|   459k|    int seenamp = 0;
31248|   459k|    int seenopt = 0;
31249|   459k|    int namedargs = 0;
31250|       |
31251|       |    /* Begin function */
31252|   459k|    c->scope->flags |= JANET_SCOPE_CLOSURE;
  ------------------
  |  | 1015|   459k|#define JANET_SCOPE_CLOSURE 16
  ------------------
31253|   459k|    janetc_scope(&fnscope, c, JANET_SCOPE_FUNCTION, "function");
  ------------------
  |  | 1011|   459k|#define JANET_SCOPE_FUNCTION 1
  ------------------
31254|       |
31255|   459k|    if (argn == 0) {
  ------------------
  |  Branch (31255:9): [True: 0, False: 459k]
  ------------------
31256|      0|        errmsg = "expected at least 1 argument to function literal";
31257|      0|        goto error;
31258|      0|    }
31259|       |
31260|       |    /* Read function parameters */
31261|   459k|    parami = 0;
31262|   459k|    head = argv[0];
31263|   459k|    if (janet_checktype(head, JANET_SYMBOL)) {
  ------------------
  |  |  806|   459k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 378, False: 459k]
  |  |  |  Branch (806:6): [Folded, False: 459k]
  |  |  ------------------
  |  |  807|   459k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   459k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   459k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   459k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   459k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   459k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31264|    378|        selfref = 1;
31265|    378|        hasname = 1;
31266|    378|        parami = 1;
31267|   459k|    } else if (janet_checktype(head, JANET_KEYWORD)) {
  ------------------
  |  |  806|   459k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 458k, False: 420]
  |  |  |  Branch (806:6): [Folded, False: 459k]
  |  |  ------------------
  |  |  807|   459k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   459k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   459k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   459k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   459k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   459k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31268|   458k|        hasname = 1;
31269|   458k|        parami = 1;
31270|   458k|    }
31271|   459k|    if (parami >= argn || !janet_checktype(argv[parami], JANET_TUPLE)) {
  ------------------
  |  |  806|   459k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 459k]
  |  |  ------------------
  |  |  807|   459k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   459k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   459k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   459k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   459k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   459k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (31271:9): [True: 0, False: 459k]
  |  Branch (31271:27): [True: 12, False: 459k]
  ------------------
31272|     12|        errmsg = "expected function parameters";
31273|     12|        goto error;
31274|     12|    }
31275|       |
31276|       |    /* Keep track of destructured parameters */
31277|   459k|    JanetSlot *destructed_params = NULL;
31278|   459k|    JanetSlot *named_params = NULL;
31279|   459k|    JanetTable *named_table = NULL;
31280|   459k|    JanetSlot named_slot;
31281|       |
31282|       |    /* Compile function parameters */
31283|   459k|    params = janet_unwrap_tuple(argv[parami]);
  ------------------
  |  |  858|   459k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
31284|   459k|    paramcount = janet_tuple_length(params);
  ------------------
  |  | 1801|   459k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|   459k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
31285|   459k|    arity = paramcount;
31286|  1.28M|    for (i = 0; i < paramcount; i++) {
  ------------------
  |  Branch (31286:17): [True: 828k, False: 459k]
  ------------------
31287|   828k|        Janet param = params[i];
31288|   828k|        if (namedargs) {
  ------------------
  |  Branch (31288:13): [True: 0, False: 828k]
  ------------------
31289|      0|            arity--;
31290|      0|            if (!janet_checktype(param, JANET_SYMBOL)) {
  ------------------
  |  |  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 (31290:17): [True: 0, False: 0]
  ------------------
31291|      0|                errmsg = "only named arguments can follow &named";
31292|      0|                goto error;
31293|      0|            }
31294|      0|            Janet key = janet_wrap_keyword(janet_unwrap_symbol(param));
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31295|      0|            janet_table_put(named_table, key, param);
31296|      0|            janet_v_push(named_params, janetc_farslot(c));
  ------------------
  |  |  712|      0|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|      0|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|      0|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|      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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|      0|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (723:50): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|      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))
  |  |  ------------------
  |  |  |  |  721|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31297|   828k|        } else if (janet_checktype(param, JANET_SYMBOL)) {
  ------------------
  |  |  806|   828k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 814k, False: 13.8k]
  |  |  |  Branch (806:6): [Folded, False: 828k]
  |  |  ------------------
  |  |  807|   828k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   828k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   828k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   828k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   828k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   828k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31298|       |            /* Check for varargs and unfixed arity */
31299|   814k|            const uint8_t *sym = janet_unwrap_symbol(param);
  ------------------
  |  |  864|   814k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
31300|   814k|            if (sym[0] == '&') {
  ------------------
  |  Branch (31300:17): [True: 81, False: 814k]
  ------------------
31301|     81|                if (!janet_cstrcmp(sym, "&")) {
  ------------------
  |  Branch (31301:21): [True: 37, False: 44]
  ------------------
31302|     37|                    if (seenamp) {
  ------------------
  |  Branch (31302:25): [True: 0, False: 37]
  ------------------
31303|      0|                        errmsg = "& in unexpected location";
31304|      0|                        goto error;
31305|     37|                    } else if (i == paramcount - 1) {
  ------------------
  |  Branch (31305:32): [True: 6, False: 31]
  ------------------
31306|      6|                        allow_extra = 1;
31307|      6|                        arity--;
31308|     31|                    } else if (i == paramcount - 2) {
  ------------------
  |  Branch (31308:32): [True: 29, False: 2]
  ------------------
31309|     29|                        vararg = 1;
31310|     29|                        arity -= 2;
31311|     29|                    } else {
31312|      2|                        errmsg = "& in unexpected location";
31313|      2|                        goto error;
31314|      2|                    }
31315|     35|                    seenamp = 1;
31316|     44|                } else if (!janet_cstrcmp(sym, "&opt")) {
  ------------------
  |  Branch (31316:28): [True: 1, False: 43]
  ------------------
31317|      1|                    if (seenopt) {
  ------------------
  |  Branch (31317:25): [True: 0, False: 1]
  ------------------
31318|      0|                        errmsg = "only one &opt allowed";
31319|      0|                        goto error;
31320|      1|                    } else if (i == paramcount - 1) {
  ------------------
  |  Branch (31320:32): [True: 1, False: 0]
  ------------------
31321|      1|                        errmsg = "&opt cannot be last item in parameter list";
31322|      1|                        goto error;
31323|      1|                    }
31324|      0|                    min_arity = i;
31325|      0|                    arity--;
31326|      0|                    seenopt = 1;
31327|     43|                } else if (!janet_cstrcmp(sym, "&keys")) {
  ------------------
  |  Branch (31327:28): [True: 0, False: 43]
  ------------------
31328|      0|                    if (seenamp) {
  ------------------
  |  Branch (31328:25): [True: 0, False: 0]
  ------------------
31329|      0|                        errmsg = "&keys in unexpected location";
31330|      0|                        goto error;
31331|      0|                    } else if (i == paramcount - 2) {
  ------------------
  |  Branch (31331:32): [True: 0, False: 0]
  ------------------
31332|      0|                        vararg = 1;
31333|      0|                        structarg = 1;
31334|      0|                        arity -= 2;
31335|      0|                    } else {
31336|      0|                        errmsg = "&keys in unexpected location";
31337|      0|                        goto error;
31338|      0|                    }
31339|      0|                    seenamp = 1;
31340|     43|                } else if (!janet_cstrcmp(sym, "&named")) {
  ------------------
  |  Branch (31340:28): [True: 0, False: 43]
  ------------------
31341|      0|                    if (seenamp) {
  ------------------
  |  Branch (31341:25): [True: 0, False: 0]
  ------------------
31342|      0|                        errmsg = "&named in unexpected location";
31343|      0|                        goto error;
31344|      0|                    }
31345|      0|                    vararg = 1;
31346|      0|                    structarg = 1;
31347|      0|                    arity--;
31348|      0|                    seenamp = 1;
31349|      0|                    namedargs = 1;
31350|      0|                    named_table = janet_table(10);
31351|      0|                    named_slot = janetc_farslot(c);
31352|     43|                } else {
31353|     43|                    janetc_nameslot(c, sym, janetc_farslot(c), 0);
31354|     43|                }
31355|   814k|            } else {
31356|   814k|                janetc_nameslot(c, sym, janetc_farslot(c), 0);
31357|   814k|            }
31358|   814k|        } else {
31359|  13.8k|            janet_v_push(destructed_params, janetc_farslot(c));
  ------------------
  |  |  712|  13.8k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  13.8k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  13.8k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  13.3k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  13.3k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  13.3k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  13.3k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 456, False: 13.3k]
  |  |  |  |  |  |  |  Branch (723:50): [True: 1.02k, False: 12.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|  1.48k|#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))
  |  |  ------------------
  |  |  |  |  721|  13.8k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  13.8k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31360|  13.8k|        }
31361|   828k|    }
31362|       |
31363|       |    /* Compile named arguments */
31364|   459k|    if (namedargs) {
  ------------------
  |  Branch (31364:9): [True: 0, False: 459k]
  ------------------
31365|      0|        Janet param = janet_wrap_table(named_table);
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31366|      0|        destructure(c, param, named_slot, defleaf, NULL);
31367|      0|        janetc_freeslot(c, named_slot);
31368|      0|        janet_v_free(named_params);
  ------------------
  |  |  711|      0|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  719|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (711:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
31369|      0|    }
31370|       |
31371|       |    /* Compile destructed params */
31372|   459k|    int32_t j = 0;
31373|  1.28M|    for (i = 0; i < paramcount; i++) {
  ------------------
  |  Branch (31373:17): [True: 828k, False: 459k]
  ------------------
31374|   828k|        Janet param = params[i];
31375|   828k|        if (!janet_checktype(param, JANET_SYMBOL)) {
  ------------------
  |  |  806|   828k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 828k]
  |  |  ------------------
  |  |  807|   828k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   828k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   828k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   828k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   828k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   828k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (31375:13): [True: 13.7k, False: 814k]
  ------------------
31376|  13.7k|            janet_assert(janet_v_count(destructed_params) > j, "out of bounds");
  ------------------
  |  |  389|  13.7k|#define janet_assert(c, m) do { \
  |  |  390|  27.5k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 13.7k]
  |  |  |  Branch (390:11): [True: 13.7k, False: 0]
  |  |  ------------------
  |  |  391|  13.7k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 13.7k]
  |  |  ------------------
  ------------------
31377|  13.7k|            JanetSlot reg = destructed_params[j++];
31378|  13.7k|            destructure(c, param, reg, defleaf, NULL);
31379|  13.7k|            janetc_freeslot(c, reg);
31380|  13.7k|        }
31381|   828k|    }
31382|   459k|    janet_v_free(destructed_params);
  ------------------
  |  |  711|   459k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  719|    454|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (711:34): [True: 454, False: 459k]
  |  |  ------------------
  ------------------
31383|       |
31384|   459k|    max_arity = (vararg || allow_extra) ? INT32_MAX : arity;
  ------------------
  |  Branch (31384:18): [True: 29, False: 459k]
  |  Branch (31384:28): [True: 6, False: 459k]
  ------------------
31385|   459k|    if (!seenopt) min_arity = arity;
  ------------------
  |  Branch (31385:9): [True: 459k, False: 0]
  ------------------
31386|       |
31387|       |    /* Check for self ref (also avoid if arguments shadow own name) */
31388|   459k|    if (selfref) {
  ------------------
  |  Branch (31388:9): [True: 374, False: 459k]
  ------------------
31389|       |        /* Check if the parameters shadow the function name. If so, don't
31390|       |         * emit JOP_LOAD_SELF and add a binding since that most users
31391|       |         * seem to expect that function parameters take precedence over the
31392|       |         * function name */
31393|    374|        const uint8_t *sym = janet_unwrap_symbol(head);
  ------------------
  |  |  864|    374|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
31394|    374|        int32_t len = janet_v_count(c->scope->syms);
  ------------------
  |  |  714|    374|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|    327|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    327|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 327, False: 47]
  |  |  ------------------
  ------------------
31395|    374|        int found = 0;
31396|  83.2k|        for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (31396:29): [True: 82.8k, False: 374]
  ------------------
31397|  82.8k|            if (c->scope->syms[i].sym == sym) {
  ------------------
  |  Branch (31397:17): [True: 1.47k, False: 81.4k]
  ------------------
31398|  1.47k|                found = 1;
31399|  1.47k|            }
31400|  82.8k|        }
31401|    374|        if (!found) {
  ------------------
  |  Branch (31401:13): [True: 220, False: 154]
  ------------------
31402|    220|            JanetSlot slot = janetc_farslot(c);
31403|    220|            slot.flags = JANET_SLOT_NAMED | JANET_FUNCTION;
  ------------------
  |  |  992|    220|#define JANET_SLOT_NAMED 0x20000
  ------------------
31404|    220|            janetc_emit_s(c, JOP_LOAD_SELF, slot, 1);
31405|       |            /* We should figure out a better way to avoid `(def x 1) (def x :shadow (fn x [...] ...))` triggering a
31406|       |             * shadow lint for the last x */
31407|    220|            janetc_nameslot(c, sym, slot, JANET_DEFFLAG_NO_UNUSED | JANET_DEFFLAG_NO_SHADOWCHECK);
  ------------------
  |  | 1135|    220|#define JANET_DEFFLAG_NO_UNUSED 2
  ------------------
                          janetc_nameslot(c, sym, slot, JANET_DEFFLAG_NO_UNUSED | JANET_DEFFLAG_NO_SHADOWCHECK);
  ------------------
  |  | 1134|    220|#define JANET_DEFFLAG_NO_SHADOWCHECK 1
  ------------------
31408|    220|        }
31409|    374|    }
31410|       |
31411|       |    /* Compile function body */
31412|   459k|    if (parami + 1 == argn) {
  ------------------
  |  Branch (31412:9): [True: 221, False: 459k]
  ------------------
31413|    221|        janetc_emit(c, JOP_RETURN_NIL);
31414|   459k|    } else {
31415|   942k|        for (argi = parami + 1; argi < argn; argi++) {
  ------------------
  |  Branch (31415:33): [True: 490k, False: 452k]
  ------------------
31416|   490k|            subopts.flags = (argi == (argn - 1)) ? JANET_FOPTS_TAIL : JANET_FOPTS_DROP;
  ------------------
  |  | 1099|   459k|#define JANET_FOPTS_TAIL 0x10000
  ------------------
                          subopts.flags = (argi == (argn - 1)) ? JANET_FOPTS_TAIL : JANET_FOPTS_DROP;
  ------------------
  |  | 1101|   521k|#define JANET_FOPTS_DROP 0x40000
  ------------------
  |  Branch (31416:29): [True: 459k, False: 30.8k]
  ------------------
31417|   490k|            janetc_value(subopts, argv[argi]);
31418|   490k|            if (c->result.status == JANET_COMPILE_ERROR)
  ------------------
  |  Branch (31418:17): [True: 7.09k, False: 483k]
  ------------------
31419|  7.09k|                goto error2;
31420|   490k|        }
31421|   459k|    }
31422|       |
31423|       |    /* Build function */
31424|   452k|    def = janetc_pop_funcdef(c);
31425|   452k|    def->arity = arity;
31426|   452k|    def->min_arity = min_arity;
31427|   452k|    def->max_arity = max_arity;
31428|   452k|    if (named_table != NULL) {
  ------------------
  |  Branch (31428:9): [True: 0, False: 452k]
  ------------------
31429|      0|        def->named_args_count = named_table->count;
31430|      0|    }
31431|   452k|    if (vararg) def->flags |= JANET_FUNCDEF_FLAG_VARARG;
  ------------------
  |  | 1097|     13|#define JANET_FUNCDEF_FLAG_VARARG 0x10000
  ------------------
  |  Branch (31431:9): [True: 13, False: 452k]
  ------------------
31432|   452k|    if (structarg) def->flags |= JANET_FUNCDEF_FLAG_STRUCTARG;
  ------------------
  |  | 1105|      0|#define JANET_FUNCDEF_FLAG_STRUCTARG 0x1000000
  ------------------
  |  Branch (31432:9): [True: 0, False: 452k]
  ------------------
31433|   452k|    if (namedargs) def->flags |= JANET_FUNCDEF_FLAG_NAMEDARGS;
  ------------------
  |  | 1107|      0|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (31433:9): [True: 0, False: 452k]
  ------------------
31434|       |
31435|   452k|    if (hasname) def->name = janet_unwrap_symbol(head); /* Also correctly unwraps keyword */
  ------------------
  |  |  864|   452k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (31435:9): [True: 452k, False: 210]
  ------------------
31436|   452k|    janet_def_addflags(def);
31437|   452k|    defindex = janetc_addfuncdef(c, def);
31438|       |
31439|       |    /* Ensure enough slots for vararg function. */
31440|   452k|    if (arity + vararg > def->slotcount) def->slotcount = arity + vararg;
  ------------------
  |  Branch (31440:9): [True: 0, False: 452k]
  ------------------
31441|       |
31442|       |    /* Instantiate closure */
31443|   452k|    ret = janetc_gettarget(opts);
31444|   452k|    janetc_emit_su(c, JOP_CLOSURE, ret, defindex, 1);
31445|   452k|    return ret;
31446|       |
31447|     15|error:
31448|     15|    janetc_cerror(c, errmsg);
31449|  7.11k|error2:
31450|  7.11k|    janetc_popscope(c);
31451|  7.11k|    return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|  7.11k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  7.11k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  7.11k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  7.11k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31452|     15|}
janet.c:janetc_addfuncdef:
31022|   453k|static int32_t janetc_addfuncdef(JanetCompiler *c, JanetFuncDef *def) {
31023|   453k|    JanetScope *scope = c->scope;
31024|  1.95M|    while (scope) {
  ------------------
  |  Branch (31024:12): [True: 1.95M, False: 0]
  ------------------
31025|  1.95M|        if (scope->flags & JANET_SCOPE_FUNCTION)
  ------------------
  |  | 1011|  1.95M|#define JANET_SCOPE_FUNCTION 1
  ------------------
  |  Branch (31025:13): [True: 453k, False: 1.49M]
  ------------------
31026|   453k|            break;
31027|  1.49M|        scope = scope->parent;
31028|  1.49M|    }
31029|   453k|    janet_assert(scope, "could not add funcdef");
  ------------------
  |  |  389|   453k|#define janet_assert(c, m) do { \
  |  |  390|   453k|    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: 453k]
  |  |  ------------------
  |  |  391|   453k|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 453k]
  |  |  ------------------
  ------------------
31030|   453k|    janet_v_push(scope->defs, def);
  ------------------
  |  |  712|   453k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|   453k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|   453k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  97.6k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  97.6k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  97.6k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  97.6k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 356k, False: 97.6k]
  |  |  |  |  |  |  |  Branch (723:50): [True: 8.89k, False: 88.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|   364k|#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))
  |  |  ------------------
  |  |  |  |  721|   453k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   453k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31031|       |    return janet_v_count(scope->defs) - 1;
  ------------------
  |  |  714|   453k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|   453k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   453k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 453k, False: 0]
  |  |  ------------------
  ------------------
31032|   453k|}
janet.c:janetc_if:
30870|  6.76k|static JanetSlot janetc_if(JanetFopts opts, int32_t argn, const Janet *argv) {
30871|  6.76k|    JanetCompiler *c = opts.compiler;
30872|  6.76k|    int32_t labelr, labeljr, labeld, labeljd;
30873|  6.76k|    JanetFopts condopts, bodyopts;
30874|  6.76k|    JanetSlot cond, left, right, target;
30875|  6.76k|    Janet truebody, falsebody;
30876|  6.76k|    JanetScope condscope, tempscope;
30877|  6.76k|    const int tail = opts.flags & JANET_FOPTS_TAIL;
  ------------------
  |  | 1099|  6.76k|#define JANET_FOPTS_TAIL 0x10000
  ------------------
30878|  6.76k|    const int drop = opts.flags & JANET_FOPTS_DROP;
  ------------------
  |  | 1101|  6.76k|#define JANET_FOPTS_DROP 0x40000
  ------------------
30879|  6.76k|    uint8_t ifnjmp = JOP_JUMP_IF_NOT;
30880|       |
30881|  6.76k|    if (argn < 2 || argn > 3) {
  ------------------
  |  Branch (30881:9): [True: 0, False: 6.76k]
  |  Branch (30881:21): [True: 0, False: 6.76k]
  ------------------
30882|      0|        janetc_cerror(c, "expected 2 or 3 arguments to if");
30883|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30884|      0|    }
30885|       |
30886|       |    /* Get the bodies of the if expression */
30887|  6.76k|    truebody = argv[1];
30888|  6.76k|    falsebody = argn > 2 ? argv[2] : janet_wrap_nil();
  ------------------
  |  |  831|     47|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  6.81k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     47|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     47|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30888:17): [True: 6.71k, False: 47]
  ------------------
30889|       |
30890|       |    /* Get options */
30891|  6.76k|    condopts = janetc_fopts_default(c);
30892|  6.76k|    bodyopts = opts;
30893|  6.76k|    bodyopts.flags &= ~JANET_FOPTS_ACCEPT_SPLICE;
  ------------------
  |  | 1102|  6.76k|#define JANET_FOPTS_ACCEPT_SPLICE 0x80000
  ------------------
30894|       |
30895|       |    /* Set target for compilation */
30896|  6.76k|    target = (drop || tail)
  ------------------
  |  Branch (30896:15): [True: 29, False: 6.73k]
  |  Branch (30896:23): [True: 5.28k, False: 1.44k]
  ------------------
30897|  6.76k|             ? janetc_cslot(janet_wrap_nil())
  ------------------
  |  |  831|  5.31k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  5.31k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  5.31k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  5.31k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30898|  6.76k|             : janetc_gettarget(opts);
30899|       |
30900|       |    /* Compile condition */
30901|  6.76k|    janetc_scope(&condscope, c, 0, "if");
30902|       |
30903|  6.76k|    Janet condform = argv[0];
30904|  6.76k|    if (janetc_check_nil_form(condform, &condform, JANET_FUN_EQ)) {
  ------------------
  |  |  970|  6.76k|#define JANET_FUN_EQ 24
  ------------------
  |  Branch (30904:9): [True: 0, False: 6.76k]
  ------------------
30905|      0|        ifnjmp = JOP_JUMP_IF_NOT_NIL;
30906|  6.76k|    } else if (janetc_check_nil_form(condform, &condform, JANET_FUN_NEQ)) {
  ------------------
  |  |  971|  6.76k|#define JANET_FUN_NEQ 25
  ------------------
  |  Branch (30906:16): [True: 0, False: 6.76k]
  ------------------
30907|      0|        ifnjmp = JOP_JUMP_IF_NIL;
30908|      0|    }
30909|       |
30910|  6.76k|    cond = janetc_value(condopts, condform);
30911|       |
30912|       |    /* Check constant condition. */
30913|       |    /* TODO: Use type info for more short circuits */
30914|  6.76k|    if (cond.flags & JANET_SLOT_CONSTANT) {
  ------------------
  |  |  991|  6.76k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (30914:9): [True: 747, False: 6.01k]
  ------------------
30915|    747|        int swap_condition = 0;
30916|    747|        if (ifnjmp == JOP_JUMP_IF_NOT && !janet_truthy(cond.constant)) swap_condition = 1;
  ------------------
  |  |  818|    747|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|  1.49k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 747]
  |  |  |  |  ------------------
  |  |  |  |  807|  1.49k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!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.49k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|    747|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|    747|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    747|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    747|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 671, False: 76]
  |  |  ------------------
  |  |  819|    747|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|  1.34k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 671]
  |  |  |  |  ------------------
  |  |  |  |  807|  1.34k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!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.34k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|    671|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|    671|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    671|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    671|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 571, False: 100]
  |  |  |  Branch (819:47): [True: 89, False: 11]
  |  |  ------------------
  ------------------
  |  Branch (30916:13): [True: 747, False: 0]
  ------------------
30917|    747|        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 (30917:13): [True: 0, False: 747]
  ------------------
30918|    747|        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 (30918:13): [True: 0, False: 747]
  |  Branch (30918:46): [True: 0, False: 0]
  ------------------
30919|    747|        if (swap_condition) {
  ------------------
  |  Branch (30919:13): [True: 87, False: 660]
  ------------------
30920|       |            /* Swap the true and false bodies */
30921|     87|            Janet temp = falsebody;
30922|     87|            falsebody = truebody;
30923|     87|            truebody = temp;
30924|     87|        }
30925|    747|        janetc_scope(&tempscope, c, 0, "if-true");
30926|    747|        right = janetc_value(bodyopts, truebody);
30927|    747|        if (!drop && !tail) janetc_copy(c, target, right);
  ------------------
  |  Branch (30927:13): [True: 738, False: 9]
  |  Branch (30927:22): [True: 221, False: 517]
  ------------------
30928|    747|        janetc_popscope(c);
30929|    747|        if (!janet_checktype(falsebody, JANET_NIL)) {
  ------------------
  |  |  806|    747|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 747]
  |  |  ------------------
  |  |  807|    747|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    747|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    747|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    747|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    747|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    747|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30929:13): [True: 712, False: 35]
  ------------------
30930|    712|            janetc_throwaway(bodyopts, falsebody);
30931|    712|        }
30932|    747|        janetc_popscope(c);
30933|    747|        return target;
30934|    747|    }
30935|       |
30936|       |    /* Compile jump to right */
30937|  6.01k|    labeljr = janetc_emit_si(c, ifnjmp, cond, 0, 0);
30938|       |
30939|       |    /* Condition left body */
30940|  6.01k|    janetc_scope(&tempscope, c, 0, "if-true");
30941|  6.01k|    left = janetc_value(bodyopts, truebody);
30942|  6.01k|    if (!drop && !tail) janetc_copy(c, target, left);
  ------------------
  |  Branch (30942:9): [True: 5.99k, False: 20]
  |  Branch (30942:18): [True: 1.22k, False: 4.77k]
  ------------------
30943|  6.01k|    janetc_popscope(c);
30944|       |
30945|       |    /* Compile jump to done */
30946|  6.01k|    labeljd = janet_v_count(c->buffer);
  ------------------
  |  |  714|  6.01k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  6.01k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  6.01k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 6.01k, False: 0]
  |  |  ------------------
  ------------------
30947|  6.01k|    if (!tail && !(drop && janet_checktype(falsebody, JANET_NIL))) janetc_emit(c, JOP_JUMP);
  ------------------
  |  |  806|     20|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 3, False: 17]
  |  |  |  Branch (806:6): [Folded, False: 20]
  |  |  ------------------
  |  |  807|     20|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|     20|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     20|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     20|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     20|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     20|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30947:9): [True: 1.24k, False: 4.77k]
  |  Branch (30947:20): [True: 20, False: 1.22k]
  ------------------
30948|       |
30949|       |    /* Compile right body */
30950|  6.01k|    labelr = janet_v_count(c->buffer);
  ------------------
  |  |  714|  6.01k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  6.01k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  6.01k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 6.01k, False: 0]
  |  |  ------------------
  ------------------
30951|  6.01k|    janetc_scope(&tempscope, c, 0, "if-false");
30952|  6.01k|    right = janetc_value(bodyopts, falsebody);
30953|  6.01k|    if (!drop && !tail) janetc_copy(c, target, right);
  ------------------
  |  Branch (30953:9): [True: 5.99k, False: 20]
  |  Branch (30953:18): [True: 1.22k, False: 4.77k]
  ------------------
30954|  6.01k|    janetc_popscope(c);
30955|       |
30956|       |    /* Pop main scope */
30957|  6.01k|    janetc_popscope(c);
30958|       |
30959|       |    /* Write jumps - only add jump lengths if jump actually emitted */
30960|  6.01k|    labeld = janet_v_count(c->buffer);
  ------------------
  |  |  714|  6.01k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  6.01k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  6.01k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 6.01k, False: 0]
  |  |  ------------------
  ------------------
30961|  6.01k|    if (labeljr < labeld) {
  ------------------
  |  Branch (30961:9): [True: 6.01k, False: 0]
  ------------------
30962|  6.01k|        check_16bit_jump(c, labeljr, labelr);
30963|  6.01k|        c->buffer[labeljr] |= (uint32_t) (labelr - labeljr) << 16;
30964|  6.01k|        if (!tail && labeljd < labeld) {
  ------------------
  |  Branch (30964:13): [True: 1.24k, False: 4.77k]
  |  Branch (30964:22): [True: 1.24k, False: 3]
  ------------------
30965|  1.24k|            check_24bit_jump(c, labeljd, labeld);
30966|  1.24k|            c->buffer[labeljd] |= (uint32_t) (labeld - labeljd) << 8;
30967|  1.24k|        }
30968|  6.01k|    }
30969|       |
30970|  6.01k|    if (tail) target.flags |= JANET_SLOT_RETURNED;
  ------------------
  |  |  995|  4.77k|#define JANET_SLOT_RETURNED 0x100000
  ------------------
  |  Branch (30970:9): [True: 4.77k, False: 1.24k]
  ------------------
30971|  6.01k|    return target;
30972|  6.76k|}
janet.c:janetc_check_nil_form:
30840|  16.9k|static int janetc_check_nil_form(Janet x, Janet *capture, uint32_t fun_tag) {
30841|  16.9k|    if (!janet_checktype(x, JANET_TUPLE)) return 0;
  ------------------
  |  |  806|  16.9k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 16.9k]
  |  |  ------------------
  |  |  807|  16.9k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  16.9k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  16.9k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  16.9k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  16.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  16.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30841:9): [True: 11.4k, False: 5.53k]
  ------------------
30842|  5.53k|    JanetTuple tup = janet_unwrap_tuple(x);
  ------------------
  |  |  858|  5.53k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
30843|  5.53k|    if (3 != janet_tuple_length(tup)) return 0;
  ------------------
  |  | 1801|  5.53k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|  5.53k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (30843:9): [True: 2.45k, False: 3.07k]
  ------------------
30844|  3.07k|    Janet op1 = tup[0];
30845|  3.07k|    if (!janet_checktype(op1, JANET_FUNCTION)) return 0;
  ------------------
  |  |  806|  3.07k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 3.07k]
  |  |  ------------------
  |  |  807|  3.07k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.07k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  3.07k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  3.07k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.07k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.07k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30845:9): [True: 570, False: 2.50k]
  ------------------
30846|  2.50k|    JanetFunction *fun = janet_unwrap_function(op1);
  ------------------
  |  |  868|  2.50k|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
30847|  2.50k|    uint32_t tag = fun->def->flags & JANET_FUNCDEF_FLAG_TAG;
  ------------------
  |  | 1108|  2.50k|#define JANET_FUNCDEF_FLAG_TAG 0xFFFF
  ------------------
30848|  2.50k|    if (tag != fun_tag) return 0;
  ------------------
  |  Branch (30848:9): [True: 1.25k, False: 1.25k]
  ------------------
30849|  1.25k|    if (janet_checktype(tup[1], JANET_NIL)) {
  ------------------
  |  |  806|  1.25k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1.24k, False: 4]
  |  |  |  Branch (806:6): [Folded, False: 1.25k]
  |  |  ------------------
  |  |  807|  1.25k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.25k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.25k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.25k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.25k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.25k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30850|  1.24k|        *capture = tup[2];
30851|  1.24k|        return 1;
30852|  1.24k|    } else if (janet_checktype(tup[2], JANET_NIL)) {
  ------------------
  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30853|      0|        *capture = tup[1];
30854|      0|        return 1;
30855|      0|    }
30856|      4|    return 0;
30857|  1.25k|}
janet.c:janetc_quasiquote:
30374|   305k|static JanetSlot janetc_quasiquote(JanetFopts opts, int32_t argn, const Janet *argv) {
30375|   305k|    if (argn != 1) {
  ------------------
  |  Branch (30375:9): [True: 5, False: 305k]
  ------------------
30376|      5|        janetc_cerror(opts.compiler, "expected 1 argument to quasiquote");
30377|      5|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|      5|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|      5|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      5|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      5|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30378|      5|    }
30379|   305k|    return quasiquote(opts, argv[0], opts.compiler->recursion_guard, 0);
30380|   305k|}
janet.c:quasiquote:
30313|  2.58M|static JanetSlot quasiquote(JanetFopts opts, Janet x, int depth, int level) {
30314|  2.58M|    if (depth == 0) {
  ------------------
  |  Branch (30314:9): [True: 37, False: 2.58M]
  ------------------
30315|     37|        janetc_cerror(opts.compiler, "quasiquote too deeply nested");
30316|     37|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|     37|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     37|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     37|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     37|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30317|     37|    }
30318|  2.58M|    JanetSlot *slots = NULL;
30319|  2.58M|    JanetFopts subopts = opts;
30320|  2.58M|    subopts.flags &= ~JANET_FOPTS_HINT;
  ------------------
  |  | 1100|  2.58M|#define JANET_FOPTS_HINT 0x20000
  ------------------
30321|  2.58M|    switch (janet_type(x)) {
  ------------------
  |  |  795|  2.58M|    (isnan((x).number) \
  |  |  796|  2.58M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|  2.58M|        : JANET_NUMBER)
  ------------------
  |  Branch (30321:13): [True: 2.57M, False: 9.74k]
  ------------------
30322|  1.51M|        default:
  ------------------
  |  Branch (30322:9): [True: 1.51M, False: 1.06M]
  ------------------
30323|  1.51M|            return janetc_cslot(x);
30324|  1.05M|        case JANET_TUPLE: {
  ------------------
  |  Branch (30324:9): [True: 1.05M, False: 1.53M]
  ------------------
30325|  1.05M|            int32_t i, len;
30326|  1.05M|            const Janet *tup = janet_unwrap_tuple(x);
  ------------------
  |  |  858|  1.05M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
30327|  1.05M|            len = janet_tuple_length(tup);
  ------------------
  |  | 1801|  1.05M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|  1.05M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
30328|  1.05M|            if (len > 1 && janet_checktype(tup[0], JANET_SYMBOL)) {
  ------------------
  |  |  806|   993k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 992k, False: 1.56k]
  |  |  |  Branch (806:6): [Folded, False: 993k]
  |  |  ------------------
  |  |  807|   993k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   993k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   993k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   993k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   993k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   993k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30328:17): [True: 993k, False: 63.8k]
  ------------------
30329|   992k|                const uint8_t *head = janet_unwrap_symbol(tup[0]);
  ------------------
  |  |  864|   992k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
30330|   992k|                if (!janet_cstrcmp(head, "unquote")) {
  ------------------
  |  Branch (30330:21): [True: 10.8k, False: 981k]
  ------------------
30331|  10.8k|                    if (level == 0) {
  ------------------
  |  Branch (30331:25): [True: 535, False: 10.3k]
  ------------------
30332|    535|                        JanetFopts subopts = janetc_fopts_default(opts.compiler);
30333|    535|                        subopts.flags |= JANET_FOPTS_ACCEPT_SPLICE;
  ------------------
  |  | 1102|    535|#define JANET_FOPTS_ACCEPT_SPLICE 0x80000
  ------------------
30334|    535|                        return janetc_value(subopts, tup[1]);
30335|  10.3k|                    } else {
30336|  10.3k|                        level--;
30337|  10.3k|                    }
30338|   981k|                } else if (!janet_cstrcmp(head, "quasiquote")) {
  ------------------
  |  Branch (30338:28): [True: 672k, False: 308k]
  ------------------
30339|   672k|                    level++;
30340|   672k|                }
30341|   992k|            }
30342|  3.33M|            for (i = 0; i < len; i++)
  ------------------
  |  Branch (30342:25): [True: 2.27M, False: 1.05M]
  ------------------
30343|  2.27M|                janet_v_push(slots, quasiquote(subopts, tup[i], depth - 1, level));
  ------------------
  |  |  712|  3.33M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  2.27M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  2.27M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  1.28M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  1.28M|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  1.28M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  1.28M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 993k, False: 1.28M]
  |  |  |  |  |  |  |  Branch (723:50): [True: 1.12M, False: 157k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|  2.11M|#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))
  |  |  ------------------
  |  |  |  |  721|  2.27M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  2.27M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30344|  1.05M|            return qq_slots(opts, slots, (janet_tuple_flag(tup) & JANET_TUPLE_FLAG_BRACKETCTOR)
  ------------------
  |  | 1805|  1.05M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1799|  1.05M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                          return qq_slots(opts, slots, (janet_tuple_flag(tup) & JANET_TUPLE_FLAG_BRACKETCTOR)
  ------------------
  |  | 1797|  1.05M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (30344:42): [True: 63.5k, False: 993k]
  ------------------
30345|  1.05M|                            ? JOP_MAKE_BRACKET_TUPLE
30346|  1.05M|                            : JOP_MAKE_TUPLE);
30347|  1.05M|        }
30348|    356|        case JANET_ARRAY: {
  ------------------
  |  Branch (30348:9): [True: 356, False: 2.58M]
  ------------------
30349|    356|            int32_t i;
30350|    356|            JanetArray *array = janet_unwrap_array(x);
  ------------------
  |  |  860|    356|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
30351|  3.73k|            for (i = 0; i < array->count; i++)
  ------------------
  |  Branch (30351:25): [True: 3.37k, False: 356]
  ------------------
30352|  3.37k|                janet_v_push(slots, quasiquote(subopts, array->data[i], depth - 1, level));
  ------------------
  |  |  712|  3.73k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  3.37k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  3.37k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  3.10k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  3.10k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  3.10k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  3.10k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 271, False: 3.10k]
  |  |  |  |  |  |  |  Branch (723:50): [True: 473, False: 2.63k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|    744|#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))
  |  |  ------------------
  |  |  |  |  721|  3.37k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  3.37k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30353|    356|            return qq_slots(opts, slots, JOP_MAKE_ARRAY);
30354|  1.05M|        }
30355|    114|        case JANET_TABLE:
  ------------------
  |  Branch (30355:9): [True: 114, False: 2.58M]
  ------------------
30356|  10.8k|        case JANET_STRUCT: {
  ------------------
  |  Branch (30356:9): [True: 10.7k, False: 2.57M]
  ------------------
30357|  10.8k|            const JanetKV *kv = NULL, *kvs = NULL;
30358|  10.8k|            int32_t len, cap = 0;
30359|  10.8k|            janet_dictionary_view(x, &kvs, &len, &cap);
30360|  12.6k|            while ((kv = janet_dictionary_next(kvs, cap, kv))) {
  ------------------
  |  Branch (30360:20): [True: 1.82k, False: 10.8k]
  ------------------
30361|  1.82k|                JanetSlot key = quasiquote(subopts, kv->key, depth - 1, level);
30362|  1.82k|                JanetSlot value =  quasiquote(subopts, kv->value, depth - 1, level);
30363|  1.82k|                key.flags &= ~JANET_SLOT_SPLICED;
  ------------------
  |  |  999|  1.82k|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
30364|  1.82k|                value.flags &= ~JANET_SLOT_SPLICED;
  ------------------
  |  |  999|  1.82k|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
30365|  1.82k|                janet_v_push(slots, key);
  ------------------
  |  |  712|  1.82k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  1.82k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  1.82k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  1.06k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  1.06k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  1.06k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  1.06k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 755, False: 1.06k]
  |  |  |  |  |  |  |  Branch (723:50): [True: 481, False: 588]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|  1.23k|#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))
  |  |  ------------------
  |  |  |  |  721|  1.82k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  1.82k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30366|  1.82k|                janet_v_push(slots, value);
  ------------------
  |  |  712|  1.82k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  724|  1.82k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  723|  1.82k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  721|  1.82k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  1.82k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  720|  1.82k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  719|  1.82k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (723:35): [True: 0, False: 1.82k]
  |  |  |  |  |  |  |  Branch (723:50): [True: 1.30k, False: 517]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  725|  1.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))
  |  |  ------------------
  |  |  |  |  721|  1.82k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  1.82k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30367|  1.82k|            }
30368|  10.8k|            return qq_slots(opts, slots,
30369|  10.8k|                            janet_checktype(x, JANET_TABLE) ? JOP_MAKE_TABLE : JOP_MAKE_STRUCT);
  ------------------
  |  |  806|  10.8k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 114, False: 10.7k]
  |  |  |  Branch (806:6): [Folded, False: 10.8k]
  |  |  ------------------
  |  |  807|  10.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|  10.8k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  10.8k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  10.8k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  10.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  10.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30370|    114|        }
30371|  2.58M|    }
30372|  2.58M|}
janet.c:qq_slots:
30305|  1.06M|static JanetSlot qq_slots(JanetFopts opts, JanetSlot *slots, int makeop) {
30306|  1.06M|    JanetSlot target = janetc_gettarget(opts);
30307|  1.06M|    janetc_pushslots(opts.compiler, slots);
30308|  1.06M|    janetc_freeslots(opts.compiler, slots);
30309|  1.06M|    janetc_emit_s(opts.compiler, makeop, target, 1);
30310|  1.06M|    return target;
30311|  1.06M|}
janet.c:janetc_quote:
30282|  28.9k|static JanetSlot janetc_quote(JanetFopts opts, int32_t argn, const Janet *argv) {
30283|  28.9k|    if (argn != 1) {
  ------------------
  |  Branch (30283:9): [True: 1, False: 28.9k]
  ------------------
30284|      1|        janetc_cerror(opts.compiler, "expected 1 argument to quote");
30285|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30286|      1|    }
30287|  28.9k|    return janetc_cslot(argv[0]);
30288|  28.9k|}
janet.c:janetc_varset:
30524|  1.77k|static JanetSlot janetc_varset(JanetFopts opts, int32_t argn, const Janet *argv) {
30525|  1.77k|    if (argn != 2) {
  ------------------
  |  Branch (30525:9): [True: 0, False: 1.77k]
  ------------------
30526|      0|        janetc_cerror(opts.compiler, "expected 2 arguments to set");
30527|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30528|      0|    }
30529|  1.77k|    JanetFopts subopts = janetc_fopts_default(opts.compiler);
30530|  1.77k|    if (janet_checktype(argv[0], JANET_SYMBOL)) {
  ------------------
  |  |  806|  1.77k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 1.75k, False: 17]
  |  |  |  Branch (806:6): [Folded, False: 1.77k]
  |  |  ------------------
  |  |  807|  1.77k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.77k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.77k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.77k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.77k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.77k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30531|       |        /* Normal var - (set a 1) */
30532|  1.75k|        const uint8_t *sym = janet_unwrap_symbol(argv[0]);
  ------------------
  |  |  864|  1.75k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
30533|  1.75k|        JanetSlot dest = janetc_resolve(opts.compiler, sym);
30534|  1.75k|        if (!(dest.flags & JANET_SLOT_MUTABLE)) {
  ------------------
  |  |  993|  1.75k|#define JANET_SLOT_MUTABLE 0x40000
  ------------------
  |  Branch (30534:13): [True: 1, False: 1.75k]
  ------------------
30535|      1|            janetc_cerror(opts.compiler, "cannot set constant");
30536|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30537|      1|        }
30538|  1.75k|        subopts.flags = JANET_FOPTS_HINT;
  ------------------
  |  | 1100|  1.75k|#define JANET_FOPTS_HINT 0x20000
  ------------------
30539|  1.75k|        subopts.hint = dest;
30540|  1.75k|        JanetSlot ret = janetc_value(subopts, argv[1]);
30541|  1.75k|        janetc_copy(opts.compiler, dest, ret);
30542|  1.75k|        return ret;
30543|  1.75k|    } else if (janet_checktype(argv[0], JANET_TUPLE)) {
  ------------------
  |  |  806|     17|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 17, False: 0]
  |  |  |  Branch (806:6): [Folded, False: 17]
  |  |  ------------------
  |  |  807|     17|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|     17|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|     17|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     17|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     17|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30544|       |        /* Set a field (setf behavior) - (set (tab :key) 2) */
30545|     17|        const Janet *tup = janet_unwrap_tuple(argv[0]);
  ------------------
  |  |  858|     17|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
30546|       |        /* Tuple must have 2 elements */
30547|     17|        if (janet_tuple_length(tup) != 2) {
  ------------------
  |  | 1801|     17|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1799|     17|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (30547:13): [True: 0, False: 17]
  ------------------
30548|      0|            janetc_cerror(opts.compiler, "expected 2 element tuple for l-value to set");
30549|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30550|      0|        }
30551|     17|        JanetSlot ds = janetc_value(subopts, tup[0]);
30552|     17|        JanetSlot key = janetc_value(subopts, tup[1]);
30553|       |        /* Can't be tail position because we will emit a PUT instruction afterwards */
30554|       |        /* Also can't drop either */
30555|     17|        opts.flags &= ~(JANET_FOPTS_TAIL | JANET_FOPTS_DROP);
  ------------------
  |  | 1099|     17|#define JANET_FOPTS_TAIL 0x10000
  ------------------
                      opts.flags &= ~(JANET_FOPTS_TAIL | JANET_FOPTS_DROP);
  ------------------
  |  | 1101|     17|#define JANET_FOPTS_DROP 0x40000
  ------------------
30556|     17|        JanetSlot rvalue = janetc_value(opts, argv[1]);
30557|       |        /* Emit the PUT instruction */
30558|     17|        janetc_emit_sss(opts.compiler, JOP_PUT, ds, key, rvalue, 0);
30559|     17|        return rvalue;
30560|     17|    } else {
30561|       |        /* Error */
30562|      0|        janetc_cerror(opts.compiler, "expected symbol or tuple for l-value to set");
30563|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30564|      0|    }
30565|  1.77k|}
janet.c:janetc_splice:
30290|  4.84k|static JanetSlot janetc_splice(JanetFopts opts, int32_t argn, const Janet *argv) {
30291|  4.84k|    JanetSlot ret;
30292|  4.84k|    if (!(opts.flags & JANET_FOPTS_ACCEPT_SPLICE)) {
  ------------------
  |  | 1102|  4.84k|#define JANET_FOPTS_ACCEPT_SPLICE 0x80000
  ------------------
  |  Branch (30292:9): [True: 33, False: 4.80k]
  ------------------
30293|     33|        janetc_cerror(opts.compiler, "splice can only be used in function parameters and data constructors, it has no effect here");
30294|     33|        return janetc_cslot(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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30295|     33|    }
30296|  4.80k|    if (argn != 1) {
  ------------------
  |  Branch (30296:9): [True: 3, False: 4.80k]
  ------------------
30297|      3|        janetc_cerror(opts.compiler, "expected 1 argument to splice");
30298|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30299|      3|    }
30300|  4.80k|    ret = janetc_value(opts, argv[0]);
30301|  4.80k|    ret.flags |= JANET_SLOT_SPLICED;
  ------------------
  |  |  999|  4.80k|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
30302|  4.80k|    return ret;
30303|  4.80k|}
janet.c:janetc_unquote:
30382|     42|static JanetSlot janetc_unquote(JanetFopts opts, int32_t argn, const Janet *argv) {
30383|     42|    (void) argn;
30384|     42|    (void) argv;
30385|     42|    janetc_cerror(opts.compiler, "cannot use unquote here");
30386|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30387|     42|}
janet.c:janetc_var:
30748|  1.44k|static JanetSlot janetc_var(JanetFopts opts, int32_t argn, const Janet *argv) {
30749|  1.44k|    JanetCompiler *c = opts.compiler;
30750|  1.44k|    JanetTable *attr_table = handleattr(c, "var", argn, argv);
30751|  1.44k|    if (c->result.status == JANET_COMPILE_ERROR) {
  ------------------
  |  Branch (30751:9): [True: 24, False: 1.42k]
  ------------------
30752|     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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30753|     24|    }
30754|  1.42k|    check_metadata_lint(c, attr_table);
30755|  1.42k|    SlotHeadPair *into = NULL;
30756|  1.42k|    into = dohead_destructure(c, into, opts, argv[0], argv[argn - 1]);
30757|  1.42k|    if (c->result.status == JANET_COMPILE_ERROR) {
  ------------------
  |  Branch (30757:9): [True: 0, False: 1.42k]
  ------------------
30758|      0|        janet_v_free(into);
  ------------------
  |  |  711|      0|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  719|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (711:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
30759|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30760|      0|    }
30761|  1.42k|    JanetSlot ret = janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|  1.42k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  1.42k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.42k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.42k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30762|  2.84k|    for (int32_t i = 0; i < janet_v_count(into); i++) {
  ------------------
  |  |  714|  2.84k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  2.84k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  2.84k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 2.84k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (30762:25): [True: 1.42k, False: 1.42k]
  ------------------
30763|  1.42k|        destructure(c, into[i].lhs, into[i].rhs, varleaf, attr_table);
30764|  1.42k|        ret = into[i].rhs;
30765|  1.42k|    }
30766|       |    janet_v_free(into);
  ------------------
  |  |  711|  1.42k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  719|  1.42k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (711:34): [True: 1.42k, False: 0]
  |  |  ------------------
  ------------------
30767|  1.42k|    return ret;
30768|  1.42k|}
janet.c:varleaf:
30704|  8.90k|    JanetTable *reftab) {
30705|  8.90k|    if (c->scope->flags & JANET_SCOPE_TOP) {
  ------------------
  |  | 1013|  8.90k|#define JANET_SCOPE_TOP 4
  ------------------
  |  Branch (30705:9): [True: 3.04k, False: 5.85k]
  ------------------
30706|       |        /* Global var, generate var */
30707|  3.04k|        JanetSlot refslot;
30708|  3.04k|        JanetTable *entry = janet_table_clone(reftab);
30709|       |
30710|  3.04k|        int is_redef = c->is_redef;
30711|       |
30712|  3.04k|        JanetArray *ref;
30713|  3.04k|        JanetBinding old_binding;
30714|  3.04k|        if (is_redef && (old_binding = janet_resolve_ext(c->env, sym),
  ------------------
  |  Branch (30714:13): [True: 0, False: 3.04k]
  |  Branch (30714:25): [True: 0, False: 0]
  ------------------
30715|      0|                         old_binding.type == JANET_BINDING_VAR)) {
30716|      0|            ref = janet_unwrap_array(old_binding.value);
  ------------------
  |  |  860|      0|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
30717|  3.04k|        } else {
30718|  3.04k|            ref = janet_array(1);
30719|  3.04k|            janet_array_push(ref, janet_wrap_nil());
  ------------------
  |  |  831|  3.04k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  3.04k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30720|  3.04k|        }
30721|       |
30722|  3.04k|        janet_table_put(entry, janet_ckeywordv("ref"), janet_wrap_array(ref));
  ------------------
  |  | 1842|  3.04k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  3.04k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  3.04k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  3.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  3.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      janet_table_put(entry, janet_ckeywordv("ref"), janet_wrap_array(ref));
  ------------------
  |  |  845|  3.04k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  3.04k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30723|  3.04k|        janet_table_put(entry, janet_ckeywordv("source-map"),
  ------------------
  |  | 1842|  3.04k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  3.04k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  3.04k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  3.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  3.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30724|  3.04k|                        janet_wrap_tuple(janetc_make_sourcemap(c)));
  ------------------
  |  |  843|  3.04k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  3.04k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30725|  3.04k|        janet_table_put(c->env, janet_wrap_symbol(sym), janet_wrap_table(entry));
  ------------------
  |  |  849|  3.04k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  828|  3.04k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      janet_table_put(c->env, janet_wrap_symbol(sym), janet_wrap_table(entry));
  ------------------
  |  |  846|  3.04k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|  3.04k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30726|  3.04k|        refslot = janetc_cslot(janet_wrap_array(ref));
  ------------------
  |  |  845|  3.04k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  3.04k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  3.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  3.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30727|  3.04k|        janetc_emit_ssu(c, JOP_PUT_INDEX, refslot, s, 0, 0);
30728|  3.04k|        return 1;
30729|  5.85k|    } else {
30730|  5.85k|        int no_unused = reftab && reftab->count && janet_truthy(janet_table_get_keyword(reftab, "unused"));
  ------------------
  |  |  818|  5.94k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|    168|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 84]
  |  |  |  |  ------------------
  |  |  |  |  807|    168|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|    168|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|     84|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|     84|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     84|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     84|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 0, False: 84]
  |  |  ------------------
  |  |  819|  5.94k|     (!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 (30730:25): [True: 5.85k, False: 0]
  |  Branch (30730:35): [True: 84, False: 5.77k]
  ------------------
30731|  5.85k|        int no_shadow = reftab && reftab->count && janet_truthy(janet_table_get_keyword(reftab, "shadow"));
  ------------------
  |  |  818|  5.94k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|    168|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 84]
  |  |  |  |  ------------------
  |  |  |  |  807|    168|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|    168|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|     84|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|     84|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     84|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     84|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 0, False: 84]
  |  |  ------------------
  |  |  819|  5.94k|     (!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 (30731:25): [True: 5.85k, False: 0]
  |  Branch (30731:35): [True: 84, False: 5.77k]
  ------------------
30732|  5.85k|        uint32_t def_flags = 0;
30733|  5.85k|        if (no_unused) def_flags |= JANET_DEFFLAG_NO_UNUSED;
  ------------------
  |  | 1135|      0|#define JANET_DEFFLAG_NO_UNUSED 2
  ------------------
  |  Branch (30733:13): [True: 0, False: 5.85k]
  ------------------
30734|  5.85k|        if (no_shadow) def_flags |= JANET_DEFFLAG_NO_SHADOWCHECK;
  ------------------
  |  | 1134|      0|#define JANET_DEFFLAG_NO_SHADOWCHECK 1
  ------------------
  |  Branch (30734:13): [True: 0, False: 5.85k]
  ------------------
30735|  5.85k|        return namelocal(c, sym, JANET_SLOT_MUTABLE, s, def_flags);
  ------------------
  |  |  993|  5.85k|#define JANET_SLOT_MUTABLE 0x40000
  ------------------
30736|  5.85k|    }
30737|  8.90k|}
janet.c:janetc_while:
31095|  1.72k|static JanetSlot janetc_while(JanetFopts opts, int32_t argn, const Janet *argv) {
31096|  1.72k|    JanetCompiler *c = opts.compiler;
31097|  1.72k|    JanetSlot cond;
31098|  1.72k|    JanetFopts subopts = janetc_fopts_default(c);
31099|  1.72k|    JanetScope tempscope;
31100|  1.72k|    int32_t labelwt, labeld, labeljt, labelc, i;
31101|  1.72k|    int infinite = 0;
31102|  1.72k|    int is_nil_form = 0;
31103|  1.72k|    int is_notnil_form = 0;
31104|  1.72k|    uint8_t ifjmp = JOP_JUMP_IF;
31105|  1.72k|    uint8_t ifnjmp = JOP_JUMP_IF_NOT;
31106|       |
31107|  1.72k|    if (argn < 1) {
  ------------------
  |  Branch (31107:9): [True: 0, False: 1.72k]
  ------------------
31108|      0|        janetc_cerror(c, "expected at least 1 argument to while");
31109|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31110|      0|    }
31111|       |
31112|  1.72k|    labelwt = janet_v_count(c->buffer);
  ------------------
  |  |  714|  1.72k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|  1.60k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  1.60k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 1.60k, False: 116]
  |  |  ------------------
  ------------------
31113|       |
31114|  1.72k|    janetc_scope(&tempscope, c, JANET_SCOPE_WHILE, "while");
  ------------------
  |  | 1016|  1.72k|#define JANET_SCOPE_WHILE 32
  ------------------
31115|       |
31116|       |    /* Check for `(= nil _)` or `(not= nil _)` in condition, and if so, use the
31117|       |     * jmpnl or jmpnn instructions. This let's us implement `(each ...)`
31118|       |     * more efficiently. */
31119|  1.72k|    Janet condform = argv[0];
31120|  1.72k|    if (janetc_check_nil_form(condform, &condform, JANET_FUN_EQ)) {
  ------------------
  |  |  970|  1.72k|#define JANET_FUN_EQ 24
  ------------------
  |  Branch (31120:9): [True: 0, False: 1.72k]
  ------------------
31121|      0|        is_nil_form = 1;
31122|      0|        ifjmp = JOP_JUMP_IF_NIL;
31123|      0|        ifnjmp = JOP_JUMP_IF_NOT_NIL;
31124|      0|    }
31125|  1.72k|    if (janetc_check_nil_form(condform, &condform, JANET_FUN_NEQ)) {
  ------------------
  |  |  971|  1.72k|#define JANET_FUN_NEQ 25
  ------------------
  |  Branch (31125:9): [True: 1.24k, False: 476]
  ------------------
31126|  1.24k|        is_notnil_form = 1;
31127|  1.24k|        ifjmp = JOP_JUMP_IF_NOT_NIL;
31128|  1.24k|        ifnjmp = JOP_JUMP_IF_NIL;
31129|  1.24k|    }
31130|       |
31131|       |    /* Compile condition */
31132|  1.72k|    cond = janetc_value(subopts, condform);
31133|       |
31134|       |    /* Check for constant condition */
31135|  1.72k|    if (cond.flags & JANET_SLOT_CONSTANT) {
  ------------------
  |  |  991|  1.72k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (31135:9): [True: 236, False: 1.48k]
  ------------------
31136|       |        /* Loop never executes */
31137|    236|        int never_executes = is_nil_form
  ------------------
  |  Branch (31137:30): [True: 0, False: 236]
  ------------------
31138|    236|                             ? !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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31139|    236|                             : is_notnil_form
  ------------------
  |  Branch (31139:32): [True: 0, False: 236]
  ------------------
31140|    236|                             ? 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31141|    236|                             : !janet_truthy(cond.constant);
  ------------------
  |  |  818|    236|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|    472|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 236]
  |  |  |  |  ------------------
  |  |  |  |  807|    472|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|    472|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|    236|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|    236|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    236|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    236|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 211, False: 25]
  |  |  ------------------
  |  |  819|    236|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|    422|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 211]
  |  |  |  |  ------------------
  |  |  |  |  807|    422|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|    422|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|    211|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|    211|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    211|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    211|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 211, False: 0]
  |  |  |  Branch (819:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
31142|    236|        if (never_executes) {
  ------------------
  |  Branch (31142:13): [True: 25, False: 211]
  ------------------
31143|     25|            janetc_popscope(c);
31144|     25|            return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|     25|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|     25|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     25|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     25|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31145|     25|        }
31146|       |        /* Infinite loop */
31147|    211|        infinite = 1;
31148|    211|    }
31149|       |
31150|       |    /* Infinite loop does not need to check condition */
31151|  1.69k|    labelc = infinite
  ------------------
  |  Branch (31151:14): [True: 211, False: 1.48k]
  ------------------
31152|  1.69k|             ? 0
31153|  1.69k|             : janetc_emit_si(c, ifnjmp, cond, 0, 0);
31154|       |
31155|       |    /* Compile body */
31156|  48.6k|    for (i = 1; i < argn; i++) {
  ------------------
  |  Branch (31156:17): [True: 46.9k, False: 1.69k]
  ------------------
31157|  46.9k|        subopts.flags = JANET_FOPTS_DROP;
  ------------------
  |  | 1101|  46.9k|#define JANET_FOPTS_DROP 0x40000
  ------------------
31158|  46.9k|        janetc_freeslot(c, janetc_value(subopts, argv[i]));
31159|  46.9k|    }
31160|       |
31161|       |    /* Check if closure created in while scope. If so,
31162|       |     * recompile in a function scope. */
31163|  1.69k|    if (tempscope.flags & JANET_SCOPE_CLOSURE) {
  ------------------
  |  | 1015|  1.69k|#define JANET_SCOPE_CLOSURE 16
  ------------------
  |  Branch (31163:9): [True: 988, False: 711]
  ------------------
31164|    988|        subopts = janetc_fopts_default(c);
31165|    988|        tempscope.flags |= JANET_SCOPE_UNUSED;
  ------------------
  |  | 1014|    988|#define JANET_SCOPE_UNUSED 8
  ------------------
31166|    988|        janetc_popscope(c);
31167|    988|        if (c->buffer) janet_v__cnt(c->buffer) = labelwt;
  ------------------
  |  |  721|    985|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  ------------------
  |  |  |  |  719|    985|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
  |  Branch (31167:13): [True: 985, False: 3]
  ------------------
31168|    988|        if (c->mapbuffer) janet_v__cnt(c->mapbuffer) = labelwt;
  ------------------
  |  |  721|    985|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  ------------------
  |  |  |  |  719|    985|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
  |  Branch (31168:13): [True: 985, False: 3]
  ------------------
31169|       |
31170|    988|        janetc_scope(&tempscope, c, JANET_SCOPE_FUNCTION, "while-iife");
  ------------------
  |  | 1011|    988|#define JANET_SCOPE_FUNCTION 1
  ------------------
31171|       |
31172|       |        /* Recompile in the function scope */
31173|    988|        cond = janetc_value(subopts, condform);
31174|    988|        if (!(cond.flags & JANET_SLOT_CONSTANT)) {
  ------------------
  |  |  991|    988|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (31174:13): [True: 917, False: 71]
  ------------------
31175|       |            /* If not an infinite loop, return nil when condition false */
31176|    917|            janetc_emit_si(c, ifjmp, cond, 2, 0);
31177|    917|            janetc_emit(c, JOP_RETURN_NIL);
31178|    917|        }
31179|  42.2k|        for (i = 1; i < argn; i++) {
  ------------------
  |  Branch (31179:21): [True: 41.2k, False: 988]
  ------------------
31180|  41.2k|            subopts.flags = JANET_FOPTS_DROP;
  ------------------
  |  | 1101|  41.2k|#define JANET_FOPTS_DROP 0x40000
  ------------------
31181|  41.2k|            janetc_freeslot(c, janetc_value(subopts, argv[i]));
31182|  41.2k|        }
31183|       |        /* But now add tail recursion */
31184|    988|        int32_t tempself = janetc_regalloc_temp(&tempscope.ra, JANETC_REGTEMP_0);
31185|    988|        janetc_emit(c, JOP_LOAD_SELF | ((uint32_t) tempself << 8));
31186|    988|        janetc_emit(c, JOP_TAILCALL | ((uint32_t) tempself << 8));
31187|    988|        janetc_regalloc_freetemp(&c->scope->ra, tempself, JANETC_REGTEMP_0);
31188|       |        /* Compile function */
31189|    988|        JanetFuncDef *def = janetc_pop_funcdef(c);
31190|    988|        def->name = janet_cstring("while");
31191|    988|        janet_def_addflags(def);
31192|    988|        int32_t defindex = janetc_addfuncdef(c, def);
31193|       |        /* And then load the closure and call it. */
31194|    988|        int32_t cloreg = janetc_regalloc_temp(&c->scope->ra, JANETC_REGTEMP_0);
31195|    988|        janetc_emit(c, JOP_CLOSURE | ((uint32_t) cloreg << 8) | ((uint32_t) defindex << 16));
31196|    988|        janetc_emit(c, JOP_CALL | ((uint32_t) cloreg << 8) | ((uint32_t) cloreg << 16));
31197|    988|        janetc_regalloc_freetemp(&c->scope->ra, cloreg, JANETC_REGTEMP_0);
31198|    988|        c->scope->flags |= JANET_SCOPE_CLOSURE;
  ------------------
  |  | 1015|    988|#define JANET_SCOPE_CLOSURE 16
  ------------------
31199|    988|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|    988|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    988|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    988|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    988|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31200|    988|    }
31201|       |
31202|       |    /* Compile jump to :whiletop */
31203|    711|    labeljt = janet_v_count(c->buffer);
  ------------------
  |  |  714|    711|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|    693|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    693|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 693, False: 18]
  |  |  ------------------
  ------------------
31204|    711|    janetc_emit(c, JOP_JUMP);
31205|       |
31206|       |    /* Calculate jumps */
31207|    711|    labeld = janet_v_count(c->buffer);
  ------------------
  |  |  714|    711|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  721|    711|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    711|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (714:34): [True: 711, False: 0]
  |  |  ------------------
  ------------------
31208|    711|    if (!infinite) {
  ------------------
  |  Branch (31208:9): [True: 521, False: 190]
  ------------------
31209|    521|        check_16bit_jump(c, labelc, labeld);
31210|    521|        c->buffer[labelc] |= (uint32_t)(labeld - labelc) << 16;
31211|    521|    }
31212|       |
31213|    711|    check_24bit_jump(c, labeljt, labelwt);
31214|    711|    c->buffer[labeljt] |= (uint32_t)(labelwt - labeljt) << 8;
31215|       |
31216|       |    /* Calculate breaks */
31217|  4.23M|    for (int32_t i = labelwt; i < labeld; i++) {
  ------------------
  |  Branch (31217:31): [True: 4.23M, False: 711]
  ------------------
31218|  4.23M|        if (c->buffer[i] == (0x80 | JOP_JUMP)) {
  ------------------
  |  Branch (31218:13): [True: 6, False: 4.23M]
  ------------------
31219|      6|            check_24bit_jump(c, i, labeld);
31220|      6|            c->buffer[i] = JOP_JUMP | ((uint32_t) (labeld - i) << 8);
31221|      6|        }
31222|  4.23M|    }
31223|       |
31224|       |    /* Pop scope and return nil slot */
31225|    711|    janetc_popscope(c);
31226|       |
31227|    711|    return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  831|    711|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|    711|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    711|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    711|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31228|  1.69k|}
janet.c:findsetup:
31856|  12.9k|static void findsetup(int32_t argc, Janet *argv, struct kmp_state *s, int32_t extra) {
31857|  12.9k|    janet_arity(argc, 2, 3 + extra);
31858|  12.9k|    JanetByteView pat = janet_getbytes(argv, 0);
31859|  12.9k|    JanetByteView text = janet_getbytes(argv, 1);
31860|  12.9k|    int32_t start = 0;
31861|  12.9k|    if (argc >= 3) {
  ------------------
  |  Branch (31861:9): [True: 7, False: 12.8k]
  ------------------
31862|      7|        start = janet_getinteger(argv, 2);
31863|      7|        if (start < 0) janet_panic("expected non-negative start index");
  ------------------
  |  Branch (31863:13): [True: 2, False: 5]
  ------------------
31864|      7|    }
31865|  12.8k|    kmp_init(s, text.bytes, text.len, pat.bytes, pat.len);
31866|  12.8k|    s->i = start;
31867|  12.8k|}
janet.c:kmp_init:
31666|  18.5k|    const uint8_t *pat, int32_t patlen) {
31667|  18.5k|    if (patlen == 0) {
  ------------------
  |  Branch (31667:9): [True: 1, False: 18.5k]
  ------------------
31668|      1|        janet_panic("expected non-empty pattern");
31669|      1|    }
31670|  18.5k|    int32_t *lookup = janet_calloc(patlen, sizeof(int32_t));
  ------------------
  |  | 2412|  18.5k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
31671|  18.5k|    if (!lookup) {
  ------------------
  |  Branch (31671:9): [True: 0, False: 18.5k]
  ------------------
31672|      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]
  |  |  ------------------
  ------------------
31673|      0|    }
31674|  18.5k|    s->lookup = lookup;
31675|  18.5k|    s->i = 0;
31676|  18.5k|    s->j = 0;
31677|  18.5k|    s->text = text;
31678|  18.5k|    s->pat = pat;
31679|  18.5k|    s->textlen = textlen;
31680|  18.5k|    s->patlen = patlen;
31681|       |    /* Init state machine */
31682|  18.5k|    {
31683|  18.5k|        int32_t i, j;
31684|   896k|        for (i = 1, j = 0; i < patlen; i++) {
  ------------------
  |  Branch (31684:28): [True: 877k, False: 18.5k]
  ------------------
31685|   896k|            while (j && pat[j] != pat[i]) j = lookup[j - 1];
  ------------------
  |  Branch (31685:20): [True: 29.2k, False: 867k]
  |  Branch (31685:25): [True: 18.4k, False: 10.7k]
  ------------------
31686|   877k|            if (pat[j] == pat[i]) j++;
  ------------------
  |  Branch (31686:17): [True: 18.5k, False: 859k]
  ------------------
31687|   877k|            lookup[i] = j;
31688|   877k|        }
31689|  18.5k|    }
31690|  18.5k|}
janet.c:kmp_next:
31701|  18.7k|static int32_t kmp_next(struct kmp_state *state) {
31702|  18.7k|    int32_t i = state->i;
31703|  18.7k|    int32_t j = state->j;
31704|  18.7k|    int32_t textlen = state->textlen;
31705|  18.7k|    int32_t patlen = state->patlen;
31706|  18.7k|    const uint8_t *text = state->text;
31707|  18.7k|    const uint8_t *pat = state->pat;
31708|  18.7k|    int32_t *lookup = state->lookup;
31709|   181k|    while (i < textlen) {
  ------------------
  |  Branch (31709:12): [True: 163k, False: 18.4k]
  ------------------
31710|   163k|        if (text[i] == pat[j]) {
  ------------------
  |  Branch (31710:13): [True: 2.47k, False: 160k]
  ------------------
31711|  2.47k|            if (j == patlen - 1) {
  ------------------
  |  Branch (31711:17): [True: 351, False: 2.12k]
  ------------------
31712|    351|                state->i = i + 1;
31713|    351|                state->j = lookup[j];
31714|    351|                return i - j;
31715|  2.12k|            } else {
31716|  2.12k|                i++;
31717|  2.12k|                j++;
31718|  2.12k|            }
31719|   160k|        } else {
31720|   160k|            if (j > 0) {
  ------------------
  |  Branch (31720:17): [True: 1.78k, False: 158k]
  ------------------
31721|  1.78k|                j = lookup[j - 1];
31722|   158k|            } else {
31723|   158k|                i++;
31724|   158k|            }
31725|   160k|        }
31726|   163k|    }
31727|  18.4k|    return -1;
31728|  18.7k|}
janet.c:kmp_deinit:
31692|  18.5k|static void kmp_deinit(struct kmp_state *state) {
31693|  18.5k|    janet_free(state->lookup);
  ------------------
  |  | 2415|  18.5k|#define janet_free(X) free((X))
  ------------------
31694|  18.5k|}
janet.c:replacesetup:
31930|  5.67k|static void replacesetup(int32_t argc, Janet *argv, struct replace_state *s) {
31931|  5.67k|    janet_arity(argc, 3, 4);
31932|  5.67k|    JanetByteView pat = janet_getbytes(argv, 0);
31933|  5.67k|    Janet subst = argv[1];
31934|  5.67k|    JanetByteView text = janet_getbytes(argv, 2);
31935|  5.67k|    int32_t start = 0;
31936|  5.67k|    if (argc == 4) {
  ------------------
  |  Branch (31936:9): [True: 4, False: 5.66k]
  ------------------
31937|      4|        start = janet_getinteger(argv, 3);
31938|      4|        if (start < 0) janet_panic("expected non-negative start index");
  ------------------
  |  Branch (31938:13): [True: 0, False: 4]
  ------------------
31939|      4|    }
31940|  5.67k|    kmp_init(&s->kmp, text.bytes, text.len, pat.bytes, pat.len);
31941|  5.67k|    s->kmp.i = start;
31942|  5.67k|    s->subst = subst;
31943|  5.67k|}
janet.c:kmp_seti:
31696|    227|static void kmp_seti(struct kmp_state *state, int32_t i) {
31697|    227|    state->i = i;
31698|    227|    state->j = 0;
31699|    227|}
janet.c:trim_help_args:
32152|    144|static void trim_help_args(int32_t argc, Janet *argv, JanetByteView *str, JanetByteView *set) {
32153|    144|    janet_arity(argc, 1, 2);
32154|    144|    *str = janet_getbytes(argv, 0);
32155|    144|    if (argc >= 2) {
  ------------------
  |  Branch (32155:9): [True: 82, False: 62]
  ------------------
32156|     82|        *set = janet_getbytes(argv, 1);
32157|     82|    } else {
32158|     62|        set->bytes = (const uint8_t *)(" \t\r\n\v\f");
32159|     62|        set->len = 6;
32160|     62|    }
32161|    144|}
janet.c:trim_help_leftedge:
32138|     90|static int32_t trim_help_leftedge(JanetByteView str, JanetByteView set) {
32139|    658|    for (int32_t i = 0; i < str.len; i++)
  ------------------
  |  Branch (32139:25): [True: 644, False: 14]
  ------------------
32140|    644|        if (!trim_help_checkset(set, str.bytes[i]))
  ------------------
  |  Branch (32140:13): [True: 76, False: 568]
  ------------------
32141|     76|            return i;
32142|     14|    return str.len;
32143|     90|}
janet.c:trim_help_checkset:
32131|  2.36k|static int trim_help_checkset(JanetByteView set, uint8_t x) {
32132|   113k|    for (int32_t j = 0; j < set.len; j++)
  ------------------
  |  Branch (32132:25): [True: 113k, False: 174]
  ------------------
32133|   113k|        if (set.bytes[j] == x)
  ------------------
  |  Branch (32133:13): [True: 2.19k, False: 110k]
  ------------------
32134|  2.19k|            return 1;
32135|    174|    return 0;
32136|  2.36k|}
janet.c:trim_help_rightedge:
32145|    106|static int32_t trim_help_rightedge(JanetByteView str, JanetByteView set) {
32146|  1.73k|    for (int32_t i = str.len - 1; i >= 0; i--)
  ------------------
  |  Branch (32146:35): [True: 1.72k, False: 8]
  ------------------
32147|  1.72k|        if (!trim_help_checkset(set, str.bytes[i]))
  ------------------
  |  Branch (32147:13): [True: 98, False: 1.62k]
  ------------------
32148|     98|            return i + 1;
32149|      8|    return 0;
32150|    106|}
janet.c:bignat_zero:
32308|   522k|static void bignat_zero(struct BigNat *x) {
32309|   522k|    x->first_digit = 0;
32310|   522k|    x->n = 0;
32311|   522k|    x->cap = 0;
32312|       |    x->digits = NULL;
32313|   522k|}
janet.c:bignat_muladd:
32340|   180k|static void bignat_muladd(struct BigNat *mant, uint32_t factor, uint32_t term) {
32341|   180k|    int32_t i;
32342|   180k|    uint64_t carry = ((uint64_t) mant->first_digit) * factor + term;
32343|   180k|    mant->first_digit = carry % BIGNAT_BASE;
  ------------------
  |  |32297|   180k|#define BIGNAT_BASE 0x80000000U
  ------------------
32344|   180k|    carry /= BIGNAT_BASE;
  ------------------
  |  |32297|   180k|#define BIGNAT_BASE 0x80000000U
  ------------------
32345|  1.13M|    for (i = 0; i < mant->n; i++) {
  ------------------
  |  Branch (32345:17): [True: 957k, False: 180k]
  ------------------
32346|   957k|        carry += ((uint64_t) mant->digits[i]) * factor;
32347|   957k|        mant->digits[i] = carry % BIGNAT_BASE;
  ------------------
  |  |32297|   957k|#define BIGNAT_BASE 0x80000000U
  ------------------
32348|   957k|        carry /= BIGNAT_BASE;
  ------------------
  |  |32297|   957k|#define BIGNAT_BASE 0x80000000U
  ------------------
32349|   957k|    }
32350|   180k|    if (carry) bignat_append(mant, (uint32_t) carry);
  ------------------
  |  Branch (32350:9): [True: 11.9k, False: 168k]
  ------------------
32351|   180k|}
janet.c:bignat_append:
32333|  11.9k|static void bignat_append(struct BigNat *mant, uint32_t dig) {
32334|  11.9k|    bignat_extra(mant, 1)[0] = dig;
32335|  11.9k|}
janet.c:bignat_extra:
32316|  13.4k|static uint32_t *bignat_extra(struct BigNat *mant, int32_t n) {
32317|  13.4k|    int32_t oldn = mant->n;
32318|  13.4k|    int32_t newn = oldn + n;
32319|  13.4k|    if (mant->cap < newn) {
  ------------------
  |  Branch (32319:9): [True: 6.03k, False: 7.43k]
  ------------------
32320|  6.03k|        int32_t newcap = 2 * newn;
32321|  6.03k|        uint32_t *mem = janet_realloc(mant->digits, (size_t) newcap * sizeof(uint32_t));
  ------------------
  |  | 2409|  6.03k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
32322|  6.03k|        if (NULL == mem) {
  ------------------
  |  Branch (32322:13): [True: 0, False: 6.03k]
  ------------------
32323|      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]
  |  |  ------------------
  ------------------
32324|      0|        }
32325|  6.03k|        mant->cap = newcap;
32326|  6.03k|        mant->digits = mem;
32327|  6.03k|    }
32328|  13.4k|    mant->n = newn;
32329|  13.4k|    return mant->digits + oldn;
32330|  13.4k|}
janet.c:convert:
32436|  49.9k|    int32_t exponent) {
32437|       |
32438|  49.9k|    int32_t exponent2 = 0;
32439|       |
32440|       |    /* Approximate exponent in base 2 of mant and exponent. This should get us a good estimate of the final size of the
32441|       |     * number, within * 2^32 or so. */
32442|  49.9k|    int64_t mant_exp2_approx = mant->n * 32 + 16;
32443|  49.9k|    int64_t exp_exp2_approx = (int64_t)(floor(log2(base) * exponent));
32444|  49.9k|    int64_t exp2_approx = mant_exp2_approx + exp_exp2_approx;
32445|       |
32446|       |    /* Short circuit zero, huge, and small numbers. We use the exponent range of valid IEEE754 doubles (-1022, 1023)
32447|       |     * with a healthy buffer to allow for inaccuracies in the approximation and denormailzed numbers. */
32448|  49.9k|    if (mant->n == 0 && mant->first_digit == 0)
  ------------------
  |  Branch (32448:9): [True: 48.0k, False: 1.90k]
  |  Branch (32448:25): [True: 12.4k, False: 35.6k]
  ------------------
32449|  12.4k|        return negative ? -0.0 : 0.0;
  ------------------
  |  Branch (32449:16): [True: 562, False: 11.8k]
  ------------------
32450|  37.5k|    if (exp2_approx > 1176)
  ------------------
  |  Branch (32450:9): [True: 214, False: 37.3k]
  ------------------
32451|    214|        return negative ? -INFINITY : INFINITY;
  ------------------
  |  Branch (32451:16): [True: 17, False: 197]
  ------------------
32452|  37.3k|    if (exp2_approx < -1175)
  ------------------
  |  Branch (32452:9): [True: 1.18k, False: 36.1k]
  ------------------
32453|  1.18k|        return negative ? -0.0 : 0.0;
  ------------------
  |  Branch (32453:16): [True: 1.16k, False: 25]
  ------------------
32454|       |
32455|       |    /* Final value is X = mant * base ^ exponent * 2 ^ exponent2
32456|       |     * Get exponent to zero while holding X constant. */
32457|       |
32458|       |    /* Positive exponents are simple */
32459|  44.3k|    for (; exponent > 3; exponent -= 4) bignat_muladd(mant, base * base * base * base, 0);
  ------------------
  |  Branch (32459:12): [True: 8.16k, False: 36.1k]
  ------------------
32460|  36.6k|    for (; exponent > 1; exponent -= 2) bignat_muladd(mant, base * base, 0);
  ------------------
  |  Branch (32460:12): [True: 564, False: 36.1k]
  ------------------
32461|  36.4k|    for (; exponent > 0; exponent -= 1) bignat_muladd(mant, base, 0);
  ------------------
  |  Branch (32461:12): [True: 285, False: 36.1k]
  ------------------
32462|       |
32463|       |    /* Negative exponents are tricky - we don't want to loose bits
32464|       |     * from integer division, so we need to premultiply. */
32465|  36.1k|    if (exponent < 0) {
  ------------------
  |  Branch (32465:9): [True: 1.53k, False: 34.6k]
  ------------------
32466|  1.53k|        int32_t shamt = 5 - exponent / 4;
32467|  1.53k|        bignat_lshift_n(mant, shamt);
32468|  1.53k|        exponent2 -= shamt * BIGNAT_NBIT;
  ------------------
  |  |32296|  1.53k|#define BIGNAT_NBIT 31
  ------------------
32469|  6.30k|        for (; exponent < -3; exponent += 4) bignat_div(mant, base * base * base * base);
  ------------------
  |  Branch (32469:16): [True: 4.77k, False: 1.53k]
  ------------------
32470|  2.24k|        for (; exponent < -1; exponent += 2) bignat_div(mant, base * base);
  ------------------
  |  Branch (32470:16): [True: 715, False: 1.53k]
  ------------------
32471|  2.21k|        for (; exponent <  0; exponent += 1) bignat_div(mant, base);
  ------------------
  |  Branch (32471:16): [True: 681, False: 1.53k]
  ------------------
32472|  1.53k|    }
32473|       |
32474|  36.1k|    return negative
  ------------------
  |  Branch (32474:12): [True: 1.91k, False: 34.2k]
  ------------------
32475|  36.1k|           ? -bignat_extract(mant, exponent2)
32476|  36.1k|           : bignat_extract(mant, exponent2);
32477|  37.3k|}
janet.c:bignat_lshift_n:
32372|  1.53k|static void bignat_lshift_n(struct BigNat *mant, int n) {
32373|  1.53k|    if (!n) return;
  ------------------
  |  Branch (32373:9): [True: 0, False: 1.53k]
  ------------------
32374|  1.53k|    int32_t oldn = mant->n;
32375|  1.53k|    bignat_extra(mant, n);
32376|  1.53k|    memmove(mant->digits + n, mant->digits, sizeof(uint32_t) * oldn);
32377|  1.53k|    memset(mant->digits, 0, sizeof(uint32_t) * (n - 1));
32378|  1.53k|    mant->digits[n - 1] = mant->first_digit;
32379|  1.53k|    mant->first_digit = 0;
32380|  1.53k|}
janet.c:bignat_div:
32354|  6.16k|static void bignat_div(struct BigNat *mant, uint32_t divisor) {
32355|  6.16k|    int32_t i;
32356|  6.16k|    uint32_t quotient, remainder;
32357|  6.16k|    uint64_t dividend;
32358|  6.16k|    remainder = 0, quotient = 0;
32359|   947k|    for (i = mant->n - 1; i >= 0; i--) {
  ------------------
  |  Branch (32359:27): [True: 941k, False: 6.16k]
  ------------------
32360|   941k|        dividend = ((uint64_t)remainder * BIGNAT_BASE) + mant->digits[i];
  ------------------
  |  |32297|   941k|#define BIGNAT_BASE 0x80000000U
  ------------------
32361|   941k|        if (i < mant->n - 1) mant->digits[i + 1] = quotient;
  ------------------
  |  Branch (32361:13): [True: 935k, False: 6.16k]
  ------------------
32362|   941k|        quotient = (uint32_t)(dividend / divisor);
32363|   941k|        remainder = (uint32_t)(dividend % divisor);
32364|   941k|        mant->digits[i] = remainder;
32365|   941k|    }
32366|  6.16k|    dividend = ((uint64_t)remainder * BIGNAT_BASE) + mant->first_digit;
  ------------------
  |  |32297|  6.16k|#define BIGNAT_BASE 0x80000000U
  ------------------
32367|  6.16k|    if (mant->n && mant->digits[mant->n - 1] == 0) mant->n--;
  ------------------
  |  Branch (32367:9): [True: 6.16k, False: 0]
  |  Branch (32367:20): [True: 2.44k, False: 3.72k]
  ------------------
32368|  6.16k|    mant->first_digit = (uint32_t)(dividend / divisor);
32369|  6.16k|}
janet.c:bignat_extract:
32397|  36.1k|static double bignat_extract(struct BigNat *mant, int32_t exponent2) {
32398|  36.1k|    uint64_t top53;
32399|  36.1k|    int32_t n = mant->n;
32400|       |    /* Get most significant 53 bits from mant. Bit 52 (0 indexed) should
32401|       |     * always be 1. This is essentially a large right shift on mant.*/
32402|  36.1k|    if (n) {
  ------------------
  |  Branch (32402:9): [True: 3.70k, False: 32.4k]
  ------------------
32403|       |        /* Two or more digits */
32404|  3.70k|        uint64_t d1 = mant->digits[n - 1]; /* MSD (non-zero) */
32405|  3.70k|        uint64_t d2 = (n == 1) ? mant->first_digit : mant->digits[n - 2];
  ------------------
  |  Branch (32405:23): [True: 972, False: 2.72k]
  ------------------
32406|  3.70k|        uint64_t d3 = (n > 2) ? mant->digits[n - 3] : (n == 2) ? mant->first_digit : 0;
  ------------------
  |  Branch (32406:23): [True: 2.14k, False: 1.55k]
  |  Branch (32406:55): [True: 582, False: 972]
  ------------------
32407|  3.70k|        int lz = clz((uint32_t) d1);
  ------------------
  |  |32383|  3.70k|#define clz(x) __builtin_clz(x)
  ------------------
32408|  3.70k|        int nbits = 32 - lz;
32409|       |        /* First get 54 bits */
32410|  3.70k|        top53 = (d2 << (54 - BIGNAT_NBIT)) + (d3 >> (2 * BIGNAT_NBIT - 54));
  ------------------
  |  |32296|  3.70k|#define BIGNAT_NBIT 31
  ------------------
                      top53 = (d2 << (54 - BIGNAT_NBIT)) + (d3 >> (2 * BIGNAT_NBIT - 54));
  ------------------
  |  |32296|  3.70k|#define BIGNAT_NBIT 31
  ------------------
32411|  3.70k|        top53 >>= nbits;
32412|  3.70k|        top53 |= (d1 << (54 - nbits));
32413|       |        /* Rounding based on lowest bit of 54 */
32414|  3.70k|        if (top53 & 1) top53++;
  ------------------
  |  Branch (32414:13): [True: 1.30k, False: 2.40k]
  ------------------
32415|  3.70k|        top53 >>= 1;
32416|  3.70k|        if (top53 > 0x1FffffFFFFffffUL) {
  ------------------
  |  Branch (32416:13): [True: 143, False: 3.55k]
  ------------------
32417|    143|            top53 >>= 1;
32418|    143|            exponent2++;
32419|    143|        }
32420|       |        /* Correct exponent - to correct for large right shift to mantissa. */
32421|  3.70k|        exponent2 += (nbits - 53) + BIGNAT_NBIT * n;
  ------------------
  |  |32296|  3.70k|#define BIGNAT_NBIT 31
  ------------------
32422|  32.4k|    } else {
32423|       |        /* One digit */
32424|  32.4k|        top53 = mant->first_digit;
32425|  32.4k|    }
32426|  36.1k|    return ldexp((double)top53, exponent2);
32427|  36.1k|}
janet.c:scan_uint64:
32637|  6.73k|    int *neg) {
32638|  6.73k|    const uint8_t *end = str + len;
32639|  6.73k|    int seenadigit = 0;
32640|  6.73k|    int base = 10;
32641|  6.73k|    *neg = 0;
32642|  6.73k|    *out = 0;
32643|  6.73k|    uint64_t accum = 0;
32644|  6.73k|    if (len > JANET_NUMBER_LENGTH_RIDICULOUS) return 0;
  ------------------
  |  |32281|  6.73k|#define JANET_NUMBER_LENGTH_RIDICULOUS 0xFFFF
  ------------------
  |  Branch (32644:9): [True: 1, False: 6.73k]
  ------------------
32645|       |    /* Get sign */
32646|  6.73k|    if (str >= end) return 0;
  ------------------
  |  Branch (32646:9): [True: 4, False: 6.72k]
  ------------------
32647|  6.72k|    if (*str == '-') {
  ------------------
  |  Branch (32647:9): [True: 1.82k, False: 4.90k]
  ------------------
32648|  1.82k|        *neg = 1;
32649|  1.82k|        str++;
32650|  4.90k|    } else if (*str == '+') {
  ------------------
  |  Branch (32650:16): [True: 23, False: 4.88k]
  ------------------
32651|     23|        str++;
32652|     23|    }
32653|       |    /* Check for leading 0x or digit digit r */
32654|  6.72k|    if (str + 1 < end && str[0] == '0' && str[1] == 'x') {
  ------------------
  |  Branch (32654:9): [True: 3.73k, False: 2.98k]
  |  Branch (32654:26): [True: 1.62k, False: 2.11k]
  |  Branch (32654:43): [True: 9, False: 1.61k]
  ------------------
32655|      9|        base = 16;
32656|      9|        str += 2;
32657|  6.71k|    } else if (str + 1 < end  &&
  ------------------
  |  Branch (32657:16): [True: 3.73k, False: 2.98k]
  ------------------
32658|  3.73k|               str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (32658:16): [True: 2.80k, False: 930]
  |  Branch (32658:33): [True: 2.77k, False: 28]
  ------------------
32659|  2.77k|               str[1] == 'r') {
  ------------------
  |  Branch (32659:16): [True: 0, False: 2.77k]
  ------------------
32660|      0|        base = str[0] - '0';
32661|      0|        str += 2;
32662|  6.71k|    } else if (str + 2 < end  &&
  ------------------
  |  Branch (32662:16): [True: 3.18k, False: 3.53k]
  ------------------
32663|  3.18k|               str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (32663:16): [True: 2.73k, False: 453]
  |  Branch (32663:33): [True: 2.71k, False: 24]
  ------------------
32664|  2.71k|               str[1] >= '0' && str[1] <= '9' &&
  ------------------
  |  Branch (32664:16): [True: 2.70k, False: 2]
  |  Branch (32664:33): [True: 2.66k, False: 40]
  ------------------
32665|  2.66k|               str[2] == 'r') {
  ------------------
  |  Branch (32665:16): [True: 10, False: 2.65k]
  ------------------
32666|     10|        base = 10 * (str[0] - '0') + (str[1] - '0');
32667|     10|        if (base < 2 || base > 36) return 0;
  ------------------
  |  Branch (32667:13): [True: 0, False: 10]
  |  Branch (32667:25): [True: 0, False: 10]
  ------------------
32668|     10|        str += 3;
32669|     10|    }
32670|       |
32671|       |    /* Skip leading zeros */
32672|  10.5k|    while (str < end && *str == '0') {
  ------------------
  |  Branch (32672:12): [True: 9.41k, False: 1.14k]
  |  Branch (32672:25): [True: 3.82k, False: 5.58k]
  ------------------
32673|  3.82k|        seenadigit = 1;
32674|  3.82k|        str++;
32675|  3.82k|    }
32676|       |    /* Parse significant digits */
32677|  18.5k|    while (str < end) {
  ------------------
  |  Branch (32677:12): [True: 13.0k, False: 5.49k]
  ------------------
32678|  13.0k|        if (*str == '_') {
  ------------------
  |  Branch (32678:13): [True: 620, False: 12.4k]
  ------------------
32679|    620|            if (!seenadigit) return 0;
  ------------------
  |  Branch (32679:17): [True: 1, False: 619]
  ------------------
32680|  12.4k|        } else {
32681|  12.4k|            int digit = digit_lookup[*str & 0x7F];
32682|  12.4k|            if (*str > 127 || digit >= base) return 0;
  ------------------
  |  Branch (32682:17): [True: 5, False: 12.4k]
  |  Branch (32682:31): [True: 1.20k, False: 11.2k]
  ------------------
32683|  11.2k|            if (accum > (UINT64_MAX - digit) / base) return 0;
  ------------------
  |  Branch (32683:17): [True: 15, False: 11.2k]
  ------------------
32684|  11.2k|            accum = accum * base + digit;
32685|  11.2k|            seenadigit = 1;
32686|  11.2k|        }
32687|  11.8k|        str++;
32688|  11.8k|    }
32689|       |
32690|  5.49k|    if (!seenadigit) return 0;
  ------------------
  |  Branch (32690:9): [True: 571, False: 4.92k]
  ------------------
32691|  4.92k|    *out = accum;
32692|  4.92k|    return 1;
32693|  5.49k|}
janet.c:janet_symcache_findmem:
33175|   190M|    int *success) {
33176|   190M|    uint32_t bounds[4];
33177|   190M|    uint32_t i, j, index;
33178|   190M|    const uint8_t **firstEmpty = NULL;
33179|       |
33180|       |    /* We will search two ranges - index to the end,
33181|       |     * and 0 to the index. */
33182|   190M|    index = (uint32_t)hash & (janet_vm.cache_capacity - 1);
33183|   190M|    bounds[0] = index;
33184|   190M|    bounds[1] = janet_vm.cache_capacity;
33185|   190M|    bounds[2] = 0;
33186|   190M|    bounds[3] = index;
33187|  18.4E|    for (j = 0; j < 4; j += 2)
  ------------------
  |  Branch (33187:17): [True: 190M, False: 18.4E]
  ------------------
33188|   227M|        for (i = bounds[j]; i < bounds[j + 1]; ++i) {
  ------------------
  |  Branch (33188:29): [True: 227M, False: 18.4E]
  ------------------
33189|   227M|            const uint8_t *test = janet_vm.cache[i];
33190|       |            /* Check empty spots */
33191|   227M|            if (NULL == test) {
  ------------------
  |  Branch (33191:17): [True: 34.3M, False: 192M]
  ------------------
33192|  34.3M|                if (NULL == firstEmpty)
  ------------------
  |  Branch (33192:21): [True: 34.2M, False: 85.1k]
  ------------------
33193|  34.2M|                    firstEmpty = janet_vm.cache + i;
33194|  34.3M|                goto notfound;
33195|  34.3M|            }
33196|       |            /* Check for marked deleted */
33197|   192M|            if (JANET_SYMCACHE_DELETED == test) {
  ------------------
  |  Branch (33197:17): [True: 176k, False: 192M]
  ------------------
33198|   176k|                if (firstEmpty == NULL)
  ------------------
  |  Branch (33198:21): [True: 103k, False: 73.7k]
  ------------------
33199|   103k|                    firstEmpty = janet_vm.cache + i;
33200|   176k|                continue;
33201|   176k|            }
33202|   192M|            if (janet_string_equalconst(test, str, len, hash)) {
  ------------------
  |  Branch (33202:17): [True: 156M, False: 36.0M]
  ------------------
33203|       |                /* Replace first deleted */
33204|   156M|                *success = 1;
33205|   156M|                if (firstEmpty != NULL) {
  ------------------
  |  Branch (33205:21): [True: 17.9k, False: 156M]
  ------------------
33206|  17.9k|                    *firstEmpty = test;
33207|  17.9k|                    janet_vm.cache[i] = JANET_SYMCACHE_DELETED;
33208|  17.9k|                    return firstEmpty;
33209|  17.9k|                }
33210|   156M|                return janet_vm.cache + i;
33211|   156M|            }
33212|   192M|        }
33213|  18.4E|notfound:
33214|  34.3M|    *success = 0;
33215|  34.3M|    janet_assert(firstEmpty != NULL, "symcache failed to get memory");
  ------------------
  |  |  389|  34.3M|#define janet_assert(c, m) do { \
  |  |  390|  34.3M|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  378|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  379|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  380|      0|        __FILE__,\
  |  |  |  |  381|      0|        __LINE__,\
  |  |  |  |  382|      0|        (m));\
  |  |  |  |  383|      0|    abort();\
  |  |  |  |  384|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (384:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (390:9): [True: 0, False: 34.3M]
  |  |  ------------------
  |  |  391|  34.3M|} while (0)
  |  |  ------------------
  |  |  |  Branch (391:10): [Folded, False: 34.3M]
  |  |  ------------------
  ------------------
33216|  34.3M|    return firstEmpty;
33217|  34.3M|}
janet.c:janet_symcache_put:
33253|  16.8M|static void janet_symcache_put(const uint8_t *x, const uint8_t **bucket) {
33254|  16.8M|    if ((janet_vm.cache_count + janet_vm.cache_deleted) * 2 > janet_vm.cache_capacity) {
  ------------------
  |  Branch (33254:9): [True: 17.3k, False: 16.8M]
  ------------------
33255|  17.3k|        int status;
33256|  17.3k|        janet_cache_resize(janet_tablen((2 * janet_vm.cache_count + 1)));
33257|  17.3k|        bucket = janet_symcache_find(x, &status);
  ------------------
  |  |33220|  17.3k|    janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1812|  17.3k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1811|  17.3k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1813|  17.3k|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1811|  17.3k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33258|  17.3k|    }
33259|       |    /* Add x to the cache */
33260|  16.8M|    janet_vm.cache_count++;
33261|  16.8M|    *bucket = x;
33262|  16.8M|}
janet.c:janet_cache_resize:
33223|  17.3k|static void janet_cache_resize(uint32_t newCapacity) {
33224|  17.3k|    uint32_t i, oldCapacity;
33225|  17.3k|    const uint8_t **oldCache = janet_vm.cache;
33226|  17.3k|    const uint8_t **newCache = janet_calloc(1, (size_t) newCapacity * sizeof(const uint8_t *));
  ------------------
  |  | 2412|  17.3k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
33227|  17.3k|    if (newCache == NULL) {
  ------------------
  |  Branch (33227:9): [True: 0, False: 17.3k]
  ------------------
33228|      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]
  |  |  ------------------
  ------------------
33229|      0|    }
33230|  17.3k|    oldCapacity = janet_vm.cache_capacity;
33231|  17.3k|    janet_vm.cache = newCache;
33232|  17.3k|    janet_vm.cache_capacity = newCapacity;
33233|  17.3k|    janet_vm.cache_deleted = 0;
33234|       |    /* Add all of the old cache entries back */
33235|  35.6M|    for (i = 0; i < oldCapacity; ++i) {
  ------------------
  |  Branch (33235:17): [True: 35.6M, False: 17.3k]
  ------------------
33236|  35.6M|        int status;
33237|  35.6M|        const uint8_t **bucket;
33238|  35.6M|        const uint8_t *x = oldCache[i];
33239|  35.6M|        if (x != NULL && x != JANET_SYMCACHE_DELETED) {
  ------------------
  |  Branch (33239:13): [True: 17.7M, False: 17.8M]
  |  Branch (33239:26): [True: 17.5M, False: 255k]
  ------------------
33240|  17.5M|            bucket = janet_symcache_find(x, &status);
  ------------------
  |  |33220|  17.5M|    janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1812|  17.5M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1811|  17.5M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1813|  17.5M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1811|  17.5M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33241|  17.5M|            if (status || bucket == NULL) {
  ------------------
  |  Branch (33241:17): [True: 71, False: 17.5M]
  |  Branch (33241:27): [True: 15, False: 17.5M]
  ------------------
33242|       |                /* there was a problem with the algorithm. */
33243|      0|                break;
33244|      0|            }
33245|  17.5M|            *bucket = x;
33246|  17.5M|        }
33247|  35.6M|    }
33248|       |    /* Free the old cache */
33249|  17.3k|    janet_free((void *)oldCache);
  ------------------
  |  | 2415|  17.3k|#define janet_free(X) free((X))
  ------------------
33250|  17.3k|}
janet.c:inc_gensym:
33299|  1.50M|static void inc_gensym(void) {
33300|  1.52M|    for (int i = sizeof(janet_vm.gensym_counter) - 2; i; i--) {
  ------------------
  |  Branch (33300:55): [True: 1.52M, False: 0]
  ------------------
33301|  1.52M|        if (janet_vm.gensym_counter[i] == '9') {
  ------------------
  |  Branch (33301:13): [True: 25.3k, False: 1.49M]
  ------------------
33302|  25.3k|            janet_vm.gensym_counter[i] = 'a';
33303|  25.3k|            break;
33304|  1.49M|        } else if (janet_vm.gensym_counter[i] == 'z') {
  ------------------
  |  Branch (33304:20): [True: 24.1k, False: 1.47M]
  ------------------
33305|  24.1k|            janet_vm.gensym_counter[i] = 'A';
33306|  24.1k|            break;
33307|  1.47M|        } else if (janet_vm.gensym_counter[i] == 'Z') {
  ------------------
  |  Branch (33307:20): [True: 22.6k, False: 1.45M]
  ------------------
33308|  22.6k|            janet_vm.gensym_counter[i] = '0';
33309|  1.45M|        } else {
33310|  1.45M|            janet_vm.gensym_counter[i]++;
33311|  1.45M|            break;
33312|  1.45M|        }
33313|  1.52M|    }
33314|  1.50M|}
janet.c:janet_table_init_impl:
33394|  5.78M|static JanetTable *janet_table_init_impl(JanetTable *table, int32_t capacity, int stackalloc) {
33395|  5.78M|    JanetKV *data;
33396|  5.78M|    capacity = janet_tablen(capacity);
33397|  5.78M|    if (stackalloc) table->gc.flags = JANET_TABLE_FLAG_STACK;
  ------------------
  |  |33380|  18.5k|#define JANET_TABLE_FLAG_STACK 0x10000
  ------------------
  |  Branch (33397:9): [True: 18.5k, False: 5.76M]
  ------------------
33398|  5.78M|    if (capacity) {
  ------------------
  |  Branch (33398:9): [True: 5.78M, False: 0]
  ------------------
33399|  5.78M|        if (stackalloc) {
  ------------------
  |  Branch (33399:13): [True: 18.5k, False: 5.76M]
  ------------------
33400|  18.5k|            data = janet_memalloc_empty_local(capacity);
33401|  5.76M|        } else {
33402|  5.76M|            data = (JanetKV *) janet_memalloc_empty(capacity);
33403|  5.76M|            if (NULL == data) {
  ------------------
  |  Branch (33403:17): [True: 0, False: 5.76M]
  ------------------
33404|      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]
  |  |  ------------------
  ------------------
33405|      0|            }
33406|  5.76M|        }
33407|  5.78M|        table->data = data;
33408|  5.78M|        table->capacity = capacity;
33409|  5.78M|    } else {
33410|      0|        table->data = NULL;
33411|      0|        table->capacity = 0;
33412|      0|    }
33413|  5.78M|    table->count = 0;
33414|  5.78M|    table->deleted = 0;
33415|       |    table->proto = NULL;
33416|  5.78M|    return table;
33417|  5.78M|}
janet.c:janet_memalloc_empty_local:
33382|  53.4k|static void *janet_memalloc_empty_local(int32_t count) {
33383|  53.4k|    int32_t i;
33384|  53.4k|    void *mem = janet_smalloc((size_t) count * sizeof(JanetKV));
33385|  53.4k|    JanetKV *mmem = (JanetKV *)mem;
33386|  13.4M|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (33386:17): [True: 13.4M, False: 53.4k]
  ------------------
33387|  13.4M|        JanetKV *kv = mmem + i;
33388|  13.4M|        kv->key = janet_wrap_nil();
  ------------------
  |  |  831|  13.4M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  13.4M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  13.4M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  13.4M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33389|  13.4M|        kv->value = janet_wrap_nil();
  ------------------
  |  |  831|  13.4M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  13.4M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  13.4M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  13.4M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33390|  13.4M|    }
33391|  53.4k|    return mem;
33392|  53.4k|}
janet.c:janet_table_rehash:
33467|  4.56M|static void janet_table_rehash(JanetTable *t, int32_t size) {
33468|  4.56M|    JanetKV *olddata = t->data;
33469|  4.56M|    JanetKV *newdata;
33470|  4.56M|    int islocal = t->gc.flags & JANET_TABLE_FLAG_STACK;
  ------------------
  |  |33380|  4.56M|#define JANET_TABLE_FLAG_STACK 0x10000
  ------------------
33471|  4.56M|    if (islocal) {
  ------------------
  |  Branch (33471:9): [True: 34.8k, False: 4.52M]
  ------------------
33472|  34.8k|        newdata = (JanetKV *) janet_memalloc_empty_local(size);
33473|  4.52M|    } else {
33474|  4.52M|        newdata = (JanetKV *) janet_memalloc_empty(size);
33475|  4.52M|        if (NULL == newdata) {
  ------------------
  |  Branch (33475:13): [True: 0, False: 4.52M]
  ------------------
33476|      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]
  |  |  ------------------
  ------------------
33477|      0|        }
33478|  4.52M|    }
33479|  4.56M|    int32_t oldcapacity = t->capacity;
33480|  4.56M|    t->data = newdata;
33481|  4.56M|    t->capacity = size;
33482|  4.56M|    t->deleted = 0;
33483|  61.9M|    for (int32_t i = 0; i < oldcapacity; i++) {
  ------------------
  |  Branch (33483:25): [True: 57.4M, False: 4.56M]
  ------------------
33484|  57.4M|        JanetKV *kv = olddata + i;
33485|  57.4M|        if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|  57.4M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 57.4M]
  |  |  ------------------
  |  |  807|  57.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|  57.4M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  57.4M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  57.4M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  57.4M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  57.4M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33485:13): [True: 28.3M, False: 29.1M]
  ------------------
33486|  28.3M|            JanetKV *newkv = janet_table_find(t, kv->key);
33487|  28.3M|            *newkv = *kv;
33488|  28.3M|        }
33489|  57.4M|    }
33490|  4.56M|    if (islocal) {
  ------------------
  |  Branch (33490:9): [True: 34.8k, False: 4.52M]
  ------------------
33491|  34.8k|        janet_sfree(olddata);
33492|  4.52M|    } else {
33493|  4.52M|        janet_free(olddata);
  ------------------
  |  | 2415|  4.52M|#define janet_free(X) free((X))
  ------------------
33494|  4.52M|    }
33495|  4.56M|}
janet.c:janet_table_mergekv:
33621|     27|static void janet_table_mergekv(JanetTable *table, const JanetKV *kvs, int32_t cap) {
33622|     27|    int32_t i;
33623|    186|    for (i = 0; i < cap; i++) {
  ------------------
  |  Branch (33623:17): [True: 159, False: 27]
  ------------------
33624|    159|        const JanetKV *kv = kvs + i;
33625|    159|        if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  806|    159|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 159]
  |  |  ------------------
  |  |  807|    159|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    159|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    159|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    159|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    159|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    159|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33625:13): [True: 38, False: 121]
  ------------------
33626|     38|            janet_table_put(table, kv->key, kv->value);
33627|     38|        }
33628|    159|    }
33629|     27|}
janet.c:janet_registry_sort:
34449|  1.24k|static void janet_registry_sort(void) {
34450|   438k|    for (size_t i = 1; i < janet_vm.registry_count; i++) {
  ------------------
  |  Branch (34450:24): [True: 436k, False: 1.24k]
  ------------------
34451|   436k|        JanetCFunRegistry reg = janet_vm.registry[i];
34452|   436k|        size_t j;
34453|  30.7M|        for (j = i; j > 0; j--) {
  ------------------
  |  Branch (34453:21): [True: 30.7M, False: 3.73k]
  ------------------
34454|  30.7M|            if ((void *)(janet_vm.registry[j - 1].cfun) < (void *)(reg.cfun)) break;
  ------------------
  |  Branch (34454:17): [True: 433k, False: 30.3M]
  ------------------
34455|  30.3M|            janet_vm.registry[j] = janet_vm.registry[j - 1];
34456|  30.3M|        }
34457|   436k|        janet_vm.registry[j] = reg;
34458|   436k|    }
34459|  1.24k|    janet_vm.registry_dirty = 0;
34460|  1.24k|}
janet.c:janet_check_pointer_align:
34550|  2.58M|static void janet_check_pointer_align(void *p) {
34551|  2.58M|    (void) p;
34552|       |#if defined(JANET_NANBOX_64) && JANET_NANBOX_64_POINTER_SHIFT != 0
34553|       |    union {
34554|       |        void *p;
34555|       |        uintptr_t u;
34556|       |    } un;
34557|       |    un.p = p;
34558|       |    janet_assert(!(un.u & (uintptr_t) ((1 << JANET_NANBOX_64_POINTER_SHIFT) - 1)),
34559|       |                 "unaligned pointer wrap - cfunction pointers and abstract types must be aligned with this nanboxing configuration.");
34560|       |#endif
34561|  2.58M|}
janet.c:to_byte_view:
34725|      3|static JanetByteView to_byte_view(Janet value) {
34726|      3|    JanetByteView result;
34727|      3|    if (!janet_bytes_view(value, &result.bytes, &result.len)) {
  ------------------
  |  Branch (34727:9): [True: 3, False: 0]
  ------------------
34728|      3|        JanetString str = janet_to_string(value);
34729|      3|        result.bytes = str;
34730|       |        result.len = janet_string_length(str);
  ------------------
  |  | 1812|      3|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|      3|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
34731|      3|    }
34732|      3|    return result;
34733|      3|}
janet.c:memoize_byte_view:
34714|    383|static JanetByteView memoize_byte_view(Janet *value) {
34715|    383|    JanetByteView result;
34716|    383|    if (!janet_bytes_view(*value, &result.bytes, &result.len)) {
  ------------------
  |  Branch (34716:9): [True: 31, False: 352]
  ------------------
34717|     31|        JanetString str = janet_to_string(*value);
34718|     31|        *value = janet_wrap_string(str);
  ------------------
  |  |  848|     31|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  828|     31|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     31|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     31|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34719|     31|        result.bytes = str;
34720|       |        result.len = janet_string_length(str);
  ------------------
  |  | 1812|     31|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1811|     31|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
34721|     31|    }
34722|    383|    return result;
34723|    383|}
janet.c:janet_compare_abstract:
35434|  8.96k|static int janet_compare_abstract(JanetAbstract xx, JanetAbstract yy) {
35435|  8.96k|    if (xx == yy) return 0;
  ------------------
  |  Branch (35435:9): [True: 5.45k, False: 3.51k]
  ------------------
35436|  3.51k|    const JanetAbstractType *xt = janet_abstract_type(xx);
  ------------------
  |  | 1898|  3.51k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|  3.51k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35437|  3.51k|    const JanetAbstractType *yt = janet_abstract_type(yy);
  ------------------
  |  | 1898|  3.51k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|  3.51k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35438|  3.51k|    if (xt != yt) {
  ------------------
  |  Branch (35438:9): [True: 861, False: 2.65k]
  ------------------
35439|    861|        return xt > yt ? 1 : -1;
  ------------------
  |  Branch (35439:16): [True: 673, False: 188]
  ------------------
35440|    861|    }
35441|  2.65k|    if (xt->compare == NULL) {
  ------------------
  |  Branch (35441:9): [True: 126, False: 2.53k]
  ------------------
35442|    126|        return xx > yy ? 1 : -1;
  ------------------
  |  Branch (35442:16): [True: 42, False: 84]
  ------------------
35443|    126|    }
35444|  2.53k|    return xt->compare(xx, yy);
35445|  2.65k|}
janet.c:push_traversal_node:
35232|   315k|static void push_traversal_node(void *lhs, void *rhs, int32_t index2) {
35233|   315k|    JanetTraversalNode node;
35234|   315k|    node.self = (JanetGCObject *) lhs;
35235|   315k|    node.other = (JanetGCObject *) rhs;
35236|   315k|    node.index = 0;
35237|   315k|    node.index2 = index2;
35238|   315k|    int is_new = janet_vm.traversal_base == NULL;
35239|   315k|    if (is_new || (janet_vm.traversal + 1 >= janet_vm.traversal_top)) {
  ------------------
  |  Branch (35239:9): [True: 845, False: 314k]
  |  Branch (35239:19): [True: 25, False: 314k]
  ------------------
35240|    870|        size_t oldsize = is_new ? 0 : (janet_vm.traversal - janet_vm.traversal_base);
  ------------------
  |  Branch (35240:26): [True: 845, False: 25]
  ------------------
35241|    870|        size_t newsize = 2 * oldsize + 1;
35242|    870|        if (newsize < 128) {
  ------------------
  |  Branch (35242:13): [True: 845, False: 25]
  ------------------
35243|    845|            newsize = 128;
35244|    845|        }
35245|    870|        JanetTraversalNode *tn = janet_realloc(janet_vm.traversal_base, newsize * sizeof(JanetTraversalNode));
  ------------------
  |  | 2409|    870|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
35246|    870|        if (tn == NULL) {
  ------------------
  |  Branch (35246:13): [True: 0, False: 870]
  ------------------
35247|      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]
  |  |  ------------------
  ------------------
35248|      0|        }
35249|    870|        janet_vm.traversal_base = tn;
35250|    870|        janet_vm.traversal_top = janet_vm.traversal_base + newsize;
35251|    870|        janet_vm.traversal = janet_vm.traversal_base + oldsize;
35252|    870|    }
35253|   315k|    *(++janet_vm.traversal) = node;
35254|   315k|}
janet.c:traversal_next:
35264|   129M|static int traversal_next(Janet *x, Janet *y) {
35265|   129M|    JanetTraversalNode *t = janet_vm.traversal;
35266|   129M|    while (t && t > janet_vm.traversal_base) {
  ------------------
  |  Branch (35266:12): [True: 15.3M, False: 114M]
  |  Branch (35266:17): [True: 962k, False: 14.3M]
  ------------------
35267|   962k|        JanetGCObject *self = t->self;
35268|   962k|        JanetTupleHead *tself = (JanetTupleHead *)self;
35269|   962k|        JanetStructHead *sself = (JanetStructHead *)self;
35270|   962k|        JanetGCObject *other = t->other;
35271|   962k|        JanetTupleHead *tother = (JanetTupleHead *)other;
35272|   962k|        JanetStructHead *sother = (JanetStructHead *)other;
35273|   962k|        if ((self->flags & JANET_MEM_TYPEBITS) == JANET_MEMORY_TUPLE) {
  ------------------
  |  |  630|   962k|#define JANET_MEM_TYPEBITS 0xFF
  ------------------
  |  Branch (35273:13): [True: 905k, False: 56.6k]
  ------------------
35274|       |            /* Node is a tuple at index t->index */
35275|   905k|            if (t->index < tself->length && t->index < tother->length) {
  ------------------
  |  Branch (35275:17): [True: 610k, False: 295k]
  |  Branch (35275:45): [True: 610k, False: 25]
  ------------------
35276|   610k|                int32_t index = t->index++;
35277|   610k|                *x = tself->data[index];
35278|   610k|                *y = tother->data[index];
35279|   610k|                janet_vm.traversal = t;
35280|   610k|                return 0;
35281|   610k|            }
35282|   295k|            if (t->index2 && tself->length != tother->length) {
  ------------------
  |  Branch (35282:17): [True: 28.8k, False: 266k]
  |  Branch (35282:30): [True: 84, False: 28.7k]
  ------------------
35283|     84|                return tself->length > tother->length ? 3 : 1;
  ------------------
  |  Branch (35283:24): [True: 25, False: 59]
  ------------------
35284|     84|            }
35285|   295k|        } else {
35286|       |            /* Node is a struct at index t->index: if t->index2 is true, we should return the values. */
35287|  56.6k|            if (t->index2) {
  ------------------
  |  Branch (35287:17): [True: 25.3k, False: 31.2k]
  ------------------
35288|  25.3k|                t->index2 = 0;
35289|  25.3k|                int32_t index = t->index++;
35290|  25.3k|                *x = sself->data[index].value;
35291|  25.3k|                *y = sother->data[index].value;
35292|  25.3k|                janet_vm.traversal = t;
35293|  25.3k|                return 0;
35294|  25.3k|            }
35295|  31.2k|            for (int32_t i = t->index; i < sself->capacity; i++) {
  ------------------
  |  Branch (35295:40): [True: 25.3k, False: 5.92k]
  ------------------
35296|  25.3k|                t->index2 = 1;
35297|  25.3k|                *x = sself->data[t->index].key;
35298|  25.3k|                *y = sother->data[t->index].key;
35299|  25.3k|                janet_vm.traversal = t;
35300|  25.3k|                return 0;
35301|  25.3k|            }
35302|       |            /* Traverse prototype */
35303|  5.92k|            JanetStruct sproto = sself->proto;
35304|  5.92k|            JanetStruct oproto = sother->proto;
35305|  5.92k|            if (sproto && !oproto) return 3;
  ------------------
  |  Branch (35305:17): [True: 0, False: 5.92k]
  |  Branch (35305:27): [True: 0, False: 0]
  ------------------
35306|  5.92k|            if (!sproto && oproto) return 1;
  ------------------
  |  Branch (35306:17): [True: 5.92k, False: 0]
  |  Branch (35306:28): [True: 0, False: 5.92k]
  ------------------
35307|  5.92k|            if (oproto && sproto) {
  ------------------
  |  Branch (35307:17): [True: 0, False: 5.92k]
  |  Branch (35307:27): [True: 0, False: 0]
  ------------------
35308|      0|                *x = janet_wrap_struct(sproto);
  ------------------
  |  |  842|      0|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35309|      0|                *y = janet_wrap_struct(oproto);
  ------------------
  |  |  842|      0|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35310|      0|                janet_vm.traversal = t - 1;
35311|      0|                return 0;
35312|      0|            }
35313|  5.92k|        }
35314|   300k|        t--;
35315|   300k|    }
35316|   128M|    janet_vm.traversal = t;
35317|   128M|    return 2;
35318|   129M|}
janet.c:murmur64:
35497|   157M|static uint64_t murmur64(uint64_t h) {
35498|   157M|    h ^= h >> 33;
35499|   157M|    h *= 0xff51afd7ed558ccdUL;
35500|   157M|    h ^= h >> 33;
35501|   157M|    h *= 0xc4ceb9fe1a85ec53UL;
35502|   157M|    h ^= h >> 33;
35503|   157M|    return h;
35504|   157M|}
janet.c:getter_checkint:
35640|  79.3M|static int32_t getter_checkint(JanetType type, Janet key, int32_t max) {
35641|  79.3M|    if (!janet_checkint(key)) goto bad;
  ------------------
  |  Branch (35641:9): [True: 6, False: 79.3M]
  ------------------
35642|  79.3M|    int32_t ret = janet_unwrap_integer(key);
  ------------------
  |  |  966|  79.3M|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  839|  79.3M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
35643|  79.3M|    if (ret < 0) goto bad;
  ------------------
  |  Branch (35643:9): [True: 2, False: 79.3M]
  ------------------
35644|  79.3M|    if (ret >= max) goto bad;
  ------------------
  |  Branch (35644:9): [True: 45, False: 79.3M]
  ------------------
35645|  79.3M|    return ret;
35646|     53|bad:
35647|     53|    janet_panicf("expected integer key for %s in range [0, %d), got %v", janet_type_names[type], max, key);
35648|  79.3M|}
janet.c:run_vm:
36424|   383k|static JanetSignal run_vm(JanetFiber *fiber, Janet in) {
36425|       |
36426|       |    /* opcode -> label lookup if using clang/GCC */
36427|   383k|#ifdef JANET_USE_COMPUTED_GOTOS
36428|   383k|    static void *op_lookup[255] = {
36429|   383k|        &&label_JOP_NOOP,
36430|   383k|        &&label_JOP_ERROR,
36431|   383k|        &&label_JOP_TYPECHECK,
36432|   383k|        &&label_JOP_RETURN,
36433|   383k|        &&label_JOP_RETURN_NIL,
36434|   383k|        &&label_JOP_ADD_IMMEDIATE,
36435|   383k|        &&label_JOP_ADD,
36436|   383k|        &&label_JOP_SUBTRACT_IMMEDIATE,
36437|   383k|        &&label_JOP_SUBTRACT,
36438|   383k|        &&label_JOP_MULTIPLY_IMMEDIATE,
36439|   383k|        &&label_JOP_MULTIPLY,
36440|   383k|        &&label_JOP_DIVIDE_IMMEDIATE,
36441|   383k|        &&label_JOP_DIVIDE,
36442|   383k|        &&label_JOP_DIVIDE_FLOOR,
36443|   383k|        &&label_JOP_MODULO,
36444|   383k|        &&label_JOP_REMAINDER,
36445|   383k|        &&label_JOP_BAND,
36446|   383k|        &&label_JOP_BOR,
36447|   383k|        &&label_JOP_BXOR,
36448|   383k|        &&label_JOP_BNOT,
36449|   383k|        &&label_JOP_SHIFT_LEFT,
36450|   383k|        &&label_JOP_SHIFT_LEFT_IMMEDIATE,
36451|   383k|        &&label_JOP_SHIFT_RIGHT,
36452|   383k|        &&label_JOP_SHIFT_RIGHT_IMMEDIATE,
36453|   383k|        &&label_JOP_SHIFT_RIGHT_UNSIGNED,
36454|   383k|        &&label_JOP_SHIFT_RIGHT_UNSIGNED_IMMEDIATE,
36455|   383k|        &&label_JOP_MOVE_FAR,
36456|   383k|        &&label_JOP_MOVE_NEAR,
36457|   383k|        &&label_JOP_JUMP,
36458|   383k|        &&label_JOP_JUMP_IF,
36459|   383k|        &&label_JOP_JUMP_IF_NOT,
36460|   383k|        &&label_JOP_JUMP_IF_NIL,
36461|   383k|        &&label_JOP_JUMP_IF_NOT_NIL,
36462|   383k|        &&label_JOP_GREATER_THAN,
36463|   383k|        &&label_JOP_GREATER_THAN_IMMEDIATE,
36464|   383k|        &&label_JOP_LESS_THAN,
36465|   383k|        &&label_JOP_LESS_THAN_IMMEDIATE,
36466|   383k|        &&label_JOP_EQUALS,
36467|   383k|        &&label_JOP_EQUALS_IMMEDIATE,
36468|   383k|        &&label_JOP_COMPARE,
36469|   383k|        &&label_JOP_LOAD_NIL,
36470|   383k|        &&label_JOP_LOAD_TRUE,
36471|   383k|        &&label_JOP_LOAD_FALSE,
36472|   383k|        &&label_JOP_LOAD_INTEGER,
36473|   383k|        &&label_JOP_LOAD_CONSTANT,
36474|   383k|        &&label_JOP_LOAD_UPVALUE,
36475|   383k|        &&label_JOP_LOAD_SELF,
36476|   383k|        &&label_JOP_SET_UPVALUE,
36477|   383k|        &&label_JOP_CLOSURE,
36478|   383k|        &&label_JOP_PUSH,
36479|   383k|        &&label_JOP_PUSH_2,
36480|   383k|        &&label_JOP_PUSH_3,
36481|   383k|        &&label_JOP_PUSH_ARRAY,
36482|   383k|        &&label_JOP_CALL,
36483|   383k|        &&label_JOP_TAILCALL,
36484|   383k|        &&label_JOP_RESUME,
36485|   383k|        &&label_JOP_SIGNAL,
36486|   383k|        &&label_JOP_PROPAGATE,
36487|   383k|        &&label_JOP_IN,
36488|   383k|        &&label_JOP_GET,
36489|   383k|        &&label_JOP_PUT,
36490|   383k|        &&label_JOP_GET_INDEX,
36491|   383k|        &&label_JOP_PUT_INDEX,
36492|   383k|        &&label_JOP_LENGTH,
36493|   383k|        &&label_JOP_MAKE_ARRAY,
36494|   383k|        &&label_JOP_MAKE_BUFFER,
36495|   383k|        &&label_JOP_MAKE_STRING,
36496|   383k|        &&label_JOP_MAKE_STRUCT,
36497|   383k|        &&label_JOP_MAKE_TABLE,
36498|   383k|        &&label_JOP_MAKE_TUPLE,
36499|   383k|        &&label_JOP_MAKE_BRACKET_TUPLE,
36500|   383k|        &&label_JOP_GREATER_THAN_EQUAL,
36501|   383k|        &&label_JOP_LESS_THAN_EQUAL,
36502|   383k|        &&label_JOP_NEXT,
36503|   383k|        &&label_JOP_NOT_EQUALS,
36504|   383k|        &&label_JOP_NOT_EQUALS_IMMEDIATE,
36505|   383k|        &&label_JOP_CANCEL,
36506|   383k|        &&label_unknown_op,
36507|   383k|        &&label_unknown_op,
36508|   383k|        &&label_unknown_op,
36509|   383k|        &&label_unknown_op,
36510|   383k|        &&label_unknown_op,
36511|   383k|        &&label_unknown_op,
36512|   383k|        &&label_unknown_op,
36513|   383k|        &&label_unknown_op,
36514|   383k|        &&label_unknown_op,
36515|   383k|        &&label_unknown_op,
36516|   383k|        &&label_unknown_op,
36517|   383k|        &&label_unknown_op,
36518|   383k|        &&label_unknown_op,
36519|   383k|        &&label_unknown_op,
36520|   383k|        &&label_unknown_op,
36521|   383k|        &&label_unknown_op,
36522|   383k|        &&label_unknown_op,
36523|   383k|        &&label_unknown_op,
36524|   383k|        &&label_unknown_op,
36525|   383k|        &&label_unknown_op,
36526|   383k|        &&label_unknown_op,
36527|   383k|        &&label_unknown_op,
36528|   383k|        &&label_unknown_op,
36529|   383k|        &&label_unknown_op,
36530|   383k|        &&label_unknown_op,
36531|   383k|        &&label_unknown_op,
36532|   383k|        &&label_unknown_op,
36533|   383k|        &&label_unknown_op,
36534|   383k|        &&label_unknown_op,
36535|   383k|        &&label_unknown_op,
36536|   383k|        &&label_unknown_op,
36537|   383k|        &&label_unknown_op,
36538|   383k|        &&label_unknown_op,
36539|   383k|        &&label_unknown_op,
36540|   383k|        &&label_unknown_op,
36541|   383k|        &&label_unknown_op,
36542|   383k|        &&label_unknown_op,
36543|   383k|        &&label_unknown_op,
36544|   383k|        &&label_unknown_op,
36545|   383k|        &&label_unknown_op,
36546|   383k|        &&label_unknown_op,
36547|   383k|        &&label_unknown_op,
36548|   383k|        &&label_unknown_op,
36549|   383k|        &&label_unknown_op,
36550|   383k|        &&label_unknown_op,
36551|   383k|        &&label_unknown_op,
36552|   383k|        &&label_unknown_op,
36553|   383k|        &&label_unknown_op,
36554|   383k|        &&label_unknown_op,
36555|   383k|        &&label_unknown_op,
36556|   383k|        &&label_unknown_op,
36557|   383k|        &&label_unknown_op,
36558|   383k|        &&label_unknown_op,
36559|   383k|        &&label_unknown_op,
36560|   383k|        &&label_unknown_op,
36561|   383k|        &&label_unknown_op,
36562|   383k|        &&label_unknown_op,
36563|   383k|        &&label_unknown_op,
36564|   383k|        &&label_unknown_op,
36565|   383k|        &&label_unknown_op,
36566|   383k|        &&label_unknown_op,
36567|   383k|        &&label_unknown_op,
36568|   383k|        &&label_unknown_op,
36569|   383k|        &&label_unknown_op,
36570|   383k|        &&label_unknown_op,
36571|   383k|        &&label_unknown_op,
36572|   383k|        &&label_unknown_op,
36573|   383k|        &&label_unknown_op,
36574|   383k|        &&label_unknown_op,
36575|   383k|        &&label_unknown_op,
36576|   383k|        &&label_unknown_op,
36577|   383k|        &&label_unknown_op,
36578|   383k|        &&label_unknown_op,
36579|   383k|        &&label_unknown_op,
36580|   383k|        &&label_unknown_op,
36581|   383k|        &&label_unknown_op,
36582|   383k|        &&label_unknown_op,
36583|   383k|        &&label_unknown_op,
36584|   383k|        &&label_unknown_op,
36585|   383k|        &&label_unknown_op,
36586|   383k|        &&label_unknown_op,
36587|   383k|        &&label_unknown_op,
36588|   383k|        &&label_unknown_op,
36589|   383k|        &&label_unknown_op,
36590|   383k|        &&label_unknown_op,
36591|   383k|        &&label_unknown_op,
36592|   383k|        &&label_unknown_op,
36593|   383k|        &&label_unknown_op,
36594|   383k|        &&label_unknown_op,
36595|   383k|        &&label_unknown_op,
36596|   383k|        &&label_unknown_op,
36597|   383k|        &&label_unknown_op,
36598|   383k|        &&label_unknown_op,
36599|   383k|        &&label_unknown_op,
36600|   383k|        &&label_unknown_op,
36601|   383k|        &&label_unknown_op,
36602|   383k|        &&label_unknown_op,
36603|   383k|        &&label_unknown_op,
36604|   383k|        &&label_unknown_op,
36605|   383k|        &&label_unknown_op,
36606|   383k|        &&label_unknown_op,
36607|   383k|        &&label_unknown_op,
36608|   383k|        &&label_unknown_op,
36609|   383k|        &&label_unknown_op,
36610|   383k|        &&label_unknown_op,
36611|   383k|        &&label_unknown_op,
36612|   383k|        &&label_unknown_op,
36613|   383k|        &&label_unknown_op,
36614|   383k|        &&label_unknown_op,
36615|   383k|        &&label_unknown_op,
36616|   383k|        &&label_unknown_op,
36617|   383k|        &&label_unknown_op,
36618|   383k|        &&label_unknown_op,
36619|   383k|        &&label_unknown_op,
36620|   383k|        &&label_unknown_op,
36621|   383k|        &&label_unknown_op,
36622|   383k|        &&label_unknown_op,
36623|   383k|        &&label_unknown_op,
36624|   383k|        &&label_unknown_op,
36625|   383k|        &&label_unknown_op,
36626|   383k|        &&label_unknown_op,
36627|   383k|        &&label_unknown_op,
36628|   383k|        &&label_unknown_op,
36629|   383k|        &&label_unknown_op,
36630|   383k|        &&label_unknown_op,
36631|   383k|        &&label_unknown_op,
36632|   383k|        &&label_unknown_op,
36633|   383k|        &&label_unknown_op,
36634|   383k|        &&label_unknown_op,
36635|   383k|        &&label_unknown_op,
36636|   383k|        &&label_unknown_op,
36637|   383k|        &&label_unknown_op,
36638|   383k|        &&label_unknown_op,
36639|   383k|        &&label_unknown_op,
36640|   383k|        &&label_unknown_op,
36641|   383k|        &&label_unknown_op,
36642|   383k|        &&label_unknown_op,
36643|   383k|        &&label_unknown_op,
36644|   383k|        &&label_unknown_op,
36645|   383k|        &&label_unknown_op,
36646|   383k|        &&label_unknown_op,
36647|   383k|        &&label_unknown_op,
36648|   383k|        &&label_unknown_op,
36649|   383k|        &&label_unknown_op,
36650|   383k|        &&label_unknown_op,
36651|   383k|        &&label_unknown_op,
36652|   383k|        &&label_unknown_op,
36653|   383k|        &&label_unknown_op,
36654|   383k|        &&label_unknown_op,
36655|   383k|        &&label_unknown_op,
36656|   383k|        &&label_unknown_op,
36657|   383k|        &&label_unknown_op,
36658|   383k|        &&label_unknown_op,
36659|   383k|        &&label_unknown_op,
36660|   383k|        &&label_unknown_op,
36661|   383k|        &&label_unknown_op,
36662|   383k|        &&label_unknown_op,
36663|   383k|        &&label_unknown_op,
36664|   383k|        &&label_unknown_op,
36665|   383k|        &&label_unknown_op,
36666|   383k|        &&label_unknown_op,
36667|   383k|        &&label_unknown_op,
36668|   383k|        &&label_unknown_op,
36669|   383k|        &&label_unknown_op,
36670|   383k|        &&label_unknown_op,
36671|   383k|        &&label_unknown_op,
36672|   383k|        &&label_unknown_op,
36673|   383k|        &&label_unknown_op,
36674|   383k|        &&label_unknown_op,
36675|   383k|        &&label_unknown_op,
36676|   383k|        &&label_unknown_op,
36677|   383k|        &&label_unknown_op,
36678|   383k|        &&label_unknown_op,
36679|   383k|        &&label_unknown_op,
36680|   383k|        &&label_unknown_op,
36681|   383k|        &&label_unknown_op,
36682|   383k|        &&label_unknown_op,
36683|   383k|        &&label_unknown_op
36684|   383k|    };
36685|   383k|#endif
36686|       |
36687|       |    /* Interpreter state */
36688|   383k|    register Janet *stack;
36689|   383k|    register uint32_t *pc;
36690|   383k|    register JanetFunction *func;
36691|       |
36692|       |    /* NOTE: Flag smuggling! We "smuggle" the fiber sigal in the gc.flags field instead of the usual flags field */
36693|   383k|    if (fiber->flags & JANET_FIBER_RESUME_SIGNAL) {
  ------------------
  |  |  786|   383k|#define JANET_FIBER_RESUME_SIGNAL 0x400000
  ------------------
  |  Branch (36693:9): [True: 0, False: 383k]
  ------------------
36694|       |        /* Get the signal */
36695|      0|        JanetSignal sig = (fiber->gc.flags & JANET_FIBER_STATUS_MASK) >> JANET_FIBER_STATUS_OFFSET;
  ------------------
  |  |  785|      0|#define JANET_FIBER_STATUS_MASK 0x3F0000
  ------------------
                      JanetSignal sig = (fiber->gc.flags & JANET_FIBER_STATUS_MASK) >> JANET_FIBER_STATUS_OFFSET;
  ------------------
  |  |  787|      0|#define JANET_FIBER_STATUS_OFFSET 16
  ------------------
36696|       |        /* Clear the signal */
36697|      0|        fiber->gc.flags &= ~JANET_FIBER_STATUS_MASK;
  ------------------
  |  |  785|      0|#define JANET_FIBER_STATUS_MASK 0x3F0000
  ------------------
36698|      0|        fiber->flags &= ~JANET_FIBER_RESUME_SIGNAL;
  ------------------
  |  |  786|      0|#define JANET_FIBER_RESUME_SIGNAL 0x400000
  ------------------
36699|      0|        janet_vm.return_reg[0] = in;
36700|      0|        return sig;
36701|      0|    }
36702|       |
36703|   383k|    vm_restore();
  ------------------
  |  |36148|   383k|#define vm_restore() do { \
  |  |36149|   383k|    stack = fiber->data + fiber->frame; \
  |  |36150|   383k|    pc = janet_stack_frame(stack)->pc; \
  |  |  ------------------
  |  |  |  |  809|   383k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|   383k|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36151|   383k|    func = janet_stack_frame(stack)->func; \
  |  |  ------------------
  |  |  |  |  809|   383k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|   383k|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36152|   383k|} while (0)
  |  |  ------------------
  |  |  |  Branch (36152:10): [Folded, False: 383k]
  |  |  ------------------
  ------------------
36704|       |
36705|   383k|    if (fiber->flags & JANET_FIBER_DID_LONGJUMP) {
  ------------------
  |  |  792|   383k|#define JANET_FIBER_DID_LONGJUMP     0x8000000
  ------------------
  |  Branch (36705:9): [True: 43, False: 383k]
  ------------------
36706|     43|        if (janet_fiber_frame(fiber)->func == NULL) {
  ------------------
  |  |  810|     43|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  809|     43|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|     43|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (36706:13): [True: 43, False: 0]
  ------------------
36707|       |            /* Inside a c function */
36708|     43|            janet_fiber_popframe(fiber);
36709|     43|            vm_restore();
  ------------------
  |  |36148|     43|#define vm_restore() do { \
  |  |36149|     43|    stack = fiber->data + fiber->frame; \
  |  |36150|     43|    pc = janet_stack_frame(stack)->pc; \
  |  |  ------------------
  |  |  |  |  809|     43|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|     43|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36151|     43|    func = janet_stack_frame(stack)->func; \
  |  |  ------------------
  |  |  |  |  809|     43|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|     43|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36152|     43|} while (0)
  |  |  ------------------
  |  |  |  Branch (36152:10): [Folded, False: 43]
  |  |  ------------------
  ------------------
36710|     43|        }
36711|       |        /* Check if we were at a tail call instruction. If so, do implicit return */
36712|     43|        if ((*pc & 0xFF) == JOP_TAILCALL) {
  ------------------
  |  Branch (36712:13): [True: 40, False: 3]
  ------------------
36713|       |            /* Tail call resume */
36714|     40|            int entrance_frame = janet_stack_frame(stack)->flags & JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  |  809|     40|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1026|     40|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
                          int entrance_frame = janet_stack_frame(stack)->flags & JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  | 1013|     40|#define JANET_STACKFRAME_ENTRANCE 2
  ------------------
36715|     40|            janet_fiber_popframe(fiber);
36716|     40|            if (entrance_frame) {
  ------------------
  |  Branch (36716:17): [True: 40, False: 0]
  ------------------
36717|     40|                fiber->flags &= ~JANET_FIBER_FLAG_MASK;
  ------------------
  |  |  793|     40|#define JANET_FIBER_FLAG_MASK        0xF000000
  ------------------
36718|     40|                vm_return(JANET_SIGNAL_OK, in);
  ------------------
  |  |36153|     40|#define vm_return(sig, val) do { \
  |  |36154|     40|    janet_vm.return_reg[0] = (val); \
  |  |36155|     40|    vm_commit(); \
  |  |  ------------------
  |  |  |  |36147|     40|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  809|     40|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|     40|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36147:70): [Folded, False: 40]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36156|     40|    return (sig); \
  |  |36157|     40|} while (0)
  |  |  ------------------
  |  |  |  Branch (36157:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
36719|     40|            }
36720|      0|            vm_restore();
  ------------------
  |  |36148|      0|#define vm_restore() do { \
  |  |36149|      0|    stack = fiber->data + fiber->frame; \
  |  |36150|      0|    pc = janet_stack_frame(stack)->pc; \
  |  |  ------------------
  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36151|      0|    func = janet_stack_frame(stack)->func; \
  |  |  ------------------
  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36152|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (36152:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
36721|      0|        }
36722|     43|    }
36723|       |
36724|   383k|    if (!(fiber->flags & JANET_FIBER_RESUME_NO_USEVAL)) stack[A] = in;
  ------------------
  |  |  790|   383k|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
                  if (!(fiber->flags & JANET_FIBER_RESUME_NO_USEVAL)) stack[A] = in;
  ------------------
  |  |36113|      3|#define A ((*pc >> 8)  & 0xFF)
  ------------------
  |  Branch (36724:9): [True: 3, False: 383k]
  ------------------
36725|   383k|    if (!(fiber->flags & JANET_FIBER_RESUME_NO_SKIP)) pc++;
  ------------------
  |  |  791|   383k|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  ------------------
  |  Branch (36725:9): [True: 3, False: 383k]
  ------------------
36726|       |
36727|   383k|    uint8_t first_opcode = *pc & ((fiber->flags & JANET_FIBER_BREAKPOINT) ? 0x7F : 0xFF);
  ------------------
  |  |  789|   383k|#define JANET_FIBER_BREAKPOINT       0x1000000
  ------------------
  |  Branch (36727:35): [True: 0, False: 383k]
  ------------------
36728|       |
36729|   383k|    fiber->flags &= ~JANET_FIBER_FLAG_MASK;
  ------------------
  |  |  793|   383k|#define JANET_FIBER_FLAG_MASK        0xF000000
  ------------------
36730|       |
36731|       |    /* Main interpreter loop. Semantically is a switch on
36732|       |     * (*pc & 0xFF) inside of an infinite loop. */
36733|   383k|    VM_START();
  ------------------
  |  |36132|   383k|#define VM_START() { goto *op_lookup[first_opcode];
  ------------------
36734|       |
36735|   383k|    VM_DEFAULT();
  ------------------
  |  |36135|      0|#define VM_DEFAULT() label_unknown_op:
  ------------------
36736|      0|    fiber->flags |= JANET_FIBER_BREAKPOINT | JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  789|      0|#define JANET_FIBER_BREAKPOINT       0x1000000
  ------------------
                  fiber->flags |= JANET_FIBER_BREAKPOINT | JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  790|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
                  fiber->flags |= JANET_FIBER_BREAKPOINT | JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  791|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  ------------------
36737|      0|    vm_return(JANET_SIGNAL_DEBUG, janet_wrap_nil());
  ------------------
  |  |36153|      0|#define vm_return(sig, val) do { \
  |  |36154|      0|    janet_vm.return_reg[0] = (val); \
  |  |36155|      0|    vm_commit(); \
  |  |  ------------------
  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36156|      0|    return (sig); \
  |  |36157|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (36157:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
36738|       |
36739|      0|    VM_OP(JOP_NOOP)
  ------------------
  |  |36134|      0|#define VM_OP(op) label_##op :
  ------------------
36740|      0|    vm_pcnext();
  ------------------
  |  |36167|      0|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36741|       |
36742|    283|    VM_OP(JOP_ERROR)
  ------------------
  |  |36134|    283|#define VM_OP(op) label_##op :
  ------------------
36743|    283|    vm_return(JANET_SIGNAL_ERROR, stack[A]);
  ------------------
  |  |36153|    283|#define vm_return(sig, val) do { \
  |  |36154|    283|    janet_vm.return_reg[0] = (val); \
  |  |36155|    283|    vm_commit(); \
  |  |  ------------------
  |  |  |  |36147|    283|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  809|    283|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|    283|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36147:70): [Folded, False: 283]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36156|    283|    return (sig); \
  |  |36157|    283|} while (0)
  |  |  ------------------
  |  |  |  Branch (36157:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
36744|       |
36745|      0|    VM_OP(JOP_TYPECHECK)
  ------------------
  |  |36134|      0|#define VM_OP(op) label_##op :
  ------------------
36746|      0|    vm_assert_types(stack[A], E);
  ------------------
  |  |36179|      0|#define vm_assert_types(X, TS) do { \
  |  |36180|      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 (36180:9): [True: 0, False: 0]
  |  |  ------------------
  |  |36181|      0|        vm_commit(); \
  |  |  ------------------
  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36182|      0|        janet_panicf("expected %T, got %v", (TS), (X)); \
  |  |36183|      0|    } \
  |  |36184|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (36184:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (36746:5): [True: 0, False: 0]
  ------------------
36747|      0|    vm_pcnext();
  ------------------
  |  |36167|      0|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36748|       |
36749|  76.6M|    VM_OP(JOP_RETURN) {
  ------------------
  |  |36134|  76.6M|#define VM_OP(op) label_##op :
  ------------------
36750|  76.6M|        Janet retval = stack[D];
  ------------------
  |  |36116|  76.6M|#define D (*pc >> 8)
  ------------------
36751|  76.6M|        int entrance_frame = janet_stack_frame(stack)->flags & JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  |  809|  76.6M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1026|  76.6M|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
                      int entrance_frame = janet_stack_frame(stack)->flags & JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  | 1013|  76.6M|#define JANET_STACKFRAME_ENTRANCE 2
  ------------------
36752|  76.6M|        janet_fiber_popframe(fiber);
36753|  76.6M|        if (entrance_frame) vm_return_no_restore(JANET_SIGNAL_OK, retval);
  ------------------
  |  |36158|   378k|#define vm_return_no_restore(sig, val) do { \
  |  |36159|   378k|    janet_vm.return_reg[0] = (val); \
  |  |36160|   378k|    return (sig); \
  |  |36161|   378k|} while (0)
  |  |  ------------------
  |  |  |  Branch (36161:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (36753:13): [True: 378k, False: 76.2M]
  ------------------
36754|  76.2M|        vm_restore();
  ------------------
  |  |36148|  76.2M|#define vm_restore() do { \
  |  |36149|  76.2M|    stack = fiber->data + fiber->frame; \
  |  |36150|  76.2M|    pc = janet_stack_frame(stack)->pc; \
  |  |  ------------------
  |  |  |  |  809|  76.2M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  76.2M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36151|  76.2M|    func = janet_stack_frame(stack)->func; \
  |  |  ------------------
  |  |  |  |  809|  76.2M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  76.2M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36152|  76.2M|} while (0)
  |  |  ------------------
  |  |  |  Branch (36152:10): [Folded, False: 76.2M]
  |  |  ------------------
  ------------------
36755|  76.2M|        stack[A] = retval;
  ------------------
  |  |36113|  76.2M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36756|  76.2M|        vm_checkgc_pcnext();
  ------------------
  |  |36168|  76.2M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36164|  76.2M|#define maybe_collect() do {\
  |  |  |  |36165|  76.2M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 47.0M, False: 29.2M]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 76.2M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36167|  76.2M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|  76.2M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36757|  76.2M|    }
36758|       |
36759|   106k|    VM_OP(JOP_RETURN_NIL) {
  ------------------
  |  |36134|   106k|#define VM_OP(op) label_##op :
  ------------------
36760|   106k|        Janet retval = janet_wrap_nil();
  ------------------
  |  |  831|   106k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   106k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   106k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   106k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36761|   106k|        int entrance_frame = janet_stack_frame(stack)->flags & JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  |  809|   106k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1026|   106k|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
                      int entrance_frame = janet_stack_frame(stack)->flags & JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  | 1013|   106k|#define JANET_STACKFRAME_ENTRANCE 2
  ------------------
36762|   106k|        janet_fiber_popframe(fiber);
36763|   106k|        if (entrance_frame) vm_return_no_restore(JANET_SIGNAL_OK, retval);
  ------------------
  |  |36158|    257|#define vm_return_no_restore(sig, val) do { \
  |  |36159|    257|    janet_vm.return_reg[0] = (val); \
  |  |36160|    257|    return (sig); \
  |  |36161|    257|} while (0)
  |  |  ------------------
  |  |  |  Branch (36161:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (36763:13): [True: 257, False: 106k]
  ------------------
36764|   106k|        vm_restore();
  ------------------
  |  |36148|   106k|#define vm_restore() do { \
  |  |36149|   106k|    stack = fiber->data + fiber->frame; \
  |  |36150|   106k|    pc = janet_stack_frame(stack)->pc; \
  |  |  ------------------
  |  |  |  |  809|   106k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|   106k|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36151|   106k|    func = janet_stack_frame(stack)->func; \
  |  |  ------------------
  |  |  |  |  809|   106k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|   106k|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36152|   106k|} while (0)
  |  |  ------------------
  |  |  |  Branch (36152:10): [Folded, False: 106k]
  |  |  ------------------
  ------------------
36765|   106k|        stack[A] = retval;
  ------------------
  |  |36113|   106k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36766|   106k|        vm_checkgc_pcnext();
  ------------------
  |  |36168|   106k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36164|   106k|#define maybe_collect() do {\
  |  |  |  |36165|   106k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 11.6k, False: 94.6k]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 106k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36167|   106k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|   106k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36767|   106k|    }
36768|       |
36769|  26.3M|    VM_OP(JOP_ADD_IMMEDIATE)
  ------------------
  |  |36134|  26.3M|#define VM_OP(op) label_##op :
  ------------------
36770|  26.3M|    vm_binop_immediate(+);
  ------------------
  |  |36198|  26.3M|    {\
  |  |36199|  26.3M|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |36114|  26.3M|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36200|  26.3M|        if (!janet_checktype(op1, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|  26.3M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [True: 26.3M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|  26.3M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|  26.3M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 26.3M, False: 37]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 37]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|  26.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 (36200:13): [True: 37, False: 26.3M]
  |  |  ------------------
  |  |36201|     37|            vm_commit();\
  |  |  ------------------
  |  |  |  |36147|     37|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  809|     37|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|     37|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36147:70): [Folded, False: 37]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36202|     37|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  ------------------
  |  |  |  |  835|     37|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |36203|     37|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |36204|     37|            stack = fiber->data + fiber->frame;\
  |  |36205|     37|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |36113|     37|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36206|     37|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36168|     37|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36164|     37|#define maybe_collect() do {\
  |  |  |  |  |  |36165|     37|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36165:9): [True: 0, False: 37]
  |  |  |  |  |  |  |  Branch (36165:85): [Folded, False: 37]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36167|     37|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36136|     37|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36207|  26.3M|        } else {\
  |  |36208|  26.3M|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  839|  26.3M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36209|  26.3M|            stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |36113|  26.3M|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |  835|  26.3M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |36210|  26.3M|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36167|  26.3M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|  26.3M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36211|  26.3M|        }\
  |  |36212|  26.3M|    }
  ------------------
36771|       |
36772|  26.3M|    VM_OP(JOP_ADD)
  ------------------
  |  |36134|   630k|#define VM_OP(op) label_##op :
  ------------------
36773|   630k|    vm_binop(+);
  ------------------
  |  |36250|   630k|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  ------------------
  |  |  |  |36234|   630k|    {\
  |  |  |  |36235|   630k|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |36114|   630k|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36236|   630k|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |36115|   630k|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36237|   630k|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|  1.26M|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 630k, False: 103]
  |  |  |  |  |  |  |  Branch (806:6): [True: 630k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  807|  1.26M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  803|   630k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (803:6): [True: 630k, False: 103]
  |  |  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 103]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  808|  1.26M|        : 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|   630k|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 630k, False: 24]
  |  |  |  |  |  |  |  Branch (806:6): [True: 630k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  807|   630k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  803|   630k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (803:6): [True: 630k, False: 24]
  |  |  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 24]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  808|   630k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36238|   630k|            double x1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|   630k|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36239|   630k|            double x2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|   630k|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36240|   630k|            stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|   630k|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |36250|   630k|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  835|   630k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36241|   630k|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36167|   630k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36136|   630k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36242|   630k|        } else {\
  |  |  |  |36243|    127|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|    127|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|    127|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|    127|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 127]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36244|    127|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36245|    127|            stack = fiber->data + fiber->frame;\
  |  |  |  |36246|    127|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|    127|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36247|    127|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36168|    127|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36164|    127|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36165|    127|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36165:9): [True: 0, False: 127]
  |  |  |  |  |  |  |  |  |  Branch (36165:85): [Folded, False: 127]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36167|    127|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36136|    127|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36248|    127|        }\
  |  |  |  |36249|   630k|    }
  |  |  ------------------
  ------------------
36774|       |
36775|   630k|    VM_OP(JOP_SUBTRACT_IMMEDIATE)
  ------------------
  |  |36134|   518k|#define VM_OP(op) label_##op :
  ------------------
36776|   518k|    vm_binop_immediate(-);
  ------------------
  |  |36198|   518k|    {\
  |  |36199|   518k|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |36114|   518k|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36200|   518k|        if (!janet_checktype(op1, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|   518k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [True: 518k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|   518k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|   518k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 515k, False: 3.30k]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 3.30k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|   518k|        : 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 (36200:13): [True: 3.30k, False: 515k]
  |  |  ------------------
  |  |36201|  3.30k|            vm_commit();\
  |  |  ------------------
  |  |  |  |36147|  3.30k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  809|  3.30k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|  3.30k|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36147:70): [Folded, False: 3.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36202|  3.30k|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  ------------------
  |  |  |  |  835|  3.30k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |36203|  3.30k|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |36204|  3.30k|            stack = fiber->data + fiber->frame;\
  |  |36205|  3.30k|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |36113|  3.30k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36206|  3.30k|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36168|  3.30k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36164|  3.30k|#define maybe_collect() do {\
  |  |  |  |  |  |36165|  3.30k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36165:9): [True: 0, False: 3.30k]
  |  |  |  |  |  |  |  Branch (36165:85): [Folded, False: 3.30k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36167|  3.30k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36136|  3.30k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36207|   515k|        } else {\
  |  |36208|   515k|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  839|   515k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36209|   515k|            stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |36113|   515k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |  835|   515k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |36210|   515k|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36167|   515k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|   515k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36211|   515k|        }\
  |  |36212|   518k|    }
  ------------------
36777|       |
36778|   518k|    VM_OP(JOP_SUBTRACT)
  ------------------
  |  |36134|  24.9k|#define VM_OP(op) label_##op :
  ------------------
36779|  24.9k|    vm_binop(-);
  ------------------
  |  |36250|  24.9k|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  ------------------
  |  |  |  |36234|  24.9k|    {\
  |  |  |  |36235|  24.9k|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |36114|  24.9k|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36236|  24.9k|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |36115|  24.9k|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36237|  24.9k|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|  49.9k|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 24.7k, False: 211]
  |  |  |  |  |  |  |  Branch (806:6): [True: 24.9k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  807|  49.9k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  803|  24.9k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (803:6): [True: 24.7k, False: 211]
  |  |  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 211]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  808|  49.9k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                       if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|  24.7k|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 24.7k, False: 33]
  |  |  |  |  |  |  |  Branch (806:6): [True: 24.7k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  807|  24.7k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  803|  24.7k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (803:6): [True: 24.7k, False: 33]
  |  |  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 33]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  808|  24.7k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36238|  24.7k|            double x1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|  24.7k|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36239|  24.7k|            double x2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|  24.7k|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36240|  24.7k|            stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|  24.7k|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |36250|  24.7k|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  835|  24.7k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36241|  24.7k|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36167|  24.7k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36136|  24.7k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36242|  24.7k|        } else {\
  |  |  |  |36243|    244|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|    244|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|    244|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|    244|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 244]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36244|    244|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36245|    244|            stack = fiber->data + fiber->frame;\
  |  |  |  |36246|    244|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|    244|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36247|    244|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36168|    244|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36164|    244|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36165|    244|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36165:9): [True: 0, False: 244]
  |  |  |  |  |  |  |  |  |  Branch (36165:85): [Folded, False: 244]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36167|    244|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36136|    244|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36248|    244|        }\
  |  |  |  |36249|  24.9k|    }
  |  |  ------------------
  ------------------
36780|       |
36781|  24.9k|    VM_OP(JOP_MULTIPLY_IMMEDIATE)
  ------------------
  |  |36134|     94|#define VM_OP(op) label_##op :
  ------------------
36782|     94|    vm_binop_immediate(*);
  ------------------
  |  |36198|     94|    {\
  |  |36199|     94|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |36114|     94|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36200|     94|        if (!janet_checktype(op1, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|     94|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [True: 94, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|     94|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|     94|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 85, False: 9]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|     94|        : 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 (36200:13): [True: 9, False: 85]
  |  |  ------------------
  |  |36201|      9|            vm_commit();\
  |  |  ------------------
  |  |  |  |36147|      9|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  809|      9|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|      9|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36147:70): [Folded, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36202|      9|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  ------------------
  |  |  |  |  835|      9|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |36203|      9|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |36204|      9|            stack = fiber->data + fiber->frame;\
  |  |36205|      9|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |36113|      9|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36206|      9|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36168|      9|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36164|      9|#define maybe_collect() do {\
  |  |  |  |  |  |36165|      9|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36165:9): [True: 0, False: 9]
  |  |  |  |  |  |  |  Branch (36165:85): [Folded, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36167|      9|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36136|      9|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36207|     85|        } else {\
  |  |36208|     85|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  839|     85|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36209|     85|            stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |36113|     85|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |  835|     85|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |36210|     85|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36167|     85|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|     85|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36211|     85|        }\
  |  |36212|     94|    }
  ------------------
36783|       |
36784|  2.23k|    VM_OP(JOP_MULTIPLY)
  ------------------
  |  |36134|  2.23k|#define VM_OP(op) label_##op :
  ------------------
36785|  2.23k|    vm_binop(*);
  ------------------
  |  |36250|  2.23k|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  ------------------
  |  |  |  |36234|  2.23k|    {\
  |  |  |  |36235|  2.23k|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |36114|  2.23k|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36236|  2.23k|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |36115|  2.23k|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36237|  2.23k|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|  4.47k|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 2.18k, False: 49]
  |  |  |  |  |  |  |  Branch (806:6): [True: 2.23k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  807|  4.47k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  803|  2.23k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (803:6): [True: 2.18k, False: 50]
  |  |  |  |  |  |  |  |  |  Branch (803:28): [True: 1, False: 49]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  808|  4.47k|        : 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.18k|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 2.12k, False: 60]
  |  |  |  |  |  |  |  Branch (806:6): [True: 2.18k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  807|  2.18k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  803|  2.18k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (803:6): [True: 2.12k, False: 60]
  |  |  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 60]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  808|  2.18k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36238|  2.12k|            double x1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|  2.12k|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36239|  2.12k|            double x2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|  2.12k|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36240|  2.12k|            stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|  2.12k|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |36250|  2.12k|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  835|  2.12k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36241|  2.12k|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36167|  2.12k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36136|  2.12k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36242|  2.12k|        } else {\
  |  |  |  |36243|    109|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|    109|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|    109|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|    109|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 109]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36244|    109|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36245|    109|            stack = fiber->data + fiber->frame;\
  |  |  |  |36246|    109|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|    109|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36247|    109|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36168|    109|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36164|    109|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36165|    109|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36165:9): [True: 0, False: 109]
  |  |  |  |  |  |  |  |  |  Branch (36165:85): [Folded, False: 109]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36167|    109|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36136|    109|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36248|    109|        }\
  |  |  |  |36249|  2.23k|    }
  |  |  ------------------
  ------------------
36786|       |
36787|  2.23k|    VM_OP(JOP_DIVIDE_IMMEDIATE)
  ------------------
  |  |36134|    166|#define VM_OP(op) label_##op :
  ------------------
36788|    166|    vm_binop_immediate( /);
  ------------------
  |  |36198|    166|    {\
  |  |36199|    166|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |36114|    166|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36200|    166|        if (!janet_checktype(op1, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|    166|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [True: 166, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|    166|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|    166|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 114, False: 52]
  |  |  |  |  |  |  |  Branch (803:28): [True: 2, False: 50]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|    166|        : 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 (36200:13): [True: 50, False: 116]
  |  |  ------------------
  |  |36201|     50|            vm_commit();\
  |  |  ------------------
  |  |  |  |36147|     50|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  809|     50|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|     50|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36147:70): [Folded, False: 50]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36202|     50|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  ------------------
  |  |  |  |  835|     50|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |36203|     50|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |36204|     50|            stack = fiber->data + fiber->frame;\
  |  |36205|     50|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |36113|     50|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36206|     50|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36168|     50|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36164|     50|#define maybe_collect() do {\
  |  |  |  |  |  |36165|     50|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36165:9): [True: 0, False: 50]
  |  |  |  |  |  |  |  Branch (36165:85): [Folded, False: 50]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36167|     50|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36136|     50|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36207|    116|        } else {\
  |  |36208|    116|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  839|    116|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36209|    116|            stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |36113|    116|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |  835|    116|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |36210|    116|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36167|    116|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|    116|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36211|    116|        }\
  |  |36212|    166|    }
  ------------------
36789|       |
36790|    166|    VM_OP(JOP_DIVIDE)
  ------------------
  |  |36134|    159|#define VM_OP(op) label_##op :
  ------------------
36791|    159|    vm_binop( /);
  ------------------
  |  |36250|    159|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  ------------------
  |  |  |  |36234|    159|    {\
  |  |  |  |36235|    159|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |36114|    159|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36236|    159|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |36115|    159|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36237|    159|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|    318|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 62, False: 97]
  |  |  |  |  |  |  |  Branch (806:6): [True: 159, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  807|    318|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  803|    159|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (803:6): [True: 62, False: 97]
  |  |  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 97]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  808|    318|        : 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|     62|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 38, False: 24]
  |  |  |  |  |  |  |  Branch (806:6): [True: 62, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  807|     62|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  803|     62|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (803:6): [True: 38, False: 24]
  |  |  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 24]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  808|     62|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36238|     38|            double x1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|     38|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36239|     38|            double x2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|     38|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36240|     38|            stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|     38|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |36250|     38|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  835|     38|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36241|     38|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36167|     38|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36136|     38|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36242|    121|        } else {\
  |  |  |  |36243|    121|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|    121|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|    121|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|    121|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 121]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36244|    121|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36245|    121|            stack = fiber->data + fiber->frame;\
  |  |  |  |36246|    121|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|    121|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36247|    121|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36168|    121|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36164|    121|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36165|    121|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36165:9): [True: 0, False: 121]
  |  |  |  |  |  |  |  |  |  Branch (36165:85): [Folded, False: 121]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36167|    121|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36136|    121|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36248|    121|        }\
  |  |  |  |36249|    159|    }
  |  |  ------------------
  ------------------
36792|       |
36793|  18.2k|    VM_OP(JOP_DIVIDE_FLOOR) {
  ------------------
  |  |36134|  18.2k|#define VM_OP(op) label_##op :
  ------------------
36794|  18.2k|        Janet op1 = stack[B];
  ------------------
  |  |36114|  18.2k|#define B ((*pc >> 16) & 0xFF)
  ------------------
36795|  18.2k|        Janet op2 = stack[C];
  ------------------
  |  |36115|  18.2k|#define C (*pc >> 24)
  ------------------
36796|  18.2k|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {
  ------------------
  |  |  806|  36.5k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 18.2k, False: 0]
  |  |  |  Branch (806:6): [True: 18.2k, Folded]
  |  |  ------------------
  |  |  807|  36.5k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|  18.2k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 18.2k, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  36.5k|        : 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|  18.2k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 18.2k, False: 0]
  |  |  |  Branch (806:6): [True: 18.2k, Folded]
  |  |  ------------------
  |  |  807|  18.2k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|  18.2k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 18.2k, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|  18.2k|        : 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36797|  18.2k|            double x1 = janet_unwrap_number(op1);
  ------------------
  |  |  839|  18.2k|#define janet_unwrap_number(x) ((x).number)
  ------------------
36798|  18.2k|            double x2 = janet_unwrap_number(op2);
  ------------------
  |  |  839|  18.2k|#define janet_unwrap_number(x) ((x).number)
  ------------------
36799|  18.2k|            stack[A] = janet_wrap_number(floor(x1 / x2));
  ------------------
  |  |36113|  18.2k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                          stack[A] = janet_wrap_number(floor(x1 / x2));
  ------------------
  |  |  835|  18.2k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
36800|  18.2k|            vm_pcnext();
  ------------------
  |  |36167|  18.2k|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|  18.2k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36801|  18.2k|        } else {
36802|      0|            vm_commit();
  ------------------
  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  ------------------
  ------------------
36803|      0|            Janet a = janet_binop_call("div", "rdiv", op1, op2);
36804|      0|            stack = fiber->data + fiber->frame;
36805|      0|            stack[A] = a;
  ------------------
  |  |36113|      0|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36806|      0|            vm_checkgc_pcnext();
  ------------------
  |  |36168|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36164|      0|#define maybe_collect() do {\
  |  |  |  |36165|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 0, False: 0]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36167|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36807|      0|        }
36808|  18.2k|    }
36809|       |
36810|  18.2k|    VM_OP(JOP_MODULO) {
  ------------------
  |  |36134|    305|#define VM_OP(op) label_##op :
  ------------------
36811|    305|        Janet op1 = stack[B];
  ------------------
  |  |36114|    305|#define B ((*pc >> 16) & 0xFF)
  ------------------
36812|    305|        Janet op2 = stack[C];
  ------------------
  |  |36115|    305|#define C (*pc >> 24)
  ------------------
36813|    305|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {
  ------------------
  |  |  806|    610|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 193, False: 112]
  |  |  |  Branch (806:6): [True: 305, Folded]
  |  |  ------------------
  |  |  807|    610|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|    305|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 193, False: 112]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 112]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    610|        : 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|    193|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 182, False: 11]
  |  |  |  Branch (806:6): [True: 193, Folded]
  |  |  ------------------
  |  |  807|    193|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|    193|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 182, False: 11]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    193|        : 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36814|    182|            double x1 = janet_unwrap_number(op1);
  ------------------
  |  |  839|    182|#define janet_unwrap_number(x) ((x).number)
  ------------------
36815|    182|            double x2 = janet_unwrap_number(op2);
  ------------------
  |  |  839|    182|#define janet_unwrap_number(x) ((x).number)
  ------------------
36816|    182|            if (x2 == 0) {
  ------------------
  |  Branch (36816:17): [True: 27, False: 155]
  ------------------
36817|     27|                stack[A] = janet_wrap_number(x1);
  ------------------
  |  |36113|     27|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                              stack[A] = janet_wrap_number(x1);
  ------------------
  |  |  835|     27|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
36818|    155|            } else {
36819|    155|                double intres = x2 * floor(x1 / x2);
36820|    155|                stack[A] = janet_wrap_number(x1 - intres);
  ------------------
  |  |36113|    155|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                              stack[A] = janet_wrap_number(x1 - intres);
  ------------------
  |  |  835|    155|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
36821|    155|            }
36822|    182|            vm_pcnext();
  ------------------
  |  |36167|    182|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|    182|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36823|    182|        } else {
36824|    123|            vm_commit();
  ------------------
  |  |36147|    123|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  809|    123|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|    123|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36147:70): [Folded, False: 123]
  |  |  ------------------
  ------------------
36825|    123|            Janet a = janet_binop_call("mod", "rmod", op1, op2);
36826|    123|            stack = fiber->data + fiber->frame;
36827|    123|            stack[A] = a;
  ------------------
  |  |36113|    123|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36828|    123|            vm_checkgc_pcnext();
  ------------------
  |  |36168|    123|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36164|    123|#define maybe_collect() do {\
  |  |  |  |36165|    123|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 0, False: 123]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 123]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36167|    123|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|    123|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36829|    123|        }
36830|    305|    }
36831|       |
36832|    463|    VM_OP(JOP_REMAINDER) {
  ------------------
  |  |36134|    463|#define VM_OP(op) label_##op :
  ------------------
36833|    463|        Janet op1 = stack[B];
  ------------------
  |  |36114|    463|#define B ((*pc >> 16) & 0xFF)
  ------------------
36834|    463|        Janet op2 = stack[C];
  ------------------
  |  |36115|    463|#define C (*pc >> 24)
  ------------------
36835|    463|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {
  ------------------
  |  |  806|    926|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 128, False: 335]
  |  |  |  Branch (806:6): [True: 463, Folded]
  |  |  ------------------
  |  |  807|    926|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|    463|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 117, False: 346]
  |  |  |  |  |  Branch (803:28): [True: 11, False: 335]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    926|        : 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|    128|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 63, False: 65]
  |  |  |  Branch (806:6): [True: 128, Folded]
  |  |  ------------------
  |  |  807|    128|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|    128|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 63, False: 65]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 65]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    128|        : 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36836|     63|            double x1 = janet_unwrap_number(op1);
  ------------------
  |  |  839|     63|#define janet_unwrap_number(x) ((x).number)
  ------------------
36837|     63|            double x2 = janet_unwrap_number(op2);
  ------------------
  |  |  839|     63|#define janet_unwrap_number(x) ((x).number)
  ------------------
36838|     63|            stack[A] = janet_wrap_number(fmod(x1, x2));
  ------------------
  |  |36113|     63|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                          stack[A] = janet_wrap_number(fmod(x1, x2));
  ------------------
  |  |  835|     63|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
36839|     63|            vm_pcnext();
  ------------------
  |  |36167|     63|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|     63|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36840|    400|        } else {
36841|    400|            vm_commit();
  ------------------
  |  |36147|    400|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  809|    400|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|    400|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36147:70): [Folded, False: 400]
  |  |  ------------------
  ------------------
36842|    400|            Janet a = janet_binop_call("%", "r%", op1, op2);
36843|    400|            stack = fiber->data + fiber->frame;
36844|    400|            stack[A] = a;
  ------------------
  |  |36113|    400|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36845|    400|            vm_checkgc_pcnext();
  ------------------
  |  |36168|    400|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36164|    400|#define maybe_collect() do {\
  |  |  |  |36165|    400|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 0, False: 400]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 400]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36167|    400|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|    400|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36846|    400|        }
36847|    463|    }
36848|       |
36849|    463|    VM_OP(JOP_BAND)
  ------------------
  |  |36134|      0|#define VM_OP(op) label_##op :
  ------------------
36850|      0|    vm_bitop(&);
  ------------------
  |  |36272|      0|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  ------------------
  |  |  |  |36252|      0|    {\
  |  |  |  |36253|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |36114|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36254|      0|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |36115|      0|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36255|      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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36256|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36257|      0|            double y2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36258|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36272|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36259|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36260|      0|            type1 x1 = (type1) y1;\
  |  |  |  |36261|      0|            int32_t x2 = (int32_t) y2;\
  |  |  |  |36262|      0|            stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|      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)
  |  |  |  |  ------------------
  |  |  |  |36263|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36167|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36136|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36264|      0|        } else {\
  |  |  |  |36265|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36266|      0|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36267|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |36268|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36269|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36168|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36164|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36165|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36165:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (36165:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36167|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36136|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36270|      0|        }\
  |  |  |  |36271|      0|    }
  |  |  ------------------
  ------------------
36851|       |
36852|    166|    VM_OP(JOP_BOR)
  ------------------
  |  |36134|    166|#define VM_OP(op) label_##op :
  ------------------
36853|    166|    vm_bitop( |);
  ------------------
  |  |36272|    166|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  ------------------
  |  |  |  |36252|    166|    {\
  |  |  |  |36253|    166|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |36114|    166|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36254|    166|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |36115|    166|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36255|    166|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  806|    332|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 54, False: 112]
  |  |  |  |  |  |  |  Branch (806:6): [True: 166, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  807|    332|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  803|    166|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (803:6): [True: 54, False: 112]
  |  |  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 112]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  808|    332|        : 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|     54|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (806:5): [True: 38, False: 16]
  |  |  |  |  |  |  |  Branch (806:6): [True: 54, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  807|     54|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  803|     54|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (803:6): [True: 38, False: 16]
  |  |  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 16]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  808|     54|        : 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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36256|     38|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|     38|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36257|     38|            double y2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|     38|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36258|     38|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36272|     38|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  962|     38|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (962:33): [True: 37, False: 1]
  |  |  |  |  |  |  |  |  |  Branch (962:53): [True: 37, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (962:73): [True: 36, False: 1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      2|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      2|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      2|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36259|     38|            if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |  962|     36|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (962:33): [True: 36, False: 0]
  |  |  |  |  |  |  |  Branch (962:53): [True: 36, False: 0]
  |  |  |  |  |  |  |  Branch (962:73): [True: 35, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      1|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      1|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      1|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36260|     36|            type1 x1 = (type1) y1;\
  |  |  |  |36261|     35|            int32_t x2 = (int32_t) y2;\
  |  |  |  |36262|     35|            stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|     35|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|     35|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |36263|     35|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36167|     35|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36136|     35|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36264|    128|        } else {\
  |  |  |  |36265|    128|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|    128|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|    128|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|    128|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 128]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36266|    128|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36267|    128|            stack = fiber->data + fiber->frame;\
  |  |  |  |36268|    128|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|    128|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36269|    128|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36168|    128|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36164|    128|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36165|    128|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36165:9): [True: 0, False: 128]
  |  |  |  |  |  |  |  |  |  Branch (36165:85): [Folded, False: 128]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36167|    128|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36136|    128|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36270|    128|        }\
  |  |  |  |36271|    166|    }
  |  |  ------------------
  ------------------
36854|       |
36855|    163|    VM_OP(JOP_BXOR)
  ------------------
  |  |36134|      0|#define VM_OP(op) label_##op :
  ------------------
36856|      0|    vm_bitop(^);
  ------------------
  |  |36272|      0|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  ------------------
  |  |  |  |36252|      0|    {\
  |  |  |  |36253|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |36114|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36254|      0|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |36115|      0|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36255|      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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36256|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36257|      0|            double y2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36258|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36272|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36259|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36260|      0|            type1 x1 = (type1) y1;\
  |  |  |  |36261|      0|            int32_t x2 = (int32_t) y2;\
  |  |  |  |36262|      0|            stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|      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)
  |  |  |  |  ------------------
  |  |  |  |36263|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36167|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36136|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36264|      0|        } else {\
  |  |  |  |36265|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36266|      0|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36267|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |36268|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36269|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36168|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36164|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36165|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36165:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (36165:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36167|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36136|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36270|      0|        }\
  |  |  |  |36271|      0|    }
  |  |  ------------------
  ------------------
36857|       |
36858|      0|    VM_OP(JOP_BNOT) {
  ------------------
  |  |36134|      0|#define VM_OP(op) label_##op :
  ------------------
36859|      0|        Janet op = stack[E];
  ------------------
  |  |36117|      0|#define E (*pc >> 16)
  ------------------
36860|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36861|      0|            stack[A] = janet_wrap_integer(~janet_unwrap_integer(op));
  ------------------
  |  |36113|      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)
  |  |  ------------------
  ------------------
36862|      0|            vm_pcnext();
  ------------------
  |  |36167|      0|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36863|      0|        } else {
36864|      0|            vm_commit();
  ------------------
  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  ------------------
  ------------------
36865|      0|            Janet a = janet_unary_call("~", op);
36866|      0|            stack = fiber->data + fiber->frame;
36867|      0|            stack[A] = a;
  ------------------
  |  |36113|      0|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36868|      0|            vm_checkgc_pcnext();
  ------------------
  |  |36168|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36164|      0|#define maybe_collect() do {\
  |  |  |  |36165|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 0, False: 0]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36167|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36869|      0|        }
36870|      0|    }
36871|       |
36872|      0|    VM_OP(JOP_SHIFT_RIGHT_UNSIGNED)
  ------------------
  |  |36134|      0|#define VM_OP(op) label_##op :
  ------------------
36873|      0|    vm_bitopu( >>);
  ------------------
  |  |36273|      0|#define vm_bitopu(op) _vm_bitop(op, uint32_t, janet_checkuintrange, "32-bit unsigned integers")
  |  |  ------------------
  |  |  |  |36252|      0|    {\
  |  |  |  |36253|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |36114|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36254|      0|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |36115|      0|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36255|      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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36256|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36257|      0|            double y2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36258|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36273|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36259|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36260|      0|            type1 x1 = (type1) y1;\
  |  |  |  |36261|      0|            int32_t x2 = (int32_t) y2;\
  |  |  |  |36262|      0|            stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|      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)
  |  |  |  |  ------------------
  |  |  |  |36263|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36167|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36136|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36264|      0|        } else {\
  |  |  |  |36265|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36266|      0|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36267|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |36268|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36269|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36168|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36164|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36165|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36165:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (36165:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36167|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36136|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36270|      0|        }\
  |  |  |  |36271|      0|    }
  |  |  ------------------
  ------------------
36874|       |
36875|      0|    VM_OP(JOP_SHIFT_RIGHT_UNSIGNED_IMMEDIATE)
  ------------------
  |  |36134|      0|#define VM_OP(op) label_##op :
  ------------------
36876|      0|    vm_bitopu_immediate( >>);
  ------------------
  |  |36232|      0|#define vm_bitopu_immediate(op) _vm_bitop_immediate(op, uint32_t, janet_checkuintrange, "32-bit unsigned integers");
  |  |  ------------------
  |  |  |  |36214|      0|    {\
  |  |  |  |36215|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |36114|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36216|      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 (36216:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |36217|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36218|      0|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |36219|      0|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |  |  |36220|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |36221|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36222|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36168|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36164|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36165|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36165:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (36165:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36167|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36136|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36223|      0|        } else {\
  |  |  |  |36224|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36225|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36232|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36226|      0|            type1 x1 = (type1) y1;\
  |  |  |  |36227|      0|            stack[A] = janet_wrap_number((type1) (x1 op CS));\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|      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)
  |  |  |  |  ------------------
  |  |  |  |36228|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36167|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36136|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36229|      0|        }\
  |  |  |  |36230|      0|    }
  |  |  ------------------
  ------------------
36877|       |
36878|      0|    VM_OP(JOP_SHIFT_RIGHT)
  ------------------
  |  |36134|      0|#define VM_OP(op) label_##op :
  ------------------
36879|      0|    vm_bitop( >>);
  ------------------
  |  |36272|      0|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  ------------------
  |  |  |  |36252|      0|    {\
  |  |  |  |36253|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |36114|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36254|      0|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |36115|      0|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36255|      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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36256|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36257|      0|            double y2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36258|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36272|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36259|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36260|      0|            type1 x1 = (type1) y1;\
  |  |  |  |36261|      0|            int32_t x2 = (int32_t) y2;\
  |  |  |  |36262|      0|            stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|      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)
  |  |  |  |  ------------------
  |  |  |  |36263|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36167|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36136|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36264|      0|        } else {\
  |  |  |  |36265|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36266|      0|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36267|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |36268|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36269|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36168|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36164|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36165|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36165:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (36165:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36167|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36136|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36270|      0|        }\
  |  |  |  |36271|      0|    }
  |  |  ------------------
  ------------------
36880|       |
36881|      0|    VM_OP(JOP_SHIFT_RIGHT_IMMEDIATE)
  ------------------
  |  |36134|      0|#define VM_OP(op) label_##op :
  ------------------
36882|      0|    vm_bitop_immediate( >>);
  ------------------
  |  |36231|      0|#define vm_bitop_immediate(op) _vm_bitop_immediate(op, int32_t, janet_checkintrange, "32-bit signed integers");
  |  |  ------------------
  |  |  |  |36214|      0|    {\
  |  |  |  |36215|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |36114|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36216|      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 (36216:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |36217|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36218|      0|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |36219|      0|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |  |  |36220|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |36221|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36222|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36168|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36164|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36165|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36165:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (36165:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36167|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36136|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36223|      0|        } else {\
  |  |  |  |36224|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36225|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36231|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36226|      0|            type1 x1 = (type1) y1;\
  |  |  |  |36227|      0|            stack[A] = janet_wrap_number((type1) (x1 op CS));\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|      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)
  |  |  |  |  ------------------
  |  |  |  |36228|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36167|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36136|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36229|      0|        }\
  |  |  |  |36230|      0|    }
  |  |  ------------------
  ------------------
36883|       |
36884|      0|    VM_OP(JOP_SHIFT_LEFT)
  ------------------
  |  |36134|      0|#define VM_OP(op) label_##op :
  ------------------
36885|      0|    vm_bitop( <<);
  ------------------
  |  |36272|      0|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  ------------------
  |  |  |  |36252|      0|    {\
  |  |  |  |36253|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |36114|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36254|      0|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |36115|      0|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36255|      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)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36256|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36257|      0|            double y2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36258|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36272|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36259|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36260|      0|            type1 x1 = (type1) y1;\
  |  |  |  |36261|      0|            int32_t x2 = (int32_t) y2;\
  |  |  |  |36262|      0|            stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|      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)
  |  |  |  |  ------------------
  |  |  |  |36263|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36167|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36136|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36264|      0|        } else {\
  |  |  |  |36265|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36266|      0|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36267|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |36268|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36269|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36168|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36164|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36165|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36165:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (36165:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36167|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36136|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36270|      0|        }\
  |  |  |  |36271|      0|    }
  |  |  ------------------
  ------------------
36886|       |
36887|      0|    VM_OP(JOP_SHIFT_LEFT_IMMEDIATE)
  ------------------
  |  |36134|      0|#define VM_OP(op) label_##op :
  ------------------
36888|      0|    vm_bitop_immediate( <<);
  ------------------
  |  |36231|      0|#define vm_bitop_immediate(op) _vm_bitop_immediate(op, int32_t, janet_checkintrange, "32-bit signed integers");
  |  |  ------------------
  |  |  |  |36214|      0|    {\
  |  |  |  |36215|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |36114|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36216|      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 (36216:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |36217|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36218|      0|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  |  |  ------------------
  |  |  |  |  |  |  835|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |36219|      0|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |  |  |36220|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |36221|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36222|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36168|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36164|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36165|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36165:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (36165:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36167|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36136|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36223|      0|        } else {\
  |  |  |  |36224|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  839|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36225|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36231|      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); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36226|      0|            type1 x1 = (type1) y1;\
  |  |  |  |36227|      0|            stack[A] = janet_wrap_number((type1) (x1 op CS));\
  |  |  |  |  ------------------
  |  |  |  |  |  |36113|      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)
  |  |  |  |  ------------------
  |  |  |  |36228|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36167|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36136|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36229|      0|        }\
  |  |  |  |36230|      0|    }
  |  |  ------------------
  ------------------
36889|       |
36890|   492M|    VM_OP(JOP_MOVE_NEAR)
  ------------------
  |  |36134|   492M|#define VM_OP(op) label_##op :
  ------------------
36891|   492M|    stack[A] = stack[E];
  ------------------
  |  |36113|   492M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  stack[A] = stack[E];
  ------------------
  |  |36117|   492M|#define E (*pc >> 16)
  ------------------
36892|   492M|    vm_pcnext();
  ------------------
  |  |36167|   492M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|   492M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36893|       |
36894|   492M|    VM_OP(JOP_MOVE_FAR)
  ------------------
  |  |36134|   102k|#define VM_OP(op) label_##op :
  ------------------
36895|   102k|    stack[E] = stack[A];
  ------------------
  |  |36117|   102k|#define E (*pc >> 16)
  ------------------
                  stack[E] = stack[A];
  ------------------
  |  |36113|   102k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36896|   102k|    vm_pcnext();
  ------------------
  |  |36167|   102k|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|   102k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36897|       |
36898|   101M|    VM_OP(JOP_JUMP)
  ------------------
  |  |36134|   101M|#define VM_OP(op) label_##op :
  ------------------
36899|   101M|    vm_maybe_auto_suspend(DS <= 0);
  ------------------
  |  |36188|   101M|#define vm_maybe_auto_suspend(COND) do { \
  |  |36189|   101M|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (36189:9): [True: 45.8M, False: 56.0M]
  |  |  |  Branch (36189:19): [True: 0, False: 45.8M]
  |  |  ------------------
  |  |36190|      0|        fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  790|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  |  |  ------------------
  |  |                       fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  791|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  |  |  ------------------
  |  |36191|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |36153|      0|#define vm_return(sig, val) do { \
  |  |  |  |36154|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |36155|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36156|      0|    return (sig); \
  |  |  |  |36157|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36157:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36192|      0|    } \
  |  |36193|   101M|} while (0)
  |  |  ------------------
  |  |  |  Branch (36193:10): [Folded, False: 101M]
  |  |  ------------------
  ------------------
36900|   101M|    pc += DS;
  ------------------
  |  |36121|   101M|#define DS (*((int32_t *)pc) >> 8)
  ------------------
36901|   101M|    vm_next();
  ------------------
  |  |36136|   101M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  ------------------
36902|       |
36903|   101M|    VM_OP(JOP_JUMP_IF)
  ------------------
  |  |36134|   125k|#define VM_OP(op) label_##op :
  ------------------
36904|   125k|    if (janet_truthy(stack[A])) {
  ------------------
  |  |  818|   125k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|   251k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 125k]
  |  |  |  |  ------------------
  |  |  |  |  807|   251k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|   251k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|   125k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|   125k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   125k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   125k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 125k, False: 0]
  |  |  ------------------
  |  |  819|   125k|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|   251k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 125k]
  |  |  |  |  ------------------
  |  |  |  |  807|   251k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|   251k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|   125k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|   125k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   125k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   125k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 0, False: 125k]
  |  |  |  Branch (819:47): [True: 102k, False: 23.4k]
  |  |  ------------------
  ------------------
36905|   102k|        vm_maybe_auto_suspend(ES <= 0);
  ------------------
  |  |36188|   102k|#define vm_maybe_auto_suspend(COND) do { \
  |  |36189|   102k|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (36189:9): [True: 0, False: 102k]
  |  |  |  Branch (36189:19): [True: 0, False: 0]
  |  |  ------------------
  |  |36190|      0|        fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  790|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  |  |  ------------------
  |  |                       fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  791|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  |  |  ------------------
  |  |36191|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |36153|      0|#define vm_return(sig, val) do { \
  |  |  |  |36154|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |36155|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36156|      0|    return (sig); \
  |  |  |  |36157|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36157:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36192|      0|    } \
  |  |36193|   102k|} while (0)
  |  |  ------------------
  |  |  |  Branch (36193:10): [Folded, False: 102k]
  |  |  ------------------
  ------------------
36906|   102k|        pc += ES;
  ------------------
  |  |36122|   102k|#define ES (*((int32_t *)pc) >> 16)
  ------------------
36907|   102k|    } else {
36908|  23.4k|        pc++;
36909|  23.4k|    }
36910|   125k|    vm_next();
  ------------------
  |  |36136|   125k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  ------------------
36911|       |
36912|   339M|    VM_OP(JOP_JUMP_IF_NOT)
  ------------------
  |  |36134|   339M|#define VM_OP(op) label_##op :
  ------------------
36913|   339M|    if (janet_truthy(stack[A])) {
  ------------------
  |  |  818|   339M|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  806|   679M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 339M]
  |  |  |  |  ------------------
  |  |  |  |  807|   679M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|   679M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|   339M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|   339M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   339M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   339M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (818:6): [True: 327M, False: 12.0M]
  |  |  ------------------
  |  |  819|   339M|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  806|   655M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 327M]
  |  |  |  |  ------------------
  |  |  |  |  807|   655M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|   655M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|   327M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|   327M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   327M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   327M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (819:7): [True: 20.4M, False: 307M]
  |  |  |  Branch (819:47): [True: 110M, False: 196M]
  |  |  ------------------
  ------------------
36914|   130M|        pc++;
36915|   208M|    } else {
36916|   208M|        vm_maybe_auto_suspend(ES <= 0);
  ------------------
  |  |36188|   208M|#define vm_maybe_auto_suspend(COND) do { \
  |  |36189|   208M|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (36189:9): [True: 264, False: 208M]
  |  |  |  Branch (36189:19): [True: 0, False: 264]
  |  |  ------------------
  |  |36190|      0|        fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  790|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  |  |  ------------------
  |  |                       fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  791|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  |  |  ------------------
  |  |36191|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |36153|      0|#define vm_return(sig, val) do { \
  |  |  |  |36154|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |36155|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36156|      0|    return (sig); \
  |  |  |  |36157|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36157:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36192|      0|    } \
  |  |36193|   208M|} while (0)
  |  |  ------------------
  |  |  |  Branch (36193:10): [Folded, False: 208M]
  |  |  ------------------
  ------------------
36917|   208M|        pc += ES;
  ------------------
  |  |36122|   208M|#define ES (*((int32_t *)pc) >> 16)
  ------------------
36918|   208M|    }
36919|   339M|    vm_next();
  ------------------
  |  |36136|   339M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  ------------------
36920|       |
36921|   339M|    VM_OP(JOP_JUMP_IF_NIL)
  ------------------
  |  |36134|  30.6M|#define VM_OP(op) label_##op :
  ------------------
36922|  30.6M|    if (janet_checktype(stack[A], JANET_NIL)) {
  ------------------
  |  |  806|  30.6M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 11.3M, False: 19.2M]
  |  |  |  Branch (806:6): [Folded, False: 30.6M]
  |  |  ------------------
  |  |  807|  30.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|  30.6M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  30.6M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  30.6M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  30.6M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  30.6M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36923|  11.3M|        vm_maybe_auto_suspend(ES <= 0);
  ------------------
  |  |36188|  11.3M|#define vm_maybe_auto_suspend(COND) do { \
  |  |36189|  11.3M|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (36189:9): [True: 0, False: 11.3M]
  |  |  |  Branch (36189:19): [True: 0, False: 0]
  |  |  ------------------
  |  |36190|      0|        fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  790|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  |  |  ------------------
  |  |                       fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  791|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  |  |  ------------------
  |  |36191|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |36153|      0|#define vm_return(sig, val) do { \
  |  |  |  |36154|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |36155|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36156|      0|    return (sig); \
  |  |  |  |36157|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36157:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36192|      0|    } \
  |  |36193|  11.3M|} while (0)
  |  |  ------------------
  |  |  |  Branch (36193:10): [Folded, False: 11.3M]
  |  |  ------------------
  ------------------
36924|  11.3M|        pc += ES;
  ------------------
  |  |36122|  11.3M|#define ES (*((int32_t *)pc) >> 16)
  ------------------
36925|  19.2M|    } else {
36926|  19.2M|        pc++;
36927|  19.2M|    }
36928|  30.6M|    vm_next();
  ------------------
  |  |36136|  30.6M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  ------------------
36929|       |
36930|  30.6M|    VM_OP(JOP_JUMP_IF_NOT_NIL)
  ------------------
  |  |36134|  1.37M|#define VM_OP(op) label_##op :
  ------------------
36931|  1.37M|    if (janet_checktype(stack[A], JANET_NIL)) {
  ------------------
  |  |  806|  1.37M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 834k, False: 544k]
  |  |  |  Branch (806:6): [Folded, False: 1.37M]
  |  |  ------------------
  |  |  807|  1.37M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.37M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.37M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.37M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36932|   834k|        pc++;
36933|   834k|    } else {
36934|   544k|        vm_maybe_auto_suspend(ES <= 0);
  ------------------
  |  |36188|   544k|#define vm_maybe_auto_suspend(COND) do { \
  |  |36189|   544k|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (36189:9): [True: 0, False: 544k]
  |  |  |  Branch (36189:19): [True: 0, False: 0]
  |  |  ------------------
  |  |36190|      0|        fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  790|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  |  |  ------------------
  |  |                       fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  791|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  |  |  ------------------
  |  |36191|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |36153|      0|#define vm_return(sig, val) do { \
  |  |  |  |36154|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |36155|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36156|      0|    return (sig); \
  |  |  |  |36157|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36157:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36192|      0|    } \
  |  |36193|   544k|} while (0)
  |  |  ------------------
  |  |  |  Branch (36193:10): [Folded, False: 544k]
  |  |  ------------------
  ------------------
36935|   544k|        pc += ES;
  ------------------
  |  |36122|   544k|#define ES (*((int32_t *)pc) >> 16)
  ------------------
36936|   544k|    }
36937|  1.37M|    vm_next();
  ------------------
  |  |36136|  1.37M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  ------------------
36938|       |
36939|  36.4M|    VM_OP(JOP_LESS_THAN)
  ------------------
  |  |36134|  36.4M|#define VM_OP(op) label_##op :
  ------------------
36940|  36.4M|    vm_compop( <);
  ------------------
  |  |36275|  36.4M|    {\
  |  |36276|  36.4M|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |36114|  36.4M|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36277|  36.4M|        Janet op2 = stack[C];\
  |  |  ------------------
  |  |  |  |36115|  36.4M|#define C (*pc >> 24)
  |  |  ------------------
  |  |36278|  36.4M|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|  72.9M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:5): [True: 36.2M, False: 207k]
  |  |  |  |  |  Branch (806:6): [True: 36.4M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|  72.9M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|  36.4M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 36.2M, False: 207k]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 207k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|  72.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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                       if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|  36.2M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:5): [True: 36.2M, False: 146]
  |  |  |  |  |  Branch (806:6): [True: 36.2M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|  36.2M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|  36.2M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 36.2M, False: 146]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 146]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|  36.2M|        : 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36279|  36.2M|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  839|  36.2M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36280|  36.2M|            double x2 = janet_unwrap_number(op2);\
  |  |  ------------------
  |  |  |  |  839|  36.2M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36281|  36.2M|            stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |36113|  36.2M|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |  834|  36.2M|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  822|  36.2M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  36.2M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  36.2M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36282|  36.2M|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36167|  36.2M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|  36.2M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36283|  36.2M|        } else {\
  |  |36284|   207k|            vm_commit();\
  |  |  ------------------
  |  |  |  |36147|   207k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  809|   207k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|   207k|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36147:70): [Folded, False: 207k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36285|   207k|            Janet a = janet_wrap_boolean(janet_compare(op1, op2) op 0);\
  |  |  ------------------
  |  |  |  |  834|   207k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  822|   207k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   207k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   207k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36286|   207k|            stack = fiber->data + fiber->frame;\
  |  |36287|   207k|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |36113|   207k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36288|   207k|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36168|   207k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36164|   207k|#define maybe_collect() do {\
  |  |  |  |  |  |36165|   207k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36165:9): [True: 0, False: 207k]
  |  |  |  |  |  |  |  Branch (36165:85): [Folded, False: 207k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36167|   207k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36136|   207k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36289|   207k|        }\
  |  |36290|  36.4M|    }
  ------------------
36941|       |
36942|  36.4M|    VM_OP(JOP_LESS_THAN_EQUAL)
  ------------------
  |  |36134|   107k|#define VM_OP(op) label_##op :
  ------------------
36943|   107k|    vm_compop( <=);
  ------------------
  |  |36275|   107k|    {\
  |  |36276|   107k|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |36114|   107k|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36277|   107k|        Janet op2 = stack[C];\
  |  |  ------------------
  |  |  |  |36115|   107k|#define C (*pc >> 24)
  |  |  ------------------
  |  |36278|   107k|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|   214k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:5): [True: 62.3k, False: 44.9k]
  |  |  |  |  |  Branch (806:6): [True: 107k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|   214k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|   107k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 62.3k, False: 44.9k]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 44.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|   214k|        : 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|  62.3k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:5): [True: 62.3k, False: 11]
  |  |  |  |  |  Branch (806:6): [True: 62.3k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|  62.3k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|  62.3k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 62.3k, False: 11]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 11]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|  62.3k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36279|  62.3k|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  839|  62.3k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36280|  62.3k|            double x2 = janet_unwrap_number(op2);\
  |  |  ------------------
  |  |  |  |  839|  62.3k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36281|  62.3k|            stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |36113|  62.3k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |  834|  62.3k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  822|  62.3k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  62.3k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  62.3k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36282|  62.3k|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36167|  62.3k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|  62.3k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36283|  62.3k|        } else {\
  |  |36284|  44.9k|            vm_commit();\
  |  |  ------------------
  |  |  |  |36147|  44.9k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  809|  44.9k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|  44.9k|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36147:70): [Folded, False: 44.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36285|  44.9k|            Janet a = janet_wrap_boolean(janet_compare(op1, op2) op 0);\
  |  |  ------------------
  |  |  |  |  834|  44.9k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  822|  44.9k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  44.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  44.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36286|  44.9k|            stack = fiber->data + fiber->frame;\
  |  |36287|  44.9k|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |36113|  44.9k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36288|  44.9k|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36168|  44.9k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36164|  44.9k|#define maybe_collect() do {\
  |  |  |  |  |  |36165|  44.9k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36165:9): [True: 0, False: 44.9k]
  |  |  |  |  |  |  |  Branch (36165:85): [Folded, False: 44.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36167|  44.9k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36136|  44.9k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36289|  44.9k|        }\
  |  |36290|   107k|    }
  ------------------
36944|       |
36945|   107k|    VM_OP(JOP_LESS_THAN_IMMEDIATE)
  ------------------
  |  |36134|    167|#define VM_OP(op) label_##op :
  ------------------
36946|    167|    vm_compop_imm( <);
  ------------------
  |  |36292|    167|    {\
  |  |36293|    167|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |36114|    167|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36294|    167|        if (janet_checktype(op1, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|    167|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:5): [True: 51, False: 116]
  |  |  |  |  |  Branch (806:6): [True: 167, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|    167|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|    167|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 51, False: 116]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 116]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|    167|        : 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36295|     51|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  839|     51|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36296|     51|            double x2 = (double) CS; \
  |  |  ------------------
  |  |  |  |36120|     51|#define CS (*((int32_t *)pc) >> 24)
  |  |  ------------------
  |  |36297|     51|            stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |36113|     51|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |  834|     51|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36298|     51|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36167|     51|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|     51|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36299|    116|        } else {\
  |  |36300|    116|            vm_commit();\
  |  |  ------------------
  |  |  |  |36147|    116|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  809|    116|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|    116|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36147:70): [Folded, False: 116]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36301|    116|            Janet a = janet_wrap_boolean(janet_compare(op1, janet_wrap_integer(CS)) op 0);\
  |  |  ------------------
  |  |  |  |  834|    116|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  822|    116|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    116|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    116|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36302|    116|            stack = fiber->data + fiber->frame;\
  |  |36303|    116|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |36113|    116|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36304|    116|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36168|    116|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36164|    116|#define maybe_collect() do {\
  |  |  |  |  |  |36165|    116|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36165:9): [True: 0, False: 116]
  |  |  |  |  |  |  |  Branch (36165:85): [Folded, False: 116]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36167|    116|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36136|    116|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36305|    116|        }\
  |  |36306|    167|    }
  ------------------
36947|       |
36948|   662k|    VM_OP(JOP_GREATER_THAN)
  ------------------
  |  |36134|   662k|#define VM_OP(op) label_##op :
  ------------------
36949|   662k|    vm_compop( >);
  ------------------
  |  |36275|   662k|    {\
  |  |36276|   662k|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |36114|   662k|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36277|   662k|        Janet op2 = stack[C];\
  |  |  ------------------
  |  |  |  |36115|   662k|#define C (*pc >> 24)
  |  |  ------------------
  |  |36278|   662k|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|  1.32M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:5): [True: 661k, False: 721]
  |  |  |  |  |  Branch (806:6): [True: 662k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|  1.32M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|   662k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 661k, False: 721]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 721]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|  1.32M|        : 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|   661k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:5): [True: 661k, False: 35]
  |  |  |  |  |  Branch (806:6): [True: 661k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|   661k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|   661k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 661k, False: 35]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 35]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|   661k|        : 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36279|   661k|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  839|   661k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36280|   661k|            double x2 = janet_unwrap_number(op2);\
  |  |  ------------------
  |  |  |  |  839|   661k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36281|   661k|            stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |36113|   661k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |  834|   661k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  822|   661k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   661k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   661k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36282|   661k|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36167|   661k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|   661k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36283|   661k|        } else {\
  |  |36284|    756|            vm_commit();\
  |  |  ------------------
  |  |  |  |36147|    756|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  809|    756|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|    756|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36147:70): [Folded, False: 756]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36285|    756|            Janet a = janet_wrap_boolean(janet_compare(op1, op2) op 0);\
  |  |  ------------------
  |  |  |  |  834|    756|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  822|    756|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|    756|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|    756|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36286|    756|            stack = fiber->data + fiber->frame;\
  |  |36287|    756|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |36113|    756|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36288|    756|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36168|    756|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36164|    756|#define maybe_collect() do {\
  |  |  |  |  |  |36165|    756|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36165:9): [True: 0, False: 756]
  |  |  |  |  |  |  |  Branch (36165:85): [Folded, False: 756]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36167|    756|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36136|    756|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36289|    756|        }\
  |  |36290|   662k|    }
  ------------------
36950|       |
36951|   662k|    VM_OP(JOP_GREATER_THAN_EQUAL)
  ------------------
  |  |36134|  55.9k|#define VM_OP(op) label_##op :
  ------------------
36952|  55.9k|    vm_compop( >=);
  ------------------
  |  |36275|  55.9k|    {\
  |  |36276|  55.9k|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |36114|  55.9k|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36277|  55.9k|        Janet op2 = stack[C];\
  |  |  ------------------
  |  |  |  |36115|  55.9k|#define C (*pc >> 24)
  |  |  ------------------
  |  |36278|  55.9k|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|   111k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:5): [True: 52.6k, False: 3.31k]
  |  |  |  |  |  Branch (806:6): [True: 55.9k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|   111k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|  55.9k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 52.6k, False: 3.31k]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 3.31k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                       if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|  52.6k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:5): [True: 52.6k, False: 12]
  |  |  |  |  |  Branch (806:6): [True: 52.6k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|  52.6k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|  52.6k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 52.6k, False: 12]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|  52.6k|        : 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36279|  52.6k|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  839|  52.6k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36280|  52.6k|            double x2 = janet_unwrap_number(op2);\
  |  |  ------------------
  |  |  |  |  839|  52.6k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36281|  52.6k|            stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |36113|  52.6k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |  834|  52.6k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  822|  52.6k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  52.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  52.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36282|  52.6k|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36167|  52.6k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|  52.6k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36283|  52.6k|        } else {\
  |  |36284|  3.32k|            vm_commit();\
  |  |  ------------------
  |  |  |  |36147|  3.32k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  809|  3.32k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|  3.32k|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36147:70): [Folded, False: 3.32k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36285|  3.32k|            Janet a = janet_wrap_boolean(janet_compare(op1, op2) op 0);\
  |  |  ------------------
  |  |  |  |  834|  3.32k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  822|  3.32k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  3.32k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  3.32k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36286|  3.32k|            stack = fiber->data + fiber->frame;\
  |  |36287|  3.32k|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |36113|  3.32k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36288|  3.32k|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36168|  3.32k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36164|  3.32k|#define maybe_collect() do {\
  |  |  |  |  |  |36165|  3.32k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36165:9): [True: 0, False: 3.32k]
  |  |  |  |  |  |  |  Branch (36165:85): [Folded, False: 3.32k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36167|  3.32k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36136|  3.32k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36289|  3.32k|        }\
  |  |36290|  55.9k|    }
  ------------------
36953|       |
36954|   145k|    VM_OP(JOP_GREATER_THAN_IMMEDIATE)
  ------------------
  |  |36134|   145k|#define VM_OP(op) label_##op :
  ------------------
36955|   145k|    vm_compop_imm( >);
  ------------------
  |  |36292|   145k|    {\
  |  |36293|   145k|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |36114|   145k|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36294|   145k|        if (janet_checktype(op1, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  806|   145k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:5): [True: 145k, False: 44]
  |  |  |  |  |  Branch (806:6): [True: 145k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  807|   145k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|   145k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 145k, False: 44]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 44]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|   145k|        : 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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36295|   145k|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  839|   145k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36296|   145k|            double x2 = (double) CS; \
  |  |  ------------------
  |  |  |  |36120|   145k|#define CS (*((int32_t *)pc) >> 24)
  |  |  ------------------
  |  |36297|   145k|            stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |36113|   145k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |  834|   145k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  822|   145k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|   145k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|   145k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36298|   145k|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36167|   145k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|   145k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36299|   145k|        } else {\
  |  |36300|     44|            vm_commit();\
  |  |  ------------------
  |  |  |  |36147|     44|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  809|     44|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|     44|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36147:70): [Folded, False: 44]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36301|     44|            Janet a = janet_wrap_boolean(janet_compare(op1, janet_wrap_integer(CS)) op 0);\
  |  |  ------------------
  |  |  |  |  834|     44|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  822|     44|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     44|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     44|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36302|     44|            stack = fiber->data + fiber->frame;\
  |  |36303|     44|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |36113|     44|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36304|     44|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36168|     44|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36164|     44|#define maybe_collect() do {\
  |  |  |  |  |  |36165|     44|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36165:9): [True: 0, False: 44]
  |  |  |  |  |  |  |  Branch (36165:85): [Folded, False: 44]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36167|     44|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36136|     44|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36305|     44|        }\
  |  |36306|   145k|    }
  ------------------
36956|       |
36957|   178M|    VM_OP(JOP_EQUALS)
  ------------------
  |  |36134|   178M|#define VM_OP(op) label_##op :
  ------------------
36958|   178M|    stack[A] = janet_wrap_boolean(janet_equals(stack[B], stack[C]));
  ------------------
  |  |36113|   178M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  stack[A] = janet_wrap_boolean(janet_equals(stack[B], stack[C]));
  ------------------
  |  |  834|   178M|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|   178M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   178M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   178M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36959|   178M|    vm_pcnext();
  ------------------
  |  |36167|   178M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|   178M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36960|       |
36961|   178M|    VM_OP(JOP_EQUALS_IMMEDIATE)
  ------------------
  |  |36134|  11.4M|#define VM_OP(op) label_##op :
  ------------------
36962|  11.4M|    stack[A] = janet_wrap_boolean(janet_checktype(stack[B], JANET_NUMBER) && (janet_unwrap_number(stack[B]) == (double) CS));
  ------------------
  |  |36113|  11.4M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  stack[A] = janet_wrap_boolean(janet_checktype(stack[B], JANET_NUMBER) && (janet_unwrap_number(stack[B]) == (double) CS));
  ------------------
  |  |  834|  11.4M|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|  57.4M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  11.4M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  11.4M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (822:51): [True: 11.4M, False: 418]
  |  |  |  |  |  Branch (822:51): [True: 0, False: 418]
  |  |  |  |  |  Branch (822:51): [True: 11.4M, Folded]
  |  |  |  |  |  Branch (822:51): [True: 11.4M, False: 418]
  |  |  |  |  |  Branch (822:51): [True: 11.2M, False: 289k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36963|  11.4M|    vm_pcnext();
  ------------------
  |  |36167|  11.4M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|  11.4M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36964|       |
36965|  51.7M|    VM_OP(JOP_NOT_EQUALS)
  ------------------
  |  |36134|  51.7M|#define VM_OP(op) label_##op :
  ------------------
36966|  51.7M|    stack[A] = janet_wrap_boolean(!janet_equals(stack[B], stack[C]));
  ------------------
  |  |36113|  51.7M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  stack[A] = janet_wrap_boolean(!janet_equals(stack[B], stack[C]));
  ------------------
  |  |  834|  51.7M|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|  51.7M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  51.7M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  51.7M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36967|  51.7M|    vm_pcnext();
  ------------------
  |  |36167|  51.7M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|  51.7M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36968|       |
36969|  51.7M|    VM_OP(JOP_NOT_EQUALS_IMMEDIATE)
  ------------------
  |  |36134|  65.7k|#define VM_OP(op) label_##op :
  ------------------
36970|  65.7k|    stack[A] = janet_wrap_boolean(!janet_checktype(stack[B], JANET_NUMBER) || (janet_unwrap_number(stack[B]) != (double) CS));
  ------------------
  |  |36113|  65.7k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  stack[A] = janet_wrap_boolean(!janet_checktype(stack[B], JANET_NUMBER) || (janet_unwrap_number(stack[B]) != (double) CS));
  ------------------
  |  |  834|  65.7k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  822|   328k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  65.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  65.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (822:51): [True: 65.7k, False: 0]
  |  |  |  |  |  Branch (822:51): [True: 0, False: 0]
  |  |  |  |  |  Branch (822:51): [True: 65.7k, Folded]
  |  |  |  |  |  Branch (822:51): [True: 0, False: 65.7k]
  |  |  |  |  |  Branch (822:51): [True: 65.5k, False: 217]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36971|  65.7k|    vm_pcnext();
  ------------------
  |  |36167|  65.7k|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|  65.7k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36972|       |
36973|  65.7k|    VM_OP(JOP_COMPARE) {
  ------------------
  |  |36134|    100|#define VM_OP(op) label_##op :
  ------------------
36974|    100|        Janet a = janet_wrap_integer(janet_compare(stack[B], stack[C]));
  ------------------
  |  |  967|    100|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|    100|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
36975|    100|        stack = fiber->data + fiber->frame;
36976|    100|        stack[A] = a;
  ------------------
  |  |36113|    100|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36977|    100|    }
36978|    100|    vm_pcnext();
  ------------------
  |  |36167|    100|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|    100|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36979|       |
36980|  36.1M|    VM_OP(JOP_NEXT)
  ------------------
  |  |36134|  36.1M|#define VM_OP(op) label_##op :
  ------------------
36981|  36.1M|    vm_commit();
  ------------------
  |  |36147|  36.1M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  809|  36.1M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  36.1M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36147:70): [Folded, False: 36.1M]
  |  |  ------------------
  ------------------
36982|  36.1M|    {
36983|  36.1M|        Janet temp = janet_next_impl(stack[B], stack[C], 1);
  ------------------
  |  |36114|  36.1M|#define B ((*pc >> 16) & 0xFF)
  ------------------
                      Janet temp = janet_next_impl(stack[B], stack[C], 1);
  ------------------
  |  |36115|  36.1M|#define C (*pc >> 24)
  ------------------
36984|  36.1M|        vm_restore();
  ------------------
  |  |36148|  36.1M|#define vm_restore() do { \
  |  |36149|  36.1M|    stack = fiber->data + fiber->frame; \
  |  |36150|  36.1M|    pc = janet_stack_frame(stack)->pc; \
  |  |  ------------------
  |  |  |  |  809|  36.1M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  36.1M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36151|  36.1M|    func = janet_stack_frame(stack)->func; \
  |  |  ------------------
  |  |  |  |  809|  36.1M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  36.1M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36152|  36.1M|} while (0)
  |  |  ------------------
  |  |  |  Branch (36152:10): [Folded, False: 36.1M]
  |  |  ------------------
  ------------------
36985|  36.1M|        stack[A] = temp;
  ------------------
  |  |36113|  36.1M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36986|  36.1M|    }
36987|  36.1M|    vm_pcnext();
  ------------------
  |  |36167|  36.1M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|  36.1M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36988|       |
36989|  36.1M|    VM_OP(JOP_LOAD_NIL)
  ------------------
  |  |36134|  22.5M|#define VM_OP(op) label_##op :
  ------------------
36990|  22.5M|    stack[D] = janet_wrap_nil();
  ------------------
  |  |36116|  22.5M|#define D (*pc >> 8)
  ------------------
                  stack[D] = janet_wrap_nil();
  ------------------
  |  |  831|  22.5M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|  22.5M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  22.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  22.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36991|  22.5M|    vm_pcnext();
  ------------------
  |  |36167|  22.5M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|  22.5M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36992|       |
36993|  22.5M|    VM_OP(JOP_LOAD_TRUE)
  ------------------
  |  |36134|   301k|#define VM_OP(op) label_##op :
  ------------------
36994|   301k|    stack[D] = janet_wrap_true();
  ------------------
  |  |36116|   301k|#define D (*pc >> 8)
  ------------------
                  stack[D] = janet_wrap_true();
  ------------------
  |  |  832|   301k|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  822|   301k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   301k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   301k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36995|   301k|    vm_pcnext();
  ------------------
  |  |36167|   301k|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|   301k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36996|       |
36997|  10.6M|    VM_OP(JOP_LOAD_FALSE)
  ------------------
  |  |36134|  10.6M|#define VM_OP(op) label_##op :
  ------------------
36998|  10.6M|    stack[D] = janet_wrap_false();
  ------------------
  |  |36116|  10.6M|#define D (*pc >> 8)
  ------------------
                  stack[D] = janet_wrap_false();
  ------------------
  |  |  833|  10.6M|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  822|  10.6M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  10.6M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  10.6M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36999|  10.6M|    vm_pcnext();
  ------------------
  |  |36167|  10.6M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|  10.6M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37000|       |
37001|  30.6M|    VM_OP(JOP_LOAD_INTEGER)
  ------------------
  |  |36134|  30.6M|#define VM_OP(op) label_##op :
  ------------------
37002|  30.6M|    stack[A] = janet_wrap_integer(ES);
  ------------------
  |  |36113|  30.6M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  stack[A] = janet_wrap_integer(ES);
  ------------------
  |  |  967|  30.6M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  835|  30.6M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
37003|  30.6M|    vm_pcnext();
  ------------------
  |  |36167|  30.6M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|  30.6M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37004|       |
37005|   577M|    VM_OP(JOP_LOAD_CONSTANT) {
  ------------------
  |  |36134|   577M|#define VM_OP(op) label_##op :
  ------------------
37006|   577M|        int32_t cindex = (int32_t)E;
  ------------------
  |  |36117|   577M|#define E (*pc >> 16)
  ------------------
37007|   577M|        vm_assert(cindex < func->def->constants_length, "invalid constant");
  ------------------
  |  |36172|   577M|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |36171|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36171:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36172:36): [True: 0, False: 577M]
  |  |  |  Branch (36172:69): [Folded, False: 577M]
  |  |  ------------------
  ------------------
37008|   577M|        stack[A] = func->def->constants[cindex];
  ------------------
  |  |36113|   577M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37009|   577M|        vm_pcnext();
  ------------------
  |  |36167|   577M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|   577M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37010|   577M|    }
37011|       |
37012|  46.1M|    VM_OP(JOP_LOAD_SELF)
  ------------------
  |  |36134|  46.1M|#define VM_OP(op) label_##op :
  ------------------
37013|  46.1M|    stack[D] = janet_wrap_function(func);
  ------------------
  |  |36116|  46.1M|#define D (*pc >> 8)
  ------------------
                  stack[D] = janet_wrap_function(func);
  ------------------
  |  |  852|  46.1M|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  825|  46.1M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  46.1M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  46.1M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37014|  46.1M|    vm_pcnext();
  ------------------
  |  |36167|  46.1M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|  46.1M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37015|       |
37016|  46.1M|    VM_OP(JOP_LOAD_UPVALUE) {
  ------------------
  |  |36134|  39.6M|#define VM_OP(op) label_##op :
  ------------------
37017|  39.6M|        int32_t eindex = B;
  ------------------
  |  |36114|  39.6M|#define B ((*pc >> 16) & 0xFF)
  ------------------
37018|  39.6M|        int32_t vindex = C;
  ------------------
  |  |36115|  39.6M|#define C (*pc >> 24)
  ------------------
37019|  39.6M|        JanetFuncEnv *env;
37020|  39.6M|        vm_assert(func->def->environments_length > eindex, "invalid upvalue environment");
  ------------------
  |  |36172|  39.6M|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |36171|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36171:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36172:36): [True: 0, False: 39.6M]
  |  |  |  Branch (36172:69): [Folded, False: 39.6M]
  |  |  ------------------
  ------------------
37021|  39.6M|        env = func->envs[eindex];
37022|  39.6M|        vm_assert(env->length > vindex, "invalid upvalue index");
  ------------------
  |  |36172|  39.6M|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |36171|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36171:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36172:36): [True: 0, False: 39.6M]
  |  |  |  Branch (36172:69): [Folded, False: 39.6M]
  |  |  ------------------
  ------------------
37023|  39.6M|        vm_assert(janet_env_valid(env), "invalid upvalue environment");
  ------------------
  |  |36172|  39.6M|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |36171|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36171:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36172:36): [True: 0, False: 39.6M]
  |  |  |  Branch (36172:69): [Folded, False: 39.6M]
  |  |  ------------------
  ------------------
37024|  39.6M|        if (env->offset > 0) {
  ------------------
  |  Branch (37024:13): [True: 39.3M, False: 227k]
  ------------------
37025|       |            /* On stack */
37026|  39.3M|            stack[A] = env->as.fiber->data[env->offset + vindex];
  ------------------
  |  |36113|  39.3M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37027|  39.3M|        } else {
37028|       |            /* Off stack */
37029|   227k|            stack[A] = env->as.values[vindex];
  ------------------
  |  |36113|   227k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37030|   227k|        }
37031|  39.6M|        vm_pcnext();
  ------------------
  |  |36167|  39.6M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|  39.6M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37032|  39.6M|    }
37033|       |
37034|   176k|    VM_OP(JOP_SET_UPVALUE) {
  ------------------
  |  |36134|   176k|#define VM_OP(op) label_##op :
  ------------------
37035|   176k|        int32_t eindex = B;
  ------------------
  |  |36114|   176k|#define B ((*pc >> 16) & 0xFF)
  ------------------
37036|   176k|        int32_t vindex = C;
  ------------------
  |  |36115|   176k|#define C (*pc >> 24)
  ------------------
37037|   176k|        JanetFuncEnv *env;
37038|   176k|        vm_assert(func->def->environments_length > eindex, "invalid upvalue environment");
  ------------------
  |  |36172|   176k|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |36171|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36171:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36172:36): [True: 0, False: 176k]
  |  |  |  Branch (36172:69): [Folded, False: 176k]
  |  |  ------------------
  ------------------
37039|   176k|        env = func->envs[eindex];
37040|   176k|        vm_assert(env->length > vindex, "invalid upvalue index");
  ------------------
  |  |36172|   176k|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |36171|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36171:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36172:36): [True: 0, False: 176k]
  |  |  |  Branch (36172:69): [Folded, False: 176k]
  |  |  ------------------
  ------------------
37041|   176k|        vm_assert(janet_env_valid(env), "invalid upvalue environment");
  ------------------
  |  |36172|   176k|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |36171|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36171:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36172:36): [True: 0, False: 176k]
  |  |  |  Branch (36172:69): [Folded, False: 176k]
  |  |  ------------------
  ------------------
37042|   176k|        if (env->offset > 0) {
  ------------------
  |  Branch (37042:13): [True: 176k, False: 0]
  ------------------
37043|   176k|            env->as.fiber->data[env->offset + vindex] = stack[A];
  ------------------
  |  |36113|   176k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37044|   176k|        } else {
37045|      0|            env->as.values[vindex] = stack[A];
  ------------------
  |  |36113|      0|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37046|      0|        }
37047|   176k|        vm_pcnext();
  ------------------
  |  |36167|   176k|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|   176k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37048|   176k|    }
37049|       |
37050|  80.4M|    VM_OP(JOP_CLOSURE) {
  ------------------
  |  |36134|  80.4M|#define VM_OP(op) label_##op :
  ------------------
37051|  80.4M|        JanetFuncDef *fd;
37052|  80.4M|        JanetFunction *fn;
37053|  80.4M|        int32_t elen;
37054|  80.4M|        int32_t defindex = (int32_t)E;
  ------------------
  |  |36117|  80.4M|#define E (*pc >> 16)
  ------------------
37055|  80.4M|        vm_assert(defindex < func->def->defs_length, "invalid funcdef");
  ------------------
  |  |36172|  80.4M|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |36171|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36171:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36172:36): [True: 0, False: 80.4M]
  |  |  |  Branch (36172:69): [Folded, False: 80.4M]
  |  |  ------------------
  ------------------
37056|  80.4M|        fd = func->def->defs[defindex];
37057|  80.4M|        elen = fd->environments_length;
37058|  80.4M|        fn = janet_gcalloc(JANET_MEMORY_FUNCTION, sizeof(JanetFunction) + ((size_t) elen * sizeof(JanetFuncEnv *)));
37059|  80.4M|        fn->def = fd;
37060|  80.4M|        {
37061|  80.4M|            int32_t i;
37062|   159M|            for (i = 0; i < elen; ++i) {
  ------------------
  |  Branch (37062:25): [True: 79.2M, False: 80.4M]
  ------------------
37063|  79.2M|                int32_t inherit = fd->environments[i];
37064|  79.2M|                if (inherit == -1 || inherit >= func->def->environments_length) {
  ------------------
  |  Branch (37064:21): [True: 79.0M, False: 191k]
  |  Branch (37064:38): [True: 0, False: 191k]
  ------------------
37065|  79.0M|                    JanetStackFrame *frame = janet_stack_frame(stack);
  ------------------
  |  |  809|  79.0M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1026|  79.0M|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
37066|  79.0M|                    if (!frame->env) {
  ------------------
  |  Branch (37066:25): [True: 10.5M, False: 68.5M]
  ------------------
37067|       |                        /* Lazy capture of current stack frame */
37068|  10.5M|                        JanetFuncEnv *env = janet_gcalloc(JANET_MEMORY_FUNCENV, sizeof(JanetFuncEnv));
37069|  10.5M|                        env->offset = fiber->frame;
37070|  10.5M|                        env->as.fiber = fiber;
37071|  10.5M|                        env->length = func->def->slotcount;
37072|  10.5M|                        frame->env = env;
37073|  10.5M|                    }
37074|  79.0M|                    fn->envs[i] = frame->env;
37075|  79.0M|                } else {
37076|   191k|                    fn->envs[i] = func->envs[inherit];
37077|   191k|                }
37078|  79.2M|            }
37079|  80.4M|        }
37080|  80.4M|        stack[A] = janet_wrap_function(fn);
  ------------------
  |  |36113|  80.4M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                      stack[A] = janet_wrap_function(fn);
  ------------------
  |  |  852|  80.4M|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  825|  80.4M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  80.4M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  80.4M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37081|  80.4M|        vm_checkgc_pcnext();
  ------------------
  |  |36168|  80.4M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36164|  80.4M|#define maybe_collect() do {\
  |  |  |  |36165|  80.4M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 52.0M, False: 28.4M]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 80.4M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36167|  80.4M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|  80.4M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37082|  80.4M|    }
37083|       |
37084|   228M|    VM_OP(JOP_PUSH)
  ------------------
  |  |36134|   228M|#define VM_OP(op) label_##op :
  ------------------
37085|   228M|    janet_fiber_push(fiber, stack[D]);
  ------------------
  |  |36116|   228M|#define D (*pc >> 8)
  ------------------
37086|   228M|    stack = fiber->data + fiber->frame;
37087|   228M|    vm_checkgc_pcnext();
  ------------------
  |  |36168|   228M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36164|   228M|#define maybe_collect() do {\
  |  |  |  |36165|   228M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 145M, False: 83.6M]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 228M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36167|   228M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|   228M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37088|       |
37089|   228M|    VM_OP(JOP_PUSH_2)
  ------------------
  |  |36134|  99.9M|#define VM_OP(op) label_##op :
  ------------------
37090|  99.9M|    janet_fiber_push2(fiber, stack[A], stack[E]);
  ------------------
  |  |36113|  99.9M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  janet_fiber_push2(fiber, stack[A], stack[E]);
  ------------------
  |  |36117|  99.9M|#define E (*pc >> 16)
  ------------------
37091|  99.9M|    stack = fiber->data + fiber->frame;
37092|  99.9M|    vm_checkgc_pcnext();
  ------------------
  |  |36168|  99.9M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36164|  99.9M|#define maybe_collect() do {\
  |  |  |  |36165|  99.9M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 60.7M, False: 39.2M]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 99.9M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36167|  99.9M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|  99.9M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37093|       |
37094|  99.9M|    VM_OP(JOP_PUSH_3)
  ------------------
  |  |36134|  70.4M|#define VM_OP(op) label_##op :
  ------------------
37095|  70.4M|    janet_fiber_push3(fiber, stack[A], stack[B], stack[C]);
  ------------------
  |  |36113|  70.4M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  janet_fiber_push3(fiber, stack[A], stack[B], stack[C]);
  ------------------
  |  |36114|  70.4M|#define B ((*pc >> 16) & 0xFF)
  ------------------
                  janet_fiber_push3(fiber, stack[A], stack[B], stack[C]);
  ------------------
  |  |36115|  70.4M|#define C (*pc >> 24)
  ------------------
37096|  70.4M|    stack = fiber->data + fiber->frame;
37097|  70.4M|    vm_checkgc_pcnext();
  ------------------
  |  |36168|  70.4M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36164|  70.4M|#define maybe_collect() do {\
  |  |  |  |36165|  70.4M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 45.8M, False: 24.6M]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 70.4M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36167|  70.4M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|  70.4M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37098|       |
37099|  70.4M|    VM_OP(JOP_PUSH_ARRAY) {
  ------------------
  |  |36134|  20.2M|#define VM_OP(op) label_##op :
  ------------------
37100|  20.2M|        const Janet *vals;
37101|  20.2M|        int32_t len;
37102|  20.2M|        if (janet_indexed_view(stack[D], &vals, &len)) {
  ------------------
  |  |36116|  20.2M|#define D (*pc >> 8)
  ------------------
  |  Branch (37102:13): [True: 20.2M, False: 37]
  ------------------
37103|  20.2M|            janet_fiber_pushn(fiber, vals, len);
37104|  20.2M|        } else {
37105|     37|            janet_panicf("expected %T, got %v", JANET_TFLAG_INDEXED, stack[D]);
  ------------------
  |  |  613|     37|#define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  ------------------
  |  |  |  |  602|     37|#define JANET_TFLAG_ARRAY (1 << JANET_ARRAY)
  |  |  ------------------
  |  |               #define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  ------------------
  |  |  |  |  603|     37|#define JANET_TFLAG_TUPLE (1 << JANET_TUPLE)
  |  |  ------------------
  ------------------
                          janet_panicf("expected %T, got %v", JANET_TFLAG_INDEXED, stack[D]);
  ------------------
  |  |36116|     37|#define D (*pc >> 8)
  ------------------
37106|     37|        }
37107|  20.2M|    }
37108|  20.2M|    stack = fiber->data + fiber->frame;
37109|  20.2M|    vm_checkgc_pcnext();
  ------------------
  |  |36168|  20.2M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36164|  20.2M|#define maybe_collect() do {\
  |  |  |  |36165|  20.2M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 13.2M, False: 7.00M]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 20.2M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36167|  20.2M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|  20.2M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37110|       |
37111|   281M|    VM_OP(JOP_CALL) {
  ------------------
  |  |36134|   281M|#define VM_OP(op) label_##op :
  ------------------
37112|   281M|        vm_maybe_auto_suspend(1);
  ------------------
  |  |36188|   281M|#define vm_maybe_auto_suspend(COND) do { \
  |  |36189|   281M|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (36189:9): [True: 281M, Folded]
  |  |  |  Branch (36189:19): [True: 0, False: 281M]
  |  |  ------------------
  |  |36190|      0|        fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  790|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  |  |  ------------------
  |  |                       fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  791|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  |  |  ------------------
  |  |36191|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |36153|      0|#define vm_return(sig, val) do { \
  |  |  |  |36154|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |36155|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36156|      0|    return (sig); \
  |  |  |  |36157|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36157:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36192|      0|    } \
  |  |36193|   281M|} while (0)
  |  |  ------------------
  |  |  |  Branch (36193:10): [Folded, False: 281M]
  |  |  ------------------
  ------------------
37113|   281M|        Janet callee = stack[E];
  ------------------
  |  |36117|   281M|#define E (*pc >> 16)
  ------------------
37114|   281M|        if (fiber->stacktop > fiber->maxstack) {
  ------------------
  |  Branch (37114:13): [True: 0, False: 281M]
  ------------------
37115|      0|            vm_throw("stack overflow");
  ------------------
  |  |36171|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  ------------------
  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36171:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
37116|      0|        }
37117|   281M|        if (janet_checktype(callee, JANET_KEYWORD)) {
  ------------------
  |  |  806|   281M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 313k, False: 281M]
  |  |  |  Branch (806:6): [Folded, False: 281M]
  |  |  ------------------
  |  |  807|   281M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   281M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   281M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   281M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   281M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   281M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37118|   313k|            vm_commit();
  ------------------
  |  |36147|   313k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  809|   313k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|   313k|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36147:70): [Folded, False: 313k]
  |  |  ------------------
  ------------------
37119|   313k|            callee = resolve_method(callee, fiber);
37120|   313k|        }
37121|   281M|        if (janet_checktype(callee, JANET_FUNCTION)) {
  ------------------
  |  |  806|   281M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 88.3M, False: 193M]
  |  |  |  Branch (806:6): [Folded, False: 281M]
  |  |  ------------------
  |  |  807|   281M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   281M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   281M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   281M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   281M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   281M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37122|  88.3M|            func = janet_unwrap_function(callee);
  ------------------
  |  |  868|  88.3M|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
37123|  88.3M|            if (func->gc.flags & JANET_FUNCFLAG_TRACE) {
  ------------------
  |  | 1164|  88.3M|#define JANET_FUNCFLAG_TRACE (1 << 16)
  ------------------
  |  Branch (37123:17): [True: 0, False: 88.3M]
  ------------------
37124|      0|                vm_do_trace(func, fiber->stacktop - fiber->stackstart, fiber->data + fiber->stackstart);
  ------------------
  |  |36311|      0|#define vm_do_trace(func, argc, argv) do { \
  |  |36312|      0|    JanetFunction* _func = (func);\
  |  |36313|      0|    if (_func->def->name) {\
  |  |  ------------------
  |  |  |  Branch (36313:9): [True: 0, False: 0]
  |  |  ------------------
  |  |36314|      0|        janet_eprintf("trace (%S", _func->def->name);\
  |  |  ------------------
  |  |  |  | 2194|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36315|      0|    } else {\
  |  |36316|      0|        janet_eprintf("trace (%p", janet_wrap_function(_func));\
  |  |  ------------------
  |  |  |  | 2194|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36317|      0|    }\
  |  |36318|      0|    int32_t _argc = (argc);\
  |  |36319|      0|    for (int32_t i = 0; i < _argc; i++) {\
  |  |  ------------------
  |  |  |  Branch (36319:25): [True: 0, False: 0]
  |  |  ------------------
  |  |36320|      0|        janet_eprintf(" %p", (argv)[i]);\
  |  |  ------------------
  |  |  |  | 2194|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36321|      0|    }\
  |  |36322|      0|    janet_eprintf(")\n");\
  |  |  ------------------
  |  |  |  | 2194|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36323|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (36323:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37125|      0|            }
37126|  88.3M|            vm_commit();
  ------------------
  |  |36147|  88.3M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  809|  88.3M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  88.3M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36147:70): [Folded, False: 88.3M]
  |  |  ------------------
  ------------------
37127|  88.3M|            if (janet_fiber_funcframe(fiber, func)) {
  ------------------
  |  Branch (37127:17): [True: 12, False: 88.3M]
  ------------------
37128|     12|                int32_t n = fiber->stacktop - fiber->stackstart;
37129|     12|                janet_panicf("%v called with %d argument%s, expected %d",
37130|     12|                             callee, n, n == 1 ? "" : "s", func->def->arity);
  ------------------
  |  Branch (37130:41): [True: 6, False: 6]
  ------------------
37131|     12|            }
37132|  88.3M|            stack = fiber->data + fiber->frame;
37133|  88.3M|            pc = func->def->bytecode;
37134|  88.3M|            vm_checkgc_next();
  ------------------
  |  |36166|  88.3M|#define vm_checkgc_next() maybe_collect(); vm_next()
  |  |  ------------------
  |  |  |  |36164|  88.3M|#define maybe_collect() do {\
  |  |  |  |36165|  88.3M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 54.5M, False: 33.7M]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 88.3M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_next() maybe_collect(); vm_next()
  |  |  ------------------
  |  |  |  |36136|  88.3M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37135|   193M|        } else if (janet_checktype(callee, JANET_CFUNCTION)) {
  ------------------
  |  |  806|   193M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 192M, False: 864k]
  |  |  |  Branch (806:6): [Folded, False: 193M]
  |  |  ------------------
  |  |  807|   193M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   193M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   193M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   193M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   193M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   193M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37136|   192M|            vm_commit();
  ------------------
  |  |36147|   192M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  809|   192M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|   192M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36147:70): [Folded, False: 192M]
  |  |  ------------------
  ------------------
37137|   192M|            int32_t argc = fiber->stacktop - fiber->stackstart;
37138|   192M|            janet_fiber_cframe(fiber, janet_unwrap_cfunction(callee));
  ------------------
  |  |  869|   192M|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
37139|   192M|            Janet ret = janet_unwrap_cfunction(callee)(argc, fiber->data + fiber->frame);
  ------------------
  |  |  869|   192M|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
37140|   192M|            janet_fiber_popframe(fiber);
37141|   192M|            stack = fiber->data + fiber->frame;
37142|   192M|            stack[A] = ret;
  ------------------
  |  |36113|   192M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37143|   192M|            vm_checkgc_pcnext();
  ------------------
  |  |36168|   192M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36164|   192M|#define maybe_collect() do {\
  |  |  |  |36165|   192M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 121M, False: 70.9M]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 192M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36167|   192M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|   192M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37144|   192M|        } else {
37145|   864k|            vm_commit();
  ------------------
  |  |36147|   864k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  809|   864k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|   864k|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36147:70): [Folded, False: 864k]
  |  |  ------------------
  ------------------
37146|   864k|            stack[A] = call_nonfn(fiber, callee);
  ------------------
  |  |36113|   864k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37147|   864k|            vm_pcnext();
  ------------------
  |  |36167|   864k|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|   864k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37148|   864k|        }
37149|   281M|    }
37150|       |
37151|   281M|    VM_OP(JOP_TAILCALL) {
  ------------------
  |  |36134|  42.2M|#define VM_OP(op) label_##op :
  ------------------
37152|  42.2M|        vm_maybe_auto_suspend(1);
  ------------------
  |  |36188|  42.2M|#define vm_maybe_auto_suspend(COND) do { \
  |  |36189|  42.2M|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (36189:9): [True: 42.2M, Folded]
  |  |  |  Branch (36189:19): [True: 0, False: 42.2M]
  |  |  ------------------
  |  |36190|      0|        fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  790|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  |  |  ------------------
  |  |                       fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  791|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  |  |  ------------------
  |  |36191|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |36153|      0|#define vm_return(sig, val) do { \
  |  |  |  |36154|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |36155|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36156|      0|    return (sig); \
  |  |  |  |36157|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36157:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36192|      0|    } \
  |  |36193|  42.2M|} while (0)
  |  |  ------------------
  |  |  |  Branch (36193:10): [Folded, False: 42.2M]
  |  |  ------------------
  ------------------
37153|  42.2M|        Janet callee = stack[D];
  ------------------
  |  |36116|  42.2M|#define D (*pc >> 8)
  ------------------
37154|  42.2M|        if (fiber->stacktop > fiber->maxstack) {
  ------------------
  |  Branch (37154:13): [True: 0, False: 42.2M]
  ------------------
37155|      0|            vm_throw("stack overflow");
  ------------------
  |  |36171|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  ------------------
  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36171:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
37156|      0|        }
37157|  42.2M|        if (janet_checktype(callee, JANET_KEYWORD)) {
  ------------------
  |  |  806|  42.2M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 10, False: 42.2M]
  |  |  |  Branch (806:6): [Folded, False: 42.2M]
  |  |  ------------------
  |  |  807|  42.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|  42.2M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  42.2M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  42.2M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  42.2M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  42.2M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37158|     10|            vm_commit();
  ------------------
  |  |36147|     10|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  809|     10|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|     10|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36147:70): [Folded, False: 10]
  |  |  ------------------
  ------------------
37159|     10|            callee = resolve_method(callee, fiber);
37160|     10|        }
37161|  42.2M|        if (janet_checktype(callee, JANET_FUNCTION)) {
  ------------------
  |  |  806|  42.2M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 30.3M, False: 11.9M]
  |  |  |  Branch (806:6): [Folded, False: 42.2M]
  |  |  ------------------
  |  |  807|  42.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|  42.2M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  42.2M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  42.2M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  42.2M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  42.2M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37162|  30.3M|            func = janet_unwrap_function(callee);
  ------------------
  |  |  868|  30.3M|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
37163|  30.3M|            if (func->gc.flags & JANET_FUNCFLAG_TRACE) {
  ------------------
  |  | 1164|  30.3M|#define JANET_FUNCFLAG_TRACE (1 << 16)
  ------------------
  |  Branch (37163:17): [True: 0, False: 30.3M]
  ------------------
37164|      0|                vm_do_trace(func, fiber->stacktop - fiber->stackstart, fiber->data + fiber->stackstart);
  ------------------
  |  |36311|      0|#define vm_do_trace(func, argc, argv) do { \
  |  |36312|      0|    JanetFunction* _func = (func);\
  |  |36313|      0|    if (_func->def->name) {\
  |  |  ------------------
  |  |  |  Branch (36313:9): [True: 0, False: 0]
  |  |  ------------------
  |  |36314|      0|        janet_eprintf("trace (%S", _func->def->name);\
  |  |  ------------------
  |  |  |  | 2194|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36315|      0|    } else {\
  |  |36316|      0|        janet_eprintf("trace (%p", janet_wrap_function(_func));\
  |  |  ------------------
  |  |  |  | 2194|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36317|      0|    }\
  |  |36318|      0|    int32_t _argc = (argc);\
  |  |36319|      0|    for (int32_t i = 0; i < _argc; i++) {\
  |  |  ------------------
  |  |  |  Branch (36319:25): [True: 0, False: 0]
  |  |  ------------------
  |  |36320|      0|        janet_eprintf(" %p", (argv)[i]);\
  |  |  ------------------
  |  |  |  | 2194|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36321|      0|    }\
  |  |36322|      0|    janet_eprintf(")\n");\
  |  |  ------------------
  |  |  |  | 2194|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36323|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (36323:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37165|      0|            }
37166|  30.3M|            if (janet_fiber_funcframe_tail(fiber, func)) {
  ------------------
  |  Branch (37166:17): [True: 8, False: 30.3M]
  ------------------
37167|      8|                janet_stack_frame(fiber->data + fiber->frame)->pc = pc;
  ------------------
  |  |  809|      8|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1026|      8|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
37168|      8|                int32_t n = fiber->stacktop - fiber->stackstart;
37169|      8|                janet_panicf("%v called with %d argument%s, expected %d",
37170|      8|                             callee, n, n == 1 ? "" : "s", func->def->arity);
  ------------------
  |  Branch (37170:41): [True: 0, False: 8]
  ------------------
37171|      8|            }
37172|  30.3M|            stack = fiber->data + fiber->frame;
37173|  30.3M|            pc = func->def->bytecode;
37174|  30.3M|            vm_checkgc_next();
  ------------------
  |  |36166|  30.3M|#define vm_checkgc_next() maybe_collect(); vm_next()
  |  |  ------------------
  |  |  |  |36164|  30.3M|#define maybe_collect() do {\
  |  |  |  |36165|  30.3M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 18.9M, False: 11.3M]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 30.3M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_next() maybe_collect(); vm_next()
  |  |  ------------------
  |  |  |  |36136|  30.3M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37175|  30.3M|        } else {
37176|  11.9M|            Janet retreg;
37177|  11.9M|            int entrance_frame = janet_stack_frame(stack)->flags & JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  |  809|  11.9M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1026|  11.9M|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
                          int entrance_frame = janet_stack_frame(stack)->flags & JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  | 1013|  11.9M|#define JANET_STACKFRAME_ENTRANCE 2
  ------------------
37178|  11.9M|            vm_commit();
  ------------------
  |  |36147|  11.9M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  809|  11.9M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  11.9M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36147:70): [Folded, False: 11.9M]
  |  |  ------------------
  ------------------
37179|  11.9M|            if (janet_checktype(callee, JANET_CFUNCTION)) {
  ------------------
  |  |  806|  11.9M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 11.9M, False: 500]
  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37180|  11.9M|                int32_t argc = fiber->stacktop - fiber->stackstart;
37181|  11.9M|                janet_fiber_cframe(fiber, janet_unwrap_cfunction(callee));
  ------------------
  |  |  869|  11.9M|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
37182|  11.9M|                retreg = janet_unwrap_cfunction(callee)(argc, fiber->data + fiber->frame);
  ------------------
  |  |  869|  11.9M|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
37183|  11.9M|                janet_fiber_popframe(fiber);
37184|  11.9M|            } else {
37185|    500|                retreg = call_nonfn(fiber, callee);
37186|    500|            }
37187|  11.9M|            janet_fiber_popframe(fiber);
37188|  11.9M|            if (entrance_frame) {
  ------------------
  |  Branch (37188:17): [True: 407, False: 11.9M]
  ------------------
37189|    407|                vm_return_no_restore(JANET_SIGNAL_OK, retreg);
  ------------------
  |  |36158|    407|#define vm_return_no_restore(sig, val) do { \
  |  |36159|    407|    janet_vm.return_reg[0] = (val); \
  |  |36160|    407|    return (sig); \
  |  |36161|    407|} while (0)
  |  |  ------------------
  |  |  |  Branch (36161:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37190|    407|            }
37191|  11.9M|            vm_restore();
  ------------------
  |  |36148|  11.9M|#define vm_restore() do { \
  |  |36149|  11.9M|    stack = fiber->data + fiber->frame; \
  |  |36150|  11.9M|    pc = janet_stack_frame(stack)->pc; \
  |  |  ------------------
  |  |  |  |  809|  11.9M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  11.9M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36151|  11.9M|    func = janet_stack_frame(stack)->func; \
  |  |  ------------------
  |  |  |  |  809|  11.9M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  11.9M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36152|  11.9M|} while (0)
  |  |  ------------------
  |  |  |  Branch (36152:10): [Folded, False: 11.9M]
  |  |  ------------------
  ------------------
37192|  11.9M|            stack[A] = retreg;
  ------------------
  |  |36113|  11.9M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37193|  11.9M|            vm_checkgc_pcnext();
  ------------------
  |  |36168|  11.9M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36164|  11.9M|#define maybe_collect() do {\
  |  |  |  |36165|  11.9M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 7.75M, False: 4.17M]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 11.9M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36167|  11.9M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|  11.9M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37194|  11.9M|        }
37195|  42.2M|    }
37196|       |
37197|  42.2M|    VM_OP(JOP_RESUME) {
  ------------------
  |  |36134|     98|#define VM_OP(op) label_##op :
  ------------------
37198|     98|        Janet retreg;
37199|     98|        vm_maybe_auto_suspend(1);
  ------------------
  |  |36188|     98|#define vm_maybe_auto_suspend(COND) do { \
  |  |36189|     98|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (36189:9): [True: 98, Folded]
  |  |  |  Branch (36189:19): [True: 0, False: 98]
  |  |  ------------------
  |  |36190|      0|        fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  790|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  |  |  ------------------
  |  |                       fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  791|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  |  |  ------------------
  |  |36191|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |36153|      0|#define vm_return(sig, val) do { \
  |  |  |  |36154|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |36155|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36156|      0|    return (sig); \
  |  |  |  |36157|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36157:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36192|      0|    } \
  |  |36193|     98|} while (0)
  |  |  ------------------
  |  |  |  Branch (36193:10): [Folded, False: 98]
  |  |  ------------------
  ------------------
37200|     98|        vm_assert_type(stack[B], JANET_FIBER);
  ------------------
  |  |36173|     98|#define vm_assert_type(X, T) do { \
  |  |36174|     98|    if (!(janet_checktype((X), (T)))) { \
  |  |  ------------------
  |  |  |  |  806|     98|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 98]
  |  |  |  |  ------------------
  |  |  |  |  807|     98|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|     98|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|     98|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|     98|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     98|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     98|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36174:9): [True: 0, False: 98]
  |  |  ------------------
  |  |36175|      0|        vm_commit(); \
  |  |  ------------------
  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36176|      0|        janet_panicf("expected %T, got %v", (1 << (T)), (X)); \
  |  |36177|      0|    } \
  |  |36178|     98|} while (0)
  |  |  ------------------
  |  |  |  Branch (36178:10): [Folded, False: 98]
  |  |  ------------------
  ------------------
37201|     98|        JanetFiber *child = janet_unwrap_fiber(stack[B]);
  ------------------
  |  |  859|     98|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
37202|     98|        if (janet_check_can_resume(child, &retreg, 0)) {
  ------------------
  |  Branch (37202:13): [True: 0, False: 98]
  ------------------
37203|      0|            vm_commit();
  ------------------
  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  ------------------
  ------------------
37204|      0|            janet_panicv(retreg);
37205|      0|        }
37206|     98|        fiber->child = child;
37207|     98|        JanetSignal sig = janet_continue_no_check(child, stack[C], &retreg);
  ------------------
  |  |36115|     98|#define C (*pc >> 24)
  ------------------
37208|     98|        stack = fiber->data + fiber->frame;
37209|     98|        if (sig != JANET_SIGNAL_OK && !(child->flags & (1 << sig))) {
  ------------------
  |  Branch (37209:13): [True: 64, False: 34]
  |  Branch (37209:39): [True: 25, False: 39]
  ------------------
37210|     25|            vm_return(sig, retreg);
  ------------------
  |  |36153|     25|#define vm_return(sig, val) do { \
  |  |36154|     25|    janet_vm.return_reg[0] = (val); \
  |  |36155|     25|    vm_commit(); \
  |  |  ------------------
  |  |  |  |36147|     25|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  809|     25|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|     25|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36147:70): [Folded, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36156|     25|    return (sig); \
  |  |36157|     25|} while (0)
  |  |  ------------------
  |  |  |  Branch (36157:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37211|     25|        }
37212|     73|        fiber->child = NULL;
37213|     73|        stack[A] = retreg;
  ------------------
  |  |36113|     73|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37214|     73|        vm_checkgc_pcnext();
  ------------------
  |  |36168|     73|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36164|     73|#define maybe_collect() do {\
  |  |  |  |36165|     73|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 0, False: 73]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 73]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36167|     73|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|     73|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37215|     73|    }
37216|       |
37217|      1|    VM_OP(JOP_SIGNAL) {
  ------------------
  |  |36134|      1|#define VM_OP(op) label_##op :
  ------------------
37218|      1|        int32_t s = C;
  ------------------
  |  |36115|      1|#define C (*pc >> 24)
  ------------------
37219|      1|        if (s > JANET_SIGNAL_USER9) s = JANET_SIGNAL_USER9;
  ------------------
  |  Branch (37219:13): [True: 0, False: 1]
  ------------------
37220|      1|        if (s < 0) s = 0;
  ------------------
  |  Branch (37220:13): [True: 0, False: 1]
  ------------------
37221|      1|        vm_return(s, stack[B]);
  ------------------
  |  |36153|      1|#define vm_return(sig, val) do { \
  |  |36154|      1|    janet_vm.return_reg[0] = (val); \
  |  |36155|      1|    vm_commit(); \
  |  |  ------------------
  |  |  |  |36147|      1|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  809|      1|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|      1|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36147:70): [Folded, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36156|      1|    return (sig); \
  |  |36157|      1|} while (0)
  |  |  ------------------
  |  |  |  Branch (36157:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37222|      1|    }
37223|       |
37224|     13|    VM_OP(JOP_PROPAGATE) {
  ------------------
  |  |36134|     13|#define VM_OP(op) label_##op :
  ------------------
37225|     13|        Janet fv = stack[C];
  ------------------
  |  |36115|     13|#define C (*pc >> 24)
  ------------------
37226|     13|        vm_assert_type(fv, JANET_FIBER);
  ------------------
  |  |36173|     13|#define vm_assert_type(X, T) do { \
  |  |36174|     13|    if (!(janet_checktype((X), (T)))) { \
  |  |  ------------------
  |  |  |  |  806|     13|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (806:6): [Folded, False: 13]
  |  |  |  |  ------------------
  |  |  |  |  807|     13|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  808|     13|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  800|     13|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  790|     13|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|     13|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|     13|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36174:9): [True: 0, False: 13]
  |  |  ------------------
  |  |36175|      0|        vm_commit(); \
  |  |  ------------------
  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36176|      0|        janet_panicf("expected %T, got %v", (1 << (T)), (X)); \
  |  |36177|      0|    } \
  |  |36178|     13|} while (0)
  |  |  ------------------
  |  |  |  Branch (36178:10): [Folded, False: 13]
  |  |  ------------------
  ------------------
37227|     13|        JanetFiber *f = janet_unwrap_fiber(fv);
  ------------------
  |  |  859|     13|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
37228|     13|        JanetFiberStatus sub_status = janet_fiber_status(f);
37229|     13|        if (sub_status > JANET_STATUS_USER9) {
  ------------------
  |  Branch (37229:13): [True: 0, False: 13]
  ------------------
37230|      0|            vm_commit();
  ------------------
  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  ------------------
  ------------------
37231|      0|            janet_panicf("cannot propagate from fiber with status :%s",
37232|      0|                         janet_status_names[sub_status]);
37233|      0|        }
37234|     13|        fiber->child = f;
37235|     13|        vm_return((int) sub_status, stack[B]);
  ------------------
  |  |36153|     13|#define vm_return(sig, val) do { \
  |  |36154|     13|    janet_vm.return_reg[0] = (val); \
  |  |36155|     13|    vm_commit(); \
  |  |  ------------------
  |  |  |  |36147|     13|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  809|     13|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|     13|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36147:70): [Folded, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36156|     13|    return (sig); \
  |  |36157|     13|} while (0)
  |  |  ------------------
  |  |  |  Branch (36157:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37236|     13|    }
37237|       |
37238|      0|    VM_OP(JOP_CANCEL) {
  ------------------
  |  |36134|      0|#define VM_OP(op) label_##op :
  ------------------
37239|      0|        Janet retreg;
37240|      0|        vm_assert_type(stack[B], JANET_FIBER);
  ------------------
  |  |36173|      0|#define vm_assert_type(X, T) do { \
  |  |36174|      0|    if (!(janet_checktype((X), (T)))) { \
  |  |  ------------------
  |  |  |  |  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 (36174:9): [True: 0, False: 0]
  |  |  ------------------
  |  |36175|      0|        vm_commit(); \
  |  |  ------------------
  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36176|      0|        janet_panicf("expected %T, got %v", (1 << (T)), (X)); \
  |  |36177|      0|    } \
  |  |36178|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (36178:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37241|      0|        JanetFiber *child = janet_unwrap_fiber(stack[B]);
  ------------------
  |  |  859|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
37242|      0|        if (janet_check_can_resume(child, &retreg, 1)) {
  ------------------
  |  Branch (37242:13): [True: 0, False: 0]
  ------------------
37243|      0|            vm_commit();
  ------------------
  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  ------------------
  ------------------
37244|      0|            janet_panicv(retreg);
37245|      0|        }
37246|      0|        fiber->child = child;
37247|      0|        JanetSignal sig = janet_continue_signal(child, stack[C], &retreg, JANET_SIGNAL_ERROR);
  ------------------
  |  |36115|      0|#define C (*pc >> 24)
  ------------------
37248|      0|        if (sig != JANET_SIGNAL_OK && !(child->flags & (1 << sig))) {
  ------------------
  |  Branch (37248:13): [True: 0, False: 0]
  |  Branch (37248:39): [True: 0, False: 0]
  ------------------
37249|      0|            vm_return(sig, retreg);
  ------------------
  |  |36153|      0|#define vm_return(sig, val) do { \
  |  |36154|      0|    janet_vm.return_reg[0] = (val); \
  |  |36155|      0|    vm_commit(); \
  |  |  ------------------
  |  |  |  |36147|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36147:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36156|      0|    return (sig); \
  |  |36157|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (36157:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37250|      0|        }
37251|      0|        fiber->child = NULL;
37252|      0|        stack = fiber->data + fiber->frame;
37253|      0|        stack[A] = retreg;
  ------------------
  |  |36113|      0|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37254|      0|        vm_checkgc_pcnext();
  ------------------
  |  |36168|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36164|      0|#define maybe_collect() do {\
  |  |  |  |36165|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 0, False: 0]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36167|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37255|      0|    }
37256|       |
37257|   646k|    VM_OP(JOP_PUT)
  ------------------
  |  |36134|   646k|#define VM_OP(op) label_##op :
  ------------------
37258|   646k|    vm_commit();
  ------------------
  |  |36147|   646k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  809|   646k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|   646k|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36147:70): [Folded, False: 646k]
  |  |  ------------------
  ------------------
37259|   646k|    fiber->flags |= JANET_FIBER_RESUME_NO_USEVAL;
  ------------------
  |  |  790|   646k|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
37260|   646k|    janet_put(stack[A], stack[B], stack[C]);
  ------------------
  |  |36113|   646k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  janet_put(stack[A], stack[B], stack[C]);
  ------------------
  |  |36114|   646k|#define B ((*pc >> 16) & 0xFF)
  ------------------
                  janet_put(stack[A], stack[B], stack[C]);
  ------------------
  |  |36115|   646k|#define C (*pc >> 24)
  ------------------
37261|   646k|    stack = fiber->data + fiber->frame;
37262|   646k|    fiber->flags &= ~JANET_FIBER_RESUME_NO_USEVAL;
  ------------------
  |  |  790|   646k|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
37263|   646k|    vm_checkgc_pcnext();
  ------------------
  |  |36168|   646k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36164|   646k|#define maybe_collect() do {\
  |  |  |  |36165|   646k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 219k, False: 426k]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 646k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36167|   646k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|   646k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37264|       |
37265|   646k|    VM_OP(JOP_PUT_INDEX)
  ------------------
  |  |36134|     17|#define VM_OP(op) label_##op :
  ------------------
37266|     17|    vm_commit();
  ------------------
  |  |36147|     17|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  809|     17|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|     17|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36147:70): [Folded, False: 17]
  |  |  ------------------
  ------------------
37267|     17|    fiber->flags |= JANET_FIBER_RESUME_NO_USEVAL;
  ------------------
  |  |  790|     17|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
37268|     17|    janet_putindex(stack[A], C, stack[B]);
  ------------------
  |  |36113|     17|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  janet_putindex(stack[A], C, stack[B]);
  ------------------
  |  |36115|     17|#define C (*pc >> 24)
  ------------------
                  janet_putindex(stack[A], C, stack[B]);
  ------------------
  |  |36114|     17|#define B ((*pc >> 16) & 0xFF)
  ------------------
37269|     17|    stack = fiber->data + fiber->frame;
37270|     17|    fiber->flags &= ~JANET_FIBER_RESUME_NO_USEVAL;
  ------------------
  |  |  790|     17|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
37271|     17|    vm_checkgc_pcnext();
  ------------------
  |  |36168|     17|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36164|     17|#define maybe_collect() do {\
  |  |  |  |36165|     17|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 0, False: 17]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 17]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36167|     17|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|     17|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37272|       |
37273|  90.8M|    VM_OP(JOP_IN)
  ------------------
  |  |36134|  90.8M|#define VM_OP(op) label_##op :
  ------------------
37274|  90.8M|    vm_commit();
  ------------------
  |  |36147|  90.8M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  809|  90.8M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  90.8M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36147:70): [Folded, False: 90.8M]
  |  |  ------------------
  ------------------
37275|  90.8M|    {
37276|  90.8M|        Janet a = janet_in(stack[B], stack[C]);
  ------------------
  |  |36114|  90.8M|#define B ((*pc >> 16) & 0xFF)
  ------------------
                      Janet a = janet_in(stack[B], stack[C]);
  ------------------
  |  |36115|  90.8M|#define C (*pc >> 24)
  ------------------
37277|  90.8M|        stack = fiber->data + fiber->frame;
37278|  90.8M|        stack[A] = a;
  ------------------
  |  |36113|  90.8M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37279|  90.8M|    }
37280|  90.8M|    vm_pcnext();
  ------------------
  |  |36167|  90.8M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|  90.8M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37281|       |
37282|  90.8M|    VM_OP(JOP_GET)
  ------------------
  |  |36134|  12.9M|#define VM_OP(op) label_##op :
  ------------------
37283|  12.9M|    vm_commit();
  ------------------
  |  |36147|  12.9M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  809|  12.9M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  12.9M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36147:70): [Folded, False: 12.9M]
  |  |  ------------------
  ------------------
37284|  12.9M|    {
37285|  12.9M|        Janet a = janet_get(stack[B], stack[C]);
  ------------------
  |  |36114|  12.9M|#define B ((*pc >> 16) & 0xFF)
  ------------------
                      Janet a = janet_get(stack[B], stack[C]);
  ------------------
  |  |36115|  12.9M|#define C (*pc >> 24)
  ------------------
37286|  12.9M|        stack = fiber->data + fiber->frame;
37287|  12.9M|        stack[A] = a;
  ------------------
  |  |36113|  12.9M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37288|  12.9M|    }
37289|  12.9M|    vm_pcnext();
  ------------------
  |  |36167|  12.9M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|  12.9M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37290|       |
37291|  12.9M|    VM_OP(JOP_GET_INDEX)
  ------------------
  |  |36134|   373k|#define VM_OP(op) label_##op :
  ------------------
37292|   373k|    vm_commit();
  ------------------
  |  |36147|   373k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  809|   373k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|   373k|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36147:70): [Folded, False: 373k]
  |  |  ------------------
  ------------------
37293|   373k|    {
37294|   373k|        Janet a = janet_getindex(stack[B], C);
  ------------------
  |  |36114|   373k|#define B ((*pc >> 16) & 0xFF)
  ------------------
                      Janet a = janet_getindex(stack[B], C);
  ------------------
  |  |36115|   373k|#define C (*pc >> 24)
  ------------------
37295|   373k|        stack = fiber->data + fiber->frame;
37296|   373k|        stack[A] = a;
  ------------------
  |  |36113|   373k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37297|   373k|    }
37298|   373k|    vm_pcnext();
  ------------------
  |  |36167|   373k|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|   373k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37299|       |
37300|  42.3M|    VM_OP(JOP_LENGTH)
  ------------------
  |  |36134|  42.3M|#define VM_OP(op) label_##op :
  ------------------
37301|  42.3M|    vm_commit();
  ------------------
  |  |36147|  42.3M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  809|  42.3M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|  42.3M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36147:70): [Folded, False: 42.3M]
  |  |  ------------------
  ------------------
37302|  42.3M|    {
37303|  42.3M|        Janet a = janet_lengthv(stack[E]);
  ------------------
  |  |36117|  42.3M|#define E (*pc >> 16)
  ------------------
37304|  42.3M|        stack = fiber->data + fiber->frame;
37305|  42.3M|        stack[A] = a;
  ------------------
  |  |36113|  42.3M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37306|  42.3M|    }
37307|  42.3M|    vm_pcnext();
  ------------------
  |  |36167|  42.3M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36136|  42.3M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37308|       |
37309|  42.3M|    VM_OP(JOP_MAKE_ARRAY) {
  ------------------
  |  |36134|  11.9M|#define VM_OP(op) label_##op :
  ------------------
37310|  11.9M|        int32_t count = fiber->stacktop - fiber->stackstart;
37311|  11.9M|        Janet *mem = fiber->data + fiber->stackstart;
37312|  11.9M|        stack[D] = janet_wrap_array(janet_array_n(mem, count));
  ------------------
  |  |36116|  11.9M|#define D (*pc >> 8)
  ------------------
                      stack[D] = janet_wrap_array(janet_array_n(mem, count));
  ------------------
  |  |  845|  11.9M|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  825|  11.9M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37313|  11.9M|        fiber->stacktop = fiber->stackstart;
37314|  11.9M|        vm_checkgc_pcnext();
  ------------------
  |  |36168|  11.9M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36164|  11.9M|#define maybe_collect() do {\
  |  |  |  |36165|  11.9M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 7.55M, False: 4.42M]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 11.9M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36167|  11.9M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|  11.9M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37315|  11.9M|    }
37316|       |
37317|  11.9M|    VM_OP(JOP_MAKE_TUPLE)
  ------------------
  |  |36134|  2.04M|#define VM_OP(op) label_##op :
  ------------------
37318|       |    /* fallthrough */
37319|  2.60M|    VM_OP(JOP_MAKE_BRACKET_TUPLE) {
  ------------------
  |  |36134|  2.60M|#define VM_OP(op) label_##op :
  ------------------
37320|  2.60M|        int32_t count = fiber->stacktop - fiber->stackstart;
37321|  2.60M|        Janet *mem = fiber->data + fiber->stackstart;
37322|  2.60M|        const Janet *tup = janet_tuple_n(mem, count);
37323|  2.60M|        if (opcode == JOP_MAKE_BRACKET_TUPLE)
  ------------------
  |  |36137|  2.60M|#define opcode (*pc & 0xFF)
  ------------------
  |  Branch (37323:13): [True: 554k, False: 2.04M]
  ------------------
37324|   554k|            janet_tuple_flag(tup) |= JANET_TUPLE_FLAG_BRACKETCTOR;
  ------------------
  |  | 1805|   554k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1799|   554k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                          janet_tuple_flag(tup) |= JANET_TUPLE_FLAG_BRACKETCTOR;
  ------------------
  |  | 1797|   554k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
37325|  2.60M|        stack[D] = janet_wrap_tuple(tup);
  ------------------
  |  |36116|  2.60M|#define D (*pc >> 8)
  ------------------
                      stack[D] = janet_wrap_tuple(tup);
  ------------------
  |  |  843|  2.60M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|  2.60M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  2.60M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  2.60M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37326|  2.60M|        fiber->stacktop = fiber->stackstart;
37327|  2.60M|        vm_checkgc_pcnext();
  ------------------
  |  |36168|  2.60M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36164|  2.60M|#define maybe_collect() do {\
  |  |  |  |36165|  2.60M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 494k, False: 2.11M]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 2.60M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36167|  2.60M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|  2.60M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37328|  2.60M|    }
37329|       |
37330|  2.60M|    VM_OP(JOP_MAKE_TABLE) {
  ------------------
  |  |36134|   234k|#define VM_OP(op) label_##op :
  ------------------
37331|   234k|        int32_t count = fiber->stacktop - fiber->stackstart;
37332|   234k|        Janet *mem = fiber->data + fiber->stackstart;
37333|   234k|        if (count & 1) {
  ------------------
  |  Branch (37333:13): [True: 1, False: 234k]
  ------------------
37334|      1|            vm_commit();
  ------------------
  |  |36147|      1|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  809|      1|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|      1|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36147:70): [Folded, False: 1]
  |  |  ------------------
  ------------------
37335|      1|            janet_panicf("expected even number of arguments to table constructor, got %d", count);
37336|      1|        }
37337|   234k|        JanetTable *table = janet_table(count / 2);
37338|   244k|        for (int32_t i = 0; i < count; i += 2)
  ------------------
  |  Branch (37338:29): [True: 10.2k, False: 234k]
  ------------------
37339|  10.2k|            janet_table_put(table, mem[i], mem[i + 1]);
37340|   234k|        stack[D] = janet_wrap_table(table);
  ------------------
  |  |36116|   234k|#define D (*pc >> 8)
  ------------------
                      stack[D] = janet_wrap_table(table);
  ------------------
  |  |  846|   234k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  825|   234k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   234k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   234k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37341|   234k|        fiber->stacktop = fiber->stackstart;
37342|   234k|        vm_checkgc_pcnext();
  ------------------
  |  |36168|   234k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36164|   234k|#define maybe_collect() do {\
  |  |  |  |36165|   234k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 40.5k, False: 193k]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 234k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36167|   234k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|   234k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37343|   234k|    }
37344|       |
37345|  9.79M|    VM_OP(JOP_MAKE_STRUCT) {
  ------------------
  |  |36134|  9.79M|#define VM_OP(op) label_##op :
  ------------------
37346|  9.79M|        int32_t count = fiber->stacktop - fiber->stackstart;
37347|  9.79M|        Janet *mem = fiber->data + fiber->stackstart;
37348|  9.79M|        if (count & 1) {
  ------------------
  |  Branch (37348:13): [True: 1, False: 9.79M]
  ------------------
37349|      1|            vm_commit();
  ------------------
  |  |36147|      1|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  809|      1|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|      1|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36147:70): [Folded, False: 1]
  |  |  ------------------
  ------------------
37350|      1|            janet_panicf("expected even number of arguments to struct constructor, got %d", count);
37351|      1|        }
37352|  9.79M|        JanetKV *st = janet_struct_begin(count / 2);
37353|   116M|        for (int32_t i = 0; i < count; i += 2)
  ------------------
  |  Branch (37353:29): [True: 107M, False: 9.79M]
  ------------------
37354|   107M|            janet_struct_put(st, mem[i], mem[i + 1]);
37355|  9.79M|        stack[D] = janet_wrap_struct(janet_struct_end(st));
  ------------------
  |  |36116|  9.79M|#define D (*pc >> 8)
  ------------------
                      stack[D] = janet_wrap_struct(janet_struct_end(st));
  ------------------
  |  |  842|  9.79M|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  828|  9.79M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  9.79M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  9.79M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37356|  9.79M|        fiber->stacktop = fiber->stackstart;
37357|  9.79M|        vm_checkgc_pcnext();
  ------------------
  |  |36168|  9.79M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36164|  9.79M|#define maybe_collect() do {\
  |  |  |  |36165|  9.79M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 6.44M, False: 3.34M]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 9.79M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36167|  9.79M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|  9.79M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37358|  9.79M|    }
37359|       |
37360|      0|    VM_OP(JOP_MAKE_STRING) {
  ------------------
  |  |36134|      0|#define VM_OP(op) label_##op :
  ------------------
37361|      0|        int32_t count = fiber->stacktop - fiber->stackstart;
37362|      0|        Janet *mem = fiber->data + fiber->stackstart;
37363|      0|        JanetBuffer buffer;
37364|      0|        janet_buffer_init(&buffer, 10 * count);
37365|      0|        for (int32_t i = 0; i < count; i++)
  ------------------
  |  Branch (37365:29): [True: 0, False: 0]
  ------------------
37366|      0|            janet_to_string_b(&buffer, mem[i]);
37367|      0|        stack[D] = janet_stringv(buffer.data, buffer.count);
  ------------------
  |  |36116|      0|#define D (*pc >> 8)
  ------------------
                      stack[D] = janet_stringv(buffer.data, buffer.count);
  ------------------
  |  | 1826|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37368|      0|        janet_buffer_deinit(&buffer);
37369|      0|        fiber->stacktop = fiber->stackstart;
37370|      0|        vm_checkgc_pcnext();
  ------------------
  |  |36168|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36164|      0|#define maybe_collect() do {\
  |  |  |  |36165|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 0, False: 0]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36167|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37371|      0|    }
37372|       |
37373|   102k|    VM_OP(JOP_MAKE_BUFFER) {
  ------------------
  |  |36134|   102k|#define VM_OP(op) label_##op :
  ------------------
37374|   102k|        int32_t count = fiber->stacktop - fiber->stackstart;
37375|   102k|        Janet *mem = fiber->data + fiber->stackstart;
37376|   102k|        JanetBuffer *buffer = janet_buffer(10 * count);
37377|   205k|        for (int32_t i = 0; i < count; i++)
  ------------------
  |  Branch (37377:29): [True: 102k, False: 102k]
  ------------------
37378|   102k|            janet_to_string_b(buffer, mem[i]);
37379|   102k|        stack[D] = janet_wrap_buffer(buffer);
  ------------------
  |  |36116|   102k|#define D (*pc >> 8)
  ------------------
                      stack[D] = janet_wrap_buffer(buffer);
  ------------------
  |  |  847|   102k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  825|   102k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   102k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   102k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37380|   102k|        fiber->stacktop = fiber->stackstart;
37381|   102k|        vm_checkgc_pcnext();
  ------------------
  |  |36168|   102k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36164|   102k|#define maybe_collect() do {\
  |  |  |  |36165|   102k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36165:9): [True: 1, False: 102k]
  |  |  |  |  |  Branch (36165:85): [Folded, False: 102k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36167|   102k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36136|   102k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37382|   102k|    }
37383|       |
37384|   102k|    VM_END()
  ------------------
  |  |36133|   102k|#define VM_END() }
  ------------------
37385|   102k|}
janet.c:janet_binop_call:
36401|  1.25k|static Janet janet_binop_call(const char *lmethod, const char *rmethod, Janet lhs, Janet rhs) {
36402|  1.25k|    Janet lm = janet_method_lookup(lhs, lmethod);
36403|  1.25k|    if (janet_checktype(lm, JANET_NIL)) {
  ------------------
  |  |  806|  1.25k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 291, False: 961]
  |  |  |  Branch (806:6): [Folded, False: 1.25k]
  |  |  ------------------
  |  |  807|  1.25k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!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.25k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|  1.25k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|  1.25k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|  1.25k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|  1.25k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36404|       |        /* Invert order for rmethod */
36405|    291|        Janet lr = janet_method_lookup(rhs, rmethod);
36406|    291|        Janet argv[2] = { rhs, lhs };
36407|    291|        if (janet_checktype(lr, JANET_NIL)) {
  ------------------
  |  |  806|    291|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 190, False: 101]
  |  |  |  Branch (806:6): [Folded, False: 291]
  |  |  ------------------
  |  |  807|    291|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|    291|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|    291|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|    291|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    291|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    291|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36408|    190|            janet_panicf("could not find method :%s for %v or :%s for %v",
36409|    190|                         lmethod, lhs,
36410|    190|                         rmethod, rhs);
36411|    190|        }
36412|    101|        return janet_method_invoke(lr, 2, argv);
36413|    961|    } else {
36414|    961|        Janet argv[2] = { lhs, rhs };
36415|    961|        return janet_method_invoke(lm, 2, argv);
36416|    961|    }
36417|  1.25k|}
janet.c:resolve_method:
36376|   313k|static Janet resolve_method(Janet name, JanetFiber *fiber) {
36377|   313k|    int32_t argc = fiber->stacktop - fiber->stackstart;
36378|   313k|    if (argc < 1) janet_panicf("method call (%v) takes at least 1 argument, got 0", name);
  ------------------
  |  Branch (36378:9): [True: 7, False: 313k]
  ------------------
36379|   313k|    Janet callee = method_to_fun(name, fiber->data[fiber->stackstart]);
36380|   313k|    if (janet_checktype(callee, JANET_NIL))
  ------------------
  |  |  806|   313k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:5): [True: 20, False: 313k]
  |  |  |  Branch (806:6): [Folded, False: 313k]
  |  |  ------------------
  |  |  807|   313k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   313k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   313k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   313k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   313k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   313k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36381|     20|        janet_panicf("unknown method %v invoked on %v", name, fiber->data[fiber->stackstart]);
36382|   313k|    return callee;
36383|   313k|}
janet.c:method_to_fun:
36371|   318k|static Janet method_to_fun(Janet method, Janet obj) {
36372|   318k|    return janet_get(obj, method);
36373|   318k|}
janet.c:call_nonfn:
36364|   864k|static Janet call_nonfn(JanetFiber *fiber, Janet callee) {
36365|   864k|    int32_t argc = fiber->stacktop - fiber->stackstart;
36366|   864k|    fiber->stacktop = fiber->stackstart;
36367|   864k|    return janet_method_invoke(callee, argc, fiber->data + fiber->stacktop);
36368|   864k|}
janet.c:janet_check_can_resume:
37524|   383k|static JanetSignal janet_check_can_resume(JanetFiber *fiber, Janet *out, int is_cancel) {
37525|       |    /* Check conditions */
37526|   383k|    JanetFiberStatus old_status = janet_fiber_status(fiber);
37527|   383k|    if (janet_vm.stackn >= JANET_RECURSION_GUARD) {
  ------------------
  |  |  296|   383k|#define JANET_RECURSION_GUARD 1024
  ------------------
  |  Branch (37527:9): [True: 0, False: 383k]
  ------------------
37528|      0|        janet_fiber_set_status(fiber, JANET_STATUS_ERROR);
  ------------------
  |  |  804|      0|#define janet_fiber_set_status(f, s) do {\
  |  |  805|      0|    (f)->flags &= ~JANET_FIBER_STATUS_MASK;\
  |  |  ------------------
  |  |  |  |  785|      0|#define JANET_FIBER_STATUS_MASK 0x3F0000
  |  |  ------------------
  |  |  806|      0|    (f)->flags |= (s) << JANET_FIBER_STATUS_OFFSET;\
  |  |  ------------------
  |  |  |  |  787|      0|#define JANET_FIBER_STATUS_OFFSET 16
  |  |  ------------------
  |  |  807|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (807:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37529|      0|        *out = janet_cstringv("C stack recursed too deeply");
  ------------------
  |  | 1825|      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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37530|      0|        return JANET_SIGNAL_ERROR;
37531|      0|    }
37532|       |    /* If a "task" fiber is trying to be used as a normal fiber, detect that. See bug #920.
37533|       |     * Fibers must be marked as root fibers manually, or by the ev scheduler. */
37534|   383k|    if (janet_vm.fiber != NULL && (fiber->gc.flags & JANET_FIBER_EV_GCFLAG_ROOT)) {
  ------------------
  |  |  799|    101|#define JANET_FIBER_EV_GCFLAG_ROOT 0x4000000
  ------------------
  |  Branch (37534:9): [True: 101, False: 383k]
  |  Branch (37534:35): [True: 0, False: 101]
  ------------------
37535|      0|#ifdef JANET_EV
37536|      0|        *out = janet_cstringv(is_cancel
  ------------------
  |  | 1825|      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]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37537|      0|                              ? "cannot cancel root fiber, use ev/cancel"
37538|      0|                              : "cannot resume root fiber, use ev/go");
37539|       |#else
37540|       |        *out = janet_cstringv(is_cancel
37541|       |                              ? "cannot cancel root fiber"
37542|       |                              : "cannot resume root fiber");
37543|       |#endif
37544|      0|        return JANET_SIGNAL_ERROR;
37545|      0|    }
37546|   383k|    if (old_status == JANET_STATUS_ALIVE ||
  ------------------
  |  Branch (37546:9): [True: 0, False: 383k]
  ------------------
37547|   383k|            old_status == JANET_STATUS_DEAD ||
  ------------------
  |  Branch (37547:13): [True: 0, False: 383k]
  ------------------
37548|   383k|            (old_status >= JANET_STATUS_USER0 && old_status <= JANET_STATUS_USER4) ||
  ------------------
  |  Branch (37548:14): [True: 383k, False: 0]
  |  Branch (37548:50): [True: 0, False: 383k]
  ------------------
37549|   383k|            old_status == JANET_STATUS_ERROR) {
  ------------------
  |  Branch (37549:13): [True: 0, False: 383k]
  ------------------
37550|      0|        const uint8_t *str = janet_formatc("cannot resume fiber with status :%s",
37551|      0|                                           janet_status_names[old_status]);
37552|      0|        *out = 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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37553|      0|        return JANET_SIGNAL_ERROR;
37554|      0|    }
37555|   383k|    return JANET_SIGNAL_OK;
37556|   383k|}
janet.c:janet_continue_no_check:
37579|   383k|static JanetSignal janet_continue_no_check(JanetFiber *fiber, Janet in, Janet *out) {
37580|       |
37581|   383k|    JanetFiberStatus old_status = janet_fiber_status(fiber);
37582|       |
37583|   383k|#ifdef JANET_EV
37584|   383k|    janet_fiber_did_resume(fiber);
37585|   383k|#endif
37586|       |
37587|       |    /* Clear last value */
37588|   383k|    fiber->last_value = janet_wrap_nil();
  ------------------
  |  |  831|   383k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  822|   383k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   383k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   383k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37589|       |
37590|       |    /* Continue child fiber if it exists */
37591|   383k|    if (fiber->child) {
  ------------------
  |  Branch (37591:9): [True: 0, False: 383k]
  ------------------
37592|      0|        if (janet_vm.root_fiber == NULL) janet_vm.root_fiber = fiber;
  ------------------
  |  Branch (37592:13): [True: 0, False: 0]
  ------------------
37593|      0|        JanetFiber *child = fiber->child;
37594|      0|        uint32_t instr = (janet_stack_frame(fiber->data + fiber->frame)->pc)[0];
  ------------------
  |  |  809|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1026|      0|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
37595|      0|        janet_vm.stackn++;
37596|      0|        JanetSignal sig = janet_continue(child, in, &in);
37597|      0|        janet_vm.stackn--;
37598|      0|        if (janet_vm.root_fiber == fiber) janet_vm.root_fiber = NULL;
  ------------------
  |  Branch (37598:13): [True: 0, False: 0]
  ------------------
37599|      0|        if (sig != JANET_SIGNAL_OK && !(child->flags & (1 << sig))) {
  ------------------
  |  Branch (37599:13): [True: 0, False: 0]
  |  Branch (37599:39): [True: 0, False: 0]
  ------------------
37600|      0|            *out = in;
37601|      0|            janet_fiber_set_status(fiber, sig);
  ------------------
  |  |  804|      0|#define janet_fiber_set_status(f, s) do {\
  |  |  805|      0|    (f)->flags &= ~JANET_FIBER_STATUS_MASK;\
  |  |  ------------------
  |  |  |  |  785|      0|#define JANET_FIBER_STATUS_MASK 0x3F0000
  |  |  ------------------
  |  |  806|      0|    (f)->flags |= (s) << JANET_FIBER_STATUS_OFFSET;\
  |  |  ------------------
  |  |  |  |  787|      0|#define JANET_FIBER_STATUS_OFFSET 16
  |  |  ------------------
  |  |  807|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (807:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37602|      0|            fiber->last_value = child->last_value;
37603|      0|            return sig;
37604|      0|        }
37605|       |        /* Check if we need any special handling for certain opcodes */
37606|      0|        switch (instr & 0x7F) {
37607|      0|            default:
  ------------------
  |  Branch (37607:13): [True: 0, False: 0]
  ------------------
37608|      0|                break;
37609|      0|            case JOP_NEXT: {
  ------------------
  |  Branch (37609:13): [True: 0, False: 0]
  ------------------
37610|      0|                if (sig == JANET_SIGNAL_OK ||
  ------------------
  |  Branch (37610:21): [True: 0, False: 0]
  ------------------
37611|      0|                        sig == JANET_SIGNAL_ERROR ||
  ------------------
  |  Branch (37611:25): [True: 0, False: 0]
  ------------------
37612|      0|                        sig == JANET_SIGNAL_USER0 ||
  ------------------
  |  Branch (37612:25): [True: 0, False: 0]
  ------------------
37613|      0|                        sig == JANET_SIGNAL_USER1 ||
  ------------------
  |  Branch (37613:25): [True: 0, False: 0]
  ------------------
37614|      0|                        sig == JANET_SIGNAL_USER2 ||
  ------------------
  |  Branch (37614:25): [True: 0, False: 0]
  ------------------
37615|      0|                        sig == JANET_SIGNAL_USER3 ||
  ------------------
  |  Branch (37615:25): [True: 0, False: 0]
  ------------------
37616|      0|                        sig == JANET_SIGNAL_USER4) {
  ------------------
  |  Branch (37616:25): [True: 0, False: 0]
  ------------------
37617|      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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37618|      0|                } else {
37619|      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)
  |  |  ------------------
  ------------------
37620|      0|                }
37621|      0|                break;
37622|      0|            }
37623|      0|        }
37624|      0|        fiber->child = NULL;
37625|      0|    }
37626|       |
37627|       |    /* Handle new fibers being resumed with a non-nil value */
37628|   383k|    if (old_status == JANET_STATUS_NEW && !janet_checktype(in, JANET_NIL)) {
  ------------------
  |  |  806|   383k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (806:6): [Folded, False: 383k]
  |  |  ------------------
  |  |  807|   383k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  803|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (803:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (803:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  808|   383k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  800|   383k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|   383k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|   383k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|   383k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (37628:9): [True: 383k, False: 43]
  |  Branch (37628:43): [True: 184, False: 383k]
  ------------------
37629|    184|        Janet *stack = fiber->data + fiber->frame;
37630|    184|        JanetFunction *func = janet_stack_frame(stack)->func;
  ------------------
  |  |  809|    184|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1026|    184|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
37631|    184|        if (func) {
  ------------------
  |  Branch (37631:13): [True: 184, False: 0]
  ------------------
37632|    184|            if (func->def->arity > 0) {
  ------------------
  |  Branch (37632:17): [True: 2, False: 182]
  ------------------
37633|      2|                stack[0] = in;
37634|    182|            } else if (func->def->flags & JANET_FUNCDEF_FLAG_VARARG) {
  ------------------
  |  | 1097|    182|#define JANET_FUNCDEF_FLAG_VARARG 0x10000
  ------------------
  |  Branch (37634:24): [True: 41, False: 141]
  ------------------
37635|     41|                stack[0] = janet_wrap_tuple(janet_tuple_n(&in, 1));
  ------------------
  |  |  843|     41|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  828|     41|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|     41|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|     41|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37636|     41|            }
37637|    184|        }
37638|    184|    }
37639|       |
37640|       |    /* If this is a nested continue (root_fiber already set), root the fiber
37641|       |     * so it survives GC. janet_collect only marks root_fiber, so without
37642|       |     * this a nested fiber (e.g., from janet_pcall in a C function) would be
37643|       |     * invisible to GC and could be collected while actively running. */
37644|   383k|    int fiber_rooted = (janet_vm.root_fiber != NULL);
37645|   383k|    if (fiber_rooted) {
  ------------------
  |  Branch (37645:9): [True: 101, False: 383k]
  ------------------
37646|    101|        janet_gcroot(janet_wrap_fiber(fiber));
  ------------------
  |  |  844|    101|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|    101|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    101|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    101|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37647|    101|    }
37648|       |
37649|       |    /* Save global state */
37650|   383k|    JanetTryState tstate;
37651|   383k|    JanetSignal sig = janet_try(&tstate);
  ------------------
  |  | 1980|   383k|#define janet_try(state) (janet_try_init(state), (JanetSignal) setjmp((state)->buf))
  ------------------
37652|   383k|    if (!sig) {
  ------------------
  |  Branch (37652:9): [True: 383k, False: 0]
  ------------------
37653|       |        /* Normal setup */
37654|   383k|        if (janet_vm.root_fiber == NULL) janet_vm.root_fiber = fiber;
  ------------------
  |  Branch (37654:13): [True: 383k, False: 101]
  ------------------
37655|   383k|        janet_vm.fiber = fiber;
37656|   383k|        janet_fiber_set_status(fiber, JANET_STATUS_ALIVE);
  ------------------
  |  |  804|   383k|#define janet_fiber_set_status(f, s) do {\
  |  |  805|   383k|    (f)->flags &= ~JANET_FIBER_STATUS_MASK;\
  |  |  ------------------
  |  |  |  |  785|   383k|#define JANET_FIBER_STATUS_MASK 0x3F0000
  |  |  ------------------
  |  |  806|   383k|    (f)->flags |= (s) << JANET_FIBER_STATUS_OFFSET;\
  |  |  ------------------
  |  |  |  |  787|   383k|#define JANET_FIBER_STATUS_OFFSET 16
  |  |  ------------------
  |  |  807|   383k|} while (0)
  |  |  ------------------
  |  |  |  Branch (807:10): [Folded, False: 383k]
  |  |  ------------------
  ------------------
37657|   383k|        sig = run_vm(fiber, in);
37658|   383k|    }
37659|       |
37660|       |    /* Restore */
37661|   383k|    if (janet_vm.root_fiber == fiber) janet_vm.root_fiber = NULL;
  ------------------
  |  Branch (37661:9): [True: 383k, False: 101]
  ------------------
37662|   383k|    janet_fiber_set_status(fiber, sig);
  ------------------
  |  |  804|   383k|#define janet_fiber_set_status(f, s) do {\
  |  |  805|   383k|    (f)->flags &= ~JANET_FIBER_STATUS_MASK;\
  |  |  ------------------
  |  |  |  |  785|   383k|#define JANET_FIBER_STATUS_MASK 0x3F0000
  |  |  ------------------
  |  |  806|   383k|    (f)->flags |= (s) << JANET_FIBER_STATUS_OFFSET;\
  |  |  ------------------
  |  |  |  |  787|   383k|#define JANET_FIBER_STATUS_OFFSET 16
  |  |  ------------------
  |  |  807|   383k|} while (0)
  |  |  ------------------
  |  |  |  Branch (807:10): [Folded, False: 383k]
  |  |  ------------------
  ------------------
37663|   383k|    janet_restore(&tstate);
37664|   383k|    if (fiber_rooted) {
  ------------------
  |  Branch (37664:9): [True: 101, False: 383k]
  ------------------
37665|    101|        janet_gcunroot(janet_wrap_fiber(fiber));
  ------------------
  |  |  844|    101|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  825|    101|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  793|    101|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  792|    101|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37666|    101|    }
37667|   383k|    fiber->last_value = tstate.payload;
37668|   383k|    *out = tstate.payload;
37669|       |
37670|   383k|    return sig;
37671|   383k|}
janet.c:janet_method_lookup:
36386|  4.94k|static Janet janet_method_lookup(Janet x, const char *name) {
36387|  4.94k|    return method_to_fun(janet_ckeywordv(name), x);
  ------------------
  |  | 1842|  4.94k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  850|  4.94k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  828|  4.94k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  793|  4.94k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  792|  4.94k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36388|  4.94k|}
janet.c:janet_method_invoke:
36326|   869k|static Janet janet_method_invoke(Janet method, int32_t argc, Janet *argv) {
36327|   869k|    switch (janet_type(method)) {
  ------------------
  |  |  795|   869k|    (isnan((x).number) \
  |  |  796|   869k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  797|   869k|        : JANET_NUMBER)
  ------------------
  |  Branch (36327:13): [True: 869k, False: 27]
  ------------------
36328|  4.44k|        case JANET_CFUNCTION:
  ------------------
  |  Branch (36328:9): [True: 4.44k, False: 864k]
  ------------------
36329|  4.44k|            return (janet_unwrap_cfunction(method))(argc, argv);
  ------------------
  |  |  869|  4.44k|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
36330|      0|        case JANET_FUNCTION: {
  ------------------
  |  Branch (36330:9): [True: 0, False: 869k]
  ------------------
36331|      0|            JanetFunction *fun = janet_unwrap_function(method);
  ------------------
  |  |  868|      0|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
36332|      0|            return janet_call(fun, argc, argv);
36333|      0|        }
36334|   408k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (36334:9): [True: 408k, False: 460k]
  ------------------
36335|   408k|            JanetAbstract abst = janet_unwrap_abstract(method);
  ------------------
  |  |  866|   408k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
36336|   408k|            const JanetAbstractType *at = janet_abstract_type(abst);
  ------------------
  |  | 1898|   408k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1896|   408k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
36337|   408k|            if (NULL != at->call) {
  ------------------
  |  Branch (36337:17): [True: 0, False: 408k]
  ------------------
36338|      0|                return at->call(abst, argc, argv);
36339|      0|            }
36340|   408k|        }
36341|       |        /* fallthrough */
36342|   408k|        case JANET_STRING:
  ------------------
  |  Branch (36342:9): [True: 2, False: 869k]
  ------------------
36343|   408k|        case JANET_BUFFER:
  ------------------
  |  Branch (36343:9): [True: 16, False: 869k]
  ------------------
36344|   661k|        case JANET_TABLE:
  ------------------
  |  Branch (36344:9): [True: 252k, False: 616k]
  ------------------
36345|   661k|        case JANET_STRUCT:
  ------------------
  |  Branch (36345:9): [True: 2, False: 869k]
  ------------------
36346|   701k|        case JANET_ARRAY:
  ------------------
  |  Branch (36346:9): [True: 39.9k, False: 829k]
  ------------------
36347|   864k|        case JANET_TUPLE: {
  ------------------
  |  Branch (36347:9): [True: 163k, False: 705k]
  ------------------
36348|   864k|            if (argc != 1) {
  ------------------
  |  Branch (36348:17): [True: 23, False: 864k]
  ------------------
36349|     23|                janet_panicf("%v called with %d arguments, possibly expected 1", method, argc);
36350|     23|            }
36351|   864k|            return janet_in(method, argv[0]);
36352|   864k|        }
36353|     45|        default: {
  ------------------
  |  Branch (36353:9): [True: 45, False: 869k]
  ------------------
36354|     45|            if (argc != 1) {
  ------------------
  |  Branch (36354:17): [True: 17, False: 28]
  ------------------
36355|     17|                janet_panicf("%v called with %d arguments, possibly expected 1", method, argc);
36356|     17|            }
36357|     28|            return janet_in(argv[0], method);
36358|     45|        }
36359|   869k|    }
36360|   869k|}

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

