janet_abstract_begin:
 1330|   152k|void *janet_abstract_begin(const JanetAbstractType *atype, size_t size) {
 1331|   152k|    JanetAbstractHead *header = janet_gcalloc(JANET_MEMORY_NONE,
 1332|   152k|                                sizeof(JanetAbstractHead) + size);
 1333|   152k|    header->size = size;
 1334|   152k|    header->type = atype;
 1335|   152k|    return (void *) & (header->data);
 1336|   152k|}
janet_abstract_end:
 1338|   152k|void *janet_abstract_end(void *x) {
 1339|   152k|    janet_gc_settype((void *)(janet_abstract_head(x)), JANET_MEMORY_ABSTRACT);
  ------------------
  |  |  628|   152k|#define janet_gc_settype(m, t) ((janet_gc_header(m)->flags |= (0xFF & (t))))
  |  |  ------------------
  |  |  |  |  622|   152k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
 1340|   152k|    return x;
 1341|   152k|}
janet_abstract:
 1343|   152k|void *janet_abstract(const JanetAbstractType *atype, size_t size) {
 1344|   152k|    return janet_abstract_end(janet_abstract_begin(atype, size));
 1345|   152k|}
janet_abstract_begin_threaded:
 1353|     32|void *janet_abstract_begin_threaded(const JanetAbstractType *atype, size_t size) {
 1354|     32|    JanetAbstractHead *header = janet_malloc(sizeof(JanetAbstractHead) + size);
  ------------------
  |  | 2393|     32|#define janet_malloc(X) malloc((X))
  ------------------
 1355|     32|    if (NULL == header) {
  ------------------
  |  Branch (1355:9): [True: 0, False: 32]
  ------------------
 1356|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1357|      0|    }
 1358|     32|    janet_vm.next_collection += size + sizeof(JanetAbstractHead);
 1359|     32|    header->gc.flags = JANET_MEMORY_THREADED_ABSTRACT;
 1360|     32|    header->gc.data.next = NULL; /* Clear memory for address sanitizers */
 1361|     32|    header->gc.data.refcount = 1;
 1362|     32|    header->size = size;
 1363|     32|    header->type = atype;
 1364|     32|    void *abstract = (void *) & (header->data);
 1365|     32|    janet_table_put(&janet_vm.threaded_abstracts, janet_wrap_abstract(abstract), janet_wrap_false());
  ------------------
  |  |  846|     32|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|     32|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     32|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     32|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_table_put(&janet_vm.threaded_abstracts, janet_wrap_abstract(abstract), janet_wrap_false());
  ------------------
  |  |  828|     32|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  817|     32|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     32|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     32|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1366|     32|    return abstract;
 1367|     32|}
janet_abstract_end_threaded:
 1369|     32|void *janet_abstract_end_threaded(void *x) {
 1370|     32|    janet_gc_settype((void *)(janet_abstract_head(x)), JANET_MEMORY_THREADED_ABSTRACT);
  ------------------
  |  |  628|     32|#define janet_gc_settype(m, t) ((janet_gc_header(m)->flags |= (0xFF & (t))))
  |  |  ------------------
  |  |  |  |  622|     32|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
 1371|     32|    return x;
 1372|     32|}
janet_abstract_threaded:
 1374|     32|void *janet_abstract_threaded(const JanetAbstractType *atype, size_t size) {
 1375|     32|    return janet_abstract_end_threaded(janet_abstract_begin_threaded(atype, size));
 1376|     32|}
janet_os_mutex_size:
 1434|     10|size_t janet_os_mutex_size(void) {
 1435|     10|    return sizeof(pthread_mutex_t);
 1436|     10|}
janet_os_rwlock_size:
 1438|     22|size_t janet_os_rwlock_size(void) {
 1439|     22|    return sizeof(pthread_rwlock_t);
 1440|     22|}
janet_os_mutex_init:
 1442|  1.56k|void janet_os_mutex_init(JanetOSMutex *mutex) {
 1443|  1.56k|    pthread_mutexattr_t attr;
 1444|  1.56k|    pthread_mutexattr_init(&attr);
 1445|  1.56k|    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
 1446|  1.56k|    pthread_mutex_init((pthread_mutex_t *) mutex, &attr);
 1447|  1.56k|}
janet_os_mutex_deinit:
 1449|  1.56k|void janet_os_mutex_deinit(JanetOSMutex *mutex) {
 1450|  1.56k|    pthread_mutex_destroy((pthread_mutex_t *) mutex);
 1451|  1.56k|}
janet_os_rwlock_init:
 1462|     22|void janet_os_rwlock_init(JanetOSRWLock *rwlock) {
 1463|       |    pthread_rwlock_init((pthread_rwlock_t *) rwlock, NULL);
 1464|     22|}
janet_os_rwlock_deinit:
 1466|     22|void janet_os_rwlock_deinit(JanetOSRWLock *rwlock) {
 1467|     22|    pthread_rwlock_destroy((pthread_rwlock_t *) rwlock);
 1468|     22|}
janet_abstract_decref:
 1492|     32|int32_t janet_abstract_decref(void *abst) {
 1493|       |    return janet_atomic_dec(&janet_abstract_head(abst)->gc.data.refcount);
  ------------------
  |  | 1887|     32|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
 1494|     32|}
janet_abstract_decref_maybe_free:
 1496|     32|int32_t janet_abstract_decref_maybe_free(void *abst) {
 1497|     32|    int32_t result = janet_abstract_decref(abst);
 1498|     32|    if (0 == result) {
  ------------------
  |  Branch (1498:9): [True: 32, False: 0]
  ------------------
 1499|     32|        JanetAbstractHead *head = janet_abstract_head(abst);
  ------------------
  |  | 1887|     32|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
 1500|     32|        if (head->type->gc) {
  ------------------
  |  Branch (1500:13): [True: 32, False: 0]
  ------------------
 1501|     32|            janet_assert(!head->type->gc(head->data, head->size), "finalizer failed");
  ------------------
  |  |  386|     32|#define janet_assert(c, m) do { \
  |  |  387|     32|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 32]
  |  |  ------------------
  |  |  388|     32|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 32]
  |  |  ------------------
  ------------------
 1502|     32|        }
 1503|       |        /* Free memory */
 1504|     32|        janet_free(head);
  ------------------
  |  | 2402|     32|#define janet_free(X) free((X))
  ------------------
 1505|     32|    }
 1506|     32|    return result;
 1507|     32|}
janet_array:
 1562|   114k|JanetArray *janet_array(int32_t capacity) {
 1563|   114k|    JanetArray *array = janet_gcalloc(JANET_MEMORY_ARRAY, sizeof(JanetArray));
 1564|   114k|    janet_array_impl(array, capacity);
 1565|   114k|    return array;
 1566|   114k|}
janet_array_weak:
 1569|     29|JanetArray *janet_array_weak(int32_t capacity) {
 1570|     29|    JanetArray *array = janet_gcalloc(JANET_MEMORY_ARRAY_WEAK, sizeof(JanetArray));
 1571|     29|    janet_array_impl(array, capacity);
 1572|     29|    return array;
 1573|     29|}
janet_array_n:
 1576|  12.6M|JanetArray *janet_array_n(const Janet *elements, int32_t n) {
 1577|  12.6M|    JanetArray *array = janet_gcalloc(JANET_MEMORY_ARRAY, sizeof(JanetArray));
 1578|  12.6M|    array->capacity = n;
 1579|  12.6M|    array->count = n;
 1580|  12.6M|    array->data = janet_malloc(sizeof(Janet) * (size_t) n);
  ------------------
  |  | 2393|  12.6M|#define janet_malloc(X) malloc((X))
  ------------------
 1581|  12.6M|    if (!array->data) {
  ------------------
  |  Branch (1581:9): [True: 0, False: 12.6M]
  ------------------
 1582|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1583|      0|    }
 1584|  12.6M|    safe_memcpy(array->data, elements, sizeof(Janet) * n);
 1585|  12.6M|    return array;
 1586|  12.6M|}
janet_array_ensure:
 1589|  29.4M|void janet_array_ensure(JanetArray *array, int32_t capacity, int32_t growth) {
 1590|  29.4M|    Janet *newData;
 1591|  29.4M|    Janet *old = array->data;
 1592|  29.4M|    if (capacity <= array->capacity) return;
  ------------------
  |  Branch (1592:9): [True: 21.9M, False: 7.48M]
  ------------------
 1593|  7.48M|    int64_t new_capacity = ((int64_t) capacity) * growth;
 1594|  7.48M|    if (new_capacity > INT32_MAX) new_capacity = INT32_MAX;
  ------------------
  |  Branch (1594:9): [True: 0, False: 7.48M]
  ------------------
 1595|  7.48M|    capacity = (int32_t) new_capacity;
 1596|  7.48M|    newData = janet_realloc(old, capacity * sizeof(Janet));
  ------------------
  |  | 2396|  7.48M|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 1597|  7.48M|    if (NULL == newData) {
  ------------------
  |  Branch (1597:9): [True: 0, False: 7.48M]
  ------------------
 1598|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1599|      0|    }
 1600|  7.48M|    janet_vm.next_collection += (capacity - array->capacity) * sizeof(Janet);
 1601|  7.48M|    array->data = newData;
 1602|  7.48M|    array->capacity = capacity;
 1603|  7.48M|}
janet_array_push:
 1620|  17.9k|void janet_array_push(JanetArray *array, Janet x) {
 1621|  17.9k|    if (array->count == INT32_MAX) {
  ------------------
  |  Branch (1621:9): [True: 0, False: 17.9k]
  ------------------
 1622|      0|        janet_panic("array overflow");
 1623|      0|    }
 1624|  17.9k|    int32_t newcount = array->count + 1;
 1625|  17.9k|    janet_array_ensure(array, newcount, 2);
 1626|  17.9k|    array->data[array->count] = x;
 1627|  17.9k|    array->count = newcount;
 1628|  17.9k|}
janet_array_pop:
 1631|  80.0k|Janet janet_array_pop(JanetArray *array) {
 1632|  80.0k|    if (array->count) {
  ------------------
  |  Branch (1632:9): [True: 80.0k, False: 0]
  ------------------
 1633|  80.0k|        return array->data[--array->count];
 1634|  80.0k|    } else {
 1635|      0|        return janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1636|      0|    }
 1637|  80.0k|}
cfun_array_weak:
 1662|     24|              "Creates a new empty array with a pre-allocated capacity and support for weak references. Similar to `array/new`.") {
 1663|     24|    janet_fixarity(argc, 1);
 1664|     24|    int32_t cap = janet_getinteger(argv, 0);
 1665|     24|    JanetArray *array = janet_array_weak(cap);
 1666|     24|    return janet_wrap_array(array);
  ------------------
  |  |  840|     24|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  820|     24|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     24|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     24|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1667|     24|}
cfun_array_new_filled:
 1671|  81.9k|              "Creates a new array of `count` elements, all set to `value`, which defaults to nil. Returns the new array.") {
 1672|  81.9k|    janet_arity(argc, 1, 2);
 1673|  81.9k|    int32_t count = janet_getnat(argv, 0);
 1674|  81.9k|    Janet x = (argc == 2) ? argv[1] : janet_wrap_nil();
  ------------------
  |  |  826|  80.3k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  80.3k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  80.3k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  80.3k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1674:15): [True: 1.56k, False: 80.3k]
  ------------------
 1675|  81.9k|    JanetArray *array = janet_array(count);
 1676|   342k|    for (int32_t i = 0; i < count; i++) {
  ------------------
  |  Branch (1676:25): [True: 260k, False: 81.9k]
  ------------------
 1677|   260k|        array->data[i] = x;
 1678|   260k|    }
 1679|  81.9k|    array->count = count;
 1680|  81.9k|    return janet_wrap_array(array);
  ------------------
  |  |  840|  81.9k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  820|  81.9k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  81.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  81.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1681|  81.9k|}
cfun_array_fill:
 1686|      1|              "Returns the modified array.") {
 1687|      1|    janet_arity(argc, 1, 2);
 1688|      1|    JanetArray *array = janet_getarray(argv, 0);
 1689|      1|    Janet x = (argc == 2) ? argv[1] : janet_wrap_nil();
  ------------------
  |  |  826|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1689:15): [True: 0, False: 1]
  ------------------
 1690|      1|    for (int32_t i = 0; i < array->count; i++) {
  ------------------
  |  Branch (1690:25): [True: 0, False: 1]
  ------------------
 1691|      0|        array->data[i] = x;
 1692|      0|    }
 1693|      1|    return argv[0];
 1694|      1|}
cfun_array_pop:
 1699|  80.0k|              "the input array.") {
 1700|  80.0k|    janet_fixarity(argc, 1);
 1701|  80.0k|    JanetArray *array = janet_getarray(argv, 0);
 1702|  80.0k|    return janet_array_pop(array);
 1703|  80.0k|}
cfun_array_push:
 1715|  29.4M|              "Push all the elements of xs to the end of an array. Modifies the input array and returns it.") {
 1716|  29.4M|    janet_arity(argc, 1, -1);
 1717|  29.4M|    JanetArray *array = janet_getarray(argv, 0);
 1718|  29.4M|    if (INT32_MAX - argc + 1 <= array->count) {
  ------------------
  |  Branch (1718:9): [True: 0, False: 29.4M]
  ------------------
 1719|      0|        janet_panic("array overflow");
 1720|      0|    }
 1721|  29.4M|    int32_t newcount = array->count - 1 + argc;
 1722|  29.4M|    janet_array_ensure(array, newcount, 2);
 1723|  29.4M|    if (argc > 1) memcpy(array->data + array->count, argv + 1, (size_t)(argc - 1) * sizeof(Janet));
  ------------------
  |  Branch (1723:9): [True: 29.4M, False: 0]
  ------------------
 1724|  29.4M|    array->count = newcount;
 1725|  29.4M|    return argv[0];
 1726|  29.4M|}
cfun_array_ensure:
 1733|      2|              "Otherwise, the backing memory will be reallocated so that there is enough space.") {
 1734|      2|    janet_fixarity(argc, 3);
 1735|      2|    JanetArray *array = janet_getarray(argv, 0);
 1736|      2|    int32_t newcount = janet_getinteger(argv, 1);
 1737|      2|    int32_t growth = janet_getinteger(argv, 2);
 1738|      2|    if (newcount < 1) janet_panic("expected positive integer");
  ------------------
  |  Branch (1738:9): [True: 0, False: 2]
  ------------------
 1739|      2|    janet_array_ensure(array, newcount, growth);
 1740|      2|    return argv[0];
 1741|      2|}
cfun_array_slice:
 1749|  2.90k|              "negative slice range. Returns a new array.") {
 1750|  2.90k|    JanetView view = janet_getindexed(argv, 0);
 1751|  2.90k|    JanetRange range = janet_getslice(argc, argv);
 1752|  2.90k|    JanetArray *array = janet_array(range.end - range.start);
 1753|  2.90k|    if (array->data)
  ------------------
  |  Branch (1753:9): [True: 2.85k, False: 47]
  ------------------
 1754|  2.85k|        memcpy(array->data, view.items + range.start, sizeof(Janet) * (range.end - range.start));
 1755|  2.90k|    array->count = range.end - range.start;
 1756|  2.90k|    return janet_wrap_array(array);
  ------------------
  |  |  840|  2.90k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  820|  2.90k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  2.90k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  2.90k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1757|  2.90k|}
cfun_array_concat:
 1764|  53.7k|              "Return the modified array `arr`.") {
 1765|  53.7k|    int32_t i;
 1766|  53.7k|    janet_arity(argc, 1, -1);
 1767|  53.7k|    JanetArray *array = janet_getarray(argv, 0);
 1768|   114k|    for (i = 1; i < argc; i++) {
  ------------------
  |  Branch (1768:17): [True: 60.3k, False: 53.7k]
  ------------------
 1769|  60.3k|        switch (janet_type(argv[i])) {
  ------------------
  |  |  790|  60.3k|    (isnan((x).number) \
  |  |  791|  60.3k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  60.3k|        : JANET_NUMBER)
  ------------------
  |  Branch (1769:17): [True: 60.3k, False: 0]
  ------------------
 1770|      0|            default:
  ------------------
  |  Branch (1770:13): [True: 0, False: 60.3k]
  ------------------
 1771|      0|                janet_array_push(array, argv[i]);
 1772|      0|                break;
 1773|  53.7k|            case JANET_ARRAY:
  ------------------
  |  Branch (1773:13): [True: 53.7k, False: 6.56k]
  ------------------
 1774|  60.3k|            case JANET_TUPLE: {
  ------------------
  |  Branch (1774:13): [True: 6.56k, False: 53.7k]
  ------------------
 1775|  60.3k|                int32_t j, len = 0;
 1776|  60.3k|                const Janet *vals = NULL;
 1777|  60.3k|                janet_indexed_view(argv[i], &vals, &len);
 1778|  60.3k|                if (array->data == vals) {
  ------------------
  |  Branch (1778:21): [True: 0, False: 60.3k]
  ------------------
 1779|      0|                    int32_t newcount = array->count + len;
 1780|      0|                    janet_array_ensure(array, newcount, 2);
 1781|      0|                    janet_indexed_view(argv[i], &vals, &len);
 1782|      0|                }
 1783|  72.2k|                for (j = 0; j < len; j++)
  ------------------
  |  Branch (1783:29): [True: 11.9k, False: 60.3k]
  ------------------
 1784|  11.9k|                    janet_array_push(array, vals[j]);
 1785|  60.3k|            }
 1786|  60.3k|            break;
 1787|  60.3k|        }
 1788|  60.3k|    }
 1789|  53.7k|    return janet_wrap_array(array);
  ------------------
  |  |  840|  53.7k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  820|  53.7k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  53.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  53.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1790|  53.7k|}
cfun_array_join:
 1796|      1|              "Return the modified array `arr`.") {
 1797|      1|    int32_t i;
 1798|      1|    janet_arity(argc, 1, -1);
 1799|      1|    JanetArray *array = janet_getarray(argv, 0);
 1800|      1|    for (i = 1; i < argc; i++) {
  ------------------
  |  Branch (1800:17): [True: 0, False: 1]
  ------------------
 1801|      0|        int32_t j, len = 0;
 1802|      0|        const Janet *vals = NULL;
 1803|      0|        if (!janet_indexed_view(argv[i], &vals, &len)) {
  ------------------
  |  Branch (1803:13): [True: 0, False: 0]
  ------------------
 1804|      0|            janet_panicf("expected indexed type for argument %d, got %v", i, argv[i]);
 1805|      0|        }
 1806|      0|        if (array->data == vals) {
  ------------------
  |  Branch (1806:13): [True: 0, False: 0]
  ------------------
 1807|      0|            int32_t newcount = array->count + len;
 1808|      0|            janet_array_ensure(array, newcount, 2);
 1809|      0|            janet_indexed_view(argv[i], &vals, &len);
 1810|      0|        }
 1811|      0|        for (j = 0; j < len; j++)
  ------------------
  |  Branch (1811:21): [True: 0, False: 0]
  ------------------
 1812|      0|            janet_array_push(array, vals[j]);
 1813|      0|    }
 1814|      1|    return janet_wrap_array(array);
  ------------------
  |  |  840|      1|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  820|      1|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1815|      1|}
cfun_array_remove:
 1853|  40.0k|              "Returns the array.") {
 1854|  40.0k|    janet_arity(argc, 2, 3);
 1855|  40.0k|    JanetArray *array = janet_getarray(argv, 0);
 1856|  40.0k|    int32_t at = janet_getinteger(argv, 1);
 1857|  40.0k|    int32_t n = 1;
 1858|  40.0k|    if (at < 0) {
  ------------------
  |  Branch (1858:9): [True: 0, False: 40.0k]
  ------------------
 1859|      0|        at = array->count + at;
 1860|      0|    }
 1861|  40.0k|    if (at < 0 || at > array->count)
  ------------------
  |  Branch (1861:9): [True: 0, False: 40.0k]
  |  Branch (1861:19): [True: 0, False: 40.0k]
  ------------------
 1862|      0|        janet_panicf("removal index %d out of range [0,%d]", at, array->count);
 1863|  40.0k|    if (argc == 3) {
  ------------------
  |  Branch (1863:9): [True: 40.0k, False: 0]
  ------------------
 1864|  40.0k|        n = janet_getinteger(argv, 2);
 1865|  40.0k|        if (n < 0)
  ------------------
  |  Branch (1865:13): [True: 0, False: 40.0k]
  ------------------
 1866|      0|            janet_panicf("expected non-negative integer for argument n, got %v", argv[2]);
 1867|  40.0k|    }
 1868|  40.0k|    if (at + n > array->count) {
  ------------------
  |  Branch (1868:9): [True: 0, False: 40.0k]
  ------------------
 1869|      0|        n = array->count - at;
 1870|      0|    }
 1871|  40.0k|    memmove(array->data + at,
 1872|  40.0k|            array->data + at + n,
 1873|  40.0k|            (array->count - at - n) * sizeof(Janet));
 1874|  40.0k|    array->count -= n;
 1875|  40.0k|    return argv[0];
 1876|  40.0k|}
janet_lib_array:
 1911|  7.16k|void janet_lib_array(JanetTable *env) {
 1912|  7.16k|    JanetRegExt array_cfuns[] = {
 1913|  7.16k|        JANET_CORE_REG("array/new", cfun_array_new),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1914|  7.16k|        JANET_CORE_REG("array/weak", cfun_array_weak),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1915|  7.16k|        JANET_CORE_REG("array/new-filled", cfun_array_new_filled),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1916|  7.16k|        JANET_CORE_REG("array/fill", cfun_array_fill),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1917|  7.16k|        JANET_CORE_REG("array/pop", cfun_array_pop),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1918|  7.16k|        JANET_CORE_REG("array/peek", cfun_array_peek),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1919|  7.16k|        JANET_CORE_REG("array/push", cfun_array_push),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1920|  7.16k|        JANET_CORE_REG("array/ensure", cfun_array_ensure),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1921|  7.16k|        JANET_CORE_REG("array/slice", cfun_array_slice),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1922|  7.16k|        JANET_CORE_REG("array/concat", cfun_array_concat),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1923|  7.16k|        JANET_CORE_REG("array/insert", cfun_array_insert),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1924|  7.16k|        JANET_CORE_REG("array/remove", cfun_array_remove),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1925|  7.16k|        JANET_CORE_REG("array/trim", cfun_array_trim),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1926|  7.16k|        JANET_CORE_REG("array/clear", cfun_array_clear),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1927|  7.16k|        JANET_CORE_REG("array/join", cfun_array_join),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 1928|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 1929|  7.16k|    };
 1930|       |    janet_core_cfuns_ext(env, NULL, array_cfuns);
 1931|  7.16k|}
janet_lib_asm:
 3061|  7.16k|void janet_lib_asm(JanetTable *env) {
 3062|  7.16k|    JanetRegExt asm_cfuns[] = {
 3063|  7.16k|        JANET_CORE_REG("asm", cfun_asm),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3064|  7.16k|        JANET_CORE_REG("disasm", cfun_disasm),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3065|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 3066|  7.16k|    };
 3067|       |    janet_core_cfuns_ext(env, NULL, asm_cfuns);
 3068|  7.16k|}
janet_buffer_init:
 3129|   207k|JanetBuffer *janet_buffer_init(JanetBuffer *buffer, int32_t capacity) {
 3130|   207k|    janet_buffer_init_impl(buffer, capacity);
 3131|   207k|    buffer->gc.data.next = NULL;
 3132|   207k|    buffer->gc.flags = JANET_MEM_DISABLED;
  ------------------
  |  |  626|   207k|#define JANET_MEM_DISABLED 0x200
  ------------------
 3133|   207k|    return buffer;
 3134|   207k|}
janet_buffer_deinit:
 3149|  5.80M|void janet_buffer_deinit(JanetBuffer *buffer) {
 3150|  5.80M|    if (!(buffer->gc.flags & JANET_BUFFER_FLAG_NO_REALLOC)) {
  ------------------
  |  | 1770|  5.80M|#define JANET_BUFFER_FLAG_NO_REALLOC 0x10000
  ------------------
  |  Branch (3150:9): [True: 5.80M, False: 0]
  ------------------
 3151|  5.80M|        janet_free(buffer->data);
  ------------------
  |  | 2402|  5.80M|#define janet_free(X) free((X))
  ------------------
 3152|       |        buffer->data = NULL;
 3153|  5.80M|    }
 3154|  5.80M|}
janet_buffer:
 3157|  5.60M|JanetBuffer *janet_buffer(int32_t capacity) {
 3158|  5.60M|    JanetBuffer *buffer = janet_gcalloc(JANET_MEMORY_BUFFER, sizeof(JanetBuffer));
 3159|  5.60M|    return janet_buffer_init_impl(buffer, capacity);
 3160|  5.60M|}
janet_buffer_ensure:
 3163|  5.39M|void janet_buffer_ensure(JanetBuffer *buffer, int32_t capacity, int32_t growth) {
 3164|  5.39M|    uint8_t *new_data;
 3165|  5.39M|    uint8_t *old = buffer->data;
 3166|  5.39M|    if (capacity <= buffer->capacity) return;
  ------------------
  |  Branch (3166:9): [True: 67.2k, False: 5.32M]
  ------------------
 3167|  5.32M|    janet_buffer_can_realloc(buffer);
 3168|  5.32M|    int64_t big_capacity = ((int64_t) capacity) * growth;
 3169|  5.32M|    capacity = big_capacity > INT32_MAX ? INT32_MAX : (int32_t) big_capacity;
  ------------------
  |  Branch (3169:16): [True: 0, False: 5.32M]
  ------------------
 3170|  5.32M|    janet_gcpressure(capacity - buffer->capacity);
 3171|  5.32M|    new_data = janet_realloc(old, (size_t) capacity * sizeof(uint8_t));
  ------------------
  |  | 2396|  5.32M|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 3172|  5.32M|    if (NULL == new_data) {
  ------------------
  |  Branch (3172:9): [True: 0, False: 5.32M]
  ------------------
 3173|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3174|      0|    }
 3175|  5.32M|    buffer->data = new_data;
 3176|  5.32M|    buffer->capacity = capacity;
 3177|  5.32M|}
janet_buffer_setcount:
 3180|      7|void janet_buffer_setcount(JanetBuffer *buffer, int32_t count) {
 3181|      7|    if (count < 0)
  ------------------
  |  Branch (3181:9): [True: 0, False: 7]
  ------------------
 3182|      0|        return;
 3183|      7|    if (count > buffer->count) {
  ------------------
  |  Branch (3183:9): [True: 6, False: 1]
  ------------------
 3184|      6|        int32_t oldcount = buffer->count;
 3185|      6|        janet_buffer_ensure(buffer, count, 1);
 3186|      6|        memset(buffer->data + oldcount, 0, count - oldcount);
 3187|      6|    }
 3188|      7|    buffer->count = count;
 3189|      7|}
janet_buffer_extra:
 3193|  80.3M|void janet_buffer_extra(JanetBuffer *buffer, int32_t n) {
 3194|       |    /* Check for buffer overflow */
 3195|  80.3M|    if ((int64_t)n + buffer->count > INT32_MAX) {
  ------------------
  |  Branch (3195:9): [True: 0, False: 80.3M]
  ------------------
 3196|      0|        janet_panic("buffer overflow");
 3197|      0|    }
 3198|  80.3M|    int32_t new_size = buffer->count + n;
 3199|  80.3M|    if (new_size > buffer->capacity) {
  ------------------
  |  Branch (3199:9): [True: 5.56M, False: 74.7M]
  ------------------
 3200|  5.56M|        janet_buffer_can_realloc(buffer);
 3201|  5.56M|        int32_t new_capacity = (new_size > (INT32_MAX / 2)) ? INT32_MAX : (new_size * 2);
  ------------------
  |  Branch (3201:32): [True: 0, False: 5.56M]
  ------------------
 3202|  5.56M|        uint8_t *new_data = janet_realloc(buffer->data, new_capacity * sizeof(uint8_t));
  ------------------
  |  | 2396|  5.56M|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 3203|  5.56M|        janet_gcpressure(new_capacity - buffer->capacity);
 3204|  5.56M|        if (NULL == new_data) {
  ------------------
  |  Branch (3204:13): [True: 0, False: 5.56M]
  ------------------
 3205|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3206|      0|        }
 3207|  5.56M|        buffer->data = new_data;
 3208|  5.56M|        buffer->capacity = new_capacity;
 3209|  5.56M|    }
 3210|  80.3M|}
janet_buffer_push_cstring:
 3213|   297k|void janet_buffer_push_cstring(JanetBuffer *buffer, const char *cstring) {
 3214|   297k|    int32_t len = (int32_t) strlen(cstring);
 3215|   297k|    janet_buffer_push_bytes(buffer, (const uint8_t *) cstring, len);
 3216|   297k|}
janet_buffer_push_bytes:
 3219|  20.0M|void janet_buffer_push_bytes(JanetBuffer *buffer, const uint8_t *string, int32_t length) {
 3220|  20.0M|    if (0 == length) return;
  ------------------
  |  Branch (3220:9): [True: 217k, False: 19.8M]
  ------------------
 3221|  19.8M|    janet_buffer_extra(buffer, length);
 3222|  19.8M|    memcpy(buffer->data + buffer->count, string, length);
 3223|  19.8M|    buffer->count += length;
 3224|  19.8M|}
janet_buffer_push_u8:
 3231|  60.4M|void janet_buffer_push_u8(JanetBuffer *buffer, uint8_t byte) {
 3232|  60.4M|    janet_buffer_extra(buffer, 1);
 3233|  60.4M|    buffer->data[buffer->count] = byte;
 3234|  60.4M|    buffer->count++;
 3235|  60.4M|}
cfun_buffer_new:
 3274|      9|              "Returns a new buffer of length 0.") {
 3275|      9|    janet_fixarity(argc, 1);
 3276|      9|    int32_t cap = janet_getinteger(argv, 0);
 3277|      9|    JanetBuffer *buffer = janet_buffer(cap);
 3278|      9|    return janet_wrap_buffer(buffer);
  ------------------
  |  |  842|      9|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  820|      9|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      9|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      9|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3279|      9|}
cfun_buffer_new_filled:
 3284|     20|              "Returns the new buffer.") {
 3285|     20|    janet_arity(argc, 1, 2);
 3286|     20|    int32_t count = janet_getinteger(argv, 0);
 3287|     20|    if (count < 0) count = 0;
  ------------------
  |  Branch (3287:9): [True: 2, False: 18]
  ------------------
 3288|     20|    int32_t byte = 0;
 3289|     20|    if (argc == 2) {
  ------------------
  |  Branch (3289:9): [True: 4, False: 16]
  ------------------
 3290|      4|        byte = janet_getinteger(argv, 1) & 0xFF;
 3291|      4|    }
 3292|     20|    JanetBuffer *buffer = janet_buffer(count);
 3293|     20|    if (buffer->data && count > 0)
  ------------------
  |  Branch (3293:9): [True: 12, False: 8]
  |  Branch (3293:25): [True: 11, False: 1]
  ------------------
 3294|     11|        memset(buffer->data, byte, count);
 3295|     20|    buffer->count = count;
 3296|     20|    return janet_wrap_buffer(buffer);
  ------------------
  |  |  842|     20|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  820|     20|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     20|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     20|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3297|     20|}
cfun_buffer_frombytes:
 3302|      1|              "will be coerced to the range of 1 byte 0-255.") {
 3303|      1|    int32_t i;
 3304|      1|    JanetBuffer *buffer = janet_buffer(argc);
 3305|      2|    for (i = 0; i < argc; i++) {
  ------------------
  |  Branch (3305:17): [True: 1, False: 1]
  ------------------
 3306|      1|        int32_t c = janet_getinteger(argv, i);
 3307|      1|        buffer->data[i] = c & 0xFF;
 3308|      1|    }
 3309|      1|    buffer->count = argc;
 3310|      1|    return janet_wrap_buffer(buffer);
  ------------------
  |  |  842|      1|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  820|      1|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3311|      1|}
cfun_buffer_fill:
 3316|      2|              "Returns the modified buffer.") {
 3317|      2|    janet_arity(argc, 1, 2);
 3318|      2|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3319|      2|    int32_t byte = 0;
 3320|      2|    if (argc == 2) {
  ------------------
  |  Branch (3320:9): [True: 0, False: 2]
  ------------------
 3321|      0|        byte = janet_getinteger(argv, 1) & 0xFF;
 3322|      0|    }
 3323|      2|    if (buffer->count) {
  ------------------
  |  Branch (3323:9): [True: 0, False: 2]
  ------------------
 3324|      0|        memset(buffer->data, byte, buffer->count);
 3325|      0|    }
 3326|      2|    return argv[0];
 3327|      2|}
cfun_buffer_word:
 3365|      3|              "Expands the buffer as necessary. Throws an error if size limit is exceeded.") {
 3366|      3|    int32_t i;
 3367|      3|    janet_arity(argc, 1, -1);
 3368|      3|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3369|      3|    for (i = 1; i < argc; i++) {
  ------------------
  |  Branch (3369:17): [True: 0, False: 3]
  ------------------
 3370|      0|        double number = janet_getnumber(argv, i);
 3371|      0|        uint32_t word = (uint32_t) number;
 3372|      0|        if (word != number)
  ------------------
  |  Branch (3372:13): [True: 0, False: 0]
  ------------------
 3373|      0|            janet_panicf("cannot convert %v to machine word", argv[i]);
 3374|      0|        janet_buffer_push_u32(buffer, word);
 3375|      0|    }
 3376|      3|    return argv[0];
 3377|      3|}
cfun_buffer_chars:
 3384|    547|              "Expands the buffer as necessary. Throws an error if size limit is exceeded.") {
 3385|    547|    int32_t i;
 3386|    547|    janet_arity(argc, 1, -1);
 3387|    547|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3388|  1.09k|    for (i = 1; i < argc; i++) {
  ------------------
  |  Branch (3388:17): [True: 547, False: 547]
  ------------------
 3389|    547|        JanetByteView view = janet_getbytes(argv, i);
 3390|    547|        if (view.bytes == buffer->data) {
  ------------------
  |  Branch (3390:13): [True: 0, False: 547]
  ------------------
 3391|      0|            janet_buffer_ensure(buffer, buffer->count + view.len, 2);
 3392|      0|            view.bytes = buffer->data;
 3393|      0|        }
 3394|    547|        janet_buffer_push_bytes(buffer, view.bytes, view.len);
 3395|    547|    }
 3396|    547|    return argv[0];
 3397|    547|}
cfun_buffer_push_uint16:
 3447|      2|              "Expands the buffer as necessary. Throws an error if size limit is exceeded.") {
 3448|      2|    janet_fixarity(argc, 3);
 3449|      2|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3450|      2|    int reverse = should_reverse_bytes(argv, 1);
 3451|      2|    uint16_t data = janet_getuinteger16(argv, 2);
 3452|      2|    uint8_t bytes[sizeof(data)];
 3453|      2|    memcpy(bytes, &data, sizeof(bytes));
 3454|      2|    if (reverse) {
  ------------------
  |  Branch (3454:9): [True: 0, False: 2]
  ------------------
 3455|      0|        uint8_t temp = bytes[1];
 3456|      0|        bytes[1] = bytes[0];
 3457|      0|        bytes[0] = temp;
 3458|      0|    }
 3459|      2|    janet_buffer_push_bytes(buffer, bytes, sizeof(bytes));
 3460|      2|    return argv[0];
 3461|      2|}
cfun_buffer_push_uint32:
 3467|      3|              "Expands the buffer as necessary. Throws an error if size limit is exceeded.") {
 3468|      3|    janet_fixarity(argc, 3);
 3469|      3|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3470|      3|    int reverse = should_reverse_bytes(argv, 1);
 3471|      3|    uint32_t data = janet_getuinteger(argv, 2);
 3472|      3|    uint8_t bytes[sizeof(data)];
 3473|      3|    memcpy(bytes, &data, sizeof(bytes));
 3474|      3|    if (reverse)
  ------------------
  |  Branch (3474:9): [True: 0, False: 3]
  ------------------
 3475|      0|        reverse_u32(bytes);
 3476|      3|    janet_buffer_push_bytes(buffer, bytes, sizeof(bytes));
 3477|      3|    return argv[0];
 3478|      3|}
cfun_buffer_push_float32:
 3501|      1|              "Expands the buffer as necessary. Throws an error if size limit is exceeded.") {
 3502|      1|    janet_fixarity(argc, 3);
 3503|      1|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3504|      1|    int reverse = should_reverse_bytes(argv, 1);
 3505|      1|    float data = (float) janet_getnumber(argv, 2);
 3506|      1|    uint8_t bytes[sizeof(data)];
 3507|      1|    memcpy(bytes, &data, sizeof(bytes));
 3508|      1|    if (reverse)
  ------------------
  |  Branch (3508:9): [True: 0, False: 1]
  ------------------
 3509|      0|        reverse_u32(bytes);
 3510|      1|    janet_buffer_push_bytes(buffer, bytes, sizeof(bytes));
 3511|      1|    return argv[0];
 3512|      1|}
cfun_buffer_push_float64:
 3518|      2|              "Expands the buffer as necessary. Throws an error if size limit is exceeded.") {
 3519|      2|    janet_fixarity(argc, 3);
 3520|      2|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3521|      2|    int reverse = should_reverse_bytes(argv, 1);
 3522|      2|    double data = janet_getnumber(argv, 2);
 3523|      2|    uint8_t bytes[sizeof(data)];
 3524|      2|    memcpy(bytes, &data, sizeof(bytes));
 3525|      2|    if (reverse)
  ------------------
  |  Branch (3525:9): [True: 0, False: 2]
  ------------------
 3526|      0|        reverse_u64(bytes);
 3527|      2|    janet_buffer_push_bytes(buffer, bytes, sizeof(bytes));
 3528|      2|    return argv[0];
 3529|      2|}
cfun_buffer_push:
 3571|  61.8k|              "Expands the buffer as necessary. Throws an error if size limit is exceeded.") {
 3572|  61.8k|    janet_arity(argc, 1, -1);
 3573|  61.8k|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3574|  61.8k|    buffer_push_impl(buffer, argv, 1, argc);
 3575|  61.8k|    return argv[0];
 3576|  61.8k|}
cfun_buffer_clear:
 3581|   107k|              "its memory so it can be efficiently refilled. Returns the modified buffer.") {
 3582|   107k|    janet_fixarity(argc, 1);
 3583|   107k|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3584|   107k|    buffer->count = 0;
 3585|   107k|    return argv[0];
 3586|   107k|}
cfun_buffer_popn:
 3590|      1|              "Removes the last `n` bytes from the buffer. Returns the modified buffer.") {
 3591|      1|    janet_fixarity(argc, 2);
 3592|      1|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3593|      1|    int32_t n = janet_getinteger(argv, 1);
 3594|      1|    if (n < 0) janet_panic("n must be non-negative");
  ------------------
  |  Branch (3594:9): [True: 0, False: 1]
  ------------------
 3595|      1|    if (buffer->count < n) {
  ------------------
  |  Branch (3595:9): [True: 0, False: 1]
  ------------------
 3596|      0|        buffer->count = 0;
 3597|      1|    } else {
 3598|      1|        buffer->count -= n;
 3599|      1|    }
 3600|      1|    return argv[0];
 3601|      1|}
cfun_buffer_bitclear:
 3645|      1|              "Clears the bit at the given bit-index. Returns the buffer.") {
 3646|      1|    int bit;
 3647|      1|    int32_t index;
 3648|      1|    JanetBuffer *buffer;
 3649|      1|    bitloc(argc, argv, &buffer, &index, &bit);
 3650|      1|    buffer->data[index] &= ~(1 << bit);
 3651|      1|    return argv[0];
 3652|      1|}
cfun_buffer_bittoggle:
 3666|      8|              "Toggles the bit at the given bit index in buffer. Returns the buffer.") {
 3667|      8|    int bit;
 3668|      8|    int32_t index;
 3669|      8|    JanetBuffer *buffer;
 3670|      8|    bitloc(argc, argv, &buffer, &index, &bit);
 3671|      8|    buffer->data[index] ^= (1 << bit);
 3672|      8|    return argv[0];
 3673|      8|}
cfun_buffer_format:
 3721|    547|              "the modified buffer.") {
 3722|    547|    janet_arity(argc, 2, -1);
 3723|    547|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3724|    547|    const char *strfrmt = (const char *) janet_getstring(argv, 1);
 3725|    547|    janet_buffer_format(buffer, strfrmt, 1, argc, argv);
 3726|    547|    return argv[0];
 3727|    547|}
cfun_buffer_format_at:
 3732|      2|              "the modified buffer.") {
 3733|      2|    janet_arity(argc, 2, -1);
 3734|      2|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3735|      2|    int32_t at = janet_getinteger(argv, 1);
 3736|      2|    if (at < 0) {
  ------------------
  |  Branch (3736:9): [True: 0, False: 2]
  ------------------
 3737|      0|        at += buffer->count + 1;
 3738|      0|    }
 3739|      2|    if (at > buffer->count || at < 0) janet_panicf("expected index at to be in range [0, %d), got %d", buffer->count, at);
  ------------------
  |  Branch (3739:9): [True: 2, False: 0]
  |  Branch (3739:31): [True: 0, False: 0]
  ------------------
 3740|      2|    int32_t oldcount = buffer->count;
 3741|      2|    buffer->count = at;
 3742|      2|    const char *strfrmt = (const char *) janet_getstring(argv, 2);
 3743|      2|    janet_buffer_format(buffer, strfrmt, 2, argc, argv);
 3744|      2|    if (buffer->count < oldcount) {
  ------------------
  |  Branch (3744:9): [True: 0, False: 2]
  ------------------
 3745|      0|        buffer->count = oldcount;
 3746|      0|    }
 3747|      2|    return argv[0];
 3748|      2|}
janet_lib_buffer:
 3750|  7.16k|void janet_lib_buffer(JanetTable *env) {
 3751|  7.16k|    JanetRegExt buffer_cfuns[] = {
 3752|  7.16k|        JANET_CORE_REG("buffer/new", cfun_buffer_new),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3753|  7.16k|        JANET_CORE_REG("buffer/new-filled", cfun_buffer_new_filled),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3754|  7.16k|        JANET_CORE_REG("buffer/from-bytes", cfun_buffer_frombytes),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3755|  7.16k|        JANET_CORE_REG("buffer/fill", cfun_buffer_fill),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3756|  7.16k|        JANET_CORE_REG("buffer/trim", cfun_buffer_trim),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3757|  7.16k|        JANET_CORE_REG("buffer/push-byte", cfun_buffer_u8),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3758|  7.16k|        JANET_CORE_REG("buffer/push-word", cfun_buffer_word),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3759|  7.16k|        JANET_CORE_REG("buffer/push-string", cfun_buffer_chars),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3760|  7.16k|        JANET_CORE_REG("buffer/push-uint16", cfun_buffer_push_uint16),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3761|  7.16k|        JANET_CORE_REG("buffer/push-uint32", cfun_buffer_push_uint32),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3762|  7.16k|        JANET_CORE_REG("buffer/push-uint64", cfun_buffer_push_uint64),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3763|  7.16k|        JANET_CORE_REG("buffer/push-float32", cfun_buffer_push_float32),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3764|  7.16k|        JANET_CORE_REG("buffer/push-float64", cfun_buffer_push_float64),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3765|  7.16k|        JANET_CORE_REG("buffer/push", cfun_buffer_push),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3766|  7.16k|        JANET_CORE_REG("buffer/push-at", cfun_buffer_push_at),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3767|  7.16k|        JANET_CORE_REG("buffer/popn", cfun_buffer_popn),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3768|  7.16k|        JANET_CORE_REG("buffer/clear", cfun_buffer_clear),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3769|  7.16k|        JANET_CORE_REG("buffer/slice", cfun_buffer_slice),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3770|  7.16k|        JANET_CORE_REG("buffer/bit-set", cfun_buffer_bitset),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3771|  7.16k|        JANET_CORE_REG("buffer/bit-clear", cfun_buffer_bitclear),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3772|  7.16k|        JANET_CORE_REG("buffer/bit", cfun_buffer_bitget),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3773|  7.16k|        JANET_CORE_REG("buffer/bit-toggle", cfun_buffer_bittoggle),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3774|  7.16k|        JANET_CORE_REG("buffer/blit", cfun_buffer_blit),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3775|  7.16k|        JANET_CORE_REG("buffer/format", cfun_buffer_format),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3776|  7.16k|        JANET_CORE_REG("buffer/format-at", cfun_buffer_format_at),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 3777|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 3778|  7.16k|    };
 3779|       |    janet_core_cfuns_ext(env, NULL, buffer_cfuns);
 3780|  7.16k|}
janet_bytecode_remove_noops:
 3899|   702k|void janet_bytecode_remove_noops(JanetFuncDef *def) {
 3900|       |
 3901|       |    /* Get an instruction rewrite map so we can rewrite jumps */
 3902|   702k|    uint32_t *pc_map = janet_smalloc(sizeof(uint32_t) * (1 + def->bytecode_length));
 3903|   702k|    uint32_t new_bytecode_length = 0;
 3904|  10.5M|    for (int32_t i = 0; i < def->bytecode_length; i++) {
  ------------------
  |  Branch (3904:25): [True: 9.81M, False: 702k]
  ------------------
 3905|  9.81M|        uint32_t instr = def->bytecode[i];
 3906|  9.81M|        uint32_t opcode = instr & 0x7F;
 3907|  9.81M|        pc_map[i] = new_bytecode_length;
 3908|  9.81M|        if (opcode != JOP_NOOP) {
  ------------------
  |  Branch (3908:13): [True: 9.19M, False: 620k]
  ------------------
 3909|  9.19M|            new_bytecode_length++;
 3910|  9.19M|        }
 3911|  9.81M|    }
 3912|   702k|    pc_map[def->bytecode_length] = new_bytecode_length;
 3913|       |
 3914|       |    /* Linear scan rewrite bytecode and sourcemap. Also fix jumps. */
 3915|   702k|    int32_t j = 0;
 3916|  10.5M|    for (int32_t i = 0; i < def->bytecode_length; i++) {
  ------------------
  |  Branch (3916:25): [True: 9.81M, False: 702k]
  ------------------
 3917|  9.81M|        uint32_t instr = def->bytecode[i];
 3918|  9.81M|        uint32_t opcode = instr & 0x7F;
 3919|  9.81M|        int32_t old_jump_target = 0;
 3920|  9.81M|        int32_t new_jump_target = 0;
 3921|  9.81M|        switch (opcode) {
 3922|   620k|            case JOP_NOOP:
  ------------------
  |  Branch (3922:13): [True: 620k, False: 9.19M]
  ------------------
 3923|   620k|                continue;
 3924|    520|            case JOP_JUMP:
  ------------------
  |  Branch (3924:13): [True: 520, False: 9.81M]
  ------------------
 3925|       |                /* relative pc is in DS field of instruction */
 3926|    520|                old_jump_target = i + (((int32_t)instr) >> 8);
 3927|    520|                janet_assert(old_jump_target >= 0, "bounds");
  ------------------
  |  |  386|    520|#define janet_assert(c, m) do { \
  |  |  387|    520|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 520]
  |  |  ------------------
  |  |  388|    520|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 520]
  |  |  ------------------
  ------------------
 3928|    520|                janet_assert(old_jump_target < def->bytecode_length, "bounds");
  ------------------
  |  |  386|    520|#define janet_assert(c, m) do { \
  |  |  387|    520|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 520]
  |  |  ------------------
  |  |  388|    520|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 520]
  |  |  ------------------
  ------------------
 3929|    520|                new_jump_target = pc_map[old_jump_target];
 3930|    520|                instr += (uint32_t)(new_jump_target - old_jump_target + (i - j)) << 8;
 3931|    520|                break;
 3932|    220|            case JOP_JUMP_IF:
  ------------------
  |  Branch (3932:13): [True: 220, False: 9.81M]
  ------------------
 3933|    464|            case JOP_JUMP_IF_NIL:
  ------------------
  |  Branch (3933:13): [True: 244, False: 9.81M]
  ------------------
 3934|  23.8k|            case JOP_JUMP_IF_NOT:
  ------------------
  |  Branch (3934:13): [True: 23.4k, False: 9.79M]
  ------------------
 3935|  24.6k|            case JOP_JUMP_IF_NOT_NIL:
  ------------------
  |  Branch (3935:13): [True: 774, False: 9.81M]
  ------------------
 3936|       |                /* relative pc is in ES field of instruction */
 3937|  24.6k|                old_jump_target = i + (((int32_t)instr) >> 16);
 3938|  24.6k|                janet_assert(old_jump_target >= 0, "bounds");
  ------------------
  |  |  386|  24.6k|#define janet_assert(c, m) do { \
  |  |  387|  24.6k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 24.6k]
  |  |  ------------------
  |  |  388|  24.6k|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 24.6k]
  |  |  ------------------
  ------------------
 3939|  24.6k|                janet_assert(old_jump_target < def->bytecode_length, "bounds");
  ------------------
  |  |  386|  24.6k|#define janet_assert(c, m) do { \
  |  |  387|  24.6k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 24.6k]
  |  |  ------------------
  |  |  388|  24.6k|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 24.6k]
  |  |  ------------------
  ------------------
 3940|  24.6k|                new_jump_target = pc_map[old_jump_target];
 3941|  24.6k|                instr += (uint32_t)(new_jump_target - old_jump_target + (i - j)) << 16;
 3942|  24.6k|                break;
 3943|  9.17M|            default:
  ------------------
  |  Branch (3943:13): [True: 9.17M, False: 645k]
  ------------------
 3944|  9.17M|                break;
 3945|  9.81M|        }
 3946|  9.19M|        def->bytecode[j] = instr;
 3947|  9.19M|        if (def->sourcemap != NULL) {
  ------------------
  |  Branch (3947:13): [True: 9.19M, False: 0]
  ------------------
 3948|  9.19M|            def->sourcemap[j] = def->sourcemap[i];
 3949|  9.19M|        }
 3950|  9.19M|        j++;
 3951|  9.19M|    }
 3952|       |
 3953|       |    /* Rewrite symbolmap */
 3954|  21.3M|    for (int32_t i = 0; i < def->symbolmap_length; i++) {
  ------------------
  |  Branch (3954:25): [True: 20.6M, False: 702k]
  ------------------
 3955|  20.6M|        JanetSymbolMap *sm = def->symbolmap + i;
 3956|       |        /* Don't rewrite upvalue mappings */
 3957|  20.6M|        if (sm->birth_pc < UINT32_MAX) {
  ------------------
  |  Branch (3957:13): [True: 5.21M, False: 15.4M]
  ------------------
 3958|  5.21M|            sm->birth_pc = pc_map[sm->birth_pc];
 3959|  5.21M|            sm->death_pc = pc_map[sm->death_pc];
 3960|  5.21M|        }
 3961|  20.6M|    }
 3962|       |
 3963|   702k|    def->bytecode_length = new_bytecode_length;
 3964|   702k|    def->bytecode = janet_realloc(def->bytecode, def->bytecode_length * sizeof(uint32_t));
  ------------------
  |  | 2396|   702k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 3965|   702k|    janet_sfree(pc_map);
 3966|   702k|}
janet_bytecode_movopt:
 3970|   702k|void janet_bytecode_movopt(JanetFuncDef *def) {
 3971|   702k|    JanetcRegisterAllocator ra;
 3972|   702k|    int recur = 1;
 3973|       |
 3974|       |    /* Iterate this until no more instructions can be removed. */
 3975|  1.42M|    while (recur) {
  ------------------
  |  Branch (3975:12): [True: 720k, False: 702k]
  ------------------
 3976|   720k|        janetc_regalloc_init(&ra);
 3977|       |
 3978|       |        /* Look for slots that have writes but no reads (and aren't in the closure bitset). */
 3979|   720k|        if (def->closure_bitset != NULL) {
  ------------------
  |  Branch (3979:13): [True: 8.13k, False: 712k]
  ------------------
 3980|  20.8M|            for (int32_t i = 0; i < def->slotcount; i++) {
  ------------------
  |  Branch (3980:33): [True: 20.8M, False: 8.13k]
  ------------------
 3981|  20.8M|                int32_t index = i >> 5;
 3982|  20.8M|                uint32_t mask = 1U << (((uint32_t) i) & 31);
 3983|  20.8M|                if (def->closure_bitset[index] & mask) {
  ------------------
  |  Branch (3983:21): [True: 23.9k, False: 20.8M]
  ------------------
 3984|  23.9k|                    janetc_regalloc_touch(&ra, i);
 3985|  23.9k|                }
 3986|  20.8M|            }
 3987|  8.13k|        }
 3988|       |
 3989|   720k|#define AA ((instr >> 8)  & 0xFF)
 3990|   720k|#define BB ((instr >> 16) & 0xFF)
 3991|   720k|#define CC (instr >> 24)
 3992|   720k|#define DD (instr >> 8)
 3993|   720k|#define EE (instr >> 16)
 3994|       |
 3995|       |        /* Check reads and writes */
 3996|   139M|        for (int32_t i = 0; i < def->bytecode_length; i++) {
  ------------------
  |  Branch (3996:29): [True: 138M, False: 720k]
  ------------------
 3997|   138M|            uint32_t instr = def->bytecode[i];
 3998|   138M|            switch (instr & 0x7F) {
 3999|       |
 4000|       |                /* Group instructions my how they read from slots */
 4001|       |
 4002|       |                /* No reads or writes */
 4003|      0|                default:
  ------------------
  |  Branch (4003:17): [True: 0, False: 138M]
  ------------------
 4004|      0|                    janet_assert(0, "unhandled instruction");
  ------------------
  |  |  386|      0|#define janet_assert(c, m) do { \
  |  |  387|      0|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, Folded]
  |  |  ------------------
  |  |  388|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4005|  2.86k|                case JOP_JUMP:
  ------------------
  |  Branch (4005:17): [True: 2.86k, False: 138M]
  ------------------
 4006|  14.8M|                case JOP_NOOP:
  ------------------
  |  Branch (4006:17): [True: 14.8M, False: 123M]
  ------------------
 4007|  14.8M|                case JOP_RETURN_NIL:
  ------------------
  |  Branch (4007:17): [True: 18.6k, False: 138M]
  ------------------
 4008|       |                /* Write A */
 4009|  14.9M|                case JOP_LOAD_INTEGER:
  ------------------
  |  Branch (4009:17): [True: 104k, False: 138M]
  ------------------
 4010|  19.7M|                case JOP_LOAD_CONSTANT:
  ------------------
  |  Branch (4010:17): [True: 4.72M, False: 133M]
  ------------------
 4011|  19.7M|                case JOP_LOAD_UPVALUE:
  ------------------
  |  Branch (4011:17): [True: 83.4k, False: 138M]
  ------------------
 4012|  20.4M|                case JOP_CLOSURE:
  ------------------
  |  Branch (4012:17): [True: 637k, False: 137M]
  ------------------
 4013|       |                /* Write D */
 4014|  20.4M|                case JOP_LOAD_NIL:
  ------------------
  |  Branch (4014:17): [True: 22.8k, False: 138M]
  ------------------
 4015|  20.4M|                case JOP_LOAD_TRUE:
  ------------------
  |  Branch (4015:17): [True: 1.42k, False: 138M]
  ------------------
 4016|  20.4M|                case JOP_LOAD_FALSE:
  ------------------
  |  Branch (4016:17): [True: 32, False: 138M]
  ------------------
 4017|  20.4M|                case JOP_LOAD_SELF:
  ------------------
  |  Branch (4017:17): [True: 14.5k, False: 138M]
  ------------------
 4018|  20.4M|                    break;
 4019|    733|                case JOP_MAKE_ARRAY:
  ------------------
  |  Branch (4019:17): [True: 733, False: 138M]
  ------------------
 4020|  1.63k|                case JOP_MAKE_BUFFER:
  ------------------
  |  Branch (4020:17): [True: 905, False: 138M]
  ------------------
 4021|  1.63k|                case JOP_MAKE_STRING:
  ------------------
  |  Branch (4021:17): [True: 0, False: 138M]
  ------------------
 4022|  13.1k|                case JOP_MAKE_STRUCT:
  ------------------
  |  Branch (4022:17): [True: 11.5k, False: 138M]
  ------------------
 4023|  13.3k|                case JOP_MAKE_TABLE:
  ------------------
  |  Branch (4023:17): [True: 176, False: 138M]
  ------------------
 4024|  3.42M|                case JOP_MAKE_TUPLE:
  ------------------
  |  Branch (4024:17): [True: 3.40M, False: 135M]
  ------------------
 4025|  3.48M|                case JOP_MAKE_BRACKET_TUPLE:
  ------------------
  |  Branch (4025:17): [True: 66.7k, False: 138M]
  ------------------
 4026|       |                    /* Reads from the stack, don't remove */
 4027|  3.48M|                    janetc_regalloc_touch(&ra, DD);
  ------------------
  |  | 3992|  3.48M|#define DD (instr >> 8)
  ------------------
 4028|  3.48M|                    break;
 4029|       |
 4030|       |                /* Read A */
 4031|     12|                case JOP_ERROR:
  ------------------
  |  Branch (4031:17): [True: 12, False: 138M]
  ------------------
 4032|     12|                case JOP_TYPECHECK:
  ------------------
  |  Branch (4032:17): [True: 0, False: 138M]
  ------------------
 4033|    232|                case JOP_JUMP_IF:
  ------------------
  |  Branch (4033:17): [True: 220, False: 138M]
  ------------------
 4034|  68.9k|                case JOP_JUMP_IF_NOT:
  ------------------
  |  Branch (4034:17): [True: 68.7k, False: 138M]
  ------------------
 4035|  71.2k|                case JOP_JUMP_IF_NIL:
  ------------------
  |  Branch (4035:17): [True: 2.30k, False: 138M]
  ------------------
 4036|  85.0k|                case JOP_JUMP_IF_NOT_NIL:
  ------------------
  |  Branch (4036:17): [True: 13.8k, False: 138M]
  ------------------
 4037|  98.9k|                case JOP_SET_UPVALUE:
  ------------------
  |  Branch (4037:17): [True: 13.8k, False: 138M]
  ------------------
 4038|       |                /* Write E, Read A */
 4039|  25.0M|                case JOP_MOVE_FAR:
  ------------------
  |  Branch (4039:17): [True: 24.9M, False: 113M]
  ------------------
 4040|  25.0M|                    janetc_regalloc_touch(&ra, AA);
  ------------------
  |  | 3989|  25.0M|#define AA ((instr >> 8)  & 0xFF)
  ------------------
 4041|  25.0M|                    break;
 4042|       |
 4043|       |                /* Read B */
 4044|      3|                case JOP_SIGNAL:
  ------------------
  |  Branch (4044:17): [True: 3, False: 138M]
  ------------------
 4045|       |                /* Write A, Read B */
 4046|    544|                case JOP_ADD_IMMEDIATE:
  ------------------
  |  Branch (4046:17): [True: 541, False: 138M]
  ------------------
 4047|    757|                case JOP_SUBTRACT_IMMEDIATE:
  ------------------
  |  Branch (4047:17): [True: 213, False: 138M]
  ------------------
 4048|    873|                case JOP_MULTIPLY_IMMEDIATE:
  ------------------
  |  Branch (4048:17): [True: 116, False: 138M]
  ------------------
 4049|  1.34k|                case JOP_DIVIDE_IMMEDIATE:
  ------------------
  |  Branch (4049:17): [True: 475, False: 138M]
  ------------------
 4050|  1.34k|                case JOP_SHIFT_LEFT_IMMEDIATE:
  ------------------
  |  Branch (4050:17): [True: 0, False: 138M]
  ------------------
 4051|  1.34k|                case JOP_SHIFT_RIGHT_IMMEDIATE:
  ------------------
  |  Branch (4051:17): [True: 0, False: 138M]
  ------------------
 4052|  1.34k|                case JOP_SHIFT_RIGHT_UNSIGNED_IMMEDIATE:
  ------------------
  |  Branch (4052:17): [True: 0, False: 138M]
  ------------------
 4053|  1.58k|                case JOP_GREATER_THAN_IMMEDIATE:
  ------------------
  |  Branch (4053:17): [True: 236, False: 138M]
  ------------------
 4054|  2.39k|                case JOP_LESS_THAN_IMMEDIATE:
  ------------------
  |  Branch (4054:17): [True: 814, False: 138M]
  ------------------
 4055|  2.74k|                case JOP_EQUALS_IMMEDIATE:
  ------------------
  |  Branch (4055:17): [True: 346, False: 138M]
  ------------------
 4056|  2.74k|                case JOP_NOT_EQUALS_IMMEDIATE:
  ------------------
  |  Branch (4056:17): [True: 0, False: 138M]
  ------------------
 4057|  27.3M|                case JOP_GET_INDEX:
  ------------------
  |  Branch (4057:17): [True: 27.3M, False: 111M]
  ------------------
 4058|  27.3M|                    janetc_regalloc_touch(&ra, BB);
  ------------------
  |  | 3990|  27.3M|#define BB ((instr >> 16) & 0xFF)
  ------------------
 4059|  27.3M|                    break;
 4060|       |
 4061|       |                /* Read D */
 4062|   701k|                case JOP_RETURN:
  ------------------
  |  Branch (4062:17): [True: 701k, False: 137M]
  ------------------
 4063|   777k|                case JOP_PUSH:
  ------------------
  |  Branch (4063:17): [True: 76.3k, False: 138M]
  ------------------
 4064|   780k|                case JOP_PUSH_ARRAY:
  ------------------
  |  Branch (4064:17): [True: 3.24k, False: 138M]
  ------------------
 4065|   795k|                case JOP_TAILCALL:
  ------------------
  |  Branch (4065:17): [True: 14.9k, False: 138M]
  ------------------
 4066|   795k|                    janetc_regalloc_touch(&ra, DD);
  ------------------
  |  | 3992|   795k|#define DD (instr >> 8)
  ------------------
 4067|   795k|                    break;
 4068|       |
 4069|       |                /* Write A, Read E */
 4070|  57.5M|                case JOP_MOVE_NEAR:
  ------------------
  |  Branch (4070:17): [True: 57.5M, False: 80.9M]
  ------------------
 4071|  57.5M|                case JOP_LENGTH:
  ------------------
  |  Branch (4071:17): [True: 150, False: 138M]
  ------------------
 4072|  57.5M|                case JOP_BNOT:
  ------------------
  |  Branch (4072:17): [True: 0, False: 138M]
  ------------------
 4073|  57.5M|                case JOP_CALL:
  ------------------
  |  Branch (4073:17): [True: 27.0k, False: 138M]
  ------------------
 4074|  57.5M|                    janetc_regalloc_touch(&ra, EE);
  ------------------
  |  | 3993|  57.5M|#define EE (instr >> 16)
  ------------------
 4075|  57.5M|                    break;
 4076|       |
 4077|       |                /* Read A, B */
 4078|  1.72k|                case JOP_PUT_INDEX:
  ------------------
  |  Branch (4078:17): [True: 1.72k, False: 138M]
  ------------------
 4079|  1.72k|                    janetc_regalloc_touch(&ra, AA);
  ------------------
  |  | 3989|  1.72k|#define AA ((instr >> 8)  & 0xFF)
  ------------------
 4080|  1.72k|                    janetc_regalloc_touch(&ra, BB);
  ------------------
  |  | 3990|  1.72k|#define BB ((instr >> 16) & 0xFF)
  ------------------
 4081|  1.72k|                    break;
 4082|       |
 4083|       |                /* Read A, E */
 4084|  3.35M|                case JOP_PUSH_2:
  ------------------
  |  Branch (4084:17): [True: 3.35M, False: 135M]
  ------------------
 4085|  3.35M|                    janetc_regalloc_touch(&ra, AA);
  ------------------
  |  | 3989|  3.35M|#define AA ((instr >> 8)  & 0xFF)
  ------------------
 4086|  3.35M|                    janetc_regalloc_touch(&ra, EE);
  ------------------
  |  | 3993|  3.35M|#define EE (instr >> 16)
  ------------------
 4087|  3.35M|                    break;
 4088|       |
 4089|       |                /* Read B, C */
 4090|    119|                case JOP_PROPAGATE:
  ------------------
  |  Branch (4090:17): [True: 119, False: 138M]
  ------------------
 4091|       |                /* Write A, Read B and C */
 4092|    119|                case JOP_BAND:
  ------------------
  |  Branch (4092:17): [True: 0, False: 138M]
  ------------------
 4093|    541|                case JOP_BOR:
  ------------------
  |  Branch (4093:17): [True: 422, False: 138M]
  ------------------
 4094|    541|                case JOP_BXOR:
  ------------------
  |  Branch (4094:17): [True: 0, False: 138M]
  ------------------
 4095|  3.96k|                case JOP_ADD:
  ------------------
  |  Branch (4095:17): [True: 3.42k, False: 138M]
  ------------------
 4096|  5.02k|                case JOP_SUBTRACT:
  ------------------
  |  Branch (4096:17): [True: 1.05k, False: 138M]
  ------------------
 4097|  5.94k|                case JOP_MULTIPLY:
  ------------------
  |  Branch (4097:17): [True: 917, False: 138M]
  ------------------
 4098|  6.95k|                case JOP_DIVIDE:
  ------------------
  |  Branch (4098:17): [True: 1.01k, False: 138M]
  ------------------
 4099|  6.95k|                case JOP_DIVIDE_FLOOR:
  ------------------
  |  Branch (4099:17): [True: 0, False: 138M]
  ------------------
 4100|  7.17k|                case JOP_MODULO:
  ------------------
  |  Branch (4100:17): [True: 219, False: 138M]
  ------------------
 4101|  9.69k|                case JOP_REMAINDER:
  ------------------
  |  Branch (4101:17): [True: 2.51k, False: 138M]
  ------------------
 4102|  9.69k|                case JOP_SHIFT_LEFT:
  ------------------
  |  Branch (4102:17): [True: 0, False: 138M]
  ------------------
 4103|  9.69k|                case JOP_SHIFT_RIGHT:
  ------------------
  |  Branch (4103:17): [True: 0, False: 138M]
  ------------------
 4104|  9.69k|                case JOP_SHIFT_RIGHT_UNSIGNED:
  ------------------
  |  Branch (4104:17): [True: 0, False: 138M]
  ------------------
 4105|  10.3k|                case JOP_GREATER_THAN:
  ------------------
  |  Branch (4105:17): [True: 687, False: 138M]
  ------------------
 4106|  26.5k|                case JOP_LESS_THAN:
  ------------------
  |  Branch (4106:17): [True: 16.1k, False: 138M]
  ------------------
 4107|  30.7k|                case JOP_EQUALS:
  ------------------
  |  Branch (4107:17): [True: 4.25k, False: 138M]
  ------------------
 4108|  30.7k|                case JOP_COMPARE:
  ------------------
  |  Branch (4108:17): [True: 1, False: 138M]
  ------------------
 4109|   134k|                case JOP_IN:
  ------------------
  |  Branch (4109:17): [True: 104k, False: 138M]
  ------------------
 4110|   135k|                case JOP_GET:
  ------------------
  |  Branch (4110:17): [True: 176, False: 138M]
  ------------------
 4111|   135k|                case JOP_GREATER_THAN_EQUAL:
  ------------------
  |  Branch (4111:17): [True: 842, False: 138M]
  ------------------
 4112|   184k|                case JOP_LESS_THAN_EQUAL:
  ------------------
  |  Branch (4112:17): [True: 48.0k, False: 138M]
  ------------------
 4113|   184k|                case JOP_NOT_EQUALS:
  ------------------
  |  Branch (4113:17): [True: 1, False: 138M]
  ------------------
 4114|   184k|                case JOP_CANCEL:
  ------------------
  |  Branch (4114:17): [True: 0, False: 138M]
  ------------------
 4115|   184k|                case JOP_RESUME:
  ------------------
  |  Branch (4115:17): [True: 120, False: 138M]
  ------------------
 4116|   208k|                case JOP_NEXT:
  ------------------
  |  Branch (4116:17): [True: 23.8k, False: 138M]
  ------------------
 4117|   208k|                    janetc_regalloc_touch(&ra, BB);
  ------------------
  |  | 3990|   208k|#define BB ((instr >> 16) & 0xFF)
  ------------------
 4118|   208k|                    janetc_regalloc_touch(&ra, CC);
  ------------------
  |  | 3991|   208k|#define CC (instr >> 24)
  ------------------
 4119|   208k|                    break;
 4120|       |
 4121|       |                /* Read A, B, C */
 4122|    284|                case JOP_PUT:
  ------------------
  |  Branch (4122:17): [True: 284, False: 138M]
  ------------------
 4123|   223k|                case JOP_PUSH_3:
  ------------------
  |  Branch (4123:17): [True: 223k, False: 138M]
  ------------------
 4124|   223k|                    janetc_regalloc_touch(&ra, AA);
  ------------------
  |  | 3989|   223k|#define AA ((instr >> 8)  & 0xFF)
  ------------------
 4125|   223k|                    janetc_regalloc_touch(&ra, BB);
  ------------------
  |  | 3990|   223k|#define BB ((instr >> 16) & 0xFF)
  ------------------
 4126|   223k|                    janetc_regalloc_touch(&ra, CC);
  ------------------
  |  | 3991|   223k|#define CC (instr >> 24)
  ------------------
 4127|   223k|                    break;
 4128|   138M|            }
 4129|   138M|        }
 4130|       |
 4131|       |        /* Iterate and set noops on instructions that make writes that no one ever reads.
 4132|       |         * Only set noops for instructions with no side effects - moves, loads, etc. that can't
 4133|       |         * raise errors (outside of systemic errors like oom or stack overflow). */
 4134|   720k|        recur = 0;
 4135|   139M|        for (int32_t i = 0; i < def->bytecode_length; i++) {
  ------------------
  |  Branch (4135:29): [True: 138M, False: 720k]
  ------------------
 4136|   138M|            uint32_t instr = def->bytecode[i];
 4137|   138M|            switch (instr & 0x7F) {
 4138|  19.6M|                default:
  ------------------
  |  Branch (4138:17): [True: 19.6M, False: 118M]
  ------------------
 4139|  19.6M|                    break;
 4140|       |                /* Write D */
 4141|  19.6M|                case JOP_LOAD_NIL:
  ------------------
  |  Branch (4141:17): [True: 22.8k, False: 138M]
  ------------------
 4142|  24.3k|                case JOP_LOAD_TRUE:
  ------------------
  |  Branch (4142:17): [True: 1.42k, False: 138M]
  ------------------
 4143|  24.3k|                case JOP_LOAD_FALSE:
  ------------------
  |  Branch (4143:17): [True: 32, False: 138M]
  ------------------
 4144|  38.8k|                case JOP_LOAD_SELF:
  ------------------
  |  Branch (4144:17): [True: 14.5k, False: 138M]
  ------------------
 4145|  39.6k|                case JOP_MAKE_ARRAY:
  ------------------
  |  Branch (4145:17): [True: 733, False: 138M]
  ------------------
 4146|  3.44M|                case JOP_MAKE_TUPLE:
  ------------------
  |  Branch (4146:17): [True: 3.40M, False: 135M]
  ------------------
 4147|  3.51M|                case JOP_MAKE_BRACKET_TUPLE: {
  ------------------
  |  Branch (4147:17): [True: 66.7k, False: 138M]
  ------------------
 4148|  3.51M|                    if (!janetc_regalloc_check(&ra, DD)) {
  ------------------
  |  | 3992|  3.51M|#define DD (instr >> 8)
  ------------------
  |  Branch (4148:25): [True: 347, False: 3.51M]
  ------------------
 4149|    347|                        def->bytecode[i] = JOP_NOOP;
 4150|    347|                        recur = 1;
 4151|    347|                    }
 4152|  3.51M|                }
 4153|  3.51M|                break;
 4154|       |                /* Write E, Read A */
 4155|  24.9M|                case JOP_MOVE_FAR: {
  ------------------
  |  Branch (4155:17): [True: 24.9M, False: 113M]
  ------------------
 4156|  24.9M|                    if (!janetc_regalloc_check(&ra, EE)) {
  ------------------
  |  | 3993|  24.9M|#define EE (instr >> 16)
  ------------------
  |  Branch (4156:25): [True: 409k, False: 24.5M]
  ------------------
 4157|   409k|                        def->bytecode[i] = JOP_NOOP;
 4158|   409k|                        recur = 1;
 4159|   409k|                    }
 4160|  24.9M|                }
 4161|  24.9M|                break;
 4162|       |                /* Write A, Read E */
 4163|  57.5M|                case JOP_MOVE_NEAR:
  ------------------
  |  Branch (4163:17): [True: 57.5M, False: 80.9M]
  ------------------
 4164|       |                /* Write A, Read B */
 4165|  84.8M|                case JOP_GET_INDEX:
  ------------------
  |  Branch (4165:17): [True: 27.3M, False: 111M]
  ------------------
 4166|       |                /* Write A */
 4167|  84.9M|                case JOP_LOAD_INTEGER:
  ------------------
  |  Branch (4167:17): [True: 104k, False: 138M]
  ------------------
 4168|  89.6M|                case JOP_LOAD_CONSTANT:
  ------------------
  |  Branch (4168:17): [True: 4.72M, False: 133M]
  ------------------
 4169|  89.7M|                case JOP_LOAD_UPVALUE:
  ------------------
  |  Branch (4169:17): [True: 83.4k, False: 138M]
  ------------------
 4170|  90.3M|                case JOP_CLOSURE: {
  ------------------
  |  Branch (4170:17): [True: 637k, False: 137M]
  ------------------
 4171|  90.3M|                    if (!janetc_regalloc_check(&ra, AA)) {
  ------------------
  |  | 3989|  90.3M|#define AA ((instr >> 8)  & 0xFF)
  ------------------
  |  Branch (4171:25): [True: 210k, False: 90.1M]
  ------------------
 4172|   210k|                        def->bytecode[i] = JOP_NOOP;
 4173|   210k|                        recur = 1;
 4174|   210k|                    }
 4175|  90.3M|                }
 4176|  90.3M|                break;
 4177|   138M|            }
 4178|   138M|        }
 4179|       |
 4180|   720k|        janetc_regalloc_deinit(&ra);
 4181|   720k|#undef AA
 4182|   720k|#undef BB
 4183|   720k|#undef CC
 4184|   720k|#undef DD
 4185|   720k|#undef EE
 4186|   720k|    }
 4187|   702k|}
janet_verify:
 4190|  4.12M|int janet_verify(JanetFuncDef *def) {
 4191|  4.12M|    int vargs = !!(def->flags & JANET_FUNCDEF_FLAG_VARARG);
  ------------------
  |  | 1088|  4.12M|#define JANET_FUNCDEF_FLAG_VARARG 0x10000
  ------------------
 4192|  4.12M|    int32_t i;
 4193|  4.12M|    int32_t maxslot = def->arity + vargs;
 4194|  4.12M|    int32_t sc = def->slotcount;
 4195|       |
 4196|  4.12M|    if (def->bytecode_length == 0) return 1;
  ------------------
  |  Branch (4196:9): [True: 0, False: 4.12M]
  ------------------
 4197|       |
 4198|  4.12M|    if (maxslot > sc) return 2;
  ------------------
  |  Branch (4198:9): [True: 0, False: 4.12M]
  ------------------
 4199|       |
 4200|       |    /* Verify each instruction */
 4201|   116M|    for (i = 0; i < def->bytecode_length; i++) {
  ------------------
  |  Branch (4201:17): [True: 112M, False: 4.20M]
  ------------------
 4202|   112M|        uint32_t instr = def->bytecode[i];
 4203|       |        /* Check for invalid instructions */
 4204|   112M|        if ((instr & 0x7F) >= JOP_INSTRUCTION_COUNT) {
  ------------------
  |  Branch (4204:13): [True: 0, False: 112M]
  ------------------
 4205|      0|            return 3;
 4206|      0|        }
 4207|   112M|        enum JanetInstructionType type = janet_instructions[instr & 0x7F];
 4208|   112M|        switch (type) {
  ------------------
  |  Branch (4208:17): [True: 112M, False: 18.4E]
  ------------------
 4209|   660k|            case JINT_0:
  ------------------
  |  Branch (4209:13): [True: 660k, False: 111M]
  ------------------
 4210|   660k|                continue;
 4211|  21.6M|            case JINT_S: {
  ------------------
  |  Branch (4211:13): [True: 21.6M, False: 90.9M]
  ------------------
 4212|  21.6M|                if ((int32_t)(instr >> 8) >= sc) return 4;
  ------------------
  |  Branch (4212:21): [True: 0, False: 21.6M]
  ------------------
 4213|  21.6M|                continue;
 4214|  21.6M|            }
 4215|  21.6M|            case JINT_SI:
  ------------------
  |  Branch (4215:13): [True: 2.52M, False: 110M]
  ------------------
 4216|  2.52M|            case JINT_SU:
  ------------------
  |  Branch (4216:13): [True: 0, False: 112M]
  ------------------
 4217|  2.52M|            case JINT_ST: {
  ------------------
  |  Branch (4217:13): [True: 0, False: 112M]
  ------------------
 4218|  2.52M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (4218:21): [True: 0, False: 2.52M]
  ------------------
 4219|  2.52M|                continue;
 4220|  2.52M|            }
 4221|  5.12M|            case JINT_L: {
  ------------------
  |  Branch (4221:13): [True: 5.12M, False: 107M]
  ------------------
 4222|  5.12M|                int32_t jumpdest = i + (((int32_t)instr) >> 8);
 4223|  5.13M|                if (jumpdest < 0 || jumpdest >= def->bytecode_length) return 5;
  ------------------
  |  Branch (4223:21): [True: 18.4E, False: 5.13M]
  |  Branch (4223:37): [True: 18.4E, False: 5.13M]
  ------------------
 4224|  5.12M|                continue;
 4225|  5.12M|            }
 4226|  30.6M|            case JINT_SS: {
  ------------------
  |  Branch (4226:13): [True: 30.6M, False: 81.9M]
  ------------------
 4227|  30.6M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc ||
  ------------------
  |  Branch (4227:21): [True: 18.4E, False: 30.6M]
  ------------------
 4228|  30.6M|                        (int32_t)(instr >> 16) >= sc) return 4;
  ------------------
  |  Branch (4228:25): [True: 18.4E, False: 30.6M]
  ------------------
 4229|  30.6M|                continue;
 4230|  30.6M|            }
 4231|  30.6M|            case JINT_SSI:
  ------------------
  |  Branch (4231:13): [True: 1.92M, False: 110M]
  ------------------
 4232|  3.10M|            case JINT_SSU: {
  ------------------
  |  Branch (4232:13): [True: 1.17M, False: 111M]
  ------------------
 4233|  3.10M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc ||
  ------------------
  |  Branch (4233:21): [True: 160, False: 3.09M]
  ------------------
 4234|  3.09M|                        (int32_t)((instr >> 16) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (4234:25): [True: 18.4E, False: 3.09M]
  ------------------
 4235|  3.10M|                continue;
 4236|  3.10M|            }
 4237|  8.08M|            case JINT_SL: {
  ------------------
  |  Branch (4237:13): [True: 8.08M, False: 104M]
  ------------------
 4238|  8.08M|                int32_t jumpdest = i + (((int32_t)instr) >> 16);
 4239|  8.08M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (4239:21): [True: 0, False: 8.08M]
  ------------------
 4240|  8.08M|                if (jumpdest < 0 || jumpdest >= def->bytecode_length) return 5;
  ------------------
  |  Branch (4240:21): [True: 18.4E, False: 8.08M]
  |  Branch (4240:37): [True: 18.4E, False: 8.08M]
  ------------------
 4241|  8.08M|                continue;
 4242|  8.08M|            }
 4243|  14.8M|            case JINT_SSS: {
  ------------------
  |  Branch (4243:13): [True: 14.8M, False: 97.6M]
  ------------------
 4244|  14.8M|                if (((int32_t)(instr >> 8) & 0xFF) >= sc ||
  ------------------
  |  Branch (4244:21): [True: 18.4E, False: 14.8M]
  ------------------
 4245|  14.8M|                        ((int32_t)(instr >> 16) & 0xFF) >= sc ||
  ------------------
  |  Branch (4245:25): [True: 18.4E, False: 14.8M]
  ------------------
 4246|  14.8M|                        ((int32_t)(instr >> 24) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (4246:25): [True: 18.4E, False: 14.8M]
  ------------------
 4247|  14.8M|                continue;
 4248|  14.8M|            }
 4249|  14.8M|            case JINT_SD: {
  ------------------
  |  Branch (4249:13): [True: 1.24M, False: 111M]
  ------------------
 4250|  1.24M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (4250:21): [True: 0, False: 1.24M]
  ------------------
 4251|  1.24M|                if ((int32_t)(instr >> 16) >= def->defs_length) return 6;
  ------------------
  |  Branch (4251:21): [True: 0, False: 1.24M]
  ------------------
 4252|  1.24M|                continue;
 4253|  1.24M|            }
 4254|  20.1M|            case JINT_SC: {
  ------------------
  |  Branch (4254:13): [True: 20.1M, False: 92.4M]
  ------------------
 4255|  20.1M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (4255:21): [True: 0, False: 20.1M]
  ------------------
 4256|  20.1M|                if ((int32_t)(instr >> 16) >= def->constants_length) return 7;
  ------------------
  |  Branch (4256:21): [True: 0, False: 20.1M]
  ------------------
 4257|  20.1M|                continue;
 4258|  20.1M|            }
 4259|  20.1M|            case JINT_SES: {
  ------------------
  |  Branch (4259:13): [True: 4.57M, False: 108M]
  ------------------
 4260|       |                /* How can we check the last slot index? We need info parent funcdefs. Resort
 4261|       |                 * to runtime checks for now. Maybe invalid upvalue references could be defaulted
 4262|       |                 * to nil? (don't commit to this in the long term, though) */
 4263|  4.57M|                if ((int32_t)((instr >> 8) & 0xFF) >= sc) return 4;
  ------------------
  |  Branch (4263:21): [True: 0, False: 4.57M]
  ------------------
 4264|  4.57M|                if ((int32_t)((instr >> 16) & 0xFF) >= def->environments_length) return 8;
  ------------------
  |  Branch (4264:21): [True: 0, False: 4.57M]
  ------------------
 4265|  4.57M|                continue;
 4266|  4.57M|            }
 4267|   112M|        }
 4268|   112M|    }
 4269|       |
 4270|       |    /* Verify last instruction is either a jump, return, return-nil, or tailcall. Eventually,
 4271|       |     * some real flow analysis would be ideal, but this should be very effective. Will completely
 4272|       |     * prevent running over the end of bytecode. However, valid functions with dead code will
 4273|       |     * be rejected. */
 4274|  4.20M|    {
 4275|  4.20M|        uint32_t lastop = def->bytecode[def->bytecode_length - 1] & 0xFF;
 4276|  4.20M|        switch (lastop) {
 4277|      0|            default:
  ------------------
  |  Branch (4277:13): [True: 0, False: 4.20M]
  ------------------
 4278|      0|                return 9;
 4279|  2.45M|            case JOP_RETURN:
  ------------------
  |  Branch (4279:13): [True: 2.45M, False: 1.74M]
  ------------------
 4280|  2.82M|            case JOP_RETURN_NIL:
  ------------------
  |  Branch (4280:13): [True: 367k, False: 3.83M]
  ------------------
 4281|  2.82M|            case JOP_JUMP:
  ------------------
  |  Branch (4281:13): [True: 0, False: 4.20M]
  ------------------
 4282|  2.83M|            case JOP_ERROR:
  ------------------
  |  Branch (4282:13): [True: 7.50k, False: 4.19M]
  ------------------
 4283|  4.12M|            case JOP_TAILCALL:
  ------------------
  |  Branch (4283:13): [True: 1.29M, False: 2.91M]
  ------------------
 4284|  4.12M|                break;
 4285|  4.20M|        }
 4286|  4.20M|    }
 4287|       |
 4288|       |    /* Verify debug info - slotmapping, etc. */
 4289|  45.9M|    for (int32_t i = def->symbolmap_length - 1; i >= 0; i--) {
  ------------------
  |  Branch (4289:49): [True: 41.7M, False: 4.12M]
  ------------------
 4290|  41.7M|        JanetSymbolMap jsm = def->symbolmap[i];
 4291|  41.7M|        if (jsm.birth_pc == UINT32_MAX) {
  ------------------
  |  Branch (4291:13): [True: 19.7M, False: 22.0M]
  ------------------
 4292|  19.7M|            if (jsm.death_pc >= (uint32_t) def->environments_length) {
  ------------------
  |  Branch (4292:17): [True: 0, False: 19.7M]
  ------------------
 4293|      0|                return 10;
 4294|       |                /* We should also check jsm.slot_index */
 4295|      0|            }
 4296|  22.0M|        } else {
 4297|  22.0M|            if (jsm.slot_index >= (uint32_t) def->slotcount) {
  ------------------
  |  Branch (4297:17): [True: 0, False: 22.0M]
  ------------------
 4298|      0|                return 11;
 4299|      0|            }
 4300|  22.0M|            if (jsm.birth_pc != UINT32_MAX && jsm.birth_pc >= (uint32_t) def->bytecode_length) {
  ------------------
  |  Branch (4300:17): [True: 22.0M, False: 18.4E]
  |  Branch (4300:47): [True: 0, False: 22.0M]
  ------------------
 4301|      0|                return 12;
 4302|      0|            }
 4303|  22.0M|            if (jsm.death_pc != UINT32_MAX && jsm.death_pc > (uint32_t) def->bytecode_length) {
  ------------------
  |  Branch (4303:17): [True: 22.0M, False: 18.4E]
  |  Branch (4303:47): [True: 0, False: 22.0M]
  ------------------
 4304|      0|                return 13;
 4305|      0|            }
 4306|  22.0M|        }
 4307|  41.7M|        if (jsm.symbol == NULL) {
  ------------------
  |  Branch (4307:13): [True: 0, False: 41.7M]
  ------------------
 4308|      0|            return 14;
 4309|      0|        }
 4310|  41.7M|    }
 4311|       |
 4312|  4.12M|    return 0;
 4313|  4.12M|}
janet_funcdef_alloc:
 4317|   702k|JanetFuncDef *janet_funcdef_alloc(void) {
 4318|   702k|    JanetFuncDef *def = janet_gcalloc(JANET_MEMORY_FUNCDEF, sizeof(JanetFuncDef));
 4319|   702k|    def->environments = NULL;
 4320|   702k|    def->constants = NULL;
 4321|   702k|    def->bytecode = NULL;
 4322|   702k|    def->closure_bitset = NULL;
 4323|   702k|    def->flags = 0;
 4324|   702k|    def->slotcount = 0;
 4325|   702k|    def->symbolmap = NULL;
 4326|   702k|    def->arity = 0;
 4327|   702k|    def->min_arity = 0;
 4328|   702k|    def->max_arity = INT32_MAX;
 4329|   702k|    def->source = NULL;
 4330|   702k|    def->sourcemap = NULL;
 4331|   702k|    def->name = NULL;
 4332|       |    def->defs = NULL;
 4333|   702k|    def->defs_length = 0;
 4334|   702k|    def->constants_length = 0;
 4335|   702k|    def->bytecode_length = 0;
 4336|   702k|    def->environments_length = 0;
 4337|   702k|    def->symbolmap_length = 0;
 4338|   702k|    def->named_args_count = 0;
 4339|   702k|    return def;
 4340|   702k|}
janet_thunk:
 4343|   235k|JanetFunction *janet_thunk(JanetFuncDef *def) {
 4344|   235k|    JanetFunction *func = janet_gcalloc(JANET_MEMORY_FUNCTION, sizeof(JanetFunction));
 4345|   235k|    func->def = def;
 4346|   235k|    janet_assert(def->environments_length == 0, "tried to create thunk that needs upvalues");
  ------------------
  |  |  386|   235k|#define janet_assert(c, m) do { \
  |  |  387|   235k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 235k]
  |  |  ------------------
  |  |  388|   235k|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 235k]
  |  |  ------------------
  ------------------
 4347|   235k|    return func;
 4348|   235k|}
janet_signalv:
 4423|  3.63k|void janet_signalv(JanetSignal sig, Janet message) {
 4424|  3.63k|    if (janet_vm.return_reg != NULL) {
  ------------------
  |  Branch (4424:9): [True: 3.63k, False: 0]
  ------------------
 4425|       |        /* Should match logic in janet_call for coercing everything not ok to an error (no awaits, yields, etc.) */
 4426|  3.63k|        if (janet_vm.coerce_error && sig != JANET_SIGNAL_OK) {
  ------------------
  |  Branch (4426:13): [True: 72, False: 3.56k]
  |  Branch (4426:38): [True: 72, False: 0]
  ------------------
 4427|     72|#ifdef JANET_EV
 4428|     72|            if (NULL != janet_vm.root_fiber && sig == JANET_SIGNAL_EVENT) {
  ------------------
  |  Branch (4428:17): [True: 72, False: 0]
  |  Branch (4428:48): [True: 0, False: 72]
  ------------------
 4429|      0|                janet_vm.root_fiber->sched_id++;
 4430|      0|            }
 4431|     72|#endif
 4432|     72|            if (sig != JANET_SIGNAL_ERROR) {
  ------------------
  |  Branch (4432:17): [True: 0, False: 72]
  ------------------
 4433|      0|                message = janet_wrap_string(janet_formatc("%v coerced from %s to error", message, janet_signal_names[sig]));
  ------------------
  |  |  843|      0|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4434|      0|            }
 4435|     72|            sig = JANET_SIGNAL_ERROR;
 4436|     72|        }
 4437|  3.63k|        *janet_vm.return_reg = message;
 4438|  3.63k|        if (NULL != janet_vm.fiber) {
  ------------------
  |  Branch (4438:13): [True: 3.63k, False: 0]
  ------------------
 4439|  3.63k|            janet_vm.fiber->flags |= JANET_FIBER_DID_LONGJUMP;
  ------------------
  |  |  786|  3.63k|#define JANET_FIBER_DID_LONGJUMP     0x8000000
  ------------------
 4440|  3.63k|        }
 4441|       |#if defined(JANET_BSD) || defined(JANET_APPLE)
 4442|       |        _longjmp(*janet_vm.signal_buf, sig);
 4443|       |#else
 4444|  3.63k|        longjmp(*janet_vm.signal_buf, sig);
 4445|  3.63k|#endif
 4446|  3.63k|    } else {
 4447|      0|        const char *str = (const char *)janet_formatc("janet top level signal - %v\n", message);
 4448|      0|        janet_top_level_signal(str);
 4449|      0|    }
 4450|  3.63k|}
janet_panicv:
 4452|  2.18k|void janet_panicv(Janet message) {
 4453|  2.18k|    janet_signalv(JANET_SIGNAL_ERROR, message);
 4454|  2.18k|}
janet_panicf:
 4456|  2.07k|void janet_panicf(const char *format, ...) {
 4457|  2.07k|    va_list args;
 4458|  2.07k|    const uint8_t *ret;
 4459|  2.07k|    JanetBuffer buffer;
 4460|  2.07k|    int32_t len = 0;
 4461|  73.0k|    while (format[len]) len++;
  ------------------
  |  Branch (4461:12): [True: 70.9k, False: 2.07k]
  ------------------
 4462|  2.07k|    janet_buffer_init(&buffer, len);
 4463|  2.07k|    va_start(args, format);
 4464|  2.07k|    janet_formatbv(&buffer, format, args);
 4465|       |    va_end(args);
 4466|  2.07k|    ret = janet_string(buffer.data, buffer.count);
 4467|  2.07k|    janet_buffer_deinit(&buffer);
 4468|  2.07k|    janet_panics(ret);
 4469|  2.07k|}
janet_panic:
 4471|     88|void janet_panic(const char *message) {
 4472|     88|    janet_panicv(janet_cstringv(message));
  ------------------
  |  | 1816|     88|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  843|     88|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|     88|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|     88|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|     88|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4473|     88|}
janet_panics:
 4475|  2.07k|void janet_panics(const uint8_t *message) {
 4476|  2.07k|    janet_panicv(janet_wrap_string(message));
  ------------------
  |  |  843|  2.07k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|  2.07k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  2.07k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  2.07k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4477|  2.07k|}
janet_panic_type:
 4479|    235|void janet_panic_type(Janet x, int32_t n, int expected) {
 4480|    235|    janet_panicf("bad slot #%d, expected %T, got %v", n, expected, x);
 4481|    235|}
janet_panic_abstract:
 4483|     59|void janet_panic_abstract(Janet x, int32_t n, const JanetAbstractType *at) {
 4484|     59|    janet_panicf("bad slot #%d, expected %s, got %v", n, at->name, x);
 4485|     59|}
janet_fixarity:
 4487|   179M|void janet_fixarity(int32_t arity, int32_t fix) {
 4488|   179M|    if (arity != fix)
  ------------------
  |  Branch (4488:9): [True: 99, False: 179M]
  ------------------
 4489|     99|        janet_panicf("arity mismatch, expected %d, got %d", fix, arity);
 4490|   179M|}
janet_arity:
 4492|  52.9M|void janet_arity(int32_t arity, int32_t min, int32_t max) {
 4493|  52.9M|    if (min >= 0 && arity < min)
  ------------------
  |  Branch (4493:9): [True: 52.9M, False: 0]
  |  Branch (4493:21): [True: 48, False: 52.9M]
  ------------------
 4494|     48|        janet_panicf("arity mismatch, expected at least %d, got %d", min, arity);
 4495|  52.9M|    if (max >= 0 && arity > max)
  ------------------
  |  Branch (4495:9): [True: 23.3M, False: 29.5M]
  |  Branch (4495:21): [True: 79, False: 23.3M]
  ------------------
 4496|     79|        janet_panicf("arity mismatch, expected at most %d, got %d", max, arity);
 4497|  52.9M|}
janet_getmethod:
 4523|   727k|int janet_getmethod(const uint8_t *method, const JanetMethod *methods, Janet *out) {
 4524|  5.80M|    while (methods->name) {
  ------------------
  |  Branch (4524:12): [True: 5.80M, False: 18]
  ------------------
 4525|  5.80M|        if (!janet_cstrcmp(method, methods->name)) {
  ------------------
  |  Branch (4525:13): [True: 727k, False: 5.07M]
  ------------------
 4526|   727k|            *out = janet_wrap_cfunction(methods->cfun);
  ------------------
  |  |  848|   727k|#define janet_wrap_cfunction(s) janet_nanbox_wrap_((s), JANET_CFUNCTION)
  |  |  ------------------
  |  |  |  |  820|   727k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   727k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   727k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4527|   727k|            return 1;
 4528|   727k|        }
 4529|  5.07M|        methods++;
 4530|  5.07M|    }
 4531|     18|    return 0;
 4532|   727k|}
janet_nextmethod:
 4534|  1.70k|Janet janet_nextmethod(const JanetMethod *methods, Janet key) {
 4535|  1.70k|    if (!janet_checktype(key, JANET_NIL)) {
  ------------------
  |  |  801|  1.70k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 1.70k]
  |  |  ------------------
  |  |  802|  1.70k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  1.70k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  1.70k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  1.70k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.70k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.70k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4535:9): [True: 1.63k, False: 70]
  ------------------
 4536|  20.4k|        while (methods->name) {
  ------------------
  |  Branch (4536:16): [True: 20.4k, False: 0]
  ------------------
 4537|  20.4k|            if (janet_keyeq(key, methods->name)) {
  ------------------
  |  Branch (4537:17): [True: 1.63k, False: 18.7k]
  ------------------
 4538|  1.63k|                methods++;
 4539|  1.63k|                break;
 4540|  1.63k|            }
 4541|  18.7k|            methods++;
 4542|  18.7k|        }
 4543|  1.63k|    }
 4544|  1.70k|    if (methods->name) {
  ------------------
  |  Branch (4544:9): [True: 1.63k, False: 68]
  ------------------
 4545|  1.63k|        return janet_ckeywordv(methods->name);
  ------------------
  |  | 1833|  1.63k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|  1.63k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|  1.63k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  1.63k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  1.63k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4546|  1.63k|    } else {
 4547|     68|        return janet_wrap_nil();
  ------------------
  |  |  826|     68|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|     68|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     68|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     68|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4548|     68|    }
 4549|  1.70k|}
janet_optcstring:
 4582|     45|const char *janet_optcstring(const Janet *argv, int32_t argc, int32_t n, const char *dflt) {
 4583|     45|    if (n >= argc || janet_checktype(argv[n], JANET_NIL)) {
  ------------------
  |  |  801|     26|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 26]
  |  |  |  Branch (801:6): [Folded, False: 26]
  |  |  ------------------
  |  |  802|     26|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|     26|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|     26|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|     26|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     26|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     26|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4583:9): [True: 19, False: 26]
  ------------------
 4584|     19|        return dflt;
 4585|     19|    }
 4586|     26|    return janet_getcstring(argv, n);
 4587|     45|}
janet_getcstring:
 4593|  31.4k|const char *janet_getcstring(const Janet *argv, int32_t n) {
 4594|  31.4k|    if (!janet_checktype(argv[n], JANET_STRING)) {
  ------------------
  |  |  801|  31.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 31.4k]
  |  |  ------------------
  |  |  802|  31.4k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  31.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  31.4k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  31.4k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  31.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  31.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4594:9): [True: 9, False: 31.4k]
  ------------------
 4595|      9|        janet_panic_type(argv[n], n, JANET_TFLAG_STRING);
  ------------------
  |  |  594|      9|#define JANET_TFLAG_STRING (1 << JANET_STRING)
  ------------------
 4596|      9|    }
 4597|  31.4k|    return janet_getcbytes(argv, n);
 4598|  31.4k|}
janet_getcbytes:
 4600|  31.4k|const char *janet_getcbytes(const Janet *argv, int32_t n) {
 4601|       |    /* Ensure buffer 0-padded */
 4602|  31.4k|    if (janet_checktype(argv[n], JANET_BUFFER)) {
  ------------------
  |  |  801|  31.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 10, False: 31.4k]
  |  |  |  Branch (801:6): [Folded, False: 31.4k]
  |  |  ------------------
  |  |  802|  31.4k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  31.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  31.4k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  31.4k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  31.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  31.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4603|     10|        JanetBuffer *b = janet_unwrap_buffer(argv[n]);
  ------------------
  |  |  857|     10|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
 4604|     10|        if ((b->gc.flags & JANET_BUFFER_FLAG_NO_REALLOC) && b->count == b->capacity) {
  ------------------
  |  | 1770|     10|#define JANET_BUFFER_FLAG_NO_REALLOC 0x10000
  ------------------
  |  Branch (4604:13): [True: 0, False: 10]
  |  Branch (4604:61): [True: 0, False: 0]
  ------------------
 4605|       |            /* Make a copy with janet_smalloc in the rare case we have a buffer that
 4606|       |             * cannot be realloced and pushing a 0 byte would panic. */
 4607|      0|            char *new_string = janet_smalloc(b->count + 1);
 4608|      0|            memcpy(new_string, b->data, b->count);
 4609|      0|            new_string[b->count] = 0;
 4610|      0|            if (strlen(new_string) != (size_t) b->count) goto badzeros;
  ------------------
  |  Branch (4610:17): [True: 0, False: 0]
  ------------------
 4611|      0|            return new_string;
 4612|     10|        } else {
 4613|       |            /* Ensure trailing 0 */
 4614|     10|            janet_buffer_push_u8(b, 0);
 4615|     10|            b->count--;
 4616|     10|            if (strlen((char *)b->data) != (size_t) b->count) goto badzeros;
  ------------------
  |  Branch (4616:17): [True: 2, False: 8]
  ------------------
 4617|      8|            return (const char *) b->data;
 4618|     10|        }
 4619|     10|    }
 4620|  31.4k|    JanetByteView view = janet_getbytes(argv, n);
 4621|  31.4k|    const char *cstr = (const char *)view.bytes;
 4622|  31.4k|    if (strlen(cstr) != (size_t) view.len) goto badzeros;
  ------------------
  |  Branch (4622:9): [True: 6, False: 31.4k]
  ------------------
 4623|  31.4k|    return cstr;
 4624|       |
 4625|      8|badzeros:
 4626|      8|    janet_panic("bytes contain embedded 0s");
 4627|  31.4k|}
janet_getnat:
 4636|  83.4k|int32_t janet_getnat(const Janet *argv, int32_t n) {
 4637|  83.4k|    Janet x = argv[n];
 4638|  83.4k|    if (!janet_checkint(x)) goto bad;
  ------------------
  |  Branch (4638:9): [True: 15, False: 83.4k]
  ------------------
 4639|  83.4k|    int32_t ret = janet_unwrap_integer(x);
  ------------------
  |  |  957|  83.4k|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  834|  83.4k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
 4640|  83.4k|    if (ret < 0) goto bad;
  ------------------
  |  Branch (4640:9): [True: 2, False: 83.4k]
  ------------------
 4641|  83.4k|    return ret;
 4642|     17|bad:
 4643|     17|    janet_panicf("bad slot #%d, expected non-negative 32 bit signed integer, got %v", n, x);
 4644|  83.4k|}
janet_checkabstract:
 4646|     32|JanetAbstract janet_checkabstract(Janet x, const JanetAbstractType *at) {
 4647|     32|    if (!janet_checktype(x, JANET_ABSTRACT)) return NULL;
  ------------------
  |  |  801|     32|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 32]
  |  |  ------------------
  |  |  802|     32|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|     32|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|     32|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|     32|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     32|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     32|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4647:9): [True: 31, False: 1]
  ------------------
 4648|      1|    JanetAbstract a = janet_unwrap_abstract(x);
  ------------------
  |  |  861|      1|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
 4649|      1|    if (janet_abstract_type(a) != at) return NULL;
  ------------------
  |  | 1889|      1|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|      1|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (4649:9): [True: 0, False: 1]
  ------------------
 4650|      1|    return a;
 4651|      1|}
janet_keyeq:
 4658|  23.5k|int janet_keyeq(Janet x, const char *cstring) {
 4659|  23.5k|    return janet_strlike_cmp(JANET_KEYWORD, x, cstring);
 4660|  23.5k|}
janet_symeq:
 4666|  6.01k|int janet_symeq(Janet x, const char *cstring) {
 4667|  6.01k|    return janet_strlike_cmp(JANET_SYMBOL, x, cstring);
 4668|  6.01k|}
janet_getinteger:
 4670|  25.1M|int32_t janet_getinteger(const Janet *argv, int32_t n) {
 4671|  25.1M|    Janet x = argv[n];
 4672|  25.1M|    if (!janet_checkint(x)) {
  ------------------
  |  Branch (4672:9): [True: 57, False: 25.1M]
  ------------------
 4673|     57|        janet_panicf("bad slot #%d, expected 32 bit signed integer, got %v", n, x);
 4674|     57|    }
 4675|  25.1M|    return janet_unwrap_integer(x);
  ------------------
  |  |  957|  25.1M|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  834|  25.1M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
 4676|  25.1M|}
janet_getinteger64:
 4703|     12|int64_t janet_getinteger64(const Janet *argv, int32_t n) {
 4704|     12|#ifdef JANET_INT_TYPES
 4705|     12|    return janet_unwrap_s64(argv[n]);
 4706|       |#else
 4707|       |    Janet x = argv[n];
 4708|       |    if (!janet_checkint64(x)) {
 4709|       |        janet_panicf("bad slot #%d, expected 64 bit signed integer, got %v", n, x);
 4710|       |    }
 4711|       |    return (int64_t) janet_unwrap_number(x);
 4712|       |#endif
 4713|     12|}
janet_getuinteger64:
 4715|     15|uint64_t janet_getuinteger64(const Janet *argv, int32_t n) {
 4716|     15|#ifdef JANET_INT_TYPES
 4717|     15|    return janet_unwrap_u64(argv[n]);
 4718|       |#else
 4719|       |    Janet x = argv[n];
 4720|       |    if (!janet_checkuint64(x)) {
 4721|       |        janet_panicf("bad slot #%d, expected 64 bit unsigned integer, got %v", n, x);
 4722|       |    }
 4723|       |    return (uint64_t) janet_unwrap_number(x);
 4724|       |#endif
 4725|     15|}
janet_getsize:
 4727|      5|size_t janet_getsize(const Janet *argv, int32_t n) {
 4728|      5|    Janet x = argv[n];
 4729|      5|    if (!janet_checksize(x)) {
  ------------------
  |  Branch (4729:9): [True: 2, False: 3]
  ------------------
 4730|      2|        janet_panicf("bad slot #%d, expected size, got %v", n, x);
 4731|      2|    }
 4732|      3|    return (size_t) janet_unwrap_number(x);
  ------------------
  |  |  834|      3|#define janet_unwrap_number(x) ((x).number)
  ------------------
 4733|      5|}
janet_gethalfrange:
 4735|  5.24M|int32_t janet_gethalfrange(const Janet *argv, int32_t n, int32_t length, const char *which) {
 4736|  5.24M|    int32_t raw = janet_getinteger(argv, n);
 4737|  5.24M|    int32_t not_raw = raw;
 4738|  5.24M|    if (not_raw < 0) not_raw += length + 1;
  ------------------
  |  Branch (4738:9): [True: 6.62k, False: 5.23M]
  ------------------
 4739|  5.24M|    if (not_raw < 0 || not_raw > length)
  ------------------
  |  Branch (4739:9): [True: 31, False: 5.24M]
  |  Branch (4739:24): [True: 27, False: 5.24M]
  ------------------
 4740|     41|        janet_panicf("%s index %d out of range [%d,%d]", which, (int64_t) raw, -(int64_t)length - 1, (int64_t) length);
 4741|  5.24M|    return not_raw;
 4742|  5.24M|}
janet_getstartrange:
 4744|  17.4M|int32_t janet_getstartrange(const Janet *argv, int32_t argc, int32_t n, int32_t length) {
 4745|  17.4M|    if (n >= argc || janet_checktype(argv[n], JANET_NIL)) {
  ------------------
  |  |  801|  5.19M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 5.19M]
  |  |  |  Branch (801:6): [Folded, False: 5.19M]
  |  |  ------------------
  |  |  802|  5.19M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  5.19M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  5.19M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  5.19M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  5.19M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  5.19M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4745:9): [True: 12.2M, False: 5.19M]
  ------------------
 4746|  12.2M|        return 0;
 4747|  12.2M|    }
 4748|  5.19M|    return janet_gethalfrange(argv, n, length, "start");
 4749|  17.4M|}
janet_getendrange:
 4751|  17.4M|int32_t janet_getendrange(const Janet *argv, int32_t argc, int32_t n, int32_t length) {
 4752|  17.4M|    if (n >= argc || janet_checktype(argv[n], JANET_NIL)) {
  ------------------
  |  |  801|  46.7k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 46.7k]
  |  |  |  Branch (801:6): [Folded, False: 46.7k]
  |  |  ------------------
  |  |  802|  46.7k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  46.7k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  46.7k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  46.7k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  46.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  46.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4752:9): [True: 17.3M, False: 46.7k]
  ------------------
 4753|  17.3M|        return length;
 4754|  17.3M|    }
 4755|  46.7k|    return janet_gethalfrange(argv, n, length, "end");
 4756|  17.4M|}
janet_getindexed:
 4767|  17.3M|JanetView janet_getindexed(const Janet *argv, int32_t n) {
 4768|  17.3M|    Janet x = argv[n];
 4769|  17.3M|    JanetView view;
 4770|  17.3M|    if (!janet_indexed_view(x, &view.items, &view.len)) {
  ------------------
  |  Branch (4770:9): [True: 3, False: 17.3M]
  ------------------
 4771|      3|        janet_panic_type(x, n, JANET_TFLAG_INDEXED);
  ------------------
  |  |  608|      3|#define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  ------------------
  |  |  |  |  597|      3|#define JANET_TFLAG_ARRAY (1 << JANET_ARRAY)
  |  |  ------------------
  |  |               #define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  ------------------
  |  |  |  |  598|      3|#define JANET_TFLAG_TUPLE (1 << JANET_TUPLE)
  |  |  ------------------
  ------------------
 4772|      3|    }
 4773|  17.3M|    return view;
 4774|  17.3M|}
janet_getbytes:
 4776|  21.2M|JanetByteView janet_getbytes(const Janet *argv, int32_t n) {
 4777|  21.2M|    Janet x = argv[n];
 4778|  21.2M|    JanetByteView view;
 4779|  21.2M|    if (!janet_bytes_view(x, &view.bytes, &view.len)) {
  ------------------
  |  Branch (4779:9): [True: 77, False: 21.2M]
  ------------------
 4780|     77|        janet_panic_type(x, n, JANET_TFLAG_BYTES);
  ------------------
  |  |  607|     77|#define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  594|     77|#define JANET_TFLAG_STRING (1 << JANET_STRING)
  |  |  ------------------
  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  595|     77|#define JANET_TFLAG_SYMBOL (1 << JANET_SYMBOL)
  |  |  ------------------
  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  601|     77|#define JANET_TFLAG_BUFFER (1 << JANET_BUFFER)
  |  |  ------------------
  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  596|     77|#define JANET_TFLAG_KEYWORD (1 << JANET_KEYWORD)
  |  |  ------------------
  ------------------
 4781|     77|    }
 4782|  21.2M|    return view;
 4783|  21.2M|}
janet_getdictionary:
 4785|      2|JanetDictView janet_getdictionary(const Janet *argv, int32_t n) {
 4786|      2|    Janet x = argv[n];
 4787|      2|    JanetDictView view;
 4788|      2|    if (!janet_dictionary_view(x, &view.kvs, &view.len, &view.cap)) {
  ------------------
  |  Branch (4788:9): [True: 2, False: 0]
  ------------------
 4789|      2|        janet_panic_type(x, n, JANET_TFLAG_DICTIONARY);
  ------------------
  |  |  609|      2|#define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  ------------------
  |  |  |  |  599|      2|#define JANET_TFLAG_TABLE (1 << JANET_TABLE)
  |  |  ------------------
  |  |               #define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  ------------------
  |  |  |  |  600|      2|#define JANET_TFLAG_STRUCT (1 << JANET_STRUCT)
  |  |  ------------------
  ------------------
 4790|      2|    }
 4791|      0|    return view;
 4792|      2|}
janet_getabstract:
 4794|   510k|void *janet_getabstract(const Janet *argv, int32_t n, const JanetAbstractType *at) {
 4795|   510k|    Janet x = argv[n];
 4796|   510k|    if (!janet_checktype(x, JANET_ABSTRACT)) {
  ------------------
  |  |  801|   510k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 510k]
  |  |  ------------------
  |  |  802|   510k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   510k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   510k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   510k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   510k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   510k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4796:9): [True: 56, False: 510k]
  ------------------
 4797|     56|        janet_panic_abstract(x, n, at);
 4798|     56|    }
 4799|   510k|    void *abstractx = janet_unwrap_abstract(x);
  ------------------
  |  |  861|   510k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
 4800|   510k|    if (janet_abstract_type(abstractx) != at) {
  ------------------
  |  | 1889|   510k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|   510k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (4800:9): [True: 3, False: 510k]
  ------------------
 4801|      3|        janet_panic_abstract(x, n, at);
 4802|      3|    }
 4803|   510k|    return abstractx;
 4804|   510k|}
janet_getslice:
 4806|  17.4M|JanetRange janet_getslice(int32_t argc, const Janet *argv) {
 4807|  17.4M|    janet_arity(argc, 1, 3);
 4808|  17.4M|    JanetRange range;
 4809|  17.4M|    int32_t length = janet_length(argv[0]);
 4810|  17.4M|    range.start = janet_getstartrange(argv, argc, 1, length);
 4811|  17.4M|    range.end = janet_getendrange(argv, argc, 2, length);
 4812|  17.4M|    if (range.end < range.start)
  ------------------
  |  Branch (4812:9): [True: 1, False: 17.4M]
  ------------------
 4813|      1|        range.end = range.start;
 4814|  17.4M|    return range;
 4815|  17.4M|}
janet_dyn:
 4817|   411k|Janet janet_dyn(const char *name) {
 4818|   411k|    if (!janet_vm.fiber) {
  ------------------
  |  Branch (4818:9): [True: 179k, False: 232k]
  ------------------
 4819|   179k|        if (!janet_vm.top_dyns) return janet_wrap_nil();
  ------------------
  |  |  826|   179k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|   179k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   179k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   179k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4819:13): [True: 179k, False: 0]
  ------------------
 4820|      0|        return janet_table_get(janet_vm.top_dyns, janet_ckeywordv(name));
  ------------------
  |  | 1833|      0|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      0|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4821|   179k|    }
 4822|   232k|    if (janet_vm.fiber->env) {
  ------------------
  |  Branch (4822:9): [True: 232k, False: 0]
  ------------------
 4823|   232k|        return janet_table_get_keyword(janet_vm.fiber->env, name);
 4824|   232k|    } else {
 4825|      0|        return janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4826|      0|    }
 4827|   232k|}
janet_getflags:
 4868|     19|uint64_t janet_getflags(const Janet *argv, int32_t n, const char *flags) {
 4869|     19|    uint64_t ret = 0;
 4870|     19|    const uint8_t *keyw = janet_getkeyword(argv, n);
 4871|     19|    int32_t klen = janet_string_length(keyw);
  ------------------
  |  | 1803|     19|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|     19|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
 4872|     19|    int32_t flen = (int32_t) strlen(flags);
 4873|     19|    if (flen > 64) {
  ------------------
  |  Branch (4873:9): [True: 0, False: 19]
  ------------------
 4874|      0|        flen = 64;
 4875|      0|    }
 4876|     30|    for (int32_t j = 0; j < klen; j++) {
  ------------------
  |  Branch (4876:25): [True: 14, False: 16]
  ------------------
 4877|     38|        for (int32_t i = 0; i < flen; i++) {
  ------------------
  |  Branch (4877:29): [True: 35, False: 3]
  ------------------
 4878|     35|            if (((uint8_t) flags[i]) == keyw[j]) {
  ------------------
  |  Branch (4878:17): [True: 11, False: 24]
  ------------------
 4879|     11|                ret |= 1ULL << i;
 4880|     11|                goto found;
 4881|     11|            }
 4882|     35|        }
 4883|      3|        janet_panicf("unexpected flag %c, expected one of \"%s\"", (char) keyw[j], flags);
 4884|     11|    found:
 4885|     11|        ;
 4886|     11|    }
 4887|     16|    return ret;
 4888|     19|}
janet_optnat:
 4890|  71.9k|int32_t janet_optnat(const Janet *argv, int32_t argc, int32_t n, int32_t dflt) {
 4891|  71.9k|    if (argc <= n) return dflt;
  ------------------
  |  Branch (4891:9): [True: 70.4k, False: 1.51k]
  ------------------
 4892|  1.51k|    if (janet_checktype(argv[n], JANET_NIL)) return dflt;
  ------------------
  |  |  801|  1.51k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 1.51k]
  |  |  |  Branch (801:6): [Folded, False: 1.51k]
  |  |  ------------------
  |  |  802|  1.51k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  1.51k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  1.51k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  1.51k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.51k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.51k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4893|  1.51k|    return janet_getnat(argv, n);
 4894|  1.51k|}
janet_optinteger:
 4896|  11.9k|int32_t janet_optinteger(const Janet *argv, int32_t argc, int32_t n, int32_t dflt) {
 4897|  11.9k|    if (argc <= n) return dflt;
  ------------------
  |  Branch (4897:9): [True: 11.9k, False: 6]
  ------------------
 4898|      6|    if (janet_checktype(argv[n], JANET_NIL)) return dflt;
  ------------------
  |  |  801|      6|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 6]
  |  |  |  Branch (801:6): [Folded, False: 6]
  |  |  ------------------
  |  |  802|      6|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      6|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      6|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      6|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      6|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      6|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4899|      6|    return janet_getinteger(argv, n);
 4900|      6|}
janet_optsize:
 4908|      3|size_t janet_optsize(const Janet *argv, int32_t argc, int32_t n, size_t dflt) {
 4909|      3|    if (argc <= n) return dflt;
  ------------------
  |  Branch (4909:9): [True: 2, False: 1]
  ------------------
 4910|      1|    if (janet_checktype(argv[n], JANET_NIL)) return dflt;
  ------------------
  |  |  801|      1|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 1]
  |  |  |  Branch (801:6): [Folded, False: 1]
  |  |  ------------------
  |  |  802|      1|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      1|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      1|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      1|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4911|      1|    return janet_getsize(argv, n);
 4912|      1|}
janet_optabstract:
 4914|    679|void *janet_optabstract(const Janet *argv, int32_t argc, int32_t n, const JanetAbstractType *at, void *dflt) {
 4915|    679|    if (argc <= n) return dflt;
  ------------------
  |  Branch (4915:9): [True: 494, False: 185]
  ------------------
 4916|    185|    if (janet_checktype(argv[n], JANET_NIL)) return dflt;
  ------------------
  |  |  801|    185|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 185]
  |  |  |  Branch (801:6): [Folded, False: 185]
  |  |  ------------------
  |  |  802|    185|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|    185|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|    185|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|    185|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    185|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    185|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4917|    185|    return janet_getabstract(argv, n, at);
 4918|    185|}
janet_atomic_inc:
 4934|    538|JanetAtomicInt janet_atomic_inc(JanetAtomicInt volatile *x) {
 4935|       |#ifdef _MSC_VER
 4936|       |    return _InterlockedIncrement(x);
 4937|       |#elif defined(JANET_USE_STDATOMIC)
 4938|       |    return atomic_fetch_add_explicit(x, 1, memory_order_relaxed) + 1;
 4939|       |#elif defined(JANET_PLAN9)
 4940|       |    return aincl((void*)x, 1);
 4941|       |#else
 4942|    538|    return __atomic_add_fetch(x, 1, __ATOMIC_RELAXED);
 4943|    538|#endif
 4944|    538|}
janet_atomic_dec:
 4946|    123|JanetAtomicInt janet_atomic_dec(JanetAtomicInt volatile *x) {
 4947|       |#ifdef _MSC_VER
 4948|       |    return _InterlockedDecrement(x);
 4949|       |#elif defined(JANET_USE_STDATOMIC)
 4950|       |    return atomic_fetch_add_explicit(x, -1, memory_order_acq_rel) - 1;
 4951|       |#elif defined(JANET_PLAN9)
 4952|       |    return aincl((void*)x, -1);
 4953|       |#else
 4954|    123|    return __atomic_add_fetch(x, -1, __ATOMIC_ACQ_REL);
 4955|    123|#endif
 4956|    123|}
janet_atomic_load:
 4958|  1.07k|JanetAtomicInt janet_atomic_load(JanetAtomicInt volatile *x) {
 4959|       |#ifdef _MSC_VER
 4960|       |    return _InterlockedOr(x, 0);
 4961|       |#elif defined(JANET_PLAN9)
 4962|       |    return agetl((void*)x);
 4963|       |#elif defined(JANET_USE_STDATOMIC)
 4964|       |    return atomic_load_explicit(x, memory_order_acquire);
 4965|       |#else
 4966|  1.07k|    return __atomic_load_n(x, __ATOMIC_ACQUIRE);
 4967|  1.07k|#endif
 4968|  1.07k|}
janet_atomic_load_relaxed:
 4970|   459M|JanetAtomicInt janet_atomic_load_relaxed(JanetAtomicInt volatile *x) {
 4971|       |#ifdef _MSC_VER
 4972|       |    return _InterlockedOr(x, 0);
 4973|       |#elif defined(JANET_PLAN9)
 4974|       |    return agetl((void*)x);
 4975|       |#elif defined(JANET_USE_STDATOMIC)
 4976|       |    return atomic_load_explicit(x, memory_order_relaxed);
 4977|       |#else
 4978|   459M|    return __atomic_load_n(x, __ATOMIC_RELAXED);
 4979|   459M|#endif
 4980|   459M|}
janetc_funopt:
 5413|  14.1k|const JanetFunOptimizer *janetc_funopt(uint32_t flags) {
 5414|  14.1k|    uint32_t tag = flags & JANET_FUNCDEF_FLAG_TAG;
  ------------------
  |  | 1099|  14.1k|#define JANET_FUNCDEF_FLAG_TAG 0xFFFF
  ------------------
 5415|  14.1k|    if (tag == 0)
  ------------------
  |  Branch (5415:9): [True: 1.20k, False: 12.9k]
  ------------------
 5416|  1.20k|        return NULL;
 5417|  12.9k|    uint32_t index = tag - 1;
 5418|  12.9k|    if (index >= (sizeof(optimizers) / sizeof(optimizers[0])))
  ------------------
  |  Branch (5418:9): [True: 0, False: 12.9k]
  ------------------
 5419|      0|        return NULL;
 5420|  12.9k|    return optimizers + index;
 5421|  12.9k|}
janetc_fopts_default:
 5460|   583k|JanetFopts janetc_fopts_default(JanetCompiler *c) {
 5461|   583k|    JanetFopts ret;
 5462|   583k|    ret.compiler = c;
 5463|   583k|    ret.flags = 0;
 5464|   583k|    ret.hint = janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|   583k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|   583k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   583k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   583k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5465|   583k|    return ret;
 5466|   583k|}
janetc_error:
 5469|   268k|void janetc_error(JanetCompiler *c, const uint8_t *m) {
 5470|       |    /* Don't override first error */
 5471|   268k|    if (c->result.status == JANET_COMPILE_ERROR) {
  ------------------
  |  Branch (5471:9): [True: 266k, False: 2.32k]
  ------------------
 5472|   266k|        return;
 5473|   266k|    }
 5474|  2.32k|    c->result.status = JANET_COMPILE_ERROR;
 5475|  2.32k|    c->result.error = m;
 5476|  2.32k|}
janetc_cerror:
 5479|   254k|void janetc_cerror(JanetCompiler *c, const char *m) {
 5480|   254k|    janetc_error(c, janet_cstring(m));
 5481|   254k|}
janetc_lintf:
 5490|  2.69M|void janetc_lintf(JanetCompiler *c, JanetCompileLintLevel level, const char *format, ...) {
 5491|  2.69M|    if (NULL != c->lints) {
  ------------------
  |  Branch (5491:9): [True: 0, False: 2.69M]
  ------------------
 5492|       |        /* format message */
 5493|      0|        va_list args;
 5494|      0|        JanetBuffer buffer;
 5495|      0|        int32_t len = 0;
 5496|      0|        while (format[len]) len++;
  ------------------
  |  Branch (5496:16): [True: 0, False: 0]
  ------------------
 5497|      0|        janet_buffer_init(&buffer, len);
 5498|      0|        va_start(args, format);
 5499|      0|        janet_formatbv(&buffer, format, args);
 5500|      0|        va_end(args);
 5501|      0|        const uint8_t *str = janet_string(buffer.data, buffer.count);
 5502|      0|        janet_buffer_deinit(&buffer);
 5503|       |        /* construct linting payload */
 5504|      0|        Janet *payload = janet_tuple_begin(4);
 5505|      0|        payload[0] = janet_ckeywordv(janet_lint_level_names[level]);
  ------------------
  |  | 1833|      0|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      0|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5506|      0|        payload[1] = c->current_mapping.line == -1 ? janet_wrap_nil() : janet_wrap_integer(c->current_mapping.line);
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      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);
  ------------------
  |  |  958|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
  |  Branch (5506:22): [True: 0, False: 0]
  ------------------
 5507|      0|        payload[2] = c->current_mapping.column == -1 ? janet_wrap_nil() : janet_wrap_integer(c->current_mapping.column);
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      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);
  ------------------
  |  |  958|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
  |  Branch (5507:22): [True: 0, False: 0]
  ------------------
 5508|      0|        payload[3] = janet_wrap_string(str);
  ------------------
  |  |  843|      0|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5509|      0|        janet_array_push(c->lints, janet_wrap_tuple(janet_tuple_end(payload)));
  ------------------
  |  |  838|      0|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5510|      0|    }
 5511|  2.69M|}
janetc_freeslot:
 5514|  5.90M|void janetc_freeslot(JanetCompiler *c, JanetSlot s) {
 5515|  5.90M|    if (s.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF | JANET_SLOT_NAMED)) return;
  ------------------
  |  |  983|  5.90M|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
                  if (s.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF | JANET_SLOT_NAMED)) return;
  ------------------
  |  |  986|  5.90M|#define JANET_SLOT_REF 0x80000
  ------------------
                  if (s.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF | JANET_SLOT_NAMED)) return;
  ------------------
  |  |  984|  5.90M|#define JANET_SLOT_NAMED 0x20000
  ------------------
  |  Branch (5515:9): [True: 1.78M, False: 4.12M]
  ------------------
 5516|  4.12M|    if (s.envindex >= 0) return;
  ------------------
  |  Branch (5516:9): [True: 0, False: 4.12M]
  ------------------
 5517|  4.12M|    janetc_regalloc_free(&c->scope->ra, s.index);
 5518|  4.12M|}
janetc_nameslot:
 5521|  6.61M|void janetc_nameslot(JanetCompiler *c, const uint8_t *sym, JanetSlot s, uint32_t flags) {
 5522|  6.61M|    if (!(flags & JANET_DEFFLAG_NO_SHADOWCHECK)) {
  ------------------
  |  | 1126|  6.61M|#define JANET_DEFFLAG_NO_SHADOWCHECK 1
  ------------------
  |  Branch (5522:9): [True: 6.61M, False: 220]
  ------------------
 5523|  6.61M|        if (sym[0] != '_') {
  ------------------
  |  Branch (5523:13): [True: 1.60M, False: 5.00M]
  ------------------
 5524|  1.60M|            switch (janetc_shadowcheck(c, sym)) {
 5525|  21.0k|                default:
  ------------------
  |  Branch (5525:17): [True: 21.0k, False: 1.58M]
  ------------------
 5526|  21.0k|                    break;
 5527|  21.0k|                case JANETC_SHADOW_MACRO:
  ------------------
  |  Branch (5527:17): [True: 3.08k, False: 1.59M]
  ------------------
 5528|  3.08k|                    janetc_lintf(c, JANET_C_LINT_NORMAL, "binding %q is shadowing a macro", janet_wrap_symbol(sym));
  ------------------
  |  |  844|  3.08k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  823|  3.08k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  3.08k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  3.08k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5529|  3.08k|                    break;
 5530|  1.57M|                case JANETC_SHADOW_LOCAL_HIDES_LOCAL:
  ------------------
  |  Branch (5530:17): [True: 1.57M, False: 26.0k]
  ------------------
 5531|  1.57M|                    janetc_lintf(c, JANET_C_LINT_STRICT, "binding %q is shadowing a binding", janet_wrap_symbol(sym));
  ------------------
  |  |  844|  1.57M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  823|  1.57M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.57M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.57M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5532|  1.57M|                    break;
 5533|  1.62k|                case JANETC_SHADOW_LOCAL_HIDES_GLOBAL:
  ------------------
  |  Branch (5533:17): [True: 1.62k, False: 1.60M]
  ------------------
 5534|  1.62k|                    janetc_lintf(c, JANET_C_LINT_STRICT, "binding %q is shadowing a top-level binding", janet_wrap_symbol(sym));
  ------------------
  |  |  844|  1.62k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  823|  1.62k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.62k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.62k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5535|  1.62k|                    break;
 5536|    270|                case JANETC_SHADOW_GLOBAL_HIDES_GLOBAL:
  ------------------
  |  Branch (5536:17): [True: 270, False: 1.60M]
  ------------------
 5537|    270|                    janetc_lintf(c, JANET_C_LINT_STRICT, "top-level binding %q is shadowing another top-level binding", janet_wrap_symbol(sym));
  ------------------
  |  |  844|    270|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  823|    270|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    270|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    270|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5538|    270|                    break;
 5539|  1.60M|            }
 5540|  1.60M|        }
 5541|  6.61M|    }
 5542|  6.61M|    SymPair sp;
 5543|  6.61M|    int32_t cnt = janet_v_count(c->buffer);
  ------------------
  |  |  708|  6.61M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  4.03M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  4.03M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 4.03M, False: 2.57M]
  |  |  ------------------
  ------------------
 5544|  6.61M|    sp.sym = sym;
 5545|  6.61M|    sp.sym2 = sym;
 5546|  6.61M|    sp.slot = s;
 5547|  6.61M|    sp.keep = 0;
 5548|  6.61M|    if (flags & JANET_DEFFLAG_NO_UNUSED) {
  ------------------
  |  | 1127|  6.61M|#define JANET_DEFFLAG_NO_UNUSED 2
  ------------------
  |  Branch (5548:9): [True: 2.14k, False: 6.60M]
  ------------------
 5549|  2.14k|        sp.referenced = 1;
 5550|  6.60M|    } else {
 5551|  6.60M|        sp.referenced = sym[0] == '_'; /* Fake ref if symbol starts with _ to avoid lints */
 5552|  6.60M|    }
 5553|  6.61M|    sp.slot.flags |= JANET_SLOT_NAMED;
  ------------------
  |  |  984|  6.61M|#define JANET_SLOT_NAMED 0x20000
  ------------------
 5554|  6.61M|    sp.birth_pc = cnt ? cnt - 1 : 0;
  ------------------
  |  Branch (5554:19): [True: 4.03M, False: 2.57M]
  ------------------
 5555|  6.61M|    sp.death_pc = UINT32_MAX;
 5556|       |    janet_v_push(c->scope->syms, sp);
  ------------------
  |  |  706|  6.61M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  6.61M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  6.61M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  6.52M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  6.52M|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  6.52M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  6.52M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 83.2k, False: 6.52M]
  |  |  |  |  |  |  |  Branch (717:50): [True: 24.2k, False: 6.50M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   107k|#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))
  |  |  ------------------
  |  |  |  |  715|  6.61M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  6.61M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5557|  6.61M|}
janetc_cslot:
 5560|  2.98M|JanetSlot janetc_cslot(Janet x) {
 5561|  2.98M|    JanetSlot ret;
 5562|  2.98M|    ret.flags = (1 << janet_type(x)) | JANET_SLOT_CONSTANT;
  ------------------
  |  |  790|  2.98M|    (isnan((x).number) \
  |  |  791|  2.98M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  2.98M|        : JANET_NUMBER)
  ------------------
                  ret.flags = (1 << janet_type(x)) | JANET_SLOT_CONSTANT;
  ------------------
  |  |  983|  2.98M|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (5562:23): [True: 2.93M, False: 48.2k]
  ------------------
 5563|  2.98M|    ret.index = -1;
 5564|  2.98M|    ret.constant = x;
 5565|  2.98M|    ret.envindex = -1;
 5566|  2.98M|    return ret;
 5567|  2.98M|}
janetc_farslot:
 5570|  9.71M|JanetSlot janetc_farslot(JanetCompiler *c) {
 5571|  9.71M|    JanetSlot ret;
 5572|  9.71M|    ret.flags = JANET_SLOTTYPE_ANY;
  ------------------
  |  |  993|  9.71M|#define JANET_SLOTTYPE_ANY 0xFFFF
  ------------------
 5573|  9.71M|    ret.index = janetc_allocfar(c);
 5574|  9.71M|    ret.constant = janet_wrap_nil();
  ------------------
  |  |  826|  9.71M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  9.71M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  9.71M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  9.71M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5575|  9.71M|    ret.envindex = -1;
 5576|  9.71M|    return ret;
 5577|  9.71M|}
janetc_scope:
 5580|   746k|void janetc_scope(JanetScope *s, JanetCompiler *c, int flags, const char *name) {
 5581|   746k|    JanetScope scope;
 5582|   746k|    scope.name = name;
 5583|   746k|    scope.child = NULL;
 5584|   746k|    scope.consts = NULL;
 5585|   746k|    scope.syms = NULL;
 5586|   746k|    scope.envs = NULL;
 5587|   746k|    scope.defs = NULL;
 5588|   746k|    scope.bytecode_start = janet_v_count(c->buffer);
  ------------------
  |  |  708|   746k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|   301k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|   301k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 301k, False: 444k]
  |  |  ------------------
  ------------------
 5589|   746k|    scope.flags = flags;
 5590|   746k|    scope.parent = c->scope;
 5591|   746k|    janetc_regalloc_init(&scope.ua);
 5592|       |    /* Inherit slots */
 5593|   746k|    if ((!(flags & JANET_SCOPE_FUNCTION)) && c->scope) {
  ------------------
  |  | 1003|   746k|#define JANET_SCOPE_FUNCTION 1
  ------------------
  |  Branch (5593:9): [True: 30.2k, False: 716k]
  |  Branch (5593:46): [True: 30.2k, False: 0]
  ------------------
 5594|  30.2k|        janetc_regalloc_clone(&scope.ra, &(c->scope->ra));
 5595|   716k|    } else {
 5596|   716k|        janetc_regalloc_init(&scope.ra);
 5597|   716k|    }
 5598|       |    /* Link parent and child and update pointer */
 5599|   746k|    if (c->scope)
  ------------------
  |  Branch (5599:9): [True: 508k, False: 238k]
  ------------------
 5600|   508k|        c->scope->child = s;
 5601|   746k|    c->scope = s;
 5602|   746k|    *s = scope;
 5603|   746k|}
janetc_popscope:
 5606|   746k|void janetc_popscope(JanetCompiler *c) {
 5607|   746k|    JanetScope *oldscope = c->scope;
 5608|   746k|    JanetScope *newscope = oldscope->parent;
 5609|       |    /* Move free slots to parent scope if not a new function.
 5610|       |     * We need to know the total number of slots used when compiling the function. */
 5611|   746k|    if (!(oldscope->flags & (JANET_SCOPE_FUNCTION | JANET_SCOPE_UNUSED)) && newscope) {
  ------------------
  |  | 1003|   746k|#define JANET_SCOPE_FUNCTION 1
  ------------------
                  if (!(oldscope->flags & (JANET_SCOPE_FUNCTION | JANET_SCOPE_UNUSED)) && newscope) {
  ------------------
  |  | 1006|   746k|#define JANET_SCOPE_UNUSED 8
  ------------------
  |  Branch (5611:9): [True: 28.4k, False: 717k]
  |  Branch (5611:77): [True: 28.4k, False: 0]
  ------------------
 5612|       |        /* Parent scopes inherit child's closure flag. Needed
 5613|       |         * for while loops. (if a while loop creates a closure, it
 5614|       |         * is compiled to a tail recursive iife) */
 5615|  28.4k|        if (oldscope->flags & JANET_SCOPE_CLOSURE) {
  ------------------
  |  | 1007|  28.4k|#define JANET_SCOPE_CLOSURE 16
  ------------------
  |  Branch (5615:13): [True: 14.9k, False: 13.5k]
  ------------------
 5616|  14.9k|            newscope->flags |= JANET_SCOPE_CLOSURE;
  ------------------
  |  | 1007|  14.9k|#define JANET_SCOPE_CLOSURE 16
  ------------------
 5617|  14.9k|        }
 5618|  28.4k|        if (newscope->ra.max < oldscope->ra.max) {
  ------------------
  |  Branch (5618:13): [True: 19.8k, False: 8.60k]
  ------------------
 5619|  19.8k|            newscope->ra.max = oldscope->ra.max;
 5620|  19.8k|        }
 5621|       |
 5622|       |        /* Keep upvalue slots and symbols for debugging. */
 5623|  2.10M|        for (int32_t i = 0; i < janet_v_count(oldscope->syms); i++) {
  ------------------
  |  |  708|  2.10M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  2.10M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  2.10M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 2.10M, False: 7.94k]
  |  |  ------------------
  ------------------
  |  Branch (5623:29): [True: 2.08M, False: 28.4k]
  ------------------
 5624|  2.08M|            SymPair pair = oldscope->syms[i];
 5625|       |            /* Check for unused symbols */
 5626|  2.08M|            if (pair.referenced == 0 && pair.sym) {
  ------------------
  |  Branch (5626:17): [True: 1.12M, False: 950k]
  |  Branch (5626:41): [True: 560k, False: 569k]
  ------------------
 5627|   560k|                janetc_lintf(c, JANET_C_LINT_STRICT, "binding %q is unused", janet_wrap_symbol(pair.sym));
  ------------------
  |  |  844|   560k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  823|   560k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   560k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   560k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5628|   560k|            }
 5629|       |            /* The variable should not be lexically accessible */
 5630|  2.08M|            pair.sym = NULL;
 5631|  2.08M|            if (pair.death_pc == UINT32_MAX) {
  ------------------
  |  Branch (5631:17): [True: 569k, False: 1.51M]
  ------------------
 5632|   569k|                pair.death_pc = (uint32_t) janet_v_count(c->buffer);
  ------------------
  |  |  708|   569k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|   569k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|   569k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 569k, False: 0]
  |  |  ------------------
  ------------------
 5633|   569k|            }
 5634|  2.08M|            if (pair.keep) {
  ------------------
  |  Branch (5634:17): [True: 1.63k, False: 2.07M]
  ------------------
 5635|       |                /* The variable should also not be included in the locals */
 5636|  1.63k|                pair.sym2 = NULL;
 5637|  1.63k|                janetc_regalloc_touch(&newscope->ra, pair.slot.index);
 5638|  1.63k|            }
 5639|  2.08M|            janet_v_push(newscope->syms, pair);
  ------------------
  |  |  706|  2.08M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  2.08M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  2.08M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  2.06M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  2.06M|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  2.06M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  2.06M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 13.5k, False: 2.06M]
  |  |  |  |  |  |  |  Branch (717:50): [True: 91.9k, False: 1.97M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   105k|#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))
  |  |  ------------------
  |  |  |  |  715|  2.08M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  2.08M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5640|  2.08M|        }
 5641|  28.4k|    }
 5642|       |
 5643|       |    /* Free the old scope */
 5644|   746k|    janet_v_free(oldscope->consts);
  ------------------
  |  |  705|   746k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  713|   244k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (705:34): [True: 244k, False: 501k]
  |  |  ------------------
  ------------------
 5645|   746k|    janet_v_free(oldscope->syms);
  ------------------
  |  |  705|   746k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  713|  96.8k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (705:34): [True: 96.8k, False: 649k]
  |  |  ------------------
  ------------------
 5646|   746k|    janet_v_free(oldscope->envs);
  ------------------
  |  |  705|   746k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  713|  23.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (705:34): [True: 23.4k, False: 722k]
  |  |  ------------------
  ------------------
 5647|   746k|    janet_v_free(oldscope->defs);
  ------------------
  |  |  705|   746k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  713|   364k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (705:34): [True: 364k, False: 381k]
  |  |  ------------------
  ------------------
 5648|   746k|    janetc_regalloc_deinit(&oldscope->ra);
 5649|   746k|    janetc_regalloc_deinit(&oldscope->ua);
 5650|       |    /* Update pointer */
 5651|   746k|    if (newscope)
  ------------------
  |  Branch (5651:9): [True: 508k, False: 238k]
  ------------------
 5652|   508k|        newscope->child = NULL;
 5653|   746k|    c->scope = newscope;
 5654|   746k|}
janetc_popscope_keepslot:
 5657|  8.24k|void janetc_popscope_keepslot(JanetCompiler *c, JanetSlot retslot) {
 5658|  8.24k|    JanetScope *scope;
 5659|  8.24k|    janetc_popscope(c);
 5660|  8.24k|    scope = c->scope;
 5661|  8.24k|    if (scope && retslot.envindex < 0 && retslot.index >= 0) {
  ------------------
  |  Branch (5661:9): [True: 8.24k, False: 0]
  |  Branch (5661:18): [True: 8.17k, False: 69]
  |  Branch (5661:42): [True: 1.61k, False: 6.55k]
  ------------------
 5662|  1.61k|        janetc_regalloc_touch(&scope->ra, retslot.index);
 5663|  1.61k|    }
 5664|  8.24k|}
janetc_shadowcheck:
 5701|  1.60M|Shadowing janetc_shadowcheck(JanetCompiler *c, const uint8_t *sym) {
 5702|       |    /* Check locals */
 5703|  1.60M|    JanetScope *scope = c->scope;
 5704|  1.60M|    int is_global = (scope->flags & JANET_SCOPE_TOP);
  ------------------
  |  | 1005|  1.60M|#define JANET_SCOPE_TOP 4
  ------------------
 5705|  1.79M|    while (scope) {
  ------------------
  |  Branch (5705:12): [True: 1.77M, False: 25.8k]
  ------------------
 5706|  1.77M|        int32_t len = janet_v_count(scope->syms);
  ------------------
  |  |  708|  1.77M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  1.69M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  1.69M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 1.69M, False: 77.7k]
  |  |  ------------------
  ------------------
 5707|  27.0M|        for (int32_t i = len - 1; i >= 0; i--) {
  ------------------
  |  Branch (5707:35): [True: 26.8M, False: 197k]
  ------------------
 5708|  26.8M|            SymPair *pair = scope->syms + i;
 5709|  26.8M|            if (pair->sym == sym) {
  ------------------
  |  Branch (5709:17): [True: 1.57M, False: 25.3M]
  ------------------
 5710|  1.57M|                if (is_global) {
  ------------------
  |  Branch (5710:21): [True: 245, False: 1.57M]
  ------------------
 5711|       |                    /* This can happen in a top level form like (def [x [x y]] [1 [2 3]])` where a symbol is reused in one expression */
 5712|       |                    /* janet_assert(!is_global, "shadowing analysis is incorrect. compiler bug"); */
 5713|    245|                    return JANETC_SHADOW_GLOBAL_HIDES_GLOBAL;
 5714|    245|                }
 5715|  1.57M|                return JANETC_SHADOW_LOCAL_HIDES_LOCAL;
 5716|  1.57M|            }
 5717|  26.8M|        }
 5718|   197k|        scope = scope->parent;
 5719|   197k|    }
 5720|       |    /* Check globals */
 5721|  25.8k|    JanetBinding binding = janet_resolve_ext(c->env, sym);
 5722|  25.8k|    if (binding.type == JANET_BINDING_MACRO || binding.type == JANET_BINDING_DYNAMIC_MACRO) {
  ------------------
  |  Branch (5722:9): [True: 3.08k, False: 22.7k]
  |  Branch (5722:48): [True: 0, False: 22.7k]
  ------------------
 5723|  3.08k|        return JANETC_SHADOW_MACRO;
 5724|  22.7k|    } else if (binding.type == JANET_BINDING_NONE) {
  ------------------
  |  Branch (5724:16): [True: 21.0k, False: 1.64k]
  ------------------
 5725|  21.0k|        return JANETC_SHADOW_NONE;
 5726|  21.0k|    } else {
 5727|  1.64k|        if (is_global) {
  ------------------
  |  Branch (5727:13): [True: 25, False: 1.62k]
  ------------------
 5728|     25|            return JANETC_SHADOW_GLOBAL_HIDES_GLOBAL;
 5729|  1.62k|        } else {
 5730|  1.62k|            return JANETC_SHADOW_LOCAL_HIDES_GLOBAL;
 5731|  1.62k|        }
 5732|  1.64k|    }
 5733|  25.8k|}
janetc_resolve:
 5738|   198k|    const uint8_t *sym) {
 5739|       |
 5740|   198k|    JanetSlot ret = janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|   198k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|   198k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   198k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   198k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5741|   198k|    JanetScope *scope = c->scope;
 5742|   198k|    SymPair *pair;
 5743|   198k|    int foundlocal = 1;
 5744|   198k|    int unused = 0;
 5745|       |
 5746|       |    /* Search scopes for symbol, starting from top */
 5747|  2.12M|    while (scope) {
  ------------------
  |  Branch (5747:12): [True: 2.03M, False: 89.4k]
  ------------------
 5748|  2.03M|        int32_t i, len;
 5749|  2.03M|        if (scope->flags & JANET_SCOPE_UNUSED)
  ------------------
  |  | 1006|  2.03M|#define JANET_SCOPE_UNUSED 8
  ------------------
  |  Branch (5749:13): [True: 30.6k, False: 2.00M]
  ------------------
 5750|  30.6k|            unused = 1;
 5751|  2.03M|        len = janet_v_count(scope->syms);
  ------------------
  |  |  708|  2.03M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|   653k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|   653k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 653k, False: 1.38M]
  |  |  ------------------
  ------------------
 5752|       |        /* Search in reverse order */
 5753|  11.0M|        for (i = len - 1; i >= 0; i--) {
  ------------------
  |  Branch (5753:27): [True: 9.09M, False: 1.92M]
  ------------------
 5754|  9.09M|            pair = scope->syms + i;
 5755|  9.09M|            if (pair->sym == sym) {
  ------------------
  |  Branch (5755:17): [True: 109k, False: 8.98M]
  ------------------
 5756|   109k|                ret = pair->slot;
 5757|   109k|                pair->referenced = 1;
 5758|   109k|                goto found;
 5759|   109k|            }
 5760|  9.09M|        }
 5761|  1.92M|        if (scope->flags & JANET_SCOPE_FUNCTION)
  ------------------
  |  | 1003|  1.92M|#define JANET_SCOPE_FUNCTION 1
  ------------------
  |  Branch (5761:13): [True: 355k, False: 1.56M]
  ------------------
 5762|   355k|            foundlocal = 0;
 5763|  1.92M|        scope = scope->parent;
 5764|  1.92M|    }
 5765|       |
 5766|       |    /* Symbol not found - check for global */
 5767|  89.4k|    {
 5768|  89.4k|        JanetBinding binding = janet_resolve_ext(c->env, sym);
 5769|  89.4k|        if (binding.type == JANET_BINDING_NONE) {
  ------------------
  |  Branch (5769:13): [True: 1.48k, False: 87.9k]
  ------------------
 5770|  1.48k|            Janet handler = janet_table_get_keyword(c->env, "missing-symbol");
 5771|  1.48k|            switch (janet_type(handler)) {
  ------------------
  |  |  790|  1.48k|    (isnan((x).number) \
  |  |  791|  1.48k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  1.48k|        : JANET_NUMBER)
  ------------------
  |  Branch (5771:21): [True: 1.48k, False: 0]
  ------------------
 5772|  1.48k|                case JANET_NIL:
  ------------------
  |  Branch (5772:17): [True: 1.48k, False: 0]
  ------------------
 5773|  1.48k|                    break;
 5774|      0|                case JANET_FUNCTION:
  ------------------
  |  Branch (5774:17): [True: 0, False: 1.48k]
  ------------------
 5775|      0|                    if (!lookup_missing(c, sym, janet_unwrap_function(handler), &binding))
  ------------------
  |  |  863|      0|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (5775:25): [True: 0, False: 0]
  ------------------
 5776|      0|                        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5777|      0|                    break;
 5778|      0|                default:
  ------------------
  |  Branch (5778:17): [True: 0, False: 1.48k]
  ------------------
 5779|      0|                    janetc_error(c, janet_formatc("invalid lookup handler %V", handler));
 5780|      0|                    return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5781|  1.48k|            }
 5782|  1.48k|        }
 5783|       |
 5784|  89.4k|        switch (binding.type) {
 5785|      0|            default:
  ------------------
  |  Branch (5785:13): [True: 0, False: 89.4k]
  ------------------
 5786|  1.48k|            case JANET_BINDING_NONE:
  ------------------
  |  Branch (5786:13): [True: 1.48k, False: 87.9k]
  ------------------
 5787|  1.48k|                janetc_error(c, janet_formatc("unknown symbol %q", janet_wrap_symbol(sym)));
  ------------------
  |  |  844|  1.48k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  823|  1.48k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.48k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.48k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5788|  1.48k|                return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|  1.48k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  1.48k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.48k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.48k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5789|  36.1k|            case JANET_BINDING_DEF:
  ------------------
  |  Branch (5789:13): [True: 36.1k, False: 53.2k]
  ------------------
 5790|  87.9k|            case JANET_BINDING_MACRO: /* Macro should function like defs when not in calling pos */
  ------------------
  |  Branch (5790:13): [True: 51.7k, False: 37.7k]
  ------------------
 5791|  87.9k|                ret = janetc_cslot(binding.value);
 5792|  87.9k|                break;
 5793|      0|            case JANET_BINDING_DYNAMIC_DEF:
  ------------------
  |  Branch (5793:13): [True: 0, False: 89.4k]
  ------------------
 5794|      0|            case JANET_BINDING_DYNAMIC_MACRO:
  ------------------
  |  Branch (5794:13): [True: 0, False: 89.4k]
  ------------------
 5795|      0|                ret = janetc_cslot(binding.value);
 5796|      0|                ret.flags |= JANET_SLOT_REF | JANET_SLOT_NAMED | JANET_SLOTTYPE_ANY;
  ------------------
  |  |  986|      0|#define JANET_SLOT_REF 0x80000
  ------------------
                              ret.flags |= JANET_SLOT_REF | JANET_SLOT_NAMED | JANET_SLOTTYPE_ANY;
  ------------------
  |  |  984|      0|#define JANET_SLOT_NAMED 0x20000
  ------------------
                              ret.flags |= JANET_SLOT_REF | JANET_SLOT_NAMED | JANET_SLOTTYPE_ANY;
  ------------------
  |  |  993|      0|#define JANET_SLOTTYPE_ANY 0xFFFF
  ------------------
 5797|      0|                ret.flags &= ~JANET_SLOT_CONSTANT;
  ------------------
  |  |  983|      0|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
 5798|      0|                break;
 5799|     22|            case JANET_BINDING_VAR: {
  ------------------
  |  Branch (5799:13): [True: 22, False: 89.4k]
  ------------------
 5800|     22|                ret = janetc_cslot(binding.value);
 5801|     22|                ret.flags |= JANET_SLOT_REF | JANET_SLOT_NAMED | JANET_SLOT_MUTABLE | JANET_SLOTTYPE_ANY;
  ------------------
  |  |  986|     22|#define JANET_SLOT_REF 0x80000
  ------------------
                              ret.flags |= JANET_SLOT_REF | JANET_SLOT_NAMED | JANET_SLOT_MUTABLE | JANET_SLOTTYPE_ANY;
  ------------------
  |  |  984|     22|#define JANET_SLOT_NAMED 0x20000
  ------------------
                              ret.flags |= JANET_SLOT_REF | JANET_SLOT_NAMED | JANET_SLOT_MUTABLE | JANET_SLOTTYPE_ANY;
  ------------------
  |  |  985|     22|#define JANET_SLOT_MUTABLE 0x40000
  ------------------
                              ret.flags |= JANET_SLOT_REF | JANET_SLOT_NAMED | JANET_SLOT_MUTABLE | JANET_SLOTTYPE_ANY;
  ------------------
  |  |  993|     22|#define JANET_SLOTTYPE_ANY 0xFFFF
  ------------------
 5802|     22|                ret.flags &= ~JANET_SLOT_CONSTANT;
  ------------------
  |  |  983|     22|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
 5803|     22|                break;
 5804|      0|            }
 5805|  89.4k|        }
 5806|  87.9k|        JanetCompileLintLevel depLevel = JANET_C_LINT_RELAXED;
 5807|  87.9k|        switch (binding.deprecation) {
  ------------------
  |  Branch (5807:17): [True: 87.9k, False: 0]
  ------------------
 5808|  87.9k|            case JANET_BINDING_DEP_NONE:
  ------------------
  |  Branch (5808:13): [True: 87.9k, False: 0]
  ------------------
 5809|  87.9k|                break;
 5810|      0|            case JANET_BINDING_DEP_RELAXED:
  ------------------
  |  Branch (5810:13): [True: 0, False: 87.9k]
  ------------------
 5811|      0|                depLevel = JANET_C_LINT_RELAXED;
 5812|      0|                break;
 5813|      0|            case JANET_BINDING_DEP_NORMAL:
  ------------------
  |  Branch (5813:13): [True: 0, False: 87.9k]
  ------------------
 5814|      0|                depLevel = JANET_C_LINT_NORMAL;
 5815|      0|                break;
 5816|      0|            case JANET_BINDING_DEP_STRICT:
  ------------------
  |  Branch (5816:13): [True: 0, False: 87.9k]
  ------------------
 5817|      0|                depLevel = JANET_C_LINT_STRICT;
 5818|      0|                break;
 5819|  87.9k|        }
 5820|  87.9k|        if (binding.deprecation != JANET_BINDING_DEP_NONE) {
  ------------------
  |  Branch (5820:13): [True: 0, False: 87.9k]
  ------------------
 5821|      0|            janetc_lintf(c, depLevel, "%q is deprecated", janet_wrap_symbol(sym));
  ------------------
  |  |  844|      0|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5822|      0|        }
 5823|  87.9k|        return ret;
 5824|  87.9k|    }
 5825|       |
 5826|       |    /* Symbol was found */
 5827|   109k|found:
 5828|       |
 5829|       |    /* Constants can be returned immediately (they are stateless) */
 5830|   109k|    if (ret.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF))
  ------------------
  |  |  983|   109k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
                  if (ret.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF))
  ------------------
  |  |  986|   109k|#define JANET_SLOT_REF 0x80000
  ------------------
  |  Branch (5830:9): [True: 0, False: 109k]
  ------------------
 5831|      0|        return ret;
 5832|       |
 5833|       |    /* Unused references and locals shouldn't add captured envs. */
 5834|   109k|    if (unused || foundlocal) {
  ------------------
  |  Branch (5834:9): [True: 89, False: 109k]
  |  Branch (5834:19): [True: 96.5k, False: 12.5k]
  ------------------
 5835|  96.5k|        ret.envindex = -1;
 5836|  96.5k|        return ret;
 5837|  96.5k|    }
 5838|       |
 5839|       |    /* non-local scope needs to expose its environment */
 5840|  12.5k|    JanetScope *original_scope = scope;
 5841|  12.5k|    pair->keep = 1;
 5842|  12.5k|    pair->referenced = 1;
 5843|  33.2k|    while (scope && !(scope->flags & JANET_SCOPE_FUNCTION))
  ------------------
  |  | 1003|  33.2k|#define JANET_SCOPE_FUNCTION 1
  ------------------
  |  Branch (5843:12): [True: 33.2k, False: 0]
  |  Branch (5843:21): [True: 20.7k, False: 12.5k]
  ------------------
 5844|  20.7k|        scope = scope->parent;
 5845|  12.5k|    janet_assert(scope, "invalid scopes");
  ------------------
  |  |  386|  12.5k|#define janet_assert(c, m) do { \
  |  |  387|  12.5k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 12.5k]
  |  |  ------------------
  |  |  388|  12.5k|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
 5846|  12.5k|    scope->flags |= JANET_SCOPE_ENV;
  ------------------
  |  | 1004|  12.5k|#define JANET_SCOPE_ENV 2
  ------------------
 5847|       |
 5848|       |    /* In the function scope, allocate the slot as an upvalue */
 5849|  12.5k|    janetc_regalloc_touch(&scope->ua, ret.index);
 5850|       |
 5851|       |    /* Iterate through child scopes and make sure environment is propagated */
 5852|  12.5k|    scope = scope->child;
 5853|       |
 5854|       |    /* Propagate env up to current scope */
 5855|  12.5k|    int32_t envindex = -1;
 5856|  64.7k|    while (scope) {
  ------------------
  |  Branch (5856:12): [True: 52.2k, False: 12.5k]
  ------------------
 5857|  52.2k|        if (scope->flags & JANET_SCOPE_FUNCTION) {
  ------------------
  |  | 1003|  52.2k|#define JANET_SCOPE_FUNCTION 1
  ------------------
  |  Branch (5857:13): [True: 28.9k, False: 23.3k]
  ------------------
 5858|  28.9k|            int32_t j, len;
 5859|  28.9k|            int scopefound = 0;
 5860|       |            /* Check if scope already has env. If so, break */
 5861|  28.9k|            len = janet_v_count(scope->envs);
  ------------------
  |  |  708|  28.9k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  5.50k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  5.50k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 5.50k, False: 23.4k]
  |  |  ------------------
  ------------------
 5862|  29.0k|            for (j = 0; j < len; j++) {
  ------------------
  |  Branch (5862:25): [True: 5.54k, False: 23.4k]
  ------------------
 5863|  5.54k|                if (scope->envs[j].envindex == envindex) {
  ------------------
  |  Branch (5863:21): [True: 5.42k, False: 116]
  ------------------
 5864|  5.42k|                    scopefound = 1;
 5865|  5.42k|                    envindex = j;
 5866|  5.42k|                    break;
 5867|  5.42k|                }
 5868|  5.54k|            }
 5869|       |            /* Add the environment if it is not already referenced */
 5870|  28.9k|            if (!scopefound) {
  ------------------
  |  Branch (5870:17): [True: 23.4k, False: 5.42k]
  ------------------
 5871|  23.4k|                len = janet_v_count(scope->envs);
  ------------------
  |  |  708|  23.4k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|     84|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|     84|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 84, False: 23.4k]
  |  |  ------------------
  ------------------
 5872|  23.4k|                JanetEnvRef ref;
 5873|  23.4k|                ref.envindex = envindex;
 5874|  23.4k|                ref.scope = original_scope;
 5875|  23.4k|                janet_v_push(scope->envs, ref);
  ------------------
  |  |  706|  23.4k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  23.4k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  23.4k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|     84|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|     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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|     84|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|     84|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 23.4k, False: 84]
  |  |  |  |  |  |  |  Branch (717:50): [True: 84, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  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))
  |  |  ------------------
  |  |  |  |  715|  23.4k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  23.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5876|  23.4k|                envindex = len;
 5877|  23.4k|            }
 5878|  28.9k|        }
 5879|  52.2k|        scope = scope->child;
 5880|  52.2k|    }
 5881|       |
 5882|  12.5k|    ret.envindex = envindex;
 5883|  12.5k|    return ret;
 5884|  12.5k|}
janetc_return:
 5887|   711k|JanetSlot janetc_return(JanetCompiler *c, JanetSlot s) {
 5888|   711k|    if (!(s.flags & JANET_SLOT_RETURNED)) {
  ------------------
  |  |  987|   711k|#define JANET_SLOT_RETURNED 0x100000
  ------------------
  |  Branch (5888:9): [True: 705k, False: 5.11k]
  ------------------
 5889|   705k|        if (s.flags & JANET_SLOT_CONSTANT && janet_checktype(s.constant, JANET_NIL))
  ------------------
  |  |  983|  1.41M|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
                      if (s.flags & JANET_SLOT_CONSTANT && janet_checktype(s.constant, JANET_NIL))
  ------------------
  |  |  801|   108k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 1.22k, False: 107k]
  |  |  |  Branch (801:6): [Folded, False: 108k]
  |  |  ------------------
  |  |  802|   108k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   108k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   108k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   108k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   108k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   108k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5889:13): [True: 108k, False: 597k]
  ------------------
 5890|  1.22k|            janetc_emit(c, JOP_RETURN_NIL);
 5891|   704k|        else
 5892|   704k|            janetc_emit_s(c, JOP_RETURN, s, 0);
 5893|   705k|        s.flags |= JANET_SLOT_RETURNED;
  ------------------
  |  |  987|   705k|#define JANET_SLOT_RETURNED 0x100000
  ------------------
 5894|   705k|    }
 5895|   711k|    return s;
 5896|   711k|}
janetc_gettarget:
 5899|  1.57M|JanetSlot janetc_gettarget(JanetFopts opts) {
 5900|  1.57M|    JanetSlot slot;
 5901|  1.57M|    if ((opts.flags & JANET_FOPTS_HINT) &&
  ------------------
  |  | 1092|  1.57M|#define JANET_FOPTS_HINT 0x20000
  ------------------
  |  Branch (5901:9): [True: 1.79k, False: 1.56M]
  ------------------
 5902|  1.79k|            (opts.hint.envindex < 0) &&
  ------------------
  |  Branch (5902:13): [True: 1.01k, False: 784]
  ------------------
 5903|  1.01k|            (opts.hint.index >= 0 && opts.hint.index <= 0xFF)) {
  ------------------
  |  Branch (5903:14): [True: 1.01k, False: 0]
  |  Branch (5903:38): [True: 880, False: 135]
  ------------------
 5904|    880|        slot = opts.hint;
 5905|  1.56M|    } else {
 5906|  1.56M|        slot.envindex = -1;
 5907|  1.56M|        slot.constant = janet_wrap_nil();
  ------------------
  |  |  826|  1.56M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  1.56M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.56M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.56M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5908|  1.56M|        slot.flags = 0;
 5909|  1.56M|        slot.index = janetc_allocfar(opts.compiler);
 5910|  1.56M|    }
 5911|  1.57M|    return slot;
 5912|  1.57M|}
janetc_toslots:
 5915|  28.2k|JanetSlot *janetc_toslots(JanetCompiler *c, const Janet *vals, int32_t len) {
 5916|  28.2k|    int32_t i;
 5917|  28.2k|    JanetSlot *ret = NULL;
 5918|  28.2k|    JanetFopts subopts = janetc_fopts_default(c);
 5919|  28.2k|    subopts.flags |= JANET_FOPTS_ACCEPT_SPLICE;
  ------------------
  |  | 1094|  28.2k|#define JANET_FOPTS_ACCEPT_SPLICE 0x80000
  ------------------
 5920|   294k|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (5920:17): [True: 266k, False: 28.2k]
  ------------------
 5921|       |        janet_v_push(ret, janetc_value(subopts, vals[i]));
  ------------------
  |  |  706|   266k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|   266k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|   266k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|   240k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|   240k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|   240k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|   240k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 25.7k, False: 240k]
  |  |  |  |  |  |  |  Branch (717:50): [True: 32.1k, False: 208k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  57.8k|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  715|   266k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|   266k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5922|   266k|    }
 5923|  28.2k|    return ret;
 5924|  28.2k|}
janetc_toslotskv:
 5927|  5.92k|JanetSlot *janetc_toslotskv(JanetCompiler *c, Janet ds) {
 5928|  5.92k|    JanetSlot *ret = NULL;
 5929|  5.92k|    JanetFopts subopts = janetc_fopts_default(c);
 5930|  5.92k|    subopts.flags |= JANET_FOPTS_ACCEPT_SPLICE;
  ------------------
  |  | 1094|  5.92k|#define JANET_FOPTS_ACCEPT_SPLICE 0x80000
  ------------------
 5931|  5.92k|    const JanetKV *kvs = NULL;
 5932|  5.92k|    int32_t cap = 0, len = 0;
 5933|  5.92k|    janet_dictionary_view(ds, &kvs, &len, &cap);
 5934|       |    /* Sort keys for stability of order? */
 5935|  5.92k|    int32_t *index_buf;
 5936|  5.92k|    int32_t index_buf_stack[32];
 5937|  5.92k|    int32_t *index_buf_heap = NULL;
 5938|  5.92k|    if (len < 32) {
  ------------------
  |  Branch (5938:9): [True: 5.91k, False: 12]
  ------------------
 5939|  5.91k|        index_buf = index_buf_stack;
 5940|  5.91k|    } else {
 5941|     12|        index_buf_heap = janet_smalloc(sizeof(int32_t) * len);
 5942|     12|        index_buf = index_buf_heap;
 5943|     12|    }
 5944|  5.92k|    if (len) janet_sorted_keys(kvs, cap, index_buf);
  ------------------
  |  Branch (5944:9): [True: 223, False: 5.70k]
  ------------------
 5945|  8.10k|    for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (5945:25): [True: 2.18k, False: 5.92k]
  ------------------
 5946|  2.18k|        janet_v_push(ret, janetc_value(subopts, kvs[index_buf[i]].key));
  ------------------
  |  |  706|  2.18k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  2.18k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  2.18k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  1.96k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  1.96k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  1.96k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  1.96k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 223, False: 1.96k]
  |  |  |  |  |  |  |  Branch (717:50): [True: 193, False: 1.76k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    416|#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))
  |  |  ------------------
  |  |  |  |  715|  2.18k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  2.18k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5947|  2.18k|        janet_v_push(ret, janetc_value(subopts, kvs[index_buf[i]].value));
  ------------------
  |  |  706|  2.18k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  2.18k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  2.18k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  2.18k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  2.18k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  2.18k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  2.18k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 0, False: 2.18k]
  |  |  |  |  |  |  |  Branch (717:50): [True: 725, False: 1.45k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    725|#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))
  |  |  ------------------
  |  |  |  |  715|  2.18k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  2.18k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5948|  2.18k|    }
 5949|  5.92k|    if (index_buf_heap) janet_sfree(index_buf_heap);
  ------------------
  |  Branch (5949:9): [True: 12, False: 5.91k]
  ------------------
 5950|  5.92k|    return ret;
 5951|  5.92k|}
janetc_pushslots:
 5956|  1.09M|int32_t janetc_pushslots(JanetCompiler *c, JanetSlot *slots) {
 5957|  1.09M|    int32_t i;
 5958|  1.09M|    int32_t count = janet_v_count(slots);
  ------------------
  |  |  708|  1.09M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  1.01M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  1.01M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 1.01M, False: 77.3k]
  |  |  ------------------
  ------------------
 5959|  1.09M|    int32_t min_arity = 0;
 5960|  1.09M|    int has_splice = 0;
 5961|  2.30M|    for (i = 0; i < count;) {
  ------------------
  |  Branch (5961:17): [True: 1.21M, False: 1.09M]
  ------------------
 5962|  1.21M|        if (slots[i].flags & JANET_SLOT_SPLICED) {
  ------------------
  |  |  991|  1.21M|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
  |  Branch (5962:13): [True: 987, False: 1.21M]
  ------------------
 5963|    987|            janetc_emit_s(c, JOP_PUSH_ARRAY, slots[i], 0);
 5964|    987|            i++;
 5965|    987|            has_splice = 1;
 5966|  1.21M|        } else if (i + 1 == count) {
  ------------------
  |  Branch (5966:20): [True: 74.1k, False: 1.14M]
  ------------------
 5967|  74.1k|            janetc_emit_s(c, JOP_PUSH, slots[i], 0);
 5968|  74.1k|            i++;
 5969|  74.1k|            min_arity++;
 5970|  1.14M|        } else if (slots[i + 1].flags & JANET_SLOT_SPLICED) {
  ------------------
  |  |  991|  1.14M|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
  |  Branch (5970:20): [True: 357, False: 1.14M]
  ------------------
 5971|    357|            janetc_emit_s(c, JOP_PUSH, slots[i], 0);
 5972|    357|            janetc_emit_s(c, JOP_PUSH_ARRAY, slots[i + 1], 0);
 5973|    357|            i += 2;
 5974|    357|            min_arity++;
 5975|    357|            has_splice = 1;
 5976|  1.14M|        } else if (i + 2 == count) {
  ------------------
  |  Branch (5976:20): [True: 937k, False: 204k]
  ------------------
 5977|   937k|            janetc_emit_ss(c, JOP_PUSH_2, slots[i], slots[i + 1], 0);
 5978|   937k|            i += 2;
 5979|   937k|            min_arity += 2;
 5980|   937k|        } else if (slots[i + 2].flags & JANET_SLOT_SPLICED) {
  ------------------
  |  |  991|   204k|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
  |  Branch (5980:20): [True: 1.12k, False: 203k]
  ------------------
 5981|  1.12k|            janetc_emit_ss(c, JOP_PUSH_2, slots[i], slots[i + 1], 0);
 5982|  1.12k|            janetc_emit_s(c, JOP_PUSH_ARRAY, slots[i + 2], 0);
 5983|  1.12k|            i += 3;
 5984|  1.12k|            min_arity += 2;
 5985|  1.12k|            has_splice = 1;
 5986|   203k|        } else {
 5987|   203k|            janetc_emit_sss(c, JOP_PUSH_3, slots[i], slots[i + 1], slots[i + 2], 0);
 5988|   203k|            i += 3;
 5989|   203k|            min_arity += 3;
 5990|   203k|        }
 5991|  1.21M|    }
 5992|  1.09M|    return has_splice ? (-1 - min_arity) : min_arity;
  ------------------
  |  Branch (5992:12): [True: 719, False: 1.09M]
  ------------------
 5993|  1.09M|}
janetc_freeslots:
 6006|  1.11M|void janetc_freeslots(JanetCompiler *c, JanetSlot *slots) {
 6007|  1.11M|    int32_t i;
 6008|  3.78M|    for (i = 0; i < janet_v_count(slots); i++) {
  ------------------
  |  |  708|  3.78M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  3.70M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  3.70M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 3.70M, False: 83.8k]
  |  |  ------------------
  ------------------
  |  Branch (6008:17): [True: 2.67M, False: 1.11M]
  ------------------
 6009|  2.67M|        janetc_freeslot(c, slots[i]);
 6010|  2.67M|    }
 6011|       |    janet_v_free(slots);
  ------------------
  |  |  705|  1.11M|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  713|  1.02M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (705:34): [True: 1.02M, False: 83.8k]
  |  |  ------------------
  ------------------
 6012|  1.11M|}
janetc_throwaway:
 6017|    712|void janetc_throwaway(JanetFopts opts, Janet x) {
 6018|    712|    JanetCompiler *c = opts.compiler;
 6019|    712|    JanetScope unusedScope;
 6020|    712|    int32_t bufstart = janet_v_count(c->buffer);
  ------------------
  |  |  708|    712|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|    698|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|    698|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 698, False: 14]
  |  |  ------------------
  ------------------
 6021|    712|    int32_t mapbufstart = janet_v_count(c->mapbuffer);
  ------------------
  |  |  708|    712|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|    698|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|    698|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 698, False: 14]
  |  |  ------------------
  ------------------
 6022|    712|    janetc_scope(&unusedScope, c, JANET_SCOPE_UNUSED, "unused");
  ------------------
  |  | 1006|    712|#define JANET_SCOPE_UNUSED 8
  ------------------
 6023|    712|    janetc_value(opts, x);
 6024|    712|    janetc_lintf(c, JANET_C_LINT_STRICT, "dead code, consider removing %.4q", x);
 6025|    712|    janetc_popscope(c);
 6026|    712|    if (c->buffer) {
  ------------------
  |  Branch (6026:9): [True: 698, False: 14]
  ------------------
 6027|    698|        janet_v__cnt(c->buffer) = bufstart;
  ------------------
  |  |  715|    698|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  ------------------
  |  |  |  |  713|    698|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
 6028|    698|        if (c->mapbuffer)
  ------------------
  |  Branch (6028:13): [True: 698, False: 0]
  ------------------
 6029|    698|            janet_v__cnt(c->mapbuffer) = mapbufstart;
  ------------------
  |  |  715|    698|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  ------------------
  |  |  |  |  713|    698|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
 6030|    698|    }
 6031|    712|}
janetc_value:
 6319|  1.20M|JanetSlot janetc_value(JanetFopts opts, Janet x) {
 6320|  1.20M|    JanetSlot ret;
 6321|  1.20M|    JanetCompiler *c = opts.compiler;
 6322|  1.20M|    JanetSourceMapping last_mapping = c->current_mapping;
 6323|  1.20M|    c->recursion_guard--;
 6324|       |
 6325|       |    /* Guard against previous errors and unbounded recursion */
 6326|  1.20M|    if (c->result.status == JANET_COMPILE_ERROR) return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|  63.0k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  63.0k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  63.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  63.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6326:9): [True: 63.0k, False: 1.14M]
  ------------------
 6327|  1.14M|    if (c->recursion_guard <= 0) {
  ------------------
  |  Branch (6327:9): [True: 3, False: 1.14M]
  ------------------
 6328|      3|        janetc_cerror(c, "recursed too deeply");
 6329|      3|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|      3|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      3|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6330|      3|    }
 6331|       |
 6332|       |    /* Macro expand. Also gets possible special form and
 6333|       |     * refines source mapping cursor if possible. */
 6334|  1.14M|    const JanetSpecial *spec = NULL;
 6335|  1.14M|    int macroi = JANET_MAX_MACRO_EXPAND;
  ------------------
  |  |  297|  1.14M|#define JANET_MAX_MACRO_EXPAND 200
  ------------------
 6336|  1.29M|    while (macroi &&
  ------------------
  |  Branch (6336:12): [True: 1.29M, False: 0]
  ------------------
 6337|  1.29M|            c->result.status != JANET_COMPILE_ERROR &&
  ------------------
  |  Branch (6337:13): [True: 1.29M, False: 0]
  ------------------
 6338|  1.29M|            macroexpand1(c, x, &x, &spec))
  ------------------
  |  Branch (6338:13): [True: 151k, False: 1.14M]
  ------------------
 6339|   151k|        macroi--;
 6340|  1.14M|    if (macroi == 0) {
  ------------------
  |  Branch (6340:9): [True: 0, False: 1.14M]
  ------------------
 6341|      0|        janetc_cerror(c, "recursed too deeply in macro expansion");
 6342|      0|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6343|      0|    }
 6344|       |
 6345|       |    /* Special forms */
 6346|  1.14M|    if (spec) {
  ------------------
  |  Branch (6346:9): [True: 848k, False: 291k]
  ------------------
 6347|   848k|        const Janet *tup = janet_unwrap_tuple(x);
  ------------------
  |  |  853|   848k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
 6348|   848k|        ret = spec->compile(opts, janet_tuple_length(tup) - 1, tup + 1);
  ------------------
  |  | 1792|   848k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|   848k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
 6349|   848k|    } else {
 6350|   291k|        switch (janet_type(x)) {
  ------------------
  |  |  790|   291k|    (isnan((x).number) \
  |  |  791|   291k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|   291k|        : JANET_NUMBER)
  ------------------
  |  Branch (6350:17): [True: 274k, False: 17.4k]
  ------------------
 6351|  32.4k|            case JANET_TUPLE: {
  ------------------
  |  Branch (6351:13): [True: 32.4k, False: 259k]
  ------------------
 6352|  32.4k|                JanetFopts subopts = janetc_fopts_default(c);
 6353|  32.4k|                const Janet *tup = janet_unwrap_tuple(x);
  ------------------
  |  |  853|  32.4k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
 6354|       |                /* Empty tuple is tuple literal */
 6355|  32.4k|                if (janet_tuple_length(tup) == 0) {
  ------------------
  |  | 1792|  32.4k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|  32.4k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (6355:21): [True: 5.16k, False: 27.2k]
  ------------------
 6356|  5.16k|                    ret = janetc_cslot(janet_wrap_tuple(janet_tuple_n(NULL, 0)));
  ------------------
  |  |  838|  5.16k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|  5.16k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  5.16k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  5.16k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6357|  27.2k|                } else if (janet_tuple_flag(tup) & JANET_TUPLE_FLAG_BRACKETCTOR) { /* [] tuples are not function call */
  ------------------
  |  | 1796|  27.2k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1790|  27.2k|#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 */
  ------------------
  |  | 1788|  27.2k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (6357:28): [True: 967, False: 26.3k]
  ------------------
 6358|    967|                    ret = janetc_tuple(opts, x);
 6359|  26.3k|                } else {
 6360|       |                    /* Function calls */
 6361|  26.3k|                    JanetSlot head = janetc_value(subopts, tup[0]);
 6362|  26.3k|                    subopts.flags = JANET_FUNCTION | JANET_CFUNCTION;
 6363|  26.3k|                    ret = janetc_call(opts, janetc_toslots(c, tup + 1, janet_tuple_length(tup) - 1), head, tup);
  ------------------
  |  | 1792|  26.3k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|  26.3k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
 6364|  26.3k|                    janetc_freeslot(c, head);
 6365|  26.3k|                }
 6366|  32.4k|                ret.flags &= ~JANET_SLOT_SPLICED;
  ------------------
  |  |  991|  32.4k|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
 6367|  32.4k|            }
 6368|  32.4k|            break;
 6369|       |            /* Data Constructors */
 6370|   196k|            case JANET_SYMBOL:
  ------------------
  |  Branch (6370:13): [True: 196k, False: 95.2k]
  ------------------
 6371|   196k|                ret = janetc_resolve(c, janet_unwrap_symbol(x));
  ------------------
  |  |  859|   196k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
 6372|   196k|                break;
 6373|    174|            case JANET_ARRAY:
  ------------------
  |  Branch (6373:13): [True: 174, False: 291k]
  ------------------
 6374|    174|                ret = janetc_array(opts, x);
 6375|    174|                break;
 6376|  5.87k|            case JANET_STRUCT:
  ------------------
  |  Branch (6376:13): [True: 5.87k, False: 286k]
  ------------------
 6377|  5.87k|                ret = janetc_tablector(opts, x, JOP_MAKE_STRUCT);
 6378|  5.87k|                break;
 6379|     50|            case JANET_TABLE:
  ------------------
  |  Branch (6379:13): [True: 50, False: 291k]
  ------------------
 6380|     50|                ret = janetc_tablector(opts, x, JOP_MAKE_TABLE);
 6381|     50|                break;
 6382|    764|            case JANET_BUFFER:
  ------------------
  |  Branch (6382:13): [True: 764, False: 291k]
  ------------------
 6383|    764|                ret = janetc_bufferctor(opts, x);
 6384|    764|                break;
 6385|  55.9k|            default:
  ------------------
  |  Branch (6385:13): [True: 55.9k, False: 236k]
  ------------------
 6386|  55.9k|                ret = janetc_cslot(x);
 6387|  55.9k|                break;
 6388|   291k|        }
 6389|   291k|    }
 6390|       |
 6391|  1.14M|    if (c->result.status == JANET_COMPILE_ERROR)
  ------------------
  |  Branch (6391:9): [True: 28.9k, False: 1.11M]
  ------------------
 6392|  28.9k|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|  28.9k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  28.9k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  28.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  28.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6393|  1.11M|    if (opts.flags & JANET_FOPTS_TAIL)
  ------------------
  |  | 1091|  1.11M|#define JANET_FOPTS_TAIL 0x10000
  ------------------
  |  Branch (6393:9): [True: 711k, False: 400k]
  ------------------
 6394|   711k|        ret = janetc_return(c, ret);
 6395|  1.11M|    if (opts.flags & JANET_FOPTS_HINT) {
  ------------------
  |  | 1092|  1.11M|#define JANET_FOPTS_HINT 0x20000
  ------------------
  |  Branch (6395:9): [True: 1.88k, False: 1.10M]
  ------------------
 6396|  1.88k|        janetc_copy(c, opts.hint, ret);
 6397|  1.88k|        ret = opts.hint;
 6398|  1.88k|    }
 6399|  1.11M|    c->current_mapping = last_mapping;
 6400|  1.11M|    c->recursion_guard++;
 6401|  1.11M|    return ret;
 6402|  1.14M|}
janet_def_addflags:
 6405|   702k|void janet_def_addflags(JanetFuncDef *def) {
 6406|   702k|    int32_t set_flags = 0;
 6407|   702k|    int32_t unset_flags = 0;
 6408|       |    /* pos checks */
 6409|   702k|    if (def->name)              set_flags |= JANET_FUNCDEF_FLAG_HASNAME;
  ------------------
  |  | 1091|   702k|#define JANET_FUNCDEF_FLAG_HASNAME 0x80000
  ------------------
  |  Branch (6409:9): [True: 702k, False: 210]
  ------------------
 6410|   702k|    if (def->source)            set_flags |= JANET_FUNCDEF_FLAG_HASSOURCE;
  ------------------
  |  | 1092|   702k|#define JANET_FUNCDEF_FLAG_HASSOURCE 0x100000
  ------------------
  |  Branch (6410:9): [True: 702k, False: 0]
  ------------------
 6411|   702k|    if (def->defs)              set_flags |= JANET_FUNCDEF_FLAG_HASDEFS;
  ------------------
  |  | 1093|   364k|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (6411:9): [True: 364k, False: 338k]
  ------------------
 6412|   702k|    if (def->environments)      set_flags |= JANET_FUNCDEF_FLAG_HASENVS;
  ------------------
  |  | 1094|   702k|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (6412:9): [True: 702k, False: 0]
  ------------------
 6413|   702k|    if (def->sourcemap)         set_flags |= JANET_FUNCDEF_FLAG_HASSOURCEMAP;
  ------------------
  |  | 1095|   702k|#define JANET_FUNCDEF_FLAG_HASSOURCEMAP 0x800000
  ------------------
  |  Branch (6413:9): [True: 702k, False: 0]
  ------------------
 6414|   702k|    if (def->closure_bitset)    set_flags |= JANET_FUNCDEF_FLAG_HASCLOBITSET;
  ------------------
  |  | 1097|    846|#define JANET_FUNCDEF_FLAG_HASCLOBITSET 0x2000000
  ------------------
  |  Branch (6414:9): [True: 846, False: 701k]
  ------------------
 6415|   702k|    if (def->named_args_count)  set_flags |= JANET_FUNCDEF_FLAG_NAMEDARGS;
  ------------------
  |  | 1098|      0|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (6415:9): [True: 0, False: 702k]
  ------------------
 6416|       |    /* negative checks */
 6417|   702k|    if (!def->name)             unset_flags |= JANET_FUNCDEF_FLAG_HASNAME;
  ------------------
  |  | 1091|    210|#define JANET_FUNCDEF_FLAG_HASNAME 0x80000
  ------------------
  |  Branch (6417:9): [True: 210, False: 702k]
  ------------------
 6418|   702k|    if (!def->source)           unset_flags |= JANET_FUNCDEF_FLAG_HASSOURCE;
  ------------------
  |  | 1092|      0|#define JANET_FUNCDEF_FLAG_HASSOURCE 0x100000
  ------------------
  |  Branch (6418:9): [True: 0, False: 702k]
  ------------------
 6419|   702k|    if (!def->defs)             unset_flags |= JANET_FUNCDEF_FLAG_HASDEFS;
  ------------------
  |  | 1093|   338k|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (6419:9): [True: 338k, False: 364k]
  ------------------
 6420|   702k|    if (!def->environments)     unset_flags |= JANET_FUNCDEF_FLAG_HASENVS;
  ------------------
  |  | 1094|      0|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (6420:9): [True: 0, False: 702k]
  ------------------
 6421|   702k|    if (!def->sourcemap)        unset_flags |= JANET_FUNCDEF_FLAG_HASSOURCEMAP;
  ------------------
  |  | 1095|      0|#define JANET_FUNCDEF_FLAG_HASSOURCEMAP 0x800000
  ------------------
  |  Branch (6421:9): [True: 0, False: 702k]
  ------------------
 6422|   702k|    if (!def->closure_bitset)   unset_flags |= JANET_FUNCDEF_FLAG_HASCLOBITSET;
  ------------------
  |  | 1097|   701k|#define JANET_FUNCDEF_FLAG_HASCLOBITSET 0x2000000
  ------------------
  |  Branch (6422:9): [True: 701k, False: 846]
  ------------------
 6423|   702k|    if (!def->named_args_count) unset_flags |= JANET_FUNCDEF_FLAG_NAMEDARGS;
  ------------------
  |  | 1098|   702k|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (6423:9): [True: 702k, False: 0]
  ------------------
 6424|       |    /* Update flags */
 6425|   702k|    def->flags |= set_flags;
 6426|   702k|    def->flags &= ~unset_flags;
 6427|   702k|}
janetc_pop_funcdef:
 6432|   702k|JanetFuncDef *janetc_pop_funcdef(JanetCompiler *c) {
 6433|   702k|    JanetScope *scope = c->scope;
 6434|   702k|    JanetFuncDef *def = janet_funcdef_alloc();
 6435|   702k|    def->slotcount = scope->ra.max + 1;
 6436|       |
 6437|   702k|    janet_assert(scope->flags & JANET_SCOPE_FUNCTION, "expected function scope");
  ------------------
  |  |  386|   702k|#define janet_assert(c, m) do { \
  |  |  387|   702k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 702k]
  |  |  ------------------
  |  |  388|   702k|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 702k]
  |  |  ------------------
  ------------------
 6438|       |
 6439|       |    /* Copy envs */
 6440|   702k|    def->environments_length = janet_v_count(scope->envs);
  ------------------
  |  |  708|   702k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  23.3k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  23.3k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 23.3k, False: 679k]
  |  |  ------------------
  ------------------
 6441|   702k|    def->environments = janet_malloc(sizeof(int32_t) * def->environments_length);
  ------------------
  |  | 2393|   702k|#define janet_malloc(X) malloc((X))
  ------------------
 6442|   726k|    for (int32_t i = 0; i < def->environments_length; i++) {
  ------------------
  |  Branch (6442:25): [True: 23.4k, False: 702k]
  ------------------
 6443|  23.4k|        def->environments[i] = scope->envs[i].envindex;
 6444|  23.4k|    }
 6445|       |
 6446|   702k|    def->constants_length = janet_v_count(scope->consts);
  ------------------
  |  |  708|   702k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|   244k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|   244k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 244k, False: 458k]
  |  |  ------------------
  ------------------
 6447|   702k|    def->constants = janet_v_flatten(scope->consts);
  ------------------
  |  |  711|   702k|#define janet_v_flatten(v)      (janet_v_flattenmem((v), sizeof(*(v))))
  ------------------
 6448|       |
 6449|   702k|    def->defs_length = janet_v_count(scope->defs);
  ------------------
  |  |  708|   702k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|   364k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|   364k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 364k, False: 338k]
  |  |  ------------------
  ------------------
 6450|   702k|    def->defs = janet_v_flatten(scope->defs);
  ------------------
  |  |  711|   702k|#define janet_v_flatten(v)      (janet_v_flattenmem((v), sizeof(*(v))))
  ------------------
 6451|       |
 6452|       |    /* Copy bytecode (only last chunk) */
 6453|   702k|    def->bytecode_length = janet_v_count(c->buffer) - scope->bytecode_start;
  ------------------
  |  |  708|   702k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|   702k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|   702k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 702k, False: 0]
  |  |  ------------------
  ------------------
 6454|   702k|    if (def->bytecode_length) {
  ------------------
  |  Branch (6454:9): [True: 702k, False: 0]
  ------------------
 6455|   702k|        size_t s = sizeof(int32_t) * (size_t) def->bytecode_length;
 6456|   702k|        def->bytecode = janet_malloc(s);
  ------------------
  |  | 2393|   702k|#define janet_malloc(X) malloc((X))
  ------------------
 6457|   702k|        if (NULL == def->bytecode) {
  ------------------
  |  Branch (6457:13): [True: 0, False: 702k]
  ------------------
 6458|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6459|      0|        }
 6460|   702k|        safe_memcpy(def->bytecode, c->buffer + scope->bytecode_start, s);
 6461|   702k|        janet_v__cnt(c->buffer) = scope->bytecode_start;
  ------------------
  |  |  715|   702k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  ------------------
  |  |  |  |  713|   702k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
 6462|   702k|        if (NULL != c->mapbuffer && c->source) {
  ------------------
  |  Branch (6462:13): [True: 702k, False: 0]
  |  Branch (6462:37): [True: 702k, False: 0]
  ------------------
 6463|   702k|            size_t s = sizeof(JanetSourceMapping) * (size_t) def->bytecode_length;
 6464|   702k|            def->sourcemap = janet_malloc(s);
  ------------------
  |  | 2393|   702k|#define janet_malloc(X) malloc((X))
  ------------------
 6465|   702k|            if (NULL == def->sourcemap) {
  ------------------
  |  Branch (6465:17): [True: 0, False: 702k]
  ------------------
 6466|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6467|      0|            }
 6468|   702k|            safe_memcpy(def->sourcemap, c->mapbuffer + scope->bytecode_start, s);
 6469|   702k|            janet_v__cnt(c->mapbuffer) = scope->bytecode_start;
  ------------------
  |  |  715|   702k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  ------------------
  |  |  |  |  713|   702k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
 6470|   702k|        }
 6471|   702k|    }
 6472|       |
 6473|       |    /* Get source from parser */
 6474|   702k|    def->source = c->source;
 6475|       |
 6476|   702k|    def->arity = 0;
 6477|   702k|    def->min_arity = 0;
 6478|   702k|    def->flags = 0;
 6479|   702k|    if (scope->flags & JANET_SCOPE_ENV) {
  ------------------
  |  | 1004|   702k|#define JANET_SCOPE_ENV 2
  ------------------
  |  Branch (6479:9): [True: 846, False: 701k]
  ------------------
 6480|    846|        def->flags |= JANET_FUNCDEF_FLAG_NEEDSENV;
  ------------------
  |  | 1089|    846|#define JANET_FUNCDEF_FLAG_NEEDSENV 0x20000
  ------------------
 6481|    846|    }
 6482|       |
 6483|       |    /* Copy upvalue bitset */
 6484|   702k|    if (scope->ua.count) {
  ------------------
  |  Branch (6484:9): [True: 846, False: 701k]
  ------------------
 6485|       |        /* Number of u32s we need to create a bitmask for all slots */
 6486|    846|        int32_t slotchunks = (def->slotcount + 31) >> 5;
 6487|       |        /* numchunks is min of slotchunks and scope->ua.count */
 6488|    846|        int32_t numchunks = slotchunks > scope->ua.count ? scope->ua.count : slotchunks;
  ------------------
  |  Branch (6488:29): [True: 152, False: 694]
  ------------------
 6489|    846|        uint32_t *chunks = janet_calloc(slotchunks, sizeof(uint32_t));
  ------------------
  |  | 2399|    846|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
 6490|    846|        if (NULL == chunks) {
  ------------------
  |  Branch (6490:13): [True: 0, False: 846]
  ------------------
 6491|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6492|      0|        }
 6493|    846|        memcpy(chunks, scope->ua.chunks, sizeof(uint32_t) * numchunks);
 6494|       |        /* fprintf(stderr, "slot chunks: %d, scope->ua.count: %d, numchunks: %d\n", slotchunks, scope->ua.count, numchunks); */
 6495|       |        /* Register allocator preallocates some registers [240-255, high 16 bits of chunk index 7], we can ignore those. */
 6496|    846|        if (scope->ua.count > 7 && slotchunks > 7) chunks[7] &= 0xFFFFU;
  ------------------
  |  Branch (6496:13): [True: 257, False: 589]
  |  Branch (6496:36): [True: 174, False: 83]
  ------------------
 6497|    846|        def->closure_bitset = chunks;
 6498|    846|    }
 6499|       |
 6500|       |    /* Capture symbol to local mapping */
 6501|   702k|    JanetSymbolMap *locals = NULL;
 6502|       |
 6503|       |    /* Symbol -> upvalue mapping */
 6504|   702k|    JanetScope *top = c->scope;
 6505|  8.69M|    while (top->parent) top = top->parent;
  ------------------
  |  Branch (6505:12): [True: 7.99M, False: 702k]
  ------------------
 6506|  9.40M|    for (JanetScope *s = top; s != NULL; s = s->child) {
  ------------------
  |  Branch (6506:31): [True: 8.69M, False: 702k]
  ------------------
 6507|  8.87M|        for (int32_t j = 0; j < janet_v_count(scope->envs); j++) {
  ------------------
  |  |  708|  8.87M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|   350k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|   350k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 350k, False: 8.52M]
  |  |  ------------------
  ------------------
  |  Branch (6507:29): [True: 175k, False: 8.69M]
  ------------------
 6508|   175k|            JanetEnvRef ref = scope->envs[j];
 6509|   175k|            JanetScope *upscope = ref.scope;
 6510|   175k|            if (upscope != s) continue;
  ------------------
  |  Branch (6510:17): [True: 152k, False: 23.4k]
  ------------------
 6511|  15.4M|            for (int32_t i = 0; i < janet_v_count(upscope->syms); i++) {
  ------------------
  |  |  708|  15.4M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  15.4M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  15.4M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 15.4M, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (6511:33): [True: 15.4M, False: 23.4k]
  ------------------
 6512|  15.4M|                SymPair pair = upscope->syms[i];
 6513|  15.4M|                if (pair.sym2) {
  ------------------
  |  Branch (6513:21): [True: 15.4M, False: 1.26k]
  ------------------
 6514|  15.4M|                    JanetSymbolMap jsm;
 6515|  15.4M|                    jsm.birth_pc = UINT32_MAX;
 6516|  15.4M|                    jsm.death_pc = j; /* Use death_pc to encode environment index */
 6517|  15.4M|                    jsm.slot_index = pair.slot.index;
 6518|  15.4M|                    jsm.symbol = pair.sym2;
 6519|  15.4M|                    janet_v_push(locals, jsm);
  ------------------
  |  |  706|  15.4M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  15.4M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  15.4M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  15.4M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  15.4M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  15.4M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  15.4M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 23.3k, False: 15.4M]
  |  |  |  |  |  |  |  Branch (717:50): [True: 192k, False: 15.2M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   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))
  |  |  ------------------
  |  |  |  |  715|  15.4M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  15.4M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6520|  15.4M|                }
 6521|  15.4M|            }
 6522|  23.4k|        }
 6523|  8.69M|    }
 6524|       |
 6525|       |    /* Symbol -> slot mapping */
 6526|  5.92M|    for (int32_t i = 0; i < janet_v_count(scope->syms); i++) {
  ------------------
  |  |  708|  5.92M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  5.29M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  5.29M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 5.29M, False: 628k]
  |  |  ------------------
  ------------------
  |  Branch (6526:25): [True: 5.22M, False: 702k]
  ------------------
 6527|  5.22M|        SymPair pair = scope->syms[i];
 6528|  5.22M|        if (pair.sym2) {
  ------------------
  |  Branch (6528:13): [True: 5.21M, False: 1.15k]
  ------------------
 6529|  5.21M|            JanetSymbolMap jsm;
 6530|       |            /* Check for unused symbols */
 6531|  5.21M|            if (pair.referenced == 0 && pair.sym) {
  ------------------
  |  Branch (6531:17): [True: 580k, False: 4.63M]
  |  Branch (6531:41): [True: 550k, False: 29.6k]
  ------------------
 6532|   550k|                janetc_lintf(c, JANET_C_LINT_STRICT, "binding %q is unused", janet_wrap_symbol(pair.sym));
  ------------------
  |  |  844|   550k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  823|   550k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   550k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   550k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6533|   550k|            }
 6534|  5.21M|            if (pair.death_pc == UINT32_MAX) {
  ------------------
  |  Branch (6534:17): [True: 5.18M, False: 30.3k]
  ------------------
 6535|  5.18M|                jsm.death_pc = def->bytecode_length;
 6536|  5.18M|            } else {
 6537|  30.3k|                jsm.death_pc = pair.death_pc - scope->bytecode_start;
 6538|  30.3k|            }
 6539|       |            /* Handle birth_pc == 0 correctly */
 6540|  5.21M|            if ((uint32_t) scope->bytecode_start > pair.birth_pc) {
  ------------------
  |  Branch (6540:17): [True: 2.33M, False: 2.88M]
  ------------------
 6541|  2.33M|                jsm.birth_pc = 0;
 6542|  2.88M|            } else {
 6543|  2.88M|                jsm.birth_pc = pair.birth_pc - scope->bytecode_start;
 6544|  2.88M|            }
 6545|  5.21M|            janet_assert(jsm.birth_pc <= jsm.death_pc, "birth pc after death pc");
  ------------------
  |  |  386|  5.21M|#define janet_assert(c, m) do { \
  |  |  387|  5.21M|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 5.21M]
  |  |  ------------------
  |  |  388|  5.21M|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 5.21M]
  |  |  ------------------
  ------------------
 6546|  5.21M|            janet_assert(jsm.birth_pc < (uint32_t) def->bytecode_length, "bad birth pc");
  ------------------
  |  |  386|  5.21M|#define janet_assert(c, m) do { \
  |  |  387|  5.21M|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 5.21M]
  |  |  ------------------
  |  |  388|  5.21M|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 5.21M]
  |  |  ------------------
  ------------------
 6547|  5.21M|            janet_assert(jsm.death_pc <= (uint32_t) def->bytecode_length, "bad death pc");
  ------------------
  |  |  386|  5.21M|#define janet_assert(c, m) do { \
  |  |  387|  5.21M|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 5.21M]
  |  |  ------------------
  |  |  388|  5.21M|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 5.21M]
  |  |  ------------------
  ------------------
 6548|  5.21M|            jsm.slot_index = pair.slot.index;
 6549|  5.21M|            jsm.symbol = pair.sym2;
 6550|  5.21M|            janet_v_push(locals, jsm);
  ------------------
  |  |  706|  5.21M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  5.21M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  5.21M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  5.14M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  5.14M|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  5.14M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  5.14M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 73.0k, False: 5.14M]
  |  |  |  |  |  |  |  Branch (717:50): [True: 14.3k, False: 5.13M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  87.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))
  |  |  ------------------
  |  |  |  |  715|  5.21M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  5.21M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6551|  5.21M|        }
 6552|  5.22M|    }
 6553|   702k|    def->symbolmap_length = janet_v_count(locals);
  ------------------
  |  |  708|   702k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  96.4k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  96.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 96.4k, False: 606k]
  |  |  ------------------
  ------------------
 6554|   702k|    def->symbolmap = janet_v_flatten(locals);
  ------------------
  |  |  711|   702k|#define janet_v_flatten(v)      (janet_v_flattenmem((v), sizeof(*(v))))
  ------------------
 6555|   702k|    if (def->symbolmap_length) def->flags |= JANET_FUNCDEF_FLAG_HASSYMBOLMAP;
  ------------------
  |  | 1090|  96.4k|#define JANET_FUNCDEF_FLAG_HASSYMBOLMAP 0x40000
  ------------------
  |  Branch (6555:9): [True: 96.4k, False: 606k]
  ------------------
 6556|       |
 6557|       |    /* Pop the scope */
 6558|   702k|    janetc_popscope(c);
 6559|       |
 6560|       |    /* Do basic optimization */
 6561|   702k|    janet_bytecode_movopt(def);
 6562|   702k|    janet_bytecode_remove_noops(def);
 6563|       |
 6564|   702k|    return def;
 6565|   702k|}
janet_compile_lint:
 6597|   238k|                                      JanetTable *env, const uint8_t *where, JanetArray *lints) {
 6598|   238k|    JanetCompiler c;
 6599|   238k|    JanetScope rootscope;
 6600|   238k|    JanetFopts fopts;
 6601|       |
 6602|   238k|    janetc_init(&c, env, where, lints);
 6603|       |
 6604|       |    /* Push a function scope */
 6605|   238k|    janetc_scope(&rootscope, &c, JANET_SCOPE_FUNCTION | JANET_SCOPE_TOP, "root");
  ------------------
  |  | 1003|   238k|#define JANET_SCOPE_FUNCTION 1
  ------------------
                  janetc_scope(&rootscope, &c, JANET_SCOPE_FUNCTION | JANET_SCOPE_TOP, "root");
  ------------------
  |  | 1005|   238k|#define JANET_SCOPE_TOP 4
  ------------------
 6606|       |
 6607|       |    /* Set initial form options */
 6608|   238k|    fopts.compiler = &c;
 6609|   238k|    fopts.flags = JANET_FOPTS_TAIL | JANET_SLOTTYPE_ANY;
  ------------------
  |  | 1091|   238k|#define JANET_FOPTS_TAIL 0x10000
  ------------------
                  fopts.flags = JANET_FOPTS_TAIL | JANET_SLOTTYPE_ANY;
  ------------------
  |  |  993|   238k|#define JANET_SLOTTYPE_ANY 0xFFFF
  ------------------
 6610|   238k|    fopts.hint = janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|   238k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|   238k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   238k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   238k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6611|       |
 6612|       |    /* Compile the value */
 6613|   238k|    janetc_value(fopts, source);
 6614|       |
 6615|   238k|    if (c.result.status == JANET_COMPILE_OK) {
  ------------------
  |  Branch (6615:9): [True: 235k, False: 2.32k]
  ------------------
 6616|   235k|        JanetFuncDef *def = janetc_pop_funcdef(&c);
 6617|   235k|        def->name = janet_cstring("thunk");
 6618|   235k|        janet_def_addflags(def);
 6619|   235k|        c.result.funcdef = def;
 6620|   235k|    } else {
 6621|  2.32k|        c.result.error_mapping = c.current_mapping;
 6622|  2.32k|        janetc_popscope(&c);
 6623|  2.32k|    }
 6624|       |
 6625|   238k|    janetc_deinit(&c);
 6626|       |
 6627|   238k|    return c.result;
 6628|   238k|}
janet_compile:
 6630|   238k|JanetCompileResult janet_compile(Janet source, JanetTable *env, const uint8_t *where) {
 6631|       |    return janet_compile_lint(source, env, where, NULL);
 6632|   238k|}
cfun_compile:
 6642|      8|              "Each message will be a tuple of the form `(level line col message)`.") {
 6643|      8|    janet_sandbox_assert(JANET_SANDBOX_COMPILE);
  ------------------
  |  | 2031|      8|#define JANET_SANDBOX_COMPILE 32768
  ------------------
 6644|      8|    janet_arity(argc, 1, 4);
 6645|      8|    JanetTable *env = (argc > 1 && !janet_checktype(argv[1], JANET_NIL))
  ------------------
  |  |  801|      8|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 8]
  |  |  ------------------
  |  |  802|      8|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      8|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      8|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      8|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      8|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      8|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6645:24): [True: 8, False: 0]
  |  Branch (6645:36): [True: 2, False: 6]
  ------------------
 6646|      8|                      ? janet_gettable(argv, 1) : janet_vm.fiber->env;
 6647|      8|    if (NULL == env) {
  ------------------
  |  Branch (6647:9): [True: 0, False: 8]
  ------------------
 6648|      0|        env = janet_table(0);
 6649|      0|        janet_vm.fiber->env = env;
 6650|      0|    }
 6651|      8|    const uint8_t *source = NULL;
 6652|      8|    if (argc >= 3) {
  ------------------
  |  Branch (6652:9): [True: 6, False: 2]
  ------------------
 6653|      6|        Janet x = argv[2];
 6654|      6|        if (janet_checktype(x, JANET_STRING)) {
  ------------------
  |  |  801|      6|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 6]
  |  |  |  Branch (801:6): [Folded, False: 6]
  |  |  ------------------
  |  |  802|      6|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      6|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      6|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      6|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      6|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      6|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6655|      0|            source = janet_unwrap_string(x);
  ------------------
  |  |  858|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
 6656|      6|        } else if (janet_checktype(x, JANET_KEYWORD)) {
  ------------------
  |  |  801|      6|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 6, False: 0]
  |  |  |  Branch (801:6): [Folded, False: 6]
  |  |  ------------------
  |  |  802|      6|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      6|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      6|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      6|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      6|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      6|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6657|      6|            source = janet_unwrap_keyword(x);
  ------------------
  |  |  860|      6|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
 6658|      6|        } else if (!janet_checktype(x, JANET_NIL)) {
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6658:20): [True: 0, False: 0]
  ------------------
 6659|      0|            janet_panic_type(x, 2, JANET_TFLAG_STRING | JANET_TFLAG_KEYWORD);
  ------------------
  |  |  594|      0|#define JANET_TFLAG_STRING (1 << JANET_STRING)
  ------------------
                          janet_panic_type(x, 2, JANET_TFLAG_STRING | JANET_TFLAG_KEYWORD);
  ------------------
  |  |  596|      0|#define JANET_TFLAG_KEYWORD (1 << JANET_KEYWORD)
  ------------------
 6660|      0|        }
 6661|      6|    }
 6662|      8|    JanetArray *lints = (argc >= 4 && !janet_checktype(argv[3], JANET_NIL))
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6662:26): [True: 0, False: 8]
  |  Branch (6662:39): [True: 0, False: 0]
  ------------------
 6663|      8|                        ? janet_getarray(argv, 3) : NULL;
 6664|      8|    JanetCompileResult res = janet_compile_lint(argv[0], env, source, lints);
 6665|      8|    if (res.status == JANET_COMPILE_OK) {
  ------------------
  |  Branch (6665:9): [True: 5, False: 3]
  ------------------
 6666|      5|        return janet_wrap_function(janet_thunk(res.funcdef));
  ------------------
  |  |  847|      5|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  820|      5|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      5|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      5|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6667|      5|    } else {
 6668|      3|        JanetTable *t = janet_table(4);
 6669|      3|        janet_table_put(t, janet_ckeywordv("error"), janet_wrap_string(res.error));
  ------------------
  |  | 1833|      3|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      3|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      3|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      janet_table_put(t, janet_ckeywordv("error"), janet_wrap_string(res.error));
  ------------------
  |  |  843|      3|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|      3|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6670|      3|        if (res.error_mapping.line > 0) {
  ------------------
  |  Branch (6670:13): [True: 0, False: 3]
  ------------------
 6671|      0|            janet_table_put(t, janet_ckeywordv("line"), janet_wrap_integer(res.error_mapping.line));
  ------------------
  |  | 1833|      0|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      0|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          janet_table_put(t, janet_ckeywordv("line"), janet_wrap_integer(res.error_mapping.line));
  ------------------
  |  |  958|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 6672|      0|        }
 6673|      3|        if (res.error_mapping.column > 0) {
  ------------------
  |  Branch (6673:13): [True: 0, False: 3]
  ------------------
 6674|      0|            janet_table_put(t, janet_ckeywordv("column"), janet_wrap_integer(res.error_mapping.column));
  ------------------
  |  | 1833|      0|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      0|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          janet_table_put(t, janet_ckeywordv("column"), janet_wrap_integer(res.error_mapping.column));
  ------------------
  |  |  958|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 6675|      0|        }
 6676|      3|        if (res.macrofiber) {
  ------------------
  |  Branch (6676:13): [True: 0, False: 3]
  ------------------
 6677|      0|            janet_table_put(t, janet_ckeywordv("fiber"), janet_wrap_fiber(res.macrofiber));
  ------------------
  |  | 1833|      0|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      0|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          janet_table_put(t, janet_ckeywordv("fiber"), janet_wrap_fiber(res.macrofiber));
  ------------------
  |  |  839|      0|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6678|      0|        }
 6679|      3|        return janet_wrap_table(t);
  ------------------
  |  |  841|      3|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|      3|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6680|      3|    }
 6681|      8|}
janet_lib_compile:
 6683|  7.16k|void janet_lib_compile(JanetTable *env) {
 6684|  7.16k|    JanetRegExt cfuns[] = {
 6685|  7.16k|        JANET_CORE_REG("compile", cfun_compile),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 6686|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 6687|  7.16k|    };
 6688|       |    janet_core_cfuns_ext(env, NULL, cfuns);
 6689|  7.16k|}
janet_core_expand_path:
 6818|  12.4k|              "* :sys: -- the system path, or (dyn :syspath)") {
 6819|  12.4k|    janet_fixarity(argc, 2);
 6820|  12.4k|    const char *input = janet_getcstring(argv, 0);
 6821|  12.4k|    const char *template = janet_getcstring(argv, 1);
 6822|  12.4k|    const char *curfile = janet_dyncstring("current-file", "");
 6823|  12.4k|    const char *syspath = janet_dyncstring("syspath", "");
 6824|  12.4k|    JanetBuffer *out = janet_buffer(0);
 6825|  12.4k|    size_t tlen = strlen(template);
 6826|       |
 6827|       |    /* Calculate name */
 6828|  12.4k|    const char *name = input + strlen(input);
 6829|  29.7k|    while (name > input) {
  ------------------
  |  Branch (6829:12): [True: 24.0k, False: 5.70k]
  ------------------
 6830|  24.0k|        if (is_path_sep(*(name - 1))) break;
  ------------------
  |  Branch (6830:13): [True: 6.78k, False: 17.2k]
  ------------------
 6831|  17.2k|        name--;
 6832|  17.2k|    }
 6833|       |
 6834|       |    /* Calculate dirpath from current file */
 6835|  12.4k|    const char *curname = curfile + strlen(curfile);
 6836|  12.4k|    while (curname > curfile) {
  ------------------
  |  Branch (6836:12): [True: 0, False: 12.4k]
  ------------------
 6837|      0|        if (is_path_sep(*curname)) break;
  ------------------
  |  Branch (6837:13): [True: 0, False: 0]
  ------------------
 6838|      0|        curname--;
 6839|      0|    }
 6840|  12.4k|    const char *curdir;
 6841|  12.4k|    int32_t curlen;
 6842|  12.4k|    if (curname == curfile) {
  ------------------
  |  Branch (6842:9): [True: 12.4k, False: 2]
  ------------------
 6843|       |        /* Current file has one or zero path segments, so
 6844|       |         * we are in the . directory. */
 6845|  12.4k|        curdir = ".";
 6846|  12.4k|        curlen = 1;
 6847|  12.4k|    } else {
 6848|       |        /* Current file has 2 or more segments, so we
 6849|       |         * can cut off the last segment. */
 6850|      2|        curdir = curfile;
 6851|      2|        curlen = (int32_t)(curname - curfile);
 6852|      2|    }
 6853|       |
 6854|   120k|    for (size_t i = 0; i < tlen; i++) {
  ------------------
  |  Branch (6854:24): [True: 108k, False: 12.4k]
  ------------------
 6855|   108k|        if (template[i] == ':') {
  ------------------
  |  Branch (6855:13): [True: 21.3k, False: 87.0k]
  ------------------
 6856|  21.3k|            if (strncmp(template + i, ":all:", 5) == 0) {
  ------------------
  |  Branch (6856:17): [True: 12.1k, False: 9.22k]
  ------------------
 6857|  12.1k|                janet_buffer_push_cstring(out, input);
 6858|  12.1k|                i += 4;
 6859|  12.1k|            } else if (strncmp(template + i, ":@all:", 6) == 0) {
  ------------------
  |  Branch (6859:24): [True: 328, False: 8.89k]
  ------------------
 6860|    328|                if (input[0] == '@') {
  ------------------
  |  Branch (6860:21): [True: 328, False: 0]
  ------------------
 6861|    328|                    const char *p = input;
 6862|  3.00k|                    while (*p && !is_path_sep(*p)) p++;
  ------------------
  |  Branch (6862:28): [True: 2.72k, False: 272]
  |  Branch (6862:34): [True: 2.67k, False: 56]
  ------------------
 6863|    328|                    size_t len = p - input - 1;
 6864|    328|                    char *str = janet_smalloc(len + 1);
 6865|    328|                    memcpy(str, input + 1, len);
 6866|    328|                    str[len] = '\0';
 6867|    328|                    janet_formatb(out, "%V", janet_dyn(str));
 6868|    328|                    janet_sfree(str);
 6869|    328|                    janet_buffer_push_cstring(out, p);
 6870|    328|                } else {
 6871|      0|                    janet_buffer_push_cstring(out, input);
 6872|      0|                }
 6873|    328|                i += 5;
 6874|  8.89k|            } else if (strncmp(template + i, ":cur:", 5) == 0) {
  ------------------
  |  Branch (6874:24): [True: 200, False: 8.69k]
  ------------------
 6875|    200|                janet_buffer_push_bytes(out, (const uint8_t *)curdir, curlen);
 6876|    200|                i += 4;
 6877|  8.69k|            } else if (strncmp(template + i, ":dir:", 5) == 0) {
  ------------------
  |  Branch (6877:24): [True: 0, False: 8.69k]
  ------------------
 6878|      0|                janet_buffer_push_bytes(out, (const uint8_t *)input,
 6879|      0|                                        (int32_t)(name - input));
 6880|      0|                i += 4;
 6881|  8.69k|            } else if (strncmp(template + i, ":sys:", 5) == 0) {
  ------------------
  |  Branch (6881:24): [True: 5.57k, False: 3.12k]
  ------------------
 6882|  5.57k|                janet_buffer_push_cstring(out, syspath);
 6883|  5.57k|                i += 4;
 6884|  5.57k|            } else if (strncmp(template + i, ":name:", 6) == 0) {
  ------------------
  |  Branch (6884:24): [True: 0, False: 3.12k]
  ------------------
 6885|      0|                janet_buffer_push_cstring(out, name);
 6886|      0|                i += 5;
 6887|  3.12k|            } else if (strncmp(template + i, ":native:", 8) == 0) {
  ------------------
  |  Branch (6887:24): [True: 3.12k, False: 0]
  ------------------
 6888|       |#ifdef JANET_WINDOWS
 6889|       |                janet_buffer_push_cstring(out, ".dll");
 6890|       |#else
 6891|  3.12k|                janet_buffer_push_cstring(out, ".so");
 6892|  3.12k|#endif
 6893|  3.12k|                i += 7;
 6894|  3.12k|            } else {
 6895|      0|                janet_buffer_push_u8(out, (uint8_t) template[i]);
 6896|      0|            }
 6897|  87.0k|        } else {
 6898|  87.0k|            janet_buffer_push_u8(out, (uint8_t) template[i]);
 6899|  87.0k|        }
 6900|   108k|    }
 6901|       |
 6902|       |    /* Normalize */
 6903|  12.4k|    uint8_t *scan = out->data;
 6904|  12.4k|    uint8_t *print = scan;
 6905|  12.4k|    uint8_t *scanend = scan + out->count;
 6906|  12.4k|    int normal_section_count = 0;
 6907|  12.4k|    int dot_count = 0;
 6908|   270k|    while (scan < scanend) {
  ------------------
  |  Branch (6908:12): [True: 257k, False: 12.4k]
  ------------------
 6909|   257k|        if (*scan == '.') {
  ------------------
  |  Branch (6909:13): [True: 37.9k, False: 219k]
  ------------------
 6910|  37.9k|            if (dot_count >= 0) {
  ------------------
  |  Branch (6910:17): [True: 22.3k, False: 15.5k]
  ------------------
 6911|  22.3k|                dot_count++;
 6912|  22.3k|            } else {
 6913|  15.5k|                *print++ = '.';
 6914|  15.5k|            }
 6915|   219k|        } else if (is_path_sep(*scan)) {
  ------------------
  |  Branch (6915:20): [True: 43.1k, False: 176k]
  ------------------
 6916|  43.1k|            if (dot_count == 1) {
  ------------------
  |  Branch (6916:17): [True: 6.65k, False: 36.4k]
  ------------------
 6917|  6.65k|                ;
 6918|  36.4k|            } else if (dot_count == 2) {
  ------------------
  |  Branch (6918:24): [True: 452, False: 36.0k]
  ------------------
 6919|    452|                if (normal_section_count > 0) {
  ------------------
  |  Branch (6919:21): [True: 316, False: 136]
  ------------------
 6920|       |                    /* unprint last separator */
 6921|    316|                    print--;
 6922|       |                    /* unprint last section */
 6923|  11.1k|                    while (print > out->data && !is_path_sep(*(print - 1)))
  ------------------
  |  Branch (6923:28): [True: 11.0k, False: 40]
  |  Branch (6923:49): [True: 10.7k, False: 276]
  ------------------
 6924|  10.7k|                        print--;
 6925|    316|                    normal_section_count--;
 6926|    316|                } else {
 6927|    136|                    *print++ = '.';
 6928|    136|                    *print++ = '.';
 6929|    136|                    *print++ = '/';
 6930|    136|                }
 6931|  36.0k|            } else if (scan == out->data || dot_count != 0) {
  ------------------
  |  Branch (6931:24): [True: 5.70k, False: 30.3k]
  |  Branch (6931:45): [True: 24.9k, False: 5.40k]
  ------------------
 6932|  36.2k|                while (dot_count > 0) {
  ------------------
  |  Branch (6932:24): [True: 5.64k, False: 30.6k]
  ------------------
 6933|  5.64k|                    --dot_count;
 6934|  5.64k|                    *print++ = '.';
 6935|  5.64k|                }
 6936|  30.6k|                if (scan > out->data) {
  ------------------
  |  Branch (6936:21): [True: 24.9k, False: 5.70k]
  ------------------
 6937|  24.9k|                    normal_section_count++;
 6938|  24.9k|                }
 6939|  30.6k|                *print++ = '/';
 6940|  30.6k|            }
 6941|  43.1k|            dot_count = 0;
 6942|   176k|        } else {
 6943|   185k|            while (dot_count > 0) {
  ------------------
  |  Branch (6943:20): [True: 9.16k, False: 176k]
  ------------------
 6944|  9.16k|                --dot_count;
 6945|  9.16k|                *print++ = '.';
 6946|  9.16k|            }
 6947|   176k|            dot_count = -1;
 6948|   176k|            *print++ = *scan;
 6949|   176k|        }
 6950|   257k|        scan++;
 6951|   257k|    }
 6952|  12.4k|    out->count = (int32_t)(print - out->data);
 6953|  12.4k|    return janet_wrap_buffer(out);
  ------------------
  |  |  842|  12.4k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  820|  12.4k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  12.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  12.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6954|  12.4k|}
janet_core_dyn:
 6958|  5.44M|              "Get a dynamic binding. Returns the default value (or nil) if no binding found.") {
 6959|  5.44M|    janet_arity(argc, 1, 2);
 6960|  5.44M|    Janet value;
 6961|  5.44M|    if (janet_vm.fiber->env) {
  ------------------
  |  Branch (6961:9): [True: 5.44M, False: 2]
  ------------------
 6962|  5.44M|        value = janet_table_get(janet_vm.fiber->env, argv[0]);
 6963|  5.44M|    } else {
 6964|      2|        value = janet_wrap_nil();
  ------------------
  |  |  826|      2|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      2|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6965|      2|    }
 6966|  5.44M|    if (argc == 2 && janet_checktype(value, JANET_NIL)) {
  ------------------
  |  |  801|  2.33k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 2.33k, False: 0]
  |  |  |  Branch (801:6): [Folded, False: 2.33k]
  |  |  ------------------
  |  |  802|  2.33k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  2.33k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  2.33k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  2.33k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  2.33k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  2.33k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6966:9): [True: 2.33k, False: 5.44M]
  ------------------
 6967|  2.33k|        return argv[1];
 6968|  2.33k|    }
 6969|  5.44M|    return value;
 6970|  5.44M|}
janet_core_setdyn:
 6974|   430k|              "Set a dynamic binding. Returns value.") {
 6975|   430k|    janet_fixarity(argc, 2);
 6976|   430k|    if (!janet_vm.fiber->env) {
  ------------------
  |  Branch (6976:9): [True: 0, False: 430k]
  ------------------
 6977|      0|        janet_vm.fiber->env = janet_table(2);
 6978|      0|    }
 6979|   430k|    janet_table_put(janet_vm.fiber->env, argv[0], argv[1]);
 6980|   430k|    return argv[1];
 6981|   430k|}
janet_core_describe:
 7017|     39|              "can be determined.") {
 7018|     39|    JanetBuffer *b = janet_buffer(0);
 7019|  1.76k|    for (int32_t i = 0; i < argc; ++i)
  ------------------
  |  Branch (7019:25): [True: 1.72k, False: 39]
  ------------------
 7020|  1.72k|        janet_description_b(b, argv[i]);
 7021|     39|    return janet_stringv(b->data, b->count);
  ------------------
  |  | 1817|     39|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  843|     39|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|     39|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|     39|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|     39|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7022|     39|}
janet_core_string:
 7028|   117k|              "Returns the new string.") {
 7029|   117k|    JanetBuffer *b = janet_buffer(0);
 7030|   657k|    for (int32_t i = 0; i < argc; ++i)
  ------------------
  |  Branch (7030:25): [True: 540k, False: 117k]
  ------------------
 7031|   540k|        janet_to_string_b(b, argv[i]);
 7032|   117k|    return janet_stringv(b->data, b->count);
  ------------------
  |  | 1817|   117k|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  843|   117k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|   117k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|   117k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|   117k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7033|   117k|}
janet_core_symbol:
 7039|  5.28M|              "Returns the new symbol.") {
 7040|  5.28M|    JanetBuffer *b = janet_buffer(0);
 7041|  21.0M|    for (int32_t i = 0; i < argc; ++i)
  ------------------
  |  Branch (7041:25): [True: 15.7M, False: 5.28M]
  ------------------
 7042|  15.7M|        janet_to_string_b(b, argv[i]);
 7043|  5.28M|    return janet_symbolv(b->data, b->count);
  ------------------
  |  | 1826|  5.28M|#define janet_symbolv(str, len) janet_wrap_symbol(janet_symbol((str), (len)))
  |  |  ------------------
  |  |  |  |  844|  5.28M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|  5.28M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  5.28M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  5.28M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7044|  5.28M|}
janet_core_keyword:
 7050|     11|              "Returns the new keyword.") {
 7051|     11|    JanetBuffer *b = janet_buffer(0);
 7052|     62|    for (int32_t i = 0; i < argc; ++i)
  ------------------
  |  Branch (7052:25): [True: 51, False: 11]
  ------------------
 7053|     51|        janet_to_string_b(b, argv[i]);
 7054|     11|    return janet_keywordv(b->data, b->count);
  ------------------
  |  | 1832|     11|#define janet_keywordv(str, len) janet_wrap_keyword(janet_keyword((str), (len)))
  |  |  ------------------
  |  |  |  |  845|     11|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|     11|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|     11|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|     11|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7055|     11|}
janet_core_buffer:
 7061|  1.77k|              "Returns the new buffer.") {
 7062|  1.77k|    JanetBuffer *b = janet_buffer(0);
 7063|  2.41k|    for (int32_t i = 0; i < argc; ++i)
  ------------------
  |  Branch (7063:25): [True: 640, False: 1.77k]
  ------------------
 7064|    640|        janet_to_string_b(b, argv[i]);
 7065|  1.77k|    return janet_wrap_buffer(b);
  ------------------
  |  |  842|  1.77k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  820|  1.77k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.77k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.77k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7066|  1.77k|}
janet_core_is_abstract:
 7070|      1|              "Check if x is an abstract type.") {
 7071|      1|    janet_fixarity(argc, 1);
 7072|      1|    return janet_wrap_boolean(janet_checktype(argv[0], JANET_ABSTRACT));
  ------------------
  |  |  829|      1|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  817|      2|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (817:51): [True: 0, False: 0]
  |  |  |  |  |  Branch (817:51): [True: 0, False: 0]
  |  |  |  |  |  Branch (817:51): [Folded, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7073|      1|}
janet_core_scannumber:
 7081|  11.9k|              "radix specifier is expected at the beginning of the number.") {
 7082|  11.9k|    double number;
 7083|  11.9k|    janet_arity(argc, 1, 2);
 7084|  11.9k|    JanetByteView view = janet_getbytes(argv, 0);
 7085|  11.9k|    int32_t base = janet_optinteger(argv, argc, 1, 0);
 7086|  11.9k|    int valid = base == 0 || (base >= 2 && base <= 36);
  ------------------
  |  Branch (7086:17): [True: 11.9k, False: 3]
  |  Branch (7086:31): [True: 2, False: 1]
  |  Branch (7086:44): [True: 2, False: 0]
  ------------------
 7087|  11.9k|    if (!valid) {
  ------------------
  |  Branch (7087:9): [True: 1, False: 11.9k]
  ------------------
 7088|      1|        janet_panicf("expected base between 2 and 36, got %d", base);
 7089|      1|    }
 7090|  11.9k|    if (janet_scan_number_base(view.bytes, view.len, base, &number))
  ------------------
  |  Branch (7090:9): [True: 6.70k, False: 5.26k]
  ------------------
 7091|  6.70k|        return janet_wrap_nil();
  ------------------
  |  |  826|  6.70k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  6.70k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  6.70k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  6.70k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7092|  5.26k|    return janet_wrap_number(number);
  ------------------
  |  |  830|  5.26k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
 7093|  11.9k|}
janet_core_tuple:
 7097|  5.37M|              "Creates a new tuple that contains items. Returns the new tuple.") {
 7098|  5.37M|    return janet_wrap_tuple(janet_tuple_n(argv, argc));
  ------------------
  |  |  838|  5.37M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|  5.37M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  5.37M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  5.37M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7099|  5.37M|}
janet_core_array:
 7103|  1.49k|              "Create a new array that contains items. Returns the new array.") {
 7104|  1.49k|    JanetArray *array = janet_array(argc);
 7105|  1.49k|    array->count = argc;
 7106|  1.49k|    safe_memcpy(array->data, argv, argc * sizeof(Janet));
 7107|  1.49k|    return janet_wrap_array(array);
  ------------------
  |  |  840|  1.49k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  820|  1.49k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.49k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.49k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7108|  1.49k|}
janet_core_slice:
 7112|  4.38k|              "Extract a sub-range of an indexed data structure or byte sequence.") {
 7113|  4.38k|    JanetRange range;
 7114|  4.38k|    JanetByteView bview;
 7115|  4.38k|    JanetView iview;
 7116|  4.38k|    if (janet_bytes_view(argv[0], &bview.bytes, &bview.len)) {
  ------------------
  |  Branch (7116:9): [True: 2.49k, False: 1.89k]
  ------------------
 7117|  2.49k|        range = janet_getslice(argc, argv);
 7118|  2.49k|        return janet_stringv(bview.bytes + range.start, range.end - range.start);
  ------------------
  |  | 1817|  2.49k|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  843|  2.49k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|  2.49k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  2.49k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  2.49k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7119|  2.49k|    } else if (janet_indexed_view(argv[0], &iview.items, &iview.len)) {
  ------------------
  |  Branch (7119:16): [True: 1.89k, False: 5]
  ------------------
 7120|  1.89k|        range = janet_getslice(argc, argv);
 7121|  1.89k|        return janet_wrap_tuple(janet_tuple_n(iview.items + range.start, range.end - range.start));
  ------------------
  |  |  838|  1.89k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|  1.89k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.89k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.89k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7122|  1.89k|    } else {
 7123|      5|        janet_panic_type(argv[0], 0, JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED);
  ------------------
  |  |  607|      5|#define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  594|      5|#define JANET_TFLAG_STRING (1 << JANET_STRING)
  |  |  ------------------
  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  595|      5|#define JANET_TFLAG_SYMBOL (1 << JANET_SYMBOL)
  |  |  ------------------
  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  601|      5|#define JANET_TFLAG_BUFFER (1 << JANET_BUFFER)
  |  |  ------------------
  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  ------------------
  |  |  |  |  596|      5|#define JANET_TFLAG_KEYWORD (1 << JANET_KEYWORD)
  |  |  ------------------
  ------------------
                      janet_panic_type(argv[0], 0, JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED);
  ------------------
  |  |  608|      5|#define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  ------------------
  |  |  |  |  597|      5|#define JANET_TFLAG_ARRAY (1 << JANET_ARRAY)
  |  |  ------------------
  |  |               #define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  ------------------
  |  |  |  |  598|      5|#define JANET_TFLAG_TUPLE (1 << JANET_TUPLE)
  |  |  ------------------
  ------------------
 7124|      5|    }
 7125|  4.38k|}
janet_core_range:
 7131|    119|              "a range [start, end). With three, returns a range with optional step size.") {
 7132|    119|    janet_arity(argc, 1, 3);
 7133|    119|    double start = 0, stop = 0, step = 1, count = 0;
 7134|    119|    if (argc == 3) {
  ------------------
  |  Branch (7134:9): [True: 44, False: 75]
  ------------------
 7135|     44|        start = janet_getnumber(argv, 0);
 7136|     44|        stop = janet_getnumber(argv, 1);
 7137|     44|        step = janet_getnumber(argv, 2);
 7138|     44|        count = (step > 0.0) ? (stop - start) / step :
  ------------------
  |  Branch (7138:17): [True: 29, False: 15]
  ------------------
 7139|     44|                ((step < 0.0) ? (stop - start) / step : 0.0);
  ------------------
  |  Branch (7139:18): [True: 6, False: 9]
  ------------------
 7140|     75|    } else if (argc == 2) {
  ------------------
  |  Branch (7140:16): [True: 62, False: 13]
  ------------------
 7141|     62|        start = janet_getnumber(argv, 0.0);
 7142|     62|        stop = janet_getnumber(argv, 1.0);
 7143|     62|        count = stop - start;
 7144|     62|    } else {
 7145|     13|        stop = janet_getnumber(argv, 0.0);
 7146|     13|        count = stop;
 7147|     13|    }
 7148|    119|    if (isinf(step)) {
  ------------------
  |  Branch (7148:9): [True: 0, False: 119]
  ------------------
 7149|      0|        janet_panic("infinite step not allowed");
 7150|      0|    }
 7151|    119|    count = (count > 0.0) ? count : 0.0;
  ------------------
  |  Branch (7151:13): [True: 89, False: 30]
  ------------------
 7152|    119|    int32_t int_count;
 7153|    119|    janet_assert(count >= 0.0, "bad range code");
  ------------------
  |  |  386|    119|#define janet_assert(c, m) do { \
  |  |  387|    119|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 119]
  |  |  ------------------
  |  |  388|    119|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 119]
  |  |  ------------------
  ------------------
 7154|    119|    if (count > (double) INT32_MAX) {
  ------------------
  |  Branch (7154:9): [True: 4, False: 115]
  ------------------
 7155|      4|        janet_panicf("range is too large, %f elements", count);
 7156|    115|    } else {
 7157|    115|        int_count = (int32_t) ceil(count);
 7158|    115|    }
 7159|    115|    if (step > 0.0) {
  ------------------
  |  Branch (7159:9): [True: 99, False: 16]
  ------------------
 7160|     99|        janet_assert(start + int_count * step >= stop, "bad range code");
  ------------------
  |  |  386|     99|#define janet_assert(c, m) do { \
  |  |  387|     99|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 99]
  |  |  ------------------
  |  |  388|     99|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 99]
  |  |  ------------------
  ------------------
 7161|     99|    } else {
 7162|     16|        janet_assert(start + int_count * step <= stop, "bad range code");
  ------------------
  |  |  386|     16|#define janet_assert(c, m) do { \
  |  |  387|     16|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 16]
  |  |  ------------------
  |  |  388|     16|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 16]
  |  |  ------------------
  ------------------
 7163|     16|    }
 7164|    115|    JanetArray *array = janet_array(int_count);
 7165|   173M|    for (int32_t i = 0; i < int_count; i++) {
  ------------------
  |  Branch (7165:25): [True: 173M, False: 115]
  ------------------
 7166|   173M|        array->data[i] = janet_wrap_number((double) start + (double) i * step);
  ------------------
  |  |  830|   173M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
 7167|   173M|    }
 7168|    115|    array->count = int_count;
 7169|    115|    return janet_wrap_array(array);
  ------------------
  |  |  840|    115|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  820|    115|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    115|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    115|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7170|    115|}
janet_core_table:
 7177|  7.55k|              "new table.") {
 7178|  7.55k|    int32_t i;
 7179|  7.55k|    if (argc & 1)
  ------------------
  |  Branch (7179:9): [True: 0, False: 7.55k]
  ------------------
 7180|      0|        janet_panic("expected even number of arguments");
 7181|  7.55k|    JanetTable *table = janet_table(argc >> 1);
 7182|  27.1k|    for (i = 0; i < argc; i += 2) {
  ------------------
  |  Branch (7182:17): [True: 19.5k, False: 7.55k]
  ------------------
 7183|  19.5k|        janet_table_put(table, argv[i], argv[i + 1]);
 7184|  19.5k|    }
 7185|  7.55k|    return janet_wrap_table(table);
  ------------------
  |  |  841|  7.55k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|  7.55k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  7.55k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  7.55k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7186|  7.55k|}
janet_core_getproto:
 7190|      2|              "Get the prototype of a table or struct. Will return nil if `x` has no prototype.") {
 7191|      2|    janet_fixarity(argc, 1);
 7192|      2|    if (janet_checktype(argv[0], JANET_TABLE)) {
  ------------------
  |  |  801|      2|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 2]
  |  |  |  Branch (801:6): [Folded, False: 2]
  |  |  ------------------
  |  |  802|      2|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      2|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      2|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      2|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7193|      0|        JanetTable *t = janet_unwrap_table(argv[0]);
  ------------------
  |  |  856|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
 7194|      0|        return t->proto
  ------------------
  |  Branch (7194:16): [True: 0, False: 0]
  ------------------
 7195|      0|               ? janet_wrap_table(t->proto)
  ------------------
  |  |  841|      0|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7196|      0|               : janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7197|      0|    }
 7198|      2|    if (janet_checktype(argv[0], JANET_STRUCT)) {
  ------------------
  |  |  801|      2|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 2]
  |  |  |  Branch (801:6): [Folded, False: 2]
  |  |  ------------------
  |  |  802|      2|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      2|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      2|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      2|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7199|      0|        JanetStruct st = janet_unwrap_struct(argv[0]);
  ------------------
  |  |  852|      0|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
 7200|      0|        return janet_struct_proto(st)
  ------------------
  |  | 1841|      0|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1836|      0|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1841:31): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 7201|      0|               ? janet_wrap_struct(janet_struct_proto(st))
  ------------------
  |  |  837|      0|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7202|      0|               : janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7203|      0|    }
 7204|      2|    janet_panicf("expected struct or table, got %v", argv[0]);
 7205|      2|}
janet_core_struct:
 7212|  14.1k|              "new struct.") {
 7213|  14.1k|    int32_t i;
 7214|  14.1k|    if (argc & 1) {
  ------------------
  |  Branch (7214:9): [True: 0, False: 14.1k]
  ------------------
 7215|      0|        janet_panic("expected even number of arguments");
 7216|      0|    }
 7217|  14.1k|    JanetKV *st = janet_struct_begin(argc >> 1);
 7218|  41.6k|    for (i = 0; i < argc; i += 2) {
  ------------------
  |  Branch (7218:17): [True: 27.4k, False: 14.1k]
  ------------------
 7219|  27.4k|        janet_struct_put(st, argv[i], argv[i + 1]);
 7220|  27.4k|    }
 7221|  14.1k|    return janet_wrap_struct(janet_struct_end(st));
  ------------------
  |  |  837|  14.1k|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  823|  14.1k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  14.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  14.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7222|  14.1k|}
janet_core_gensym:
 7228|   720k|              "it can be used in macros to generate automatic bindings.") {
 7229|   720k|    (void) argv;
 7230|   720k|    janet_fixarity(argc, 0);
 7231|   720k|    return janet_wrap_symbol(janet_symbol_gen());
  ------------------
  |  |  844|   720k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  823|   720k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   720k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   720k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7232|   720k|}
janet_core_gccollect:
 7236|      1|              "Run garbage collection. You should probably not call this manually.") {
 7237|      1|    (void) argv;
 7238|      1|    (void) argc;
 7239|      1|    janet_collect();
 7240|      1|    return janet_wrap_nil();
  ------------------
  |  |  826|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7241|      1|}
janet_core_gcsetinterval:
 7247|      5|              "High values will be faster but use more memory.") {
 7248|      5|    janet_fixarity(argc, 1);
 7249|      5|    size_t s = janet_getsize(argv, 0);
 7250|       |    /* limit interval to 48 bits */
 7251|      5|#ifdef JANET_64
 7252|      5|    if (s >> 48) {
  ------------------
  |  Branch (7252:9): [True: 0, False: 5]
  ------------------
 7253|      0|        janet_panic("interval too large");
 7254|      0|    }
 7255|      5|#endif
 7256|      5|    janet_vm.gc_interval = s;
 7257|      5|    return janet_wrap_nil();
  ------------------
  |  |  826|      5|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      5|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      5|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      5|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7258|      5|}
janet_core_gcinterval:
 7263|      2|              "of garbage collection.") {
 7264|      2|    (void) argv;
 7265|      2|    janet_fixarity(argc, 0);
 7266|      2|    return janet_wrap_number((double) janet_vm.gc_interval);
  ------------------
  |  |  830|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
 7267|      2|}
janet_core_type:
 7286|   125M|              "or another keyword for an abstract type.") {
 7287|   125M|    janet_fixarity(argc, 1);
 7288|   125M|    JanetType t = janet_type(argv[0]);
  ------------------
  |  |  790|   125M|    (isnan((x).number) \
  |  |  791|   125M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|   125M|        : JANET_NUMBER)
  ------------------
  |  Branch (7288:19): [True: 124M, False: 375k]
  ------------------
 7289|   125M|    if (t == JANET_ABSTRACT) {
  ------------------
  |  Branch (7289:9): [True: 5.39k, False: 125M]
  ------------------
 7290|  5.39k|        return janet_ckeywordv(janet_abstract_type(janet_unwrap_abstract(argv[0]))->name);
  ------------------
  |  | 1833|  5.39k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|  5.39k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|  5.39k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  5.39k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  5.39k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7291|   125M|    } else {
 7292|   125M|        return janet_ckeywordv(janet_type_names[t]);
  ------------------
  |  | 1833|   125M|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|   125M|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|   125M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|   125M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|   125M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7293|   125M|    }
 7294|   125M|}
janet_core_hash:
 7300|      1|              "then they will have the same hash value.") {
 7301|      1|    janet_fixarity(argc, 1);
 7302|      1|    return janet_wrap_number(janet_hash(argv[0]));
  ------------------
  |  |  830|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
 7303|      1|}
janet_core_getline:
 7310|   102k|              "Use this function to implement a simple interface for a terminal program.") {
 7311|   102k|    FILE *in = janet_dynfile("in", stdin);
 7312|   102k|    FILE *out = janet_dynfile("out", stdout);
 7313|   102k|    janet_arity(argc, 0, 3);
 7314|   102k|    JanetBuffer *buf = (argc >= 2) ? janet_getbuffer(argv, 1) : janet_buffer(10);
  ------------------
  |  Branch (7314:24): [True: 102k, False: 1]
  ------------------
 7315|   102k|    if (argc >= 1) {
  ------------------
  |  Branch (7315:9): [True: 102k, False: 2]
  ------------------
 7316|   102k|        const char *prompt = (const char *) janet_getstring(argv, 0);
 7317|   102k|        fprintf(out, "%s", prompt);
 7318|   102k|        fflush(out);
 7319|   102k|    }
 7320|   102k|    {
 7321|   102k|        buf->count = 0;
 7322|   102k|        int c;
 7323|   102k|        for (;;) {
 7324|   102k|            c = fgetc(in);
 7325|   102k|            if (feof(in) || c < 0) {
  ------------------
  |  Branch (7325:17): [True: 102k, False: 0]
  |  Branch (7325:29): [True: 0, False: 0]
  ------------------
 7326|   102k|                break;
 7327|   102k|            }
 7328|      0|            janet_buffer_push_u8(buf, (uint8_t) c);
 7329|      0|            if (c == '\n') break;
  ------------------
  |  Branch (7329:17): [True: 0, False: 0]
  ------------------
 7330|      0|        }
 7331|   102k|    }
 7332|   102k|    return janet_wrap_buffer(buf);
  ------------------
  |  |  842|   102k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  820|   102k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   102k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   102k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7333|   102k|}
janet_core_trace:
 7337|      1|              "Enable tracing on a function. Returns the function.") {
 7338|      1|    janet_fixarity(argc, 1);
 7339|      1|    JanetFunction *func = janet_getfunction(argv, 0);
 7340|      1|    func->gc.flags |= JANET_FUNCFLAG_TRACE;
  ------------------
  |  | 1155|      1|#define JANET_FUNCFLAG_TRACE (1 << 16)
  ------------------
 7341|      1|    return argv[0];
 7342|      1|}
janet_core_check_nat:
 7362|  11.9k|              "Check if x can be exactly represented as a non-negative 32 bit signed two's complement integer.") {
 7363|  11.9k|    janet_fixarity(argc, 1);
 7364|  11.9k|    if (!janet_checkint(argv[0])) return janet_wrap_false();
  ------------------
  |  |  828|  10.5k|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  817|  10.5k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  10.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  10.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7364:9): [True: 10.5k, False: 1.43k]
  ------------------
 7365|  1.43k|    return janet_wrap_boolean(janet_unwrap_integer(argv[0]) >= 0);
  ------------------
  |  |  829|  1.43k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  817|  1.43k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.43k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.43k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7366|  11.9k|}
janet_core_is_bytes:
 7370|    794|              "Check if x is a string, symbol, keyword, or buffer.") {
 7371|    794|    janet_fixarity(argc, 1);
 7372|    794|    return janet_wrap_boolean(janet_checktypes(argv[0], JANET_TFLAG_BYTES));
  ------------------
  |  |  829|    794|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  817|  1.58k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    794|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    794|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (817:51): [True: 233, False: 561]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7373|    794|}
janet_core_is_indexed:
 7377|   102k|              "Check if x is an array or tuple.") {
 7378|   102k|    janet_fixarity(argc, 1);
 7379|   102k|    return janet_wrap_boolean(janet_checktypes(argv[0], JANET_TFLAG_INDEXED));
  ------------------
  |  |  829|   102k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  817|   204k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   102k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   102k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (817:51): [True: 102k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7380|   102k|}
janet_core_is_dictionary:
 7384|     11|              "Check if x is a table or struct.") {
 7385|     11|    janet_fixarity(argc, 1);
 7386|     11|    return janet_wrap_boolean(janet_checktypes(argv[0], JANET_TFLAG_DICTIONARY));
  ------------------
  |  |  829|     11|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  817|     22|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     11|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     11|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (817:51): [True: 8, False: 3]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7387|     11|}
janet_core_is_lengthable:
 7391|  81.8k|              "Check if x is a bytes, indexed, or dictionary.") {
 7392|  81.8k|    janet_fixarity(argc, 1);
 7393|  81.8k|    return janet_wrap_boolean(janet_checktypes(argv[0], JANET_TFLAG_LENGTHABLE));
  ------------------
  |  |  829|  81.8k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  817|   163k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  81.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  81.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (817:51): [True: 81.8k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7394|  81.8k|}
janet_core_signal:
 7406|      7|              "* :await") {
 7407|      7|    janet_arity(argc, 1, 2);
 7408|      7|    Janet payload = argc == 2 ? argv[1] : janet_wrap_nil();
  ------------------
  |  |  826|      2|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      2|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7408:21): [True: 5, False: 2]
  ------------------
 7409|      7|    if (janet_checkint(argv[0])) {
  ------------------
  |  Branch (7409:9): [True: 0, False: 7]
  ------------------
 7410|      0|        int32_t s = janet_unwrap_integer(argv[0]);
  ------------------
  |  |  957|      0|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
 7411|      0|        if (s < 0 || s > 9) {
  ------------------
  |  Branch (7411:13): [True: 0, False: 0]
  |  Branch (7411:22): [True: 0, False: 0]
  ------------------
 7412|      0|            janet_panicf("expected user signal between 0 and 9, got %d", s);
 7413|      0|        }
 7414|      0|        janet_signalv(JANET_SIGNAL_USER0 + s, payload);
 7415|      7|    } else {
 7416|      7|        JanetKeyword kw = janet_getkeyword(argv, 0);
 7417|     35|        for (unsigned i = 0; i < sizeof(janet_signal_names) / sizeof(char *); i++) {
  ------------------
  |  Branch (7417:30): [True: 28, False: 7]
  ------------------
 7418|     28|            if (!janet_cstrcmp(kw, janet_signal_names[i])) {
  ------------------
  |  Branch (7418:17): [True: 0, False: 28]
  ------------------
 7419|      0|                janet_signalv((JanetSignal) i, payload);
 7420|      0|            }
 7421|     28|        }
 7422|      7|    }
 7423|      7|    janet_panicf("unknown signal %v", argv[0]);
 7424|      7|}
janet_core_memcmp:
 7431|  23.4k|              "to compare slices of the bytes sequences.") {
 7432|  23.4k|    janet_arity(argc, 2, 5);
 7433|  23.4k|    JanetByteView a = janet_getbytes(argv, 0);
 7434|  23.4k|    JanetByteView b = janet_getbytes(argv, 1);
 7435|  23.4k|    int32_t len = janet_optnat(argv, argc, 2, a.len < b.len ? a.len : b.len);
  ------------------
  |  Branch (7435:47): [True: 1, False: 23.4k]
  ------------------
 7436|  23.4k|    int32_t offset_a = janet_optnat(argv, argc, 3, 0);
 7437|  23.4k|    int32_t offset_b = janet_optnat(argv, argc, 4, 0);
 7438|  23.4k|    if (offset_a + len > a.len) janet_panicf("invalid offset-a: %d", offset_a);
  ------------------
  |  Branch (7438:9): [True: 1, False: 23.4k]
  ------------------
 7439|  23.4k|    if (offset_b + len > b.len) janet_panicf("invalid offset-b: %d", offset_b);
  ------------------
  |  Branch (7439:9): [True: 0, False: 23.4k]
  ------------------
 7440|  23.4k|    return janet_wrap_integer(memcmp(a.bytes + offset_a, b.bytes + offset_b, (size_t) len));
  ------------------
  |  |  958|  23.4k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|  23.4k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 7441|  23.4k|}
janet_core_sandbox:
 7503|      1|              "* :unmarshal - disallow calling the `unmarshal` function.\n") {
 7504|      1|    uint32_t flags = 0;
 7505|      2|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (7505:25): [True: 1, False: 1]
  ------------------
 7506|      1|        JanetKeyword kw = janet_getkeyword(argv, i);
 7507|      1|        const SandboxOption *opt = sandbox_options;
 7508|      1|        while (opt->name != NULL) {
  ------------------
  |  Branch (7508:16): [True: 0, False: 1]
  ------------------
 7509|      0|            if (janet_cstrcmp(kw, opt->name) == 0) {
  ------------------
  |  Branch (7509:17): [True: 0, False: 0]
  ------------------
 7510|      0|                flags |= opt->flag;
 7511|      0|                break;
 7512|      0|            }
 7513|      0|            opt++;
 7514|      0|        }
 7515|      1|        if (opt->name == NULL) janet_panicf("unknown capability %v", argv[i]);
  ------------------
  |  Branch (7515:13): [True: 0, False: 1]
  ------------------
 7516|      1|    }
 7517|      1|    janet_sandbox(flags);
 7518|      1|    return janet_wrap_nil();
  ------------------
  |  |  826|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7519|      1|}
janet_core_env:
 8041|  7.16k|JanetTable *janet_core_env(JanetTable *replacements) {
 8042|       |    /* Memoize core env, ignoring replacements the second time around. */
 8043|  7.16k|    if (NULL != janet_vm.core_env) {
  ------------------
  |  Branch (8043:9): [True: 0, False: 7.16k]
  ------------------
 8044|      0|        return janet_vm.core_env;
 8045|      0|    }
 8046|       |
 8047|  7.16k|    JanetTable *dict = janet_core_lookup_table(replacements);
 8048|       |
 8049|       |    /* Unmarshal bytecode */
 8050|  7.16k|    Janet marsh_out = janet_unmarshal(
 8051|  7.16k|                          janet_core_image,
 8052|  7.16k|                          janet_core_image_size,
 8053|  7.16k|                          0,
 8054|  7.16k|                          dict,
 8055|  7.16k|                          NULL);
 8056|       |
 8057|       |    /* Memoize */
 8058|  7.16k|    janet_gcroot(marsh_out);
 8059|  7.16k|    JanetTable *env = janet_unwrap_table(marsh_out);
  ------------------
  |  |  856|  7.16k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
 8060|  7.16k|    janet_vm.core_env = env;
 8061|       |
 8062|       |    /* Invert image dict manually here. We can't do this in boot.janet as it
 8063|       |     * breaks deterministic builds */
 8064|  7.16k|    Janet lidv, midv;
 8065|  7.16k|    lidv = midv = janet_wrap_nil();
  ------------------
  |  |  826|  7.16k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  7.16k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  7.16k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  7.16k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8066|  7.16k|    janet_resolve(env, janet_csymbol("load-image-dict"), &lidv);
 8067|  7.16k|    janet_resolve(env, janet_csymbol("make-image-dict"), &midv);
 8068|       |
 8069|       |    /* Check that we actually got tables - if we are using a smaller corelib, may not exist */
 8070|  7.16k|    if (janet_checktype(lidv, JANET_TABLE) && janet_checktype(midv, JANET_TABLE)) {
  ------------------
  |  |  801|  14.3k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 7.16k, False: 0]
  |  |  |  Branch (801:6): [Folded, False: 7.16k]
  |  |  ------------------
  |  |  802|  14.3k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  14.3k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  7.16k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  7.16k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  7.16k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  7.16k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (janet_checktype(lidv, JANET_TABLE) && janet_checktype(midv, JANET_TABLE)) {
  ------------------
  |  |  801|  7.16k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 7.16k, False: 0]
  |  |  |  Branch (801:6): [Folded, False: 7.16k]
  |  |  ------------------
  |  |  802|  7.16k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  7.16k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  7.16k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  7.16k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  7.16k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  7.16k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8071|  7.16k|        JanetTable *lid = janet_unwrap_table(lidv);
  ------------------
  |  |  856|  7.16k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
 8072|  7.16k|        JanetTable *mid = janet_unwrap_table(midv);
  ------------------
  |  |  856|  7.16k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
 8073|  14.6M|        for (int32_t i = 0; i < lid->capacity; i++) {
  ------------------
  |  Branch (8073:29): [True: 14.6M, False: 7.16k]
  ------------------
 8074|  14.6M|            const JanetKV *kv = lid->data + i;
 8075|  14.6M|            if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  801|  14.6M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 14.6M]
  |  |  ------------------
  |  |  802|  14.6M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  14.6M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  14.6M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  14.6M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  14.6M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  14.6M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (8075:17): [True: 4.72M, False: 9.95M]
  ------------------
 8076|  4.72M|                janet_table_put(mid, kv->value, kv->key);
 8077|  4.72M|            }
 8078|  14.6M|        }
 8079|  7.16k|    }
 8080|       |
 8081|  7.16k|    return env;
 8082|  7.16k|}
janet_core_lookup_table:
 8086|  7.16k|JanetTable *janet_core_lookup_table(JanetTable *replacements) {
 8087|  7.16k|    JanetTable *dict = janet_table(512);
 8088|  7.16k|    janet_load_libs(dict);
 8089|       |
 8090|       |    /* Add replacements */
 8091|  7.16k|    if (replacements != NULL) {
  ------------------
  |  Branch (8091:9): [True: 0, False: 7.16k]
  ------------------
 8092|      0|        for (int32_t i = 0; i < replacements->capacity; i++) {
  ------------------
  |  Branch (8092:29): [True: 0, False: 0]
  ------------------
 8093|      0|            JanetKV kv = replacements->data[i];
 8094|      0|            if (!janet_checktype(kv.key, JANET_NIL)) {
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (8094:17): [True: 0, False: 0]
  ------------------
 8095|      0|                janet_table_put(dict, kv.key, kv.value);
 8096|       |                /* Add replacement functions to registry? */
 8097|      0|            }
 8098|      0|        }
 8099|      0|    }
 8100|       |
 8101|  7.16k|    return dict;
 8102|  7.16k|}
janet_debug_break:
 8144|      6|void janet_debug_break(JanetFuncDef *def, int32_t pc) {
 8145|      6|    if (pc >= def->bytecode_length || pc < 0)
  ------------------
  |  Branch (8145:9): [True: 0, False: 6]
  |  Branch (8145:39): [True: 1, False: 5]
  ------------------
 8146|      1|        janet_panic("invalid bytecode offset");
 8147|      5|    def->bytecode[pc] |= 0x80;
 8148|      5|}
janet_debug_unbreak:
 8151|      6|void janet_debug_unbreak(JanetFuncDef *def, int32_t pc) {
 8152|      6|    if (pc >= def->bytecode_length || pc < 0)
  ------------------
  |  Branch (8152:9): [True: 2, False: 4]
  |  Branch (8152:39): [True: 2, False: 2]
  ------------------
 8153|      4|        janet_panic("invalid bytecode offset");
 8154|      2|    def->bytecode[pc] &= ~((uint32_t)0x80);
 8155|      2|}
janet_stacktrace_ext:
 8213|  2.76k|void janet_stacktrace_ext(JanetFiber *fiber, Janet err, const char *prefix) {
 8214|       |
 8215|  2.76k|    int32_t fi;
 8216|  2.76k|    const char *errstr = (const char *)janet_to_string(err);
 8217|  2.76k|    JanetFiber **fibers = NULL;
 8218|  2.76k|    int wrote_error = !prefix;
 8219|       |
 8220|  2.76k|    int print_color = janet_truthy(janet_dyn("err-color"));
  ------------------
  |  |  813|  2.76k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|  5.52k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 2.76k]
  |  |  |  |  ------------------
  |  |  |  |  802|  5.52k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|  5.52k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|  2.76k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|  2.76k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  2.76k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  2.76k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 0, False: 2.76k]
  |  |  ------------------
  |  |  814|  2.76k|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 0, False: 0]
  |  |  |  Branch (814:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 8221|  2.76k|    if (print_color) janet_eprintf("\x1b[31m");
  ------------------
  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
  |  Branch (8221:9): [True: 0, False: 2.76k]
  ------------------
 8222|       |
 8223|  5.53k|    while (fiber) {
  ------------------
  |  Branch (8223:12): [True: 2.77k, False: 2.76k]
  ------------------
 8224|  2.77k|        janet_v_push(fibers, fiber);
  ------------------
  |  |  706|  2.77k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  2.77k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  2.77k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|     17|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|     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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|     17|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|     17|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 2.76k, False: 17]
  |  |  |  |  |  |  |  Branch (717:50): [True: 17, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  2.77k|#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))
  |  |  ------------------
  |  |  |  |  715|  2.77k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  2.77k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8225|  2.77k|        fiber = fiber->child;
 8226|  2.77k|    }
 8227|       |
 8228|  5.53k|    for (fi = janet_v_count(fibers) - 1; fi >= 0; fi--) {
  ------------------
  |  |  708|  2.76k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  2.76k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  2.76k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 2.76k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (8228:42): [True: 2.77k, False: 2.76k]
  ------------------
 8229|  2.77k|        fiber = fibers[fi];
 8230|  2.77k|        int32_t i = fiber->frame;
 8231|  35.7k|        while (i > 0) {
  ------------------
  |  Branch (8231:16): [True: 32.9k, False: 2.77k]
  ------------------
 8232|  32.9k|            JanetCFunRegistry *reg = NULL;
 8233|  32.9k|            JanetStackFrame *frame = (JanetStackFrame *)(fiber->data + i - JANET_FRAME_SIZE);
  ------------------
  |  | 1017|  32.9k|#define JANET_FRAME_SIZE 4
  ------------------
 8234|  32.9k|            JanetFuncDef *def = NULL;
 8235|  32.9k|            i = frame->prevframe;
 8236|       |
 8237|       |            /* Print prelude to stack frame */
 8238|  32.9k|            if (!wrote_error) {
  ------------------
  |  Branch (8238:17): [True: 2.30k, False: 30.6k]
  ------------------
 8239|  2.30k|                JanetFiberStatus status = janet_fiber_status(fiber);
 8240|  2.30k|                janet_eprintf("%s%s: %s\n",
  ------------------
  |  | 2184|  9.21k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (2184:59): [True: 2.30k, False: 0]
  |  |  |  Branch (2184:59): [True: 2.30k, False: 0]
  |  |  ------------------
  ------------------
 8241|  2.30k|                              prefix ? prefix : "",
 8242|  2.30k|                              janet_status_names[status],
 8243|  2.30k|                              errstr ? errstr : janet_status_names[status]);
 8244|  2.30k|                wrote_error = 1;
 8245|  2.30k|            }
 8246|       |
 8247|  32.9k|            janet_eprintf("  in");
  ------------------
  |  | 2184|  32.9k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 8248|       |
 8249|  32.9k|            if (frame->func) {
  ------------------
  |  Branch (8249:17): [True: 31.7k, False: 1.25k]
  ------------------
 8250|  31.7k|                def = frame->func->def;
 8251|  31.7k|                janet_eprintf(" %s", def->name ? (const char *)def->name : "<anonymous>");
  ------------------
  |  | 2184|  63.4k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |  |  Branch (2184:59): [True: 31.7k, False: 1]
  |  |  ------------------
  ------------------
 8252|  31.7k|                if (def->source) {
  ------------------
  |  Branch (8252:21): [True: 31.6k, False: 93]
  ------------------
 8253|  31.6k|                    janet_eprintf(" [%s]", (const char *)def->source);
  ------------------
  |  | 2184|  31.6k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 8254|  31.6k|                }
 8255|  31.7k|            } else {
 8256|  1.25k|                JanetCFunction cfun = (JanetCFunction)(frame->pc);
 8257|  1.25k|                if (cfun) {
  ------------------
  |  Branch (8257:21): [True: 1.25k, False: 0]
  ------------------
 8258|  1.25k|                    reg = janet_registry_get(cfun);
 8259|  1.25k|                    if (NULL != reg && NULL != reg->name) {
  ------------------
  |  Branch (8259:25): [True: 1.22k, False: 35]
  |  Branch (8259:40): [True: 1.22k, False: 0]
  ------------------
 8260|  1.22k|                        if (reg->name_prefix) {
  ------------------
  |  Branch (8260:29): [True: 0, False: 1.22k]
  ------------------
 8261|      0|                            janet_eprintf(" %s/%s", reg->name_prefix, reg->name);
  ------------------
  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 8262|  1.22k|                        } else {
 8263|  1.22k|                            janet_eprintf(" %s", reg->name);
  ------------------
  |  | 2184|  1.22k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 8264|  1.22k|                        }
 8265|  1.22k|                        if (NULL != reg->source_file) {
  ------------------
  |  Branch (8265:29): [True: 1.22k, False: 0]
  ------------------
 8266|  1.22k|                            janet_eprintf(" [%s]", reg->source_file);
  ------------------
  |  | 2184|  1.22k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 8267|  1.22k|                        }
 8268|  1.22k|                    } else {
 8269|     35|                        janet_eprintf(" <cfunction>");
  ------------------
  |  | 2184|     35|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 8270|     35|                    }
 8271|  1.25k|                }
 8272|  1.25k|            }
 8273|  32.9k|            if (frame->flags & JANET_STACKFRAME_TAILCALL)
  ------------------
  |  | 1001|  32.9k|#define JANET_STACKFRAME_TAILCALL 1
  ------------------
  |  Branch (8273:17): [True: 5.50k, False: 27.4k]
  ------------------
 8274|  5.50k|                janet_eprintf(" (tail call)");
  ------------------
  |  | 2184|  5.50k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 8275|  32.9k|            if (frame->func && frame->pc) {
  ------------------
  |  Branch (8275:17): [True: 31.7k, False: 1.25k]
  |  Branch (8275:32): [True: 31.7k, False: 0]
  ------------------
 8276|  31.7k|                int32_t off = (int32_t)(frame->pc - def->bytecode);
 8277|  31.7k|                if (def->sourcemap) {
  ------------------
  |  Branch (8277:21): [True: 31.6k, False: 93]
  ------------------
 8278|  31.6k|                    JanetSourceMapping mapping = def->sourcemap[off];
 8279|  31.6k|                    janet_eprintf(" on line %d, column %d", mapping.line, mapping.column);
  ------------------
  |  | 2184|  31.6k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 8280|  31.6k|                } else {
 8281|     93|                    janet_eprintf(" pc=%d", off);
  ------------------
  |  | 2184|     93|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 8282|     93|                }
 8283|  31.7k|            } else if (NULL != reg) {
  ------------------
  |  Branch (8283:24): [True: 1.22k, False: 35]
  ------------------
 8284|       |                /* C Function */
 8285|  1.22k|                if (reg->source_line > 0) {
  ------------------
  |  Branch (8285:21): [True: 1.22k, False: 0]
  ------------------
 8286|  1.22k|                    janet_eprintf(" on line %d", (long) reg->source_line);
  ------------------
  |  | 2184|  1.22k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 8287|  1.22k|                }
 8288|  1.22k|            }
 8289|  32.9k|            janet_eprintf("\n");
  ------------------
  |  | 2184|  32.9k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
 8290|       |            /* Print fiber points optionally. Clutters traces but provides info
 8291|       |            if (i <= 0 && fi > 0) {
 8292|       |                janet_eprintf("  in parent fiber\n");
 8293|       |            }
 8294|       |            */
 8295|  32.9k|        }
 8296|  2.77k|    }
 8297|       |
 8298|  2.76k|    if (print_color) janet_eprintf("\x1b[0m");
  ------------------
  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
  |  Branch (8298:9): [True: 0, False: 2.76k]
  ------------------
 8299|       |
 8300|       |    janet_v_free(fibers);
  ------------------
  |  |  705|  2.76k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  713|  2.76k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (705:34): [True: 2.76k, False: 0]
  |  |  ------------------
  ------------------
 8301|  2.76k|}
cfun_debug_break:
 8333|      1|              "will set a breakpoint at line 10, 4th column of the file core.janet.") {
 8334|      1|    JanetFuncDef *def;
 8335|      1|    int32_t offset;
 8336|      1|    helper_find(argc, argv, &def, &offset);
 8337|      1|    janet_debug_break(def, offset);
 8338|      1|    return janet_wrap_nil();
  ------------------
  |  |  826|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8339|      1|}
cfun_debug_unbreak:
 8345|      1|              "cannot be found.") {
 8346|      1|    JanetFuncDef *def;
 8347|      1|    int32_t offset = 0;
 8348|      1|    helper_find(argc, argv, &def, &offset);
 8349|      1|    janet_debug_unbreak(def, offset);
 8350|      1|    return janet_wrap_nil();
  ------------------
  |  |  826|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8351|      1|}
cfun_debug_fbreak:
 8357|      8|              "if the offset is too large or negative.") {
 8358|      8|    JanetFuncDef *def;
 8359|      8|    int32_t offset = 0;
 8360|      8|    helper_find_fun(argc, argv, &def, &offset);
 8361|      8|    janet_debug_break(def, offset);
 8362|      8|    return janet_wrap_nil();
  ------------------
  |  |  826|      8|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      8|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      8|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      8|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8363|      8|}
cfun_debug_unfbreak:
 8367|     12|              "Unset a breakpoint set with debug/fbreak.") {
 8368|     12|    JanetFuncDef *def;
 8369|     12|    int32_t offset;
 8370|     12|    helper_find_fun(argc, argv, &def, &offset);
 8371|     12|    janet_debug_unbreak(def, offset);
 8372|     12|    return janet_wrap_nil();
  ------------------
  |  |  826|     12|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|     12|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     12|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     12|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8373|     12|}
cfun_debug_stacktrace:
 8515|     20|              "provided, will skip the error line. Returns the fiber.") {
 8516|     20|    janet_arity(argc, 1, 3);
 8517|     20|    JanetFiber *fiber = janet_getfiber(argv, 0);
 8518|     20|    Janet x = argc == 1 ? janet_wrap_nil() : argv[1];
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (8518:15): [True: 0, False: 20]
  ------------------
 8519|       |    const char *prefix = janet_optcstring(argv, argc, 2, NULL);
 8520|     20|    janet_stacktrace_ext(fiber, x, prefix);
 8521|     20|    return argv[0];
 8522|     20|}
cfun_debug_step:
 8541|      3|              "which will usually be nil, as breakpoints raise nil signals.") {
 8542|      3|    janet_arity(argc, 1, 2);
 8543|      3|    JanetFiber *fiber = janet_getfiber(argv, 0);
 8544|      3|    Janet out = janet_wrap_nil();
  ------------------
  |  |  826|      3|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      3|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8545|      3|    janet_step(fiber, argc == 1 ? janet_wrap_nil() : argv[1], &out);
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (8545:23): [True: 0, False: 3]
  ------------------
 8546|      3|    return out;
 8547|      3|}
janet_lib_debug:
 8550|  7.16k|void janet_lib_debug(JanetTable *env) {
 8551|  7.16k|    JanetRegExt debug_cfuns[] = {
 8552|  7.16k|        JANET_CORE_REG("debug/break", cfun_debug_break),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 8553|  7.16k|        JANET_CORE_REG("debug/unbreak", cfun_debug_unbreak),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 8554|  7.16k|        JANET_CORE_REG("debug/fbreak", cfun_debug_fbreak),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 8555|  7.16k|        JANET_CORE_REG("debug/unfbreak", cfun_debug_unfbreak),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 8556|  7.16k|        JANET_CORE_REG("debug/arg-stack", cfun_debug_argstack),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 8557|  7.16k|        JANET_CORE_REG("debug/stack", cfun_debug_stack),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 8558|  7.16k|        JANET_CORE_REG("debug/stacktrace", cfun_debug_stacktrace),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 8559|  7.16k|        JANET_CORE_REG("debug/lineage", cfun_debug_lineage),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 8560|  7.16k|        JANET_CORE_REG("debug/step", cfun_debug_step),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 8561|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 8562|  7.16k|    };
 8563|       |    janet_core_cfuns_ext(env, NULL, debug_cfuns);
 8564|  7.16k|}
janetc_allocfar:
 8602|  11.4M|int32_t janetc_allocfar(JanetCompiler *c) {
 8603|  11.4M|    int32_t reg = janetc_regalloc_1(&c->scope->ra);
 8604|  11.4M|    if (reg > 0xFFFF) {
  ------------------
  |  Branch (8604:9): [True: 214k, False: 11.2M]
  ------------------
 8605|   214k|        janetc_cerror(c, "ran out of internal registers");
 8606|   214k|    }
 8607|  11.4M|    return reg;
 8608|  11.4M|}
janetc_allocnear:
 8611|  1.35M|int32_t janetc_allocnear(JanetCompiler *c, JanetcRegisterTemp tag) {
 8612|  1.35M|    return janetc_regalloc_temp(&c->scope->ra, tag);
 8613|  1.35M|}
janetc_emit:
 8616|  19.9M|void janetc_emit(JanetCompiler *c, uint32_t instr) {
 8617|  19.9M|    janet_v_push(c->buffer, instr);
  ------------------
  |  |  706|  19.9M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  19.9M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  19.9M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  19.7M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  19.7M|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  19.7M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  19.7M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 237k, False: 19.7M]
  |  |  |  |  |  |  |  Branch (717:50): [True: 620k, False: 19.1M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   857k|#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))
  |  |  ------------------
  |  |  |  |  715|  19.9M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  19.9M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8618|       |    janet_v_push(c->mapbuffer, c->current_mapping);
  ------------------
  |  |  706|  19.9M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  19.9M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  19.9M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  19.7M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  19.7M|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  19.7M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  19.7M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 237k, False: 19.7M]
  |  |  |  |  |  |  |  Branch (717:50): [True: 620k, False: 19.1M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   857k|#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))
  |  |  ------------------
  |  |  |  |  715|  19.9M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  19.9M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8619|  19.9M|}
janetc_sequal:
 8793|  1.61M|int janetc_sequal(JanetSlot lhs, JanetSlot rhs) {
 8794|  1.61M|    if ((lhs.flags & ~JANET_SLOTTYPE_ANY) == (rhs.flags & ~JANET_SLOTTYPE_ANY) &&
  ------------------
  |  |  993|  1.61M|#define JANET_SLOTTYPE_ANY 0xFFFF
  ------------------
                  if ((lhs.flags & ~JANET_SLOTTYPE_ANY) == (rhs.flags & ~JANET_SLOTTYPE_ANY) &&
  ------------------
  |  |  993|  1.61M|#define JANET_SLOTTYPE_ANY 0xFFFF
  ------------------
  |  Branch (8794:9): [True: 1.60M, False: 7.06k]
  ------------------
 8795|  1.60M|            lhs.index == rhs.index &&
  ------------------
  |  Branch (8795:13): [True: 2.76k, False: 1.60M]
  ------------------
 8796|  2.76k|            lhs.envindex == rhs.envindex) {
  ------------------
  |  Branch (8796:13): [True: 2.76k, False: 0]
  ------------------
 8797|  2.76k|        if (lhs.flags & (JANET_SLOT_REF | JANET_SLOT_CONSTANT)) {
  ------------------
  |  |  986|  2.76k|#define JANET_SLOT_REF 0x80000
  ------------------
                      if (lhs.flags & (JANET_SLOT_REF | JANET_SLOT_CONSTANT)) {
  ------------------
  |  |  983|  2.76k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (8797:13): [True: 0, False: 2.76k]
  ------------------
 8798|      0|            return janet_equals(lhs.constant, rhs.constant);
 8799|  2.76k|        } else {
 8800|  2.76k|            return 1;
 8801|  2.76k|        }
 8802|  2.76k|    }
 8803|  1.61M|    return 0;
 8804|  1.61M|}
janetc_copy:
 8811|  1.61M|    JanetSlot src) {
 8812|  1.61M|    if (dest.flags & JANET_SLOT_CONSTANT) {
  ------------------
  |  |  983|  1.61M|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (8812:9): [True: 0, False: 1.61M]
  ------------------
 8813|      0|        janetc_cerror(c, "cannot write to constant");
 8814|      0|        return;
 8815|      0|    }
 8816|  1.61M|    if (janetc_sequal(dest, src)) return;
  ------------------
  |  Branch (8816:9): [True: 2.76k, False: 1.61M]
  ------------------
 8817|       |    /* If dest is a near register */
 8818|  1.61M|    if (dest.envindex < 0 && dest.index >= 0 && dest.index <= 0xFF) {
  ------------------
  |  Branch (8818:9): [True: 1.61M, False: 852]
  |  Branch (8818:30): [True: 1.61M, False: 0]
  |  Branch (8818:49): [True: 224k, False: 1.38M]
  ------------------
 8819|   224k|        janetc_movenear(c, dest.index, src);
 8820|   224k|        return;
 8821|   224k|    }
 8822|       |    /* If src is a near register */
 8823|  1.38M|    if (src.envindex < 0 && src.index >= 0 && src.index <= 0xFF) {
  ------------------
  |  Branch (8823:9): [True: 1.38M, False: 0]
  |  Branch (8823:29): [True: 1.38M, False: 746]
  |  Branch (8823:47): [True: 35.4k, False: 1.35M]
  ------------------
 8824|  35.4k|        janetc_moveback(c, dest, src.index);
 8825|  35.4k|        return;
 8826|  35.4k|    }
 8827|       |    /* Process: src -> near -> dest */
 8828|  1.35M|    int32_t nearreg = janetc_allocnear(c, JANETC_REGTEMP_3);
 8829|  1.35M|    janetc_movenear(c, nearreg, src);
 8830|  1.35M|    janetc_moveback(c, dest, nearreg);
 8831|       |    /* Cleanup */
 8832|  1.35M|    janetc_regalloc_freetemp(&c->scope->ra, nearreg, JANETC_REGTEMP_3);
 8833|  1.35M|}
janetc_emit_s:
 8847|  1.86M|int32_t janetc_emit_s(JanetCompiler *c, uint8_t op, JanetSlot s, int wr) {
 8848|  1.86M|    int32_t reg = janetc_regfar(c, s, JANETC_REGTEMP_0);
 8849|  1.86M|    int32_t label = janet_v_count(c->buffer);
  ------------------
  |  |  708|  1.86M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  1.81M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  1.81M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 1.81M, False: 48.7k]
  |  |  ------------------
  ------------------
 8850|  1.86M|    janetc_emit(c, op | ((uint32_t) reg << 8));
 8851|  1.86M|    if (wr)
  ------------------
  |  Branch (8851:9): [True: 1.07M, False: 787k]
  ------------------
 8852|  1.07M|        janetc_moveback(c, s, reg);
 8853|  1.86M|    janetc_free_regnear(c, s, reg, JANETC_REGTEMP_0);
 8854|  1.86M|    return label;
 8855|  1.86M|}
janetc_emit_si:
 8870|  76.5k|int32_t janetc_emit_si(JanetCompiler *c, uint8_t op, JanetSlot s, int16_t immediate, int wr) {
 8871|  76.5k|    return emit1s(c, op, s, immediate, wr);
 8872|  76.5k|}
janetc_emit_su:
 8874|   465k|int32_t janetc_emit_su(JanetCompiler *c, uint8_t op, JanetSlot s, uint16_t immediate, int wr) {
 8875|   465k|    return emit1s(c, op, s, (int32_t) immediate, wr);
 8876|   465k|}
janetc_emit_ss:
 8890|   955k|int32_t janetc_emit_ss(JanetCompiler *c, uint8_t op, JanetSlot s1, JanetSlot s2, int wr) {
 8891|   955k|    int32_t reg1 = janetc_regnear(c, s1, JANETC_REGTEMP_0);
 8892|   955k|    int32_t reg2 = janetc_regfar(c, s2, JANETC_REGTEMP_1);
 8893|   955k|    int32_t label = janet_v_count(c->buffer);
  ------------------
  |  |  708|   955k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|   955k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|   955k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 955k, False: 1]
  |  |  ------------------
  ------------------
 8894|   955k|    janetc_emit(c, op | ((uint32_t) reg1 << 8) | ((uint32_t) reg2 << 16));
 8895|   955k|    janetc_free_regnear(c, s2, reg2, JANETC_REGTEMP_1);
 8896|   955k|    if (wr)
  ------------------
  |  Branch (8896:9): [True: 16.8k, False: 938k]
  ------------------
 8897|  16.8k|        janetc_moveback(c, s1, reg1);
 8898|   955k|    janetc_free_regnear(c, s1, reg1, JANETC_REGTEMP_0);
 8899|   955k|    return label;
 8900|   955k|}
janetc_emit_ssi:
 8902|  2.86k|int32_t janetc_emit_ssi(JanetCompiler *c, uint8_t op, JanetSlot s1, JanetSlot s2, int8_t immediate, int wr) {
 8903|  2.86k|    return emit2s(c, op, s1, s2, immediate, wr);
 8904|  2.86k|}
janetc_emit_ssu:
 8906|  3.07M|int32_t janetc_emit_ssu(JanetCompiler *c, uint8_t op, JanetSlot s1, JanetSlot s2, uint8_t immediate, int wr) {
 8907|  3.07M|    return emit2s(c, op, s1, s2, (int32_t) immediate, wr);
 8908|  3.07M|}
janetc_emit_sss:
 8910|   310k|int32_t janetc_emit_sss(JanetCompiler *c, uint8_t op, JanetSlot s1, JanetSlot s2, JanetSlot s3, int wr) {
 8911|   310k|    int32_t reg1 = janetc_regnear(c, s1, JANETC_REGTEMP_0);
 8912|   310k|    int32_t reg2 = janetc_regnear(c, s2, JANETC_REGTEMP_1);
 8913|   310k|    int32_t reg3 = janetc_regnear(c, s3, JANETC_REGTEMP_2);
 8914|   310k|    int32_t label = janet_v_count(c->buffer);
  ------------------
  |  |  708|   310k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|   310k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|   310k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 310k, False: 0]
  |  |  ------------------
  ------------------
 8915|   310k|    janetc_emit(c, op | ((uint32_t) reg1 << 8) | ((uint32_t) reg2 << 16) | ((uint32_t) reg3 << 24));
 8916|   310k|    janetc_free_regnear(c, s2, reg2, JANETC_REGTEMP_1);
 8917|   310k|    janetc_free_regnear(c, s3, reg3, JANETC_REGTEMP_2);
 8918|   310k|    if (wr)
  ------------------
  |  Branch (8918:9): [True: 106k, False: 203k]
  ------------------
 8919|   106k|        janetc_moveback(c, s1, reg1);
 8920|   310k|    janetc_free_regnear(c, s1, reg1, JANETC_REGTEMP_0);
 8921|   310k|    return label;
 8922|   310k|}
janet_async_end:
 9194|   387k|void janet_async_end(JanetFiber *fiber) {
 9195|   387k|    if (fiber->ev_callback) {
  ------------------
  |  Branch (9195:9): [True: 0, False: 387k]
  ------------------
 9196|      0|        if (fiber->ev_stream->read_fiber == fiber) {
  ------------------
  |  Branch (9196:13): [True: 0, False: 0]
  ------------------
 9197|      0|            fiber->ev_stream->read_fiber = NULL;
 9198|      0|        }
 9199|      0|        if (fiber->ev_stream->write_fiber == fiber) {
  ------------------
  |  Branch (9199:13): [True: 0, False: 0]
  ------------------
 9200|      0|            fiber->ev_stream->write_fiber = NULL;
 9201|      0|        }
 9202|      0|        fiber->ev_callback(fiber, JANET_ASYNC_EVENT_DEINIT);
 9203|      0|        janet_gcunroot(janet_wrap_abstract(fiber->ev_stream));
  ------------------
  |  |  846|      0|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9204|      0|        fiber->ev_callback = NULL;
 9205|      0|        if (!(fiber->flags & JANET_FIBER_EV_FLAG_IN_FLIGHT)) {
  ------------------
  |  |  792|      0|#define JANET_FIBER_EV_FLAG_IN_FLIGHT 0x1
  ------------------
  |  Branch (9205:13): [True: 0, False: 0]
  ------------------
 9206|      0|            if (fiber->ev_state) {
  ------------------
  |  Branch (9206:17): [True: 0, False: 0]
  ------------------
 9207|      0|                janet_free(fiber->ev_state);
  ------------------
  |  | 2402|      0|#define janet_free(X) free((X))
  ------------------
 9208|       |                fiber->ev_state = NULL;
 9209|      0|            }
 9210|      0|            janet_ev_dec_refcount();
 9211|      0|        }
 9212|      0|    }
 9213|   387k|}
janet_fiber_did_resume:
 9244|   387k|void janet_fiber_did_resume(JanetFiber *fiber) {
 9245|   387k|    janet_async_end(fiber);
 9246|   387k|}
janet_stream_ext:
 9269|     22|JanetStream *janet_stream_ext(JanetHandle handle, uint32_t flags, const JanetMethod *methods, size_t size) {
 9270|     22|    janet_assert(size >= sizeof(JanetStream), "bad size");
  ------------------
  |  |  386|     22|#define janet_assert(c, m) do { \
  |  |  387|     22|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 22]
  |  |  ------------------
  |  |  388|     22|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 22]
  |  |  ------------------
  ------------------
 9271|     22|    JanetStream *stream = janet_abstract(&janet_stream_type, size);
 9272|     22|    stream->handle = handle;
 9273|     22|    stream->flags = flags;
 9274|     22|    stream->read_fiber = NULL;
 9275|     22|    stream->write_fiber = NULL;
 9276|     22|    if (methods == NULL) methods = ev_default_stream_methods;
  ------------------
  |  Branch (9276:9): [True: 16, False: 6]
  ------------------
 9277|     22|    stream->methods = methods;
 9278|     22|    stream->index = 0;
 9279|     22|    janet_register_stream(stream);
 9280|     22|    return stream;
 9281|     22|}
janet_stream:
 9283|     22|JanetStream *janet_stream(JanetHandle handle, uint32_t flags, const JanetMethod *methods) {
 9284|     22|    return janet_stream_ext(handle, flags, methods, sizeof(JanetStream));
 9285|     22|}
janet_schedule_signal:
 9458|    718|void janet_schedule_signal(JanetFiber *fiber, Janet value, JanetSignal sig) {
 9459|    718|    janet_schedule_general(fiber, value, sig, 0);
 9460|    718|}
janet_schedule:
 9473|    718|void janet_schedule(JanetFiber *fiber, Janet value) {
 9474|    718|    janet_schedule_signal(fiber, value, JANET_SIGNAL_OK);
 9475|    718|}
janet_ev_mark:
 9478|  1.21k|void janet_ev_mark(void) {
 9479|       |
 9480|       |    /* Pending tasks */
 9481|  1.21k|    JanetTask *tasks = janet_vm.spawn.data;
 9482|  1.21k|    if (janet_vm.spawn.head <= janet_vm.spawn.tail) {
  ------------------
  |  Branch (9482:9): [True: 1.21k, False: 0]
  ------------------
 9483|  1.28k|        for (int32_t i = janet_vm.spawn.head; i < janet_vm.spawn.tail; i++) {
  ------------------
  |  Branch (9483:47): [True: 67, False: 1.21k]
  ------------------
 9484|     67|            janet_mark(janet_wrap_fiber(tasks[i].fiber));
  ------------------
  |  |  839|     67|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|     67|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     67|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     67|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9485|     67|            janet_mark(tasks[i].value);
 9486|     67|        }
 9487|  1.21k|    } else {
 9488|      0|        for (int32_t i = janet_vm.spawn.head; i < janet_vm.spawn.capacity; i++) {
  ------------------
  |  Branch (9488:47): [True: 0, False: 0]
  ------------------
 9489|      0|            janet_mark(janet_wrap_fiber(tasks[i].fiber));
  ------------------
  |  |  839|      0|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9490|      0|            janet_mark(tasks[i].value);
 9491|      0|        }
 9492|      0|        for (int32_t i = 0; i < janet_vm.spawn.tail; i++) {
  ------------------
  |  Branch (9492:29): [True: 0, False: 0]
  ------------------
 9493|      0|            janet_mark(janet_wrap_fiber(tasks[i].fiber));
  ------------------
  |  |  839|      0|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9494|      0|            janet_mark(tasks[i].value);
 9495|      0|        }
 9496|      0|    }
 9497|       |
 9498|       |    /* Pending timeouts */
 9499|  1.30k|    for (size_t i = 0; i < janet_vm.tq_count; i++) {
  ------------------
  |  Branch (9499:24): [True: 86, False: 1.21k]
  ------------------
 9500|     86|        janet_mark(janet_wrap_fiber(janet_vm.tq[i].fiber));
  ------------------
  |  |  839|     86|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|     86|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     86|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     86|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9501|     86|        if (janet_vm.tq[i].curr_fiber != NULL) {
  ------------------
  |  Branch (9501:13): [True: 0, False: 86]
  ------------------
 9502|      0|            janet_mark(janet_wrap_fiber(janet_vm.tq[i].curr_fiber));
  ------------------
  |  |  839|      0|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9503|      0|        }
 9504|     86|    }
 9505|  1.21k|}
janet_ev_init_common:
 9523|  7.65k|void janet_ev_init_common(void) {
 9524|  7.65k|    janet_q_init(&janet_vm.spawn);
 9525|  7.65k|    janet_vm.tq = NULL;
 9526|  7.65k|    janet_vm.tq_count = 0;
 9527|  7.65k|    janet_vm.tq_capacity = 0;
 9528|  7.65k|    janet_table_init_raw(&janet_vm.threaded_abstracts, 0);
 9529|  7.65k|    janet_table_init_raw(&janet_vm.active_tasks, 0);
 9530|  7.65k|    janet_table_init_raw(&janet_vm.signal_handlers, 0);
 9531|  7.65k|    janet_rng_seed(&janet_vm.ev_rng, 0);
 9532|  7.65k|#ifndef JANET_WINDOWS
 9533|  7.65k|    pthread_attr_init(&janet_vm.new_thread_attr);
 9534|       |    pthread_attr_setdetachstate(&janet_vm.new_thread_attr, PTHREAD_CREATE_DETACHED);
 9535|  7.65k|#endif
 9536|  7.65k|}
janet_ev_deinit_common:
 9569|  7.65k|void janet_ev_deinit_common(void) {
 9570|  7.65k|    JanetTimeout to;
 9571|  11.2k|    while (peek_timeout(&to)) {
  ------------------
  |  Branch (9571:12): [True: 3.61k, False: 7.65k]
  ------------------
 9572|  3.61k|        handle_timeout_worker(to, 1);
 9573|  3.61k|        pop_timeout(0);
 9574|  3.61k|    }
 9575|  7.65k|    janet_q_deinit(&janet_vm.spawn);
 9576|  7.65k|    janet_free(janet_vm.tq);
  ------------------
  |  | 2402|  7.65k|#define janet_free(X) free((X))
  ------------------
 9577|  7.65k|    janet_table_deinit(&janet_vm.threaded_abstracts);
 9578|  7.65k|    janet_table_deinit(&janet_vm.active_tasks);
 9579|  7.65k|    janet_table_deinit(&janet_vm.signal_handlers);
 9580|  7.65k|#ifndef JANET_WINDOWS
 9581|  7.65k|    pthread_attr_destroy(&janet_vm.new_thread_attr);
 9582|  7.65k|#endif
 9583|  7.65k|}
janet_await:
 9586|  1.44k|void janet_await(void) {
 9587|       |    /* Store the fiber in a global table */
 9588|  1.44k|    janet_signalv(JANET_SIGNAL_EVENT, janet_wrap_nil());
  ------------------
  |  |  826|  1.44k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  1.44k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.44k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.44k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9589|  1.44k|}
janet_ev_inc_refcount:
 9668|    538|void janet_ev_inc_refcount(void) {
 9669|    538|    janet_atomic_inc(&janet_vm.listener_count);
 9670|    538|}
janet_ev_dec_refcount:
 9672|     91|void janet_ev_dec_refcount(void) {
 9673|     91|    janet_atomic_dec(&janet_vm.listener_count);
 9674|     91|}
janet_channel_unwrap:
10066|     34|JanetChannel *janet_channel_unwrap(void *abstract) {
10067|     34|    return abstract;
10068|     34|}
janet_getchannel:
10070|     52|JanetChannel *janet_getchannel(const Janet *argv, int32_t n) {
10071|     52|    return janet_channel_unwrap(janet_getabstract(argv, n, &janet_channel_type));
10072|     52|}
cfun_channel_pop:
10123|     35|              "Read from a channel, suspending the current fiber if no value is available.") {
10124|     35|    janet_fixarity(argc, 1);
10125|     35|    JanetChannel *channel = janet_getchannel(argv, 0);
10126|     35|    Janet item;
10127|     35|    if (janet_vm.coerce_error) {
  ------------------
  |  Branch (10127:9): [True: 0, False: 35]
  ------------------
10128|      0|        janet_panic("cannot take from channel inside janet_call");
10129|      0|    }
10130|     35|    if (janet_channel_pop(channel, &item, 0)) {
  ------------------
  |  Branch (10130:9): [True: 0, False: 35]
  ------------------
10131|      0|        janet_schedule(janet_vm.root_fiber, item);
10132|      0|    }
10133|     35|    janet_await();
10134|     35|}
cfun_channel_choice:
10147|     17|              "closed.") {
10148|     17|    janet_arity(argc, 1, -1);
10149|     17|    int32_t len;
10150|     17|    const Janet *data;
10151|       |
10152|     17|    if (janet_vm.coerce_error) {
  ------------------
  |  Branch (10152:9): [True: 0, False: 17]
  ------------------
10153|      0|        janet_panic("cannot select from channel inside janet_call");
10154|      0|    }
10155|       |
10156|       |    /* Check channels for immediate reads and writes */
10157|     34|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (10157:25): [True: 17, False: 17]
  ------------------
10158|     17|        if (janet_indexed_view(argv[i], &data, &len) && len == 2) {
  ------------------
  |  Branch (10158:13): [True: 3, False: 14]
  |  Branch (10158:57): [True: 3, False: 0]
  ------------------
10159|       |            /* Write */
10160|      3|            JanetChannel *chan = janet_getchannel(data, 0);
10161|      3|            janet_chan_lock(chan);
10162|      3|            if (chan->closed) {
  ------------------
  |  Branch (10162:17): [True: 0, False: 3]
  ------------------
10163|      0|                janet_chan_unlock(chan);
10164|      0|                return make_close_result(chan);
10165|      0|            }
10166|      3|            if (janet_q_count(&chan->items) < chan->limit) {
  ------------------
  |  Branch (10166:17): [True: 0, False: 3]
  ------------------
10167|      0|                janet_channel_push_with_lock(chan, data[1], 1);
10168|      0|                return make_write_result(chan);
10169|      0|            }
10170|      3|            janet_chan_unlock(chan);
10171|     14|        } else {
10172|       |            /* Read */
10173|     14|            JanetChannel *chan = janet_getchannel(argv, i);
10174|     14|            janet_chan_lock(chan);
10175|     14|            if (chan->closed) {
  ------------------
  |  Branch (10175:17): [True: 0, False: 14]
  ------------------
10176|      0|                janet_chan_unlock(chan);
10177|      0|                return make_close_result(chan);
10178|      0|            }
10179|     14|            if (chan->items.head != chan->items.tail) {
  ------------------
  |  Branch (10179:17): [True: 0, False: 14]
  ------------------
10180|      0|                Janet item;
10181|      0|                janet_channel_pop_with_lock(chan, &item, 1);
10182|      0|                return make_read_result(chan, item);
10183|      0|            }
10184|     14|            janet_chan_unlock(chan);
10185|     14|        }
10186|     17|    }
10187|       |
10188|       |    /* Wait for all readers or writers */
10189|     17|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (10189:25): [True: 0, False: 17]
  ------------------
10190|      0|        if (janet_indexed_view(argv[i], &data, &len) && len == 2) {
  ------------------
  |  Branch (10190:13): [True: 0, False: 0]
  |  Branch (10190:57): [True: 0, False: 0]
  ------------------
10191|       |            /* Write */
10192|      0|            JanetChannel *chan = janet_getchannel(data, 0);
10193|      0|            janet_chan_lock(chan);
10194|      0|            janet_channel_push_with_lock(chan, data[1], 1);
10195|      0|        } else {
10196|       |            /* Read */
10197|      0|            Janet item;
10198|      0|            JanetChannel *chan = janet_getchannel(argv, i);
10199|      0|            janet_chan_lock(chan);
10200|      0|            janet_channel_pop_with_lock(chan, &item, 1);
10201|      0|        }
10202|      0|    }
10203|       |
10204|     17|    janet_await();
10205|     17|}
cfun_channel_capacity:
10220|      1|              "Get the number of items a channel will store before blocking writers.") {
10221|      1|    janet_fixarity(argc, 1);
10222|      1|    JanetChannel *channel = janet_getchannel(argv, 0);
10223|      1|    janet_chan_lock(channel);
10224|      1|    Janet ret = janet_wrap_integer(channel->limit);
  ------------------
  |  |  958|      1|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
10225|      1|    janet_chan_unlock(channel);
10226|      1|    return ret;
10227|      1|}
cfun_channel_rchoice:
10252|     16|              "Similar to ev/select, but will try clauses in a random order for fairness.") {
10253|     16|    fisher_yates_args(argc, argv);
10254|     16|    return cfun_channel_choice(argc, argv);
10255|     16|}
cfun_channel_new:
10260|  1.56k|              "blocking writers, defaults to 0 if not provided. Returns a new channel.") {
10261|  1.56k|    janet_arity(argc, 0, 1);
10262|  1.56k|    int32_t limit = janet_optnat(argv, argc, 0, 0);
10263|  1.56k|    JanetChannel *channel = janet_abstract(&janet_channel_type, sizeof(JanetChannel));
10264|  1.56k|    janet_chan_init(channel, limit, 0);
10265|  1.56k|    return janet_wrap_abstract(channel);
  ------------------
  |  |  846|  1.56k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|  1.56k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.56k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.56k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10266|  1.56k|}
janet_loop_done:
10427|  1.03k|int janet_loop_done(void) {
10428|  1.03k|    return !((janet_vm.spawn.head != janet_vm.spawn.tail) ||
  ------------------
  |  Branch (10428:14): [True: 537, False: 493]
  ------------------
10429|    493|             janet_vm.tq_count ||
  ------------------
  |  Branch (10429:14): [True: 1, False: 492]
  ------------------
10430|    492|             janet_atomic_load(&janet_vm.listener_count));
  ------------------
  |  Branch (10430:14): [True: 0, False: 492]
  ------------------
10431|  1.03k|}
janet_loop1:
10433|    538|JanetFiber *janet_loop1(void) {
10434|       |    /* Schedule expired timers */
10435|    538|    JanetTimeout to;
10436|    538|    JanetTimestamp now = ts_now();
10437|    539|    while (peek_timeout(&to) && to.when <= now) {
  ------------------
  |  Branch (10437:12): [True: 1, False: 538]
  |  Branch (10437:33): [True: 1, False: 0]
  ------------------
10438|      1|        pop_timeout(0);
10439|      1|        if (to.curr_fiber != NULL) {
  ------------------
  |  Branch (10439:13): [True: 0, False: 1]
  ------------------
10440|      0|            if (janet_fiber_can_resume(to.curr_fiber)) {
  ------------------
  |  Branch (10440:17): [True: 0, False: 0]
  ------------------
10441|      0|                janet_cancel(to.fiber, janet_cstringv("deadline expired"));
  ------------------
  |  | 1816|      0|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  843|      0|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10442|      0|            }
10443|      1|        } else {
10444|       |            /* This is a timeout (for a function call, not a whole fiber) */
10445|      1|            if (to.fiber->sched_id == to.sched_id) {
  ------------------
  |  Branch (10445:17): [True: 1, False: 0]
  ------------------
10446|      1|                if (to.is_error) {
  ------------------
  |  Branch (10446:21): [True: 0, False: 1]
  ------------------
10447|      0|                    janet_cancel(to.fiber, janet_cstringv("timeout"));
  ------------------
  |  | 1816|      0|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  843|      0|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10448|      1|                } else {
10449|      1|                    janet_schedule(to.fiber, janet_wrap_nil());
  ------------------
  |  |  826|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10450|      1|                }
10451|      1|            }
10452|      1|        }
10453|      1|        handle_timeout_worker(to, 0);
10454|      1|    }
10455|       |
10456|       |    /* Run scheduled fibers unless interrupts need to be handled. */
10457|  1.07k|    while (janet_vm.spawn.head != janet_vm.spawn.tail) {
  ------------------
  |  Branch (10457:12): [True: 538, False: 538]
  ------------------
10458|       |        /* Don't run until all interrupts have been marked as handled by calling janet_interpreter_interrupt_handled */
10459|    538|        if (janet_atomic_load_relaxed(&janet_vm.auto_suspend)) break;
  ------------------
  |  Branch (10459:13): [True: 0, False: 538]
  ------------------
10460|    538|        JanetTask task = {NULL, janet_wrap_nil(), JANET_SIGNAL_OK, 0};
  ------------------
  |  |  826|    538|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|    538|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    538|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    538|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10461|    538|        janet_q_pop(&janet_vm.spawn, &task, sizeof(task));
10462|    538|        if (task.fiber->gc.flags & JANET_FIBER_EV_FLAG_SUSPENDED) janet_ev_dec_refcount();
  ------------------
  |  |  790|    538|#define JANET_FIBER_EV_FLAG_SUSPENDED 0x20000
  ------------------
  |  Branch (10462:13): [True: 46, False: 492]
  ------------------
10463|    538|        task.fiber->gc.flags &= ~(JANET_FIBER_EV_FLAG_CANCELED | JANET_FIBER_EV_FLAG_SUSPENDED);
  ------------------
  |  |  789|    538|#define JANET_FIBER_EV_FLAG_CANCELED 0x10000
  ------------------
                      task.fiber->gc.flags &= ~(JANET_FIBER_EV_FLAG_CANCELED | JANET_FIBER_EV_FLAG_SUSPENDED);
  ------------------
  |  |  790|    538|#define JANET_FIBER_EV_FLAG_SUSPENDED 0x20000
  ------------------
10464|    538|        if (task.expected_sched_id != task.fiber->sched_id) continue;
  ------------------
  |  Branch (10464:13): [True: 0, False: 538]
  ------------------
10465|    538|        Janet res;
10466|    538|        JanetSignal sig = janet_continue_signal(task.fiber, task.value, &res, task.sig);
10467|    538|        if (!janet_fiber_can_resume(task.fiber)) {
  ------------------
  |  Branch (10467:13): [True: 492, False: 46]
  ------------------
10468|    492|            janet_table_remove(&janet_vm.active_tasks, janet_wrap_fiber(task.fiber));
  ------------------
  |  |  839|    492|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|    492|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    492|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    492|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10469|    492|        }
10470|    538|        void *sv = task.fiber->supervisor_channel;
10471|    538|        int is_suspended = sig == JANET_SIGNAL_EVENT || sig == JANET_SIGNAL_YIELD || sig == JANET_SIGNAL_INTERRUPT;
  ------------------
  |  Branch (10471:28): [True: 46, False: 492]
  |  Branch (10471:57): [True: 0, False: 492]
  |  Branch (10471:86): [True: 0, False: 492]
  ------------------
10472|    538|        if (is_suspended) {
  ------------------
  |  Branch (10472:13): [True: 46, False: 492]
  ------------------
10473|     46|            task.fiber->gc.flags |= JANET_FIBER_EV_FLAG_SUSPENDED;
  ------------------
  |  |  790|     46|#define JANET_FIBER_EV_FLAG_SUSPENDED 0x20000
  ------------------
10474|     46|            janet_ev_inc_refcount();
10475|     46|        }
10476|    538|        if (NULL == sv) {
  ------------------
  |  Branch (10476:13): [True: 538, False: 0]
  ------------------
10477|    538|            if (!is_suspended) {
  ------------------
  |  Branch (10477:17): [True: 492, False: 46]
  ------------------
10478|    492|                janet_stacktrace_ext(task.fiber, res, "");
10479|    492|            }
10480|    538|        } else if (sig == JANET_SIGNAL_OK || (task.fiber->flags & (1 << sig))) {
  ------------------
  |  Branch (10480:20): [True: 0, False: 0]
  |  Branch (10480:46): [True: 0, False: 0]
  ------------------
10481|      0|            JanetChannel *chan = janet_channel_unwrap(sv);
10482|      0|            janet_channel_push(chan, make_supervisor_event(janet_signal_names[sig],
10483|      0|                               task.fiber, chan->is_threaded), 2);
10484|      0|        } else if (!is_suspended) {
  ------------------
  |  Branch (10484:20): [True: 0, False: 0]
  ------------------
10485|      0|            janet_stacktrace_ext(task.fiber, res, "");
10486|      0|        }
10487|    538|        if (sig == JANET_SIGNAL_INTERRUPT) {
  ------------------
  |  Branch (10487:13): [True: 0, False: 538]
  ------------------
10488|      0|            return task.fiber;
10489|      0|        }
10490|    538|    }
10491|       |
10492|       |    /* Poll for events */
10493|    538|    if (janet_vm.tq_count || janet_atomic_load(&janet_vm.listener_count)) {
  ------------------
  |  Branch (10493:9): [True: 1, False: 537]
  |  Branch (10493:30): [True: 45, False: 492]
  ------------------
10494|     46|        JanetTimeout to;
10495|     46|        memset(&to, 0, sizeof(to));
10496|     46|        int has_timeout;
10497|       |        /* Drop timeouts that are no longer needed */
10498|     46|        while ((has_timeout = peek_timeout(&to))) {
  ------------------
  |  Branch (10498:16): [True: 1, False: 45]
  ------------------
10499|      1|            if (to.curr_fiber != NULL) {
  ------------------
  |  Branch (10499:17): [True: 0, False: 1]
  ------------------
10500|      0|                if (!janet_fiber_can_resume(to.curr_fiber)) {
  ------------------
  |  Branch (10500:21): [True: 0, False: 0]
  ------------------
10501|      0|                    pop_timeout(0);
10502|      0|                    janet_table_remove(&janet_vm.active_tasks, janet_wrap_fiber(to.curr_fiber));
  ------------------
  |  |  839|      0|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10503|      0|                    handle_timeout_worker(to, 1);
10504|      0|                    continue;
10505|      0|                }
10506|      1|            } else if (to.fiber->sched_id != to.sched_id) {
  ------------------
  |  Branch (10506:24): [True: 0, False: 1]
  ------------------
10507|      0|                pop_timeout(0);
10508|      0|                handle_timeout_worker(to, 1);
10509|      0|                continue;
10510|      0|            }
10511|      1|            break;
10512|      1|        }
10513|       |        /* Run polling implementation only if pending timeouts or pending events */
10514|     46|        if (janet_vm.tq_count || janet_atomic_load(&janet_vm.listener_count)) {
  ------------------
  |  Branch (10514:13): [True: 1, False: 45]
  |  Branch (10514:34): [True: 45, False: 0]
  ------------------
10515|     46|            janet_loop1_impl(has_timeout, to.when);
10516|     46|        }
10517|     46|    }
10518|       |
10519|       |    /* No fiber was interrupted */
10520|       |    return NULL;
10521|    538|}
janet_loop:
10534|    492|void janet_loop(void) {
10535|  1.03k|    while (!janet_loop_done()) {
  ------------------
  |  Branch (10535:12): [True: 538, False: 492]
  ------------------
10536|    538|        JanetFiber *interrupted_fiber = janet_loop1();
10537|    538|        if (NULL != interrupted_fiber) {
  ------------------
  |  Branch (10537:13): [True: 0, False: 538]
  ------------------
10538|      0|            janet_schedule(interrupted_fiber, janet_wrap_nil());
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10539|      0|        }
10540|    538|    }
10541|    492|}
janet_loop1_impl:
10727|     46|void janet_loop1_impl(int has_timeout, JanetTimestamp timeout) {
10728|     46|    struct itimerspec its;
10729|     46|    if (janet_vm.timer_enabled || has_timeout) {
  ------------------
  |  Branch (10729:9): [True: 0, False: 46]
  |  Branch (10729:35): [True: 1, False: 45]
  ------------------
10730|      1|        memset(&its, 0, sizeof(its));
10731|      1|        if (has_timeout) {
  ------------------
  |  Branch (10731:13): [True: 1, False: 0]
  ------------------
10732|      1|            its.it_value.tv_sec = timeout / 1000;
10733|      1|            its.it_value.tv_nsec = (timeout % 1000) * 1000000;
10734|      1|        }
10735|      1|        timerfd_settime(janet_vm.timerfd, TFD_TIMER_ABSTIME, &its, NULL);
10736|      1|    }
10737|     46|    janet_vm.timer_enabled = has_timeout;
10738|       |
10739|       |    /* Poll for events */
10740|     46|    struct epoll_event events[JANET_EPOLL_MAX_EVENTS];
10741|     46|    int ready;
10742|     46|    do {
10743|     46|        ready = epoll_wait(janet_vm.epoll, events, JANET_EPOLL_MAX_EVENTS, -1);
  ------------------
  |  |10726|     46|#define JANET_EPOLL_MAX_EVENTS 64
  ------------------
10744|     46|    } while (ready == -1 && errno == EINTR);
  ------------------
  |  Branch (10744:14): [True: 0, False: 46]
  |  Branch (10744:29): [True: 0, False: 0]
  ------------------
10745|     46|    if (ready == -1) {
  ------------------
  |  Branch (10745:9): [True: 0, False: 46]
  ------------------
10746|      0|        JANET_EXIT("failed to poll events");
  ------------------
  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  377|      0|        __FILE__,\
  |  |  378|      0|        __LINE__,\
  |  |  379|      0|        (m));\
  |  |  380|      0|    abort();\
  |  |  381|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
10747|      0|    }
10748|       |
10749|       |    /* Step state machines */
10750|     92|    for (int i = 0; i < ready; i++) {
  ------------------
  |  Branch (10750:21): [True: 46, False: 46]
  ------------------
10751|     46|        void *p = events[i].data.ptr;
10752|     46|        if (&janet_vm.timerfd == p) {
  ------------------
  |  Branch (10752:13): [True: 1, False: 45]
  ------------------
10753|      1|            /* Timer expired, ignore */;
10754|     45|        } else if (janet_vm.selfpipe == p) {
  ------------------
  |  Branch (10754:20): [True: 45, False: 0]
  ------------------
10755|       |            /* Self-pipe handling */
10756|     45|            janet_ev_handle_selfpipe();
10757|     45|        } else {
10758|      0|            JanetStream *stream = p;
10759|      0|            int mask = events[i].events;
10760|      0|            int has_err = mask & EPOLLERR;
10761|      0|            int has_hup = mask & EPOLLHUP;
10762|      0|            JanetFiber *rf = stream->read_fiber;
10763|      0|            JanetFiber *wf = stream->write_fiber;
10764|      0|            if (rf) {
  ------------------
  |  Branch (10764:17): [True: 0, False: 0]
  ------------------
10765|      0|                if (rf->ev_callback && (mask & EPOLLIN)) {
  ------------------
  |  Branch (10765:21): [True: 0, False: 0]
  |  Branch (10765:40): [True: 0, False: 0]
  ------------------
10766|      0|                    rf->ev_callback(rf, JANET_ASYNC_EVENT_READ);
10767|      0|                }
10768|      0|                if (rf->ev_callback && has_err) {
  ------------------
  |  Branch (10768:21): [True: 0, False: 0]
  |  Branch (10768:40): [True: 0, False: 0]
  ------------------
10769|      0|                    rf->ev_callback(rf, JANET_ASYNC_EVENT_ERR);
10770|      0|                }
10771|      0|                if (rf->ev_callback && has_hup) {
  ------------------
  |  Branch (10771:21): [True: 0, False: 0]
  |  Branch (10771:40): [True: 0, False: 0]
  ------------------
10772|      0|                    rf->ev_callback(rf, JANET_ASYNC_EVENT_HUP);
10773|      0|                }
10774|      0|            }
10775|      0|            if (wf) {
  ------------------
  |  Branch (10775:17): [True: 0, False: 0]
  ------------------
10776|      0|                if (wf->ev_callback && (mask & EPOLLOUT)) {
  ------------------
  |  Branch (10776:21): [True: 0, False: 0]
  |  Branch (10776:40): [True: 0, False: 0]
  ------------------
10777|      0|                    wf->ev_callback(wf, JANET_ASYNC_EVENT_WRITE);
10778|      0|                }
10779|      0|                if (wf->ev_callback && has_err) {
  ------------------
  |  Branch (10779:21): [True: 0, False: 0]
  |  Branch (10779:40): [True: 0, False: 0]
  ------------------
10780|      0|                    wf->ev_callback(wf, JANET_ASYNC_EVENT_ERR);
10781|      0|                }
10782|      0|                if (wf->ev_callback && has_hup) {
  ------------------
  |  Branch (10782:21): [True: 0, False: 0]
  |  Branch (10782:40): [True: 0, False: 0]
  ------------------
10783|      0|                    wf->ev_callback(wf, JANET_ASYNC_EVENT_HUP);
10784|      0|                }
10785|      0|            }
10786|      0|            janet_stream_checktoclose(stream);
10787|      0|        }
10788|     46|    }
10789|     46|}
janet_ev_init:
10791|  7.65k|void janet_ev_init(void) {
10792|  7.65k|    janet_ev_init_common();
10793|  7.65k|    janet_ev_setup_selfpipe();
10794|  7.65k|    janet_vm.epoll = epoll_create1(EPOLL_CLOEXEC);
10795|  7.65k|    janet_vm.timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK);
10796|  7.65k|    janet_vm.timer_enabled = 0;
10797|  7.65k|    if (janet_vm.epoll == -1 || janet_vm.timerfd == -1) goto error;
  ------------------
  |  Branch (10797:9): [True: 0, False: 7.65k]
  |  Branch (10797:33): [True: 0, False: 7.65k]
  ------------------
10798|  7.65k|    struct epoll_event ev;
10799|  7.65k|    ev.events = EPOLLIN | EPOLLET;
10800|  7.65k|    ev.data.ptr = &janet_vm.timerfd;
10801|  7.65k|    if (-1 == epoll_ctl(janet_vm.epoll, EPOLL_CTL_ADD, janet_vm.timerfd, &ev)) goto error;
  ------------------
  |  Branch (10801:9): [True: 0, False: 7.65k]
  ------------------
10802|  7.65k|    ev.events = EPOLLIN | EPOLLET;
10803|  7.65k|    ev.data.ptr = janet_vm.selfpipe;
10804|  7.65k|    if (-1 == epoll_ctl(janet_vm.epoll, EPOLL_CTL_ADD, janet_vm.selfpipe[0], &ev)) goto error;
  ------------------
  |  Branch (10804:9): [True: 0, False: 7.65k]
  ------------------
10805|  7.65k|    return;
10806|  7.65k|error:
10807|       |    JANET_EXIT("failed to initialize event loop");
  ------------------
  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  377|      0|        __FILE__,\
  |  |  378|      0|        __LINE__,\
  |  |  379|      0|        (m));\
  |  |  380|      0|    abort();\
  |  |  381|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
10808|      0|}
janet_ev_deinit:
10810|  7.65k|void janet_ev_deinit(void) {
10811|  7.65k|    janet_ev_deinit_common();
10812|  7.65k|    close(janet_vm.epoll);
10813|  7.65k|    close(janet_vm.timerfd);
10814|  7.65k|    janet_ev_cleanup_selfpipe();
10815|  7.65k|    janet_vm.epoll = 0;
10816|  7.65k|}
janet_ev_threaded_call:
11262|    492|void janet_ev_threaded_call(JanetThreadedSubroutine fp, JanetEVGenericMessage arguments, JanetThreadedCallback cb) {
11263|    492|    JanetEVThreadInit *init = janet_malloc(sizeof(JanetEVThreadInit));
  ------------------
  |  | 2393|    492|#define janet_malloc(X) malloc((X))
  ------------------
11264|    492|    if (NULL == init) {
  ------------------
  |  Branch (11264:9): [True: 0, False: 492]
  ------------------
11265|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
11266|      0|    }
11267|    492|    init->msg = arguments;
11268|    492|    init->subr = fp;
11269|    492|    init->cb = cb;
11270|       |
11271|       |#ifdef JANET_WINDOWS
11272|       |    init->write_pipe = janet_vm.iocp;
11273|       |    HANDLE thread_handle = CreateThread(NULL, 0, janet_thread_body, init, 0, NULL);
11274|       |    if (NULL == thread_handle) {
11275|       |        janet_free(init);
11276|       |        janet_panic("failed to create thread");
11277|       |    }
11278|       |    CloseHandle(thread_handle); /* detach from thread */
11279|       |#else
11280|    492|    init->write_pipe = janet_vm.selfpipe[1];
11281|    492|    pthread_t waiter_thread;
11282|    492|    int err = pthread_create(&waiter_thread, &janet_vm.new_thread_attr, janet_thread_body, init);
11283|    492|    if (err) {
  ------------------
  |  Branch (11283:9): [True: 0, False: 492]
  ------------------
11284|      0|        janet_free(init);
  ------------------
  |  | 2402|      0|#define janet_free(X) free((X))
  ------------------
11285|      0|        janet_panicf("%s", janet_strerror(err));
11286|      0|    }
11287|    492|#endif
11288|       |
11289|       |    /* Increment ev refcount so we don't quit while waiting for a subprocess */
11290|    492|    janet_ev_inc_refcount();
11291|    492|}
janet_ev_default_threaded_callback:
11294|     45|void janet_ev_default_threaded_callback(JanetEVGenericMessage return_value) {
11295|     45|    if (return_value.fiber == NULL) {
  ------------------
  |  Branch (11295:9): [True: 0, False: 45]
  ------------------
11296|       |        /* Clean up */
11297|      0|        switch (return_value.tag) {
11298|      0|            default:
  ------------------
  |  Branch (11298:13): [True: 0, False: 0]
  ------------------
11299|      0|            case JANET_EV_TCTAG_STRINGF:
  ------------------
  |  | 1572|      0|#define JANET_EV_TCTAG_STRINGF 3      /* resume with janet_cstringv((const char *) argp), then call free on argp. */
  ------------------
  |  Branch (11299:13): [True: 0, False: 0]
  ------------------
11300|      0|            case JANET_EV_TCTAG_ERR_STRINGF:
  ------------------
  |  | 1575|      0|#define JANET_EV_TCTAG_ERR_STRINGF 6  /* cancel with janet_cstringv((const char *) argp), then call free on argp. */
  ------------------
  |  Branch (11300:13): [True: 0, False: 0]
  ------------------
11301|      0|                janet_free(return_value.argp);
  ------------------
  |  | 2402|      0|#define janet_free(X) free((X))
  ------------------
11302|      0|                break;
11303|      0|        }
11304|      0|        return;
11305|      0|    }
11306|     45|    if (janet_fiber_can_resume(return_value.fiber)) {
  ------------------
  |  Branch (11306:9): [True: 45, False: 0]
  ------------------
11307|     45|        switch (return_value.tag) {
11308|      0|            default:
  ------------------
  |  Branch (11308:13): [True: 0, False: 45]
  ------------------
11309|     45|            case JANET_EV_TCTAG_NIL:
  ------------------
  |  | 1569|     45|#define JANET_EV_TCTAG_NIL 0          /* resume with nil */
  ------------------
  |  Branch (11309:13): [True: 45, False: 0]
  ------------------
11310|     45|                janet_schedule(return_value.fiber, janet_wrap_nil());
  ------------------
  |  |  826|     45|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|     45|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     45|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     45|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11311|     45|                break;
11312|      0|            case JANET_EV_TCTAG_INTEGER:
  ------------------
  |  | 1570|      0|#define JANET_EV_TCTAG_INTEGER 1      /* resume with janet_wrap_integer(argi) */
  ------------------
  |  Branch (11312:13): [True: 0, False: 45]
  ------------------
11313|      0|                janet_schedule(return_value.fiber, janet_wrap_integer(return_value.argi));
  ------------------
  |  |  958|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
11314|      0|                break;
11315|      0|            case JANET_EV_TCTAG_STRING:
  ------------------
  |  | 1571|      0|#define JANET_EV_TCTAG_STRING 2       /* resume with janet_cstringv((const char *) argp) */
  ------------------
  |  Branch (11315:13): [True: 0, False: 45]
  ------------------
11316|      0|            case JANET_EV_TCTAG_STRINGF:
  ------------------
  |  | 1572|      0|#define JANET_EV_TCTAG_STRINGF 3      /* resume with janet_cstringv((const char *) argp), then call free on argp. */
  ------------------
  |  Branch (11316:13): [True: 0, False: 45]
  ------------------
11317|      0|                janet_schedule(return_value.fiber, janet_cstringv((const char *) return_value.argp));
  ------------------
  |  | 1816|      0|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  843|      0|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11318|      0|                break;
11319|      0|            case JANET_EV_TCTAG_KEYWORD:
  ------------------
  |  | 1573|      0|#define JANET_EV_TCTAG_KEYWORD 4      /* resume with janet_ckeywordv((const char *) argp) */
  ------------------
  |  Branch (11319:13): [True: 0, False: 45]
  ------------------
11320|      0|                janet_schedule(return_value.fiber, janet_ckeywordv((const char *) return_value.argp));
  ------------------
  |  | 1833|      0|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      0|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11321|      0|                break;
11322|      0|            case JANET_EV_TCTAG_ERR_STRING:
  ------------------
  |  | 1574|      0|#define JANET_EV_TCTAG_ERR_STRING 5   /* cancel with janet_cstringv((const char *) argp) */
  ------------------
  |  Branch (11322:13): [True: 0, False: 45]
  ------------------
11323|      0|            case JANET_EV_TCTAG_ERR_STRINGF:
  ------------------
  |  | 1575|      0|#define JANET_EV_TCTAG_ERR_STRINGF 6  /* cancel with janet_cstringv((const char *) argp), then call free on argp. */
  ------------------
  |  Branch (11323:13): [True: 0, False: 45]
  ------------------
11324|      0|                janet_cancel(return_value.fiber, janet_cstringv((const char *) return_value.argp));
  ------------------
  |  | 1816|      0|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  843|      0|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11325|      0|                break;
11326|      0|            case JANET_EV_TCTAG_ERR_KEYWORD:
  ------------------
  |  | 1576|      0|#define JANET_EV_TCTAG_ERR_KEYWORD 7  /* cancel with janet_ckeywordv((const char *) argp) */
  ------------------
  |  Branch (11326:13): [True: 0, False: 45]
  ------------------
11327|      0|                janet_cancel(return_value.fiber, janet_ckeywordv((const char *) return_value.argp));
  ------------------
  |  | 1833|      0|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      0|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11328|      0|                break;
11329|      0|            case JANET_EV_TCTAG_BOOLEAN:
  ------------------
  |  | 1577|      0|#define JANET_EV_TCTAG_BOOLEAN 8      /* resume with janet_wrap_boolean(argi) */
  ------------------
  |  Branch (11329:13): [True: 0, False: 45]
  ------------------
11330|      0|                janet_schedule(return_value.fiber, janet_wrap_boolean(return_value.argi));
  ------------------
  |  |  829|      0|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11331|      0|                break;
11332|     45|        }
11333|     45|    }
11334|       |    /* Clean up */
11335|     45|    switch (return_value.tag) {
11336|     45|        default:
  ------------------
  |  Branch (11336:9): [True: 45, False: 0]
  ------------------
11337|     45|        case JANET_EV_TCTAG_STRINGF:
  ------------------
  |  | 1572|     45|#define JANET_EV_TCTAG_STRINGF 3      /* resume with janet_cstringv((const char *) argp), then call free on argp. */
  ------------------
  |  Branch (11337:9): [True: 0, False: 45]
  ------------------
11338|     45|        case JANET_EV_TCTAG_ERR_STRINGF:
  ------------------
  |  | 1575|     45|#define JANET_EV_TCTAG_ERR_STRINGF 6  /* cancel with janet_cstringv((const char *) argp), then call free on argp. */
  ------------------
  |  Branch (11338:9): [True: 0, False: 45]
  ------------------
11339|     45|            janet_free(return_value.argp);
  ------------------
  |  | 2402|     45|#define janet_free(X) free((X))
  ------------------
11340|     45|            break;
11341|     45|    }
11342|     45|    janet_gcunroot(janet_wrap_fiber(return_value.fiber));
  ------------------
  |  |  839|     45|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|     45|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     45|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     45|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11343|     45|}
janet_ev_threaded_await:
11347|    492|void janet_ev_threaded_await(JanetThreadedSubroutine fp, int tag, int argi, void *argp) {
11348|    492|    JanetEVGenericMessage arguments;
11349|    492|    memset(&arguments, 0, sizeof(arguments));
11350|    492|    arguments.tag = tag;
11351|    492|    arguments.argi = argi;
11352|    492|    arguments.argp = argp;
11353|    492|    arguments.fiber = janet_root_fiber();
11354|    492|    janet_gcroot(janet_wrap_fiber(arguments.fiber));
  ------------------
  |  |  839|    492|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|    492|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    492|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    492|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11355|    492|    janet_ev_threaded_call(fp, arguments, janet_ev_default_threaded_callback);
11356|    492|    janet_await();
11357|    492|}
janet_ev_lasterr:
11407|     29|Janet janet_ev_lasterr(void) {
11408|     29|    return janet_cstringv(janet_strerror(errno));
  ------------------
  |  | 1816|     29|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  843|     29|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|     29|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|     29|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|     29|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
11409|     29|}
janet_make_pipe:
11910|  7.66k|int janet_make_pipe(JanetHandle handles[2], int mode) {
11911|       |#ifdef JANET_WINDOWS
11912|       |    /*
11913|       |     * On windows, the built in CreatePipe function doesn't support overlapped IO
11914|       |     * so we lift from the windows source code and modify for our own version.
11915|       |     */
11916|       |    JanetHandle shandle, chandle;
11917|       |    CHAR PipeNameBuffer[MAX_PATH];
11918|       |    SECURITY_ATTRIBUTES saAttr;
11919|       |    memset(&saAttr, 0, sizeof(saAttr));
11920|       |    saAttr.nLength = sizeof(saAttr);
11921|       |    saAttr.bInheritHandle = TRUE;
11922|       |    if (mode == 3) {
11923|       |        /* No overlapped IO involved, just call CreatePipe */
11924|       |        if (!CreatePipe(handles, handles + 1, &saAttr, 0)) return -1;
11925|       |        return 0;
11926|       |    }
11927|       |    snprintf(PipeNameBuffer,
11928|       |             sizeof(PipeNameBuffer),
11929|       |             "\\\\.\\Pipe\\JanetPipeFile.%08x.%08x",
11930|       |             (unsigned int) GetCurrentProcessId(),
11931|       |             (unsigned int) InterlockedIncrement(&PipeSerialNumber));
11932|       |
11933|       |    /* server handle goes to subprocess */
11934|       |    shandle = CreateNamedPipeA(
11935|       |                  PipeNameBuffer,
11936|       |                  (mode == 2 ? PIPE_ACCESS_INBOUND : PIPE_ACCESS_OUTBOUND) | FILE_FLAG_OVERLAPPED,
11937|       |                  PIPE_TYPE_BYTE | PIPE_WAIT,
11938|       |                  255,           /* Max number of pipes for duplication. */
11939|       |                  4096,          /* Out buffer size */
11940|       |                  4096,          /* In buffer size */
11941|       |                  120 * 1000,    /* Timeout in ms */
11942|       |                  &saAttr);
11943|       |    if (shandle == INVALID_HANDLE_VALUE) {
11944|       |        return -1;
11945|       |    }
11946|       |
11947|       |    /* we keep client handle */
11948|       |    chandle = CreateFileA(
11949|       |                  PipeNameBuffer,
11950|       |                  (mode == 2 ? GENERIC_WRITE : GENERIC_READ),
11951|       |                  0,
11952|       |                  &saAttr,
11953|       |                  OPEN_EXISTING,
11954|       |                  FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED,
11955|       |                  NULL);
11956|       |
11957|       |    if (chandle == INVALID_HANDLE_VALUE) {
11958|       |        CloseHandle(shandle);
11959|       |        return -1;
11960|       |    }
11961|       |    if (mode == 2) {
11962|       |        handles[0] = shandle;
11963|       |        handles[1] = chandle;
11964|       |    } else {
11965|       |        handles[0] = chandle;
11966|       |        handles[1] = shandle;
11967|       |    }
11968|       |    return 0;
11969|       |#else
11970|  7.66k|    if (pipe(handles)) return -1;
  ------------------
  |  Branch (11970:9): [True: 0, False: 7.66k]
  ------------------
11971|  7.66k|    if (mode != 2 && fcntl(handles[0], F_SETFD, FD_CLOEXEC)) goto error;
  ------------------
  |  Branch (11971:9): [True: 7.66k, False: 0]
  |  Branch (11971:22): [True: 0, False: 7.66k]
  ------------------
11972|  7.66k|    if (mode != 1 && fcntl(handles[1], F_SETFD, FD_CLOEXEC)) goto error;
  ------------------
  |  Branch (11972:9): [True: 5, False: 7.65k]
  |  Branch (11972:22): [True: 0, False: 5]
  ------------------
11973|  7.66k|    if (mode != 2 && mode != 3 && fcntl(handles[0], F_SETFL, O_NONBLOCK)) goto error;
  ------------------
  |  Branch (11973:9): [True: 7.66k, False: 0]
  |  Branch (11973:22): [True: 7.66k, False: 0]
  |  Branch (11973:35): [True: 0, False: 7.66k]
  ------------------
11974|  7.66k|    if (mode != 1 && mode != 3 && fcntl(handles[1], F_SETFL, O_NONBLOCK)) goto error;
  ------------------
  |  Branch (11974:9): [True: 5, False: 7.65k]
  |  Branch (11974:22): [True: 5, False: 0]
  |  Branch (11974:35): [True: 0, False: 5]
  ------------------
11975|  7.66k|    return 0;
11976|      0|error:
11977|      0|    close(handles[0]);
11978|      0|    close(handles[1]);
11979|      0|    return -1;
11980|  7.66k|#endif
11981|  7.66k|}
cfun_ev_go:
11994|    186|              "current supervisor.") {
11995|    186|    janet_arity(argc, 1, 3);
11996|    186|    Janet value = argc >= 2 ? argv[1] : janet_wrap_nil();
  ------------------
  |  |  826|      3|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      3|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (11996:19): [True: 183, False: 3]
  ------------------
11997|    186|    void *supervisor = janet_optabstract(argv, argc, 2, &janet_channel_type, janet_vm.root_fiber->supervisor_channel);
11998|    186|    JanetFiber *fiber;
11999|    186|    if (janet_checktype(argv[0], JANET_FUNCTION)) {
  ------------------
  |  |  801|    186|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 181, False: 5]
  |  |  |  Branch (801:6): [Folded, False: 186]
  |  |  ------------------
  |  |  802|    186|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|    186|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|    186|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|    186|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    186|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    186|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12000|       |        /* Create a fiber for the user */
12001|    181|        JanetFunction *func = janet_unwrap_function(argv[0]);
  ------------------
  |  |  863|    181|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
12002|    181|        if (func->def->min_arity > 1) {
  ------------------
  |  Branch (12002:13): [True: 1, False: 180]
  ------------------
12003|      1|            janet_panicf("task function must accept 0 or 1 arguments");
12004|      1|        }
12005|    180|        fiber = janet_fiber(func, 64, func->def->min_arity, &value);
12006|    180|        fiber->flags |=
12007|    180|            JANET_FIBER_MASK_ERROR |
  ------------------
  |  |  761|    180|#define JANET_FIBER_MASK_ERROR 2
  ------------------
12008|    180|            JANET_FIBER_MASK_USER0 |
  ------------------
  |  |  765|    180|#define JANET_FIBER_MASK_USER0 (16 << 0)
  ------------------
12009|    180|            JANET_FIBER_MASK_USER1 |
  ------------------
  |  |  766|    180|#define JANET_FIBER_MASK_USER1 (16 << 1)
  ------------------
12010|    180|            JANET_FIBER_MASK_USER2 |
  ------------------
  |  |  767|    180|#define JANET_FIBER_MASK_USER2 (16 << 2)
  ------------------
12011|    180|            JANET_FIBER_MASK_USER3 |
  ------------------
  |  |  768|    180|#define JANET_FIBER_MASK_USER3 (16 << 3)
  ------------------
12012|    180|            JANET_FIBER_MASK_USER4;
  ------------------
  |  |  769|    180|#define JANET_FIBER_MASK_USER4 (16 << 4)
  ------------------
12013|    180|        if (!janet_vm.fiber->env) {
  ------------------
  |  Branch (12013:13): [True: 0, False: 180]
  ------------------
12014|      0|            janet_vm.fiber->env = janet_table(0);
12015|      0|        }
12016|    180|        fiber->env = janet_table(0);
12017|    180|        fiber->env->proto = janet_vm.fiber->env;
12018|    180|    } else {
12019|      5|        fiber = janet_getfiber(argv, 0);
12020|      5|        if (janet_fiber_status(fiber) != JANET_STATUS_NEW) {
  ------------------
  |  Branch (12020:13): [True: 0, False: 5]
  ------------------
12021|      0|            janet_panic("can only schedule new fibers where (= (fiber/status f) :new)");
12022|      0|        }
12023|      5|    }
12024|    185|    fiber->supervisor_channel = supervisor;
12025|    185|    janet_schedule(fiber, value);
12026|    185|    return janet_wrap_fiber(fiber);
  ------------------
  |  |  839|    185|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|    185|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    185|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    185|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12027|    186|}
cfun_ev_thread:
12158|    517|              "* `:c` - don't copy cfunction registry to new thread (performance optimization)") {
12159|    517|    janet_sandbox_assert(JANET_SANDBOX_THREADS);
  ------------------
  |  | 2033|    517|#define JANET_SANDBOX_THREADS 131072
  ------------------
12160|    517|    janet_arity(argc, 1, 4);
12161|    517|    Janet value = argc >= 2 ? argv[1] : janet_wrap_nil();
  ------------------
  |  |  826|    315|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|    315|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    315|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    315|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (12161:19): [True: 202, False: 315]
  ------------------
12162|    517|    if (janet_checktype(argv[0], JANET_FUNCTION)) {
  ------------------
  |  |  801|    517|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 221, False: 296]
  |  |  |  Branch (801:6): [Folded, False: 517]
  |  |  ------------------
  |  |  802|    517|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|    517|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|    517|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|    517|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    517|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    517|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12163|    221|        JanetFunction *func = janet_getfunction(argv, 0);
12164|    221|        if (func->def->arity < 0 || func->def->min_arity > 1) {
  ------------------
  |  Branch (12164:13): [True: 0, False: 221]
  |  Branch (12164:37): [True: 0, False: 221]
  ------------------
12165|      0|            janet_panic("function must take 0 or 1 arguments");
12166|      0|        }
12167|    296|    } else {
12168|    296|        janet_getfiber(argv, 0); /* arg check for fiber */
12169|    296|    }
12170|    517|    uint64_t flags = 0;
12171|    517|    if (argc >= 3) {
  ------------------
  |  Branch (12171:9): [True: 16, False: 501]
  ------------------
12172|     16|        flags = janet_getflags(argv, 2, "nact");
12173|     16|    }
12174|    517|    void *supervisor = janet_optabstract(argv, argc, 3, &janet_channel_type, janet_vm.root_fiber->supervisor_channel);
12175|    517|    if (NULL != supervisor) flags |= JANET_THREAD_SUPERVISOR_FLAG;
  ------------------
  |  |12029|      0|#define JANET_THREAD_SUPERVISOR_FLAG 0x100
  ------------------
  |  Branch (12175:9): [True: 0, False: 517]
  ------------------
12176|       |
12177|       |    /* Marshal arguments for the new thread. */
12178|    517|    JanetBuffer *buffer = janet_malloc(sizeof(JanetBuffer));
  ------------------
  |  | 2393|    517|#define janet_malloc(X) malloc((X))
  ------------------
12179|    517|    if (NULL == buffer) {
  ------------------
  |  Branch (12179:9): [True: 0, False: 517]
  ------------------
12180|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
12181|      0|    }
12182|    517|    janet_buffer_init(buffer, 0);
12183|    517|    if (!(flags & 0x2)) {
  ------------------
  |  Branch (12183:9): [True: 490, False: 27]
  ------------------
12184|    490|        janet_marshal(buffer, janet_wrap_table(janet_vm.abstract_registry), NULL, JANET_MARSHAL_UNSAFE);
  ------------------
  |  |  841|    490|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|    490|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    490|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    490|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      janet_marshal(buffer, janet_wrap_table(janet_vm.abstract_registry), NULL, JANET_MARSHAL_UNSAFE);
  ------------------
  |  | 1901|    490|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
12185|    490|    }
12186|    517|    if (flags & JANET_THREAD_SUPERVISOR_FLAG) {
  ------------------
  |  |12029|    517|#define JANET_THREAD_SUPERVISOR_FLAG 0x100
  ------------------
  |  Branch (12186:9): [True: 0, False: 517]
  ------------------
12187|      0|        janet_marshal(buffer, janet_wrap_abstract(supervisor), NULL, JANET_MARSHAL_UNSAFE);
  ------------------
  |  |  846|      0|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      janet_marshal(buffer, janet_wrap_abstract(supervisor), NULL, JANET_MARSHAL_UNSAFE);
  ------------------
  |  | 1901|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
12188|      0|    }
12189|    517|    if (!(flags & 0x4)) {
  ------------------
  |  Branch (12189:9): [True: 492, False: 25]
  ------------------
12190|    492|        janet_assert(janet_vm.registry_count <= INT32_MAX, "assert failed size check");
  ------------------
  |  |  386|    492|#define janet_assert(c, m) do { \
  |  |  387|    492|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 492]
  |  |  ------------------
  |  |  388|    492|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 492]
  |  |  ------------------
  ------------------
12191|    492|        uint32_t temp = (uint32_t) janet_vm.registry_count;
12192|    492|        janet_buffer_push_bytes(buffer, (uint8_t *) &temp, sizeof(temp));
12193|    492|        janet_buffer_push_bytes(buffer, (uint8_t *) janet_vm.registry, (int32_t) janet_vm.registry_count * sizeof(JanetCFunRegistry));
12194|    492|    }
12195|    517|    janet_marshal(buffer, argv[0], NULL, JANET_MARSHAL_UNSAFE);
  ------------------
  |  | 1901|    517|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
12196|    517|    janet_marshal(buffer, value, NULL, JANET_MARSHAL_UNSAFE);
  ------------------
  |  | 1901|    517|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
12197|    517|    if (flags & 0x1) {
  ------------------
  |  Branch (12197:9): [True: 0, False: 517]
  ------------------
12198|       |        /* Return immediately */
12199|      0|        JanetEVGenericMessage arguments;
12200|      0|        memset(&arguments, 0, sizeof(arguments));
12201|      0|        arguments.tag = (uint32_t) flags;
12202|      0|        arguments.argi = (uint32_t) janet_vm.sandbox_flags;
12203|      0|        arguments.argp = buffer;
12204|      0|        arguments.fiber = NULL;
12205|      0|        janet_ev_threaded_call(janet_go_thread_subr, arguments, janet_ev_default_threaded_callback);
12206|      0|        return janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12207|    517|    } else {
12208|    517|        janet_ev_threaded_await(janet_go_thread_subr, (uint32_t) flags, (uint32_t) janet_vm.sandbox_flags, buffer);
12209|    517|    }
12210|    517|}
janet_sleep_await:
12228|    923|JANET_NO_RETURN void janet_sleep_await(double sec) {
12229|    923|    JanetTimeout to;
12230|    923|    to.when = ts_delta(ts_now(), sec);
12231|    923|    to.fiber = janet_vm.root_fiber;
12232|    923|    to.is_error = 0;
12233|    923|    to.sched_id = to.fiber->sched_id;
12234|       |    to.curr_fiber = NULL;
12235|    923|    to.has_worker = 0;
12236|    923|    add_timeout(to);
12237|    923|    janet_await();
12238|    923|}
cfun_ev_sleep:
12242|    928|              "Suspend the current fiber for sec seconds without blocking the event loop.") {
12243|    928|    janet_fixarity(argc, 1);
12244|    928|    double sec = janet_getnumber(argv, 0);
12245|    928|    janet_sleep_await(sec);
12246|    928|}
cfun_ev_deadline:
12256|  2.69k|              "background thread to try to interrupt the VM if the timeout expires.") {
12257|  2.69k|    janet_arity(argc, 1, 4);
12258|  2.69k|    double sec = janet_getnumber(argv, 0);
12259|  2.69k|    sec = (sec < 0) ? 0 : sec;
  ------------------
  |  Branch (12259:11): [True: 2.69k, False: 4]
  ------------------
12260|  2.69k|    JanetFiber *tocancel = janet_optfiber(argv, argc, 1, janet_vm.root_fiber);
12261|  2.69k|    JanetFiber *tocheck = janet_optfiber(argv, argc, 2, janet_vm.fiber);
12262|  2.69k|    int use_interrupt = janet_optboolean(argv, argc, 3, 0);
12263|  2.69k|    JanetTimeout to;
12264|  2.69k|    to.when = ts_delta(ts_now(), sec);
12265|  2.69k|    to.fiber = tocancel;
12266|  2.69k|    to.curr_fiber = tocheck;
12267|  2.69k|    to.is_error = 0;
12268|  2.69k|    to.sched_id = to.fiber->sched_id;
12269|  2.69k|    if (use_interrupt) {
  ------------------
  |  Branch (12269:9): [True: 0, False: 2.69k]
  ------------------
12270|       |#ifdef JANET_ANDROID
12271|       |        janet_sandbox_assert(JANET_SANDBOX_SIGNAL);
12272|       |#endif
12273|      0|        JanetThreadedTimeout *tto = janet_malloc(sizeof(JanetThreadedTimeout));
  ------------------
  |  | 2393|      0|#define janet_malloc(X) malloc((X))
  ------------------
12274|      0|        if (NULL == tto) {
  ------------------
  |  Branch (12274:13): [True: 0, False: 0]
  ------------------
12275|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
12276|      0|        }
12277|      0|        tto->sec = sec;
12278|      0|        tto->vm = &janet_vm;
12279|      0|        tto->fiber = tocheck;
12280|       |#ifdef JANET_WINDOWS
12281|       |        HANDLE cancel_event = CreateEvent(NULL, TRUE, FALSE, NULL);
12282|       |        if (NULL == cancel_event) {
12283|       |            janet_free(tto);
12284|       |            janet_panic("failed to create cancel event");
12285|       |        }
12286|       |        tto->cancel_event = cancel_event;
12287|       |        HANDLE worker = CreateThread(NULL, 0, janet_timeout_body, tto, CREATE_SUSPENDED, NULL);
12288|       |        if (NULL == worker) {
12289|       |            janet_free(tto);
12290|       |            janet_panic("failed to create thread");
12291|       |        }
12292|       |#else
12293|      0|        pthread_t worker;
12294|      0|        int err = pthread_create(&worker, NULL, janet_timeout_body, tto);
12295|      0|        if (err) {
  ------------------
  |  Branch (12295:13): [True: 0, False: 0]
  ------------------
12296|      0|            janet_free(tto);
  ------------------
  |  | 2402|      0|#define janet_free(X) free((X))
  ------------------
12297|      0|            janet_panicf("%s", janet_strerror(err));
12298|      0|        }
12299|      0|#endif
12300|      0|        to.has_worker = 1;
12301|      0|        to.worker = worker;
12302|       |#ifdef JANET_WINDOWS
12303|       |        to.worker_event = cancel_event;
12304|       |        ResumeThread(worker);
12305|       |#endif
12306|  2.69k|    } else {
12307|  2.69k|        to.has_worker = 0;
12308|  2.69k|    }
12309|  2.69k|    add_timeout(to);
12310|  2.69k|    return janet_wrap_fiber(tocancel);
  ------------------
  |  |  839|  2.69k|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|  2.69k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  2.69k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  2.69k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12311|  2.69k|}
cfun_ev_cancel:
12316|      1|              "`cancel` in that it returns the canceled fiber immediately.") {
12317|      1|    janet_fixarity(argc, 2);
12318|      1|    JanetFiber *fiber = janet_getfiber(argv, 0);
12319|      1|    Janet err = argv[1];
12320|      1|    janet_cancel(fiber, err);
12321|      1|    return argv[0];
12322|      1|}
janet_cfun_stream_close:
12326|      7|              "Close a stream. This should be the same as calling (:close stream) for all streams.") {
12327|      7|    janet_fixarity(argc, 1);
12328|      7|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
12329|      7|    janet_stream_close(stream);
12330|      7|    return argv[0];
12331|      7|}
janet_cfun_stream_read:
12340|      5|              "error if there are problems with the IO operation.") {
12341|      5|    janet_arity(argc, 2, 4);
12342|      5|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
12343|      5|    janet_stream_flags(stream, JANET_STREAM_READABLE);
  ------------------
  |  |  620|      5|#define JANET_STREAM_READABLE 0x200
  ------------------
12344|      5|    JanetBuffer *buffer = janet_optbuffer(argv, argc, 2, 10);
12345|      5|    double to = janet_optnumber(argv, argc, 3, INFINITY);
12346|      5|    if (janet_keyeq(argv[1], "all")) {
  ------------------
  |  Branch (12346:9): [True: 0, False: 5]
  ------------------
12347|      0|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (12347:13): [True: 0, False: 0]
  ------------------
12348|      0|        janet_ev_readchunk(stream, buffer, INT32_MAX);
12349|      5|    } else {
12350|      5|        int32_t n = janet_getnat(argv, 1);
12351|      5|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (12351:13): [True: 0, False: 5]
  ------------------
12352|      5|        janet_ev_read(stream, buffer, n);
12353|      5|    }
12354|      5|}
janet_cfun_stream_write:
12374|      2|              "Returns nil, or raises an error if the write failed.") {
12375|      2|    janet_arity(argc, 2, 3);
12376|      2|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
12377|      2|    janet_stream_flags(stream, JANET_STREAM_WRITABLE);
  ------------------
  |  |  621|      2|#define JANET_STREAM_WRITABLE 0x400
  ------------------
12378|      2|    double to = janet_optnumber(argv, argc, 2, INFINITY);
12379|      2|    if (janet_checktype(argv[1], JANET_BUFFER)) {
  ------------------
  |  |  801|      2|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 2]
  |  |  |  Branch (801:6): [Folded, False: 2]
  |  |  ------------------
  |  |  802|      2|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      2|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      2|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      2|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12380|      0|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (12380:13): [True: 0, False: 0]
  ------------------
12381|      0|        janet_ev_write_buffer(stream, janet_getbuffer(argv, 1));
12382|      2|    } else {
12383|      2|        JanetByteView bytes = janet_getbytes(argv, 1);
12384|      2|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (12384:13): [True: 0, False: 2]
  ------------------
12385|      2|        janet_ev_write_string(stream, bytes.bytes);
12386|      2|    }
12387|      2|}
janet_cfun_mutex:
12403|     12|              "Create a new lock to coordinate threads.") {
12404|     12|    janet_fixarity(argc, 0);
12405|     12|    (void) argv;
12406|     12|    void *mutex = janet_abstract_threaded(&janet_mutex_type, janet_os_mutex_size());
12407|     12|    janet_os_mutex_init(mutex);
12408|     12|    return janet_wrap_abstract(mutex);
  ------------------
  |  |  846|     12|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|     12|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     12|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     12|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12409|     12|}
janet_cfun_mutex_acquire:
12415|      2|              "on this system thread.") {
12416|      2|    janet_fixarity(argc, 1);
12417|      2|    void *mutex = janet_getabstract(argv, 0, &janet_mutex_type);
12418|      2|    janet_os_mutex_lock(mutex);
12419|      2|    return argv[0];
12420|      2|}
janet_cfun_mutex_release:
12424|      2|              "Release a lock such that other threads may acquire it.") {
12425|      2|    janet_fixarity(argc, 1);
12426|      2|    void *mutex = janet_getabstract(argv, 0, &janet_mutex_type);
12427|      2|    janet_os_mutex_unlock(mutex);
12428|      2|    return argv[0];
12429|      2|}
janet_cfun_rwlock:
12445|     23|              "Create a new read-write lock to coordinate threads.") {
12446|     23|    janet_fixarity(argc, 0);
12447|     23|    (void) argv;
12448|     23|    void *rwlock = janet_abstract_threaded(&janet_rwlock_type, janet_os_rwlock_size());
12449|     23|    janet_os_rwlock_init(rwlock);
12450|     23|    return janet_wrap_abstract(rwlock);
  ------------------
  |  |  846|     23|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|     23|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     23|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     23|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12451|     23|}
janet_cfun_rwlock_write_lock:
12464|      1|              "Acquire a write lock on a read-write lock.") {
12465|      1|    janet_fixarity(argc, 1);
12466|      1|    void *rwlock = janet_getabstract(argv, 0, &janet_rwlock_type);
12467|      1|    janet_os_rwlock_wlock(rwlock);
12468|      1|    return argv[0];
12469|      1|}
janet_cfun_rwlock_read_release:
12473|      1|              "Release a read lock on a read-write lock") {
12474|      1|    janet_fixarity(argc, 1);
12475|      1|    void *rwlock = janet_getabstract(argv, 0, &janet_rwlock_type);
12476|      1|    janet_os_rwlock_runlock(rwlock);
12477|      1|    return argv[0];
12478|      1|}
janet_cfun_rwlock_write_release:
12482|      2|              "Release a write lock on a read-write lock") {
12483|      2|    janet_fixarity(argc, 1);
12484|      2|    void *rwlock = janet_getabstract(argv, 0, &janet_rwlock_type);
12485|      2|    janet_os_rwlock_wunlock(rwlock);
12486|      2|    return argv[0];
12487|      2|}
janet_lib_ev:
12562|  7.16k|void janet_lib_ev(JanetTable *env) {
12563|  7.16k|    JanetRegExt ev_cfuns_ext[] = {
12564|  7.16k|        JANET_CORE_REG("ev/give", cfun_channel_push),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12565|  7.16k|        JANET_CORE_REG("ev/take", cfun_channel_pop),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12566|  7.16k|        JANET_CORE_REG("ev/full", cfun_channel_full),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12567|  7.16k|        JANET_CORE_REG("ev/capacity", cfun_channel_capacity),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12568|  7.16k|        JANET_CORE_REG("ev/count", cfun_channel_count),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12569|  7.16k|        JANET_CORE_REG("ev/select", cfun_channel_choice),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12570|  7.16k|        JANET_CORE_REG("ev/rselect", cfun_channel_rchoice),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12571|  7.16k|        JANET_CORE_REG("ev/chan", cfun_channel_new),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12572|  7.16k|        JANET_CORE_REG("ev/thread-chan", cfun_channel_new_threaded),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12573|  7.16k|        JANET_CORE_REG("ev/chan-close", cfun_channel_close),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12574|  7.16k|        JANET_CORE_REG("ev/go", cfun_ev_go),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12575|  7.16k|        JANET_CORE_REG("ev/thread", cfun_ev_thread),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12576|  7.16k|        JANET_CORE_REG("ev/give-supervisor", cfun_ev_give_supervisor),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12577|  7.16k|        JANET_CORE_REG("ev/sleep", cfun_ev_sleep),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12578|  7.16k|        JANET_CORE_REG("ev/deadline", cfun_ev_deadline),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12579|  7.16k|        JANET_CORE_REG("ev/cancel", cfun_ev_cancel),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12580|  7.16k|        JANET_CORE_REG("ev/close", janet_cfun_stream_close),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12581|  7.16k|        JANET_CORE_REG("ev/read", janet_cfun_stream_read),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12582|  7.16k|        JANET_CORE_REG("ev/chunk", janet_cfun_stream_chunk),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12583|  7.16k|        JANET_CORE_REG("ev/write", janet_cfun_stream_write),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12584|  7.16k|        JANET_CORE_REG("ev/lock", janet_cfun_mutex),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12585|  7.16k|        JANET_CORE_REG("ev/acquire-lock", janet_cfun_mutex_acquire),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12586|  7.16k|        JANET_CORE_REG("ev/release-lock", janet_cfun_mutex_release),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12587|  7.16k|        JANET_CORE_REG("ev/rwlock", janet_cfun_rwlock),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12588|  7.16k|        JANET_CORE_REG("ev/acquire-rlock", janet_cfun_rwlock_read_lock),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12589|  7.16k|        JANET_CORE_REG("ev/acquire-wlock", janet_cfun_rwlock_write_lock),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12590|  7.16k|        JANET_CORE_REG("ev/release-rlock", janet_cfun_rwlock_read_release),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12591|  7.16k|        JANET_CORE_REG("ev/release-wlock", janet_cfun_rwlock_write_release),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12592|  7.16k|        JANET_CORE_REG("ev/to-file", janet_cfun_to_file),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12593|  7.16k|        JANET_CORE_REG("ev/all-tasks", janet_cfun_ev_all_tasks),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
12594|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
12595|  7.16k|    };
12596|       |
12597|       |    janet_core_cfuns_ext(env, NULL, ev_cfuns_ext);
12598|  7.16k|    janet_register_abstract_type(&janet_stream_type);
12599|  7.16k|    janet_register_abstract_type(&janet_channel_type);
12600|  7.16k|    janet_register_abstract_type(&janet_mutex_type);
12601|  7.16k|    janet_register_abstract_type(&janet_rwlock_type);
12602|  7.16k|}
cfun_ffi_struct:
13080|    119|              "Create a struct type definition that can be used to pass structs into native functions. ") {
13081|    119|    janet_arity(argc, 1, -1);
13082|    119|    return janet_wrap_abstract(build_struct_type(argc, argv));
  ------------------
  |  |  846|    119|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|    119|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    119|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    119|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13083|    119|}
cfun_ffi_align:
13095|      1|              "Get the align of an ffi type in bytes.") {
13096|      1|    janet_fixarity(argc, 1);
13097|      1|    size_t size = type_align(decode_ffi_type(argv[0]));
13098|      1|    return janet_wrap_number((double) size);
  ------------------
  |  |  830|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
13099|      1|}
cfun_ffi_call:
14280|      4|              "how Janet values in `args` are converted to native machine types.") {
14281|      4|    janet_sandbox_assert(JANET_SANDBOX_FFI_USE);
  ------------------
  |  | 2024|      4|#define JANET_SANDBOX_FFI_USE 2048
  ------------------
14282|      4|    janet_arity(argc, 2, -1);
14283|      4|    void *function_pointer = janet_ffi_get_callable_pointer(argv, 0);
14284|      4|    JanetFFISignature *signature = janet_getabstract(argv, 1, &janet_signature_type);
14285|      4|    janet_fixarity(argc - 2, signature->arg_count);
14286|      4|    switch (signature->cc) {
14287|      0|        default:
  ------------------
  |  Branch (14287:9): [True: 0, False: 4]
  ------------------
14288|      0|        case JANET_FFI_CC_NONE:
  ------------------
  |  Branch (14288:9): [True: 0, False: 4]
  ------------------
14289|      0|            (void) function_pointer;
14290|      0|            janet_panic("calling convention not supported");
14291|       |#ifdef JANET_FFI_WIN64_ENABLED
14292|       |        case JANET_FFI_CC_WIN_64:
14293|       |            return janet_ffi_win64(signature, function_pointer, argv);
14294|       |#endif
14295|      0|#ifdef JANET_FFI_SYSV64_ENABLED
14296|      0|        case JANET_FFI_CC_SYSV_64:
  ------------------
  |  Branch (14296:9): [True: 0, False: 4]
  ------------------
14297|      0|            return janet_ffi_sysv64(signature, function_pointer, argv);
14298|      4|#endif
14299|       |#ifdef JANET_FFI_AAPCS64_ENABLED
14300|       |        case JANET_FFI_CC_AAPCS64:
14301|       |            return janet_ffi_aapcs64(signature, function_pointer, argv);
14302|       |#endif
14303|      4|    }
14304|      4|}
cfun_ffi_buffer_read:
14333|      2|              "this is unsafe.") {
14334|      2|    janet_sandbox_assert(JANET_SANDBOX_FFI_USE);
  ------------------
  |  | 2024|      2|#define JANET_SANDBOX_FFI_USE 2048
  ------------------
14335|      2|    janet_arity(argc, 2, 3);
14336|      2|    JanetFFIType type = decode_ffi_type(argv[0]);
14337|      2|    size_t offset = (size_t) janet_optnat(argv, argc, 2, 0);
14338|      2|    if (janet_checktype(argv[1], JANET_POINTER)) {
  ------------------
  |  |  801|      2|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 2]
  |  |  |  Branch (801:6): [Folded, False: 2]
  |  |  ------------------
  |  |  802|      2|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      2|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      2|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      2|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14339|      0|        uint8_t *ptr = janet_unwrap_pointer(argv[1]);
  ------------------
  |  |  862|      0|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
14340|      0|        return janet_ffi_read_one(ptr + offset, type, JANET_FFI_MAX_RECUR);
  ------------------
  |  |12657|      0|#define JANET_FFI_MAX_RECUR 64
  ------------------
14341|      2|    } else {
14342|      2|        size_t el_size = type_size(type);
14343|      2|        JanetByteView bytes = janet_getbytes(argv, 1);
14344|      2|        if ((size_t) bytes.len < offset + el_size) janet_panic("read out of range");
  ------------------
  |  Branch (14344:13): [True: 0, False: 2]
  ------------------
14345|      2|        return janet_ffi_read_one(bytes.bytes + offset, type, JANET_FFI_MAX_RECUR);
  ------------------
  |  |12657|      2|#define JANET_FFI_MAX_RECUR 64
  ------------------
14346|      2|    }
14347|      2|}
cfun_ffi_get_callback_trampoline:
14356|      5|              "be further inspected with `ffi/read`.") {
14357|      5|    janet_arity(argc, 0, 1);
14358|      5|    JanetFFICallingConvention cc = JANET_FFI_CC_DEFAULT;
  ------------------
  |  |12783|      5|#define JANET_FFI_CC_DEFAULT JANET_FFI_CC_SYSV_64
  ------------------
14359|      5|    if (argc >= 1) cc = decode_ffi_cc(janet_getkeyword(argv, 0));
  ------------------
  |  Branch (14359:9): [True: 3, False: 2]
  ------------------
14360|      5|    switch (cc) {
14361|      0|        default:
  ------------------
  |  Branch (14361:9): [True: 0, False: 5]
  ------------------
14362|      0|        case JANET_FFI_CC_NONE:
  ------------------
  |  Branch (14362:9): [True: 0, False: 5]
  ------------------
14363|      0|            janet_panic("calling convention not supported");
14364|       |#ifdef JANET_FFI_WIN64_ENABLED
14365|       |        case JANET_FFI_CC_WIN_64:
14366|       |            return janet_wrap_pointer(janet_ffi_win64_standard_callback);
14367|       |#endif
14368|      0|#ifdef JANET_FFI_SYSV64_ENABLED
14369|      1|        case JANET_FFI_CC_SYSV_64:
  ------------------
  |  Branch (14369:9): [True: 1, False: 4]
  ------------------
14370|      1|            return janet_wrap_pointer(janet_ffi_sysv64_standard_callback);
  ------------------
  |  |  849|      1|#define janet_wrap_pointer(s) janet_nanbox_wrap_((s), JANET_POINTER)
  |  |  ------------------
  |  |  |  |  820|      1|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14371|      5|#endif
14372|       |#ifdef JANET_FFI_AAPCS64_ENABLED
14373|       |        case JANET_FFI_CC_AAPCS64:
14374|       |            return janet_wrap_pointer(janet_ffi_aapcs64_standard_callback);
14375|       |#endif
14376|      5|    }
14377|      5|}
cfun_ffi_pointer_buffer:
14452|      3|              "unsafe and can potentially allow out of bounds memory access. Returns a new buffer.") {
14453|      3|    janet_sandbox_assert(JANET_SANDBOX_FFI_USE);
  ------------------
  |  | 2024|      3|#define JANET_SANDBOX_FFI_USE 2048
  ------------------
14454|      3|    janet_arity(argc, 2, 4);
14455|      3|    void *pointer = janet_getpointer(argv, 0);
14456|      3|    int32_t capacity = janet_getnat(argv, 1);
14457|      3|    int32_t count = janet_optnat(argv, argc, 2, 0);
14458|      3|    int64_t offset = janet_optinteger64(argv, argc, 3, 0);
14459|      3|    uint8_t *offset_pointer = ((uint8_t *) pointer) + offset;
14460|      3|    return janet_wrap_buffer(janet_pointer_buffer_unsafe(offset_pointer, capacity, count));
  ------------------
  |  |  842|      3|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  820|      3|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14461|      3|}
cfun_ffi_pointer_cfunction:
14466|      7|              "source location for stack traces and debugging.") {
14467|      7|    janet_sandbox_assert(JANET_SANDBOX_FFI_USE);
  ------------------
  |  | 2024|      7|#define JANET_SANDBOX_FFI_USE 2048
  ------------------
14468|      7|    janet_arity(argc, 1, 4);
14469|      7|    void *pointer = janet_getpointer(argv, 0);
14470|      7|    const char *name = janet_optcstring(argv, argc, 1, NULL);
14471|      7|    const char *source = janet_optcstring(argv, argc, 2, NULL);
14472|      7|    int32_t line = janet_optinteger(argv, argc, 3, -1);
14473|      7|    if ((name != NULL) || (source != NULL) || (line != -1)) {
  ------------------
  |  Branch (14473:9): [True: 7, False: 0]
  |  Branch (14473:27): [True: 0, False: 0]
  |  Branch (14473:47): [True: 0, False: 0]
  ------------------
14474|      0|        janet_registry_put((JanetCFunction) pointer, name, NULL, source, line);
14475|      0|    }
14476|      7|    return janet_wrap_cfunction((JanetCFunction) pointer);
  ------------------
  |  |  848|      7|#define janet_wrap_cfunction(s) janet_nanbox_wrap_((s), JANET_CFUNCTION)
  |  |  ------------------
  |  |  |  |  820|      7|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      7|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      7|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14477|      7|}
cfun_ffi_supported_calling_conventions:
14485|      4|              "convention which is a placeholder that cannot be used at runtime.") {
14486|      4|    janet_fixarity(argc, 0);
14487|      4|    (void) argv;
14488|      4|    JanetArray *array = janet_array(4);
14489|       |#ifdef JANET_FFI_WIN64_ENABLED
14490|       |    janet_array_push(array, janet_ckeywordv("win64"));
14491|       |#endif
14492|      4|#ifdef JANET_FFI_SYSV64_ENABLED
14493|      4|    janet_array_push(array, janet_ckeywordv("sysv64"));
  ------------------
  |  | 1833|      4|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      4|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      4|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      4|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14494|      4|#endif
14495|       |#ifdef JANET_FFI_AAPCS64_ENABLED
14496|       |    janet_array_push(array, janet_ckeywordv("aapcs64"));
14497|       |#endif
14498|      4|    janet_array_push(array, janet_ckeywordv("none"));
  ------------------
  |  | 1833|      4|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      4|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      4|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      4|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14499|      4|    return janet_wrap_array(array);
  ------------------
  |  |  840|      4|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  820|      4|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      4|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14500|      4|}
janet_lib_ffi:
14502|  7.16k|void janet_lib_ffi(JanetTable *env) {
14503|  7.16k|    JanetRegExt ffi_cfuns[] = {
14504|  7.16k|        JANET_CORE_REG("ffi/native", janet_core_raw_native),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14505|  7.16k|        JANET_CORE_REG("ffi/lookup", janet_core_native_lookup),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14506|  7.16k|        JANET_CORE_REG("ffi/close", janet_core_native_close),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14507|  7.16k|        JANET_CORE_REG("ffi/signature", cfun_ffi_signature),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14508|  7.16k|        JANET_CORE_REG("ffi/call", cfun_ffi_call),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14509|  7.16k|        JANET_CORE_REG("ffi/struct", cfun_ffi_struct),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14510|  7.16k|        JANET_CORE_REG("ffi/write", cfun_ffi_buffer_write),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14511|  7.16k|        JANET_CORE_REG("ffi/read", cfun_ffi_buffer_read),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14512|  7.16k|        JANET_CORE_REG("ffi/size", cfun_ffi_size),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14513|  7.16k|        JANET_CORE_REG("ffi/align", cfun_ffi_align),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14514|  7.16k|        JANET_CORE_REG("ffi/trampoline", cfun_ffi_get_callback_trampoline),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14515|  7.16k|        JANET_CORE_REG("ffi/jitfn", cfun_ffi_jitfn),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14516|  7.16k|        JANET_CORE_REG("ffi/malloc", cfun_ffi_malloc),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14517|  7.16k|        JANET_CORE_REG("ffi/free", cfun_ffi_free),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14518|  7.16k|        JANET_CORE_REG("ffi/pointer-buffer", cfun_ffi_pointer_buffer),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14519|  7.16k|        JANET_CORE_REG("ffi/pointer-cfunction", cfun_ffi_pointer_cfunction),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14520|  7.16k|        JANET_CORE_REG("ffi/calling-conventions", cfun_ffi_supported_calling_conventions),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
14521|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
14522|  7.16k|    };
14523|       |    janet_core_cfuns_ext(env, NULL, ffi_cfuns);
14524|  7.16k|}
janet_fiber_reset:
14599|   388k|JanetFiber *janet_fiber_reset(JanetFiber *fiber, JanetFunction *callee, int32_t argc, const Janet *argv) {
14600|   388k|    int32_t newstacktop;
14601|   388k|    fiber_reset(fiber);
14602|   388k|    if (argc) {
  ------------------
  |  Branch (14602:9): [True: 151k, False: 237k]
  ------------------
14603|   151k|        newstacktop = fiber->stacktop + argc;
14604|   151k|        if (newstacktop >= fiber->capacity) {
  ------------------
  |  Branch (14604:13): [True: 454, False: 151k]
  ------------------
14605|    454|            janet_fiber_setcapacity(fiber, 2 * newstacktop);
14606|    454|        }
14607|   151k|        if (argv) {
  ------------------
  |  Branch (14607:13): [True: 151k, False: 1]
  ------------------
14608|   151k|            memcpy(fiber->data + fiber->stacktop, argv, argc * sizeof(Janet));
14609|   151k|        } else {
14610|       |            /* If argv not given, fill with nil */
14611|      2|            for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (14611:33): [True: 1, False: 1]
  ------------------
14612|      1|                fiber->data[fiber->stacktop + i] = janet_wrap_nil();
  ------------------
  |  |  826|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14613|      1|            }
14614|      1|        }
14615|   151k|        fiber->stacktop = newstacktop;
14616|   151k|    }
14617|       |    /* Don't panic on failure since we use this to implement janet_pcall */
14618|   388k|    if (janet_fiber_funcframe(fiber, callee)) return NULL;
  ------------------
  |  Branch (14618:9): [True: 6, False: 388k]
  ------------------
14619|   388k|    janet_fiber_frame(fiber)->flags |= JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  |  802|   388k|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  801|   388k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|   388k|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_fiber_frame(fiber)->flags |= JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  | 1004|   388k|#define JANET_STACKFRAME_ENTRANCE 2
  ------------------
14620|   388k|#ifdef JANET_EV
14621|       |    fiber->supervisor_channel = NULL;
14622|   388k|#endif
14623|   388k|    return fiber;
14624|   388k|}
janet_fiber:
14627|   388k|JanetFiber *janet_fiber(JanetFunction *callee, int32_t capacity, int32_t argc, const Janet *argv) {
14628|   388k|    return janet_fiber_reset(fiber_alloc(capacity), callee, argc, argv);
14629|   388k|}
janet_fiber_setcapacity:
14648|   354k|void janet_fiber_setcapacity(JanetFiber *fiber, int32_t n) {
14649|   354k|    int32_t old_size = fiber->capacity;
14650|   354k|    int32_t diff = n - old_size;
14651|   354k|    Janet *newData = janet_realloc(fiber->data, sizeof(Janet) * n);
  ------------------
  |  | 2396|   354k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
14652|   354k|    if (NULL == newData) {
  ------------------
  |  Branch (14652:9): [True: 0, False: 354k]
  ------------------
14653|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
14654|      0|    }
14655|   354k|    fiber->data = newData;
14656|   354k|    fiber->capacity = n;
14657|   354k|    janet_vm.next_collection += sizeof(Janet) * diff;
14658|   354k|}
janet_fiber_push:
14667|   270M|void janet_fiber_push(JanetFiber *fiber, Janet x) {
14668|   270M|    if (fiber->stacktop == INT32_MAX) janet_panic("stack overflow");
  ------------------
  |  Branch (14668:9): [True: 0, False: 270M]
  ------------------
14669|   270M|    if (fiber->stacktop >= fiber->capacity) {
  ------------------
  |  Branch (14669:9): [True: 6.32k, False: 270M]
  ------------------
14670|  6.32k|        janet_fiber_grow(fiber, fiber->stacktop);
14671|  6.32k|    }
14672|   270M|    fiber->data[fiber->stacktop++] = x;
14673|   270M|}
janet_fiber_push2:
14676|   128M|void janet_fiber_push2(JanetFiber *fiber, Janet x, Janet y) {
14677|   128M|    if (fiber->stacktop >= INT32_MAX - 1) janet_panic("stack overflow");
  ------------------
  |  Branch (14677:9): [True: 0, False: 128M]
  ------------------
14678|   128M|    int32_t newtop = fiber->stacktop + 2;
14679|   128M|    if (newtop > fiber->capacity) {
  ------------------
  |  Branch (14679:9): [True: 108, False: 128M]
  ------------------
14680|    108|        janet_fiber_grow(fiber, newtop);
14681|    108|    }
14682|   128M|    fiber->data[fiber->stacktop] = x;
14683|   128M|    fiber->data[fiber->stacktop + 1] = y;
14684|   128M|    fiber->stacktop = newtop;
14685|   128M|}
janet_fiber_push3:
14688|  79.2M|void janet_fiber_push3(JanetFiber *fiber, Janet x, Janet y, Janet z) {
14689|  79.2M|    if (fiber->stacktop >= INT32_MAX - 2) janet_panic("stack overflow");
  ------------------
  |  Branch (14689:9): [True: 0, False: 79.2M]
  ------------------
14690|  79.2M|    int32_t newtop = fiber->stacktop + 3;
14691|  79.2M|    if (newtop > fiber->capacity) {
  ------------------
  |  Branch (14691:9): [True: 566, False: 79.2M]
  ------------------
14692|    566|        janet_fiber_grow(fiber, newtop);
14693|    566|    }
14694|  79.2M|    fiber->data[fiber->stacktop] = x;
14695|  79.2M|    fiber->data[fiber->stacktop + 1] = y;
14696|  79.2M|    fiber->data[fiber->stacktop + 2] = z;
14697|  79.2M|    fiber->stacktop = newtop;
14698|  79.2M|}
janet_fiber_pushn:
14701|  21.5M|void janet_fiber_pushn(JanetFiber *fiber, const Janet *arr, int32_t n) {
14702|  21.5M|    if (fiber->stacktop > INT32_MAX - n) janet_panic("stack overflow");
  ------------------
  |  Branch (14702:9): [True: 0, False: 21.5M]
  ------------------
14703|  21.5M|    int32_t newtop = fiber->stacktop + n;
14704|  21.5M|    if (newtop > fiber->capacity) {
  ------------------
  |  Branch (14704:9): [True: 726, False: 21.5M]
  ------------------
14705|    726|        janet_fiber_grow(fiber, newtop);
14706|    726|    }
14707|  21.5M|    safe_memcpy(fiber->data + fiber->stacktop, arr, n * sizeof(Janet));
14708|  21.5M|    fiber->stacktop = newtop;
14709|  21.5M|}
janet_fiber_funcframe:
14722|   107M|int janet_fiber_funcframe(JanetFiber *fiber, JanetFunction *func) {
14723|   107M|    JanetStackFrame *newframe;
14724|       |
14725|   107M|    int32_t i;
14726|   107M|    int32_t oldtop = fiber->stacktop;
14727|   107M|    int32_t oldframe = fiber->frame;
14728|   107M|    int32_t nextframe = fiber->stackstart;
14729|   107M|    int32_t nextstacktop = nextframe + func->def->slotcount + JANET_FRAME_SIZE;
  ------------------
  |  | 1017|   107M|#define JANET_FRAME_SIZE 4
  ------------------
14730|   107M|    int32_t next_arity = fiber->stacktop - fiber->stackstart;
14731|       |
14732|       |    /* Check strict arity before messing with state */
14733|   107M|    if (next_arity < func->def->min_arity) return 1;
  ------------------
  |  Branch (14733:9): [True: 1, False: 107M]
  ------------------
14734|   107M|    if (next_arity > func->def->max_arity) return 1;
  ------------------
  |  Branch (14734:9): [True: 23, False: 107M]
  ------------------
14735|       |
14736|   107M|    if (fiber->capacity < nextstacktop) {
  ------------------
  |  Branch (14736:9): [True: 337k, False: 107M]
  ------------------
14737|   337k|        janet_fiber_setcapacity(fiber, 2 * nextstacktop);
14738|       |#ifdef JANET_DEBUG
14739|       |    } else {
14740|       |        janet_fiber_refresh_memory(fiber);
14741|       |#endif
14742|   337k|    }
14743|       |
14744|       |    /* Nil unset stack arguments (Needed for gc correctness) */
14745|  1.57G|    for (i = fiber->stacktop; i < nextstacktop; ++i) {
  ------------------
  |  Branch (14745:31): [True: 1.47G, False: 107M]
  ------------------
14746|  1.47G|        fiber->data[i] = janet_wrap_nil();
  ------------------
  |  |  826|  1.47G|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  1.47G|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.47G|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.47G|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14747|  1.47G|    }
14748|       |
14749|       |    /* Set up the next frame */
14750|   107M|    fiber->frame = nextframe;
14751|   107M|    fiber->stacktop = fiber->stackstart = nextstacktop;
14752|   107M|    newframe = janet_fiber_frame(fiber);
  ------------------
  |  |  802|   107M|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  801|   107M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|   107M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14753|   107M|    newframe->prevframe = oldframe;
14754|   107M|    newframe->pc = func->def->bytecode;
14755|   107M|    newframe->func = func;
14756|   107M|    newframe->env = NULL;
14757|   107M|    newframe->flags = 0;
14758|       |
14759|       |    /* Check varargs */
14760|   107M|    if (func->def->flags & JANET_FUNCDEF_FLAG_VARARG) {
  ------------------
  |  | 1088|   107M|#define JANET_FUNCDEF_FLAG_VARARG 0x10000
  ------------------
  |  Branch (14760:9): [True: 11.7M, False: 95.8M]
  ------------------
14761|  11.7M|        int32_t tuplehead = fiber->frame + func->def->arity;
14762|  11.7M|        int st = func->def->flags & JANET_FUNCDEF_FLAG_STRUCTARG;
  ------------------
  |  | 1096|  11.7M|#define JANET_FUNCDEF_FLAG_STRUCTARG 0x1000000
  ------------------
14763|  11.7M|        if (tuplehead >= oldtop) {
  ------------------
  |  Branch (14763:13): [True: 11.6M, False: 78.1k]
  ------------------
14764|  11.6M|            fiber->data[tuplehead] = st
  ------------------
  |  Branch (14764:38): [True: 2, False: 11.6M]
  ------------------
14765|  11.6M|                                     ? make_struct_n(NULL, 0)
14766|  11.6M|                                     : janet_wrap_tuple(janet_tuple_n(NULL, 0));
  ------------------
  |  |  838|  11.6M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|  23.3M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  11.6M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  11.6M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14767|  11.6M|        } else {
14768|  78.1k|            fiber->data[tuplehead] = st
  ------------------
  |  Branch (14768:38): [True: 17, False: 78.1k]
  ------------------
14769|  78.1k|                                     ? make_struct_n(
14770|     17|                                         fiber->data + tuplehead,
14771|     17|                                         oldtop - tuplehead)
14772|  78.1k|                                     : janet_wrap_tuple(janet_tuple_n(
  ------------------
  |  |  838|  78.1k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|   156k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  78.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  78.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14773|  78.1k|                                             fiber->data + tuplehead,
14774|  78.1k|                                             oldtop - tuplehead));
14775|  78.1k|        }
14776|  11.7M|    }
14777|       |
14778|       |    /* Good return */
14779|   107M|    return 0;
14780|   107M|}
janet_env_valid:
14815|  62.7M|int janet_env_valid(JanetFuncEnv *env) {
14816|  62.7M|    if (env->offset < 0) {
  ------------------
  |  Branch (14816:9): [True: 0, False: 62.7M]
  ------------------
14817|      0|        int32_t real_offset = -(env->offset);
14818|      0|        JanetFiber *fiber = env->as.fiber;
14819|      0|        int32_t i = fiber->frame;
14820|      0|        while (i > 0) {
  ------------------
  |  Branch (14820:16): [True: 0, False: 0]
  ------------------
14821|      0|            JanetStackFrame *frame = (JanetStackFrame *)(fiber->data + i - JANET_FRAME_SIZE);
  ------------------
  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  ------------------
14822|      0|            if (real_offset == i &&
  ------------------
  |  Branch (14822:17): [True: 0, False: 0]
  ------------------
14823|      0|                    frame->env == env &&
  ------------------
  |  Branch (14823:21): [True: 0, False: 0]
  ------------------
14824|      0|                    frame->func &&
  ------------------
  |  Branch (14824:21): [True: 0, False: 0]
  ------------------
14825|      0|                    frame->func->def->slotcount == env->length) {
  ------------------
  |  Branch (14825:21): [True: 0, False: 0]
  ------------------
14826|      0|                env->offset = real_offset;
14827|      0|                return 1;
14828|      0|            }
14829|      0|            i = frame->prevframe;
14830|      0|        }
14831|       |        /* Invalid, set to empty off-stack variant. */
14832|      0|        env->offset = 0;
14833|      0|        env->length = 0;
14834|      0|        env->as.values = NULL;
14835|      0|        return 0;
14836|  62.7M|    } else {
14837|  62.7M|        return 1;
14838|  62.7M|    }
14839|  62.7M|}
janet_env_maybe_detach:
14842|  12.5k|void janet_env_maybe_detach(JanetFuncEnv *env) {
14843|       |    /* Check for detachable closure envs */
14844|  12.5k|    janet_env_valid(env);
14845|  12.5k|    if (env->offset > 0) {
  ------------------
  |  Branch (14845:9): [True: 77, False: 12.5k]
  ------------------
14846|     77|        JanetFiberStatus s = janet_fiber_status(env->as.fiber);
14847|     77|        int isFinished = s == JANET_STATUS_DEAD ||
  ------------------
  |  Branch (14847:26): [True: 0, False: 77]
  ------------------
14848|     77|                         s == JANET_STATUS_ERROR ||
  ------------------
  |  Branch (14848:26): [True: 0, False: 77]
  ------------------
14849|     77|                         s == JANET_STATUS_USER0 ||
  ------------------
  |  Branch (14849:26): [True: 0, False: 77]
  ------------------
14850|     77|                         s == JANET_STATUS_USER1 ||
  ------------------
  |  Branch (14850:26): [True: 0, False: 77]
  ------------------
14851|     77|                         s == JANET_STATUS_USER2 ||
  ------------------
  |  Branch (14851:26): [True: 0, False: 77]
  ------------------
14852|     77|                         s == JANET_STATUS_USER3 ||
  ------------------
  |  Branch (14852:26): [True: 0, False: 77]
  ------------------
14853|     77|                         s == JANET_STATUS_USER4;
  ------------------
  |  Branch (14853:26): [True: 0, False: 77]
  ------------------
14854|     77|        if (isFinished) {
  ------------------
  |  Branch (14854:13): [True: 0, False: 77]
  ------------------
14855|      0|            janet_env_detach(env);
14856|      0|        }
14857|     77|    }
14858|  12.5k|}
janet_fiber_funcframe_tail:
14861|  41.4M|int janet_fiber_funcframe_tail(JanetFiber *fiber, JanetFunction *func) {
14862|  41.4M|    int32_t i;
14863|  41.4M|    int32_t nextframetop = fiber->frame + func->def->slotcount;
14864|  41.4M|    int32_t nextstacktop = nextframetop + JANET_FRAME_SIZE;
  ------------------
  |  | 1017|  41.4M|#define JANET_FRAME_SIZE 4
  ------------------
14865|  41.4M|    int32_t next_arity = fiber->stacktop - fiber->stackstart;
14866|  41.4M|    int32_t stacksize;
14867|       |
14868|       |    /* Check strict arity before messing with state */
14869|  41.4M|    if (next_arity < func->def->min_arity) return 1;
  ------------------
  |  Branch (14869:9): [True: 7, False: 41.4M]
  ------------------
14870|  41.4M|    if (next_arity > func->def->max_arity) return 1;
  ------------------
  |  Branch (14870:9): [True: 1, False: 41.4M]
  ------------------
14871|       |
14872|  41.4M|    if (fiber->capacity < nextstacktop) {
  ------------------
  |  Branch (14872:9): [True: 312, False: 41.4M]
  ------------------
14873|    312|        janet_fiber_setcapacity(fiber, 2 * nextstacktop);
14874|       |#ifdef JANET_DEBUG
14875|       |    } else {
14876|       |        janet_fiber_refresh_memory(fiber);
14877|       |#endif
14878|    312|    }
14879|       |
14880|       |    /* Detach old function */
14881|  41.4M|    if (NULL != janet_fiber_frame(fiber)->func)
  ------------------
  |  |  802|  41.4M|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  801|  41.4M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|  41.4M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (14881:9): [True: 41.4M, False: 0]
  ------------------
14882|  41.4M|        janet_env_detach(janet_fiber_frame(fiber)->env);
  ------------------
  |  |  802|  41.4M|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  801|  41.4M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|  41.4M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14883|  41.4M|    janet_fiber_frame(fiber)->env = NULL;
  ------------------
  |  |  802|  41.4M|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  801|  41.4M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|  41.4M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14884|       |
14885|       |    /* Check varargs */
14886|  41.4M|    if (func->def->flags & JANET_FUNCDEF_FLAG_VARARG) {
  ------------------
  |  | 1088|  41.4M|#define JANET_FUNCDEF_FLAG_VARARG 0x10000
  ------------------
  |  Branch (14886:9): [True: 1.34k, False: 41.4M]
  ------------------
14887|  1.34k|        int32_t tuplehead = fiber->stackstart + func->def->arity;
14888|  1.34k|        int st = func->def->flags & JANET_FUNCDEF_FLAG_STRUCTARG;
  ------------------
  |  | 1096|  1.34k|#define JANET_FUNCDEF_FLAG_STRUCTARG 0x1000000
  ------------------
14889|  1.34k|        if (tuplehead >= fiber->stacktop) {
  ------------------
  |  Branch (14889:13): [True: 853, False: 490]
  ------------------
14890|    853|            if (tuplehead >= fiber->capacity) janet_fiber_setcapacity(fiber, 2 * (tuplehead + 1));
  ------------------
  |  Branch (14890:17): [True: 0, False: 853]
  ------------------
14891|    853|            for (i = fiber->stacktop; i < tuplehead; ++i) fiber->data[i] = janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (14891:39): [True: 0, False: 853]
  ------------------
14892|    853|            fiber->data[tuplehead] = st
  ------------------
  |  Branch (14892:38): [True: 0, False: 853]
  ------------------
14893|    853|                                     ? make_struct_n(NULL, 0)
14894|    853|                                     : janet_wrap_tuple(janet_tuple_n(NULL, 0));
  ------------------
  |  |  838|    853|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|  1.70k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    853|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    853|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14895|    853|        } else {
14896|    490|            fiber->data[tuplehead] = st
  ------------------
  |  Branch (14896:38): [True: 19, False: 471]
  ------------------
14897|    490|                                     ? make_struct_n(
14898|     19|                                         fiber->data + tuplehead,
14899|     19|                                         fiber->stacktop - tuplehead)
14900|    490|                                     : janet_wrap_tuple(janet_tuple_n(
  ------------------
  |  |  838|    471|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|    961|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    471|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    471|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14901|    490|                                             fiber->data + tuplehead,
14902|    490|                                             fiber->stacktop - tuplehead));
14903|    490|        }
14904|  1.34k|        stacksize = tuplehead - fiber->stackstart + 1;
14905|  41.4M|    } else {
14906|  41.4M|        stacksize = fiber->stacktop - fiber->stackstart;
14907|  41.4M|    }
14908|       |
14909|  41.4M|    if (stacksize) memmove(fiber->data + fiber->frame, fiber->data + fiber->stackstart, stacksize * sizeof(Janet));
  ------------------
  |  Branch (14909:9): [True: 41.3M, False: 28.1k]
  ------------------
14910|       |
14911|       |    /* Nil unset locals (Needed for functional correctness) */
14912|   786M|    for (i = fiber->frame + stacksize; i < nextframetop; ++i)
  ------------------
  |  Branch (14912:40): [True: 744M, False: 41.4M]
  ------------------
14913|   744M|        fiber->data[i] = janet_wrap_nil();
  ------------------
  |  |  826|   744M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|   786M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   744M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   744M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14914|       |
14915|       |    /* Set stack stuff */
14916|  41.4M|    fiber->stacktop = fiber->stackstart = nextstacktop;
14917|       |
14918|       |    /* Set frame stuff */
14919|  41.4M|    janet_fiber_frame(fiber)->func = func;
  ------------------
  |  |  802|  41.4M|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  801|  41.4M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|  41.4M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14920|  41.4M|    janet_fiber_frame(fiber)->pc = func->def->bytecode;
  ------------------
  |  |  802|  41.4M|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  801|  41.4M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|  41.4M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14921|  41.4M|    janet_fiber_frame(fiber)->flags |= JANET_STACKFRAME_TAILCALL;
  ------------------
  |  |  802|  41.4M|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  801|  41.4M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|  41.4M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_fiber_frame(fiber)->flags |= JANET_STACKFRAME_TAILCALL;
  ------------------
  |  | 1001|  41.4M|#define JANET_STACKFRAME_TAILCALL 1
  ------------------
14922|       |
14923|       |    /* Good return */
14924|  41.4M|    return 0;
14925|  41.4M|}
janet_fiber_cframe:
14928|   248M|void janet_fiber_cframe(JanetFiber *fiber, JanetCFunction cfun) {
14929|   248M|    JanetStackFrame *newframe;
14930|       |
14931|   248M|    int32_t oldframe = fiber->frame;
14932|   248M|    int32_t nextframe = fiber->stackstart;
14933|   248M|    int32_t nextstacktop = fiber->stacktop + JANET_FRAME_SIZE;
  ------------------
  |  | 1017|   248M|#define JANET_FRAME_SIZE 4
  ------------------
14934|       |
14935|   248M|    if (fiber->capacity < nextstacktop) {
  ------------------
  |  Branch (14935:9): [True: 8.94k, False: 248M]
  ------------------
14936|  8.94k|        janet_fiber_setcapacity(fiber, 2 * nextstacktop);
14937|       |#ifdef JANET_DEBUG
14938|       |    } else {
14939|       |        janet_fiber_refresh_memory(fiber);
14940|       |#endif
14941|  8.94k|    }
14942|       |
14943|       |    /* Set the next frame */
14944|   248M|    fiber->frame = nextframe;
14945|   248M|    fiber->stacktop = fiber->stackstart = nextstacktop;
14946|   248M|    newframe = janet_fiber_frame(fiber);
  ------------------
  |  |  802|   248M|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  801|   248M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|   248M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14947|       |
14948|       |    /* Set up the new frame */
14949|   248M|    newframe->prevframe = oldframe;
14950|   248M|    newframe->pc = (uint32_t *) cfun;
14951|   248M|    newframe->func = NULL;
14952|       |    newframe->env = NULL;
14953|   248M|    newframe->flags = 0;
14954|   248M|}
janet_fiber_popframe:
14957|   355M|void janet_fiber_popframe(JanetFiber *fiber) {
14958|   355M|    JanetStackFrame *frame = janet_fiber_frame(fiber);
  ------------------
  |  |  802|   355M|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  801|   355M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|   355M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14959|   355M|    if (fiber->frame == 0) return;
  ------------------
  |  Branch (14959:9): [True: 0, False: 355M]
  ------------------
14960|       |
14961|       |    /* Clean up the frame (detach environments) */
14962|   355M|    if (NULL != frame->func)
  ------------------
  |  Branch (14962:9): [True: 107M, False: 248M]
  ------------------
14963|   107M|        janet_env_detach(frame->env);
14964|       |
14965|       |    /* Shrink stack */
14966|   355M|    fiber->stacktop = fiber->stackstart = fiber->frame;
14967|   355M|    fiber->frame = frame->prevframe;
14968|   355M|}
janet_fiber_status:
14970|   779k|JanetFiberStatus janet_fiber_status(JanetFiber *f) {
14971|   779k|    return ((f)->flags & JANET_FIBER_STATUS_MASK) >> JANET_FIBER_STATUS_OFFSET;
  ------------------
  |  |  779|   779k|#define JANET_FIBER_STATUS_MASK 0x3F0000
  ------------------
                  return ((f)->flags & JANET_FIBER_STATUS_MASK) >> JANET_FIBER_STATUS_OFFSET;
  ------------------
  |  |  781|   779k|#define JANET_FIBER_STATUS_OFFSET 16
  ------------------
14972|   779k|}
janet_root_fiber:
14978|    492|JanetFiber *janet_root_fiber(void) {
14979|    492|    return janet_vm.root_fiber;
14980|    492|}
cfun_fiber_getenv:
14987|     48|              "set yet.") {
14988|     48|    janet_fixarity(argc, 1);
14989|     48|    JanetFiber *fiber = janet_getfiber(argv, 0);
14990|     48|    return fiber->env ?
  ------------------
  |  Branch (14990:12): [True: 47, False: 1]
  ------------------
14991|     48|           janet_wrap_table(fiber->env) :
  ------------------
  |  |  841|     47|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|     47|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     47|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     47|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14992|     48|           janet_wrap_nil();
  ------------------
  |  |  826|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14993|     48|}
cfun_fiber_setenv:
14998|      1|              "environment.") {
14999|      1|    janet_fixarity(argc, 2);
15000|      1|    JanetFiber *fiber = janet_getfiber(argv, 0);
15001|      1|    if (janet_checktype(argv[1], JANET_NIL)) {
  ------------------
  |  |  801|      1|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 1]
  |  |  |  Branch (801:6): [Folded, False: 1]
  |  |  ------------------
  |  |  802|      1|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      1|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      1|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      1|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
15002|      0|        fiber->env = NULL;
15003|      1|    } else {
15004|      1|        fiber->env = janet_gettable(argv, 1);
15005|      1|    }
15006|      1|    return argv[0];
15007|      1|}
cfun_fiber_new:
15034|  1.05k|              "* :p - the environment table's prototype is the current environment table") {
15035|  1.05k|    janet_arity(argc, 1, 3);
15036|  1.05k|    JanetFunction *func = janet_getfunction(argv, 0);
15037|  1.05k|    JanetFiber *fiber;
15038|  1.05k|    if (func->def->min_arity > 1) {
  ------------------
  |  Branch (15038:9): [True: 1, False: 1.04k]
  ------------------
15039|      1|        janet_panicf("fiber function must accept 0 or 1 arguments");
15040|      1|    }
15041|  1.04k|    fiber = janet_fiber(func, 64, func->def->min_arity, NULL);
15042|  1.04k|    janet_assert(fiber != NULL, "bad fiber arity check");
  ------------------
  |  |  386|  1.04k|#define janet_assert(c, m) do { \
  |  |  387|  1.04k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 1.04k]
  |  |  ------------------
  |  |  388|  1.04k|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 1.04k]
  |  |  ------------------
  ------------------
15043|  1.04k|    if (argc == 3 && !janet_checktype(argv[2], JANET_NIL)) {
  ------------------
  |  |  801|      5|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 5]
  |  |  ------------------
  |  |  802|      5|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      5|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      5|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      5|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      5|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      5|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (15043:9): [True: 5, False: 1.04k]
  |  Branch (15043:22): [True: 3, False: 2]
  ------------------
15044|      3|        fiber->env = janet_gettable(argv, 2);
15045|      3|    }
15046|  1.04k|    if (argc >= 2) {
  ------------------
  |  Branch (15046:9): [True: 942, False: 107]
  ------------------
15047|    942|        int32_t i;
15048|    942|        JanetByteView view = janet_getbytes(argv, 1);
15049|    942|        fiber->flags = JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  784|    942|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
                      fiber->flags = JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  785|    942|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  ------------------
15050|    942|        janet_fiber_set_status(fiber, JANET_STATUS_NEW);
  ------------------
  |  |  796|    942|#define janet_fiber_set_status(f, s) do {\
  |  |  797|    942|    (f)->flags &= ~JANET_FIBER_STATUS_MASK;\
  |  |  ------------------
  |  |  |  |  779|    942|#define JANET_FIBER_STATUS_MASK 0x3F0000
  |  |  ------------------
  |  |  798|    942|    (f)->flags |= (s) << JANET_FIBER_STATUS_OFFSET;\
  |  |  ------------------
  |  |  |  |  781|    942|#define JANET_FIBER_STATUS_OFFSET 16
  |  |  ------------------
  |  |  799|    942|} while (0)
  |  |  ------------------
  |  |  |  Branch (799:10): [Folded, False: 942]
  |  |  ------------------
  ------------------
15051|  3.88k|        for (i = 0; i < view.len; i++) {
  ------------------
  |  Branch (15051:21): [True: 2.97k, False: 913]
  ------------------
15052|  2.97k|            if (view.bytes[i] >= '0' && view.bytes[i] <= '9') {
  ------------------
  |  Branch (15052:17): [True: 2.96k, False: 12]
  |  Branch (15052:41): [True: 163, False: 2.79k]
  ------------------
15053|    163|                fiber->flags |= JANET_FIBER_MASK_USERN(view.bytes[i] - '0');
  ------------------
  |  |  776|    163|#define JANET_FIBER_MASK_USERN(N) (16 << (N))
  ------------------
15054|  2.80k|            } else {
15055|  2.80k|                switch (view.bytes[i]) {
15056|     29|                    default:
  ------------------
  |  Branch (15056:21): [True: 29, False: 2.78k]
  ------------------
15057|     29|                        janet_panicf("invalid flag %c, expected a, t, d, e, u, y, w, r, i, or p", view.bytes[i]);
15058|      0|                        break;
15059|     35|                    case 'a':
  ------------------
  |  Branch (15059:21): [True: 35, False: 2.77k]
  ------------------
15060|     35|                        fiber->flags |=
15061|     35|                            JANET_FIBER_MASK_DEBUG |
  ------------------
  |  |  762|     35|#define JANET_FIBER_MASK_DEBUG 4
  ------------------
15062|     35|                            JANET_FIBER_MASK_ERROR |
  ------------------
  |  |  761|     35|#define JANET_FIBER_MASK_ERROR 2
  ------------------
15063|     35|                            JANET_FIBER_MASK_USER |
  ------------------
  |  |  777|     35|#define JANET_FIBER_MASK_USER 0x3FF0
  ------------------
15064|     35|                            JANET_FIBER_MASK_YIELD;
  ------------------
  |  |  763|     35|#define JANET_FIBER_MASK_YIELD 8
  ------------------
15065|     35|                        break;
15066|     88|                    case 't':
  ------------------
  |  Branch (15066:21): [True: 88, False: 2.72k]
  ------------------
15067|     88|                        fiber->flags |=
15068|     88|                            JANET_FIBER_MASK_ERROR |
  ------------------
  |  |  761|     88|#define JANET_FIBER_MASK_ERROR 2
  ------------------
15069|     88|                            JANET_FIBER_MASK_USER0 |
  ------------------
  |  |  765|     88|#define JANET_FIBER_MASK_USER0 (16 << 0)
  ------------------
15070|     88|                            JANET_FIBER_MASK_USER1 |
  ------------------
  |  |  766|     88|#define JANET_FIBER_MASK_USER1 (16 << 1)
  ------------------
15071|     88|                            JANET_FIBER_MASK_USER2 |
  ------------------
  |  |  767|     88|#define JANET_FIBER_MASK_USER2 (16 << 2)
  ------------------
15072|     88|                            JANET_FIBER_MASK_USER3 |
  ------------------
  |  |  768|     88|#define JANET_FIBER_MASK_USER3 (16 << 3)
  ------------------
15073|     88|                            JANET_FIBER_MASK_USER4;
  ------------------
  |  |  769|     88|#define JANET_FIBER_MASK_USER4 (16 << 4)
  ------------------
15074|     88|                        break;
15075|    137|                    case 'd':
  ------------------
  |  Branch (15075:21): [True: 137, False: 2.67k]
  ------------------
15076|    137|                        fiber->flags |= JANET_FIBER_MASK_DEBUG;
  ------------------
  |  |  762|    137|#define JANET_FIBER_MASK_DEBUG 4
  ------------------
15077|    137|                        break;
15078|     97|                    case 'e':
  ------------------
  |  Branch (15078:21): [True: 97, False: 2.71k]
  ------------------
15079|     97|                        fiber->flags |= JANET_FIBER_MASK_ERROR;
  ------------------
  |  |  761|     97|#define JANET_FIBER_MASK_ERROR 2
  ------------------
15080|     97|                        break;
15081|     28|                    case 'u':
  ------------------
  |  Branch (15081:21): [True: 28, False: 2.78k]
  ------------------
15082|     28|                        fiber->flags |= JANET_FIBER_MASK_USER;
  ------------------
  |  |  777|     28|#define JANET_FIBER_MASK_USER 0x3FF0
  ------------------
15083|     28|                        break;
15084|    790|                    case 'y':
  ------------------
  |  Branch (15084:21): [True: 790, False: 2.01k]
  ------------------
15085|    790|                        fiber->flags |= JANET_FIBER_MASK_YIELD;
  ------------------
  |  |  763|    790|#define JANET_FIBER_MASK_YIELD 8
  ------------------
15086|    790|                        break;
15087|     23|                    case 'w':
  ------------------
  |  Branch (15087:21): [True: 23, False: 2.78k]
  ------------------
15088|     23|                        fiber->flags |= JANET_FIBER_MASK_USER9;
  ------------------
  |  |  774|     23|#define JANET_FIBER_MASK_USER9 (16 << 9)
  ------------------
15089|     23|                        break;
15090|     21|                    case 'r':
  ------------------
  |  Branch (15090:21): [True: 21, False: 2.78k]
  ------------------
15091|     21|                        fiber->flags |= JANET_FIBER_MASK_USER8;
  ------------------
  |  |  773|     21|#define JANET_FIBER_MASK_USER8 (16 << 8)
  ------------------
15092|     21|                        break;
15093|    901|                    case 'i':
  ------------------
  |  Branch (15093:21): [True: 901, False: 1.90k]
  ------------------
15094|    901|                        if (!janet_vm.fiber->env) {
  ------------------
  |  Branch (15094:29): [True: 2, False: 899]
  ------------------
15095|      2|                            janet_vm.fiber->env = janet_table(0);
15096|      2|                        }
15097|    901|                        fiber->env = janet_vm.fiber->env;
15098|    901|                        break;
15099|    660|                    case 'p':
  ------------------
  |  Branch (15099:21): [True: 660, False: 2.14k]
  ------------------
15100|    660|                        if (!janet_vm.fiber->env) {
  ------------------
  |  Branch (15100:29): [True: 0, False: 660]
  ------------------
15101|      0|                            janet_vm.fiber->env = janet_table(0);
15102|      0|                        }
15103|    660|                        fiber->env = janet_table(0);
15104|    660|                        fiber->env->proto = janet_vm.fiber->env;
15105|    660|                        break;
15106|  2.80k|                }
15107|  2.80k|            }
15108|  2.97k|        }
15109|    942|    }
15110|  1.02k|    return janet_wrap_fiber(fiber);
  ------------------
  |  |  839|  1.02k|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|  1.02k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.02k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.02k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
15111|  1.04k|}
cfun_fiber_status:
15124|     61|              "* :alive - the fiber is currently running and cannot be resumed") {
15125|     61|    janet_fixarity(argc, 1);
15126|     61|    JanetFiber *fiber = janet_getfiber(argv, 0);
15127|     61|    uint32_t s = janet_fiber_status(fiber);
15128|     61|    return janet_ckeywordv(janet_status_names[s]);
  ------------------
  |  | 1833|     61|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|     61|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|     61|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|     61|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|     61|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
15129|     61|}
cfun_fiber_current:
15133|     49|              "Returns the currently running fiber.") {
15134|     49|    (void) argv;
15135|     49|    janet_fixarity(argc, 0);
15136|     49|    return janet_wrap_fiber(janet_vm.fiber);
  ------------------
  |  |  839|     49|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|     49|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     49|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     49|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
15137|     49|}
cfun_fiber_maxstack:
15153|      2|              "than this amount and will throw a stack-overflow error if more memory is needed. ") {
15154|      2|    janet_fixarity(argc, 1);
15155|      2|    JanetFiber *fiber = janet_getfiber(argv, 0);
15156|      2|    return janet_wrap_integer(fiber->maxstack);
  ------------------
  |  |  958|      2|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
15157|      2|}
cfun_fiber_setmaxstack:
15162|      1|              "maximum stack size is usually 8192.") {
15163|      1|    janet_fixarity(argc, 2);
15164|      1|    JanetFiber *fiber = janet_getfiber(argv, 0);
15165|      1|    int32_t maxs = janet_getinteger(argv, 1);
15166|      1|    if (maxs < 0) {
  ------------------
  |  Branch (15166:9): [True: 0, False: 1]
  ------------------
15167|      0|        janet_panic("expected positive integer");
15168|      0|    }
15169|      1|    fiber->maxstack = maxs;
15170|      1|    return argv[0];
15171|      1|}
janet_fiber_can_resume:
15173|    583|int janet_fiber_can_resume(JanetFiber *fiber) {
15174|    583|    JanetFiberStatus s = janet_fiber_status(fiber);
15175|    583|    int isFinished = s == JANET_STATUS_DEAD ||
  ------------------
  |  Branch (15175:22): [True: 457, False: 126]
  ------------------
15176|    126|                     s == JANET_STATUS_ERROR ||
  ------------------
  |  Branch (15176:22): [True: 35, False: 91]
  ------------------
15177|     91|                     s == JANET_STATUS_USER0 ||
  ------------------
  |  Branch (15177:22): [True: 0, False: 91]
  ------------------
15178|     91|                     s == JANET_STATUS_USER1 ||
  ------------------
  |  Branch (15178:22): [True: 0, False: 91]
  ------------------
15179|     91|                     s == JANET_STATUS_USER2 ||
  ------------------
  |  Branch (15179:22): [True: 0, False: 91]
  ------------------
15180|     91|                     s == JANET_STATUS_USER3 ||
  ------------------
  |  Branch (15180:22): [True: 0, False: 91]
  ------------------
15181|     91|                     s == JANET_STATUS_USER4;
  ------------------
  |  Branch (15181:22): [True: 0, False: 91]
  ------------------
15182|    583|    return !isFinished;
15183|    583|}
cfun_fiber_can_resume:
15187|      2|              "Check if a fiber is finished and cannot be resumed.") {
15188|      2|    janet_fixarity(argc, 1);
15189|      2|    JanetFiber *fiber = janet_getfiber(argv, 0);
15190|      2|    return janet_wrap_boolean(janet_fiber_can_resume(fiber));
  ------------------
  |  |  829|      2|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  817|      2|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
15191|      2|}
cfun_fiber_last_value:
15195|      1|              "Get the last value returned or signaled from the fiber.") {
15196|      1|    janet_fixarity(argc, 1);
15197|      1|    JanetFiber *fiber = janet_getfiber(argv, 0);
15198|      1|    return fiber->last_value;
15199|      1|}
janet_lib_fiber:
15202|  7.16k|void janet_lib_fiber(JanetTable *env) {
15203|  7.16k|    JanetRegExt fiber_cfuns[] = {
15204|  7.16k|        JANET_CORE_REG("fiber/new", cfun_fiber_new),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
15205|  7.16k|        JANET_CORE_REG("fiber/status", cfun_fiber_status),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
15206|  7.16k|        JANET_CORE_REG("fiber/root", cfun_fiber_root),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
15207|  7.16k|        JANET_CORE_REG("fiber/current", cfun_fiber_current),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
15208|  7.16k|        JANET_CORE_REG("fiber/maxstack", cfun_fiber_maxstack),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
15209|  7.16k|        JANET_CORE_REG("fiber/setmaxstack", cfun_fiber_setmaxstack),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
15210|  7.16k|        JANET_CORE_REG("fiber/getenv", cfun_fiber_getenv),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
15211|  7.16k|        JANET_CORE_REG("fiber/setenv", cfun_fiber_setenv),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
15212|  7.16k|        JANET_CORE_REG("fiber/can-resume?", cfun_fiber_can_resume),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
15213|  7.16k|        JANET_CORE_REG("fiber/last-value", cfun_fiber_last_value),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
15214|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
15215|  7.16k|    };
15216|       |    janet_core_cfuns_ext(env, NULL, fiber_cfuns);
15217|  7.16k|}
cfun_filewatch_make:
16073|      2|              "") {
16074|      2|    janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2019|      2|#define JANET_SANDBOX_FS_READ 64
  ------------------
16075|      2|    janet_arity(argc, 1, -1);
16076|      2|    JanetChannel *channel = janet_getchannel(argv, 0);
16077|      2|    JanetWatcher *watcher = janet_abstract(&janet_filewatch_at, sizeof(JanetWatcher));
16078|      2|    uint32_t default_flags = decode_watch_flags(argv + 1, argc - 1);
16079|      2|    janet_watcher_init(watcher, channel, default_flags);
16080|      2|    return janet_wrap_abstract(watcher);
  ------------------
  |  |  846|      2|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|      2|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16081|      2|}
cfun_filewatch_add:
16138|      1|              "") {
16139|      1|    janet_arity(argc, 2, -1);
16140|      1|    JanetWatcher *watcher = janet_getabstract(argv, 0, &janet_filewatch_at);
16141|      1|    const char *path = janet_getcstring(argv, 1);
16142|      1|    uint32_t flags = watcher->default_flags | decode_watch_flags(argv + 2, argc - 2);
16143|      1|    janet_watcher_add(watcher, path, flags);
16144|      1|    return argv[0];
16145|      1|}
cfun_filewatch_remove:
16149|      1|              "Remove a path from the watcher.") {
16150|      1|    janet_fixarity(argc, 2);
16151|      1|    JanetWatcher *watcher = janet_getabstract(argv, 0, &janet_filewatch_at);
16152|       |    /* TODO - pass string in directly to avoid extra allocation */
16153|      1|    const char *path = janet_getcstring(argv, 1);
16154|      1|    janet_watcher_remove(watcher, path);
16155|      1|    return argv[0];
16156|      1|}
cfun_filewatch_listen:
16160|      2|              "Listen for changes in the watcher.") {
16161|      2|    janet_fixarity(argc, 1);
16162|      2|    JanetWatcher *watcher = janet_getabstract(argv, 0, &janet_filewatch_at);
16163|      2|    janet_watcher_listen(watcher);
16164|      2|    return janet_wrap_nil();
  ------------------
  |  |  826|      2|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      2|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16165|      2|}
cfun_filewatch_unlisten:
16169|      2|              "Stop listening for changes on a given watcher.") {
16170|      2|    janet_fixarity(argc, 1);
16171|      2|    JanetWatcher *watcher = janet_getabstract(argv, 0, &janet_filewatch_at);
16172|      2|    janet_watcher_unlisten(watcher);
16173|      2|    return janet_wrap_nil();
  ------------------
  |  |  826|      2|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      2|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16174|      2|}
janet_lib_filewatch:
16177|  7.16k|void janet_lib_filewatch(JanetTable *env) {
16178|  7.16k|    JanetRegExt cfuns[] = {
16179|  7.16k|        JANET_CORE_REG("filewatch/new", cfun_filewatch_make),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16180|  7.16k|        JANET_CORE_REG("filewatch/add", cfun_filewatch_add),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16181|  7.16k|        JANET_CORE_REG("filewatch/remove", cfun_filewatch_remove),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16182|  7.16k|        JANET_CORE_REG("filewatch/listen", cfun_filewatch_listen),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16183|  7.16k|        JANET_CORE_REG("filewatch/unlisten", cfun_filewatch_unlisten),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
16184|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
16185|  7.16k|    };
16186|       |    janet_core_cfuns_ext(env, NULL, cfuns);
16187|  7.16k|}
janet_gcpressure:
16247|  16.7M|void janet_gcpressure(size_t s) {
16248|  16.7M|    janet_vm.next_collection += s;
16249|  16.7M|}
janet_mark:
16252|   208M|void janet_mark(Janet x) {
16253|   208M|    if (depth) {
  ------------------
  |  Branch (16253:9): [True: 208M, False: 0]
  ------------------
16254|   208M|        depth--;
16255|   208M|        switch (janet_type(x)) {
  ------------------
  |  |  790|   208M|    (isnan((x).number) \
  |  |  791|   208M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|   208M|        : JANET_NUMBER)
  ------------------
  |  Branch (16255:17): [True: 34.0M, False: 174M]
  ------------------
16256|   195M|            default:
  ------------------
  |  Branch (16256:13): [True: 195M, False: 12.5M]
  ------------------
16257|   195M|                break;
16258|   195M|            case JANET_STRING:
  ------------------
  |  Branch (16258:13): [True: 2.20M, False: 206M]
  ------------------
16259|  5.75M|            case JANET_KEYWORD:
  ------------------
  |  Branch (16259:13): [True: 3.54M, False: 204M]
  ------------------
16260|  8.75M|            case JANET_SYMBOL:
  ------------------
  |  Branch (16260:13): [True: 2.99M, False: 205M]
  ------------------
16261|  8.75M|                janet_mark_string(janet_unwrap_string(x));
  ------------------
  |  |  858|  8.75M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
16262|  8.75M|                break;
16263|  1.75M|            case JANET_FUNCTION:
  ------------------
  |  Branch (16263:13): [True: 1.75M, False: 206M]
  ------------------
16264|  1.75M|                janet_mark_function(janet_unwrap_function(x));
  ------------------
  |  |  863|  1.75M|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
16265|  1.75M|                break;
16266|  11.1k|            case JANET_ARRAY:
  ------------------
  |  Branch (16266:13): [True: 11.1k, False: 208M]
  ------------------
16267|  11.1k|                janet_mark_array(janet_unwrap_array(x));
  ------------------
  |  |  855|  11.1k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
16268|  11.1k|                break;
16269|   927k|            case JANET_TABLE:
  ------------------
  |  Branch (16269:13): [True: 927k, False: 207M]
  ------------------
16270|   927k|                janet_mark_table(janet_unwrap_table(x));
  ------------------
  |  |  856|   927k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
16271|   927k|                break;
16272|  9.76k|            case JANET_STRUCT:
  ------------------
  |  Branch (16272:13): [True: 9.76k, False: 208M]
  ------------------
16273|  9.76k|                janet_mark_struct(janet_unwrap_struct(x));
  ------------------
  |  |  852|  9.76k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
16274|  9.76k|                break;
16275|  1.00M|            case JANET_TUPLE:
  ------------------
  |  Branch (16275:13): [True: 1.00M, False: 207M]
  ------------------
16276|  1.00M|                janet_mark_tuple(janet_unwrap_tuple(x));
  ------------------
  |  |  853|  1.00M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
16277|  1.00M|                break;
16278|  22.5k|            case JANET_BUFFER:
  ------------------
  |  Branch (16278:13): [True: 22.5k, False: 208M]
  ------------------
16279|  22.5k|                janet_mark_buffer(janet_unwrap_buffer(x));
  ------------------
  |  |  857|  22.5k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
16280|  22.5k|                break;
16281|    447|            case JANET_FIBER:
  ------------------
  |  Branch (16281:13): [True: 447, False: 208M]
  ------------------
16282|    447|                janet_mark_fiber(janet_unwrap_fiber(x));
  ------------------
  |  |  854|    447|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
16283|    447|                break;
16284|  18.3k|            case JANET_ABSTRACT:
  ------------------
  |  Branch (16284:13): [True: 18.3k, False: 208M]
  ------------------
16285|  18.3k|                janet_mark_abstract(janet_unwrap_abstract(x));
  ------------------
  |  |  861|  18.3k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
16286|  18.3k|                break;
16287|   208M|        }
16288|   208M|        depth++;
16289|   208M|    } else {
16290|      0|        janet_gcroot(x);
16291|      0|    }
16292|   208M|}
janet_sweep:
16601|  1.21k|void janet_sweep() {
16602|  1.21k|    JanetGCObject *previous = NULL;
16603|  1.21k|    JanetGCObject *current = janet_vm.weak_blocks;
16604|  1.21k|    JanetGCObject *next;
16605|       |
16606|       |    /* Sweep weak heap to drop weak refs */
16607|  1.23k|    while (NULL != current) {
  ------------------
  |  Branch (16607:12): [True: 21, False: 1.21k]
  ------------------
16608|     21|        next = current->data.next;
16609|     21|        if (current->flags & (JANET_MEM_REACHABLE | JANET_MEM_DISABLED)) {
  ------------------
  |  |  625|     21|#define JANET_MEM_REACHABLE 0x100
  ------------------
                      if (current->flags & (JANET_MEM_REACHABLE | JANET_MEM_DISABLED)) {
  ------------------
  |  |  626|     21|#define JANET_MEM_DISABLED 0x200
  ------------------
  |  Branch (16609:13): [True: 13, False: 8]
  ------------------
16610|       |            /* Check for dead references */
16611|     13|            enum JanetMemoryType type = janet_gc_type(current);
  ------------------
  |  |  629|     13|#define janet_gc_type(m) (janet_gc_header(m)->flags & 0xFF)
  |  |  ------------------
  |  |  |  |  622|     13|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
16612|     13|            if (type == JANET_MEMORY_ARRAY_WEAK) {
  ------------------
  |  Branch (16612:17): [True: 10, False: 3]
  ------------------
16613|     10|                JanetArray *array = (JanetArray *) current;
16614|     10|                for (uint32_t i = 0; i < (uint32_t) array->count; i++) {
  ------------------
  |  Branch (16614:38): [True: 0, False: 10]
  ------------------
16615|      0|                    if (!janet_check_liveref(array->data[i])) {
  ------------------
  |  Branch (16615:25): [True: 0, False: 0]
  ------------------
16616|      0|                        array->data[i] = janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16617|      0|                    }
16618|      0|                }
16619|     10|            } else {
16620|      3|                JanetTable *table = (JanetTable *) current;
16621|      3|                int check_values = (type == JANET_MEMORY_TABLE_WEAKV) || (type == JANET_MEMORY_TABLE_WEAKKV);
  ------------------
  |  Branch (16621:36): [True: 0, False: 3]
  |  Branch (16621:74): [True: 3, False: 0]
  ------------------
16622|      3|                int check_keys = (type == JANET_MEMORY_TABLE_WEAKK) || (type == JANET_MEMORY_TABLE_WEAKKV);
  ------------------
  |  Branch (16622:34): [True: 0, False: 3]
  |  Branch (16622:72): [True: 3, False: 0]
  ------------------
16623|      3|                JanetKV *end = table->data + table->capacity;
16624|      3|                JanetKV *kvs = table->data;
16625|  1.83M|                while (kvs < end) {
  ------------------
  |  Branch (16625:24): [True: 1.83M, False: 3]
  ------------------
16626|  1.83M|                    int drop = 0;
16627|  1.83M|                    if (check_keys && !janet_check_liveref(kvs->key)) drop = 1;
  ------------------
  |  Branch (16627:25): [True: 1.83M, False: 0]
  |  Branch (16627:39): [True: 0, False: 1.83M]
  ------------------
16628|  1.83M|                    if (check_values && !janet_check_liveref(kvs->value)) drop = 1;
  ------------------
  |  Branch (16628:25): [True: 1.83M, False: 0]
  |  Branch (16628:41): [True: 0, False: 1.83M]
  ------------------
16629|  1.83M|                    if (drop) {
  ------------------
  |  Branch (16629:25): [True: 0, False: 1.83M]
  ------------------
16630|       |                        /* Inlined from janet_table_remove without search */
16631|      0|                        table->count--;
16632|      0|                        table->deleted++;
16633|      0|                        kvs->key = janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16634|      0|                        kvs->value = janet_wrap_false();
  ------------------
  |  |  828|      0|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16635|      0|                    }
16636|  1.83M|                    kvs++;
16637|  1.83M|                }
16638|      3|            }
16639|     13|        }
16640|     21|        current = next;
16641|     21|    }
16642|       |
16643|       |    /* Sweep weak heap to free blocks */
16644|  1.21k|    previous = NULL;
16645|  1.21k|    current = janet_vm.weak_blocks;
16646|  1.23k|    while (NULL != current) {
  ------------------
  |  Branch (16646:12): [True: 21, False: 1.21k]
  ------------------
16647|     21|        next = current->data.next;
16648|     21|        if (current->flags & (JANET_MEM_REACHABLE | JANET_MEM_DISABLED)) {
  ------------------
  |  |  625|     21|#define JANET_MEM_REACHABLE 0x100
  ------------------
                      if (current->flags & (JANET_MEM_REACHABLE | JANET_MEM_DISABLED)) {
  ------------------
  |  |  626|     21|#define JANET_MEM_DISABLED 0x200
  ------------------
  |  Branch (16648:13): [True: 13, False: 8]
  ------------------
16649|     13|            previous = current;
16650|     13|            current->flags &= ~JANET_MEM_REACHABLE;
  ------------------
  |  |  625|     13|#define JANET_MEM_REACHABLE 0x100
  ------------------
16651|     13|        } else {
16652|      8|            janet_vm.block_count--;
16653|      8|            janet_deinit_block(current);
16654|      8|            if (NULL != previous) {
  ------------------
  |  Branch (16654:17): [True: 7, False: 1]
  ------------------
16655|      7|                previous->data.next = next;
16656|      7|            } else {
16657|      1|                janet_vm.weak_blocks = next;
16658|      1|            }
16659|      8|            janet_free(current);
  ------------------
  |  | 2402|      8|#define janet_free(X) free((X))
  ------------------
16660|      8|        }
16661|     21|        current = next;
16662|     21|    }
16663|       |
16664|       |    /* Sweep main heap to free blocks */
16665|  1.21k|    previous = NULL;
16666|  1.21k|    current = janet_vm.blocks;
16667|   125M|    while (NULL != current) {
  ------------------
  |  Branch (16667:12): [True: 125M, False: 1.21k]
  ------------------
16668|   125M|        next = current->data.next;
16669|   125M|        if (current->flags & (JANET_MEM_REACHABLE | JANET_MEM_DISABLED)) {
  ------------------
  |  |  625|   125M|#define JANET_MEM_REACHABLE 0x100
  ------------------
                      if (current->flags & (JANET_MEM_REACHABLE | JANET_MEM_DISABLED)) {
  ------------------
  |  |  626|   125M|#define JANET_MEM_DISABLED 0x200
  ------------------
  |  Branch (16669:13): [True: 11.4M, False: 113M]
  ------------------
16670|  11.4M|            previous = current;
16671|  11.4M|            current->flags &= ~JANET_MEM_REACHABLE;
  ------------------
  |  |  625|  11.4M|#define JANET_MEM_REACHABLE 0x100
  ------------------
16672|   113M|        } else {
16673|   113M|            janet_vm.block_count--;
16674|   113M|            janet_deinit_block(current);
16675|   113M|            if (NULL != previous) {
  ------------------
  |  Branch (16675:17): [True: 113M, False: 274]
  ------------------
16676|   113M|                previous->data.next = next;
16677|   113M|            } else {
16678|    274|                janet_vm.blocks = next;
16679|    274|            }
16680|   113M|            janet_free(current);
  ------------------
  |  | 2402|   113M|#define janet_free(X) free((X))
  ------------------
16681|   113M|        }
16682|   125M|        current = next;
16683|   125M|    }
16684|       |
16685|  1.21k|#ifdef JANET_EV
16686|       |    /* Sweep threaded abstract types for references to decrement */
16687|  1.21k|    JanetKV *items = janet_vm.threaded_abstracts.data;
16688|  2.43k|    for (int32_t i = 0; i < janet_vm.threaded_abstracts.capacity; i++) {
  ------------------
  |  Branch (16688:25): [True: 1.21k, False: 1.21k]
  ------------------
16689|  1.21k|        if (janet_checktype(items[i].key, JANET_ABSTRACT)) {
  ------------------
  |  |  801|  1.21k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 1.21k]
  |  |  |  Branch (801:6): [Folded, False: 1.21k]
  |  |  ------------------
  |  |  802|  1.21k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  1.21k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  1.21k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  1.21k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.21k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.21k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16690|       |
16691|       |            /* If item was not visited during the mark phase, then this
16692|       |             * abstract type isn't present in the heap and needs its refcount
16693|       |             * decremented, and shouuld be removed from table. If the refcount is
16694|       |             * then 0, the item will be collected. This ensures that only one interpreter
16695|       |             * will clean up the threaded abstract. */
16696|       |
16697|       |            /* If not visited... */
16698|      0|            if (!janet_truthy(items[i].value)) {
  ------------------
  |  |  813|      0|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 0, False: 0]
  |  |  ------------------
  |  |  814|      0|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 0, False: 0]
  |  |  |  Branch (814:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
16699|      0|                void *abst = janet_unwrap_abstract(items[i].key);
  ------------------
  |  |  861|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
16700|      0|                JanetAbstractHead *head = janet_abstract_head(abst);
  ------------------
  |  | 1887|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
16701|      0|                if (head->type->gcperthread) {
  ------------------
  |  Branch (16701:21): [True: 0, False: 0]
  ------------------
16702|      0|                    janet_assert(!head->type->gcperthread(head->data, head->size), "per-thread finalizer failed");
  ------------------
  |  |  386|      0|#define janet_assert(c, m) do { \
  |  |  387|      0|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  388|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
16703|      0|                }
16704|      0|                janet_abstract_decref_maybe_free(abst);
16705|       |
16706|       |                /* Mark as tombstone in place */
16707|      0|                items[i].key = janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16708|      0|                items[i].value = janet_wrap_false();
  ------------------
  |  |  828|      0|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16709|      0|                janet_vm.threaded_abstracts.deleted++;
16710|      0|                janet_vm.threaded_abstracts.count--;
16711|      0|            }
16712|       |
16713|       |            /* Reset for next sweep */
16714|      0|            items[i].value = janet_wrap_false();
  ------------------
  |  |  828|      0|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16715|      0|        }
16716|  1.21k|    }
16717|  1.21k|#endif
16718|  1.21k|}
janet_gcalloc:
16721|   235M|void *janet_gcalloc(enum JanetMemoryType type, size_t size) {
16722|   235M|    JanetGCObject *mem;
16723|       |
16724|       |    /* Make sure everything is inited */
16725|   235M|    janet_assert(NULL != janet_vm.cache, "please initialize janet before use");
  ------------------
  |  |  386|   235M|#define janet_assert(c, m) do { \
  |  |  387|   235M|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 235M]
  |  |  ------------------
  |  |  388|   235M|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 235M]
  |  |  ------------------
  ------------------
16726|   235M|    mem = janet_malloc(size);
  ------------------
  |  | 2393|   235M|#define janet_malloc(X) malloc((X))
  ------------------
16727|       |
16728|       |    /* Check for bad malloc */
16729|   235M|    if (NULL == mem) {
  ------------------
  |  Branch (16729:9): [True: 0, False: 235M]
  ------------------
16730|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
16731|      0|    }
16732|       |
16733|       |    /* Configure block */
16734|   235M|    mem->flags = type;
16735|       |
16736|       |    /* Prepend block to heap list */
16737|   235M|    janet_vm.next_collection += size;
16738|   235M|    if (type < JANET_MEMORY_TABLE_WEAKK) {
  ------------------
  |  Branch (16738:9): [True: 235M, False: 18.4E]
  ------------------
16739|       |        /* normal heap */
16740|   235M|        mem->data.next = janet_vm.blocks;
16741|   235M|        janet_vm.blocks = mem;
16742|  18.4E|    } else {
16743|       |        /* weak heap */
16744|  18.4E|        mem->data.next = janet_vm.weak_blocks;
16745|  18.4E|        janet_vm.weak_blocks = mem;
16746|  18.4E|    }
16747|   235M|    janet_vm.block_count++;
16748|       |
16749|   235M|    return (void *)mem;
16750|   235M|}
janet_collect:
16773|   746M|void janet_collect(void) {
16774|   746M|    uint32_t i;
16775|   746M|    if (janet_vm.gc_suspend) return;
  ------------------
  |  Branch (16775:9): [True: 746M, False: 1.21k]
  ------------------
16776|  1.21k|    depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  291|  1.21k|#define JANET_RECURSION_GUARD 1024
  ------------------
16777|  1.21k|    janet_vm.gc_mark_phase = 1;
16778|       |    /* Try to prevent many major collections back to back.
16779|       |     * A full collection will take O(janet_vm.block_count) time.
16780|       |     * If we have a large heap, make sure our interval is not too
16781|       |     * small so we won't make many collections over it. This is just a
16782|       |     * heuristic for automatically changing the gc interval */
16783|  1.21k|    if (janet_vm.block_count * 8 > janet_vm.gc_interval) {
  ------------------
  |  Branch (16783:9): [True: 29, False: 1.18k]
  ------------------
16784|     29|        janet_vm.gc_interval = janet_vm.block_count * sizeof(JanetGCObject);
16785|     29|    }
16786|  1.21k|    orig_rootcount = janet_vm.root_count;
16787|  1.21k|#ifdef JANET_EV
16788|  1.21k|    janet_ev_mark();
16789|  1.21k|#endif
16790|  1.21k|    if (janet_vm.root_fiber != NULL) { /* Can be NULL if janet_collect called outside of interpreter loop */
  ------------------
  |  Branch (16790:9): [True: 1.21k, False: 18.4E]
  ------------------
16791|  1.21k|        janet_mark_fiber(janet_vm.root_fiber);
16792|  1.21k|    }
16793|  6.08k|    for (i = 0; i < orig_rootcount; i++)
  ------------------
  |  Branch (16793:17): [True: 4.86k, False: 1.21k]
  ------------------
16794|  4.86k|        janet_mark(janet_vm.roots[i]);
16795|  1.21k|    while (orig_rootcount < janet_vm.root_count) {
  ------------------
  |  Branch (16795:12): [True: 0, False: 1.21k]
  ------------------
16796|      0|        Janet x = janet_vm.roots[--janet_vm.root_count];
16797|      0|        janet_mark(x);
16798|      0|    }
16799|  1.21k|    janet_vm.gc_mark_phase = 0;
16800|  1.21k|    janet_sweep();
16801|  1.21k|    janet_vm.next_collection = 0;
16802|  1.21k|    janet_free_all_scratch();
16803|  1.21k|}
janet_gcroot:
16808|  30.2k|void janet_gcroot(Janet root) {
16809|  30.2k|    size_t newcount = janet_vm.root_count + 1;
16810|  30.2k|    if (newcount > janet_vm.root_capacity) {
  ------------------
  |  Branch (16810:9): [True: 14.8k, False: 15.3k]
  ------------------
16811|  14.8k|        size_t newcap = 2 * newcount;
16812|  14.8k|        janet_vm.roots = janet_realloc(janet_vm.roots, sizeof(Janet) * newcap);
  ------------------
  |  | 2396|  14.8k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
16813|  14.8k|        if (NULL == janet_vm.roots) {
  ------------------
  |  Branch (16813:13): [True: 0, False: 14.8k]
  ------------------
16814|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
16815|      0|        }
16816|  14.8k|        janet_vm.root_capacity = newcap;
16817|  14.8k|    }
16818|  30.2k|    janet_vm.roots[janet_vm.root_count] = root;
16819|  30.2k|    janet_vm.root_count = newcount;
16820|  30.2k|}
janet_gcunroot:
16839|  14.4k|int janet_gcunroot(Janet root) {
16840|  14.4k|    Janet *vtop = janet_vm.roots + janet_vm.root_count;
16841|       |    /* Search from top to bottom as access is most likely LIFO */
16842|  50.8k|    for (Janet *v = janet_vm.roots; v < vtop; v++) {
  ------------------
  |  Branch (16842:37): [True: 50.8k, False: 0]
  ------------------
16843|  50.8k|        if (janet_gc_idequals(root, *v)) {
  ------------------
  |  Branch (16843:13): [True: 14.4k, False: 36.3k]
  ------------------
16844|  14.4k|            *v = janet_vm.roots[--janet_vm.root_count];
16845|  14.4k|            return 1;
16846|  14.4k|        }
16847|  50.8k|    }
16848|      0|    return 0;
16849|  14.4k|}
janet_clear_memory:
16867|  7.65k|void janet_clear_memory(void) {
16868|  7.65k|#ifdef JANET_EV
16869|  7.65k|    JanetKV *items = janet_vm.threaded_abstracts.data;
16870|  15.3k|    for (int32_t i = 0; i < janet_vm.threaded_abstracts.capacity; i++) {
  ------------------
  |  Branch (16870:25): [True: 7.72k, False: 7.65k]
  ------------------
16871|  7.72k|        if (janet_checktype(items[i].key, JANET_ABSTRACT)) {
  ------------------
  |  |  801|  7.72k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 32, False: 7.69k]
  |  |  |  Branch (801:6): [Folded, False: 7.72k]
  |  |  ------------------
  |  |  802|  7.72k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  7.72k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  7.72k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  7.72k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  7.72k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  7.72k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16872|     32|            void *abst = janet_unwrap_abstract(items[i].key);
  ------------------
  |  |  861|     32|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
16873|     32|            JanetAbstractHead *head = janet_abstract_head(abst);
  ------------------
  |  | 1887|     32|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
16874|     32|            if (head->type->gcperthread) {
  ------------------
  |  Branch (16874:17): [True: 0, False: 32]
  ------------------
16875|      0|                janet_assert(!head->type->gcperthread(head->data, head->size), "per-thread finalizer failed");
  ------------------
  |  |  386|      0|#define janet_assert(c, m) do { \
  |  |  387|      0|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  388|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
16876|      0|            }
16877|     32|            janet_abstract_decref_maybe_free(abst);
16878|     32|        }
16879|  7.72k|    }
16880|  7.65k|#endif
16881|  7.65k|    JanetGCObject *current = janet_vm.blocks;
16882|   122M|    while (NULL != current) {
  ------------------
  |  Branch (16882:12): [True: 122M, False: 7.65k]
  ------------------
16883|   122M|        janet_deinit_block(current);
16884|   122M|        JanetGCObject *next = current->data.next;
16885|   122M|        janet_free(current);
  ------------------
  |  | 2402|   122M|#define janet_free(X) free((X))
  ------------------
16886|   122M|        current = next;
16887|   122M|    }
16888|  7.65k|    janet_vm.blocks = NULL;
16889|  7.65k|    janet_free_all_scratch();
16890|  7.65k|    janet_free(janet_vm.scratch_mem);
  ------------------
  |  | 2402|  7.65k|#define janet_free(X) free((X))
  ------------------
16891|  7.65k|}
janet_gclock:
16894|   151k|int janet_gclock(void) {
16895|   151k|    return janet_vm.gc_suspend++;
16896|   151k|}
janet_gcunlock:
16897|   151k|void janet_gcunlock(int handle) {
16898|   151k|    janet_vm.gc_suspend = handle;
16899|   151k|}
janet_smalloc:
16905|  3.13M|void *janet_smalloc(size_t size) {
16906|  3.13M|    JanetScratch *s = janet_malloc(sizeof(JanetScratch) + size);
  ------------------
  |  | 2393|  3.13M|#define janet_malloc(X) malloc((X))
  ------------------
16907|  3.13M|    if (NULL == s) {
  ------------------
  |  Branch (16907:9): [True: 0, False: 3.13M]
  ------------------
16908|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
16909|      0|    }
16910|  3.13M|    s->finalize = NULL;
16911|  3.13M|    if (janet_vm.scratch_len == janet_vm.scratch_cap) {
  ------------------
  |  Branch (16911:9): [True: 19.5k, False: 3.11M]
  ------------------
16912|  19.5k|        size_t newcap = 2 * janet_vm.scratch_cap + 2;
16913|  19.5k|        JanetScratch **newmem = (JanetScratch **) janet_realloc(janet_vm.scratch_mem, newcap * sizeof(JanetScratch));
  ------------------
  |  | 2396|  19.5k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
16914|  19.5k|        if (NULL == newmem) {
  ------------------
  |  Branch (16914:13): [True: 0, False: 19.5k]
  ------------------
16915|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
16916|      0|        }
16917|  19.5k|        janet_vm.scratch_cap = newcap;
16918|  19.5k|        janet_vm.scratch_mem = newmem;
16919|  19.5k|    }
16920|  3.13M|    janet_vm.scratch_mem[janet_vm.scratch_len++] = s;
16921|  3.13M|    return (char *)(s->mem);
16922|  3.13M|}
janet_srealloc:
16934|  5.51M|void *janet_srealloc(void *mem, size_t size) {
16935|  5.51M|    if (NULL == mem) return janet_smalloc(size);
  ------------------
  |  Branch (16935:9): [True: 2.37M, False: 3.14M]
  ------------------
16936|  3.14M|    JanetScratch *s = janet_mem2scratch(mem);
16937|  3.14M|    if (janet_vm.scratch_len) {
  ------------------
  |  Branch (16937:9): [True: 3.14M, False: 18.4E]
  ------------------
16938|  5.54M|        for (size_t i = janet_vm.scratch_len - 1; ; i--) {
16939|  5.54M|            if (janet_vm.scratch_mem[i] == s) {
  ------------------
  |  Branch (16939:17): [True: 3.14M, False: 2.39M]
  ------------------
16940|  3.14M|                JanetScratch *news = janet_realloc(s, size + sizeof(JanetScratch));
  ------------------
  |  | 2396|  3.14M|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
16941|  3.14M|                if (NULL == news) {
  ------------------
  |  Branch (16941:21): [True: 0, False: 3.14M]
  ------------------
16942|      0|                    JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
16943|      0|                }
16944|  3.14M|                janet_vm.scratch_mem[i] = news;
16945|  3.14M|                return (char *)(news->mem);
16946|  3.14M|            }
16947|  2.39M|            if (i == 0) break;
  ------------------
  |  Branch (16947:17): [True: 0, False: 2.39M]
  ------------------
16948|  2.39M|        }
16949|  3.14M|    }
16950|  18.4E|    JANET_EXIT("invalid janet_srealloc");
  ------------------
  |  |  375|  18.4E|#define JANET_EXIT(m) do { \
  |  |  376|  18.4E|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  377|  18.4E|        __FILE__,\
  |  |  378|  18.4E|        __LINE__,\
  |  |  379|  18.4E|        (m));\
  |  |  380|  18.4E|    abort();\
  |  |  381|  18.4E|} while (0)
  |  |  ------------------
  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
16951|  18.4E|}
janet_sfree:
16958|  3.03M|void janet_sfree(void *mem) {
16959|  3.03M|    if (NULL == mem) return;
  ------------------
  |  Branch (16959:9): [True: 0, False: 3.03M]
  ------------------
16960|  3.03M|    JanetScratch *s = janet_mem2scratch(mem);
16961|  3.03M|    if (janet_vm.scratch_len) {
  ------------------
  |  Branch (16961:9): [True: 3.03M, False: 0]
  ------------------
16962|  5.04M|        for (size_t i = janet_vm.scratch_len - 1; ; i--) {
16963|  5.04M|            if (janet_vm.scratch_mem[i] == s) {
  ------------------
  |  Branch (16963:17): [True: 3.03M, False: 2.00M]
  ------------------
16964|  3.03M|                janet_vm.scratch_mem[i] = janet_vm.scratch_mem[--janet_vm.scratch_len];
16965|  3.03M|                free_one_scratch(s);
16966|  3.03M|                return;
16967|  3.03M|            }
16968|  2.00M|            if (i == 0) break;
  ------------------
  |  Branch (16968:17): [True: 0, False: 2.00M]
  ------------------
16969|  2.00M|        }
16970|  3.03M|    }
16971|  18.4E|    JANET_EXIT("invalid janet_sfree");
  ------------------
  |  |  375|  18.4E|#define JANET_EXIT(m) do { \
  |  |  376|  18.4E|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  377|  18.4E|        __FILE__,\
  |  |  378|  18.4E|        __LINE__,\
  |  |  379|  18.4E|        (m));\
  |  |  380|  18.4E|    abort();\
  |  |  381|  18.4E|} while (0)
  |  |  ------------------
  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
16972|  18.4E|}
janet_unwrap_s64:
17093|  25.0k|int64_t janet_unwrap_s64(Janet x) {
17094|  25.0k|    switch (janet_type(x)) {
  ------------------
  |  |  790|  25.0k|    (isnan((x).number) \
  |  |  791|  25.0k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  25.0k|        : JANET_NUMBER)
  ------------------
  |  Branch (17094:13): [True: 9.99k, False: 15.0k]
  ------------------
17095|     68|        default:
  ------------------
  |  Branch (17095:9): [True: 68, False: 24.9k]
  ------------------
17096|     68|            break;
17097|  15.0k|        case JANET_NUMBER : {
  ------------------
  |  Branch (17097:9): [True: 15.0k, False: 9.99k]
  ------------------
17098|  15.0k|            double d = janet_unwrap_number(x);
  ------------------
  |  |  834|  15.0k|#define janet_unwrap_number(x) ((x).number)
  ------------------
17099|  15.0k|            if (!janet_checkint64range(d)) break;
  ------------------
  |  |  955|  15.0k|#define janet_checkint64range(x) ((x) >= JANET_INTMIN_DOUBLE && (x) <= JANET_INTMAX_DOUBLE && (x) == (int64_t)(x))
  |  |  ------------------
  |  |  |  |  161|  30.1k|#define JANET_INTMIN_DOUBLE (-9007199254740992.0)
  |  |  ------------------
  |  |               #define janet_checkint64range(x) ((x) >= JANET_INTMIN_DOUBLE && (x) <= JANET_INTMAX_DOUBLE && (x) == (int64_t)(x))
  |  |  ------------------
  |  |  |  |  160|  30.1k|#define JANET_INTMAX_DOUBLE 9007199254740992.0
  |  |  ------------------
  |  |  |  Branch (955:35): [True: 15.0k, False: 0]
  |  |  |  Branch (955:65): [True: 15.0k, False: 2]
  |  |  |  Branch (955:95): [True: 15.0k, False: 0]
  |  |  ------------------
  ------------------
17100|  15.0k|            return (int64_t) d;
17101|  15.0k|        }
17102|     17|        case JANET_STRING: {
  ------------------
  |  Branch (17102:9): [True: 17, False: 25.0k]
  ------------------
17103|     17|            int64_t value;
17104|     17|            const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  858|     17|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
17105|     17|            if (janet_scan_int64(str, janet_string_length(str), &value))
  ------------------
  |  | 1803|     17|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|     17|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (17105:17): [True: 5, False: 12]
  ------------------
17106|      5|                return value;
17107|     12|            break;
17108|     17|        }
17109|  9.90k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (17109:9): [True: 9.90k, False: 15.1k]
  ------------------
17110|  9.90k|            void *abst = janet_unwrap_abstract(x);
  ------------------
  |  |  861|  9.90k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
17111|  9.90k|            if (janet_abstract_type(abst) == &janet_s64_type ||
  ------------------
  |  | 1889|  9.90k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|  9.90k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (17111:17): [True: 9.88k, False: 16]
  ------------------
17112|     16|                    (janet_abstract_type(abst) == &janet_u64_type))
  ------------------
  |  | 1889|     16|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|     16|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (17112:21): [True: 15, False: 1]
  ------------------
17113|  9.90k|                return *(int64_t *)abst;
17114|      1|            break;
17115|  9.90k|        }
17116|  25.0k|    }
17117|     83|    janet_panicf("can not convert %t %q to 64 bit signed integer", x, x);
17118|      0|    return 0;
17119|  25.0k|}
janet_unwrap_u64:
17121|  7.64k|uint64_t janet_unwrap_u64(Janet x) {
17122|  7.64k|    switch (janet_type(x)) {
  ------------------
  |  |  790|  7.64k|    (isnan((x).number) \
  |  |  791|  7.64k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  7.64k|        : JANET_NUMBER)
  ------------------
  |  Branch (17122:13): [True: 4.00k, False: 3.64k]
  ------------------
17123|     63|        default:
  ------------------
  |  Branch (17123:9): [True: 63, False: 7.58k]
  ------------------
17124|     63|            break;
17125|  3.64k|        case JANET_NUMBER : {
  ------------------
  |  Branch (17125:9): [True: 3.64k, False: 4.00k]
  ------------------
17126|  3.64k|            double d = janet_unwrap_number(x);
  ------------------
  |  |  834|  3.64k|#define janet_unwrap_number(x) ((x).number)
  ------------------
17127|  3.64k|            if (!janet_checkuint64range(d)) break;
  ------------------
  |  |  956|  3.64k|#define janet_checkuint64range(x) ((x) >= 0 && (x) <= JANET_INTMAX_DOUBLE && (x) == (uint64_t)(x))
  |  |  ------------------
  |  |  |  |  160|  7.27k|#define JANET_INTMAX_DOUBLE 9007199254740992.0
  |  |  ------------------
  |  |  |  Branch (956:36): [True: 3.63k, False: 8]
  |  |  |  Branch (956:48): [True: 3.63k, False: 2]
  |  |  |  Branch (956:78): [True: 3.63k, False: 0]
  |  |  ------------------
  ------------------
17128|  3.63k|            return (uint64_t) d;
17129|  3.64k|        }
17130|     12|        case JANET_STRING: {
  ------------------
  |  Branch (17130:9): [True: 12, False: 7.63k]
  ------------------
17131|     12|            uint64_t value;
17132|     12|            const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  858|     12|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
17133|     12|            if (janet_scan_uint64(str, janet_string_length(str), &value))
  ------------------
  |  | 1803|     12|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|     12|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (17133:17): [True: 5, False: 7]
  ------------------
17134|      5|                return value;
17135|      7|            break;
17136|     12|        }
17137|  3.92k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (17137:9): [True: 3.92k, False: 3.71k]
  ------------------
17138|  3.92k|            void *abst = janet_unwrap_abstract(x);
  ------------------
  |  |  861|  3.92k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
17139|  3.92k|            if (janet_abstract_type(abst) == &janet_s64_type ||
  ------------------
  |  | 1889|  3.92k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|  3.92k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (17139:17): [True: 47, False: 3.88k]
  ------------------
17140|  3.88k|                    (janet_abstract_type(abst) == &janet_u64_type))
  ------------------
  |  | 1889|  3.88k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|  3.88k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (17140:21): [True: 3.88k, False: 1]
  ------------------
17141|  3.92k|                return *(uint64_t *)abst;
17142|      1|            break;
17143|  3.92k|        }
17144|  7.64k|    }
17145|     81|    janet_panicf("can not convert %t %q to a 64 bit unsigned integer", x, x);
17146|      0|    return 0;
17147|  7.64k|}
janet_is_int:
17149|      1|JanetIntType janet_is_int(Janet x) {
17150|      1|    if (!janet_checktype(x, JANET_ABSTRACT)) return JANET_INT_NONE;
  ------------------
  |  |  801|      1|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 1]
  |  |  ------------------
  |  |  802|      1|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      1|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      1|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      1|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (17150:9): [True: 0, False: 1]
  ------------------
17151|      1|    const JanetAbstractType *at = janet_abstract_type(janet_unwrap_abstract(x));
  ------------------
  |  | 1889|      1|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|      1|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
17152|      1|    return (at == &janet_s64_type) ? JANET_INT_S64 :
  ------------------
  |  Branch (17152:12): [True: 1, False: 0]
  ------------------
17153|      1|           ((at == &janet_u64_type) ? JANET_INT_U64 :
  ------------------
  |  Branch (17153:13): [True: 0, False: 0]
  ------------------
17154|      0|            JANET_INT_NONE);
17155|      1|}
janet_wrap_s64:
17157|  4.15k|Janet janet_wrap_s64(int64_t x) {
17158|  4.15k|    int64_t *box = janet_abstract(&janet_s64_type, sizeof(int64_t));
17159|  4.15k|    *box = (int64_t)x;
17160|  4.15k|    return janet_wrap_abstract(box);
  ------------------
  |  |  846|  4.15k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|  4.15k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  4.15k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  4.15k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17161|  4.15k|}
janet_wrap_u64:
17163|  2.54k|Janet janet_wrap_u64(uint64_t x) {
17164|  2.54k|    uint64_t *box = janet_abstract(&janet_u64_type, sizeof(uint64_t));
17165|  2.54k|    *box = (uint64_t)x;
17166|  2.54k|    return janet_wrap_abstract(box);
  ------------------
  |  |  846|  2.54k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|  2.54k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  2.54k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  2.54k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17167|  2.54k|}
cfun_it_s64_new:
17171|      5|              "Create a boxed signed 64 bit integer from a string value or a number.") {
17172|      5|    janet_fixarity(argc, 1);
17173|      5|    return janet_wrap_s64(janet_unwrap_s64(argv[0]));
17174|      5|}
cfun_it_u64_new:
17178|      2|              "Create a boxed unsigned 64 bit integer from a string value or a number.") {
17179|      2|    janet_fixarity(argc, 1);
17180|      2|    return janet_wrap_u64(janet_unwrap_u64(argv[0]));
17181|      2|}
cfun_to_bytes:
17222|      1|              "- `:be`: big-endian, most significant byte first\n") {
17223|      1|    janet_arity(argc, 1, 3);
17224|      1|    if (janet_is_int(argv[0]) == JANET_INT_NONE) {
  ------------------
  |  Branch (17224:9): [True: 0, False: 1]
  ------------------
17225|      0|        janet_panicf("int/to-bytes: expected an int/s64 or int/u64, got %q", argv[0]);
17226|      0|    }
17227|       |
17228|      1|    int reverse = 0;
17229|      1|    if (argc > 1 && !janet_checktype(argv[1], JANET_NIL)) {
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (17229:9): [True: 0, False: 1]
  |  Branch (17229:21): [True: 0, False: 0]
  ------------------
17230|      0|        JanetKeyword endianness_kw = janet_getkeyword(argv, 1);
17231|      0|        if (!janet_cstrcmp(endianness_kw, "le")) {
  ------------------
  |  Branch (17231:13): [True: 0, False: 0]
  ------------------
17232|       |#if JANET_BIG_ENDIAN
17233|       |            reverse = 1;
17234|       |#endif
17235|      0|        } else if (!janet_cstrcmp(endianness_kw, "be")) {
  ------------------
  |  Branch (17235:20): [True: 0, False: 0]
  ------------------
17236|      0|#if JANET_LITTLE_ENDIAN
17237|      0|            reverse = 1;
17238|      0|#endif
17239|      0|        } else {
17240|      0|            janet_panicf("int/to-bytes: expected endianness :le, :be or nil, got %v", argv[1]);
17241|      0|        }
17242|      0|    }
17243|       |
17244|      1|    JanetBuffer *buffer = NULL;
17245|      1|    if (argc > 2 && !janet_checktype(argv[2], JANET_NIL)) {
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (17245:9): [True: 0, False: 1]
  |  Branch (17245:21): [True: 0, False: 0]
  ------------------
17246|      0|        if (!janet_checktype(argv[2], JANET_BUFFER)) {
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (17246:13): [True: 0, False: 0]
  ------------------
17247|      0|            janet_panicf("int/to-bytes: expected buffer or nil, got %q", argv[2]);
17248|      0|        }
17249|       |
17250|      0|        buffer = janet_unwrap_buffer(argv[2]);
  ------------------
  |  |  857|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
17251|      0|        janet_buffer_extra(buffer, 8);
17252|      1|    } else {
17253|      1|        buffer = janet_buffer(8);
17254|      1|    }
17255|       |
17256|      1|    uint8_t *bytes = janet_unwrap_abstract(argv[0]);
  ------------------
  |  |  861|      1|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
17257|      1|    if (reverse) {
  ------------------
  |  Branch (17257:9): [True: 0, False: 1]
  ------------------
17258|      0|        for (int i = 0; i < 8; ++i) {
  ------------------
  |  Branch (17258:25): [True: 0, False: 0]
  ------------------
17259|      0|            buffer->data[buffer->count + 7 - i] = bytes[i];
17260|      0|        }
17261|      1|    } else {
17262|      1|        memcpy(buffer->data + buffer->count, bytes, 8);
17263|      1|    }
17264|      1|    buffer->count += 8;
17265|       |
17266|      1|    return janet_wrap_buffer(buffer);
  ------------------
  |  |  842|      1|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  820|      1|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17267|      1|}
janet_lib_inttypes:
17646|  7.16k|void janet_lib_inttypes(JanetTable *env) {
17647|  7.16k|    JanetRegExt it_cfuns[] = {
17648|  7.16k|        JANET_CORE_REG("int/s64", cfun_it_s64_new),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17649|  7.16k|        JANET_CORE_REG("int/u64", cfun_it_u64_new),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17650|  7.16k|        JANET_CORE_REG("int/to-number", cfun_to_number),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17651|  7.16k|        JANET_CORE_REG("int/to-bytes", cfun_to_bytes),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
17652|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
17653|  7.16k|    };
17654|       |    janet_core_cfuns_ext(env, NULL, it_cfuns);
17655|  7.16k|    janet_register_abstract_type(&janet_s64_type);
17656|  7.16k|    janet_register_abstract_type(&janet_u64_type);
17657|  7.16k|}
cfun_io_temp:
17794|      3|              "Raises an error on failure.") {
17795|      3|    janet_sandbox_assert(JANET_SANDBOX_FS_TEMP);
  ------------------
  |  | 2023|      3|#define JANET_SANDBOX_FS_TEMP 1024
  ------------------
17796|      3|    (void)argv;
17797|      3|    janet_fixarity(argc, 0);
17798|       |    // XXX use mkostemp when we can to avoid CLOEXEC race.
17799|      3|    FILE *tmp = tmpfile();
17800|      3|    if (!tmp)
  ------------------
  |  Branch (17800:9): [True: 0, False: 3]
  ------------------
17801|      0|        janet_panicf("unable to create temporary file - %s", janet_strerror(errno));
17802|      3|    return janet_makefile(tmp, JANET_FILE_WRITE | JANET_FILE_READ | JANET_FILE_BINARY);
  ------------------
  |  | 2261|      3|#define JANET_FILE_WRITE 1
  ------------------
                  return janet_makefile(tmp, JANET_FILE_WRITE | JANET_FILE_READ | JANET_FILE_BINARY);
  ------------------
  |  | 2262|      3|#define JANET_FILE_READ 2
  ------------------
                  return janet_makefile(tmp, JANET_FILE_WRITE | JANET_FILE_READ | JANET_FILE_BINARY);
  ------------------
  |  | 2267|      3|#define JANET_FILE_BINARY 64
  ------------------
17803|      3|}
cfun_io_fopen:
17819|     40|              "See fopen (<stdio.h>, C99) for further details.") {
17820|     40|    janet_arity(argc, 1, 3);
17821|     40|    const uint8_t *fname = janet_getstring(argv, 0);
17822|     40|    const uint8_t *fmode;
17823|     40|    int32_t flags;
17824|     40|    if (argc == 2) {
  ------------------
  |  Branch (17824:9): [True: 6, False: 34]
  ------------------
17825|      6|        fmode = janet_getkeyword(argv, 1);
17826|      6|        flags = checkflags(fmode);
17827|     34|    } else {
17828|     34|        fmode = (const uint8_t *)"r";
17829|     34|        janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2019|     34|#define JANET_SANDBOX_FS_READ 64
  ------------------
17830|     34|        flags = JANET_FILE_READ;
  ------------------
  |  | 2262|     34|#define JANET_FILE_READ 2
  ------------------
17831|     34|    }
17832|     40|    FILE *f = fopen((const char *)fname, (const char *)fmode);
17833|     40|    size_t bufsize = BUFSIZ;
17834|     40|    if (f != NULL) {
  ------------------
  |  Branch (17834:9): [True: 4, False: 36]
  ------------------
17835|      4|#if !(defined(JANET_WINDOWS) || defined(JANET_PLAN9))
17836|      4|        struct stat st;
17837|      4|        fstat(fileno(f), &st);
17838|      4|        if (S_ISDIR(st.st_mode)) {
  ------------------
  |  Branch (17838:13): [True: 1, False: 3]
  ------------------
17839|      1|            fclose(f);
17840|      1|            janet_panicf("cannot open directory: %s", fname);
17841|      1|        }
17842|      3|#endif
17843|      3|        bufsize = janet_optsize(argv, argc, 2, BUFSIZ);
17844|      3|        if (bufsize != BUFSIZ) {
  ------------------
  |  Branch (17844:13): [True: 0, False: 3]
  ------------------
17845|      0|            int result = setvbuf(f, NULL, bufsize ? _IOFBF : _IONBF, bufsize);
  ------------------
  |  Branch (17845:43): [True: 0, False: 0]
  ------------------
17846|      0|            if (result) {
  ------------------
  |  Branch (17846:17): [True: 0, False: 0]
  ------------------
17847|      0|                janet_panic("failed to set buffer size for file");
17848|      0|            }
17849|      0|        }
17850|      3|    }
17851|     39|    return f ? janet_wrap_abstract(makef(f, flags, bufsize))
  ------------------
  |  |  846|      2|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|      2|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (17851:12): [True: 2, False: 37]
  ------------------
17852|     39|           : (flags & JANET_FILE_NONIL) ? (janet_panicf("failed to open file %s: %s", fname, janet_strerror(errno)), janet_wrap_nil())
  ------------------
  |  | 2269|     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())
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (17852:14): [True: 0, False: 37]
  ------------------
17853|     37|           : janet_wrap_nil();
  ------------------
  |  |  826|     37|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|     37|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     37|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     37|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17854|     39|}
cfun_io_fread:
17878|      2|              "* n (integer) - read up to n bytes from the file") {
17879|      2|    janet_arity(argc, 2, 3);
17880|      2|    JanetFile *iof = janet_getabstract(argv, 0, &janet_file_type);
17881|      2|    if (iof->flags & JANET_FILE_CLOSED) janet_panic("file is closed");
  ------------------
  |  | 2266|      2|#define JANET_FILE_CLOSED 32
  ------------------
  |  Branch (17881:9): [True: 0, False: 2]
  ------------------
17882|      2|    JanetBuffer *buffer;
17883|      2|    if (argc == 2) {
  ------------------
  |  Branch (17883:9): [True: 0, False: 2]
  ------------------
17884|      0|        buffer = janet_buffer(0);
17885|      2|    } else {
17886|      2|        buffer = janet_getbuffer(argv, 2);
17887|      2|    }
17888|      2|    int32_t bufstart = buffer->count;
17889|      2|    if (janet_checktype(argv[1], JANET_KEYWORD)) {
  ------------------
  |  |  801|      2|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 2]
  |  |  |  Branch (801:6): [Folded, False: 2]
  |  |  ------------------
  |  |  802|      2|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      2|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      2|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      2|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17890|      0|        const uint8_t *sym = janet_unwrap_keyword(argv[1]);
  ------------------
  |  |  860|      0|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
17891|      0|        if (!janet_cstrcmp(sym, "all")) {
  ------------------
  |  Branch (17891:13): [True: 0, False: 0]
  ------------------
17892|      0|            int32_t sizeBefore;
17893|      0|            do {
17894|      0|                sizeBefore = buffer->count;
17895|      0|                read_chunk(iof, buffer, 4096);
17896|      0|            } while (sizeBefore < buffer->count);
  ------------------
  |  Branch (17896:22): [True: 0, False: 0]
  ------------------
17897|       |            /* Never return nil for :all */
17898|      0|            return janet_wrap_buffer(buffer);
  ------------------
  |  |  842|      0|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17899|      0|        } else if (!janet_cstrcmp(sym, "line")) {
  ------------------
  |  Branch (17899:20): [True: 0, False: 0]
  ------------------
17900|      0|            for (;;) {
17901|      0|                int x = fgetc(iof->file);
17902|      0|                if (x != EOF) janet_buffer_push_u8(buffer, (uint8_t)x);
  ------------------
  |  Branch (17902:21): [True: 0, False: 0]
  ------------------
17903|      0|                if (x == EOF || x == '\n') break;
  ------------------
  |  Branch (17903:21): [True: 0, False: 0]
  |  Branch (17903:33): [True: 0, False: 0]
  ------------------
17904|      0|            }
17905|      0|        } else {
17906|      0|            janet_panicf("expected one of :all, :line, got %v", argv[1]);
17907|      0|        }
17908|      2|    } else {
17909|      2|        int32_t len = janet_getinteger(argv, 1);
17910|      2|        if (len < 0) janet_panic("expected positive integer");
  ------------------
  |  Branch (17910:13): [True: 0, False: 2]
  ------------------
17911|      2|        read_chunk(iof, buffer, len);
17912|      2|    }
17913|      2|    if (bufstart == buffer->count) return janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (17913:9): [True: 0, False: 2]
  ------------------
17914|      2|    return janet_wrap_buffer(buffer);
  ------------------
  |  |  842|      2|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  820|      2|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17915|      2|}
janet_file_close:
17968|  22.5k|int janet_file_close(JanetFile *file) {
17969|  22.5k|    int ret = 0;
17970|  22.5k|    if (!(file->flags & (JANET_FILE_NOT_CLOSEABLE | JANET_FILE_CLOSED))) {
  ------------------
  |  | 2265|  22.5k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
                  if (!(file->flags & (JANET_FILE_NOT_CLOSEABLE | JANET_FILE_CLOSED))) {
  ------------------
  |  | 2266|  22.5k|#define JANET_FILE_CLOSED 32
  ------------------
  |  Branch (17970:9): [True: 3, False: 22.5k]
  ------------------
17971|      3|        ret = fclose(file->file);
17972|      3|        file->flags |= JANET_FILE_CLOSED;
  ------------------
  |  | 2266|      3|#define JANET_FILE_CLOSED 32
  ------------------
17973|      3|        file->file = NULL; /* NULL dereference is easier to debug then other problems */
17974|      3|        return ret;
17975|      3|    }
17976|  22.5k|    return 0;
17977|  22.5k|}
cfun_io_fseek:
18016|      2|              "number to handle large files of more than 4GB. Returns the file handle.") {
18017|      2|    janet_arity(argc, 2, 3);
18018|      2|    JanetFile *iof = janet_getabstract(argv, 0, &janet_file_type);
18019|      2|    if (iof->flags & JANET_FILE_CLOSED)
  ------------------
  |  | 2266|      2|#define JANET_FILE_CLOSED 32
  ------------------
  |  Branch (18019:9): [True: 0, False: 2]
  ------------------
18020|      0|        janet_panic("file is closed");
18021|      2|    int64_t offset = 0;
18022|      2|    int whence = SEEK_CUR;
18023|      2|    if (argc >= 2) {
  ------------------
  |  Branch (18023:9): [True: 0, False: 2]
  ------------------
18024|      0|        const uint8_t *whence_sym = janet_getkeyword(argv, 1);
18025|      0|        if (!janet_cstrcmp(whence_sym, "cur")) {
  ------------------
  |  Branch (18025:13): [True: 0, False: 0]
  ------------------
18026|      0|            whence = SEEK_CUR;
18027|      0|        } else if (!janet_cstrcmp(whence_sym, "set")) {
  ------------------
  |  Branch (18027:20): [True: 0, False: 0]
  ------------------
18028|      0|            whence = SEEK_SET;
18029|      0|        } else if (!janet_cstrcmp(whence_sym, "end")) {
  ------------------
  |  Branch (18029:20): [True: 0, False: 0]
  ------------------
18030|      0|            whence = SEEK_END;
18031|      0|        } else {
18032|      0|            janet_panicf("expected one of :cur, :set, :end, got %v", argv[1]);
18033|      0|        }
18034|      0|        if (argc == 3) {
  ------------------
  |  Branch (18034:13): [True: 0, False: 0]
  ------------------
18035|      0|            offset = (int64_t) janet_getinteger64(argv, 2);
18036|      0|        }
18037|      0|    }
18038|      2|    if (fseek(iof->file, offset, whence)) janet_panic("error seeking file");
  ------------------
  |  Branch (18038:9): [True: 0, False: 2]
  ------------------
18039|      2|    return argv[0];
18040|      2|}
janet_dynfile:
18140|   204k|FILE *janet_dynfile(const char *name, FILE *def) {
18141|   204k|    Janet x = janet_dyn(name);
18142|   204k|    if (!janet_checktype(x, JANET_ABSTRACT)) return def;
  ------------------
  |  |  801|   204k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 204k]
  |  |  ------------------
  |  |  802|   204k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   204k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   204k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   204k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   204k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   204k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (18142:9): [True: 204k, False: 0]
  ------------------
18143|      0|    void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  861|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18144|      0|    if (janet_abstract_type(abstract) != &janet_file_type) return def;
  ------------------
  |  | 1889|      0|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (18144:9): [True: 0, False: 0]
  ------------------
18145|      0|    JanetFile *iofile = abstract;
18146|      0|    return iofile->file;
18147|      0|}
cfun_io_print:
18230|  1.71k|              "a buffer. Returns nil.") {
18231|       |    return cfun_io_print_impl(argc, argv, 1, "out", stdout);
18232|  1.71k|}
cfun_io_prin:
18236|     17|              "Same as `print`, but does not add trailing newline.") {
18237|       |    return cfun_io_print_impl(argc, argv, 0, "out", stdout);
18238|     17|}
cfun_io_eprin:
18248|      6|              "Same as `prin`, but uses `(dyn :err stderr)` instead of `(dyn :out stdout)`.") {
18249|       |    return cfun_io_print_impl(argc, argv, 0, "err", stderr);
18250|      6|}
cfun_io_xprint:
18256|      2|              "to is the first argument, and is otherwise the same as `print`. Returns nil.") {
18257|      2|    janet_arity(argc, 1, -1);
18258|       |    return cfun_io_print_impl_x(argc, argv, 1, NULL, 1, argv[0]);
18259|      2|}
cfun_io_xprin:
18264|     23|              "to is the first argument, and is otherwise the same as `prin`. Returns nil.") {
18265|     23|    janet_arity(argc, 1, -1);
18266|       |    return cfun_io_print_impl_x(argc, argv, 0, NULL, 1, argv[0]);
18267|     23|}
cfun_io_printf:
18336|      2|              "Prints output formatted as if with `(string/format fmt ;xs)` to `(dyn :out stdout)` with a trailing newline.") {
18337|       |    return cfun_io_printf_impl(argc, argv, 1, "out", stdout);
18338|      2|}
cfun_io_prinf:
18342|     14|              "Like `printf` but with no trailing newline.") {
18343|       |    return cfun_io_printf_impl(argc, argv, 0, "out", stdout);
18344|     14|}
cfun_io_eprinf:
18354|    159|              "Like `eprintf` but with no trailing newline.") {
18355|       |    return cfun_io_printf_impl(argc, argv, 0, "err", stderr);
18356|    159|}
cfun_io_xprinf:
18367|      3|              "Like `prinf` but prints to an explicit file or value `to`. Returns nil.") {
18368|      3|    janet_arity(argc, 2, -1);
18369|       |    return cfun_io_printf_impl_x(argc, argv, 0, NULL, 1, argv[0]);
18370|      3|}
cfun_io_flush:
18392|      3|              "Flush `(dyn :out stdout)` if it is a file, otherwise do nothing.") {
18393|      3|    janet_fixarity(argc, 0);
18394|      3|    (void) argv;
18395|      3|    janet_flusher("out", stdout);
18396|      3|    return janet_wrap_nil();
  ------------------
  |  |  826|      3|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      3|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18397|      3|}
janet_dynprintf:
18408|   177k|void janet_dynprintf(const char *name, FILE *dflt_file, const char *format, ...) {
18409|   177k|    va_list args;
18410|   177k|    va_start(args, format);
18411|   177k|    JanetType xtype;
18412|   177k|    Janet x;
18413|   177k|    if (!name || name[0] == '\0') { /* Allow NULL or empty string to just use dflt_file directly */
  ------------------
  |  Branch (18413:9): [True: 0, False: 177k]
  |  Branch (18413:18): [True: 0, False: 177k]
  ------------------
18414|      0|        x = janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18415|      0|        xtype = JANET_NIL;
18416|   177k|    } else {
18417|   177k|        x = janet_dyn(name);
18418|   177k|        xtype = janet_type(x);
  ------------------
  |  |  790|   177k|    (isnan((x).number) \
  |  |  791|   177k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|   177k|        : JANET_NUMBER)
  ------------------
  |  Branch (18418:17): [True: 177k, False: 0]
  ------------------
18419|   177k|    }
18420|   177k|    switch (xtype) {
18421|      0|        default:
  ------------------
  |  Branch (18421:9): [True: 0, False: 177k]
  ------------------
18422|       |            /* Other values simply do nothing */
18423|      0|            break;
18424|   177k|        case JANET_NIL:
  ------------------
  |  Branch (18424:9): [True: 177k, False: 0]
  ------------------
18425|   177k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (18425:9): [True: 0, False: 177k]
  ------------------
18426|   177k|            FILE *f = dflt_file;
18427|   177k|            JanetBuffer buffer;
18428|   177k|            int32_t len = 0;
18429|  1.41M|            while (format[len]) len++;
  ------------------
  |  Branch (18429:20): [True: 1.23M, False: 177k]
  ------------------
18430|   177k|            janet_buffer_init(&buffer, len);
18431|   177k|            janet_formatbv(&buffer, format, args);
18432|   177k|            if (xtype == JANET_ABSTRACT) {
  ------------------
  |  Branch (18432:17): [True: 0, False: 177k]
  ------------------
18433|      0|                void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  861|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18434|      0|                if (janet_abstract_type(abstract) != &janet_file_type)
  ------------------
  |  | 1889|      0|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (18434:21): [True: 0, False: 0]
  ------------------
18435|      0|                    break;
18436|      0|                JanetFile *iofile = abstract;
18437|      0|                io_assert_writeable(iofile);
18438|      0|                f = iofile->file;
18439|      0|            }
18440|   177k|            fwrite(buffer.data, buffer.count, 1, f);
18441|   177k|            janet_buffer_deinit(&buffer);
18442|   177k|            break;
18443|   177k|        }
18444|      0|        case JANET_FUNCTION: {
  ------------------
  |  Branch (18444:9): [True: 0, False: 177k]
  ------------------
18445|      0|            JanetFunction *fun = janet_unwrap_function(x);
  ------------------
  |  |  863|      0|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
18446|      0|            int32_t len = 0;
18447|      0|            while (format[len]) len++;
  ------------------
  |  Branch (18447:20): [True: 0, False: 0]
  ------------------
18448|      0|            JanetBuffer *buf = janet_buffer(len);
18449|      0|            janet_formatbv(buf, format, args);
18450|      0|            Janet args[1] = { janet_wrap_buffer(buf) };
  ------------------
  |  |  842|      0|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18451|      0|            janet_call(fun, 1, args);
18452|      0|            break;
18453|   177k|        }
18454|      0|        case JANET_BUFFER:
  ------------------
  |  Branch (18454:9): [True: 0, False: 177k]
  ------------------
18455|      0|            janet_formatbv(janet_unwrap_buffer(x), format, args);
  ------------------
  |  |  857|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
18456|      0|            break;
18457|   177k|    }
18458|   177k|    va_end(args);
18459|   177k|    return;
18460|   177k|}
janet_getfile:
18468|      1|FILE *janet_getfile(const Janet *argv, int32_t n, int32_t *flags) {
18469|      1|    JanetFile *iof = janet_getabstract(argv, n, &janet_file_type);
18470|      1|    if (NULL != flags) *flags = iof->flags;
  ------------------
  |  Branch (18470:9): [True: 0, False: 1]
  ------------------
18471|      1|    return iof->file;
18472|      1|}
janet_makefile:
18478|  21.4k|Janet janet_makefile(FILE *f, int32_t flags) {
18479|  21.4k|    return janet_wrap_abstract(makef(f, flags, BUFSIZ));
  ------------------
  |  |  846|  21.4k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|  21.4k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  21.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  21.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18480|  21.4k|}
janet_lib_io:
18493|  7.16k|void janet_lib_io(JanetTable *env) {
18494|  7.16k|    JanetRegExt io_cfuns[] = {
18495|  7.16k|        JANET_CORE_REG("print", cfun_io_print),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18496|  7.16k|        JANET_CORE_REG("prin", cfun_io_prin),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18497|  7.16k|        JANET_CORE_REG("printf", cfun_io_printf),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18498|  7.16k|        JANET_CORE_REG("prinf", cfun_io_prinf),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18499|  7.16k|        JANET_CORE_REG("eprin", cfun_io_eprin),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18500|  7.16k|        JANET_CORE_REG("eprint", cfun_io_eprint),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18501|  7.16k|        JANET_CORE_REG("eprintf", cfun_io_eprintf),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18502|  7.16k|        JANET_CORE_REG("eprinf", cfun_io_eprinf),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18503|  7.16k|        JANET_CORE_REG("xprint", cfun_io_xprint),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18504|  7.16k|        JANET_CORE_REG("xprin", cfun_io_xprin),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18505|  7.16k|        JANET_CORE_REG("xprintf", cfun_io_xprintf),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18506|  7.16k|        JANET_CORE_REG("xprinf", cfun_io_xprinf),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18507|  7.16k|        JANET_CORE_REG("flush", cfun_io_flush),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18508|  7.16k|        JANET_CORE_REG("eflush", cfun_io_eflush),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18509|  7.16k|        JANET_CORE_REG("file/temp", cfun_io_temp),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18510|  7.16k|        JANET_CORE_REG("file/open", cfun_io_fopen),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18511|  7.16k|        JANET_CORE_REG("file/close", cfun_io_fclose),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18512|  7.16k|        JANET_CORE_REG("file/read", cfun_io_fread),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18513|  7.16k|        JANET_CORE_REG("file/write", cfun_io_fwrite),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18514|  7.16k|        JANET_CORE_REG("file/flush", cfun_io_fflush),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18515|  7.16k|        JANET_CORE_REG("file/seek", cfun_io_fseek),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18516|  7.16k|        JANET_CORE_REG("file/tell", cfun_io_ftell),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
18517|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
18518|  7.16k|    };
18519|  7.16k|    janet_core_cfuns_ext(env, NULL, io_cfuns);
18520|  7.16k|    janet_register_abstract_type(&janet_file_type);
18521|  7.16k|    int default_flags = JANET_FILE_NOT_CLOSEABLE | JANET_FILE_SERIALIZABLE;
  ------------------
  |  | 2265|  7.16k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
                  int default_flags = JANET_FILE_NOT_CLOSEABLE | JANET_FILE_SERIALIZABLE;
  ------------------
  |  | 2268|  7.16k|#define JANET_FILE_SERIALIZABLE 128
  ------------------
18522|       |    /* stdout */
18523|  7.16k|    JANET_CORE_DEF(env, "stdout",
  ------------------
  |  |  478|  7.16k|#define JANET_CORE_DEF(ENV, NAME, X, DOC) janet_core_def_sm(ENV, NAME, X, DOC, NULL, 0)
  ------------------
18524|  7.16k|                   janet_makefile(stdout, JANET_FILE_APPEND | default_flags),
18525|  7.16k|                   "The standard output file.");
18526|       |    /* stderr */
18527|  7.16k|    JANET_CORE_DEF(env, "stderr",
  ------------------
  |  |  478|  7.16k|#define JANET_CORE_DEF(ENV, NAME, X, DOC) janet_core_def_sm(ENV, NAME, X, DOC, NULL, 0)
  ------------------
18528|  7.16k|                   janet_makefile(stderr, JANET_FILE_APPEND | default_flags),
18529|  7.16k|                   "The standard error file.");
18530|       |    /* stdin */
18531|  7.16k|    JANET_CORE_DEF(env, "stdin",
  ------------------
  |  |  478|  7.16k|#define JANET_CORE_DEF(ENV, NAME, X, DOC) janet_core_def_sm(ENV, NAME, X, DOC, NULL, 0)
  ------------------
18532|  7.16k|                   janet_makefile(stdin, JANET_FILE_READ | default_flags),
18533|  7.16k|                   "The standard input file.");
18534|       |
18535|  7.16k|}
janet_marshal_size:
18917|  1.02k|void janet_marshal_size(JanetMarshalContext *ctx, size_t value) {
18918|  1.02k|    janet_marshal_int64(ctx, (int64_t) value);
18919|  1.02k|}
janet_marshal_int64:
18921|  1.04k|void janet_marshal_int64(JanetMarshalContext *ctx, int64_t value) {
18922|  1.04k|    MarshalState *st = (MarshalState *)(ctx->m_state);
18923|  1.04k|    push64(st, (uint64_t) value);
18924|  1.04k|}
janet_marshal_int:
18926|  2.05k|void janet_marshal_int(JanetMarshalContext *ctx, int32_t value) {
18927|  2.05k|    MarshalState *st = (MarshalState *)(ctx->m_state);
18928|  2.05k|    pushint(st, value);
18929|  2.05k|}
janet_marshal_abstract:
18971|  1.04k|void janet_marshal_abstract(JanetMarshalContext *ctx, void *abstract) {
18972|  1.04k|    MarshalState *st = (MarshalState *)(ctx->m_state);
18973|  1.04k|    Janet x = janet_wrap_abstract(abstract);
  ------------------
  |  |  846|  1.04k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|  1.04k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18974|  1.04k|    MARK_SEEN();
  ------------------
  |  |18966|  1.04k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18966:14): [True: 1.04k, False: 0]
  |  |  ------------------
  |  |18967|  1.04k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  958|  1.04k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|  1.04k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18968|  1.04k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18968:16): [Folded, False: 1.04k]
  |  |  ------------------
  ------------------
18975|  1.04k|}
janet_marshal_flags:
18977|  1.02k|int janet_marshal_flags(JanetMarshalContext *ctx) {
18978|  1.02k|    return ctx->flags;
18979|  1.02k|}
janet_marshal:
19237|  16.1k|    int flags) {
19238|  16.1k|    MarshalState st;
19239|  16.1k|    st.buf = buf;
19240|  16.1k|    st.nextid = 0;
19241|  16.1k|    st.seen_defs = NULL;
19242|  16.1k|    st.seen_envs = NULL;
19243|  16.1k|    st.rreg = rreg;
19244|  16.1k|    st.maybe_cycles = !(flags & JANET_MARSHAL_NO_CYCLES);
  ------------------
  |  | 1902|  16.1k|#define JANET_MARSHAL_NO_CYCLES 0x40000
  ------------------
19245|  16.1k|    janet_table_init(&st.seen, 0);
19246|  16.1k|    marshal_one(&st, x, flags);
19247|  16.1k|    janet_table_deinit(&st.seen);
19248|  16.1k|    janet_v_free(st.seen_envs);
  ------------------
  |  |  705|  16.1k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  713|    342|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (705:34): [True: 342, False: 15.7k]
  |  |  ------------------
  ------------------
19249|       |    janet_v_free(st.seen_defs);
  ------------------
  |  |  705|  16.1k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  713|  5.01k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (705:34): [True: 5.01k, False: 11.1k]
  |  |  ------------------
  ------------------
19250|  16.1k|}
janet_unmarshal_int:
19776|  2.05k|int32_t janet_unmarshal_int(JanetMarshalContext *ctx) {
19777|  2.05k|    UnmarshalState *st = (UnmarshalState *)(ctx->u_state);
19778|  2.05k|    return readint(st, &(ctx->data));
19779|  2.05k|}
janet_unmarshal_size:
19781|  1.02k|size_t janet_unmarshal_size(JanetMarshalContext *ctx) {
19782|  1.02k|    return (size_t) janet_unmarshal_int64(ctx);
19783|  1.02k|}
janet_unmarshal_int64:
19785|  1.04k|int64_t janet_unmarshal_int64(JanetMarshalContext *ctx) {
19786|  1.04k|    UnmarshalState *st = (UnmarshalState *)(ctx->u_state);
19787|  1.04k|    return read64(st, &(ctx->data));
19788|  1.04k|}
janet_unmarshal_abstract_reuse:
19822|  1.04k|void janet_unmarshal_abstract_reuse(JanetMarshalContext *ctx, void *p) {
19823|  1.04k|    UnmarshalState *st = (UnmarshalState *)(ctx->u_state);
19824|  1.04k|    if (ctx->at == NULL) {
  ------------------
  |  Branch (19824:9): [True: 0, False: 1.04k]
  ------------------
19825|      0|        janet_panicf("janet_unmarshal_abstract called more than once");
19826|      0|    }
19827|  1.04k|    janet_v_push(st->lookup, janet_wrap_abstract(p));
  ------------------
  |  |  706|  1.04k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  1.04k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  1.04k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  1.04k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  1.04k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  1.04k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  1.04k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 0, False: 1.04k]
  |  |  |  |  |  |  |  Branch (717:50): [True: 3, False: 1.03k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|      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))
  |  |  ------------------
  |  |  |  |  715|  1.04k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  1.04k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19828|       |    ctx->at = NULL;
19829|  1.04k|}
janet_unmarshal_abstract:
19831|  1.04k|void *janet_unmarshal_abstract(JanetMarshalContext *ctx, size_t size) {
19832|  1.04k|    void *p = janet_abstract(ctx->at, size);
19833|  1.04k|    janet_unmarshal_abstract_reuse(ctx, p);
19834|  1.04k|    return p;
19835|  1.04k|}
janet_unmarshal_flags:
19849|  1.02k|int janet_unmarshal_flags(JanetMarshalContext *ctx) {
19850|  1.02k|    return ctx->flags;
19851|  1.02k|}
janet_unmarshal:
20194|  8.71k|    const uint8_t **next) {
20195|  8.71k|    UnmarshalState st;
20196|  8.71k|    st.start = bytes;
20197|  8.71k|    st.end = bytes + len;
20198|  8.71k|    st.lookup_defs = NULL;
20199|  8.71k|    st.lookup_envs = NULL;
20200|  8.71k|    st.lookup = NULL;
20201|  8.71k|    st.reg = reg;
20202|  8.71k|    Janet out;
20203|  8.71k|    const uint8_t *nextbytes = unmarshal_one(&st, bytes, &out, flags);
20204|  8.71k|    if (next) *next = nextbytes;
  ------------------
  |  Branch (20204:9): [True: 1.47k, False: 7.24k]
  ------------------
20205|  8.71k|    janet_v_free(st.lookup_defs);
  ------------------
  |  |  705|  8.71k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  713|  7.75k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (705:34): [True: 7.75k, False: 964]
  |  |  ------------------
  ------------------
20206|  8.71k|    janet_v_free(st.lookup_envs);
  ------------------
  |  |  705|  8.71k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  713|  7.50k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (705:34): [True: 7.50k, False: 1.20k]
  |  |  ------------------
  ------------------
20207|       |    janet_v_free(st.lookup);
  ------------------
  |  |  705|  8.71k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  713|  8.30k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (705:34): [True: 8.30k, False: 406]
  |  |  ------------------
  ------------------
20208|  8.71k|    return out;
20209|  8.71k|}
cfun_marshal:
20230|  14.6k|              "unmarshalling.") {
20231|  14.6k|    janet_arity(argc, 1, 4);
20232|  14.6k|    JanetBuffer *buffer;
20233|  14.6k|    JanetTable *rreg = NULL;
20234|  14.6k|    uint32_t flags = 0;
20235|  14.6k|    if (argc > 1) {
  ------------------
  |  Branch (20235:9): [True: 14, False: 14.6k]
  ------------------
20236|     14|        rreg = janet_gettable(argv, 1);
20237|     14|    }
20238|  14.6k|    if (argc > 2) {
  ------------------
  |  Branch (20238:9): [True: 3, False: 14.6k]
  ------------------
20239|      3|        buffer = janet_getbuffer(argv, 2);
20240|  14.6k|    } else {
20241|  14.6k|        buffer = janet_buffer(10);
20242|  14.6k|    }
20243|  14.6k|    if (argc > 3 && janet_truthy(argv[3])) {
  ------------------
  |  |  813|      1|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|      2|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  802|      2|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      2|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      1|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      1|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 1, False: 0]
  |  |  ------------------
  |  |  814|      1|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|      2|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  802|      2|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      2|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      1|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      1|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 1, False: 0]
  |  |  |  Branch (814:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (20243:9): [True: 1, False: 14.6k]
  ------------------
20244|      1|        flags |= JANET_MARSHAL_NO_CYCLES;
  ------------------
  |  | 1902|      1|#define JANET_MARSHAL_NO_CYCLES 0x40000
  ------------------
20245|      1|    }
20246|  14.6k|    janet_marshal(buffer, argv[0], rreg, flags);
20247|  14.6k|    return janet_wrap_buffer(buffer);
  ------------------
  |  |  842|  14.6k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  820|  14.6k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  14.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  14.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20248|  14.6k|}
cfun_unmarshal:
20254|     83|              "unmarshalled from the buffer.") {
20255|     83|    janet_sandbox_assert(JANET_SANDBOX_UNMARSHAL);
  ------------------
  |  | 2034|     83|#define JANET_SANDBOX_UNMARSHAL 262144
  ------------------
20256|     83|    janet_arity(argc, 1, 2);
20257|     83|    JanetByteView view = janet_getbytes(argv, 0);
20258|     83|    JanetTable *reg = NULL;
20259|     83|    if (argc > 1) {
  ------------------
  |  Branch (20259:9): [True: 1, False: 82]
  ------------------
20260|      1|        reg = janet_gettable(argv, 1);
20261|      1|    }
20262|       |    return janet_unmarshal(view.bytes, (size_t) view.len, 0, reg, NULL);
20263|     83|}
janet_lib_marsh:
20266|  7.16k|void janet_lib_marsh(JanetTable *env) {
20267|  7.16k|    JanetRegExt marsh_cfuns[] = {
20268|  7.16k|        JANET_CORE_REG("marshal", cfun_marshal),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20269|  7.16k|        JANET_CORE_REG("unmarshal", cfun_unmarshal),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20270|  7.16k|        JANET_CORE_REG("env-lookup", cfun_env_lookup),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20271|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
20272|  7.16k|    };
20273|       |    janet_core_cfuns_ext(env, NULL, marsh_cfuns);
20274|  7.16k|}
janet_default_rng:
20349|  7.65k|JanetRNG *janet_default_rng(void) {
20350|  7.65k|    return &janet_vm.rng;
20351|  7.65k|}
janet_rng_seed:
20353|  15.3k|void janet_rng_seed(JanetRNG *rng, uint32_t seed) {
20354|  15.3k|    rng->a = seed;
20355|  15.3k|    rng->b = 0x97654321u;
20356|  15.3k|    rng->c = 123871873u;
20357|  15.3k|    rng->d = 0xf23f56c8u;
20358|  15.3k|    rng->counter = 0u;
20359|       |    /* First several numbers aren't that random. */
20360|   260k|    for (int i = 0; i < 16; i++) janet_rng_u32(rng);
  ------------------
  |  Branch (20360:21): [True: 245k, False: 15.3k]
  ------------------
20361|  15.3k|}
janet_rng_longseed:
20363|     50|void janet_rng_longseed(JanetRNG *rng, const uint8_t *bytes, int32_t len) {
20364|     50|    uint8_t state[16] = {0};
20365|  5.71k|    for (int32_t i = 0; i < len; i++)
  ------------------
  |  Branch (20365:25): [True: 5.66k, False: 50]
  ------------------
20366|  5.66k|        state[i & 0xF] ^= bytes[i];
20367|     50|    rng->a = state[0] + ((uint32_t) state[1] << 8) + ((uint32_t) state[2] << 16) + ((uint32_t) state[3] << 24);
20368|     50|    rng->b = state[4] + ((uint32_t) state[5] << 8) + ((uint32_t) state[6] << 16) + ((uint32_t) state[7] << 24);
20369|     50|    rng->c = state[8] + ((uint32_t) state[9] << 8) + ((uint32_t) state[10] << 16) + ((uint32_t) state[11] << 24);
20370|     50|    rng->d = state[12] + ((uint32_t) state[13] << 8) + ((uint32_t) state[14] << 16) + ((uint32_t) state[15] << 24);
20371|     50|    rng->counter = 0u;
20372|       |    /* a, b, c, d can't all be 0 */
20373|     50|    if (rng->a == 0) rng->a = 1u;
  ------------------
  |  Branch (20373:9): [True: 13, False: 37]
  ------------------
20374|    850|    for (int i = 0; i < 16; i++) janet_rng_u32(rng);
  ------------------
  |  Branch (20374:21): [True: 800, False: 50]
  ------------------
20375|     50|}
janet_rng_u32:
20377|   246k|uint32_t janet_rng_u32(JanetRNG *rng) {
20378|       |    /* Algorithm "xorwow" from p. 5 of Marsaglia, "Xorshift RNGs" */
20379|   246k|    uint32_t t = rng->d;
20380|   246k|    uint32_t const s = rng->a;
20381|   246k|    rng->d = rng->c;
20382|   246k|    rng->c = rng->b;
20383|   246k|    rng->b = s;
20384|   246k|    t ^= t >> 2;
20385|   246k|    t ^= t << 1;
20386|   246k|    t ^= s ^ (s << 4);
20387|   246k|    rng->a = t;
20388|   246k|    rng->counter += 362437;
20389|   246k|    return t + rng->counter;
20390|   246k|}
janet_rng_double:
20392|     10|double janet_rng_double(JanetRNG *rng) {
20393|     10|    uint32_t hi = janet_rng_u32(rng);
20394|     10|    uint32_t lo = janet_rng_u32(rng);
20395|     10|    uint64_t big = (uint64_t)(lo) | (((uint64_t) hi) << 32);
20396|     10|    return ldexp((double)(big >> (64 - 52)), -52);
20397|     10|}
cfun_rng_make:
20404|     59|             ) {
20405|     59|    janet_arity(argc, 0, 1);
20406|     59|    JanetRNG *rng = janet_abstract(&janet_rng_type, sizeof(JanetRNG));
20407|     59|    if (argc == 1) {
  ------------------
  |  Branch (20407:9): [True: 56, False: 3]
  ------------------
20408|     56|        if (janet_checkint(argv[0])) {
  ------------------
  |  Branch (20408:13): [True: 5, False: 51]
  ------------------
20409|      5|            uint32_t seed = (uint32_t)(janet_getinteger(argv, 0));
20410|      5|            janet_rng_seed(rng, seed);
20411|     51|        } else {
20412|     51|            JanetByteView bytes = janet_getbytes(argv, 0);
20413|     51|            janet_rng_longseed(rng, bytes.bytes, bytes.len);
20414|     51|        }
20415|     56|    } else {
20416|      3|        janet_rng_seed(rng, 0);
20417|      3|    }
20418|     59|    return janet_wrap_abstract(rng);
  ------------------
  |  |  846|     59|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|     59|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     59|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     59|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20419|     59|}
cfun_rng_uniform:
20424|      2|             ) {
20425|      2|    janet_fixarity(argc, 1);
20426|      2|    JanetRNG *rng = janet_getabstract(argv, 0, &janet_rng_type);
20427|      2|    return janet_wrap_number(janet_rng_double(rng));
  ------------------
  |  |  830|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20428|      2|}
cfun_rng_int:
20434|      2|             ) {
20435|      2|    janet_arity(argc, 1, 2);
20436|      2|    JanetRNG *rng = janet_getabstract(argv, 0, &janet_rng_type);
20437|      2|    if (argc == 1) {
  ------------------
  |  Branch (20437:9): [True: 0, False: 2]
  ------------------
20438|      0|        uint32_t word = janet_rng_u32(rng) >> 1;
20439|      0|        return janet_wrap_integer(word);
  ------------------
  |  |  958|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
20440|      2|    } else {
20441|      2|        int32_t max = janet_optnat(argv, argc, 1, INT32_MAX);
20442|      2|        if (max == 0) return janet_wrap_number(0.0);
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
  |  Branch (20442:13): [True: 0, False: 2]
  ------------------
20443|      2|        uint32_t modulo = (uint32_t) max;
20444|      2|        uint32_t maxgen = INT32_MAX;
20445|      2|        uint32_t maxword = maxgen - (maxgen % modulo);
20446|      2|        uint32_t word;
20447|      2|        do {
20448|      2|            word = janet_rng_u32(rng) >> 1;
20449|      2|        } while (word > maxword);
  ------------------
  |  Branch (20449:18): [True: 0, False: 2]
  ------------------
20450|      2|        return janet_wrap_integer(word % modulo);
  ------------------
  |  |  958|      2|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
20451|      2|    }
20452|      2|}
janet_rand:
20513|     14|              "Returns a uniformly distributed random number between 0 and 1.") {
20514|     14|    (void) argv;
20515|     14|    janet_fixarity(argc, 0);
20516|     14|    return janet_wrap_number(janet_rng_double(&janet_vm.rng));
  ------------------
  |  |  830|     14|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20517|     14|}
janet_srand:
20524|      5|             ) {
20525|      5|    janet_fixarity(argc, 1);
20526|      5|    if (janet_checkint(argv[0])) {
  ------------------
  |  Branch (20526:9): [True: 0, False: 5]
  ------------------
20527|      0|        uint32_t seed = (uint32_t)(janet_getinteger(argv, 0));
20528|      0|        janet_rng_seed(&janet_vm.rng, seed);
20529|      5|    } else {
20530|      5|        JanetByteView bytes = janet_getbytes(argv, 0);
20531|      5|        janet_rng_longseed(&janet_vm.rng, bytes.bytes, bytes.len);
20532|      5|    }
20533|      5|    return janet_wrap_nil();
  ------------------
  |  |  826|      5|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      5|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      5|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      5|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20534|      5|}
janet_acos:
20537|  3.47k|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20538|  3.47k|    janet_fixarity(argc, 1); \
20539|  3.47k|    double x = janet_getnumber(argv, 0); \
20540|  3.47k|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|  3.47k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20541|  3.47k|}
janet_asin:
20537|     11|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20538|     11|    janet_fixarity(argc, 1); \
20539|     11|    double x = janet_getnumber(argv, 0); \
20540|     11|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|     11|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20541|     11|}
janet_atan:
20537|      2|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20538|      2|    janet_fixarity(argc, 1); \
20539|      2|    double x = janet_getnumber(argv, 0); \
20540|      2|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20541|      2|}
janet_cos:
20537|      4|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20538|      4|    janet_fixarity(argc, 1); \
20539|      4|    double x = janet_getnumber(argv, 0); \
20540|      4|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20541|      4|}
janet_acosh:
20537|      1|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20538|      1|    janet_fixarity(argc, 1); \
20539|      1|    double x = janet_getnumber(argv, 0); \
20540|      1|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20541|      1|}
janet_sin:
20537|     13|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20538|     13|    janet_fixarity(argc, 1); \
20539|     13|    double x = janet_getnumber(argv, 0); \
20540|     13|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|     13|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20541|     13|}
janet_sinh:
20537|      3|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20538|      3|    janet_fixarity(argc, 1); \
20539|      3|    double x = janet_getnumber(argv, 0); \
20540|      3|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      3|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20541|      3|}
janet_tan:
20537|     13|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20538|     13|    janet_fixarity(argc, 1); \
20539|     13|    double x = janet_getnumber(argv, 0); \
20540|     13|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|     13|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20541|     13|}
janet_tanh:
20537|      6|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20538|      6|    janet_fixarity(argc, 1); \
20539|      6|    double x = janet_getnumber(argv, 0); \
20540|      6|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      6|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20541|      6|}
janet_expm1:
20537|      4|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20538|      4|    janet_fixarity(argc, 1); \
20539|      4|    double x = janet_getnumber(argv, 0); \
20540|      4|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20541|      4|}
janet_cbrt:
20537|      2|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20538|      2|    janet_fixarity(argc, 1); \
20539|      2|    double x = janet_getnumber(argv, 0); \
20540|      2|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20541|      2|}
janet_erfc:
20537|      1|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20538|      1|    janet_fixarity(argc, 1); \
20539|      1|    double x = janet_getnumber(argv, 0); \
20540|      1|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20541|      1|}
janet_lgamma:
20537|      8|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20538|      8|    janet_fixarity(argc, 1); \
20539|      8|    double x = janet_getnumber(argv, 0); \
20540|      8|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      8|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20541|      8|}
janet_tgamma:
20537|      2|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20538|      2|    janet_fixarity(argc, 1); \
20539|      2|    double x = janet_getnumber(argv, 0); \
20540|      2|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20541|      2|}
janet_atanh:
20537|      3|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20538|      3|    janet_fixarity(argc, 1); \
20539|      3|    double x = janet_getnumber(argv, 0); \
20540|      3|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      3|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20541|      3|}
janet_log:
20537|      4|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20538|      4|    janet_fixarity(argc, 1); \
20539|      4|    double x = janet_getnumber(argv, 0); \
20540|      4|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20541|      4|}
janet_log10:
20537|      1|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20538|      1|    janet_fixarity(argc, 1); \
20539|      1|    double x = janet_getnumber(argv, 0); \
20540|      1|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20541|      1|}
janet_sqrt:
20537|      1|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20538|      1|    janet_fixarity(argc, 1); \
20539|      1|    double x = janet_getnumber(argv, 0); \
20540|      1|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20541|      1|}
janet_floor:
20537|      1|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20538|      1|    janet_fixarity(argc, 1); \
20539|      1|    double x = janet_getnumber(argv, 0); \
20540|      1|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20541|      1|}
janet_round:
20537|      5|JANET_CORE_FN(janet_##fop, "(math/" janet_name " x)", doc) {\
20538|      5|    janet_fixarity(argc, 1); \
20539|      5|    double x = janet_getnumber(argv, 0); \
20540|      5|    return janet_wrap_number(fop(x)); \
  ------------------
  |  |  830|      5|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20541|      5|}
janet_atan2:
20579|      2|JANET_CORE_FN(janet_##name, signature, doc) {\
20580|      2|    janet_fixarity(argc, 2); \
20581|      2|    double lhs = janet_getnumber(argv, 0); \
20582|      2|    double rhs = janet_getnumber(argv, 1); \
20583|      2|    return janet_wrap_number(fop(lhs, rhs)); \
  ------------------
  |  |  830|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20584|      2|}
janet_pow:
20579|      1|JANET_CORE_FN(janet_##name, signature, doc) {\
20580|      1|    janet_fixarity(argc, 2); \
20581|      1|    double lhs = janet_getnumber(argv, 0); \
20582|      1|    double rhs = janet_getnumber(argv, 1); \
20583|      1|    return janet_wrap_number(fop(lhs, rhs)); \
  ------------------
  |  |  830|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20584|      1|}
janet_not:
20593|   193k|JANET_CORE_FN(janet_not, "(not x)", "Returns the boolean inverse of x.") {
20594|   193k|    janet_fixarity(argc, 1);
20595|   193k|    return janet_wrap_boolean(!janet_truthy(argv[0]));
  ------------------
  |  |  829|   193k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  817|  1.29M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   193k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   193k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (817:51): [True: 0, False: 0]
  |  |  |  |  |  Branch (817:51): [True: 0, False: 0]
  |  |  |  |  |  Branch (817:51): [Folded, False: 193k]
  |  |  |  |  |  Branch (817:51): [True: 0, False: 0]
  |  |  |  |  |  Branch (817:51): [True: 0, False: 0]
  |  |  |  |  |  Branch (817:51): [Folded, False: 141k]
  |  |  |  |  |  Branch (817:51): [True: 35, False: 141k]
  |  |  |  |  |  Branch (817:51): [True: 141k, False: 429]
  |  |  |  |  |  Branch (817:51): [True: 141k, False: 51.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20596|   193k|}
janet_cfun_lcm:
20628|      1|              "Returns the least common multiple of x and y.") {
20629|      1|    janet_fixarity(argc, 2);
20630|      1|    double x = janet_getnumber(argv, 0);
20631|      1|    double y = janet_getnumber(argv, 1);
20632|      1|    return janet_wrap_number(janet_lcm(x, y));
  ------------------
  |  |  830|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20633|      1|}
janet_cfun_frexp:
20636|     10|              "Returns a tuple of (mantissa, exponent) from number.") {
20637|     10|    janet_fixarity(argc, 1);
20638|     10|    double x = janet_getnumber(argv, 0);
20639|     10|    int exp;
20640|     10|    x = frexp(x, &exp);
20641|     10|    Janet *result = janet_tuple_begin(2);
20642|     10|    result[0] = janet_wrap_number(x);
  ------------------
  |  |  830|     10|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20643|     10|    result[1] = janet_wrap_number((double) exp);
  ------------------
  |  |  830|     10|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
20644|     10|    return janet_wrap_tuple(janet_tuple_end(result));
  ------------------
  |  |  838|     10|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|     10|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     10|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     10|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20645|     10|}
janet_lib_math:
20656|  7.16k|void janet_lib_math(JanetTable *env) {
20657|  7.16k|    JanetRegExt math_cfuns[] = {
20658|  7.16k|        JANET_CORE_REG("not", janet_not),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20659|  7.16k|        JANET_CORE_REG("math/random", janet_rand),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20660|  7.16k|        JANET_CORE_REG("math/seedrandom", janet_srand),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20661|  7.16k|        JANET_CORE_REG("math/cos", janet_cos),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20662|  7.16k|        JANET_CORE_REG("math/sin", janet_sin),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20663|  7.16k|        JANET_CORE_REG("math/tan", janet_tan),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20664|  7.16k|        JANET_CORE_REG("math/acos", janet_acos),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20665|  7.16k|        JANET_CORE_REG("math/asin", janet_asin),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20666|  7.16k|        JANET_CORE_REG("math/atan", janet_atan),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20667|  7.16k|        JANET_CORE_REG("math/exp", janet_exp),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20668|  7.16k|        JANET_CORE_REG("math/log", janet_log),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20669|  7.16k|        JANET_CORE_REG("math/log10", janet_log10),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20670|  7.16k|        JANET_CORE_REG("math/log2", janet_log2),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20671|  7.16k|        JANET_CORE_REG("math/sqrt", janet_sqrt),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20672|  7.16k|#ifndef JANET_PLAN9
20673|  7.16k|        JANET_CORE_REG("math/cbrt", janet_cbrt),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20674|  7.16k|        JANET_CORE_REG("math/gamma", janet_tgamma),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20675|  7.16k|        JANET_CORE_REG("math/log-gamma", janet_lgamma),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20676|  7.16k|        JANET_CORE_REG("math/erfc", janet_erfc),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20677|  7.16k|        JANET_CORE_REG("math/erf", janet_erf),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20678|  7.16k|        JANET_CORE_REG("math/expm1", janet_expm1),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20679|  7.16k|        JANET_CORE_REG("math/atanh", janet_atanh),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20680|  7.16k|        JANET_CORE_REG("math/asinh", janet_asinh),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20681|  7.16k|        JANET_CORE_REG("math/next", janet_nextafter),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20682|  7.16k|#endif
20683|  7.16k|        JANET_CORE_REG("math/floor", janet_floor),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20684|  7.16k|        JANET_CORE_REG("math/ceil", janet_ceil),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20685|  7.16k|        JANET_CORE_REG("math/pow", janet_pow),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20686|  7.16k|        JANET_CORE_REG("math/abs", janet_fabs),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20687|  7.16k|        JANET_CORE_REG("math/sinh", janet_sinh),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20688|  7.16k|        JANET_CORE_REG("math/cosh", janet_cosh),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20689|  7.16k|        JANET_CORE_REG("math/tanh", janet_tanh),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20690|  7.16k|        JANET_CORE_REG("math/acosh", janet_acosh),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20691|  7.16k|        JANET_CORE_REG("math/atan2", janet_atan2),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20692|  7.16k|        JANET_CORE_REG("math/rng", cfun_rng_make),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20693|  7.16k|        JANET_CORE_REG("math/rng-uniform", cfun_rng_uniform),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20694|  7.16k|        JANET_CORE_REG("math/rng-int", cfun_rng_int),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20695|  7.16k|        JANET_CORE_REG("math/rng-buffer", cfun_rng_buffer),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20696|  7.16k|        JANET_CORE_REG("math/hypot", janet_hypot),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20697|  7.16k|        JANET_CORE_REG("math/exp2", janet_exp2),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20698|  7.16k|        JANET_CORE_REG("math/log1p", janet_log1p),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20699|  7.16k|        JANET_CORE_REG("math/trunc", janet_trunc),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20700|  7.16k|        JANET_CORE_REG("math/round", janet_round),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20701|  7.16k|        JANET_CORE_REG("math/gcd", janet_cfun_gcd),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20702|  7.16k|        JANET_CORE_REG("math/lcm", janet_cfun_lcm),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20703|  7.16k|        JANET_CORE_REG("math/frexp", janet_cfun_frexp),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20704|  7.16k|        JANET_CORE_REG("math/ldexp", janet_cfun_ldexp),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
20705|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
20706|  7.16k|    };
20707|  7.16k|    janet_core_cfuns_ext(env, NULL, math_cfuns);
20708|  7.16k|    janet_register_abstract_type(&janet_rng_type);
20709|       |#ifdef JANET_BOOTSTRAP
20710|       |    JANET_CORE_DEF(env, "math/pi", janet_wrap_number(3.1415926535897931),
20711|       |                   "The value pi.");
20712|       |    JANET_CORE_DEF(env, "math/e", janet_wrap_number(2.7182818284590451),
20713|       |                   "The base of the natural log.");
20714|       |    JANET_CORE_DEF(env, "math/inf", janet_wrap_number(INFINITY),
20715|       |                   "The number representing positive infinity");
20716|       |    JANET_CORE_DEF(env, "math/-inf", janet_wrap_number(-INFINITY),
20717|       |                   "The number representing negative infinity");
20718|       |    JANET_CORE_DEF(env, "math/int32-min", janet_wrap_number(INT32_MIN),
20719|       |                   "The minimum contiguous integer representable by a 32 bit signed integer");
20720|       |    JANET_CORE_DEF(env, "math/int32-max", janet_wrap_number(INT32_MAX),
20721|       |                   "The maximum contiguous integer representable by a 32 bit signed integer");
20722|       |    JANET_CORE_DEF(env, "math/int-min", janet_wrap_number(JANET_INTMIN_DOUBLE),
20723|       |                   "The minimum contiguous integer representable by a double (-(2^53))");
20724|       |    JANET_CORE_DEF(env, "math/int-max", janet_wrap_number(JANET_INTMAX_DOUBLE),
20725|       |                   "The maximum contiguous integer representable by a double (2^53)");
20726|       |#ifdef NAN
20727|       |    JANET_CORE_DEF(env, "math/nan", janet_wrap_number(NAN), "Not a number (IEEE-754 NaN)");
20728|       |#else
20729|       |    JANET_CORE_DEF(env, "math/nan", janet_wrap_number(0.0 / 0.0), "Not a number (IEEE-754 NaN)");
20730|       |#endif
20731|       |#endif
20732|  7.16k|}
cfun_net_sockaddr:
21197|      3|              "return all address that match in an array instead of just the first.") {
21198|      3|    janet_sandbox_assert(JANET_SANDBOX_NET_CONNECT); /* connect OR listen */
  ------------------
  |  | 2015|      3|#define JANET_SANDBOX_NET_CONNECT 4
  ------------------
21199|      3|    janet_arity(argc, 2, 4);
21200|      3|    int socktype = janet_get_sockettype(argv, argc, 2);
21201|      3|    int is_unix = 0;
21202|      3|    int make_arr = (argc >= 3 && janet_truthy(argv[3]));
  ------------------
  |  |  813|      0|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 0, False: 0]
  |  |  ------------------
  |  |  814|      0|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 0, False: 0]
  |  |  |  Branch (814:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (21202:21): [True: 0, False: 3]
  ------------------
21203|      3|    socklen_t addrsize = 0;
21204|      3|    struct addrinfo *ai = janet_get_addrinfo(argv, 0, socktype, 0, &is_unix, &addrsize);
21205|      3|#ifndef JANET_WINDOWS
21206|       |    /* no unix domain socket support on windows yet */
21207|      3|    if (is_unix) {
  ------------------
  |  Branch (21207:9): [True: 0, False: 3]
  ------------------
21208|      0|        void *abst = janet_abstract(&janet_address_type, addrsize);
21209|      0|        memcpy(abst, ai, addrsize);
21210|      0|        Janet ret = janet_wrap_abstract(abst);
  ------------------
  |  |  846|      0|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21211|      0|        return make_arr ? janet_wrap_array(janet_array_n(&ret, 1)) : ret;
  ------------------
  |  |  840|      0|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (21211:16): [True: 0, False: 0]
  ------------------
21212|      0|    }
21213|      3|#endif
21214|      3|    if (make_arr) {
  ------------------
  |  Branch (21214:9): [True: 0, False: 3]
  ------------------
21215|       |        /* Select all */
21216|      0|        JanetArray *arr = janet_array(10);
21217|      0|        struct addrinfo *iter = ai;
21218|      0|        while (NULL != iter) {
  ------------------
  |  Branch (21218:16): [True: 0, False: 0]
  ------------------
21219|      0|            void *abst = janet_abstract(&janet_address_type, iter->ai_addrlen);
21220|      0|            memcpy(abst, iter->ai_addr, iter->ai_addrlen);
21221|      0|            janet_array_push(arr, janet_wrap_abstract(abst));
  ------------------
  |  |  846|      0|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21222|      0|            iter = iter->ai_next;
21223|      0|        }
21224|      0|        freeaddrinfo(ai);
21225|      0|        return janet_wrap_array(arr);
  ------------------
  |  |  840|      0|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21226|      3|    } else {
21227|       |        /* Select first */
21228|      3|        if (NULL == ai) {
  ------------------
  |  Branch (21228:13): [True: 0, False: 3]
  ------------------
21229|      0|            janet_panic("no data for given address");
21230|      0|        }
21231|      3|        void *abst = janet_abstract(&janet_address_type, ai->ai_addrlen);
21232|      3|        memcpy(abst, ai->ai_addr, ai->ai_addrlen);
21233|      3|        freeaddrinfo(ai);
21234|      3|        return janet_wrap_abstract(abst);
  ------------------
  |  |  846|      3|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|      3|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21235|      3|    }
21236|      3|}
cfun_net_connect:
21244|     14|              "connection, with the default being the same as using the OS's preferred address. ") {
21245|     14|    janet_sandbox_assert(JANET_SANDBOX_NET_CONNECT);
  ------------------
  |  | 2015|     14|#define JANET_SANDBOX_NET_CONNECT 4
  ------------------
21246|     14|    janet_arity(argc, 2, 5);
21247|       |
21248|       |    /* Check arguments */
21249|     14|    int socktype = janet_get_sockettype(argv, argc, 2);
21250|     14|    int is_unix = 0;
21251|     14|    char *bindhost = (char *) janet_optcstring(argv, argc, 3, NULL);
21252|     14|    char *bindport = NULL;
21253|     14|    if (argc >= 5 && janet_checkint(argv[4])) {
  ------------------
  |  Branch (21253:9): [True: 0, False: 14]
  |  Branch (21253:22): [True: 0, False: 0]
  ------------------
21254|      0|        bindport = (char *)janet_to_string(argv[4]);
21255|     14|    } else {
21256|     14|        bindport = (char *)janet_optcstring(argv, argc, 4, NULL);
21257|     14|    }
21258|       |
21259|       |    /* Where we're connecting to */
21260|     14|    socklen_t addrlen = 0;
21261|     14|    struct addrinfo *ai = janet_get_addrinfo(argv, 0, socktype, 0, &is_unix, &addrlen);
21262|       |
21263|       |    /* Check if we're binding address */
21264|     14|    struct addrinfo *binding = NULL;
21265|     14|    if (bindhost != NULL) {
  ------------------
  |  Branch (21265:9): [True: 0, False: 14]
  ------------------
21266|      0|        if (is_unix) {
  ------------------
  |  Branch (21266:13): [True: 0, False: 0]
  ------------------
21267|      0|            freeaddrinfo(ai);
21268|      0|            janet_panic("bindhost not supported for unix domain sockets");
21269|      0|        }
21270|       |        /* getaddrinfo */
21271|      0|        struct addrinfo hints;
21272|      0|        memset(&hints, 0, sizeof(hints));
21273|      0|        hints.ai_family = AF_UNSPEC;
21274|      0|        hints.ai_socktype = socktype;
21275|      0|        hints.ai_flags = 0;
21276|      0|        int status = getaddrinfo(bindhost, bindport, &hints, &binding);
21277|      0|        if (status) {
  ------------------
  |  Branch (21277:13): [True: 0, False: 0]
  ------------------
21278|      0|            freeaddrinfo(ai);
21279|      0|            janet_panicf("could not get address info for bindhost: %s", gai_strerror(status));
21280|      0|        }
21281|      0|    }
21282|       |
21283|       |    /* Create socket */
21284|     14|    JSock sock = JSOCKDEFAULT;
  ------------------
  |  |20809|     14|#define JSock int
  ------------------
                  JSock sock = JSOCKDEFAULT;
  ------------------
  |  |20807|     14|#define JSOCKDEFAULT 0
  ------------------
21285|     14|    void *addr = NULL;
21286|     14|#ifndef JANET_WINDOWS
21287|     14|    if (is_unix) {
  ------------------
  |  Branch (21287:9): [True: 0, False: 14]
  ------------------
21288|      0|        sock = socket(AF_UNIX, socktype | JSOCKFLAGS, 0);
  ------------------
  |  |20811|      0|#define JSOCKFLAGS SOCK_CLOEXEC
  ------------------
21289|      0|        if (!JSOCKVALID(sock)) {
  ------------------
  |  |20808|      0|#define JSOCKVALID(x) ((x) >= 0)
  ------------------
  |  Branch (21289:13): [True: 0, False: 0]
  ------------------
21290|      0|            Janet v = janet_ev_lasterr();
21291|      0|            janet_free(ai);
  ------------------
  |  | 2402|      0|#define janet_free(X) free((X))
  ------------------
21292|      0|            janet_panicf("could not create socket: %V", v);
21293|      0|        }
21294|      0|        addr = (void *) ai;
21295|      0|    } else
21296|     14|#endif
21297|     14|    {
21298|     14|        struct addrinfo *rp = NULL;
21299|     14|        for (rp = ai; rp != NULL; rp = rp->ai_next) {
  ------------------
  |  Branch (21299:23): [True: 0, False: 14]
  ------------------
21300|       |#ifdef JANET_WINDOWS
21301|       |            sock = WSASocketW(rp->ai_family, rp->ai_socktype, rp->ai_protocol, NULL, 0, WSA_FLAG_OVERLAPPED);
21302|       |#else
21303|      0|            sock = socket(rp->ai_family, rp->ai_socktype | JSOCKFLAGS, rp->ai_protocol);
  ------------------
  |  |20811|      0|#define JSOCKFLAGS SOCK_CLOEXEC
  ------------------
21304|      0|#endif
21305|      0|            if (JSOCKVALID(sock)) {
  ------------------
  |  |20808|      0|#define JSOCKVALID(x) ((x) >= 0)
  |  |  ------------------
  |  |  |  Branch (20808:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
21306|      0|                addr = rp->ai_addr;
21307|      0|                addrlen = (socklen_t) rp->ai_addrlen;
21308|      0|                break;
21309|      0|            }
21310|      0|        }
21311|     14|        if (NULL == addr) {
  ------------------
  |  Branch (21311:13): [True: 0, False: 14]
  ------------------
21312|      0|            Janet v = janet_ev_lasterr();
21313|      0|            if (binding) freeaddrinfo(binding);
  ------------------
  |  Branch (21313:17): [True: 0, False: 0]
  ------------------
21314|      0|            freeaddrinfo(ai);
21315|      0|            janet_panicf("could not create socket: %V", v);
21316|      0|        }
21317|     14|    }
21318|       |
21319|       |    /* Bind to bindhost and bindport if given */
21320|     14|    if (binding) {
  ------------------
  |  Branch (21320:9): [True: 0, False: 14]
  ------------------
21321|      0|        struct addrinfo *rp = NULL;
21322|      0|        int did_bind = 0;
21323|      0|        for (rp = binding; rp != NULL; rp = rp->ai_next) {
  ------------------
  |  Branch (21323:28): [True: 0, False: 0]
  ------------------
21324|      0|            if (bind(sock, rp->ai_addr, (int) rp->ai_addrlen) == 0) {
  ------------------
  |  Branch (21324:17): [True: 0, False: 0]
  ------------------
21325|      0|                did_bind = 1;
21326|      0|                break;
21327|      0|            }
21328|      0|        }
21329|      0|        if (!did_bind) {
  ------------------
  |  Branch (21329:13): [True: 0, False: 0]
  ------------------
21330|      0|            Janet v = janet_ev_lasterr();
21331|      0|            freeaddrinfo(binding);
21332|      0|            freeaddrinfo(ai);
21333|      0|            JSOCKCLOSE(sock);
  ------------------
  |  |20806|      0|#define JSOCKCLOSE(x) close(x)
  ------------------
21334|      0|            janet_panicf("could not bind outgoing address: %V", v);
21335|      0|        } else {
21336|      0|            freeaddrinfo(binding);
21337|      0|        }
21338|      0|    }
21339|       |
21340|       |    /* Wrap socket in abstract type JanetStream */
21341|     14|    uint32_t udp_flag = 0;
21342|     14|    if (socktype == SOCK_DGRAM) udp_flag = JANET_STREAM_UDPSERVER;
  ------------------
  |  |  623|      0|#define JANET_STREAM_UDPSERVER 0x1000
  ------------------
  |  Branch (21342:9): [True: 0, False: 14]
  ------------------
21343|     14|    JanetStream *stream = make_stream(sock, JANET_STREAM_READABLE | JANET_STREAM_WRITABLE | udp_flag);
  ------------------
  |  |  620|     14|#define JANET_STREAM_READABLE 0x200
  ------------------
                  JanetStream *stream = make_stream(sock, JANET_STREAM_READABLE | JANET_STREAM_WRITABLE | udp_flag);
  ------------------
  |  |  621|     14|#define JANET_STREAM_WRITABLE 0x400
  ------------------
21344|       |
21345|       |    /* Connect to socket */
21346|       |#ifdef JANET_WINDOWS
21347|       |    int status = 0;
21348|       |    int err = 0;
21349|       |    LPFN_CONNECTEX connect_ex = NULL;
21350|       |    if (socktype == SOCK_STREAM && ((connect_ex = lazy_get_connectex(sock)))) {
21351|       |        /* Prefer ConnecEx as it works well with overlapped IO. */
21352|       |        janet_net_socknoblock(sock);
21353|       |        NetStateConnect *state = janet_malloc(sizeof(NetStateConnect));
21354|       |        memset(state, 0, sizeof(NetStateConnect));
21355|       |        BOOL success = connect_ex(sock, addr, addrlen, NULL, 0, NULL, &state->overlapped.as.overlapped);
21356|       |        freeaddrinfo(ai);
21357|       |        if (success) {
21358|       |            /* Did not fail */
21359|       |        } else {
21360|       |            int err = WSAGetLastError();
21361|       |            if (err == ERROR_IO_PENDING) {
21362|       |                /* Did not actually fail yet */
21363|       |            } else {
21364|       |                janet_free(state);
21365|       |                Janet lasterr = janet_ev_lasterr();
21366|       |                janet_panicf("could not connect socket (ConnectEx): %V", lasterr);
21367|       |            }
21368|       |        }
21369|       |
21370|       |        net_sched_connect(stream, state);
21371|       |    } else {
21372|       |        /* Default to blocking connect if ConnectEx not available */
21373|       |        status = WSAConnect(sock, addr, addrlen, NULL, NULL, NULL, NULL);
21374|       |        err = WSAGetLastError();
21375|       |        freeaddrinfo(ai);
21376|       |        /* Set up the socket for non-blocking IO after connecting on windows by default */
21377|       |        janet_net_socknoblock(sock);
21378|       |    }
21379|       |
21380|       |#else
21381|       |    /* Set up the socket for non-blocking IO before connecting */
21382|     14|    janet_net_socknoblock(sock);
21383|     14|    int status;
21384|     14|    do {
21385|     14|        status = connect(sock, addr, addrlen);
21386|     14|    } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (21386:14): [True: 0, False: 14]
  |  Branch (21386:30): [True: 0, False: 0]
  ------------------
21387|     14|    int err = errno;
21388|     14|    if (is_unix) {
  ------------------
  |  Branch (21388:9): [True: 0, False: 14]
  ------------------
21389|      0|        janet_free(ai);
  ------------------
  |  | 2402|      0|#define janet_free(X) free((X))
  ------------------
21390|     14|    } else {
21391|     14|        freeaddrinfo(ai);
21392|     14|    }
21393|     14|#endif
21394|       |
21395|     14|    if (status == 0) {
  ------------------
  |  Branch (21395:9): [True: 0, False: 14]
  ------------------
21396|       |        /* Connect completed synchronously (common for unix domain sockets).
21397|       |         * Return the stream directly without scheduling an async wait,
21398|       |         * as edge-triggered kqueue may not signal EVFILT_WRITE if the socket
21399|       |         * is already connected when registered. */
21400|      0|        return janet_wrap_abstract(stream);
  ------------------
  |  |  846|      0|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21401|      0|    }
21402|       |
21403|       |#ifdef JANET_WINDOWS
21404|       |    if (status == SOCKET_ERROR) {
21405|       |        if (err != WSAEWOULDBLOCK) {
21406|       |#else
21407|     14|    if (status == -1) {
  ------------------
  |  Branch (21407:9): [True: 0, False: 14]
  ------------------
21408|      0|        if (err != EINPROGRESS) {
  ------------------
  |  Branch (21408:13): [True: 0, False: 0]
  ------------------
21409|      0|#endif
21410|      0|            JSOCKCLOSE(sock);
  ------------------
  |  |20806|      0|#define JSOCKCLOSE(x) close(x)
  ------------------
21411|      0|            Janet lasterr = janet_ev_lasterr();
21412|      0|            janet_panicf("could not connect socket: %V", lasterr);
21413|      0|        }
21414|      0|    }
21415|       |
21416|     14|    net_sched_connect(stream, NULL);
21417|     14|}
cfun_net_socket:
21423|      6|              "`address-family` should be one of :ipv4 or :ipv6.") {
21424|      6|    janet_arity(argc, 0, 2);
21425|       |
21426|      6|    int socktype = janet_get_sockettype(argv, argc, 0);
21427|       |
21428|       |    /* Create socket */
21429|      6|    JSock sfd = JSOCKDEFAULT;
  ------------------
  |  |20809|      6|#define JSock int
  ------------------
                  JSock sfd = JSOCKDEFAULT;
  ------------------
  |  |20807|      6|#define JSOCKDEFAULT 0
  ------------------
21430|      6|    struct addrinfo *ai = NULL;
21431|      6|    struct addrinfo hints;
21432|      6|    memset(&hints, 0, sizeof(hints));
21433|      6|    hints.ai_family = AF_UNSPEC;
21434|      6|    hints.ai_socktype = socktype;
21435|      6|#ifdef AI_NUMERICSERV
21436|      6|    hints.ai_flags = AI_NUMERICSERV; /* Explicitly prevent name resolution */
21437|       |#else
21438|       |    hints.ai_flags = 0;
21439|       |#endif
21440|      6|    if (argc >= 2) {
  ------------------
  |  Branch (21440:9): [True: 0, False: 6]
  ------------------
21441|      0|        hints.ai_family = net_get_address_family(argv[1]);
21442|      0|    }
21443|      6|    int status = getaddrinfo(NULL, "0", &hints, &ai);
21444|      6|    if (status) {
  ------------------
  |  Branch (21444:9): [True: 0, False: 6]
  ------------------
21445|      0|        janet_panicf("could not get address info: %s", gai_strerror(status));
21446|      0|    }
21447|       |
21448|      6|    struct addrinfo *rp = NULL;
21449|      6|    for (rp = ai; rp != NULL; rp = rp->ai_next) {
  ------------------
  |  Branch (21449:19): [True: 6, False: 0]
  ------------------
21450|       |#ifdef JANET_WINDOWS
21451|       |        sfd = WSASocketW(rp->ai_family, rp->ai_socktype | JSOCKFLAGS, rp->ai_protocol, NULL, 0, WSA_FLAG_OVERLAPPED);
21452|       |#else
21453|      6|        sfd = socket(rp->ai_family, rp->ai_socktype | JSOCKFLAGS, rp->ai_protocol);
  ------------------
  |  |20811|      6|#define JSOCKFLAGS SOCK_CLOEXEC
  ------------------
21454|      6|#endif
21455|      6|        if (JSOCKVALID(sfd)) {
  ------------------
  |  |20808|      6|#define JSOCKVALID(x) ((x) >= 0)
  |  |  ------------------
  |  |  |  Branch (20808:23): [True: 6, False: 0]
  |  |  ------------------
  ------------------
21456|      6|            break;
21457|      6|        }
21458|      6|    }
21459|      6|    freeaddrinfo(ai);
21460|       |
21461|      6|    if (!JSOCKVALID(sfd)) {
  ------------------
  |  |20808|      6|#define JSOCKVALID(x) ((x) >= 0)
  ------------------
  |  Branch (21461:9): [True: 0, False: 6]
  ------------------
21462|      0|        Janet v = janet_ev_lasterr();
21463|      0|        janet_panicf("could not create socket: %V", v);
21464|      0|    }
21465|       |
21466|       |    /* Wrap socket in abstract type JanetStream */
21467|      6|    uint32_t udp_flag = 0;
21468|      6|    if (socktype == SOCK_DGRAM) udp_flag = JANET_STREAM_UDPSERVER;
  ------------------
  |  |  623|      0|#define JANET_STREAM_UDPSERVER 0x1000
  ------------------
  |  Branch (21468:9): [True: 0, False: 6]
  ------------------
21469|      6|    JanetStream *stream = make_stream(sfd, JANET_STREAM_READABLE | JANET_STREAM_WRITABLE | udp_flag);
  ------------------
  |  |  620|      6|#define JANET_STREAM_READABLE 0x200
  ------------------
                  JanetStream *stream = make_stream(sfd, JANET_STREAM_READABLE | JANET_STREAM_WRITABLE | udp_flag);
  ------------------
  |  |  621|      6|#define JANET_STREAM_WRITABLE 0x400
  ------------------
21470|       |
21471|       |    /* Set up the socket for non-blocking IO */
21472|      6|    janet_net_socknoblock(sfd);
21473|       |
21474|      6|    return janet_wrap_abstract(stream);
  ------------------
  |  |  846|      6|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|      6|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      6|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      6|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21475|      6|}
cfun_net_shutdown:
21515|      2|              "Returns the original socket.") {
21516|      2|    janet_arity(argc, 1, 2);
21517|      2|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21518|      2|    janet_stream_flags(stream, JANET_STREAM_SOCKET);
  ------------------
  |  |  618|      2|#define JANET_STREAM_SOCKET 0x2
  ------------------
21519|      2|    int shutdown_type = JANET_SHUTDOWN_RW;
  ------------------
  |  |21503|      2|#define JANET_SHUTDOWN_RW SHUT_RDWR
  ------------------
21520|      2|    if (argc == 2) {
  ------------------
  |  Branch (21520:9): [True: 0, False: 2]
  ------------------
21521|      0|        const uint8_t *kw = janet_getkeyword(argv, 1);
21522|      0|        if (0 == janet_cstrcmp(kw, "rw")) {
  ------------------
  |  Branch (21522:13): [True: 0, False: 0]
  ------------------
21523|      0|            shutdown_type = JANET_SHUTDOWN_RW;
  ------------------
  |  |21503|      0|#define JANET_SHUTDOWN_RW SHUT_RDWR
  ------------------
21524|      0|        } else if (0 == janet_cstrcmp(kw, "r")) {
  ------------------
  |  Branch (21524:20): [True: 0, False: 0]
  ------------------
21525|      0|            shutdown_type = JANET_SHUTDOWN_R;
  ------------------
  |  |21504|      0|#define JANET_SHUTDOWN_R SHUT_RD
  ------------------
21526|      0|        } else if (0 == janet_cstrcmp(kw, "w")) {
  ------------------
  |  Branch (21526:20): [True: 0, False: 0]
  ------------------
21527|      0|            shutdown_type = JANET_SHUTDOWN_W;
  ------------------
  |  |21505|      0|#define JANET_SHUTDOWN_W SHUT_WR
  ------------------
21528|      0|        } else {
21529|      0|            janet_panicf("unexpected keyword %v", argv[1]);
21530|      0|        }
21531|      0|    }
21532|      2|    int status;
21533|       |#ifdef JANET_WINDOWS
21534|       |    status = shutdown((SOCKET) stream->handle, shutdown_type);
21535|       |#else
21536|      2|    do {
21537|      2|        status = shutdown(stream->handle, shutdown_type);
21538|      2|    } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (21538:14): [True: 0, False: 2]
  |  Branch (21538:30): [True: 0, False: 0]
  ------------------
21539|      2|#endif
21540|      2|    if (status) {
  ------------------
  |  Branch (21540:9): [True: 0, False: 2]
  ------------------
21541|      0|        janet_panicf("could not shutdown socket: %V", janet_ev_lasterr());
21542|      0|    }
21543|      2|    return argv[0];
21544|      2|}
cfun_net_listen:
21553|      2|              "disable the use of `SO_REUSEADDR` and `SO_REUSEPORT` when creating a server on some operating systems.") {
21554|      2|    janet_sandbox_assert(JANET_SANDBOX_NET_LISTEN);
  ------------------
  |  | 2016|      2|#define JANET_SANDBOX_NET_LISTEN 8
  ------------------
21555|      2|    janet_arity(argc, 2, 4);
21556|       |
21557|       |    /* Get host, port, and handler*/
21558|      2|    int socktype = janet_get_sockettype(argv, argc, 2);
21559|      2|    int is_unix = 0;
21560|      2|    socklen_t addrlen = 0;
21561|      2|    struct addrinfo *ai = janet_get_addrinfo(argv, 0, socktype, 1, &is_unix, &addrlen);
21562|      2|    int reuse = !(argc >= 4 && janet_truthy(argv[3]));
  ------------------
  |  |  813|      0|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 0, False: 0]
  |  |  ------------------
  |  |  814|      0|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 0, False: 0]
  |  |  |  Branch (814:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (21562:19): [True: 0, False: 2]
  ------------------
21563|       |
21564|      2|    JSock sfd = JSOCKDEFAULT;
  ------------------
  |  |20809|      2|#define JSock int
  ------------------
                  JSock sfd = JSOCKDEFAULT;
  ------------------
  |  |20807|      2|#define JSOCKDEFAULT 0
  ------------------
21565|      2|#ifndef JANET_WINDOWS
21566|      2|    if (is_unix) {
  ------------------
  |  Branch (21566:9): [True: 0, False: 2]
  ------------------
21567|      0|        sfd = socket(AF_UNIX, socktype | JSOCKFLAGS, 0);
  ------------------
  |  |20811|      0|#define JSOCKFLAGS SOCK_CLOEXEC
  ------------------
21568|      0|        if (!JSOCKVALID(sfd)) {
  ------------------
  |  |20808|      0|#define JSOCKVALID(x) ((x) >= 0)
  ------------------
  |  Branch (21568:13): [True: 0, False: 0]
  ------------------
21569|      0|            janet_free(ai);
  ------------------
  |  | 2402|      0|#define janet_free(X) free((X))
  ------------------
21570|      0|            janet_panicf("could not create socket: %V", janet_ev_lasterr());
21571|      0|        }
21572|      0|        const char *err = serverify_socket(sfd, reuse, 0);
21573|      0|        if (NULL != err || bind(sfd, (struct sockaddr *)ai, addrlen)) {
  ------------------
  |  Branch (21573:13): [True: 0, False: 0]
  |  Branch (21573:28): [True: 0, False: 0]
  ------------------
21574|      0|            JSOCKCLOSE(sfd);
  ------------------
  |  |20806|      0|#define JSOCKCLOSE(x) close(x)
  ------------------
21575|      0|            janet_free(ai);
  ------------------
  |  | 2402|      0|#define janet_free(X) free((X))
  ------------------
21576|      0|            if (err) {
  ------------------
  |  Branch (21576:17): [True: 0, False: 0]
  ------------------
21577|      0|                janet_panic(err);
21578|      0|            } else {
21579|      0|                janet_panicf("could not bind socket: %V", janet_ev_lasterr());
21580|      0|            }
21581|      0|        }
21582|      0|        janet_free(ai);
  ------------------
  |  | 2402|      0|#define janet_free(X) free((X))
  ------------------
21583|      0|    } else
21584|      2|#endif
21585|      2|    {
21586|       |        /* Check all addrinfos in a loop for the first that we can bind to. */
21587|      2|        struct addrinfo *rp = NULL;
21588|      2|        for (rp = ai; rp != NULL; rp = rp->ai_next) {
  ------------------
  |  Branch (21588:23): [True: 0, False: 2]
  ------------------
21589|       |#ifdef JANET_WINDOWS
21590|       |            sfd = WSASocketW(rp->ai_family, rp->ai_socktype | JSOCKFLAGS, rp->ai_protocol, NULL, 0, WSA_FLAG_OVERLAPPED);
21591|       |#else
21592|      0|            sfd = socket(rp->ai_family, rp->ai_socktype | JSOCKFLAGS, rp->ai_protocol);
  ------------------
  |  |20811|      0|#define JSOCKFLAGS SOCK_CLOEXEC
  ------------------
21593|      0|#endif
21594|      0|            if (!JSOCKVALID(sfd)) continue;
  ------------------
  |  |20808|      0|#define JSOCKVALID(x) ((x) >= 0)
  ------------------
  |  Branch (21594:17): [True: 0, False: 0]
  ------------------
21595|      0|            const char *err = serverify_socket(sfd, reuse, reuse);
21596|      0|            if (NULL != err) {
  ------------------
  |  Branch (21596:17): [True: 0, False: 0]
  ------------------
21597|      0|                JSOCKCLOSE(sfd);
  ------------------
  |  |20806|      0|#define JSOCKCLOSE(x) close(x)
  ------------------
21598|      0|                continue;
21599|      0|            }
21600|       |            /* Bind */
21601|      0|            if (bind(sfd, rp->ai_addr, (int) rp->ai_addrlen) == 0) break;
  ------------------
  |  Branch (21601:17): [True: 0, False: 0]
  ------------------
21602|      0|            JSOCKCLOSE(sfd);
  ------------------
  |  |20806|      0|#define JSOCKCLOSE(x) close(x)
  ------------------
21603|      0|        }
21604|      2|        freeaddrinfo(ai);
21605|      2|        if (NULL == rp) {
  ------------------
  |  Branch (21605:13): [True: 0, False: 2]
  ------------------
21606|      0|            janet_panic("could not bind to any sockets");
21607|      0|        }
21608|      2|    }
21609|       |
21610|      2|    if (socktype == SOCK_DGRAM) {
  ------------------
  |  Branch (21610:9): [True: 0, False: 2]
  ------------------
21611|       |        /* Datagram server (UDP) */
21612|      0|        JanetStream *stream = make_stream(sfd, JANET_STREAM_UDPSERVER | JANET_STREAM_READABLE);
  ------------------
  |  |  623|      0|#define JANET_STREAM_UDPSERVER 0x1000
  ------------------
                      JanetStream *stream = make_stream(sfd, JANET_STREAM_UDPSERVER | JANET_STREAM_READABLE);
  ------------------
  |  |  620|      0|#define JANET_STREAM_READABLE 0x200
  ------------------
21613|      0|        return janet_wrap_abstract(stream);
  ------------------
  |  |  846|      0|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21614|      2|    } else {
21615|       |        /* Stream server (TCP) */
21616|       |
21617|       |        /* listen */
21618|      2|        int status = listen(sfd, 1024);
21619|      2|        if (status) {
  ------------------
  |  Branch (21619:13): [True: 0, False: 2]
  ------------------
21620|      0|            JSOCKCLOSE(sfd);
  ------------------
  |  |20806|      0|#define JSOCKCLOSE(x) close(x)
  ------------------
21621|      0|            janet_panicf("could not listen on file descriptor: %V", janet_ev_lasterr());
21622|      0|        }
21623|       |
21624|       |        /* Put sfd on our loop */
21625|      2|        JanetStream *stream = make_stream(sfd, JANET_STREAM_ACCEPTABLE);
  ------------------
  |  |  622|      2|#define JANET_STREAM_ACCEPTABLE 0x800
  ------------------
21626|      2|        return janet_wrap_abstract(stream);
  ------------------
  |  |  846|      2|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|      2|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21627|      2|    }
21628|      2|}
cfun_net_getsockname:
21683|      1|              "Gets the local address and port in a tuple in that order.") {
21684|      1|    janet_fixarity(argc, 1);
21685|      1|    JanetStream *js = janet_getabstract(argv, 0, &janet_stream_type);
21686|      1|    if (js->flags & JANET_STREAM_CLOSED) janet_panic("stream closed");
  ------------------
  |  |  617|      1|#define JANET_STREAM_CLOSED 0x1
  ------------------
  |  Branch (21686:9): [True: 0, False: 1]
  ------------------
21687|      1|    struct sockaddr_storage ss;
21688|      1|    socklen_t slen = sizeof(ss);
21689|      1|    memset(&ss, 0, slen);
21690|      1|    if (getsockname((JSock)js->handle, (struct sockaddr *) &ss, &slen)) {
  ------------------
  |  Branch (21690:9): [True: 0, False: 1]
  ------------------
21691|      0|        janet_panicf("Failed to get localname on %v: %V", argv[0], janet_ev_lasterr());
21692|      0|    }
21693|      1|    janet_assert(slen <= (socklen_t) sizeof(ss), "socket address truncated");
  ------------------
  |  |  386|      1|#define janet_assert(c, m) do { \
  |  |  387|      1|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 1]
  |  |  ------------------
  |  |  388|      1|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 1]
  |  |  ------------------
  ------------------
21694|      1|    return janet_so_getname(&ss);
21695|      1|}
cfun_stream_accept_loop:
21725|      1|              "Blocks the current fiber until the stream is closed, and will return the stream.") {
21726|      1|    janet_fixarity(argc, 2);
21727|      1|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21728|      1|    janet_stream_flags(stream, JANET_STREAM_ACCEPTABLE | JANET_STREAM_SOCKET);
  ------------------
  |  |  622|      1|#define JANET_STREAM_ACCEPTABLE 0x800
  ------------------
                  janet_stream_flags(stream, JANET_STREAM_ACCEPTABLE | JANET_STREAM_SOCKET);
  ------------------
  |  |  618|      1|#define JANET_STREAM_SOCKET 0x2
  ------------------
21729|      1|    JanetFunction *fun = janet_getfunction(argv, 1);
21730|      1|    if (fun->def->min_arity < 1) janet_panic("handler function must take at least 1 argument");
  ------------------
  |  Branch (21730:9): [True: 0, False: 1]
  ------------------
21731|      1|    janet_sched_accept(stream, fun);
21732|      1|}
cfun_stream_accept:
21738|      1|              "Returns a new duplex stream which represents a connection to the client.") {
21739|      1|    janet_arity(argc, 1, 2);
21740|      1|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21741|      1|    janet_stream_flags(stream, JANET_STREAM_ACCEPTABLE | JANET_STREAM_SOCKET);
  ------------------
  |  |  622|      1|#define JANET_STREAM_ACCEPTABLE 0x800
  ------------------
                  janet_stream_flags(stream, JANET_STREAM_ACCEPTABLE | JANET_STREAM_SOCKET);
  ------------------
  |  |  618|      1|#define JANET_STREAM_SOCKET 0x2
  ------------------
21742|      1|    double to = janet_optnumber(argv, argc, 1, INFINITY);
21743|      1|    if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21743:9): [True: 0, False: 1]
  ------------------
21744|       |    janet_sched_accept(stream, NULL);
21745|      1|}
cfun_stream_read:
21753|      2|              "Returns a buffer with up to n more bytes in it, or raises an error if the read failed.") {
21754|      2|    janet_arity(argc, 2, 4);
21755|      2|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21756|      2|    janet_stream_flags(stream, JANET_STREAM_READABLE | JANET_STREAM_SOCKET);
  ------------------
  |  |  620|      2|#define JANET_STREAM_READABLE 0x200
  ------------------
                  janet_stream_flags(stream, JANET_STREAM_READABLE | JANET_STREAM_SOCKET);
  ------------------
  |  |  618|      2|#define JANET_STREAM_SOCKET 0x2
  ------------------
21757|      2|    JanetBuffer *buffer = janet_optbuffer(argv, argc, 2, 10);
21758|      2|    double to = janet_optnumber(argv, argc, 3, INFINITY);
21759|      2|    if (janet_keyeq(argv[1], "all")) {
  ------------------
  |  Branch (21759:9): [True: 0, False: 2]
  ------------------
21760|      0|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21760:13): [True: 0, False: 0]
  ------------------
21761|      0|        janet_ev_recvchunk(stream, buffer, INT32_MAX, MSG_NOSIGNAL);
21762|      2|    } else {
21763|      2|        int32_t n = janet_getnat(argv, 1);
21764|      2|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21764:13): [True: 0, False: 2]
  ------------------
21765|       |        janet_ev_recv(stream, buffer, n, MSG_NOSIGNAL);
21766|      2|    }
21767|      2|}
cfun_stream_chunk:
21772|      2|              "Takes an optional timeout in seconds, after which will raise an error.") {
21773|      2|    janet_arity(argc, 2, 4);
21774|      2|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21775|      2|    janet_stream_flags(stream, JANET_STREAM_READABLE | JANET_STREAM_SOCKET);
  ------------------
  |  |  620|      2|#define JANET_STREAM_READABLE 0x200
  ------------------
                  janet_stream_flags(stream, JANET_STREAM_READABLE | JANET_STREAM_SOCKET);
  ------------------
  |  |  618|      2|#define JANET_STREAM_SOCKET 0x2
  ------------------
21776|      2|    int32_t n = janet_getnat(argv, 1);
21777|      2|    JanetBuffer *buffer = janet_optbuffer(argv, argc, 2, 10);
21778|      2|    double to = janet_optnumber(argv, argc, 3, INFINITY);
21779|      2|    if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21779:9): [True: 0, False: 2]
  ------------------
21780|       |    janet_ev_recvchunk(stream, buffer, n, MSG_NOSIGNAL);
21781|      2|}
cfun_stream_recv_from:
21786|      2|              "packet came from. Takes an optional timeout in seconds, after which will raise an error.") {
21787|      2|    janet_arity(argc, 3, 4);
21788|      2|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21789|      2|    janet_stream_flags(stream, JANET_STREAM_UDPSERVER | JANET_STREAM_SOCKET);
  ------------------
  |  |  623|      2|#define JANET_STREAM_UDPSERVER 0x1000
  ------------------
                  janet_stream_flags(stream, JANET_STREAM_UDPSERVER | JANET_STREAM_SOCKET);
  ------------------
  |  |  618|      2|#define JANET_STREAM_SOCKET 0x2
  ------------------
21790|      2|    int32_t n = janet_getnat(argv, 1);
21791|      2|    JanetBuffer *buffer = janet_getbuffer(argv, 2);
21792|      2|    double to = janet_optnumber(argv, argc, 3, INFINITY);
21793|      2|    if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21793:9): [True: 0, False: 2]
  ------------------
21794|       |    janet_ev_recvfrom(stream, buffer, n, MSG_NOSIGNAL);
21795|      2|}
cfun_stream_write:
21801|      3|              "Returns nil, or raises an error if the write failed.") {
21802|      3|    janet_arity(argc, 2, 3);
21803|      3|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21804|      3|    janet_stream_flags(stream, JANET_STREAM_WRITABLE | JANET_STREAM_SOCKET);
  ------------------
  |  |  621|      3|#define JANET_STREAM_WRITABLE 0x400
  ------------------
                  janet_stream_flags(stream, JANET_STREAM_WRITABLE | JANET_STREAM_SOCKET);
  ------------------
  |  |  618|      3|#define JANET_STREAM_SOCKET 0x2
  ------------------
21805|      3|    double to = janet_optnumber(argv, argc, 2, INFINITY);
21806|      3|    if (janet_checktype(argv[1], JANET_BUFFER)) {
  ------------------
  |  |  801|      3|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 3]
  |  |  |  Branch (801:6): [Folded, False: 3]
  |  |  ------------------
  |  |  802|      3|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      3|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      3|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      3|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21807|      0|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21807:13): [True: 0, False: 0]
  ------------------
21808|      0|        janet_ev_send_buffer(stream, janet_getbuffer(argv, 1), MSG_NOSIGNAL);
21809|      3|    } else {
21810|      3|        JanetByteView bytes = janet_getbytes(argv, 1);
21811|      3|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21811:13): [True: 0, False: 3]
  ------------------
21812|       |        janet_ev_send_string(stream, bytes.bytes, MSG_NOSIGNAL);
21813|      3|    }
21814|      3|}
cfun_stream_send_to:
21820|      3|              "Returns stream.") {
21821|      3|    janet_arity(argc, 3, 4);
21822|      3|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21823|      3|    janet_stream_flags(stream, JANET_STREAM_UDPSERVER | JANET_STREAM_SOCKET);
  ------------------
  |  |  623|      3|#define JANET_STREAM_UDPSERVER 0x1000
  ------------------
                  janet_stream_flags(stream, JANET_STREAM_UDPSERVER | JANET_STREAM_SOCKET);
  ------------------
  |  |  618|      3|#define JANET_STREAM_SOCKET 0x2
  ------------------
21824|      3|    void *dest = janet_getabstract(argv, 1, &janet_address_type);
21825|      3|    double to = janet_optnumber(argv, argc, 3, INFINITY);
21826|      3|    if (janet_checktype(argv[2], JANET_BUFFER)) {
  ------------------
  |  |  801|      3|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 3]
  |  |  |  Branch (801:6): [Folded, False: 3]
  |  |  ------------------
  |  |  802|      3|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      3|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      3|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      3|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21827|      0|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21827:13): [True: 0, False: 0]
  ------------------
21828|      0|        janet_ev_sendto_buffer(stream, janet_getbuffer(argv, 2), dest, MSG_NOSIGNAL);
21829|      3|    } else {
21830|      3|        JanetByteView bytes = janet_getbytes(argv, 2);
21831|      3|        if (to != INFINITY) janet_addtimeout(to);
  ------------------
  |  Branch (21831:13): [True: 0, False: 3]
  ------------------
21832|       |        janet_ev_sendto_string(stream, bytes.bytes, dest, MSG_NOSIGNAL);
21833|      3|    }
21834|      3|}
cfun_net_setsockopt:
21891|      3|             ) {
21892|      3|    janet_arity(argc, 3, 3);
21893|      3|    JanetStream *stream = janet_getabstract(argv, 0, &janet_stream_type);
21894|      3|    janet_stream_flags(stream, JANET_STREAM_SOCKET);
  ------------------
  |  |  618|      3|#define JANET_STREAM_SOCKET 0x2
  ------------------
21895|      3|    JanetKeyword optstr = janet_getkeyword(argv, 1);
21896|       |
21897|      3|    const struct sockopt_type *st = sockopt_type_list;
21898|      3|    while (st->name) {
  ------------------
  |  Branch (21898:12): [True: 0, False: 3]
  ------------------
21899|      0|        if (janet_cstrcmp(optstr, st->name) == 0) {
  ------------------
  |  Branch (21899:13): [True: 0, False: 0]
  ------------------
21900|      0|            break;
21901|      0|        }
21902|      0|        st++;
21903|      0|    }
21904|       |
21905|      3|    if (st->name == NULL) {
  ------------------
  |  Branch (21905:9): [True: 0, False: 3]
  ------------------
21906|      0|        janet_panicf("unknown socket option %q", argv[1]);
21907|      0|    }
21908|       |
21909|      3|    union {
21910|      3|        unsigned char v_uchar;
21911|      3|        int v_int;
21912|      3|        struct ip_mreq v_mreq;
21913|      3|#ifndef JANET_NO_IPV6
21914|      3|        struct ipv6_mreq v_mreq6;
21915|      3|#endif
21916|      3|    } val;
21917|       |
21918|      3|    void *optval = (void *)&val;
21919|      3|    socklen_t optlen = 0;
21920|       |
21921|      3|    if (st->type == JANET_BOOLEAN) {
  ------------------
  |  Branch (21921:9): [True: 0, False: 3]
  ------------------
21922|      0|        val.v_int = janet_getboolean(argv, 2);
21923|      0|        optlen = sizeof(val.v_int);
21924|      3|    } else if (st->type == JANET_NUMBER) {
  ------------------
  |  Branch (21924:16): [True: 0, False: 3]
  ------------------
21925|       |#if defined(JANET_BSD) || defined(JANET_ILLUMOS)
21926|       |        int v_int = janet_getinteger(argv, 2);
21927|       |        if (st->optname == IP_MULTICAST_TTL) {
21928|       |            val.v_uchar = v_int;
21929|       |            optlen = sizeof(val.v_uchar);
21930|       |        } else {
21931|       |            val.v_int = v_int;
21932|       |            optlen = sizeof(val.v_int);
21933|       |        }
21934|       |#else
21935|      0|        val.v_int = janet_getinteger(argv, 2);
21936|      0|        optlen = sizeof(val.v_int);
21937|      0|#endif
21938|      3|    } else if (st->optname == IP_ADD_MEMBERSHIP || st->optname == IP_DROP_MEMBERSHIP) {
  ------------------
  |  Branch (21938:16): [True: 3, False: 0]
  |  Branch (21938:52): [True: 0, False: 0]
  ------------------
21939|      0|        const char *addr = janet_getcstring(argv, 2);
21940|      0|        memset(&val.v_mreq, 0, sizeof val.v_mreq);
21941|      0|        val.v_mreq.imr_interface.s_addr = htonl(INADDR_ANY);
21942|      0|        inet_pton(AF_INET, addr, &val.v_mreq.imr_multiaddr.s_addr);
21943|      0|        optlen = sizeof(val.v_mreq);
21944|      0|#ifndef JANET_NO_IPV6
21945|      3|    } else if (st->optname == IPV6_JOIN_GROUP || st->optname == IPV6_LEAVE_GROUP) {
  ------------------
  |  Branch (21945:16): [True: 3, False: 0]
  |  Branch (21945:50): [True: 0, False: 0]
  ------------------
21946|      0|        const char *addr = janet_getcstring(argv, 2);
21947|      0|        memset(&val.v_mreq6, 0, sizeof val.v_mreq6);
21948|      0|        val.v_mreq6.ipv6mr_interface = 0;
21949|      0|        inet_pton(AF_INET6, addr, &val.v_mreq6.ipv6mr_multiaddr);
21950|      0|        optlen = sizeof(val.v_mreq6);
21951|      0|#endif
21952|      3|    } else {
21953|      3|        janet_panicf("invalid socket option type");
21954|      3|    }
21955|       |
21956|      0|    janet_assert(optlen != 0, "invalid socket option value");
  ------------------
  |  |  386|      0|#define janet_assert(c, m) do { \
  |  |  387|      0|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  388|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
21957|       |
21958|      0|    int r = setsockopt((JSock) stream->handle, st->level, st->optname, optval, optlen);
21959|      0|    if (r == -1) {
  ------------------
  |  Branch (21959:9): [True: 0, False: 0]
  ------------------
21960|      0|        janet_panicf("setsockopt(%q): %s", argv[1], janet_strerror(errno));
21961|      0|    }
21962|       |
21963|      0|    return janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
21964|      0|}
janet_lib_net:
21988|  7.16k|void janet_lib_net(JanetTable *env) {
21989|  7.16k|    JanetRegExt net_cfuns[] = {
21990|  7.16k|        JANET_CORE_REG("net/address", cfun_net_sockaddr),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
21991|  7.16k|        JANET_CORE_REG("net/listen", cfun_net_listen),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
21992|  7.16k|        JANET_CORE_REG("net/socket", cfun_net_socket),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
21993|  7.16k|        JANET_CORE_REG("net/accept", cfun_stream_accept),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
21994|  7.16k|        JANET_CORE_REG("net/accept-loop", cfun_stream_accept_loop),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
21995|  7.16k|        JANET_CORE_REG("net/read", cfun_stream_read),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
21996|  7.16k|        JANET_CORE_REG("net/chunk", cfun_stream_chunk),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
21997|  7.16k|        JANET_CORE_REG("net/write", cfun_stream_write),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
21998|  7.16k|        JANET_CORE_REG("net/send-to", cfun_stream_send_to),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
21999|  7.16k|        JANET_CORE_REG("net/recv-from", cfun_stream_recv_from),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22000|  7.16k|        JANET_CORE_REG("net/flush", cfun_stream_flush),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22001|  7.16k|        JANET_CORE_REG("net/connect", cfun_net_connect),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22002|  7.16k|        JANET_CORE_REG("net/shutdown", cfun_net_shutdown),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22003|  7.16k|        JANET_CORE_REG("net/peername", cfun_net_getpeername),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22004|  7.16k|        JANET_CORE_REG("net/localname", cfun_net_getsockname),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22005|  7.16k|        JANET_CORE_REG("net/address-unpack", cfun_net_address_unpack),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22006|  7.16k|        JANET_CORE_REG("net/setsockopt", cfun_net_setsockopt),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
22007|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
22008|  7.16k|    };
22009|       |    janet_core_cfuns_ext(env, NULL, net_cfuns);
22010|  7.16k|}
janet_net_init:
22012|  7.65k|void janet_net_init(void) {
22013|       |#ifdef JANET_WINDOWS
22014|       |    WSADATA wsaData;
22015|       |    janet_assert(!WSAStartup(MAKEWORD(2, 2), &wsaData), "could not start winsock");
22016|       |    janet_vm.connect_ex_loaded = 0;
22017|       |    janet_vm.connect_ex = NULL;
22018|       |#endif
22019|  7.65k|}
janet_net_deinit:
22021|  7.65k|void janet_net_deinit(void) {
22022|       |#ifdef JANET_WINDOWS
22023|       |    WSACleanup();
22024|       |#endif
22025|  7.65k|}
os_which:
22192|      3|              "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.") {
22193|      3|    janet_arity(argc, 0, 1);
22194|      3|    if (argc == 1 && janet_truthy(argv[0])) {
  ------------------
  |  |  813|      1|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|      2|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  802|      2|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      2|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      1|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      1|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 1, False: 0]
  |  |  ------------------
  |  |  814|      1|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|      2|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  802|      2|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      2|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      1|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      1|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 1, False: 0]
  |  |  |  Branch (814:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (22194:9): [True: 1, False: 2]
  ------------------
22195|      1|        janet_getkeyword(argv, 0); /* Constrain to keywords */
22196|      1|        return janet_wrap_boolean(janet_equals(argv[0], os_which(0, NULL)));
  ------------------
  |  |  829|      1|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  817|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22197|      1|    }
22198|       |#if defined(JANET_OS_NAME)
22199|       |    return janet_ckeywordv(janet_stringify(JANET_OS_NAME));
22200|       |#elif defined(JANET_MINGW)
22201|       |    return janet_ckeywordv("mingw");
22202|       |#elif defined(JANET_CYGWIN)
22203|       |    return janet_ckeywordv("cygwin");
22204|       |#elif defined(JANET_WINDOWS)
22205|       |    return janet_ckeywordv("windows");
22206|       |#elif defined(JANET_APPLE)
22207|       |    return janet_ckeywordv("macos");
22208|       |#elif defined(__EMSCRIPTEN__)
22209|       |    return janet_ckeywordv("web");
22210|       |#elif defined(JANET_LINUX)
22211|      2|    return janet_ckeywordv("linux");
  ------------------
  |  | 1833|      2|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      2|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      2|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22212|       |#elif defined(__FreeBSD__)
22213|       |    return janet_ckeywordv("freebsd");
22214|       |#elif defined(__NetBSD__)
22215|       |    return janet_ckeywordv("netbsd");
22216|       |#elif defined(__OpenBSD__)
22217|       |    return janet_ckeywordv("openbsd");
22218|       |#elif defined(__DragonFly__)
22219|       |    return janet_ckeywordv("dragonfly");
22220|       |#elif defined(JANET_BSD)
22221|       |    return janet_ckeywordv("bsd");
22222|       |#elif defined(JANET_ILLUMOS)
22223|       |    return janet_ckeywordv("illumos");
22224|       |#else
22225|       |    return janet_ckeywordv("posix");
22226|       |#endif
22227|      3|}
os_arch:
22243|      1|              "* :unknown\n") {
22244|      1|    janet_fixarity(argc, 0);
22245|      1|    (void) argv;
22246|       |    /* Check 64-bit vs 32-bit */
22247|       |#if defined(JANET_ARCH_NAME)
22248|       |    return janet_ckeywordv(janet_stringify(JANET_ARCH_NAME));
22249|       |#elif defined(__EMSCRIPTEN__)
22250|       |    return janet_ckeywordv("wasm");
22251|       |#elif (defined(__x86_64__) || defined(_M_X64))
22252|      1|    return janet_ckeywordv("x64");
  ------------------
  |  | 1833|      1|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      1|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      1|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22253|       |#elif defined(__i386) || defined(_M_IX86)
22254|       |    return janet_ckeywordv("x86");
22255|       |#elif defined(_M_ARM64) || defined(__aarch64__)
22256|       |    return janet_ckeywordv("aarch64");
22257|       |#elif defined(_M_ARM) || defined(__arm__)
22258|       |    return janet_ckeywordv("arm");
22259|       |#elif (defined(__riscv) && (__riscv_xlen == 64))
22260|       |    return janet_ckeywordv("riscv64");
22261|       |#elif (defined(__riscv) && (__riscv_xlen == 32))
22262|       |    return janet_ckeywordv("riscv32");
22263|       |#elif (defined(__sparc__))
22264|       |    return janet_ckeywordv("sparc");
22265|       |#elif (defined(__ppc__))
22266|       |    return janet_ckeywordv("ppc");
22267|       |#elif (defined(__ppc64__) || defined(_ARCH_PPC64) || defined(_M_PPC))
22268|       |    return janet_ckeywordv("ppc64");
22269|       |#elif (defined(__s390x__))
22270|       |    return janet_ckeywordv("s390x");
22271|       |#elif (defined(__s390__))
22272|       |    return janet_ckeywordv("s390");
22273|       |#else
22274|       |    return janet_ckeywordv("unknown");
22275|       |#endif
22276|      1|}
os_exit:
22309|      1|              "skip cleanup code.") {
22310|      1|    janet_arity(argc, 0, 2);
22311|      1|    janet_sandbox_assert(JANET_SANDBOX_EXIT);
  ------------------
  |  | 2035|      1|#define JANET_SANDBOX_EXIT 524288
  ------------------
22312|      1|    int status;
22313|      1|    if (argc == 0) {
  ------------------
  |  Branch (22313:9): [True: 0, False: 1]
  ------------------
22314|      0|        status = EXIT_SUCCESS;
22315|      1|    } else if (janet_checkint(argv[0])) {
  ------------------
  |  Branch (22315:16): [True: 0, False: 1]
  ------------------
22316|      0|        status = janet_unwrap_integer(argv[0]);
  ------------------
  |  |  957|      0|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
22317|      1|    } else {
22318|      1|        status = EXIT_FAILURE;
22319|      1|    }
22320|      1|    int force = (argc >= 2 && janet_truthy(argv[1]));
  ------------------
  |  |  813|      0|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 0, False: 0]
  |  |  ------------------
  |  |  814|      0|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 0, False: 0]
  |  |  |  Branch (814:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (22320:18): [True: 0, False: 1]
  ------------------
22321|      1|    janet_deinit();
22322|      1|    if (force) {
  ------------------
  |  Branch (22322:9): [True: 0, False: 1]
  ------------------
22323|       |#ifdef JANET_PLAN9
22324|       |        exits(nil);
22325|       |#else
22326|      0|        _Exit(status);
22327|      0|#endif
22328|      1|    } else {
22329|      1|        exit(status);
22330|      1|    }
22331|      0|    return janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22332|      1|}
os_cpu_count:
22339|      3|              "unable to get an approximation, will return a default value dflt.") {
22340|      3|    janet_arity(argc, 0, 1);
22341|      3|    (void) argv; /* Prevent unused argument warning */
22342|       |#ifdef JANET_WINDOWS
22343|       |    SYSTEM_INFO info;
22344|       |    GetSystemInfo(&info);
22345|       |    return janet_wrap_integer(info.dwNumberOfProcessors);
22346|       |#elif defined(JANET_LINUX)
22347|       |    cpu_set_t cs;
22348|      3|    CPU_ZERO(&cs);
  ------------------
  |  Branch (22348:5): [Folded, False: 3]
  ------------------
22349|      3|    sched_getaffinity(0, sizeof(cs), &cs);
22350|      3|    int count = CPU_COUNT(&cs);
22351|      3|    return janet_wrap_integer(count);
  ------------------
  |  |  958|      3|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|      3|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
22352|       |#elif defined(JANET_BSD) && defined(HW_NCPUONLINE)
22353|       |    const int name[2] = {CTL_HW, HW_NCPUONLINE};
22354|       |    int result = 0;
22355|       |    size_t len = sizeof(int);
22356|       |    if (-1 == sysctl(name, 2, &result, &len, NULL, 0)) {
22357|       |        return argc > 0 ? argv[0] : janet_wrap_nil();
22358|       |    }
22359|       |    return janet_wrap_integer(result);
22360|       |#elif defined(JANET_BSD) && defined(HW_NCPU)
22361|       |    const int name[2] = {CTL_HW, HW_NCPU};
22362|       |    int result = 0;
22363|       |    size_t len = sizeof(int);
22364|       |    if (-1 == sysctl(name, 2, &result, &len, NULL, 0)) {
22365|       |        return argc > 0 ? argv[0] : janet_wrap_nil();
22366|       |    }
22367|       |    return janet_wrap_integer(result);
22368|       |#elif defined(JANET_ILLUMOS)
22369|       |    long result = sysconf(_SC_NPROCESSORS_CONF);
22370|       |    if (result < 0) {
22371|       |        return argc > 0 ? argv[0] : janet_wrap_nil();
22372|       |    }
22373|       |    return janet_wrap_integer(result);
22374|       |#elif defined(JANET_PLAN9)
22375|       |    return janet_wrap_integer(atoi(getenv("NPROC")));
22376|       |#else
22377|       |    return argc > 0 ? argv[0] : janet_wrap_nil();
22378|       |#endif
22379|      3|}
os_proc_kill:
22831|      1|              "ignored on Windows.") {
22832|      1|    janet_arity(argc, 1, 3);
22833|      1|    JanetProc *proc = janet_getabstract(argv, 0, &ProcAT);
22834|      1|    if (proc->flags & JANET_PROC_WAITED) {
  ------------------
  |  |22541|      1|#define JANET_PROC_WAITED 2
  ------------------
  |  Branch (22834:9): [True: 0, False: 1]
  ------------------
22835|      0|        janet_panicf("cannot kill process that has already finished");
22836|      0|    }
22837|       |#ifdef JANET_WINDOWS
22838|       |    if (proc->flags & JANET_PROC_CLOSED) {
22839|       |        janet_panicf("cannot close process handle that is already closed");
22840|       |    }
22841|       |    proc->flags |= JANET_PROC_CLOSED;
22842|       |    TerminateProcess(proc->pHandle, 1);
22843|       |    CloseHandle(proc->pHandle);
22844|       |    CloseHandle(proc->tHandle);
22845|       |#else
22846|      1|    int signal = -1;
22847|      1|    if (argc == 3) {
  ------------------
  |  Branch (22847:9): [True: 0, False: 1]
  ------------------
22848|      0|        signal = get_signal_kw(argv, 2);
22849|      0|    }
22850|      1|    int status = kill(proc->pid, signal == -1 ? SIGKILL : signal);
  ------------------
  |  Branch (22850:34): [True: 0, False: 1]
  ------------------
22851|      1|    if (status) {
  ------------------
  |  Branch (22851:9): [True: 0, False: 1]
  ------------------
22852|      0|        janet_panic(janet_strerror(errno));
22853|      0|    }
22854|      1|#endif
22855|       |    /* After killing process we wait on it. */
22856|      1|    if (argc > 1 && janet_truthy(argv[1])) {
  ------------------
  |  |  813|      0|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 0, False: 0]
  |  |  ------------------
  |  |  814|      0|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 0, False: 0]
  |  |  |  Branch (814:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (22856:9): [True: 0, False: 1]
  ------------------
22857|      0|#ifdef JANET_EV
22858|      0|        os_proc_wait_impl(proc);
22859|       |#else
22860|       |        return os_proc_wait_impl(proc);
22861|       |#endif
22862|      1|    } else {
22863|      1|        return argv[0];
22864|      1|    }
22865|      1|}
os_proc_close:
22871|      1|              "`proc` completes, return the exit code of `proc`. Otherwise, return nil.") {
22872|      1|    janet_fixarity(argc, 1);
22873|      1|    JanetProc *proc = janet_getabstract(argv, 0, &ProcAT);
22874|      1|#ifdef JANET_EV
22875|      1|    if (proc->flags & JANET_PROC_OWNS_STDIN) janet_stream_close(proc->in);
  ------------------
  |  |22544|      1|#define JANET_PROC_OWNS_STDIN 16
  ------------------
  |  Branch (22875:9): [True: 0, False: 1]
  ------------------
22876|      1|    if (proc->flags & JANET_PROC_OWNS_STDOUT) janet_stream_close(proc->out);
  ------------------
  |  |22545|      1|#define JANET_PROC_OWNS_STDOUT 32
  ------------------
  |  Branch (22876:9): [True: 0, False: 1]
  ------------------
22877|      1|    if (proc->flags & JANET_PROC_OWNS_STDERR) janet_stream_close(proc->err);
  ------------------
  |  |22546|      1|#define JANET_PROC_OWNS_STDERR 64
  ------------------
  |  Branch (22877:9): [True: 0, False: 1]
  ------------------
22878|       |#else
22879|       |    if (proc->flags & JANET_PROC_OWNS_STDIN) janet_file_close(proc->in);
22880|       |    if (proc->flags & JANET_PROC_OWNS_STDOUT) janet_file_close(proc->out);
22881|       |    if (proc->flags & JANET_PROC_OWNS_STDERR) janet_file_close(proc->err);
22882|       |#endif
22883|      1|    proc->flags &= ~(JANET_PROC_OWNS_STDIN | JANET_PROC_OWNS_STDOUT | JANET_PROC_OWNS_STDERR);
  ------------------
  |  |22544|      1|#define JANET_PROC_OWNS_STDIN 16
  ------------------
                  proc->flags &= ~(JANET_PROC_OWNS_STDIN | JANET_PROC_OWNS_STDOUT | JANET_PROC_OWNS_STDERR);
  ------------------
  |  |22545|      1|#define JANET_PROC_OWNS_STDOUT 32
  ------------------
                  proc->flags &= ~(JANET_PROC_OWNS_STDIN | JANET_PROC_OWNS_STDOUT | JANET_PROC_OWNS_STDERR);
  ------------------
  |  |22546|      1|#define JANET_PROC_OWNS_STDERR 64
  ------------------
22884|      1|    if (proc->flags & (JANET_PROC_WAITED | JANET_PROC_WAITING)) {
  ------------------
  |  |22541|      1|#define JANET_PROC_WAITED 2
  ------------------
                  if (proc->flags & (JANET_PROC_WAITED | JANET_PROC_WAITING)) {
  ------------------
  |  |22542|      1|#define JANET_PROC_WAITING 4
  ------------------
  |  Branch (22884:9): [True: 0, False: 1]
  ------------------
22885|      0|        return janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22886|      0|    }
22887|      1|#ifdef JANET_EV
22888|      1|    os_proc_wait_impl(proc);
22889|       |#else
22890|       |    return os_proc_wait_impl(proc);
22891|       |#endif
22892|      1|}
os_proc_getpid:
22896|      1|              "Get the process ID of the current process.") {
22897|      1|    janet_sandbox_assert(JANET_SANDBOX_SUBPROCESS);
  ------------------
  |  | 2014|      1|#define JANET_SANDBOX_SUBPROCESS 2
  ------------------
22898|      1|    janet_fixarity(argc, 0);
22899|      1|    (void) argv;
22900|       |#ifdef JANET_WINDOWS
22901|       |    return janet_wrap_number((double) _getpid());
22902|       |#else
22903|      1|    return janet_wrap_number((double) getpid());
  ------------------
  |  |  830|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
22904|      1|#endif
22905|      1|}
os_sigaction:
22968|      3|              "All signal handlers are the same as supported by `os/proc-kill`.") {
22969|      3|    janet_sandbox_assert(JANET_SANDBOX_SIGNAL);
  ------------------
  |  | 2026|      3|#define JANET_SANDBOX_SIGNAL 8192
  ------------------
22970|      3|    janet_arity(argc, 1, 3);
22971|       |#ifdef JANET_WINDOWS
22972|       |    (void) argv;
22973|       |    janet_panic("unsupported on this platform");
22974|       |#else
22975|       |    /* TODO - per thread signal masks */
22976|      3|    int rc;
22977|      3|    int sig = get_signal_kw(argv, 0);
22978|      3|    JanetFunction *handler = janet_optfunction(argv, argc, 1, NULL);
22979|      3|    int can_interrupt = janet_optboolean(argv, argc, 2, 0);
22980|      3|    Janet oldhandler = janet_table_get(&janet_vm.signal_handlers, janet_wrap_integer(sig));
  ------------------
  |  |  958|      3|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|      3|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
22981|      3|    if (!janet_checktype(oldhandler, JANET_NIL)) {
  ------------------
  |  |  801|      3|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 3]
  |  |  ------------------
  |  |  802|      3|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      3|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      3|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      3|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (22981:9): [True: 0, False: 3]
  ------------------
22982|      0|        janet_gcunroot(oldhandler);
22983|      0|    }
22984|      3|    if (NULL != handler) {
  ------------------
  |  Branch (22984:9): [True: 0, False: 3]
  ------------------
22985|      0|        Janet handlerv = janet_wrap_function(handler);
  ------------------
  |  |  847|      0|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22986|      0|        janet_gcroot(handlerv);
22987|      0|        janet_table_put(&janet_vm.signal_handlers, janet_wrap_integer(sig), handlerv);
  ------------------
  |  |  958|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
22988|      3|    } else {
22989|      3|        janet_table_put(&janet_vm.signal_handlers, janet_wrap_integer(sig), janet_wrap_nil());
  ------------------
  |  |  958|      3|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|      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());
  ------------------
  |  |  826|      3|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      3|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
22990|      3|    }
22991|      3|    struct sigaction action;
22992|      3|    sigset_t mask;
22993|      3|    sigaddset(&mask, sig);
22994|      3|    memset(&action, 0, sizeof(action));
22995|      3|    action.sa_flags |= SA_RESTART;
22996|      3|    if (can_interrupt) {
  ------------------
  |  Branch (22996:9): [True: 0, False: 3]
  ------------------
22997|       |#ifdef JANET_NO_INTERPRETER_INTERRUPT
22998|       |        janet_panic("interpreter interrupt not enabled");
22999|       |#else
23000|      0|        action.sa_handler = janet_signal_trampoline;
23001|      0|#endif
23002|      3|    } else {
23003|      3|        action.sa_handler = janet_signal_trampoline_no_interrupt;
23004|      3|    }
23005|      3|    action.sa_mask = mask;
23006|      3|    RETRY_EINTR(rc, sigaction(sig, &action, NULL));
  ------------------
  |  |  526|      3|#define RETRY_EINTR(RC, CALL) do { (RC) = CALL; } while((RC) < 0 && errno == EINTR)
  |  |  ------------------
  |  |  |  Branch (526:57): [True: 0, False: 3]
  |  |  |  Branch (526:69): [True: 0, False: 0]
  |  |  ------------------
  ------------------
23007|      3|    sigset_t set;
23008|      3|    sigemptyset(&set);
23009|      3|    sigaddset(&set, sig);
23010|       |#ifdef JANET_THREADS
23011|       |    pthread_sigmask(SIG_UNBLOCK, &set, NULL);
23012|       |#else
23013|      3|    sigprocmask(SIG_UNBLOCK, &set, NULL);
23014|      3|#endif
23015|      3|    return janet_wrap_nil();
  ------------------
  |  |  826|      3|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      3|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23016|      3|#endif
23017|      3|}
os_execute:
23553|      2|              "cause the program to block and deadlock.") {
23554|      2|    return os_execute_impl(argc, argv, JANET_EXECUTE_EXECUTE);
23555|      2|}
os_posix_exec:
23581|      1|              "does not allow redirection of stdio.") {
23582|       |#ifdef JANET_WINDOWS
23583|       |    (void) argc;
23584|       |    (void) argv;
23585|       |    janet_panic("not supported on Windows");
23586|       |#else
23587|      1|    return os_execute_impl(argc, argv, JANET_EXECUTE_EXEC);
23588|      1|#endif
23589|      1|}
os_posix_chroot:
23626|      3|              "Not supported on all systems (POSIX only).") {
23627|      3|    janet_sandbox_assert(JANET_SANDBOX_CHROOT);
  ------------------
  |  | 2027|      3|#define JANET_SANDBOX_CHROOT 16384
  ------------------
23628|      3|    janet_fixarity(argc, 1);
23629|       |#if defined(JANET_WINDOWS) || defined(JANET_PLAN9)
23630|       |    (void) argv;
23631|       |    janet_panic("not supported on Windows or Plan 9");
23632|       |#else
23633|      3|    const char *root = janet_getcstring(argv, 0);
23634|      3|    int result;
23635|      3|    do {
23636|      3|        result = chroot(root);
23637|      3|    } while (result == -1 && errno == EINTR);
  ------------------
  |  Branch (23637:14): [True: 0, False: 3]
  |  Branch (23637:30): [True: 0, False: 0]
  ------------------
23638|      3|    if (result == -1) {
  ------------------
  |  Branch (23638:9): [True: 0, False: 3]
  ------------------
23639|      0|        janet_panic(janet_strerror(errno));
23640|      0|    }
23641|      3|    return janet_wrap_nil();
  ------------------
  |  |  826|      3|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      3|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23642|      3|#endif
23643|      3|}
os_environ:
23690|      3|              "Get a copy of the OS environment table.") {
23691|      3|    janet_sandbox_assert(JANET_SANDBOX_ENV);
  ------------------
  |  | 2021|      3|#define JANET_SANDBOX_ENV 256
  ------------------
23692|      3|    (void) argv;
23693|      3|    janet_fixarity(argc, 0);
23694|      3|    int32_t nenv = 0;
23695|      3|    janet_lock_environ();
23696|      3|    char **env = environ;
23697|    102|    while (*env++)
  ------------------
  |  Branch (23697:12): [True: 99, False: 3]
  ------------------
23698|     99|        nenv += 1;
23699|      3|    JanetTable *t = janet_table(nenv);
23700|    102|    for (int32_t i = 0; i < nenv; i++) {
  ------------------
  |  Branch (23700:25): [True: 99, False: 3]
  ------------------
23701|     99|        char *e = environ[i];
23702|     99|        char *eq = strchr(e, '=');
23703|     99|        if (!eq) {
  ------------------
  |  Branch (23703:13): [True: 0, False: 99]
  ------------------
23704|      0|            janet_unlock_environ();
23705|      0|            janet_panic("no '=' in environ");
23706|      0|        }
23707|     99|        char *v = eq + 1;
23708|     99|        int32_t full_len = (int32_t) strlen(e);
23709|     99|        int32_t val_len = (int32_t) strlen(v);
23710|     99|        janet_table_put(
23711|     99|            t,
23712|     99|            janet_stringv((const uint8_t *)e, full_len - val_len - 1),
  ------------------
  |  | 1817|     99|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  843|     99|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|     99|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|     99|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|     99|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23713|     99|            janet_stringv((const uint8_t *)v, val_len)
  ------------------
  |  | 1817|     99|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  843|     99|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|     99|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|     99|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|     99|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23714|     99|        );
23715|     99|    }
23716|      3|    janet_unlock_environ();
23717|      3|    return janet_wrap_table(t);
  ------------------
  |  |  841|      3|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|      3|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23718|      3|}
os_getenv:
23723|      3|              "Get the string value of an environment variable.") {
23724|      3|    janet_sandbox_assert(JANET_SANDBOX_ENV);
  ------------------
  |  | 2021|      3|#define JANET_SANDBOX_ENV 256
  ------------------
23725|      3|    janet_arity(argc, 1, 2);
23726|      3|    const char *cstr = janet_getcstring(argv, 0);
23727|      3|    janet_lock_environ();
23728|      3|    const char *res = getenv(cstr);
23729|      3|    Janet ret = res
  ------------------
  |  Branch (23729:17): [True: 0, False: 3]
  ------------------
23730|      3|                ? janet_cstringv(res)
  ------------------
  |  | 1816|      3|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  843|      0|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23731|      3|                : argc == 2
  ------------------
  |  Branch (23731:19): [True: 0, False: 3]
  ------------------
23732|      3|                ? argv[1]
23733|      3|                : janet_wrap_nil();
  ------------------
  |  |  826|      3|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      3|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23734|      3|    janet_unlock_environ();
23735|      3|    return ret;
23736|      3|}
os_setenv:
23740|      1|              "Set an environment variable.") {
23741|       |#ifdef JANET_WINDOWS
23742|       |#define SETENV(K,V) _putenv_s(K, V)
23743|       |#define UNSETENV(K) _putenv_s(K, "")
23744|       |#elif defined(JANET_PLAN9)
23745|       |#define SETENV(K,V) putenv(K, V)
23746|       |#define UNSETENV(K) unsetenv(K)
23747|       |#else
23748|      1|#define SETENV(K,V) setenv(K, V, 1)
23749|      1|#define UNSETENV(K) unsetenv(K)
23750|      1|#endif
23751|      1|    janet_sandbox_assert(JANET_SANDBOX_ENV);
  ------------------
  |  | 2021|      1|#define JANET_SANDBOX_ENV 256
  ------------------
23752|      1|    janet_arity(argc, 1, 2);
23753|      1|    const char *ks = janet_getcstring(argv, 0);
23754|      1|    const char *vs = janet_optcstring(argv, argc, 1, NULL);
23755|      1|    janet_lock_environ();
23756|      1|    if (NULL == vs) {
  ------------------
  |  Branch (23756:9): [True: 0, False: 1]
  ------------------
23757|      0|        UNSETENV(ks);
  ------------------
  |  |23749|      0|#define UNSETENV(K) unsetenv(K)
  ------------------
23758|      1|    } else {
23759|      1|        SETENV(ks, vs);
  ------------------
  |  |23748|      1|#define SETENV(K,V) setenv(K, V, 1)
  ------------------
23760|      1|    }
23761|      1|    janet_unlock_environ();
23762|      1|    return janet_wrap_nil();
  ------------------
  |  |  826|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23763|      1|}
os_time:
23768|      9|              "January 1, 1970, the Unix epoch. Returns a real number.") {
23769|      9|    janet_fixarity(argc, 0);
23770|      9|    (void) argv;
23771|      9|    double dtime = (double)(time(NULL));
23772|      9|    return janet_wrap_number(dtime);
  ------------------
  |  |  830|      9|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
23773|      9|}
os_clock:
23788|     11|              "- :tuple: Return a 2 integer tuple [seconds, nanoseconds]\n") {
23789|     11|    enum JanetTimeSource source;
23790|     11|    janet_sandbox_assert(JANET_SANDBOX_HRTIME);
  ------------------
  |  | 2020|     11|#define JANET_SANDBOX_HRTIME 128
  ------------------
23791|     11|    janet_arity(argc, 0, 2);
23792|       |
23793|     11|    JanetKeyword sourcestr = janet_optkeyword(argv, argc, 0, NULL);
23794|     11|    if (sourcestr == NULL || janet_cstrcmp(sourcestr, "realtime") == 0) {
  ------------------
  |  Branch (23794:9): [True: 3, False: 8]
  |  Branch (23794:30): [True: 0, False: 8]
  ------------------
23795|      1|        source = JANET_TIME_REALTIME;
23796|     10|    } else if (janet_cstrcmp(sourcestr, "monotonic") == 0) {
  ------------------
  |  Branch (23796:16): [True: 0, False: 10]
  ------------------
23797|      0|        source = JANET_TIME_MONOTONIC;
23798|     10|    } else if (janet_cstrcmp(sourcestr, "cputime") == 0) {
  ------------------
  |  Branch (23798:16): [True: 0, False: 10]
  ------------------
23799|      0|        source = JANET_TIME_CPUTIME;
23800|     10|    } else {
23801|     10|        janet_panicf("expected :realtime, :monotonic, or :cputime, got %v", argv[0]);
23802|     10|    }
23803|       |
23804|      1|    struct timespec tv;
23805|      1|    if (janet_gettime(&tv, source)) janet_panic("could not get time");
  ------------------
  |  Branch (23805:9): [True: 0, False: 1]
  ------------------
23806|       |
23807|      1|    JanetKeyword formatstr = janet_optkeyword(argv, argc, 1, NULL);
23808|      1|    if (formatstr == NULL || janet_cstrcmp(formatstr, "double") == 0) {
  ------------------
  |  Branch (23808:9): [True: 1, False: 0]
  |  Branch (23808:30): [True: 0, False: 0]
  ------------------
23809|      1|        double dtime = (double)(tv.tv_sec + (tv.tv_nsec / 1E9));
23810|      1|        return janet_wrap_number(dtime);
  ------------------
  |  |  830|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
23811|      1|    } else if (janet_cstrcmp(formatstr, "int") == 0) {
  ------------------
  |  Branch (23811:16): [True: 0, False: 0]
  ------------------
23812|      0|        return janet_wrap_number((double)(tv.tv_sec));
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
23813|      0|    } else if (janet_cstrcmp(formatstr, "tuple") == 0) {
  ------------------
  |  Branch (23813:16): [True: 0, False: 0]
  ------------------
23814|      0|        Janet tup[2] = {janet_wrap_number((double)tv.tv_sec),
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
23815|      0|                        janet_wrap_number((double)tv.tv_nsec)
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
23816|      0|                       };
23817|      0|        return janet_wrap_tuple(janet_tuple_n(tup, 2));
  ------------------
  |  |  838|      0|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23818|      0|    } else {
23819|      0|        janet_panicf("expected :double, :int, or :tuple, got %v", argv[1]);
23820|      0|    }
23821|      1|}
os_sleep:
23826|      5|              "nil.") {
23827|      5|    janet_fixarity(argc, 1);
23828|      5|    double delay = janet_getnumber(argv, 0);
23829|      5|    if (delay < 0) janet_panic("invalid argument to sleep");
  ------------------
  |  Branch (23829:9): [True: 0, False: 5]
  ------------------
23830|       |#ifdef JANET_WINDOWS
23831|       |    Sleep((DWORD)(delay * 1000));
23832|       |#else
23833|      5|    int rc;
23834|      5|    struct timespec ts;
23835|      5|    ts.tv_sec = (time_t) delay;
23836|      5|    ts.tv_nsec = (delay <= UINT32_MAX)
  ------------------
  |  Branch (23836:18): [True: 1, False: 4]
  ------------------
23837|      5|                 ? (long)((delay - ((uint32_t)delay)) * 1000000000)
23838|      5|                 : 0;
23839|      5|    RETRY_EINTR(rc, nanosleep(&ts, &ts));
  ------------------
  |  |  526|      5|#define RETRY_EINTR(RC, CALL) do { (RC) = CALL; } while((RC) < 0 && errno == EINTR)
  |  |  ------------------
  |  |  |  Branch (526:57): [True: 2, False: 3]
  |  |  |  Branch (526:69): [True: 0, False: 2]
  |  |  ------------------
  ------------------
23840|      5|#endif
23841|      5|    return janet_wrap_nil();
  ------------------
  |  |  826|      5|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      5|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      5|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      5|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23842|      5|}
os_isatty:
23847|      5|              "it will default to standard output.") {
23848|      5|    janet_arity(argc, 0, 1);
23849|      5|    FILE *f = (argc == 1) ? janet_getfile(argv, 0, NULL) : stdout;
  ------------------
  |  Branch (23849:15): [True: 1, False: 4]
  ------------------
23850|       |#ifdef JANET_WINDOWS
23851|       |    int fd = _fileno(f);
23852|       |    if (fd == -1) janet_panic("not a valid stream");
23853|       |    return janet_wrap_boolean(_isatty(fd));
23854|       |#else
23855|      5|    int fd = fileno(f);
23856|      5|    if (fd == -1) janet_panic(janet_strerror(errno));
  ------------------
  |  Branch (23856:9): [True: 0, False: 5]
  ------------------
23857|      5|    return janet_wrap_boolean(isatty(fd));
  ------------------
  |  |  829|      5|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  817|      5|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      5|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      5|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23858|      5|#endif
23859|      5|}
os_cryptorand:
23879|     24|              "Get or append `n` bytes of good quality random data provided by the OS. Returns a new buffer or `buf`.") {
23880|     24|    JanetBuffer *buffer;
23881|     24|    janet_arity(argc, 1, 2);
23882|     24|    int32_t offset;
23883|     24|    int32_t n = janet_getinteger(argv, 0);
23884|     24|    if (n < 0) janet_panic("expected positive integer");
  ------------------
  |  Branch (23884:9): [True: 6, False: 18]
  ------------------
23885|     18|    if (argc == 2) {
  ------------------
  |  Branch (23885:9): [True: 4, False: 14]
  ------------------
23886|      4|        buffer = janet_getbuffer(argv, 1);
23887|      4|        offset = buffer->count;
23888|     14|    } else {
23889|     14|        offset = 0;
23890|     14|        buffer = janet_buffer(n);
23891|     14|    }
23892|       |    /* We could optimize here by adding setcount_uninit */
23893|     18|    janet_buffer_setcount(buffer, offset + n);
23894|       |
23895|     18|    if (janet_cryptorand(buffer->data + offset, n) != 0)
  ------------------
  |  Branch (23895:9): [True: 0, False: 18]
  ------------------
23896|      0|        janet_panic("unable to get sufficient random data");
23897|       |
23898|     18|    return janet_wrap_buffer(buffer);
  ------------------
  |  |  842|     18|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  820|     18|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     18|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     18|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23899|     18|}
os_date:
23954|      4|              "See tzset(<time.h>) or _tzset(<time.h>) for further details.") {
23955|      4|    janet_arity(argc, 0, 2);
23956|      4|    (void) argv;
23957|      4|    struct tm t_infos;
23958|      4|    struct tm *t_info = time_to_tm(argv, argc, 0, &t_infos);
23959|      4|    JanetKV *st = janet_struct_begin(9);
23960|      4|    janet_struct_put(st, janet_ckeywordv("seconds"), janet_wrap_number(t_info->tm_sec));
  ------------------
  |  | 1833|      4|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      4|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      4|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      4|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_struct_put(st, janet_ckeywordv("seconds"), janet_wrap_number(t_info->tm_sec));
  ------------------
  |  |  830|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
23961|      4|    janet_struct_put(st, janet_ckeywordv("minutes"), janet_wrap_number(t_info->tm_min));
  ------------------
  |  | 1833|      4|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      4|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      4|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      4|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_struct_put(st, janet_ckeywordv("minutes"), janet_wrap_number(t_info->tm_min));
  ------------------
  |  |  830|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
23962|      4|    janet_struct_put(st, janet_ckeywordv("hours"), janet_wrap_number(t_info->tm_hour));
  ------------------
  |  | 1833|      4|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      4|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      4|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      4|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_struct_put(st, janet_ckeywordv("hours"), janet_wrap_number(t_info->tm_hour));
  ------------------
  |  |  830|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
23963|      4|    janet_struct_put(st, janet_ckeywordv("month-day"), janet_wrap_number(t_info->tm_mday - 1));
  ------------------
  |  | 1833|      4|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      4|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      4|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      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));
  ------------------
  |  |  830|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
23964|      4|    janet_struct_put(st, janet_ckeywordv("month"), janet_wrap_number(t_info->tm_mon));
  ------------------
  |  | 1833|      4|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      4|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      4|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      4|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_struct_put(st, janet_ckeywordv("month"), janet_wrap_number(t_info->tm_mon));
  ------------------
  |  |  830|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
23965|      4|    janet_struct_put(st, janet_ckeywordv("year"), janet_wrap_number(t_info->tm_year + 1900));
  ------------------
  |  | 1833|      4|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      4|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      4|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      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));
  ------------------
  |  |  830|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
23966|      4|    janet_struct_put(st, janet_ckeywordv("week-day"), janet_wrap_number(t_info->tm_wday));
  ------------------
  |  | 1833|      4|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      4|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      4|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      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));
  ------------------
  |  |  830|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
23967|      4|    janet_struct_put(st, janet_ckeywordv("year-day"), janet_wrap_number(t_info->tm_yday));
  ------------------
  |  | 1833|      4|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      4|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      4|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      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));
  ------------------
  |  |  830|      4|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
23968|      4|    janet_struct_put(st, janet_ckeywordv("dst"), janet_wrap_boolean(t_info->tm_isdst));
  ------------------
  |  | 1833|      4|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      4|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      4|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      4|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_struct_put(st, janet_ckeywordv("dst"), janet_wrap_boolean(t_info->tm_isdst));
  ------------------
  |  |  829|      4|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  817|      4|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      4|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23969|      4|    return janet_wrap_struct(janet_struct_end(st));
  ------------------
  |  |  837|      4|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  823|      4|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      4|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23970|      4|}
os_strftime:
23980|      1|              "See tzset(<time.h>) or _tzset(<time.h>) for further details.") {
23981|      1|    janet_arity(argc, 1, 3);
23982|      1|    const char *fmt = janet_getcstring(argv, 0);
23983|       |    /* ANSI X3.159-1989, section 4.12.3.5 "The strftime function" */
23984|      1|    static const char *valid = "aAbBcdHIjmMpSUwWxXyYZ%";
23985|      1|    const char *p = fmt;
23986|      1|    while (*p) {
  ------------------
  |  Branch (23986:12): [True: 0, False: 1]
  ------------------
23987|      0|        if (*p++ == '%') {
  ------------------
  |  Branch (23987:13): [True: 0, False: 0]
  ------------------
23988|      0|            if (!*p) {
  ------------------
  |  Branch (23988:17): [True: 0, False: 0]
  ------------------
23989|      0|                janet_panic("invalid conversion specifier");
23990|      0|            }
23991|      0|            if (!strchr(valid, *p)) {
  ------------------
  |  Branch (23991:17): [True: 0, False: 0]
  ------------------
23992|      0|                janet_panicf("invalid conversion specifier '%%%c'", *p);
23993|      0|            }
23994|      0|            p++;
23995|      0|        }
23996|      0|    }
23997|      1|    struct tm t_infos;
23998|      1|    struct tm *t_info = time_to_tm(argv, argc, 1, &t_infos);
23999|      1|    char buf[SIZETIMEFMT];
24000|      1|    (void)strftime(buf, sizeof(buf), fmt, t_info);
24001|      1|    return janet_cstringv(buf);
  ------------------
  |  | 1816|      1|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  843|      1|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      1|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24002|      1|}
os_mktime:
24066|      5|              "Inverse function to os/date.") {
24067|      5|    janet_arity(argc, 1, 2);
24068|      5|    time_t t;
24069|      5|    struct tm t_info;
24070|       |
24071|       |    /* Use memset instead of = {0} to silence paranoid warning in macos */
24072|      5|    memset(&t_info, 0, sizeof(t_info));
24073|       |
24074|      5|    if (!janet_checktype(argv[0], JANET_TABLE) &&
  ------------------
  |  |  801|     10|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 5]
  |  |  ------------------
  |  |  802|     10|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|     10|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      5|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      5|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      5|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      5|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (24074:9): [True: 3, False: 2]
  ------------------
24075|      3|            !janet_checktype(argv[0], JANET_STRUCT))
  ------------------
  |  |  801|      3|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 3]
  |  |  ------------------
  |  |  802|      3|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      3|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      3|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      3|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (24075:13): [True: 3, False: 0]
  ------------------
24076|      3|        janet_panic_type(argv[0], 0, JANET_TFLAG_DICTIONARY);
  ------------------
  |  |  609|      3|#define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  ------------------
  |  |  |  |  599|      3|#define JANET_TFLAG_TABLE (1 << JANET_TABLE)
  |  |  ------------------
  |  |               #define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  ------------------
  |  |  |  |  600|      3|#define JANET_TFLAG_STRUCT (1 << JANET_STRUCT)
  |  |  ------------------
  ------------------
24077|       |
24078|      2|    t_info.tm_sec = entry_getint(argv[0], "seconds");
24079|      2|    t_info.tm_min = entry_getint(argv[0], "minutes");
24080|      2|    t_info.tm_hour = entry_getint(argv[0], "hours");
24081|      2|    t_info.tm_mday = entry_getint(argv[0], "month-day") + 1;
24082|      2|    t_info.tm_mon = entry_getint(argv[0], "month");
24083|      2|    t_info.tm_year = entry_getint(argv[0], "year") - 1900;
24084|      2|    t_info.tm_isdst = entry_getdst(argv[0]);
24085|       |
24086|      2|    if (argc >= 2 && janet_truthy(argv[1])) {
  ------------------
  |  |  813|      0|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 0, False: 0]
  |  |  ------------------
  |  |  814|      0|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 0, False: 0]
  |  |  |  Branch (814:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (24086:9): [True: 0, False: 2]
  ------------------
24087|       |        /* local time */
24088|      0|        t = mktime(&t_info);
24089|      2|    } else {
24090|       |        /* utc time */
24091|       |#ifdef JANET_NO_UTC_MKTIME
24092|       |        janet_panic("os/mktime UTC not supported on this platform");
24093|       |#else
24094|      2|        t = timegm(&t_info);
24095|      2|#endif
24096|      2|    }
24097|       |
24098|      2|    if (t == (time_t) -1) {
  ------------------
  |  Branch (24098:9): [True: 0, False: 2]
  ------------------
24099|      0|        janet_panicf("%s", janet_strerror(errno));
24100|      0|    }
24101|       |
24102|      2|    return janet_wrap_number((double)t);
  ------------------
  |  |  830|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
24103|      2|}
os_setlocale:
24123|     24|              "other functions such as `os/strftime` and even `printf`.") {
24124|     24|    janet_arity(argc, 0, 2);
24125|     24|    const char *locale_name = janet_optcstring(argv, argc, 0, NULL);
24126|     24|    int category_int = LC_ALL;
24127|     24|    if (argc > 1 && !janet_checktype(argv[1], JANET_NIL)) {
  ------------------
  |  |  801|      3|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 3]
  |  |  ------------------
  |  |  802|      3|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      3|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      3|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      3|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (24127:9): [True: 3, False: 21]
  |  Branch (24127:21): [True: 3, False: 0]
  ------------------
24128|      3|        if (janet_keyeq(argv[1], "all")) {
  ------------------
  |  Branch (24128:13): [True: 0, False: 3]
  ------------------
24129|      0|            category_int = LC_ALL;
24130|      3|        } else if (janet_keyeq(argv[1], "collate")) {
  ------------------
  |  Branch (24130:20): [True: 0, False: 3]
  ------------------
24131|      0|            category_int = LC_COLLATE;
24132|      3|        } else if (janet_keyeq(argv[1], "ctype")) {
  ------------------
  |  Branch (24132:20): [True: 0, False: 3]
  ------------------
24133|      0|            category_int = LC_CTYPE;
24134|      3|        } else if (janet_keyeq(argv[1], "monetary")) {
  ------------------
  |  Branch (24134:20): [True: 0, False: 3]
  ------------------
24135|      0|            category_int = LC_MONETARY;
24136|      3|        } else if (janet_keyeq(argv[1], "numeric")) {
  ------------------
  |  Branch (24136:20): [True: 0, False: 3]
  ------------------
24137|      0|            category_int = LC_NUMERIC;
24138|      3|        } else if (janet_keyeq(argv[1], "time")) {
  ------------------
  |  Branch (24138:20): [True: 0, False: 3]
  ------------------
24139|      0|            category_int = LC_TIME;
24140|      3|        } else {
24141|      3|            janet_panicf("expected one of :all, :collate, :ctype, :monetary, :numeric, or :time, got %v", argv[1]);
24142|      3|        }
24143|      3|    }
24144|     21|    const char *old = setlocale(category_int, locale_name);
24145|     21|    if (old == NULL) return janet_wrap_nil();
  ------------------
  |  |  826|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (24145:9): [True: 1, False: 20]
  ------------------
24146|     20|    return janet_cstringv(old);
  ------------------
  |  | 1816|     20|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  843|     20|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|     20|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|     20|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|     20|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24147|     21|}
os_link:
24155|      1|              "creates a hard link. Does not work on Windows or Plan 9.") {
24156|      1|    janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2018|      1|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
24157|      1|    janet_arity(argc, 2, 3);
24158|       |#if defined(JANET_WINDOWS) || defined(JANET_PLAN9)
24159|       |    (void) argc;
24160|       |    (void) argv;
24161|       |    janet_panic("not supported on Windows or Plan 9");
24162|       |#else
24163|      1|    const char *oldpath = janet_getcstring(argv, 0);
24164|      1|    const char *newpath = janet_getcstring(argv, 1);
24165|      1|    int res = ((argc == 3 && janet_truthy(argv[2])) ? j_symlink : link)(oldpath, newpath);
  ------------------
  |  |  813|      0|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 0, False: 0]
  |  |  ------------------
  |  |  814|      0|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 0, False: 0]
  |  |  |  Branch (814:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                  int res = ((argc == 3 && janet_truthy(argv[2])) ? j_symlink : link)(oldpath, newpath);
  ------------------
  |  |24108|      0|#define j_symlink symlink
  ------------------
  |  Branch (24165:17): [True: 0, False: 1]
  ------------------
24166|      1|    if (-1 == res) janet_panicf("%s: %s -> %s", janet_strerror(errno), oldpath, newpath);
  ------------------
  |  Branch (24166:9): [True: 0, False: 1]
  ------------------
24167|      1|    return janet_wrap_nil();
  ------------------
  |  |  826|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24168|      1|#endif
24169|      1|}
os_symlink:
24173|      1|              "Create a symlink from oldpath to newpath, returning nil. Same as `(os/link oldpath newpath true)`.") {
24174|      1|    janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2018|      1|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
24175|      1|    janet_fixarity(argc, 2);
24176|       |#if defined(JANET_WINDOWS) || defined(JANET_PLAN9)
24177|       |    (void) argc;
24178|       |    (void) argv;
24179|       |    janet_panic("not supported on Windows or Plan 9");
24180|       |#else
24181|      1|    const char *oldpath = janet_getcstring(argv, 0);
24182|      1|    const char *newpath = janet_getcstring(argv, 1);
24183|      1|    int res = j_symlink(oldpath, newpath);
  ------------------
  |  |24108|      1|#define j_symlink symlink
  ------------------
24184|      1|    if (-1 == res) janet_panicf("%s: %s -> %s", janet_strerror(errno), oldpath, newpath);
  ------------------
  |  Branch (24184:9): [True: 0, False: 1]
  ------------------
24185|      1|    return janet_wrap_nil();
  ------------------
  |  |  826|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24186|      1|#endif
24187|      1|}
os_touch:
24244|      8|              "times to the current time.") {
24245|      8|    janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2018|      8|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
24246|      8|    janet_arity(argc, 1, 3);
24247|      8|    const char *path = janet_getcstring(argv, 0);
24248|      8|    struct utimbuf timebuf, *bufp;
24249|      8|    if (argc >= 2) {
  ------------------
  |  Branch (24249:9): [True: 5, False: 3]
  ------------------
24250|      5|        bufp = &timebuf;
24251|      5|        timebuf.actime = (time_t) janet_getnumber(argv, 1);
24252|      5|        if (argc >= 3) {
  ------------------
  |  Branch (24252:13): [True: 2, False: 3]
  ------------------
24253|      2|            timebuf.modtime = (time_t) janet_getnumber(argv, 2);
24254|      3|        } else {
24255|      3|            timebuf.modtime = timebuf.actime;
24256|      3|        }
24257|      5|    } else {
24258|      3|        bufp = NULL;
24259|      3|    }
24260|      8|    int res = utime(path, bufp);
24261|      8|    if (-1 == res) janet_panic(janet_strerror(errno));
  ------------------
  |  Branch (24261:9): [True: 2, False: 6]
  ------------------
24262|      6|    return janet_wrap_nil();
  ------------------
  |  |  826|      6|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      6|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      6|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      6|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24263|      8|}
os_stat:
24565|  6.24k|              "* :modified - timestamp when file last modified (content changed)\n") {
24566|  6.24k|    return os_stat_or_lstat(0, argc, argv);
24567|  6.24k|}
os_dir:
24617|      4|              "with only the file name or directory name and no prefix.") {
24618|      4|    janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2019|      4|#define JANET_SANDBOX_FS_READ 64
  ------------------
24619|      4|    janet_arity(argc, 1, 2);
24620|      4|    const char *dir = janet_getcstring(argv, 0);
24621|      4|    JanetArray *paths = (argc == 2) ? janet_getarray(argv, 1) : janet_array(0);
  ------------------
  |  Branch (24621:25): [True: 1, False: 3]
  ------------------
24622|       |#ifdef JANET_WINDOWS
24623|       |    /* Read directory items with FindFirstFile / FindNextFile / FindClose */
24624|       |    struct _finddata_t afile;
24625|       |    char pattern[MAX_PATH + 1];
24626|       |    if (strlen(dir) > (sizeof(pattern) - 3))
24627|       |        janet_panicf("path too long: %s", dir);
24628|       |    snprintf(pattern, sizeof(pattern), "%s/*", dir);
24629|       |    intptr_t res = _findfirst(pattern, &afile);
24630|       |    if (-1 == res) janet_panicv(janet_cstringv(janet_strerror(errno)));
24631|       |    do {
24632|       |        if (strcmp(".", afile.name) && strcmp("..", afile.name)) {
24633|       |            janet_array_push(paths, janet_cstringv(afile.name));
24634|       |        }
24635|       |    } while (_findnext(res, &afile) != -1);
24636|       |    _findclose(res);
24637|       |#else
24638|       |    /* Read directory items with opendir / readdir / closedir */
24639|      4|    struct dirent *dp;
24640|      4|    DIR *dfd = opendir(dir);
24641|      4|    if (dfd == NULL) janet_panicf("cannot open directory %s: %s", dir, janet_strerror(errno));
  ------------------
  |  Branch (24641:9): [True: 0, False: 4]
  ------------------
24642|      4|    for (;;) {
24643|      0|        errno = 0;
24644|      0|        dp = readdir(dfd);
24645|      0|        if (dp == NULL) {
  ------------------
  |  Branch (24645:13): [True: 0, False: 0]
  ------------------
24646|      0|            if (errno) {
  ------------------
  |  Branch (24646:17): [True: 0, False: 0]
  ------------------
24647|      0|                int olderr = errno;
24648|      0|                closedir(dfd);
24649|      0|                janet_panicf("failed to read directory %s: %s", dir, janet_strerror(olderr));
24650|      0|            }
24651|      0|            break;
24652|      0|        }
24653|      0|        if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) {
  ------------------
  |  Branch (24653:13): [True: 0, False: 0]
  |  Branch (24653:41): [True: 0, False: 0]
  ------------------
24654|      0|            continue;
24655|      0|        }
24656|      0|        janet_array_push(paths, janet_cstringv(dp->d_name));
  ------------------
  |  | 1816|      0|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  843|      0|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24657|      0|    }
24658|      4|    closedir(dfd);
24659|      4|#endif
24660|      4|    return janet_wrap_array(paths);
  ------------------
  |  |  840|      4|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  820|      4|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      4|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24661|      4|}
os_permission_string:
24712|  2.29k|              "include the file/directory/symlink character as rendered by `ls`.") {
24713|  2.29k|    janet_fixarity(argc, 1);
24714|  2.29k|    return os_make_permstring(os_get_unix_mode(argv, 0));
24715|  2.29k|}
os_permission_int:
24719|  1.02k|              "Parse a 9-character permission string and return an integer that can be used by chmod.") {
24720|  1.02k|    janet_fixarity(argc, 1);
24721|  1.02k|    return janet_wrap_integer(os_get_unix_mode(argv, 0));
  ------------------
  |  |  958|  1.02k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|  1.02k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
24722|  1.02k|}
os_open:
24762|     41|              "  * :b - FILE\\_FLAG\\_NO\\_BUFFERING\n") {
24763|     41|    janet_arity(argc, 1, 3);
24764|     41|    const char *path = janet_getcstring(argv, 0);
24765|     41|    const uint8_t *opt_flags = janet_optkeyword(argv, argc, 1, (const uint8_t *) "r");
24766|     41|    jmode_t mode = os_optmode(argc, argv, 2, 0666);
24767|     41|    uint32_t stream_flags = 0;
24768|     41|    int disable_stream_mode = 0;
24769|     41|    JanetHandle fd;
24770|       |#ifdef JANET_WINDOWS
24771|       |    (void) mode;
24772|       |    int inherited_handle = 0;
24773|       |    DWORD desiredAccess = 0;
24774|       |    DWORD shareMode = 0;
24775|       |    DWORD creationDisp = 0;
24776|       |    DWORD fileFlags = FILE_FLAG_OVERLAPPED;
24777|       |    DWORD fileAttributes = 0;
24778|       |    /* We map unix-like open flags to the creationDisp parameter */
24779|       |    int creatUnix = 0;
24780|       |#define OCREAT 1
24781|       |#define OEXCL 2
24782|       |#define OTRUNC 4
24783|       |    for (const uint8_t *c = opt_flags; *c; c++) {
24784|       |        switch (*c) {
24785|       |            default:
24786|       |                break;
24787|       |            case 'r':
24788|       |                desiredAccess |= GENERIC_READ;
24789|       |                stream_flags |= JANET_STREAM_READABLE;
24790|       |                janet_sandbox_assert(JANET_SANDBOX_FS_READ);
24791|       |                break;
24792|       |            case 'w':
24793|       |                desiredAccess |= GENERIC_WRITE;
24794|       |                stream_flags |= JANET_STREAM_WRITABLE;
24795|       |                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
24796|       |                break;
24797|       |            case 'a':
24798|       |                desiredAccess |= FILE_APPEND_DATA;
24799|       |                stream_flags |= JANET_STREAM_WRITABLE;
24800|       |                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
24801|       |                break;
24802|       |            case 'c':
24803|       |                creatUnix |= OCREAT;
24804|       |                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
24805|       |                break;
24806|       |            case 'e':
24807|       |                creatUnix |= OEXCL;
24808|       |                break;
24809|       |            case 't':
24810|       |                creatUnix |= OTRUNC;
24811|       |                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
24812|       |                break;
24813|       |            /* Windows only flags */
24814|       |            case 'D':
24815|       |                shareMode |= FILE_SHARE_DELETE;
24816|       |                break;
24817|       |            case 'R':
24818|       |                shareMode |= FILE_SHARE_READ;
24819|       |                break;
24820|       |            case 'W':
24821|       |                shareMode |= FILE_SHARE_WRITE;
24822|       |                break;
24823|       |            case 'H':
24824|       |                fileAttributes |= FILE_ATTRIBUTE_HIDDEN;
24825|       |                break;
24826|       |            case 'O':
24827|       |                fileAttributes |= FILE_ATTRIBUTE_READONLY;
24828|       |                break;
24829|       |            case 'F':
24830|       |                fileAttributes |= FILE_ATTRIBUTE_OFFLINE;
24831|       |                break;
24832|       |            case 'T':
24833|       |                fileAttributes |= FILE_ATTRIBUTE_TEMPORARY;
24834|       |                break;
24835|       |            case 'd':
24836|       |                fileFlags |= FILE_FLAG_DELETE_ON_CLOSE;
24837|       |                break;
24838|       |            case 'b':
24839|       |                fileFlags |= FILE_FLAG_NO_BUFFERING;
24840|       |                break;
24841|       |            case 'I':
24842|       |                inherited_handle = 1;
24843|       |                break;
24844|       |            case 'V':
24845|       |                fileFlags &= ~FILE_FLAG_OVERLAPPED;
24846|       |                disable_stream_mode = 1;
24847|       |                break;
24848|       |                /* we could potentially add more here -
24849|       |                 * https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea
24850|       |                 */
24851|       |        }
24852|       |    }
24853|       |    switch (creatUnix) {
24854|       |        default:
24855|       |            janet_panic("invalid creation flags");
24856|       |        case 0:
24857|       |            creationDisp = OPEN_EXISTING;
24858|       |            break;
24859|       |        case OCREAT:
24860|       |            creationDisp = OPEN_ALWAYS;
24861|       |            break;
24862|       |        case OCREAT + OEXCL:
24863|       |            creationDisp = CREATE_NEW;
24864|       |            break;
24865|       |        case OCREAT + OTRUNC:
24866|       |            creationDisp = CREATE_ALWAYS;
24867|       |            break;
24868|       |        case OTRUNC:
24869|       |            creationDisp = TRUNCATE_EXISTING;
24870|       |            break;
24871|       |    }
24872|       |    if (fileAttributes == 0) {
24873|       |        fileAttributes = FILE_ATTRIBUTE_NORMAL;
24874|       |    }
24875|       |    SECURITY_ATTRIBUTES saAttr;
24876|       |    memset(&saAttr, 0, sizeof(saAttr));
24877|       |    saAttr.nLength = sizeof(saAttr);
24878|       |    if (inherited_handle) {
24879|       |        saAttr.bInheritHandle = TRUE; /* Needed to do interesting things with file */
24880|       |    }
24881|       |    fd = CreateFileA(path, desiredAccess, shareMode, &saAttr, creationDisp, fileFlags | fileAttributes, NULL);
24882|       |    if (fd == INVALID_HANDLE_VALUE) janet_panicv(janet_ev_lasterr());
24883|       |#else
24884|     41|    int open_flags = O_NONBLOCK;
24885|     41|#ifdef JANET_LINUX
24886|     41|    open_flags |= O_CLOEXEC;
24887|     41|#endif
24888|     41|    int read_flag = 0;
24889|     41|    int write_flag = 0;
24890|    688|    for (const uint8_t *c = opt_flags; *c; c++) {
  ------------------
  |  Branch (24890:40): [True: 647, False: 41]
  ------------------
24891|    647|        switch (*c) {
24892|    275|            default:
  ------------------
  |  Branch (24892:13): [True: 275, False: 372]
  ------------------
24893|    275|                break;
24894|    275|            case 'r':
  ------------------
  |  Branch (24894:13): [True: 40, False: 607]
  ------------------
24895|     40|                read_flag = 1;
24896|     40|                stream_flags |= JANET_STREAM_READABLE;
  ------------------
  |  |  620|     40|#define JANET_STREAM_READABLE 0x200
  ------------------
24897|     40|                janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2019|     40|#define JANET_SANDBOX_FS_READ 64
  ------------------
24898|     40|                break;
24899|     13|            case 'w':
  ------------------
  |  Branch (24899:13): [True: 13, False: 634]
  ------------------
24900|     13|                write_flag = 1;
24901|     13|                stream_flags |= JANET_STREAM_WRITABLE;
  ------------------
  |  |  621|     13|#define JANET_STREAM_WRITABLE 0x400
  ------------------
24902|     13|                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2018|     13|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
24903|     13|                break;
24904|     58|            case 'c':
  ------------------
  |  Branch (24904:13): [True: 58, False: 589]
  ------------------
24905|     58|                open_flags |= O_CREAT;
24906|     58|                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2018|     58|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
24907|     58|                break;
24908|     71|            case 'e':
  ------------------
  |  Branch (24908:13): [True: 71, False: 576]
  ------------------
24909|     71|                open_flags |= O_EXCL;
24910|     71|                break;
24911|     33|            case 't':
  ------------------
  |  Branch (24911:13): [True: 33, False: 614]
  ------------------
24912|     33|                open_flags |= O_TRUNC;
24913|     33|                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2018|     33|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
24914|     33|                break;
24915|       |            /* posix only */
24916|      1|            case 'x':
  ------------------
  |  Branch (24916:13): [True: 1, False: 646]
  ------------------
24917|      1|                open_flags |= O_SYNC;
24918|      1|                break;
24919|     40|            case 'C':
  ------------------
  |  Branch (24919:13): [True: 40, False: 607]
  ------------------
24920|     40|                open_flags |= O_NOCTTY;
24921|     40|                break;
24922|     36|            case 'a':
  ------------------
  |  Branch (24922:13): [True: 36, False: 611]
  ------------------
24923|     36|                open_flags |= O_APPEND;
24924|     36|                break;
24925|     80|            case 'N':
  ------------------
  |  Branch (24925:13): [True: 80, False: 567]
  ------------------
24926|     80|                open_flags &= ~O_NONBLOCK;
24927|     80|                disable_stream_mode = 1;
24928|     80|                break;
24929|    647|        }
24930|    647|    }
24931|       |    /* If both read and write, fix up to O_RDWR */
24932|     41|    if (read_flag && !write_flag) {
  ------------------
  |  Branch (24932:9): [True: 10, False: 31]
  |  Branch (24932:22): [True: 9, False: 1]
  ------------------
24933|      9|        open_flags |= O_RDONLY;
24934|     32|    } else if (write_flag && !read_flag) {
  ------------------
  |  Branch (24934:16): [True: 4, False: 28]
  |  Branch (24934:30): [True: 3, False: 1]
  ------------------
24935|      3|        open_flags |= O_WRONLY;
24936|     29|    } else {
24937|     29|        open_flags |= O_RDWR;
24938|     29|    }
24939|       |
24940|     41|    do {
24941|     41|        fd = open(path, open_flags, mode);
24942|     41|    } while (fd == -1 && errno == EINTR);
  ------------------
  |  Branch (24942:14): [True: 29, False: 12]
  |  Branch (24942:26): [True: 0, False: 29]
  ------------------
24943|     41|    if (fd == -1) janet_panicv(janet_ev_lasterr());
  ------------------
  |  Branch (24943:9): [True: 29, False: 12]
  ------------------
24944|     12|#endif
24945|     12|    return janet_wrap_abstract(janet_stream(fd, disable_stream_mode ? 0 : stream_flags, NULL));
  ------------------
  |  |  846|     12|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|     24|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     12|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     12|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (820:32): [True: 0, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24946|     41|}
os_pipe:
24956|      7|              "By default, both ends of the pipe are non-blocking for use with the `ev` module.") {
24957|      7|    (void) argv;
24958|      7|    janet_arity(argc, 0, 1);
24959|      7|    JanetHandle fds[2];
24960|      7|    int flags = 0;
24961|      7|    if (argc > 0 && !janet_checktype(argv[0], JANET_NIL)) {
  ------------------
  |  |  801|      1|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 1]
  |  |  ------------------
  |  |  802|      1|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      1|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      1|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      1|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (24961:9): [True: 1, False: 6]
  |  Branch (24961:21): [True: 1, False: 0]
  ------------------
24962|      1|        flags = (int) janet_getflags(argv, 0, "WR");
24963|      1|    }
24964|      7|    if (janet_make_pipe(fds, flags)) janet_panicv(janet_ev_lasterr());
  ------------------
  |  Branch (24964:9): [True: 0, False: 7]
  ------------------
24965|      7|    JanetStream *reader = janet_stream(fds[0], (flags & 2) ? 0 : JANET_STREAM_READABLE, NULL);
  ------------------
  |  |  620|     14|#define JANET_STREAM_READABLE 0x200
  ------------------
  |  Branch (24965:48): [True: 0, False: 7]
  ------------------
24966|      7|    JanetStream *writer = janet_stream(fds[1], (flags & 1) ? 0 : JANET_STREAM_WRITABLE, NULL);
  ------------------
  |  |  621|     14|#define JANET_STREAM_WRITABLE 0x400
  ------------------
  |  Branch (24966:48): [True: 0, False: 7]
  ------------------
24967|      7|    Janet tup[2] = {janet_wrap_abstract(reader), janet_wrap_abstract(writer)};
  ------------------
  |  |  846|      7|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|      7|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      7|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      7|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  Janet tup[2] = {janet_wrap_abstract(reader), janet_wrap_abstract(writer)};
  ------------------
  |  |  846|      7|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|      7|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      7|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      7|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24968|      7|    return janet_wrap_tuple(janet_tuple_n(tup, 2));
  ------------------
  |  |  838|      7|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|      7|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      7|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      7|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24969|      7|}
janet_lib_os:
24976|  7.16k|void janet_lib_os(JanetTable *env) {
24977|       |#if !defined(JANET_REDUCED_OS) && defined(JANET_WINDOWS) && defined(JANET_THREADS)
24978|       |    /* During start up, the top-most abstract machine (thread)
24979|       |     * in the thread tree sets up the critical section. */
24980|       |    static volatile long env_lock_initializing = 0;
24981|       |    static volatile long env_lock_initialized = 0;
24982|       |    if (!InterlockedExchange(&env_lock_initializing, 1)) {
24983|       |        InitializeCriticalSection(&env_lock);
24984|       |        InterlockedOr(&env_lock_initialized, 1);
24985|       |    } else {
24986|       |        while (!InterlockedOr(&env_lock_initialized, 0)) {
24987|       |            Sleep(0);
24988|       |        }
24989|       |    }
24990|       |
24991|       |#endif
24992|  7.16k|#ifndef JANET_NO_PROCESSES
24993|  7.16k|#endif
24994|  7.16k|    JanetRegExt os_cfuns[] = {
24995|  7.16k|        JANET_CORE_REG("os/exit", os_exit),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
24996|  7.16k|        JANET_CORE_REG("os/which", os_which),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
24997|  7.16k|        JANET_CORE_REG("os/arch", os_arch),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
24998|  7.16k|        JANET_CORE_REG("os/compiler", os_compiler),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
24999|  7.16k|#ifndef JANET_REDUCED_OS
25000|       |
25001|       |        /* misc (un-sandboxed) */
25002|  7.16k|        JANET_CORE_REG("os/cpu-count", os_cpu_count),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25003|  7.16k|        JANET_CORE_REG("os/cwd", os_cwd),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25004|  7.16k|        JANET_CORE_REG("os/cryptorand", os_cryptorand),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25005|  7.16k|        JANET_CORE_REG("os/perm-string", os_permission_string),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25006|  7.16k|        JANET_CORE_REG("os/perm-int", os_permission_int),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25007|  7.16k|        JANET_CORE_REG("os/mktime", os_mktime),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25008|  7.16k|        JANET_CORE_REG("os/time", os_time), /* not high resolution */
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25009|  7.16k|        JANET_CORE_REG("os/date", os_date), /* not high resolution */
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25010|  7.16k|        JANET_CORE_REG("os/strftime", os_strftime),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25011|  7.16k|        JANET_CORE_REG("os/sleep", os_sleep),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25012|  7.16k|        JANET_CORE_REG("os/isatty", os_isatty),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25013|  7.16k|#ifndef JANET_NO_LOCALES
25014|  7.16k|        JANET_CORE_REG("os/setlocale", os_setlocale),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25015|  7.16k|#endif
25016|       |
25017|       |        /* env functions */
25018|  7.16k|#ifndef JANET_PLAN9
25019|  7.16k|        JANET_CORE_REG("os/environ", os_environ),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25020|  7.16k|#endif
25021|  7.16k|        JANET_CORE_REG("os/getenv", os_getenv),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25022|  7.16k|        JANET_CORE_REG("os/setenv", os_setenv),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25023|       |
25024|       |        /* fs read */
25025|  7.16k|        JANET_CORE_REG("os/dir", os_dir),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25026|  7.16k|        JANET_CORE_REG("os/stat", os_stat),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25027|  7.16k|        JANET_CORE_REG("os/lstat", os_lstat),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25028|  7.16k|        JANET_CORE_REG("os/chmod", os_chmod),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25029|  7.16k|        JANET_CORE_REG("os/touch", os_touch),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25030|  7.16k|        JANET_CORE_REG("os/realpath", os_realpath),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25031|  7.16k|        JANET_CORE_REG("os/cd", os_cd),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25032|  7.16k|#ifndef JANET_NO_UMASK
25033|  7.16k|        JANET_CORE_REG("os/umask", os_umask),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25034|  7.16k|#endif
25035|  7.16k|#ifndef JANET_NO_SYMLINKS
25036|  7.16k|        JANET_CORE_REG("os/readlink", os_readlink),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25037|  7.16k|#endif
25038|       |
25039|       |        /* fs write */
25040|  7.16k|        JANET_CORE_REG("os/mkdir", os_mkdir),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25041|  7.16k|        JANET_CORE_REG("os/rmdir", os_rmdir),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25042|  7.16k|        JANET_CORE_REG("os/rm", os_remove),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25043|  7.16k|        JANET_CORE_REG("os/link", os_link),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25044|  7.16k|        JANET_CORE_REG("os/rename", os_rename),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25045|  7.16k|#ifndef JANET_NO_SYMLINKS
25046|  7.16k|        JANET_CORE_REG("os/symlink", os_symlink),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25047|  7.16k|#endif
25048|       |
25049|       |        /* processes */
25050|  7.16k|#ifndef JANET_NO_PROCESSES
25051|  7.16k|        JANET_CORE_REG("os/execute", os_execute),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25052|  7.16k|        JANET_CORE_REG("os/spawn", os_spawn),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25053|  7.16k|        JANET_CORE_REG("os/shell", os_shell),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25054|  7.16k|        JANET_CORE_REG("os/posix-fork", os_posix_fork),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25055|  7.16k|        JANET_CORE_REG("os/posix-exec", os_posix_exec),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25056|  7.16k|        JANET_CORE_REG("os/posix-chroot", os_posix_chroot),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25057|       |        /* no need to sandbox process management if you can't create processes
25058|       |         * (allows for limited functionality if use exposes C-functions to create specific processes) */
25059|  7.16k|        JANET_CORE_REG("os/proc-wait", os_proc_wait),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25060|  7.16k|        JANET_CORE_REG("os/proc-kill", os_proc_kill),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25061|  7.16k|        JANET_CORE_REG("os/proc-close", os_proc_close),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25062|  7.16k|        JANET_CORE_REG("os/getpid", os_proc_getpid),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25063|  7.16k|#ifdef JANET_EV
25064|  7.16k|        JANET_CORE_REG("os/sigaction", os_sigaction),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25065|  7.16k|#endif
25066|  7.16k|#endif
25067|       |
25068|       |        /* high resolution timers */
25069|  7.16k|        JANET_CORE_REG("os/clock", os_clock),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25070|       |
25071|  7.16k|#ifdef JANET_EV
25072|  7.16k|        JANET_CORE_REG("os/open", os_open), /* fs read and write */
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25073|  7.16k|        JANET_CORE_REG("os/pipe", os_pipe),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
25074|  7.16k|#endif
25075|  7.16k|#endif
25076|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
25077|  7.16k|    };
25078|       |    janet_core_cfuns_ext(env, NULL, os_cfuns);
25079|  7.16k|}
janet_is_symbol_char:
25139|  6.97M|int janet_is_symbol_char(uint8_t c) {
25140|  6.97M|    return symchars[c >> 5] & ((uint32_t)1 << (c & 0x1F));
25141|  6.97M|}
janet_valid_utf8:
25146|  25.4k|int janet_valid_utf8(const uint8_t *str, int32_t len) {
25147|  25.4k|    int32_t i = 0;
25148|  25.4k|    int32_t j;
25149|   368k|    while (i < len) {
  ------------------
  |  Branch (25149:12): [True: 344k, False: 24.8k]
  ------------------
25150|   344k|        int32_t nexti;
25151|   344k|        uint8_t c = str[i];
25152|       |
25153|       |        /* Check the number of bytes in code point */
25154|   344k|        if (c < 0x80) nexti = i + 1;
  ------------------
  |  Branch (25154:13): [True: 338k, False: 5.50k]
  ------------------
25155|  5.50k|        else if ((c >> 5) == 0x06) nexti = i + 2;
  ------------------
  |  Branch (25155:18): [True: 820, False: 4.68k]
  ------------------
25156|  4.68k|        else if ((c >> 4) == 0x0E) nexti = i + 3;
  ------------------
  |  Branch (25156:18): [True: 1.04k, False: 3.64k]
  ------------------
25157|  3.64k|        else if ((c >> 3) == 0x1E) nexti = i + 4;
  ------------------
  |  Branch (25157:18): [True: 3.19k, False: 457]
  ------------------
25158|       |        /* Don't allow 5 or 6 byte code points */
25159|    457|        else return 0;
25160|       |
25161|       |        /* No overflow */
25162|   343k|        if (nexti > len) return 0;
  ------------------
  |  Branch (25162:13): [True: 61, False: 343k]
  ------------------
25163|       |
25164|       |        /* Ensure trailing bytes are well formed (10XX XXXX) */
25165|   355k|        for (j = i + 1; j < nexti; j++) {
  ------------------
  |  Branch (25165:25): [True: 12.3k, False: 343k]
  ------------------
25166|  12.3k|            if ((str[j] >> 6) != 2) return 0;
  ------------------
  |  Branch (25166:17): [True: 80, False: 12.2k]
  ------------------
25167|  12.3k|        }
25168|       |
25169|       |        /* Check for overlong encoding */
25170|   343k|        if ((nexti == i + 2) && str[i] < 0xC2) return 0;
  ------------------
  |  Branch (25170:13): [True: 722, False: 342k]
  |  Branch (25170:33): [True: 1, False: 721]
  ------------------
25171|   343k|        if ((str[i] == 0xE0) && str[i + 1] < 0xA0) return 0;
  ------------------
  |  Branch (25171:13): [True: 358, False: 343k]
  |  Branch (25171:33): [True: 1, False: 357]
  ------------------
25172|   343k|        if ((str[i] == 0xF0) && str[i + 1] < 0x90) return 0;
  ------------------
  |  Branch (25172:13): [True: 902, False: 342k]
  |  Branch (25172:33): [True: 0, False: 902]
  ------------------
25173|       |
25174|   343k|        i = nexti;
25175|   343k|    }
25176|  24.8k|    return 1;
25177|  25.4k|}
janet_parser_consume:
25781|  12.9M|void janet_parser_consume(JanetParser *parser, uint8_t c) {
25782|  12.9M|    int consumed = 0;
25783|  12.9M|    janet_parser_checkdead(parser);
25784|  12.9M|    if (c == '\r') {
  ------------------
  |  Branch (25784:9): [True: 20.6k, False: 12.9M]
  ------------------
25785|  20.6k|        parser->line++;
25786|  20.6k|        parser->column = 0;
25787|  12.9M|    } else if (c == '\n') {
  ------------------
  |  Branch (25787:16): [True: 214k, False: 12.7M]
  ------------------
25788|   214k|        parser->column = 0;
25789|   214k|        if (parser->lookback != '\r')
  ------------------
  |  Branch (25789:13): [True: 213k, False: 1.22k]
  ------------------
25790|   213k|            parser->line++;
25791|  12.7M|    } else {
25792|  12.7M|        parser->column++;
25793|  12.7M|    }
25794|  28.8M|    while (!consumed && !parser->error) {
  ------------------
  |  Branch (25794:12): [True: 15.8M, False: 12.9M]
  |  Branch (25794:25): [True: 15.8M, False: 785]
  ------------------
25795|  15.8M|        JanetParseState *state = parser->states + parser->statecount - 1;
25796|  15.8M|        consumed = state->consumer(parser, state, c);
25797|  15.8M|    }
25798|  12.9M|    parser->lookback = c;
25799|  12.9M|}
janet_parser_eof:
25801|   103k|void janet_parser_eof(JanetParser *parser) {
25802|   103k|    janet_parser_checkdead(parser);
25803|   103k|    size_t oldcolumn = parser->column;
25804|   103k|    size_t oldline = parser->line;
25805|   103k|    janet_parser_consume(parser, '\n');
25806|   103k|    if (parser->statecount > 1) {
  ------------------
  |  Branch (25806:9): [True: 757, False: 102k]
  ------------------
25807|    757|        delim_error(parser, parser->statecount - 1, 0, "unexpected end of source");
25808|    757|    }
25809|   103k|    parser->line = oldline;
25810|   103k|    parser->column = oldcolumn;
25811|   103k|    parser->flag |= JANET_PARSER_DEAD;
  ------------------
  |  |25113|   103k|#define JANET_PARSER_DEAD 0x1
  ------------------
25812|   103k|}
janet_parser_status:
25814|  12.9M|enum JanetParserStatus janet_parser_status(JanetParser *parser) {
25815|  12.9M|    if (parser->error) return JANET_PARSE_ERROR;
  ------------------
  |  Branch (25815:9): [True: 4.62k, False: 12.9M]
  ------------------
25816|  12.9M|    if (parser->flag) return JANET_PARSE_DEAD;
  ------------------
  |  Branch (25816:9): [True: 102k, False: 12.8M]
  ------------------
25817|  12.8M|    if (parser->statecount > 1) return JANET_PARSE_PENDING;
  ------------------
  |  Branch (25817:9): [True: 12.8M, False: 52.3k]
  ------------------
25818|  52.3k|    return JANET_PARSE_ROOT;
25819|  12.8M|}
janet_parser_flush:
25821|  2.30k|void janet_parser_flush(JanetParser *parser) {
25822|  2.30k|    parser->argcount = 0;
25823|  2.30k|    parser->statecount = 1;
25824|  2.30k|    parser->bufcount = 0;
25825|  2.30k|    parser->pending = 0;
25826|  2.30k|}
janet_parser_error:
25828|  2.30k|const char *janet_parser_error(JanetParser *parser) {
25829|  2.30k|    enum JanetParserStatus status = janet_parser_status(parser);
25830|  2.30k|    if (status == JANET_PARSE_ERROR) {
  ------------------
  |  Branch (25830:9): [True: 2.30k, False: 0]
  ------------------
25831|  2.30k|        const char *e = parser->error;
25832|  2.30k|        parser->error = NULL;
25833|  2.30k|        parser->flag &= ~JANET_PARSER_GENERATED_ERROR;
  ------------------
  |  |25114|  2.30k|#define JANET_PARSER_GENERATED_ERROR 0x2
  ------------------
25834|  2.30k|        janet_parser_flush(parser);
25835|  2.30k|        return e;
25836|  2.30k|    }
25837|      0|    return NULL;
25838|  2.30k|}
janet_parser_produce:
25840|   238k|Janet janet_parser_produce(JanetParser *parser) {
25841|   238k|    Janet ret;
25842|   238k|    size_t i;
25843|   238k|    if (parser->pending == 0) return janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (25843:9): [True: 0, False: 238k]
  ------------------
25844|   238k|    ret = janet_unwrap_tuple(parser->args[0])[0];
  ------------------
  |  |  853|   238k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
25845|   239k|    for (i = 1; i < parser->argcount; i++) {
  ------------------
  |  Branch (25845:17): [True: 1.25k, False: 238k]
  ------------------
25846|  1.25k|        parser->args[i - 1] = parser->args[i];
25847|  1.25k|    }
25848|   238k|    parser->pending--;
25849|   238k|    parser->argcount--;
25850|   238k|    parser->states[0].argn--;
25851|   238k|    return ret;
25852|   238k|}
janet_parser_init:
25868|   109k|void janet_parser_init(JanetParser *parser) {
25869|   109k|    parser->args = NULL;
25870|   109k|    parser->states = NULL;
25871|   109k|    parser->buf = NULL;
25872|   109k|    parser->argcount = 0;
25873|   109k|    parser->argcap = 0;
25874|   109k|    parser->bufcount = 0;
25875|   109k|    parser->bufcap = 0;
25876|   109k|    parser->statecount = 0;
25877|   109k|    parser->statecap = 0;
25878|   109k|    parser->error = NULL;
25879|   109k|    parser->lookback = -1;
25880|   109k|    parser->line = 1;
25881|   109k|    parser->column = 0;
25882|   109k|    parser->pending = 0;
25883|   109k|    parser->flag = 0;
25884|       |
25885|   109k|    pushstate(parser, root, PFLAG_CONTAINER);
  ------------------
  |  |25218|   109k|#define PFLAG_CONTAINER 0x100
  ------------------
25886|   109k|}
janet_parser_deinit:
25888|   109k|void janet_parser_deinit(JanetParser *parser) {
25889|   109k|    janet_free(parser->args);
  ------------------
  |  | 2402|   109k|#define janet_free(X) free((X))
  ------------------
25890|   109k|    janet_free(parser->buf);
  ------------------
  |  | 2402|   109k|#define janet_free(X) free((X))
  ------------------
25891|   109k|    janet_free(parser->states);
  ------------------
  |  | 2402|   109k|#define janet_free(X) free((X))
  ------------------
25892|   109k|}
janet_parser_has_more:
25939|  13.2M|int janet_parser_has_more(JanetParser *parser) {
25940|  13.2M|    return !!parser->pending;
25941|  13.2M|}
cfun_parse_parser:
25987|   102k|              "that can receive bytes and generate a stream of values.") {
25988|   102k|    (void) argv;
25989|   102k|    janet_fixarity(argc, 0);
25990|   102k|    JanetParser *p = janet_abstract(&janet_parser_type, sizeof(JanetParser));
25991|   102k|    janet_parser_init(p);
25992|   102k|    return janet_wrap_abstract(p);
  ------------------
  |  |  846|   102k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|   102k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   102k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   102k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25993|   102k|}
cfun_parse_consume:
25999|     46|              "the number of bytes read.") {
26000|     46|    janet_arity(argc, 2, 3);
26001|     46|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26002|     46|    JanetByteView view = janet_getbytes(argv, 1);
26003|     46|    if (argc == 3) {
  ------------------
  |  Branch (26003:9): [True: 0, False: 46]
  ------------------
26004|      0|        int32_t offset = janet_getinteger(argv, 2);
26005|      0|        if (offset < 0 || offset > view.len)
  ------------------
  |  Branch (26005:13): [True: 0, False: 0]
  |  Branch (26005:27): [True: 0, False: 0]
  ------------------
26006|      0|            janet_panicf("invalid offset %d out of range [0,%d]", offset, view.len);
26007|      0|        view.len -= offset;
26008|      0|        view.bytes += offset;
26009|      0|    }
26010|     46|    int32_t i;
26011|  9.26k|    for (i = 0; i < view.len; i++) {
  ------------------
  |  Branch (26011:17): [True: 9.22k, False: 37]
  ------------------
26012|  9.22k|        janet_parser_consume(p, view.bytes[i]);
26013|  9.22k|        switch (janet_parser_status(p)) {
26014|  1.69k|            case JANET_PARSE_ROOT:
  ------------------
  |  Branch (26014:13): [True: 1.69k, False: 7.53k]
  ------------------
26015|  9.21k|            case JANET_PARSE_PENDING:
  ------------------
  |  Branch (26015:13): [True: 7.52k, False: 1.70k]
  ------------------
26016|  9.21k|                break;
26017|      9|            default:
  ------------------
  |  Branch (26017:13): [True: 9, False: 9.21k]
  ------------------
26018|      9|                return janet_wrap_integer(i + 1);
  ------------------
  |  |  958|      9|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|      9|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
26019|  9.22k|        }
26020|  9.22k|    }
26021|     37|    return janet_wrap_integer(i);
  ------------------
  |  |  958|     37|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|     37|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
26022|     46|}
cfun_parse_eof:
26026|   102k|              "Indicate to the parser that the end of file was reached. This puts the parser in the :dead state.") {
26027|   102k|    janet_fixarity(argc, 1);
26028|   102k|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26029|   102k|    janet_parser_eof(p);
26030|   102k|    return argv[0];
26031|   102k|}
cfun_parse_insert:
26037|      2|              "and tuples, for example. Returns the parser.") {
26038|      2|    janet_fixarity(argc, 2);
26039|      2|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26040|      2|    JanetParseState *s = p->states + p->statecount - 1;
26041|      2|    if (s->consumer == tokenchar) {
  ------------------
  |  Branch (26041:9): [True: 0, False: 2]
  ------------------
26042|      0|        janet_parser_consume(p, ' ');
26043|      0|        p->column--;
26044|      0|        s = p->states + p->statecount - 1;
26045|      0|    }
26046|      2|    if (s->flags & PFLAG_COMMENT) s--;
  ------------------
  |  |25227|      2|#define PFLAG_COMMENT 0x20000
  ------------------
  |  Branch (26046:9): [True: 0, False: 2]
  ------------------
26047|      2|    if (s->flags & PFLAG_CONTAINER) {
  ------------------
  |  |25218|      2|#define PFLAG_CONTAINER 0x100
  ------------------
  |  Branch (26047:9): [True: 0, False: 2]
  ------------------
26048|      0|        s->argn++;
26049|      0|        if (p->statecount == 1) {
  ------------------
  |  Branch (26049:13): [True: 0, False: 0]
  ------------------
26050|      0|            p->pending++;
26051|      0|            Janet tup = janet_wrap_tuple(janet_tuple_n(argv + 1, 1));
  ------------------
  |  |  838|      0|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26052|      0|            push_arg(p, tup);
26053|      0|        } else {
26054|      0|            push_arg(p, argv[1]);
26055|      0|        }
26056|      2|    } else if (s->flags & (PFLAG_STRING | PFLAG_LONGSTRING)) {
  ------------------
  |  |25223|      2|#define PFLAG_STRING 0x2000
  ------------------
                  } else if (s->flags & (PFLAG_STRING | PFLAG_LONGSTRING)) {
  ------------------
  |  |25224|      2|#define PFLAG_LONGSTRING 0x4000
  ------------------
  |  Branch (26056:16): [True: 0, False: 2]
  ------------------
26057|      0|        const uint8_t *str = janet_to_string(argv[1]);
26058|      0|        int32_t slen = janet_string_length(str);
  ------------------
  |  | 1803|      0|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|      0|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
26059|      0|        size_t newcount = p->bufcount + slen;
26060|      0|        if (p->bufcap < newcount) {
  ------------------
  |  Branch (26060:13): [True: 0, False: 0]
  ------------------
26061|      0|            size_t newcap = 2 * newcount;
26062|      0|            p->buf = janet_realloc(p->buf, newcap);
  ------------------
  |  | 2396|      0|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
26063|      0|            if (p->buf == NULL) {
  ------------------
  |  Branch (26063:17): [True: 0, False: 0]
  ------------------
26064|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
26065|      0|            }
26066|      0|            p->bufcap = newcap;
26067|      0|        }
26068|      0|        safe_memcpy(p->buf + p->bufcount, str, slen);
26069|      0|        p->bufcount = newcount;
26070|      2|    } else {
26071|      2|        janet_panic("cannot insert value into parser");
26072|      2|    }
26073|      0|    return argv[0];
26074|      2|}
cfun_parse_has_more:
26078|   102k|              "Check if the parser has more values in the value queue.") {
26079|   102k|    janet_fixarity(argc, 1);
26080|   102k|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26081|   102k|    return janet_wrap_boolean(janet_parser_has_more(p));
  ------------------
  |  |  829|   102k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  817|   102k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   102k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   102k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26082|   102k|}
cfun_parse_status:
26100|   102k|              "* :root - the parser can either read more values or safely terminate.") {
26101|   102k|    janet_fixarity(argc, 1);
26102|   102k|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26103|   102k|    const char *stat = NULL;
26104|   102k|    switch (janet_parser_status(p)) {
  ------------------
  |  Branch (26104:13): [True: 102k, False: 1]
  ------------------
26105|     31|        case JANET_PARSE_PENDING:
  ------------------
  |  Branch (26105:9): [True: 31, False: 102k]
  ------------------
26106|     31|            stat = "pending";
26107|     31|            break;
26108|      9|        case JANET_PARSE_ERROR:
  ------------------
  |  Branch (26108:9): [True: 9, False: 102k]
  ------------------
26109|      9|            stat = "error";
26110|      9|            break;
26111|      1|        case JANET_PARSE_ROOT:
  ------------------
  |  Branch (26111:9): [True: 1, False: 102k]
  ------------------
26112|      1|            stat = "root";
26113|      1|            break;
26114|   102k|        case JANET_PARSE_DEAD:
  ------------------
  |  Branch (26114:9): [True: 102k, False: 42]
  ------------------
26115|   102k|            stat = "dead";
26116|   102k|            break;
26117|   102k|    }
26118|   102k|    return janet_ckeywordv(stat);
  ------------------
  |  | 1833|   102k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|   102k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|   102k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|   102k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|   102k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26119|   102k|}
cfun_parse_error:
26126|      9|              "`parser/error`.") {
26127|      9|    janet_fixarity(argc, 1);
26128|      9|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26129|      9|    const char *err = janet_parser_error(p);
26130|      9|    if (err) {
  ------------------
  |  Branch (26130:9): [True: 9, False: 0]
  ------------------
26131|      9|        return (p->flag & JANET_PARSER_GENERATED_ERROR)
  ------------------
  |  |25114|      9|#define JANET_PARSER_GENERATED_ERROR 0x2
  ------------------
  |  Branch (26131:16): [True: 0, False: 9]
  ------------------
26132|      9|               ? janet_wrap_string((const uint8_t *) err)
  ------------------
  |  |  843|      0|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26133|      9|               : janet_cstringv(err);
  ------------------
  |  | 1816|      9|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  843|      9|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      9|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      9|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      9|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26134|      9|    }
26135|      0|    return janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26136|      9|}
cfun_parse_produce:
26144|     33|              "purposes.") {
26145|     33|    janet_arity(argc, 1, 2);
26146|     33|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26147|     33|    if (argc == 2 && janet_truthy(argv[1])) {
  ------------------
  |  |  813|      0|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 0, False: 0]
  |  |  ------------------
  |  |  814|      0|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 0, False: 0]
  |  |  |  Branch (814:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (26147:9): [True: 0, False: 33]
  ------------------
26148|      0|        return janet_parser_produce_wrapped(p);
26149|     33|    } else {
26150|     33|        return janet_parser_produce(p);
26151|     33|    }
26152|     33|}
cfun_parse_flush:
26158|      2|              "to begin parsing in a new context, create a new parser.") {
26159|      2|    janet_fixarity(argc, 1);
26160|      2|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26161|      2|    janet_parser_flush(p);
26162|      2|    return argv[0];
26163|      2|}
cfun_parse_where:
26169|   102k|              "also provided, the current column number of the parser is also first set to that value.") {
26170|   102k|    janet_arity(argc, 1, 3);
26171|   102k|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26172|   102k|    if (argc > 1) {
  ------------------
  |  Branch (26172:9): [True: 0, False: 102k]
  ------------------
26173|      0|        int32_t line = janet_getinteger(argv, 1);
26174|      0|        if (line < 1)
  ------------------
  |  Branch (26174:13): [True: 0, False: 0]
  ------------------
26175|      0|            janet_panicf("invalid line number %d", line);
26176|      0|        p->line = (size_t) line;
26177|      0|    }
26178|   102k|    if (argc > 2) {
  ------------------
  |  Branch (26178:9): [True: 0, False: 102k]
  ------------------
26179|      0|        int32_t column = janet_getinteger(argv, 2);
26180|      0|        if (column < 0)
  ------------------
  |  Branch (26180:13): [True: 0, False: 0]
  ------------------
26181|      0|            janet_panicf("invalid column number %d", column);
26182|      0|        p->column = (size_t) column;
26183|      0|    }
26184|   102k|    Janet *tup = janet_tuple_begin(2);
26185|   102k|    tup[0] = janet_wrap_integer(p->line);
  ------------------
  |  |  958|   102k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|   102k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
26186|   102k|    tup[1] = janet_wrap_integer(p->column);
  ------------------
  |  |  958|   102k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|   102k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
26187|   102k|    return janet_wrap_tuple(janet_tuple_end(tup));
  ------------------
  |  |  838|   102k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|   102k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   102k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   102k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26188|   102k|}
cfun_parse_state:
26325|   102k|              "type of that expression and some type-specific information.") {
26326|   102k|    janet_arity(argc, 1, 2);
26327|   102k|    const uint8_t *key = NULL;
26328|   102k|    JanetParser *p = janet_getabstract(argv, 0, &janet_parser_type);
26329|   102k|    if (argc == 2) {
  ------------------
  |  Branch (26329:9): [True: 102k, False: 0]
  ------------------
26330|   102k|        key = janet_getkeyword(argv, 1);
26331|   102k|    }
26332|       |
26333|   102k|    if (key) {
  ------------------
  |  Branch (26333:9): [True: 102k, False: 0]
  ------------------
26334|       |        /* Get one result */
26335|   102k|        for (const struct ParserStateGetter *sg = parser_state_getters;
26336|   204k|                sg->name != NULL; sg++) {
  ------------------
  |  Branch (26336:17): [True: 204k, False: 0]
  ------------------
26337|   204k|            if (janet_cstrcmp(key, sg->name)) continue;
  ------------------
  |  Branch (26337:17): [True: 102k, False: 102k]
  ------------------
26338|   102k|            return sg->fn(p);
26339|   204k|        }
26340|      0|        janet_panicf("unexpected keyword %v", janet_wrap_keyword(key));
  ------------------
  |  |  845|      0|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  ------------------
  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26341|      0|        return janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26342|   102k|    } else {
26343|       |        /* Put results in table */
26344|      0|        JanetTable *tab = janet_table(0);
26345|      0|        for (const struct ParserStateGetter *sg = parser_state_getters;
26346|      0|                sg->name != NULL; sg++) {
  ------------------
  |  Branch (26346:17): [True: 0, False: 0]
  ------------------
26347|      0|            janet_table_put(tab, janet_ckeywordv(sg->name), sg->fn(p));
  ------------------
  |  | 1833|      0|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      0|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26348|      0|        }
26349|      0|        return janet_wrap_table(tab);
  ------------------
  |  |  841|      0|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26350|      0|    }
26351|   102k|}
cfun_parse_clone:
26357|      1|              "if parsing later fails. Returns a new parser.") {
26358|      1|    janet_fixarity(argc, 1);
26359|      1|    JanetParser *src = janet_getabstract(argv, 0, &janet_parser_type);
26360|      1|    JanetParser *dest = janet_abstract(&janet_parser_type, sizeof(JanetParser));
26361|      1|    janet_parser_clone(src, dest);
26362|      1|    return janet_wrap_abstract(dest);
  ------------------
  |  |  846|      1|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|      1|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26363|      1|}
janet_lib_parse:
26393|  7.16k|void janet_lib_parse(JanetTable *env) {
26394|  7.16k|    JanetRegExt parse_cfuns[] = {
26395|  7.16k|        JANET_CORE_REG("parser/new", cfun_parse_parser),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26396|  7.16k|        JANET_CORE_REG("parser/clone", cfun_parse_clone),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26397|  7.16k|        JANET_CORE_REG("parser/has-more", cfun_parse_has_more),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26398|  7.16k|        JANET_CORE_REG("parser/produce", cfun_parse_produce),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26399|  7.16k|        JANET_CORE_REG("parser/consume", cfun_parse_consume),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26400|  7.16k|        JANET_CORE_REG("parser/byte", cfun_parse_byte),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26401|  7.16k|        JANET_CORE_REG("parser/error", cfun_parse_error),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26402|  7.16k|        JANET_CORE_REG("parser/status", cfun_parse_status),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26403|  7.16k|        JANET_CORE_REG("parser/flush", cfun_parse_flush),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26404|  7.16k|        JANET_CORE_REG("parser/state", cfun_parse_state),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26405|  7.16k|        JANET_CORE_REG("parser/where", cfun_parse_where),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26406|  7.16k|        JANET_CORE_REG("parser/eof", cfun_parse_eof),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26407|  7.16k|        JANET_CORE_REG("parser/insert", cfun_parse_insert),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
26408|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
26409|  7.16k|    };
26410|       |    janet_core_cfuns_ext(env, NULL, parse_cfuns);
26411|  7.16k|}
cfun_peg_compile:
28341|      2|              "`default-peg-grammar` for the grammar of the peg.") {
28342|      2|    janet_fixarity(argc, 1);
28343|      2|    JanetPeg *peg = compile_peg(argv[0]);
28344|      2|    return janet_wrap_abstract(peg);
  ------------------
  |  |  846|      2|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|      2|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28345|      2|}
cfun_peg_find:
28418|    205|              "Find first index where the peg matches in text. Returns an integer, or nil if not found.") {
28419|    205|    PegCall c = peg_cfun_init(argc, argv, 0);
28420|  4.44k|    for (int32_t i = c.start; i < c.bytes.len; i++) {
  ------------------
  |  Branch (28420:31): [True: 4.30k, False: 137]
  ------------------
28421|  4.30k|        peg_call_reset(&c);
28422|  4.30k|        if (peg_rule(&c.s, c.s.bytecode, c.bytes.bytes + i))
  ------------------
  |  Branch (28422:13): [True: 68, False: 4.24k]
  ------------------
28423|     68|            return janet_wrap_integer(i);
  ------------------
  |  |  958|     68|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|     68|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
28424|  4.30k|    }
28425|    137|    return janet_wrap_nil();
  ------------------
  |  |  826|    137|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|    137|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    137|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    137|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28426|    205|}
cfun_peg_find_all:
28430|      1|              "Find all indexes where the peg matches in text. Returns an array of integers.") {
28431|      1|    PegCall c = peg_cfun_init(argc, argv, 0);
28432|      1|    JanetArray *ret = janet_array(0);
28433|      1|    for (int32_t i = c.start; i < c.bytes.len; i++) {
  ------------------
  |  Branch (28433:31): [True: 0, False: 1]
  ------------------
28434|      0|        peg_call_reset(&c);
28435|      0|        if (peg_rule(&c.s, c.s.bytecode, c.bytes.bytes + i))
  ------------------
  |  Branch (28435:13): [True: 0, False: 0]
  ------------------
28436|      0|            janet_array_push(ret, janet_wrap_integer(i));
  ------------------
  |  |  958|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
28437|      0|    }
28438|      1|    return janet_wrap_array(ret);
  ------------------
  |  |  840|      1|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  820|      1|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28439|      1|}
cfun_peg_replace_all:
28475|     36|              "matching text followed by any captures.") {
28476|     36|    return cfun_peg_replace_generic(argc, argv, 0);
28477|     36|}
cfun_peg_replace:
28485|    411|              "If no matches are found, returns the input string in a new buffer.") {
28486|    411|    return cfun_peg_replace_generic(argc, argv, 1);
28487|    411|}
janet_lib_peg:
28511|  7.16k|void janet_lib_peg(JanetTable *env) {
28512|  7.16k|    JanetRegExt cfuns[] = {
28513|  7.16k|        JANET_CORE_REG("peg/compile", cfun_peg_compile),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28514|  7.16k|        JANET_CORE_REG("peg/match", cfun_peg_match),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28515|  7.16k|        JANET_CORE_REG("peg/find", cfun_peg_find),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28516|  7.16k|        JANET_CORE_REG("peg/find-all", cfun_peg_find_all),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28517|  7.16k|        JANET_CORE_REG("peg/replace", cfun_peg_replace),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28518|  7.16k|        JANET_CORE_REG("peg/replace-all", cfun_peg_replace_all),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
28519|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
28520|  7.16k|    };
28521|       |    janet_core_cfuns_ext(env, NULL, cfuns);
28522|  7.16k|    janet_register_abstract_type(&janet_peg_type);
28523|  7.16k|}
janet_to_string_b:
28751|  16.9M|void janet_to_string_b(JanetBuffer *buffer, Janet x) {
28752|  16.9M|    switch (janet_type(x)) {
  ------------------
  |  |  790|  16.9M|    (isnan((x).number) \
  |  |  791|  16.9M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  16.9M|        : JANET_NUMBER)
  ------------------
  |  Branch (28752:13): [True: 11.5M, False: 5.32M]
  ------------------
28753|    461|        case JANET_NIL:
  ------------------
  |  Branch (28753:9): [True: 461, False: 16.9M]
  ------------------
28754|    461|            janet_buffer_push_cstring(buffer, "");
28755|    461|            break;
28756|     75|        case JANET_BOOLEAN:
  ------------------
  |  Branch (28756:9): [True: 75, False: 16.9M]
  ------------------
28757|     75|            janet_buffer_push_cstring(buffer,
28758|     75|                                      janet_unwrap_boolean(x) ? "true" : "false");
  ------------------
  |  |  833|     75|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  |  |  ------------------
  |  |  |  Branch (833:33): [True: 53, False: 22]
  |  |  ------------------
  ------------------
28759|     75|            break;
28760|  5.32M|        case JANET_NUMBER:
  ------------------
  |  Branch (28760:9): [True: 5.32M, False: 11.5M]
  ------------------
28761|  5.32M|            number_to_string_b(buffer, janet_unwrap_number(x));
  ------------------
  |  |  834|  5.32M|#define janet_unwrap_number(x) ((x).number)
  ------------------
28762|  5.32M|            break;
28763|   521k|        case JANET_STRING:
  ------------------
  |  Branch (28763:9): [True: 521k, False: 16.3M]
  ------------------
28764|  11.4M|        case JANET_SYMBOL:
  ------------------
  |  Branch (28764:9): [True: 10.9M, False: 5.93M]
  ------------------
28765|  11.5M|        case JANET_KEYWORD:
  ------------------
  |  Branch (28765:9): [True: 3.80k, False: 16.9M]
  ------------------
28766|  11.5M|            janet_buffer_push_bytes(buffer,
28767|  11.5M|                                    janet_unwrap_string(x),
  ------------------
  |  |  858|  11.5M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
28768|  11.5M|                                    janet_string_length(janet_unwrap_string(x)));
  ------------------
  |  | 1803|  11.5M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|  11.5M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
28769|  11.5M|            break;
28770|  18.2k|        case JANET_BUFFER: {
  ------------------
  |  Branch (28770:9): [True: 18.2k, False: 16.8M]
  ------------------
28771|  18.2k|            JanetBuffer *to = janet_unwrap_buffer(x);
  ------------------
  |  |  857|  18.2k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
28772|       |            /* Prevent resizing buffer while appending */
28773|  18.2k|            if (buffer == to) janet_buffer_extra(buffer, to->count);
  ------------------
  |  Branch (28773:17): [True: 0, False: 18.2k]
  ------------------
28774|  18.2k|            janet_buffer_push_bytes(buffer, to->data, to->count);
28775|  18.2k|            break;
28776|  11.4M|        }
28777|     44|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (28777:9): [True: 44, False: 16.9M]
  ------------------
28778|     44|            JanetAbstract p = janet_unwrap_abstract(x);
  ------------------
  |  |  861|     44|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
28779|     44|            const JanetAbstractType *t = janet_abstract_type(p);
  ------------------
  |  | 1889|     44|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|     44|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
28780|     44|            if (t->tostring != NULL) {
  ------------------
  |  Branch (28780:17): [True: 26, False: 18]
  ------------------
28781|     26|                t->tostring(p, buffer);
28782|     26|            } else {
28783|     18|                string_description_b(buffer, t->name, p);
28784|     18|            }
28785|     44|        }
28786|     44|        return;
28787|     17|        case JANET_CFUNCTION: {
  ------------------
  |  Branch (28787:9): [True: 17, False: 16.9M]
  ------------------
28788|     17|            JanetCFunRegistry *reg = janet_registry_get(janet_unwrap_cfunction(x));
  ------------------
  |  |  864|     17|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
28789|     17|            if (NULL != reg) {
  ------------------
  |  Branch (28789:17): [True: 15, False: 2]
  ------------------
28790|     15|                janet_buffer_push_cstring(buffer, "<cfunction ");
28791|     15|                if (NULL != reg->name_prefix) {
  ------------------
  |  Branch (28791:21): [True: 0, False: 15]
  ------------------
28792|      0|                    janet_buffer_push_cstring(buffer, reg->name_prefix);
28793|      0|                    janet_buffer_push_u8(buffer, '/');
28794|      0|                }
28795|     15|                janet_buffer_push_cstring(buffer, reg->name);
28796|     15|                janet_buffer_push_u8(buffer, '>');
28797|     15|                break;
28798|     15|            }
28799|      2|            goto fallthrough;
28800|     17|        }
28801|  2.19k|        case JANET_FUNCTION: {
  ------------------
  |  Branch (28801:9): [True: 2.19k, False: 16.9M]
  ------------------
28802|  2.19k|            JanetFunction *fun = janet_unwrap_function(x);
  ------------------
  |  |  863|  2.19k|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
28803|  2.19k|            JanetFuncDef *def = fun->def;
28804|  2.19k|            if (def == NULL) {
  ------------------
  |  Branch (28804:17): [True: 0, False: 2.19k]
  ------------------
28805|      0|                janet_buffer_push_cstring(buffer, "<incomplete function>");
28806|      0|                break;
28807|      0|            }
28808|  2.19k|            if (def->name) {
  ------------------
  |  Branch (28808:17): [True: 2.17k, False: 23]
  ------------------
28809|  2.17k|                const uint8_t *n = def->name;
28810|  2.17k|                janet_buffer_push_cstring(buffer, "<function ");
28811|  2.17k|                janet_buffer_push_bytes(buffer, n, janet_string_length(n));
  ------------------
  |  | 1803|  2.17k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|  2.17k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
28812|  2.17k|                janet_buffer_push_u8(buffer, '>');
28813|  2.17k|                break;
28814|  2.17k|            }
28815|     23|            goto fallthrough;
28816|  2.19k|        }
28817|     25|    fallthrough:
28818|  66.9k|        default:
  ------------------
  |  Branch (28818:9): [True: 66.9k, False: 16.8M]
  ------------------
28819|  66.9k|            string_description_b(buffer, janet_type_names[janet_type(x)], janet_unwrap_pointer(x));
  ------------------
  |  |  790|  66.9k|    (isnan((x).number) \
  |  |  791|  66.9k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  66.9k|        : JANET_NUMBER)
  ------------------
                          string_description_b(buffer, janet_type_names[janet_type(x)], janet_unwrap_pointer(x));
  ------------------
  |  |  862|  66.9k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (28819:59): [True: 66.9k, False: 0]
  ------------------
28820|  66.9k|            break;
28821|  16.9M|    }
28822|  16.9M|}
janet_description_b:
28837|   415k|void janet_description_b(JanetBuffer *buffer, Janet x) {
28838|   415k|    switch (janet_type(x)) {
  ------------------
  |  |  790|   415k|    (isnan((x).number) \
  |  |  791|   415k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|   415k|        : JANET_NUMBER)
  ------------------
  |  Branch (28838:13): [True: 411k, False: 4.30k]
  ------------------
28839|   403k|        default:
  ------------------
  |  Branch (28839:9): [True: 403k, False: 12.1k]
  ------------------
28840|   403k|            break;
28841|   403k|        case JANET_NIL:
  ------------------
  |  Branch (28841:9): [True: 70, False: 415k]
  ------------------
28842|     70|            janet_buffer_push_cstring(buffer, "nil");
28843|     70|            return;
28844|  3.14k|        case JANET_KEYWORD:
  ------------------
  |  Branch (28844:9): [True: 3.14k, False: 412k]
  ------------------
28845|  3.14k|            janet_buffer_push_u8(buffer, ':');
28846|  3.14k|            break;
28847|  7.32k|        case JANET_STRING:
  ------------------
  |  Branch (28847:9): [True: 7.32k, False: 408k]
  ------------------
28848|  7.32k|            janet_escape_string_b(buffer, janet_unwrap_string(x));
  ------------------
  |  |  858|  7.32k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
28849|  7.32k|            return;
28850|  1.40k|        case JANET_BUFFER: {
  ------------------
  |  Branch (28850:9): [True: 1.40k, False: 414k]
  ------------------
28851|  1.40k|            JanetBuffer *b = janet_unwrap_buffer(x);
  ------------------
  |  |  857|  1.40k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
28852|  1.40k|            janet_escape_buffer_b(buffer, b);
28853|  1.40k|            return;
28854|      0|        }
28855|    229|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (28855:9): [True: 229, False: 415k]
  ------------------
28856|    229|            JanetAbstract p = janet_unwrap_abstract(x);
  ------------------
  |  |  861|    229|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
28857|    229|            const JanetAbstractType *t = janet_abstract_type(p);
  ------------------
  |  | 1889|    229|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|    229|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
28858|    229|            if (t->tostring != NULL) {
  ------------------
  |  Branch (28858:17): [True: 203, False: 26]
  ------------------
28859|    203|                janet_buffer_push_cstring(buffer, "<");
28860|    203|                janet_buffer_push_cstring(buffer, t->name);
28861|    203|                janet_buffer_push_cstring(buffer, " ");
28862|    203|                t->tostring(p, buffer);
28863|    203|                janet_buffer_push_cstring(buffer, ">");
28864|    203|            } else {
28865|     26|                string_description_b(buffer, t->name, p);
28866|     26|            }
28867|    229|            return;
28868|      0|        }
28869|   415k|    }
28870|   406k|    janet_to_string_b(buffer, x);
28871|   406k|}
janet_to_string:
28884|  7.88k|const uint8_t *janet_to_string(Janet x) {
28885|  7.88k|    switch (janet_type(x)) {
  ------------------
  |  |  790|  7.88k|    (isnan((x).number) \
  |  |  791|  7.88k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  7.88k|        : JANET_NUMBER)
  ------------------
  |  Branch (28885:13): [True: 7.82k, False: 65]
  ------------------
28886|    792|        default: {
  ------------------
  |  Branch (28886:9): [True: 792, False: 7.09k]
  ------------------
28887|    792|            JanetBuffer b;
28888|    792|            janet_buffer_init(&b, 10);
28889|    792|            janet_to_string_b(&b, x);
28890|    792|            const uint8_t *ret = janet_string(b.data, b.count);
28891|    792|            janet_buffer_deinit(&b);
28892|    792|            return ret;
28893|      0|        }
28894|      0|        case JANET_BUFFER:
  ------------------
  |  Branch (28894:9): [True: 0, False: 7.88k]
  ------------------
28895|      0|            return janet_string(janet_unwrap_buffer(x)->data, janet_unwrap_buffer(x)->count);
  ------------------
  |  |  857|      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);
  ------------------
  |  |  857|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
28896|  5.56k|        case JANET_STRING:
  ------------------
  |  Branch (28896:9): [True: 5.56k, False: 2.32k]
  ------------------
28897|  6.47k|        case JANET_SYMBOL:
  ------------------
  |  Branch (28897:9): [True: 907, False: 6.98k]
  ------------------
28898|  7.09k|        case JANET_KEYWORD:
  ------------------
  |  Branch (28898:9): [True: 624, False: 7.26k]
  ------------------
28899|  7.09k|            return janet_unwrap_string(x);
  ------------------
  |  |  858|  7.09k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
28900|  7.88k|    }
28901|  7.88k|}
janet_formatbv:
29495|   201k|void janet_formatbv(JanetBuffer *b, const char *format, va_list args) {
29496|   201k|    const char *format_end = format + strlen(format);
29497|   201k|    const char *c = format;
29498|   201k|    int32_t startlen = b->count;
29499|  2.00M|    while (c < format_end) {
  ------------------
  |  Branch (29499:12): [True: 1.80M, False: 201k]
  ------------------
29500|  1.80M|        if (*c != '%') {
  ------------------
  |  Branch (29500:13): [True: 1.61M, False: 185k]
  ------------------
29501|  1.61M|            janet_buffer_push_u8(b, (uint8_t) *c++);
29502|  1.61M|        } else if (*++c == '%') {
  ------------------
  |  Branch (29502:20): [True: 0, False: 185k]
  ------------------
29503|      0|            janet_buffer_push_u8(b, (uint8_t) *c++);
29504|   185k|        } else {
29505|   185k|            char form[MAX_FORMAT], item[MAX_ITEM];
29506|   185k|            char width[3], precision[3];
29507|   185k|            int nb = 0; /* number of bytes in added item */
29508|   185k|            c = scanformat(c, form, width, precision);
29509|   185k|            switch (*c++) {
29510|     33|                case 'c': {
  ------------------
  |  Branch (29510:17): [True: 33, False: 185k]
  ------------------
29511|     33|                    int n = va_arg(args, int);
29512|     33|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |29418|     33|#define MAX_ITEM  256
  ------------------
29513|     33|                    break;
29514|      0|                }
29515|  77.5k|                case 'd':
  ------------------
  |  Branch (29515:17): [True: 77.5k, False: 107k]
  ------------------
29516|  77.5k|                case 'i': {
  ------------------
  |  Branch (29516:17): [True: 0, False: 185k]
  ------------------
29517|  77.5k|                    int64_t n = (int64_t) va_arg(args, int32_t);
29518|  77.5k|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |29418|  77.5k|#define MAX_ITEM  256
  ------------------
29519|  77.5k|                    break;
29520|  77.5k|                }
29521|      0|                case 'D':
  ------------------
  |  Branch (29521:17): [True: 0, False: 185k]
  ------------------
29522|      0|                case 'I': {
  ------------------
  |  Branch (29522:17): [True: 0, False: 185k]
  ------------------
29523|      0|                    int64_t n = va_arg(args, int64_t);
29524|      0|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |29418|      0|#define MAX_ITEM  256
  ------------------
29525|      0|                    break;
29526|      0|                }
29527|     10|                case 'x':
  ------------------
  |  Branch (29527:17): [True: 10, False: 185k]
  ------------------
29528|     10|                case 'X':
  ------------------
  |  Branch (29528:17): [True: 0, False: 185k]
  ------------------
29529|     10|                case 'o':
  ------------------
  |  Branch (29529:17): [True: 0, False: 185k]
  ------------------
29530|     10|                case 'u': {
  ------------------
  |  Branch (29530:17): [True: 0, False: 185k]
  ------------------
29531|     10|                    uint64_t n = va_arg(args, uint64_t);
29532|     10|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |29418|     10|#define MAX_ITEM  256
  ------------------
29533|     10|                    break;
29534|     10|                }
29535|      0|                case 'a':
  ------------------
  |  Branch (29535:17): [True: 0, False: 185k]
  ------------------
29536|      0|                case 'A':
  ------------------
  |  Branch (29536:17): [True: 0, False: 185k]
  ------------------
29537|      0|                case 'e':
  ------------------
  |  Branch (29537:17): [True: 0, False: 185k]
  ------------------
29538|      0|                case 'E':
  ------------------
  |  Branch (29538:17): [True: 0, False: 185k]
  ------------------
29539|      5|                case 'f':
  ------------------
  |  Branch (29539:17): [True: 5, False: 185k]
  ------------------
29540|      5|                case 'g':
  ------------------
  |  Branch (29540:17): [True: 0, False: 185k]
  ------------------
29541|      5|                case 'G': {
  ------------------
  |  Branch (29541:17): [True: 0, False: 185k]
  ------------------
29542|      5|                    double d = va_arg(args, double);
29543|      5|                    nb = snprintf(item, MAX_ITEM, form, d);
  ------------------
  |  |29418|      5|#define MAX_ITEM  256
  ------------------
29544|      5|                    break;
29545|      5|                }
29546|  90.4k|                case 's':
  ------------------
  |  Branch (29546:17): [True: 90.4k, False: 94.9k]
  ------------------
29547|  90.5k|                case 'S': {
  ------------------
  |  Branch (29547:17): [True: 59, False: 185k]
  ------------------
29548|  90.5k|                    const char *str = va_arg(args, const char *);
29549|  90.5k|                    int32_t len = (c[-1] == 's')
  ------------------
  |  Branch (29549:35): [True: 90.4k, False: 59]
  ------------------
29550|  90.5k|                                  ? (int32_t) strlen(str)
29551|  90.5k|                                  : janet_string_length((JanetString) str);
  ------------------
  |  | 1803|     59|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|     59|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
29552|  90.5k|                    if (form[2] == '\0')
  ------------------
  |  Branch (29552:25): [True: 90.5k, False: 0]
  ------------------
29553|  90.5k|                        janet_buffer_push_bytes(b, (const uint8_t *) str, len);
29554|      0|                    else {
29555|      0|                        if (len != (int32_t) strlen((const char *) str))
  ------------------
  |  Branch (29555:29): [True: 0, False: 0]
  ------------------
29556|      0|                            janet_panic("string contains zeros");
29557|      0|                        if (!strchr(form, '.') && len >= 100) {
  ------------------
  |  Branch (29557:29): [True: 0, False: 0]
  |  Branch (29557:51): [True: 0, False: 0]
  ------------------
29558|      0|                            janet_panic("no precision and string is too long to be formatted");
29559|      0|                        } else {
29560|      0|                            nb = snprintf(item, MAX_ITEM, form, str);
  ------------------
  |  |29418|      0|#define MAX_ITEM  256
  ------------------
29561|      0|                        }
29562|      0|                    }
29563|  90.5k|                    break;
29564|  90.5k|                }
29565|  90.5k|                case 'V':
  ------------------
  |  Branch (29565:17): [True: 478, False: 184k]
  ------------------
29566|    478|                    janet_to_string_b(b, va_arg(args, Janet));
29567|    478|                    break;
29568|  14.0k|                case 'v':
  ------------------
  |  Branch (29568:17): [True: 14.0k, False: 171k]
  ------------------
29569|  14.0k|                    janet_description_b(b, va_arg(args, Janet));
29570|  14.0k|                    break;
29571|    164|                case 't':
  ------------------
  |  Branch (29571:17): [True: 164, False: 185k]
  ------------------
29572|    164|                    janet_buffer_push_cstring(b, typestr(va_arg(args, Janet)));
29573|    164|                    break;
29574|    637|                case 'T': {
  ------------------
  |  Branch (29574:17): [True: 637, False: 184k]
  ------------------
29575|    637|                    int types = va_arg(args, int);
29576|    637|                    pushtypes(b, types);
29577|    637|                    break;
29578|  90.5k|                }
29579|      0|                case 'M':
  ------------------
  |  Branch (29579:17): [True: 0, False: 185k]
  ------------------
29580|      0|                case 'm':
  ------------------
  |  Branch (29580:17): [True: 0, False: 185k]
  ------------------
29581|      0|                case 'N':
  ------------------
  |  Branch (29581:17): [True: 0, False: 185k]
  ------------------
29582|      0|                case 'n':
  ------------------
  |  Branch (29582:17): [True: 0, False: 185k]
  ------------------
29583|      0|                case 'Q':
  ------------------
  |  Branch (29583:17): [True: 0, False: 185k]
  ------------------
29584|  1.77k|                case 'q':
  ------------------
  |  Branch (29584:17): [True: 1.77k, False: 183k]
  ------------------
29585|  1.77k|                case 'P':
  ------------------
  |  Branch (29585:17): [True: 0, False: 185k]
  ------------------
29586|  1.93k|                case 'p': { /* janet pretty , precision = depth */
  ------------------
  |  Branch (29586:17): [True: 161, False: 185k]
  ------------------
29587|  1.93k|                    int depth = atoi(precision);
29588|  1.93k|                    if (depth < 1) depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  291|  1.93k|#define JANET_RECURSION_GUARD 1024
  ------------------
  |  Branch (29588:25): [True: 1.93k, False: 0]
  ------------------
29589|  1.93k|                    char d = c[-1];
29590|  1.93k|                    int has_color = (d == 'P') || (d == 'Q') || (d == 'M') || (d == 'N');
  ------------------
  |  Branch (29590:37): [True: 0, False: 1.93k]
  |  Branch (29590:51): [True: 0, False: 1.93k]
  |  Branch (29590:65): [True: 0, False: 1.93k]
  |  Branch (29590:79): [True: 0, False: 1.93k]
  ------------------
29591|  1.93k|                    int has_oneline = (d == 'Q') || (d == 'q') || (d == 'N') || (d == 'n');
  ------------------
  |  Branch (29591:39): [True: 0, False: 1.93k]
  |  Branch (29591:53): [True: 1.77k, False: 161]
  |  Branch (29591:67): [True: 0, False: 161]
  |  Branch (29591:81): [True: 0, False: 161]
  ------------------
29592|  1.93k|                    int has_notrunc = (d == 'M') || (d == 'm') || (d == 'N') || (d == 'n');
  ------------------
  |  Branch (29592:39): [True: 0, False: 1.93k]
  |  Branch (29592:53): [True: 0, False: 1.93k]
  |  Branch (29592:67): [True: 0, False: 1.93k]
  |  Branch (29592:81): [True: 0, False: 1.93k]
  ------------------
29593|  1.93k|                    int columns = atoi(width);
29594|  1.93k|                    if (columns == 0) {
  ------------------
  |  Branch (29594:25): [True: 1.93k, False: 0]
  ------------------
29595|  1.93k|                        columns = JANET_COLUMNS;
  ------------------
  |  |29331|  1.93k|#define JANET_COLUMNS 80
  ------------------
29596|  1.93k|                    } else if (columns < 0) {
  ------------------
  |  Branch (29596:32): [True: 0, False: 0]
  ------------------
29597|      0|                        has_oneline = 1;
29598|      0|                    }
29599|  1.93k|                    int flags = 0;
29600|  1.93k|                    flags |= has_color ? JANET_PRETTY_COLOR : 0;
  ------------------
  |  | 1957|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29600:30): [True: 0, False: 1.93k]
  ------------------
29601|  1.93k|                    flags |= has_oneline ? JANET_PRETTY_ONELINE : 0;
  ------------------
  |  | 1958|  1.77k|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (29601:30): [True: 1.77k, False: 161]
  ------------------
29602|  1.93k|                    flags |= has_notrunc ? JANET_PRETTY_NOTRUNC : 0;
  ------------------
  |  | 1959|      0|#define JANET_PRETTY_NOTRUNC 4
  ------------------
  |  Branch (29602:30): [True: 0, False: 1.93k]
  ------------------
29603|  1.93k|                    janet_pretty_(b, depth, columns, flags,
29604|  1.93k|                                  va_arg(args, Janet), startlen, b->count);
29605|  1.93k|                    break;
29606|  1.77k|                }
29607|      0|                case 'j': {
  ------------------
  |  Branch (29607:17): [True: 0, False: 185k]
  ------------------
29608|      0|                    int depth = atoi(precision);
29609|      0|                    if (depth < 1) {
  ------------------
  |  Branch (29609:25): [True: 0, False: 0]
  ------------------
29610|      0|                        depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  291|      0|#define JANET_RECURSION_GUARD 1024
  ------------------
29611|      0|                    }
29612|      0|                    janet_jdn_(b, depth, va_arg(args, Janet), startlen, b->count);
29613|      0|                    break;
29614|  1.77k|                }
29615|      0|                default: {
  ------------------
  |  Branch (29615:17): [True: 0, False: 185k]
  ------------------
29616|       |                    /* also treat cases 'nLlh' */
29617|      0|                    janet_panicf("invalid conversion '%s' to 'format'",
29618|      0|                                 form);
29619|  1.77k|                }
29620|   185k|            }
29621|   185k|            if (nb >= MAX_ITEM)
  ------------------
  |  |29418|   185k|#define MAX_ITEM  256
  ------------------
  |  Branch (29621:17): [True: 0, False: 185k]
  ------------------
29622|      0|                janet_panic("format buffer overflow");
29623|   185k|            if (nb > 0)
  ------------------
  |  Branch (29623:17): [True: 77.5k, False: 107k]
  ------------------
29624|  77.5k|                janet_buffer_push_bytes(b, (uint8_t *) item, nb);
29625|   185k|        }
29626|       |
29627|  1.80M|    }
29628|   201k|}
janet_formatc:
29632|  21.3k|const uint8_t *janet_formatc(const char *format, ...) {
29633|  21.3k|    va_list args;
29634|  21.3k|    const uint8_t *ret;
29635|  21.3k|    JanetBuffer buffer;
29636|  21.3k|    int32_t len = 0;
29637|       |
29638|       |    /* Calculate length, init buffer and args */
29639|   676k|    while (format[len]) len++;
  ------------------
  |  Branch (29639:12): [True: 655k, False: 21.3k]
  ------------------
29640|  21.3k|    janet_buffer_init(&buffer, len);
29641|  21.3k|    va_start(args, format);
29642|       |
29643|       |    /* Run format */
29644|  21.3k|    janet_formatbv(&buffer, format, args);
29645|       |
29646|       |    /* Iterate length */
29647|  21.3k|    va_end(args);
29648|       |
29649|  21.3k|    ret = janet_string(buffer.data, buffer.count);
29650|  21.3k|    janet_buffer_deinit(&buffer);
29651|  21.3k|    return ret;
29652|  21.3k|}
janet_formatb:
29654|  1.12k|JanetBuffer *janet_formatb(JanetBuffer *buffer, const char *format, ...) {
29655|  1.12k|    va_list args;
29656|  1.12k|    va_start(args, format);
29657|  1.12k|    janet_formatbv(buffer, format, args);
29658|       |    va_end(args);
29659|  1.12k|    return buffer;
29660|  1.12k|}
janet_buffer_format:
29669|    719|    Janet *argv) {
29670|    719|    size_t sfl = strlen(strfrmt);
29671|    719|    const char *strfrmt_end = strfrmt + sfl;
29672|    719|    int32_t arg = argstart;
29673|    719|    int32_t startlen = b->count;
29674|  27.5k|    while (strfrmt < strfrmt_end) {
  ------------------
  |  Branch (29674:12): [True: 26.8k, False: 633]
  ------------------
29675|  26.8k|        if (*strfrmt != '%')
  ------------------
  |  Branch (29675:13): [True: 26.0k, False: 881]
  ------------------
29676|  26.0k|            janet_buffer_push_u8(b, (uint8_t) * strfrmt++);
29677|    881|        else if (*++strfrmt == '%')
  ------------------
  |  Branch (29677:18): [True: 71, False: 810]
  ------------------
29678|     71|            janet_buffer_push_u8(b, (uint8_t) * strfrmt++); /* %% */
29679|    810|        else { /* format item */
29680|    810|            char form[MAX_FORMAT], item[MAX_ITEM];
29681|    810|            char width[3], precision[3];
29682|    810|            int nb = 0; /* number of bytes in added item */
29683|       |#ifdef JANET_PLAN9
29684|       |            if (*strfrmt == 'r') {
29685|       |                rerrstr(item, MAX_ITEM);
29686|       |                nb = strlen(item);
29687|       |            } else
29688|       |#endif
29689|    810|                if (++arg >= argc)
  ------------------
  |  Branch (29689:21): [True: 11, False: 799]
  ------------------
29690|     11|                    janet_panic("not enough values for format");
29691|    799|            strfrmt = scanformat(strfrmt, form, width, precision);
29692|    799|            switch (*strfrmt++) {
29693|       |#ifdef JANET_PLAN9
29694|       |                case 'r':
29695|       |                    break;
29696|       |#endif
29697|      7|                case 'c': {
  ------------------
  |  Branch (29697:17): [True: 7, False: 792]
  ------------------
29698|      7|                    nb = snprintf(item, MAX_ITEM, form, (int)
  ------------------
  |  |29418|      7|#define MAX_ITEM  256
  ------------------
29699|      7|                                  janet_getinteger(argv, arg));
29700|      7|                    break;
29701|      0|                }
29702|      1|                case 'D':
  ------------------
  |  Branch (29702:17): [True: 1, False: 798]
  ------------------
29703|      5|                case 'I':
  ------------------
  |  Branch (29703:17): [True: 4, False: 795]
  ------------------
29704|      9|                case 'd':
  ------------------
  |  Branch (29704:17): [True: 4, False: 795]
  ------------------
29705|     12|                case 'i': {
  ------------------
  |  Branch (29705:17): [True: 3, False: 796]
  ------------------
29706|     12|                    int64_t n = janet_getinteger64(argv, arg);
29707|     12|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |29418|     12|#define MAX_ITEM  256
  ------------------
29708|     12|                    break;
29709|      9|                }
29710|      6|                case 'x':
  ------------------
  |  Branch (29710:17): [True: 6, False: 793]
  ------------------
29711|      8|                case 'X':
  ------------------
  |  Branch (29711:17): [True: 2, False: 797]
  ------------------
29712|     11|                case 'o':
  ------------------
  |  Branch (29712:17): [True: 3, False: 796]
  ------------------
29713|     15|                case 'u': {
  ------------------
  |  Branch (29713:17): [True: 4, False: 795]
  ------------------
29714|     15|                    uint64_t n = janet_getuinteger64(argv, arg);
29715|     15|                    nb = snprintf(item, MAX_ITEM, form, n);
  ------------------
  |  |29418|     15|#define MAX_ITEM  256
  ------------------
29716|     15|                    break;
29717|     11|                }
29718|      1|                case 'a':
  ------------------
  |  Branch (29718:17): [True: 1, False: 798]
  ------------------
29719|      2|                case 'A':
  ------------------
  |  Branch (29719:17): [True: 1, False: 798]
  ------------------
29720|      3|                case 'e':
  ------------------
  |  Branch (29720:17): [True: 1, False: 798]
  ------------------
29721|      3|                case 'E':
  ------------------
  |  Branch (29721:17): [True: 0, False: 799]
  ------------------
29722|      3|                case 'f':
  ------------------
  |  Branch (29722:17): [True: 0, False: 799]
  ------------------
29723|     12|                case 'g':
  ------------------
  |  Branch (29723:17): [True: 9, False: 790]
  ------------------
29724|     15|                case 'G': {
  ------------------
  |  Branch (29724:17): [True: 3, False: 796]
  ------------------
29725|     15|                    double d = janet_getnumber(argv, arg);
29726|     15|                    nb = snprintf(item, MAX_ITEM, form, d);
  ------------------
  |  |29418|     15|#define MAX_ITEM  256
  ------------------
29727|     15|                    break;
29728|     12|                }
29729|     27|                case 's': {
  ------------------
  |  Branch (29729:17): [True: 27, False: 772]
  ------------------
29730|     27|                    const char *s = janet_getcbytes(argv, arg);
29731|     27|                    if (form[2] == '\0')
  ------------------
  |  Branch (29731:25): [True: 6, False: 21]
  ------------------
29732|      6|                        janet_buffer_push_cstring(b, s);
29733|     21|                    else {
29734|     21|                        nb = snprintf(item, MAX_ITEM, form, s);
  ------------------
  |  |29418|     21|#define MAX_ITEM  256
  ------------------
29735|     21|                    }
29736|     27|                    break;
29737|     12|                }
29738|      6|                case 'V': {
  ------------------
  |  Branch (29738:17): [True: 6, False: 793]
  ------------------
29739|      6|                    janet_to_string_b(b, argv[arg]);
29740|      6|                    break;
29741|     12|                }
29742|      3|                case 'v': {
  ------------------
  |  Branch (29742:17): [True: 3, False: 796]
  ------------------
29743|      3|                    janet_description_b(b, argv[arg]);
29744|      3|                    break;
29745|     12|                }
29746|     27|                case 't':
  ------------------
  |  Branch (29746:17): [True: 27, False: 772]
  ------------------
29747|     27|                    janet_buffer_push_cstring(b, typestr(argv[arg]));
29748|     27|                    break;
29749|     50|                case 'M':
  ------------------
  |  Branch (29749:17): [True: 50, False: 749]
  ------------------
29750|     53|                case 'm':
  ------------------
  |  Branch (29750:17): [True: 3, False: 796]
  ------------------
29751|     59|                case 'N':
  ------------------
  |  Branch (29751:17): [True: 6, False: 793]
  ------------------
29752|     70|                case 'n':
  ------------------
  |  Branch (29752:17): [True: 11, False: 788]
  ------------------
29753|     76|                case 'Q':
  ------------------
  |  Branch (29753:17): [True: 6, False: 793]
  ------------------
29754|     78|                case 'q':
  ------------------
  |  Branch (29754:17): [True: 2, False: 797]
  ------------------
29755|     82|                case 'P':
  ------------------
  |  Branch (29755:17): [True: 4, False: 795]
  ------------------
29756|     85|                case 'p': { /* janet pretty , precision = depth */
  ------------------
  |  Branch (29756:17): [True: 3, False: 796]
  ------------------
29757|     85|                    int depth = atoi(precision);
29758|     85|                    if (depth < 1) depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  291|     82|#define JANET_RECURSION_GUARD 1024
  ------------------
  |  Branch (29758:25): [True: 82, False: 3]
  ------------------
29759|     85|                    char d = strfrmt[-1];
29760|     85|                    int has_color = (d == 'P') || (d == 'Q') || (d == 'M') || (d == 'N');
  ------------------
  |  Branch (29760:37): [True: 4, False: 81]
  |  Branch (29760:51): [True: 6, False: 75]
  |  Branch (29760:65): [True: 50, False: 25]
  |  Branch (29760:79): [True: 6, False: 19]
  ------------------
29761|     85|                    int has_oneline = (d == 'Q') || (d == 'q') || (d == 'N') || (d == 'n');
  ------------------
  |  Branch (29761:39): [True: 6, False: 79]
  |  Branch (29761:53): [True: 2, False: 77]
  |  Branch (29761:67): [True: 6, False: 71]
  |  Branch (29761:81): [True: 11, False: 60]
  ------------------
29762|     85|                    int has_notrunc = (d == 'M') || (d == 'm') || (d == 'N') || (d == 'n');
  ------------------
  |  Branch (29762:39): [True: 50, False: 35]
  |  Branch (29762:53): [True: 3, False: 32]
  |  Branch (29762:67): [True: 6, False: 26]
  |  Branch (29762:81): [True: 11, False: 15]
  ------------------
29763|     85|                    int columns = atoi(width);
29764|     85|                    if (columns == 0)
  ------------------
  |  Branch (29764:25): [True: 81, False: 4]
  ------------------
29765|     81|                        columns = JANET_COLUMNS;
  ------------------
  |  |29331|     81|#define JANET_COLUMNS 80
  ------------------
29766|      4|                    else if (columns < 0)
  ------------------
  |  Branch (29766:30): [True: 0, False: 4]
  ------------------
29767|      0|                        has_oneline = 1;
29768|     85|                    int flags = 0;
29769|     85|                    flags |= has_color ? JANET_PRETTY_COLOR : 0;
  ------------------
  |  | 1957|     66|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29769:30): [True: 66, False: 19]
  ------------------
29770|     85|                    flags |= has_oneline ? JANET_PRETTY_ONELINE : 0;
  ------------------
  |  | 1958|     25|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (29770:30): [True: 25, False: 60]
  ------------------
29771|     85|                    flags |= has_notrunc ? JANET_PRETTY_NOTRUNC : 0;
  ------------------
  |  | 1959|     70|#define JANET_PRETTY_NOTRUNC 4
  ------------------
  |  Branch (29771:30): [True: 70, False: 15]
  ------------------
29772|     85|                    janet_pretty_(b, depth, columns, flags,
29773|     85|                                  argv[arg], startlen, b->count);
29774|     85|                    break;
29775|     82|                }
29776|    573|                case 'j': {
  ------------------
  |  Branch (29776:17): [True: 573, False: 226]
  ------------------
29777|    573|                    int depth = atoi(precision);
29778|    573|                    if (depth < 1)
  ------------------
  |  Branch (29778:25): [True: 569, False: 4]
  ------------------
29779|    569|                        depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  291|    569|#define JANET_RECURSION_GUARD 1024
  ------------------
29780|    573|                    janet_jdn_(b, depth, argv[arg], startlen, b->count);
29781|    573|                    break;
29782|     82|                }
29783|     23|                default: {
  ------------------
  |  Branch (29783:17): [True: 23, False: 776]
  ------------------
29784|       |                    /* also treat cases 'nLlh' */
29785|     23|                    janet_panicf("invalid conversion '%s' to 'format'",
29786|     23|                                 form);
29787|     82|                }
29788|    799|            }
29789|    725|            if (nb >= MAX_ITEM)
  ------------------
  |  |29418|    725|#define MAX_ITEM  256
  ------------------
  |  Branch (29789:17): [True: 1, False: 724]
  ------------------
29790|      1|                janet_panic("format buffer overflow");
29791|    724|            if (nb > 0)
  ------------------
  |  Branch (29791:17): [True: 26, False: 698]
  ------------------
29792|     26|                janet_buffer_push_bytes(b, (uint8_t *) item, nb);
29793|    724|        }
29794|  26.8k|    }
29795|    719|}
janetc_regalloc_init:
29835|  2.18M|void janetc_regalloc_init(JanetcRegisterAllocator *ra) {
29836|       |    ra->chunks = NULL;
29837|  2.18M|    ra->count = 0;
29838|  2.18M|    ra->capacity = 0;
29839|  2.18M|    ra->max = 0;
29840|  2.18M|    ra->regtemps = 0;
29841|  2.18M|}
janetc_regalloc_deinit:
29843|  2.21M|void janetc_regalloc_deinit(JanetcRegisterAllocator *ra) {
29844|  2.21M|    janet_free(ra->chunks);
  ------------------
  |  | 2402|  2.21M|#define janet_free(X) free((X))
  ------------------
29845|  2.21M|}
janetc_regalloc_clone:
29870|  30.2k|void janetc_regalloc_clone(JanetcRegisterAllocator *dest, JanetcRegisterAllocator *src) {
29871|  30.2k|    size_t size;
29872|  30.2k|    dest->count = src->count;
29873|  30.2k|    dest->capacity = src->capacity;
29874|  30.2k|    dest->max = src->max;
29875|  30.2k|    size = sizeof(uint32_t) * (size_t) dest->capacity;
29876|  30.2k|    dest->regtemps = 0;
29877|  30.2k|    if (size) {
  ------------------
  |  Branch (29877:9): [True: 28.0k, False: 2.20k]
  ------------------
29878|  28.0k|        dest->chunks = janet_malloc(size);
  ------------------
  |  | 2393|  28.0k|#define janet_malloc(X) malloc((X))
  ------------------
29879|  28.0k|        if (!dest->chunks) {
  ------------------
  |  Branch (29879:13): [True: 0, False: 28.0k]
  ------------------
29880|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
29881|      0|        }
29882|  28.0k|        memcpy(dest->chunks, src->chunks, size);
29883|  28.0k|    } else {
29884|       |        dest->chunks = NULL;
29885|  2.20k|    }
29886|  30.2k|}
janetc_regalloc_touch:
29906|   122M|void janetc_regalloc_touch(JanetcRegisterAllocator *ra, int32_t reg) {
29907|   122M|    int32_t chunk = reg >> 5;
29908|   122M|    int32_t bit = reg & 0x1F;
29909|   125M|    while (chunk >= ra->count) pushchunk(ra);
  ------------------
  |  Branch (29909:12): [True: 3.33M, False: 122M]
  ------------------
29910|   122M|    ra->chunks[chunk] |= ithbit(bit);
  ------------------
  |  |29864|   122M|#define ithbit(I) ((uint32_t)1 << (I))
  ------------------
29911|   122M|}
janetc_regalloc_1:
29914|  20.1M|int32_t janetc_regalloc_1(JanetcRegisterAllocator *ra) {
29915|       |    /* Get the nth bit in the array */
29916|  20.1M|    int32_t bit, chunk, nchunks, reg;
29917|  20.1M|    bit = -1;
29918|  20.1M|    nchunks = ra->count;
29919|  10.8G|    for (chunk = 0; chunk < nchunks; chunk++) {
  ------------------
  |  Branch (29919:21): [True: 10.8G, False: 1.17M]
  ------------------
29920|  10.8G|        uint32_t block = ra->chunks[chunk];
29921|  10.8G|        if (block == 0xFFFFFFFF) continue;
  ------------------
  |  Branch (29921:13): [True: 10.8G, False: 18.9M]
  ------------------
29922|  18.9M|        bit = count_trailing_ones(block);
  ------------------
  |  |29850|  18.9M|#define count_trailing_ones(x) __builtin_ctz(~(x))
  ------------------
29923|  18.9M|        break;
29924|  10.8G|    }
29925|       |    /* No reg found */
29926|  20.1M|    if (bit == -1) {
  ------------------
  |  Branch (29926:9): [True: 1.17M, False: 18.9M]
  ------------------
29927|  1.17M|        pushchunk(ra);
29928|  1.17M|        bit = 0;
29929|  1.17M|        chunk = nchunks;
29930|  1.17M|    }
29931|       |    /* set the bit at index bit in chunk */
29932|  20.1M|    ra->chunks[chunk] |= ithbit(bit);
  ------------------
  |  |29864|  20.1M|#define ithbit(I) ((uint32_t)1 << (I))
  ------------------
29933|  20.1M|    reg = (chunk << 5) + bit;
29934|  20.1M|    if (reg > ra->max)
  ------------------
  |  Branch (29934:9): [True: 15.2M, False: 4.92M]
  ------------------
29935|  15.2M|        ra->max = reg;
29936|  20.1M|    return reg;
29937|  20.1M|}
janetc_regalloc_free:
29941|  5.63M|void janetc_regalloc_free(JanetcRegisterAllocator *ra, int32_t reg) {
29942|  5.63M|    int32_t chunk = reg >> 5;
29943|  5.63M|    int32_t bit = reg & 0x1F;
29944|  5.63M|    ra->chunks[chunk] &= ~ithbit(bit);
  ------------------
  |  |29864|  5.63M|#define ithbit(I) ((uint32_t)1 << (I))
  ------------------
29945|  5.63M|}
janetc_regalloc_check:
29948|   118M|int janetc_regalloc_check(JanetcRegisterAllocator *ra, int32_t reg) {
29949|   118M|    int32_t chunk = reg >> 5;
29950|   118M|    int32_t bit = reg & 0x1F;
29951|   118M|    while (chunk >= ra->count) pushchunk(ra);
  ------------------
  |  Branch (29951:12): [True: 817, False: 118M]
  ------------------
29952|   118M|    return !!(ra->chunks[chunk] & ithbit(bit));
  ------------------
  |  |29864|   118M|#define ithbit(I) ((uint32_t)1 << (I))
  ------------------
29953|   118M|}
janetc_regalloc_temp:
29958|  8.70M|int32_t janetc_regalloc_temp(JanetcRegisterAllocator *ra, JanetcRegisterTemp nth) {
29959|  8.70M|    int32_t oldmax = ra->max;
29960|  8.70M|    if (ra->regtemps & (1 << nth)) {
  ------------------
  |  Branch (29960:9): [True: 0, False: 8.70M]
  ------------------
29961|      0|        JANET_EXIT("regtemp already allocated");
  ------------------
  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  377|      0|        __FILE__,\
  |  |  378|      0|        __LINE__,\
  |  |  379|      0|        (m));\
  |  |  380|      0|    abort();\
  |  |  381|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
29962|      0|    }
29963|  8.70M|    ra->regtemps |= 1 << nth;
29964|  8.70M|    int32_t reg = janetc_regalloc_1(ra);
29965|  8.70M|    if (reg > 0xFF) {
  ------------------
  |  Branch (29965:9): [True: 7.51M, False: 1.19M]
  ------------------
29966|  7.51M|        reg = 0xF0 + nth;
29967|  7.51M|        ra->max = (reg > oldmax) ? reg : oldmax;
  ------------------
  |  Branch (29967:19): [True: 116, False: 7.51M]
  ------------------
29968|  7.51M|    }
29969|  8.70M|    return reg;
29970|  8.70M|}
janetc_regalloc_freetemp:
29972|  9.20M|void janetc_regalloc_freetemp(JanetcRegisterAllocator *ra, int32_t reg, JanetcRegisterTemp nth) {
29973|  9.20M|    ra->regtemps &= ~(1 << nth);
29974|  9.20M|    if (reg < 0xF0)
  ------------------
  |  Branch (29974:9): [True: 1.51M, False: 7.68M]
  ------------------
29975|  1.51M|        janetc_regalloc_free(ra, reg);
29976|  9.20M|}
janet_dobytes:
30012|  7.16k|int janet_dobytes(JanetTable *env, const uint8_t *bytes, int32_t len, const char *sourcePath, Janet *out) {
30013|  7.16k|    JanetParser *parser;
30014|  7.16k|    int errflags = 0, done = 0;
30015|  7.16k|    int32_t index = 0;
30016|  7.16k|    Janet ret = janet_wrap_nil();
  ------------------
  |  |  826|  7.16k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  7.16k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  7.16k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  7.16k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30017|  7.16k|    JanetFiber *fiber = NULL;
30018|  7.16k|    const uint8_t *where = sourcePath ? janet_cstring(sourcePath) : NULL;
  ------------------
  |  Branch (30018:28): [True: 7.16k, False: 0]
  ------------------
30019|       |
30020|  7.16k|    if (where) janet_gcroot(janet_wrap_string(where));
  ------------------
  |  |  843|  7.16k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|  7.16k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  7.16k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  7.16k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30020:9): [True: 7.16k, False: 0]
  ------------------
30021|  7.16k|    if (NULL == sourcePath) sourcePath = "<unknown>";
  ------------------
  |  Branch (30021:9): [True: 0, False: 7.16k]
  ------------------
30022|  7.16k|    parser = janet_abstract(&janet_parser_type, sizeof(JanetParser));
30023|  7.16k|    janet_parser_init(parser);
30024|  7.16k|    janet_gcroot(janet_wrap_abstract(parser));
  ------------------
  |  |  846|  7.16k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|  7.16k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  7.16k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  7.16k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30025|       |
30026|       |    /* While we haven't seen an error */
30027|  12.8M|    while (!done) {
  ------------------
  |  Branch (30027:12): [True: 12.8M, False: 2.74k]
  ------------------
30028|       |
30029|       |        /* Evaluate parsed values */
30030|  13.1M|        while (janet_parser_has_more(parser)) {
  ------------------
  |  Branch (30030:16): [True: 238k, False: 12.8M]
  ------------------
30031|   238k|            Janet form = janet_parser_produce(parser);
30032|   238k|            JanetCompileResult cres = janet_compile(form, env, where);
30033|   238k|            if (cres.status == JANET_COMPILE_OK) {
  ------------------
  |  Branch (30033:17): [True: 235k, False: 2.32k]
  ------------------
30034|   235k|                JanetFunction *f = janet_thunk(cres.funcdef);
30035|   235k|                fiber = janet_fiber(f, 64, 0, NULL);
30036|   235k|                fiber->env = env;
30037|   235k|                JanetSignal status = janet_continue(fiber, janet_wrap_nil(), &ret);
  ------------------
  |  |  826|   235k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|   235k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   235k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   235k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30038|   235k|                if (status != JANET_SIGNAL_OK && status != JANET_SIGNAL_EVENT) {
  ------------------
  |  Branch (30038:21): [True: 3.50k, False: 232k]
  |  Branch (30038:50): [True: 2.09k, False: 1.40k]
  ------------------
30039|  2.09k|                    janet_stacktrace_ext(fiber, ret, "");
30040|  2.09k|                    errflags |= JANET_DO_ERROR_RUNTIME;
  ------------------
  |  | 1726|  2.09k|#define JANET_DO_ERROR_RUNTIME 0x01
  ------------------
30041|  2.09k|                    done = 1;
30042|  2.09k|                }
30043|   235k|            } else {
30044|  2.32k|                int32_t line = (int32_t) parser->line;
30045|  2.32k|                int32_t col = (int32_t) parser->column;
30046|  2.32k|                if ((cres.error_mapping.line > 0) &&
  ------------------
  |  Branch (30046:21): [True: 1.75k, False: 568]
  ------------------
30047|  1.75k|                        (cres.error_mapping.column > 0)) {
  ------------------
  |  Branch (30047:25): [True: 1.75k, False: 0]
  ------------------
30048|  1.75k|                    line = cres.error_mapping.line;
30049|  1.75k|                    col = cres.error_mapping.column;
30050|  1.75k|                }
30051|  2.32k|                JanetString ctx = janet_formatc("%s:%d:%d: compile error",
30052|  2.32k|                                                sourcePath, line, col);
30053|  2.32k|                JanetString errstr = janet_formatc("%s: %s",
30054|  2.32k|                                                   (const char *)ctx,
30055|  2.32k|                                                   (const char *)cres.error);
30056|  2.32k|                ret = janet_wrap_string(errstr);
  ------------------
  |  |  843|  2.32k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|  2.32k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  2.32k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  2.32k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30057|  2.32k|                if (cres.macrofiber) {
  ------------------
  |  Branch (30057:21): [True: 150, False: 2.17k]
  ------------------
30058|    150|                    janet_eprintf("%s", (const char *)ctx);
  ------------------
  |  | 2184|    150|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
30059|    150|                    janet_stacktrace_ext(cres.macrofiber, ret, "");
30060|  2.17k|                } else {
30061|  2.17k|                    janet_eprintf("%s\n", (const char *)errstr);
  ------------------
  |  | 2184|  2.17k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
30062|  2.17k|                }
30063|  2.32k|                errflags |= JANET_DO_ERROR_COMPILE;
  ------------------
  |  | 1727|  2.32k|#define JANET_DO_ERROR_COMPILE 0x02
  ------------------
30064|  2.32k|                done = 1;
30065|  2.32k|            }
30066|   238k|        }
30067|       |
30068|  12.8M|        if (done) break;
  ------------------
  |  Branch (30068:13): [True: 4.41k, False: 12.8M]
  ------------------
30069|       |
30070|       |        /* Dispatch based on parse state */
30071|  12.8M|        switch (janet_parser_status(parser)) {
  ------------------
  |  Branch (30071:17): [True: 12.8M, False: 0]
  ------------------
30072|    446|            case JANET_PARSE_DEAD:
  ------------------
  |  Branch (30072:13): [True: 446, False: 12.8M]
  ------------------
30073|    446|                done = 1;
30074|    446|                break;
30075|  2.29k|            case JANET_PARSE_ERROR: {
  ------------------
  |  Branch (30075:13): [True: 2.29k, False: 12.8M]
  ------------------
30076|  2.29k|                errflags |= JANET_DO_ERROR_PARSE;
  ------------------
  |  | 1728|  2.29k|#define JANET_DO_ERROR_PARSE 0x04
  ------------------
30077|  2.29k|                int32_t line = (int32_t) parser->line;
30078|  2.29k|                int32_t col = (int32_t) parser->column;
30079|  2.29k|                JanetString errstr = janet_formatc("%s:%d:%d: parse error: %s",
30080|  2.29k|                                                   sourcePath, line, col,
30081|  2.29k|                                                   janet_parser_error(parser));
30082|  2.29k|                ret = janet_wrap_string(errstr);
  ------------------
  |  |  843|  2.29k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|  2.29k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  2.29k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  2.29k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30083|  2.29k|                janet_eprintf("%s\n", (const char *)errstr);
  ------------------
  |  | 2184|  2.29k|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
30084|  2.29k|                done = 1;
30085|  2.29k|                break;
30086|      0|            }
30087|  50.6k|            case JANET_PARSE_ROOT:
  ------------------
  |  Branch (30087:13): [True: 50.6k, False: 12.8M]
  ------------------
30088|  12.8M|            case JANET_PARSE_PENDING:
  ------------------
  |  Branch (30088:13): [True: 12.8M, False: 53.4k]
  ------------------
30089|  12.8M|                if (index >= len) {
  ------------------
  |  Branch (30089:21): [True: 1.28k, False: 12.8M]
  ------------------
30090|  1.28k|                    janet_parser_eof(parser);
30091|  12.8M|                } else {
30092|  12.8M|                    janet_parser_consume(parser, bytes[index++]);
30093|  12.8M|                }
30094|  12.8M|                break;
30095|  12.8M|        }
30096|       |
30097|  12.8M|    }
30098|       |
30099|       |    /* Clean up and return errors */
30100|  7.16k|    janet_gcunroot(janet_wrap_abstract(parser));
  ------------------
  |  |  846|  7.16k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|  7.16k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  7.16k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  7.16k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30101|  7.16k|    if (where) janet_gcunroot(janet_wrap_string(where));
  ------------------
  |  |  843|  7.16k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|  7.16k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  7.16k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  7.16k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30101:9): [True: 7.16k, False: 0]
  ------------------
30102|  7.16k|#ifdef JANET_EV
30103|       |    /* Enter the event loop if we are not already in it */
30104|  7.16k|    if (janet_vm.stackn == 0) {
  ------------------
  |  Branch (30104:9): [True: 0, False: 7.16k]
  ------------------
30105|      0|        if (fiber) {
  ------------------
  |  Branch (30105:13): [True: 0, False: 0]
  ------------------
30106|      0|            janet_gcroot(janet_wrap_fiber(fiber));
  ------------------
  |  |  839|      0|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30107|      0|        }
30108|      0|        janet_loop();
30109|      0|        if (fiber) {
  ------------------
  |  Branch (30109:13): [True: 0, False: 0]
  ------------------
30110|      0|            janet_gcunroot(janet_wrap_fiber(fiber));
  ------------------
  |  |  839|      0|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30111|      0|            if (!errflags)
  ------------------
  |  Branch (30111:17): [True: 0, False: 0]
  ------------------
30112|      0|                ret = fiber->last_value;
30113|      0|        }
30114|      0|    }
30115|  7.16k|#endif
30116|  7.16k|    if (out) *out = ret;
  ------------------
  |  Branch (30116:9): [True: 7.16k, False: 0]
  ------------------
30117|  7.16k|    return errflags;
30118|  7.16k|}
dohead_destructure:
30518|  17.7k|SlotHeadPair *dohead_destructure(JanetCompiler *c, SlotHeadPair *into, JanetFopts opts, Janet lhs, Janet rhs) {
30519|       |
30520|       |    /* Detect if we can do an optimization to avoid some allocations */
30521|  17.7k|    int can_destructure_lhs = janet_checktype(lhs, JANET_TUPLE)
  ------------------
  |  |  801|  35.5k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 6.94k, False: 10.8k]
  |  |  |  Branch (801:6): [Folded, False: 17.7k]
  |  |  ------------------
  |  |  802|  35.5k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  35.5k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  17.7k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  17.7k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  17.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  17.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30522|  10.8k|                              || janet_checktype(lhs, JANET_ARRAY);
  ------------------
  |  |  801|  10.8k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 10, False: 10.8k]
  |  |  |  Branch (801:6): [Folded, False: 10.8k]
  |  |  ------------------
  |  |  802|  10.8k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  10.8k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  10.8k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  10.8k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  10.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  10.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30523|  17.7k|    int rhs_is_indexed = janet_checktype(rhs, JANET_ARRAY)
  ------------------
  |  |  801|  35.5k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 34, False: 17.7k]
  |  |  |  Branch (801:6): [Folded, False: 17.7k]
  |  |  ------------------
  |  |  802|  35.5k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  35.5k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  17.7k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  17.7k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  17.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  17.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30524|  17.7k|                         || (janet_checktype(rhs, JANET_TUPLE) && (janet_tuple_flag(janet_unwrap_tuple(rhs)) & JANET_TUPLE_FLAG_BRACKETCTOR));
  ------------------
  |  |  801|  35.5k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 9.33k, False: 8.41k]
  |  |  |  Branch (801:6): [Folded, False: 17.7k]
  |  |  ------------------
  |  |  802|  35.5k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  35.5k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  17.7k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  17.7k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  17.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  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));
  ------------------
  |  | 1796|  9.33k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1790|  9.33k|#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));
  ------------------
  |  | 1788|  9.33k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (30524:67): [True: 204, False: 9.13k]
  ------------------
30525|  17.7k|    uint32_t has_drop = opts.flags & JANET_FOPTS_DROP;
  ------------------
  |  | 1093|  17.7k|#define JANET_FOPTS_DROP 0x40000
  ------------------
30526|       |
30527|  17.7k|    JanetFopts subopts = janetc_fopts_default(c);
30528|  17.7k|    subopts.flags = opts.flags & ~(JANET_FOPTS_TAIL | JANET_FOPTS_DROP);
  ------------------
  |  | 1091|  17.7k|#define JANET_FOPTS_TAIL 0x10000
  ------------------
                  subopts.flags = opts.flags & ~(JANET_FOPTS_TAIL | JANET_FOPTS_DROP);
  ------------------
  |  | 1093|  17.7k|#define JANET_FOPTS_DROP 0x40000
  ------------------
30529|       |
30530|  17.7k|    if (has_drop && can_destructure_lhs && rhs_is_indexed) {
  ------------------
  |  Branch (30530:9): [True: 11.4k, False: 6.31k]
  |  Branch (30530:21): [True: 1.72k, False: 9.74k]
  |  Branch (30530:44): [True: 108, False: 1.62k]
  ------------------
30531|       |        /* Code is of the form (def [a b] [1 2]), avoid the allocation of two tuples */
30532|    108|        JanetView view_lhs = {0};
30533|    108|        JanetView view_rhs = {0};
30534|    108|        janet_indexed_view(lhs, &view_lhs.items, &view_lhs.len);
30535|    108|        janet_indexed_view(rhs, &view_rhs.items, &view_rhs.len);
30536|    108|        int found_amp = 0;
30537|    108|        int found_splice = 0;
30538|       |        /* Check for (def [x y z] [(splice [1 2 3]) 4 5 6]), bail out of optimization */
30539|    324|        for (int32_t i = 0; i < view_rhs.len; i++) {
  ------------------
  |  Branch (30539:29): [True: 216, False: 108]
  ------------------
30540|    216|            if (!janet_checktype(view_rhs.items[i], JANET_TUPLE)) {
  ------------------
  |  |  801|    216|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 216]
  |  |  ------------------
  |  |  802|    216|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|    216|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|    216|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|    216|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    216|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    216|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30540:17): [True: 108, False: 108]
  ------------------
30541|    108|                continue;
30542|    108|            }
30543|    108|            JanetTuple tup = janet_unwrap_tuple(view_rhs.items[i]);
  ------------------
  |  |  853|    108|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
30544|    108|            if (janet_tuple_length(tup) == 0) {
  ------------------
  |  | 1792|    108|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|    108|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (30544:17): [True: 0, False: 108]
  ------------------
30545|      0|                continue;
30546|      0|            }
30547|    108|            if (janet_symeq(tup[0], "splice")) {
  ------------------
  |  Branch (30547:17): [True: 0, False: 108]
  ------------------
30548|      0|                found_splice = 1;
30549|       |                /* Good error will be generated later. */
30550|      0|                break;
30551|      0|            }
30552|    108|        }
30553|       |        /* Check for (def [x & more] [1 2 3]), bail out of optimization */
30554|  6.01k|        for (int32_t i = 0; i < view_lhs.len; i++) {
  ------------------
  |  Branch (30554:29): [True: 5.90k, False: 105]
  ------------------
30555|  5.90k|            if (janet_symeq(view_lhs.items[i], "&")) {
  ------------------
  |  Branch (30555:17): [True: 3, False: 5.90k]
  ------------------
30556|      3|                found_amp = 1;
30557|       |                /* Good error will be generated later. */
30558|      3|                break;
30559|      3|            }
30560|  5.90k|        }
30561|    108|        if (!found_amp && !found_splice) {
  ------------------
  |  Branch (30561:13): [True: 105, False: 3]
  |  Branch (30561:27): [True: 105, False: 0]
  ------------------
30562|  5.94k|            for (int32_t i = 0; i < view_lhs.len; i++) {
  ------------------
  |  Branch (30562:33): [True: 5.83k, False: 105]
  ------------------
30563|  5.83k|                Janet sub_rhs = view_rhs.len <= i ? janet_wrap_nil() : view_rhs.items[i];
  ------------------
  |  |  826|  5.63k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  5.63k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  5.63k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  5.63k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30563:33): [True: 5.63k, False: 209]
  ------------------
30564|  5.83k|                into = dohead_destructure(c, into, subopts, view_lhs.items[i], sub_rhs);
30565|  5.83k|            }
30566|    105|            return into;
30567|    105|        }
30568|    108|    }
30569|       |
30570|       |    /* No optimization, do the simple way */
30571|  17.6k|    subopts.hint = opts.hint;
30572|  17.6k|    JanetSlot ret = janetc_value(subopts, rhs);
30573|  17.6k|    SlotHeadPair shp = {lhs, ret};
30574|       |    janet_v_push(into, shp);
  ------------------
  |  |  706|  17.6k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  17.6k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  17.6k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  5.73k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  5.73k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  5.73k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 11.9k, False: 5.73k]
  |  |  |  |  |  |  |  Branch (717:50): [True: 293, False: 5.44k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  12.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))
  |  |  ------------------
  |  |  |  |  715|  17.6k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  17.6k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30575|  17.6k|    return into;
30576|  17.7k|}
janetc_special:
31381|  1.01M|const JanetSpecial *janetc_special(const uint8_t *name) {
31382|  1.01M|    return janet_strbinsearch(
31383|  1.01M|               &janetc_specials,
31384|  1.01M|               sizeof(janetc_specials) / sizeof(JanetSpecial),
31385|  1.01M|               sizeof(JanetSpecial),
31386|  1.01M|               name);
31387|  1.01M|}
janet_string_begin:
31502|  1.75k|uint8_t *janet_string_begin(int32_t length) {
31503|  1.75k|    JanetStringHead *head = janet_gcalloc(JANET_MEMORY_STRING, sizeof(JanetStringHead) + (size_t) length + 1);
31504|  1.75k|    head->length = length;
31505|  1.75k|    uint8_t *data = (uint8_t *)head->data;
31506|  1.75k|    data[length] = 0;
31507|  1.75k|    return data;
31508|  1.75k|}
janet_string_end:
31511|  1.75k|const uint8_t *janet_string_end(uint8_t *str) {
31512|  1.75k|    janet_string_hash(str) = janet_string_calchash(str, janet_string_length(str));
  ------------------
  |  | 1804|  1.75k|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1802|  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));
  ------------------
  |  | 1803|  1.75k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|  1.75k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
31513|  1.75k|    return str;
31514|  1.75k|}
janet_string:
31517|  11.8M|const uint8_t *janet_string(const uint8_t *buf, int32_t len) {
31518|  11.8M|    JanetStringHead *head = janet_gcalloc(JANET_MEMORY_STRING, sizeof(JanetStringHead) + (size_t) len + 1);
31519|  11.8M|    head->length = len;
31520|  11.8M|    head->hash = janet_string_calchash(buf, len);
31521|  11.8M|    uint8_t *data = (uint8_t *)head->data;
31522|  11.8M|    safe_memcpy(data, buf, len);
31523|  11.8M|    data[len] = 0;
31524|  11.8M|    return data;
31525|  11.8M|}
janet_string_compare:
31528|   307k|int janet_string_compare(const uint8_t *lhs, const uint8_t *rhs) {
31529|   307k|    int32_t xlen = janet_string_length(lhs);
  ------------------
  |  | 1803|   307k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|   307k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
31530|   307k|    int32_t ylen = janet_string_length(rhs);
  ------------------
  |  | 1803|   307k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|   307k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
31531|   307k|    int32_t len = xlen > ylen ? ylen : xlen;
  ------------------
  |  Branch (31531:19): [True: 103k, False: 204k]
  ------------------
31532|   307k|    int res = memcmp(lhs, rhs, len);
31533|   307k|    if (res) return res > 0 ? 1 : -1;
  ------------------
  |  Branch (31533:9): [True: 213k, False: 93.1k]
  |  Branch (31533:21): [True: 83.7k, False: 130k]
  ------------------
31534|  93.1k|    if (xlen == ylen) return 0;
  ------------------
  |  Branch (31534:9): [True: 83.2k, False: 9.86k]
  ------------------
31535|  9.86k|    return xlen < ylen ? -1 : 1;
  ------------------
  |  Branch (31535:12): [True: 5.40k, False: 4.45k]
  ------------------
31536|  93.1k|}
janet_string_equalconst:
31539|   226M|int janet_string_equalconst(const uint8_t *lhs, const uint8_t *rhs, int32_t rlen, int32_t rhash) {
31540|   226M|    int32_t lhash = janet_string_hash(lhs);
  ------------------
  |  | 1804|   226M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1802|   226M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
31541|   226M|    int32_t llen = janet_string_length(lhs);
  ------------------
  |  | 1803|   226M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|   226M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
31542|   226M|    if (lhash != rhash || llen != rlen)
  ------------------
  |  Branch (31542:9): [True: 33.8M, False: 192M]
  |  Branch (31542:27): [True: 154, False: 192M]
  ------------------
31543|  33.8M|        return 0;
31544|   192M|    if (lhs == rhs)
  ------------------
  |  Branch (31544:9): [True: 22.3M, False: 170M]
  ------------------
31545|  22.3M|        return 1;
31546|   170M|    return !memcmp(lhs, rhs, rlen);
31547|   192M|}
janet_string_equal:
31550|  1.22M|int janet_string_equal(const uint8_t *lhs, const uint8_t *rhs) {
31551|  1.22M|    return janet_string_equalconst(lhs, rhs,
31552|  1.22M|                                   janet_string_length(rhs), janet_string_hash(rhs));
  ------------------
  |  | 1803|  1.22M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|  1.22M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
                                                 janet_string_length(rhs), janet_string_hash(rhs));
  ------------------
  |  | 1804|  1.22M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1802|  1.22M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
31553|  1.22M|}
janet_cstring:
31556|   498k|const uint8_t *janet_cstring(const char *str) {
31557|   498k|    return janet_string((const uint8_t *)str, (int32_t)strlen(str));
31558|   498k|}
cfun_string_slice:
31648|  12.0k|              "negative slice range.") {
31649|  12.0k|    JanetByteView view = janet_getbytes(argv, 0);
31650|  12.0k|    JanetRange range = janet_getslice(argc, argv);
31651|  12.0k|    return janet_stringv(view.bytes + range.start, range.end - range.start);
  ------------------
  |  | 1817|  12.0k|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  843|  12.0k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|  12.0k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  12.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  12.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31652|  12.0k|}
cfun_keyword_slice:
31664|      5|              "Same as string/slice, but returns a keyword.") {
31665|      5|    JanetByteView view = janet_getbytes(argv, 0);
31666|      5|    JanetRange range = janet_getslice(argc, argv);
31667|      5|    return janet_keywordv(view.bytes + range.start, range.end - range.start);
  ------------------
  |  | 1832|      5|#define janet_keywordv(str, len) janet_wrap_keyword(janet_keyword((str), (len)))
  |  |  ------------------
  |  |  |  |  845|      5|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      5|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      5|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      5|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31668|      5|}
cfun_string_repeat:
31672|  1.11k|              "Returns a string that is `n` copies of `bytes` concatenated.") {
31673|  1.11k|    janet_fixarity(argc, 2);
31674|  1.11k|    JanetByteView view = janet_getbytes(argv, 0);
31675|  1.11k|    int32_t rep = janet_getinteger(argv, 1);
31676|  1.11k|    if (rep < 0) janet_panic("expected non-negative number of repetitions");
  ------------------
  |  Branch (31676:9): [True: 2, False: 1.11k]
  ------------------
31677|  1.11k|    if (rep == 0) return janet_cstringv("");
  ------------------
  |  | 1816|      1|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  843|      1|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      1|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (31677:9): [True: 1, False: 1.11k]
  ------------------
31678|  1.11k|    int64_t mulres = (int64_t) rep * view.len;
31679|  1.11k|    if (mulres > INT32_MAX) janet_panic("result string is too long");
  ------------------
  |  Branch (31679:9): [True: 2, False: 1.11k]
  ------------------
31680|  1.11k|    uint8_t *newbuf = janet_string_begin((int32_t) mulres);
31681|  1.11k|    uint8_t *end = newbuf + mulres;
31682|   144k|    for (uint8_t *p = newbuf; p < end; p += view.len) {
  ------------------
  |  Branch (31682:31): [True: 143k, False: 1.11k]
  ------------------
31683|   143k|        safe_memcpy(p, view.bytes, view.len);
31684|   143k|    }
31685|  1.11k|    return janet_wrap_string(janet_string_end(newbuf));
  ------------------
  |  |  843|  1.11k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|  1.11k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.11k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.11k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31686|  1.11k|}
cfun_string_bytes:
31690|      8|              "Returns a tuple of integers that are the byte values of the string.") {
31691|      8|    janet_fixarity(argc, 1);
31692|      8|    JanetByteView view = janet_getbytes(argv, 0);
31693|      8|    Janet *tup = janet_tuple_begin(view.len);
31694|      8|    int32_t i;
31695|     80|    for (i = 0; i < view.len; i++) {
  ------------------
  |  Branch (31695:17): [True: 72, False: 8]
  ------------------
31696|     72|        tup[i] = janet_wrap_integer((int32_t) view.bytes[i]);
  ------------------
  |  |  958|     72|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|     72|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
31697|     72|    }
31698|      8|    return janet_wrap_tuple(janet_tuple_end(tup));
  ------------------
  |  |  838|      8|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|      8|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      8|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      8|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31699|      8|}
cfun_string_frombytes:
31704|      9|              "will be coerced to the range of 1 byte 0-255.") {
31705|      9|    int32_t i;
31706|      9|    uint8_t *buf = janet_string_begin(argc);
31707|     33|    for (i = 0; i < argc; i++) {
  ------------------
  |  Branch (31707:17): [True: 24, False: 9]
  ------------------
31708|     24|        int32_t c = janet_getinteger(argv, i);
31709|     24|        buf[i] = c & 0xFF;
31710|     24|    }
31711|      9|    return janet_wrap_string(janet_string_end(buf));
  ------------------
  |  |  843|      9|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|      9|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      9|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      9|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31712|      9|}
cfun_string_asciilower:
31718|     21|              "case check, meaning no unicode support.") {
31719|     21|    janet_fixarity(argc, 1);
31720|     21|    JanetByteView view = janet_getbytes(argv, 0);
31721|     21|    uint8_t *buf = janet_string_begin(view.len);
31722|   124k|    for (int32_t i = 0; i < view.len; i++) {
  ------------------
  |  Branch (31722:25): [True: 124k, False: 21]
  ------------------
31723|   124k|        uint8_t c = view.bytes[i];
31724|   124k|        if (c >= 65 && c <= 90) {
  ------------------
  |  Branch (31724:13): [True: 124k, False: 380]
  |  Branch (31724:24): [True: 89, False: 124k]
  ------------------
31725|     89|            buf[i] = c + 32;
31726|   124k|        } else {
31727|   124k|            buf[i] = c;
31728|   124k|        }
31729|   124k|    }
31730|     21|    return janet_wrap_string(janet_string_end(buf));
  ------------------
  |  |  843|     21|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|     21|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     21|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     21|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31731|     21|}
cfun_string_reverse:
31754|     83|              "Returns a string that is the reversed version of `str`.") {
31755|     83|    janet_fixarity(argc, 1);
31756|     83|    JanetByteView view = janet_getbytes(argv, 0);
31757|     83|    uint8_t *buf = janet_string_begin(view.len);
31758|     83|    int32_t i, j;
31759|    171|    for (i = 0, j = view.len - 1; i < view.len; i++, j--) {
  ------------------
  |  Branch (31759:35): [True: 88, False: 83]
  ------------------
31760|     88|        buf[i] = view.bytes[j];
31761|     88|    }
31762|     83|    return janet_wrap_string(janet_string_end(buf));
  ------------------
  |  |  843|     83|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|     83|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     83|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     83|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31763|     83|}
cfun_string_find:
31782|  12.7k|              "otherwise returns nil.") {
31783|  12.7k|    int32_t result;
31784|  12.7k|    struct kmp_state state;
31785|  12.7k|    findsetup(argc, argv, &state, 0);
31786|  12.7k|    result = kmp_next(&state);
31787|  12.7k|    kmp_deinit(&state);
31788|  12.7k|    return result < 0
  ------------------
  |  Branch (31788:12): [True: 12.6k, False: 83]
  ------------------
31789|  12.7k|           ? janet_wrap_nil()
  ------------------
  |  |  826|  12.6k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  12.6k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  12.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  12.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31790|  12.7k|           : janet_wrap_integer(result);
  ------------------
  |  |  958|     83|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|     83|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
31791|  12.7k|}
cfun_string_hasprefix:
31795|  10.5M|              "Tests whether `str` starts with `pfx`.") {
31796|  10.5M|    janet_fixarity(argc, 2);
31797|  10.5M|    JanetByteView prefix = janet_getbytes(argv, 0);
31798|  10.5M|    JanetByteView str = janet_getbytes(argv, 1);
31799|  10.5M|    return str.len < prefix.len
  ------------------
  |  Branch (31799:12): [True: 29.1k, False: 10.5M]
  ------------------
31800|  10.5M|           ? janet_wrap_false()
  ------------------
  |  |  828|  29.1k|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  817|  29.1k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  29.1k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  29.1k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31801|  10.5M|           : janet_wrap_boolean(memcmp(prefix.bytes, str.bytes, prefix.len) == 0);
  ------------------
  |  |  829|  10.5M|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  817|  10.5M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  10.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  10.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31802|  10.5M|}
cfun_string_hassuffix:
31806|  12.4k|              "Tests whether `str` ends with `sfx`.") {
31807|  12.4k|    janet_fixarity(argc, 2);
31808|  12.4k|    JanetByteView suffix = janet_getbytes(argv, 0);
31809|  12.4k|    JanetByteView str = janet_getbytes(argv, 1);
31810|  12.4k|    return str.len < suffix.len
  ------------------
  |  Branch (31810:12): [True: 11.8k, False: 695]
  ------------------
31811|  12.4k|           ? janet_wrap_false()
  ------------------
  |  |  828|  11.8k|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  817|  11.8k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  11.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  11.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31812|  12.4k|           : janet_wrap_boolean(memcmp(suffix.bytes,
  ------------------
  |  |  829|    695|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  817|    695|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    695|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    695|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31813|  12.4k|                                       str.bytes + str.len - suffix.len,
31814|  12.4k|                                       suffix.len) == 0);
31815|  12.4k|}
cfun_string_findall:
31822|     38|              "may contribute to multiple found patterns.") {
31823|     38|    int32_t result;
31824|     38|    struct kmp_state state;
31825|     38|    findsetup(argc, argv, &state, 0);
31826|     38|    JanetArray *array = janet_array(0);
31827|     59|    while ((result = kmp_next(&state)) >= 0) {
  ------------------
  |  Branch (31827:12): [True: 21, False: 38]
  ------------------
31828|     21|        janet_array_push(array, janet_wrap_integer(result));
  ------------------
  |  |  958|     21|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|     21|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
31829|     21|    }
31830|     38|    kmp_deinit(&state);
31831|     38|    return janet_wrap_array(array);
  ------------------
  |  |  840|     38|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  820|     38|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     38|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     38|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31832|     38|}
cfun_string_replace:
31859|     56|              "Will return the new string if `patt` is found, otherwise returns `str`.") {
31860|     56|    int32_t result;
31861|     56|    struct replace_state s;
31862|     56|    uint8_t *buf;
31863|     56|    replacesetup(argc, argv, &s);
31864|     56|    result = kmp_next(&s.kmp);
31865|     56|    if (result < 0) {
  ------------------
  |  Branch (31865:9): [True: 21, False: 35]
  ------------------
31866|     21|        kmp_deinit(&s.kmp);
31867|     21|        return janet_stringv(s.kmp.text, s.kmp.textlen);
  ------------------
  |  | 1817|     21|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  843|     21|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|     21|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|     21|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|     21|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31868|     21|    }
31869|     35|    JanetByteView subst = janet_text_substitution(&s.subst, s.kmp.text + result, s.kmp.patlen, NULL);
31870|     35|    buf = janet_string_begin(s.kmp.textlen - s.kmp.patlen + subst.len);
31871|     35|    safe_memcpy(buf, s.kmp.text, result);
31872|     35|    safe_memcpy(buf + result, subst.bytes, subst.len);
31873|     35|    safe_memcpy(buf + result + subst.len,
31874|     35|                s.kmp.text + result + s.kmp.patlen,
31875|     35|                s.kmp.textlen - result - s.kmp.patlen);
31876|     35|    kmp_deinit(&s.kmp);
31877|     35|    return janet_wrap_string(janet_string_end(buf));
  ------------------
  |  |  843|     35|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|     35|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     35|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     35|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31878|     56|}
cfun_string_replaceall:
31886|  5.62k|              "Will return the new string if `patt` is found, otherwise returns `str`.") {
31887|  5.62k|    int32_t result;
31888|  5.62k|    struct replace_state s;
31889|  5.62k|    JanetBuffer b;
31890|  5.62k|    int32_t lastindex = 0;
31891|  5.62k|    replacesetup(argc, argv, &s);
31892|  5.62k|    janet_buffer_init(&b, s.kmp.textlen);
31893|  5.62k|    while ((result = kmp_next(&s.kmp)) >= 0) {
  ------------------
  |  Branch (31893:12): [True: 0, False: 5.62k]
  ------------------
31894|      0|        JanetByteView subst = janet_text_substitution(&s.subst, s.kmp.text + result, s.kmp.patlen, NULL);
31895|      0|        janet_buffer_push_bytes(&b, s.kmp.text + lastindex, result - lastindex);
31896|      0|        janet_buffer_push_bytes(&b, subst.bytes, subst.len);
31897|      0|        lastindex = result + s.kmp.patlen;
31898|      0|        kmp_seti(&s.kmp, lastindex);
31899|      0|    }
31900|  5.62k|    janet_buffer_push_bytes(&b, s.kmp.text + lastindex, s.kmp.textlen - lastindex);
31901|  5.62k|    const uint8_t *ret = janet_string(b.data, b.count);
31902|  5.62k|    janet_buffer_deinit(&b);
31903|  5.62k|    kmp_deinit(&s.kmp);
31904|  5.62k|    return janet_wrap_string(ret);
  ------------------
  |  |  843|  5.62k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|  5.62k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  5.62k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  5.62k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31905|  5.62k|}
cfun_string_split:
31913|    100|              "of `limit` results (if provided).") {
31914|    100|    int32_t result;
31915|    100|    JanetArray *array;
31916|    100|    struct kmp_state state;
31917|    100|    int32_t limit = -1, lastindex = 0;
31918|    100|    if (argc == 4) {
  ------------------
  |  Branch (31918:9): [True: 4, False: 96]
  ------------------
31919|      4|        limit = janet_getinteger(argv, 3);
31920|      4|    }
31921|    100|    findsetup(argc, argv, &state, 1);
31922|    100|    array = janet_array(0);
31923|    327|    while ((result = kmp_next(&state)) >= 0 && --limit) {
  ------------------
  |  Branch (31923:12): [True: 227, False: 100]
  |  Branch (31923:48): [True: 227, False: 0]
  ------------------
31924|    227|        const uint8_t *slice = janet_string(state.text + lastindex, result - lastindex);
31925|    227|        janet_array_push(array, janet_wrap_string(slice));
  ------------------
  |  |  843|    227|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|    227|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    227|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    227|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31926|    227|        lastindex = result + state.patlen;
31927|    227|        kmp_seti(&state, lastindex);
31928|    227|    }
31929|    100|    const uint8_t *slice = janet_string(state.text + lastindex, state.textlen - lastindex);
31930|    100|    janet_array_push(array, janet_wrap_string(slice));
  ------------------
  |  |  843|    100|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|    100|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    100|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    100|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31931|    100|    kmp_deinit(&state);
31932|    100|    return janet_wrap_array(array);
  ------------------
  |  |  840|    100|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  820|    100|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    100|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    100|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31933|    100|}
cfun_string_checkset:
31939|     22|              "not appear in `set`.") {
31940|     22|    uint32_t bitset[8] = {0, 0, 0, 0, 0, 0, 0, 0};
31941|     22|    janet_fixarity(argc, 2);
31942|     22|    JanetByteView set = janet_getbytes(argv, 0);
31943|     22|    JanetByteView str = janet_getbytes(argv, 1);
31944|       |    /* Populate set */
31945|    145|    for (int32_t i = 0; i < set.len; i++) {
  ------------------
  |  Branch (31945:25): [True: 123, False: 22]
  ------------------
31946|    123|        int index = set.bytes[i] >> 5;
31947|    123|        uint32_t mask = 1 << (set.bytes[i] & 0x1F);
31948|    123|        bitset[index] |= mask;
31949|    123|    }
31950|       |    /* Check set */
31951|    107|    for (int32_t i = 0; i < str.len; i++) {
  ------------------
  |  Branch (31951:25): [True: 95, False: 12]
  ------------------
31952|     95|        int index = str.bytes[i] >> 5;
31953|     95|        uint32_t mask = 1 << (str.bytes[i] & 0x1F);
31954|     95|        if (!(bitset[index] & mask)) {
  ------------------
  |  Branch (31954:13): [True: 10, False: 85]
  ------------------
31955|     10|            return janet_wrap_false();
  ------------------
  |  |  828|     10|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  817|     10|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     10|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     10|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31956|     10|        }
31957|     95|    }
31958|     12|    return janet_wrap_true();
  ------------------
  |  |  827|     12|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  817|     12|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     12|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     12|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31959|     22|}
cfun_string_join:
31964|    523|              "a separator string `sep`.") {
31965|    523|    janet_arity(argc, 1, 2);
31966|    523|    JanetView parts = janet_getindexed(argv, 0);
31967|    523|    JanetByteView joiner;
31968|    523|    if (argc == 2) {
  ------------------
  |  Branch (31968:9): [True: 50, False: 473]
  ------------------
31969|     50|        joiner = janet_getbytes(argv, 1);
31970|    473|    } else {
31971|    473|        joiner.bytes = NULL;
31972|    473|        joiner.len = 0;
31973|    473|    }
31974|       |    /* Check args */
31975|    523|    int32_t i;
31976|    523|    int64_t finallen = 0;
31977|  6.43k|    for (i = 0; i < parts.len; i++) {
  ------------------
  |  Branch (31977:17): [True: 5.91k, False: 522]
  ------------------
31978|  5.91k|        const uint8_t *chunk;
31979|  5.91k|        int32_t chunklen = 0;
31980|  5.91k|        if (!janet_bytes_view(parts.items[i], &chunk, &chunklen)) {
  ------------------
  |  Branch (31980:13): [True: 1, False: 5.91k]
  ------------------
31981|      1|            janet_panicf("item %d of parts is not a byte sequence, got %v", i, parts.items[i]);
31982|      1|        }
31983|  5.91k|        if (i) finallen += joiner.len;
  ------------------
  |  Branch (31983:13): [True: 5.42k, False: 488]
  ------------------
31984|  5.91k|        finallen += chunklen;
31985|  5.91k|        if (finallen > INT32_MAX)
  ------------------
  |  Branch (31985:13): [True: 0, False: 5.91k]
  ------------------
31986|      0|            janet_panic("result string too long");
31987|  5.91k|    }
31988|    522|    uint8_t *buf, *out;
31989|    522|    out = buf = janet_string_begin((int32_t) finallen);
31990|  6.42k|    for (i = 0; i < parts.len; i++) {
  ------------------
  |  Branch (31990:17): [True: 5.90k, False: 522]
  ------------------
31991|  5.90k|        const uint8_t *chunk = NULL;
31992|  5.90k|        int32_t chunklen = 0;
31993|  5.90k|        if (i) {
  ------------------
  |  Branch (31993:13): [True: 5.41k, False: 487]
  ------------------
31994|  5.41k|            safe_memcpy(out, joiner.bytes, joiner.len);
31995|  5.41k|            out += joiner.len;
31996|  5.41k|        }
31997|  5.90k|        janet_bytes_view(parts.items[i], &chunk, &chunklen);
31998|  5.90k|        safe_memcpy(out, chunk, chunklen);
31999|  5.90k|        out += chunklen;
32000|  5.90k|    }
32001|    522|    return janet_wrap_string(janet_string_end(buf));
  ------------------
  |  |  843|    522|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|    522|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    522|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    522|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32002|    523|}
cfun_string_trim:
32075|     56|              "`set` is provided, consider only characters in `set` to be whitespace.") {
32076|     56|    JanetByteView str, set;
32077|     56|    trim_help_args(argc, argv, &str, &set);
32078|     56|    int32_t left_edge = trim_help_leftedge(str, set);
32079|     56|    int32_t right_edge = trim_help_rightedge(str, set);
32080|     56|    if (right_edge < left_edge)
  ------------------
  |  Branch (32080:9): [True: 1, False: 55]
  ------------------
32081|      1|        return janet_stringv(NULL, 0);
  ------------------
  |  | 1817|      1|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  843|      1|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      1|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32082|     55|    return janet_stringv(str.bytes + left_edge, right_edge - left_edge);
  ------------------
  |  | 1817|     55|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  843|     55|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|     55|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|     55|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|     55|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32083|     56|}
cfun_string_triml:
32088|     35|              "`set` is provided, consider only characters in `set` to be whitespace.") {
32089|     35|    JanetByteView str, set;
32090|     35|    trim_help_args(argc, argv, &str, &set);
32091|     35|    int32_t left_edge = trim_help_leftedge(str, set);
32092|     35|    return janet_stringv(str.bytes + left_edge, str.len - left_edge);
  ------------------
  |  | 1817|     35|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  843|     35|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|     35|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|     35|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|     35|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32093|     35|}
cfun_string_trimr:
32098|     53|              "`set` is provided, consider only characters in `set` to be whitespace.") {
32099|     53|    JanetByteView str, set;
32100|     53|    trim_help_args(argc, argv, &str, &set);
32101|     53|    int32_t right_edge = trim_help_rightedge(str, set);
32102|     53|    return janet_stringv(str.bytes, right_edge);
  ------------------
  |  | 1817|     53|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  843|     53|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|     53|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|     53|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|     53|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32103|     53|}
janet_lib_string:
32106|  7.16k|void janet_lib_string(JanetTable *env) {
32107|  7.16k|    JanetRegExt string_cfuns[] = {
32108|  7.16k|        JANET_CORE_REG("string/slice", cfun_string_slice),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32109|  7.16k|        JANET_CORE_REG("keyword/slice", cfun_keyword_slice),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32110|  7.16k|        JANET_CORE_REG("symbol/slice", cfun_symbol_slice),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32111|  7.16k|        JANET_CORE_REG("string/repeat", cfun_string_repeat),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32112|  7.16k|        JANET_CORE_REG("string/bytes", cfun_string_bytes),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32113|  7.16k|        JANET_CORE_REG("string/from-bytes", cfun_string_frombytes),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32114|  7.16k|        JANET_CORE_REG("string/ascii-lower", cfun_string_asciilower),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32115|  7.16k|        JANET_CORE_REG("string/ascii-upper", cfun_string_asciiupper),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32116|  7.16k|        JANET_CORE_REG("string/reverse", cfun_string_reverse),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32117|  7.16k|        JANET_CORE_REG("string/find", cfun_string_find),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32118|  7.16k|        JANET_CORE_REG("string/find-all", cfun_string_findall),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32119|  7.16k|        JANET_CORE_REG("string/has-prefix?", cfun_string_hasprefix),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32120|  7.16k|        JANET_CORE_REG("string/has-suffix?", cfun_string_hassuffix),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32121|  7.16k|        JANET_CORE_REG("string/replace", cfun_string_replace),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32122|  7.16k|        JANET_CORE_REG("string/replace-all", cfun_string_replaceall),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32123|  7.16k|        JANET_CORE_REG("string/split", cfun_string_split),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32124|  7.16k|        JANET_CORE_REG("string/check-set", cfun_string_checkset),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32125|  7.16k|        JANET_CORE_REG("string/join", cfun_string_join),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32126|  7.16k|        JANET_CORE_REG("string/format", cfun_string_format),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32127|  7.16k|        JANET_CORE_REG("string/trim", cfun_string_trim),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32128|  7.16k|        JANET_CORE_REG("string/triml", cfun_string_triml),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32129|  7.16k|        JANET_CORE_REG("string/trimr", cfun_string_trimr),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
32130|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
32131|  7.16k|    };
32132|       |    janet_core_cfuns_ext(env, NULL, string_cfuns);
32133|  7.16k|}
janet_scan_number_base:
32394|   526k|    double *out) {
32395|   526k|    const uint8_t *end = str + len;
32396|   526k|    int seenadigit = 0;
32397|   526k|    int ex = 0;
32398|   526k|    int seenpoint = 0;
32399|   526k|    int foundexp = 0;
32400|   526k|    int neg = 0;
32401|   526k|    struct BigNat mant;
32402|   526k|    bignat_zero(&mant);
32403|       |
32404|       |    /* Prevent some kinds of overflow bugs relating to the exponent
32405|       |     * overflowing.  For example, if a string was passed 2GB worth of 0s after
32406|       |     * the decimal point, exponent could wrap around and become positive. It's
32407|       |     * easier to reject ridiculously large inputs than to check for overflows.
32408|       |     * */
32409|   526k|    if (len > JANET_NUMBER_LENGTH_RIDICULOUS) goto error;
  ------------------
  |  |32190|   526k|#define JANET_NUMBER_LENGTH_RIDICULOUS 0xFFFF
  ------------------
  |  Branch (32409:9): [True: 4, False: 526k]
  ------------------
32410|       |
32411|       |    /* Get sign */
32412|   526k|    if (str >= end) goto error;
  ------------------
  |  Branch (32412:9): [True: 1, False: 526k]
  ------------------
32413|   526k|    if (*str == '-') {
  ------------------
  |  Branch (32413:9): [True: 368k, False: 158k]
  ------------------
32414|   368k|        neg = 1;
32415|   368k|        str++;
32416|   368k|    } else if (*str == '+') {
  ------------------
  |  Branch (32416:16): [True: 98.9k, False: 59.2k]
  ------------------
32417|  98.9k|        str++;
32418|  98.9k|    }
32419|       |
32420|       |    /* Check for leading 0x or digit digit r */
32421|   526k|    if (base == 0) {
  ------------------
  |  Branch (32421:9): [True: 526k, False: 2]
  ------------------
32422|   526k|        if (str + 1 < end && str[0] == '0' && str[1] == 'x') {
  ------------------
  |  Branch (32422:13): [True: 39.5k, False: 487k]
  |  Branch (32422:30): [True: 10.2k, False: 29.3k]
  |  Branch (32422:47): [True: 87, False: 10.1k]
  ------------------
32423|     87|            base = 16;
32424|     87|            str += 2;
32425|   526k|        } else if (str + 1 < end  &&
  ------------------
  |  Branch (32425:20): [True: 39.4k, False: 487k]
  ------------------
32426|  39.4k|                   str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (32426:20): [True: 36.1k, False: 3.28k]
  |  Branch (32426:37): [True: 31.0k, False: 5.12k]
  ------------------
32427|  31.0k|                   str[1] == 'r') {
  ------------------
  |  Branch (32427:20): [True: 62, False: 30.9k]
  ------------------
32428|     62|            base = str[0] - '0';
32429|     62|            str += 2;
32430|   526k|        } else if (str + 2 < end  &&
  ------------------
  |  Branch (32430:20): [True: 28.2k, False: 498k]
  ------------------
32431|  28.2k|                   str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (32431:20): [True: 26.3k, False: 1.94k]
  |  Branch (32431:37): [True: 23.9k, False: 2.44k]
  ------------------
32432|  23.9k|                   str[1] >= '0' && str[1] <= '9' &&
  ------------------
  |  Branch (32432:20): [True: 22.9k, False: 921]
  |  Branch (32432:37): [True: 18.7k, False: 4.28k]
  ------------------
32433|  18.7k|                   str[2] == 'r') {
  ------------------
  |  Branch (32433:20): [True: 546, False: 18.1k]
  ------------------
32434|    546|            base = 10 * (str[0] - '0') + (str[1] - '0');
32435|    546|            if (base < 2 || base > 36) goto error;
  ------------------
  |  Branch (32435:17): [True: 0, False: 546]
  |  Branch (32435:29): [True: 472, False: 74]
  ------------------
32436|     74|            str += 3;
32437|     74|        }
32438|   526k|    }
32439|       |
32440|       |    /* If still base is 0, set to default (10) */
32441|   526k|    if (base == 0) {
  ------------------
  |  Branch (32441:9): [True: 525k, False: 224]
  ------------------
32442|   525k|        base = 10;
32443|   525k|    }
32444|   526k|    int exp_base = base;
32445|       |
32446|       |    /* Skip leading zeros */
32447|   553k|    while (str < end && (*str == '0' || *str == '.')) {
  ------------------
  |  Branch (32447:12): [True: 302k, False: 250k]
  |  Branch (32447:26): [True: 21.1k, False: 281k]
  |  Branch (32447:41): [True: 6.91k, False: 274k]
  ------------------
32448|  28.1k|        if (seenpoint) ex--;
  ------------------
  |  Branch (32448:13): [True: 1.27k, False: 26.8k]
  ------------------
32449|  28.1k|        if (*str == '.') {
  ------------------
  |  Branch (32449:13): [True: 6.91k, False: 21.1k]
  ------------------
32450|  6.91k|            if (seenpoint) goto error;
  ------------------
  |  Branch (32450:17): [True: 741, False: 6.17k]
  ------------------
32451|  6.17k|            seenpoint = 1;
32452|  21.1k|        } else {
32453|  21.1k|            seenadigit = 1;
32454|  21.1k|        }
32455|  27.3k|        str++;
32456|  27.3k|    }
32457|       |
32458|       |    /* Parse significant digits */
32459|   757k|    while (str < end) {
  ------------------
  |  Branch (32459:12): [True: 469k, False: 288k]
  ------------------
32460|   469k|        if (*str == '.') {
  ------------------
  |  Branch (32460:13): [True: 1.82k, False: 467k]
  ------------------
32461|  1.82k|            if (seenpoint) goto error;
  ------------------
  |  Branch (32461:17): [True: 31, False: 1.79k]
  ------------------
32462|  1.79k|            seenpoint = 1;
32463|   467k|        } else if (*str == '&') {
  ------------------
  |  Branch (32463:20): [True: 2.54k, False: 464k]
  ------------------
32464|  2.54k|            foundexp = 1;
32465|  2.54k|            break;
32466|   464k|        } else if (base == 16 && (*str == 'P' || *str == 'p')) { /* IEEE hex float */
  ------------------
  |  Branch (32466:20): [True: 274, False: 464k]
  |  Branch (32466:35): [True: 11, False: 263]
  |  Branch (32466:50): [True: 5, False: 258]
  ------------------
32467|     16|            foundexp = 1;
32468|     16|            exp_base = 10;
32469|     16|            base = 2;
32470|     16|            ex *= 4; /* We need to correct the current exponent after we change the base */
32471|     16|            break;
32472|   464k|        } else if (base == 10 && (*str == 'E' || *str == 'e')) {
  ------------------
  |  Branch (32472:20): [True: 464k, False: 627]
  |  Branch (32472:35): [True: 420, False: 463k]
  |  Branch (32472:50): [True: 5.97k, False: 457k]
  ------------------
32473|  6.39k|            foundexp = 1;
32474|  6.39k|            break;
32475|   458k|        } else if (*str == '_') {
  ------------------
  |  Branch (32475:20): [True: 6.47k, False: 451k]
  ------------------
32476|  6.47k|            if (!seenadigit) goto error;
  ------------------
  |  Branch (32476:17): [True: 1.35k, False: 5.12k]
  ------------------
32477|   451k|        } else {
32478|   451k|            int digit = digit_lookup[*str & 0x7F];
32479|   451k|            if (*str > 127 || digit >= base) goto error;
  ------------------
  |  Branch (32479:17): [True: 127, False: 451k]
  |  Branch (32479:31): [True: 226k, False: 224k]
  ------------------
32480|   224k|            if (seenpoint) ex--;
  ------------------
  |  Branch (32480:17): [True: 23.9k, False: 200k]
  ------------------
32481|   224k|            bignat_muladd(&mant, base, digit);
32482|   224k|            seenadigit = 1;
32483|   224k|        }
32484|   231k|        str++;
32485|   231k|    }
32486|       |
32487|   296k|    if (!seenadigit)
  ------------------
  |  Branch (32487:9): [True: 241k, False: 55.2k]
  ------------------
32488|   241k|        goto error;
32489|       |
32490|       |    /* Read exponent */
32491|  55.2k|    if (str < end && foundexp) {
  ------------------
  |  Branch (32491:9): [True: 8.88k, False: 46.3k]
  |  Branch (32491:22): [True: 8.88k, False: 0]
  ------------------
32492|  8.88k|        int eneg = 0;
32493|  8.88k|        int32_t ee = 0;
32494|  8.88k|        seenadigit = 0;
32495|  8.88k|        str++;
32496|  8.88k|        if (str >= end) goto error;
  ------------------
  |  Branch (32496:13): [True: 338, False: 8.54k]
  ------------------
32497|  8.54k|        if (*str == '-') {
  ------------------
  |  Branch (32497:13): [True: 2.08k, False: 6.46k]
  ------------------
32498|  2.08k|            eneg = 1;
32499|  2.08k|            str++;
32500|  6.46k|        } else if (*str == '+') {
  ------------------
  |  Branch (32500:20): [True: 7, False: 6.45k]
  ------------------
32501|      7|            str++;
32502|      7|        }
32503|       |        /* Skip leading 0s in exponent */
32504|  19.6k|        while (str < end && *str == '0') {
  ------------------
  |  Branch (32504:16): [True: 16.3k, False: 3.23k]
  |  Branch (32504:29): [True: 11.0k, False: 5.31k]
  ------------------
32505|  11.0k|            str++;
32506|  11.0k|            seenadigit = 1;
32507|  11.0k|        }
32508|  22.9k|        while (str < end) {
  ------------------
  |  Branch (32508:16): [True: 15.0k, False: 7.91k]
  ------------------
32509|  15.0k|            int digit = digit_lookup[*str & 0x7F];
32510|  15.0k|            if (*str > 127 || digit >= exp_base) goto error;
  ------------------
  |  Branch (32510:17): [True: 118, False: 14.9k]
  |  Branch (32510:31): [True: 514, False: 14.4k]
  ------------------
32511|  14.4k|            if (ee < (INT32_MAX / 40)) {
  ------------------
  |  Branch (32511:17): [True: 13.4k, False: 960]
  ------------------
32512|  13.4k|                ee = exp_base * ee + digit;
32513|  13.4k|            }
32514|  14.4k|            str++;
32515|  14.4k|            seenadigit = 1;
32516|  14.4k|        }
32517|  7.91k|        if (eneg) ex -= ee;
  ------------------
  |  Branch (32517:13): [True: 1.91k, False: 5.99k]
  ------------------
32518|  5.99k|        else ex += ee;
32519|  7.91k|    }
32520|       |
32521|  54.2k|    if (!seenadigit)
  ------------------
  |  Branch (32521:9): [True: 121, False: 54.1k]
  ------------------
32522|    121|        goto error;
32523|       |
32524|  54.1k|    *out = convert(neg, &mant, base, ex);
32525|  54.1k|    janet_free(mant.digits);
  ------------------
  |  | 2402|  54.1k|#define janet_free(X) free((X))
  ------------------
32526|  54.1k|    return 0;
32527|       |
32528|   472k|error:
32529|   472k|    janet_free(mant.digits);
  ------------------
  |  | 2402|   472k|#define janet_free(X) free((X))
  ------------------
32530|   472k|    return 1;
32531|  54.2k|}
janet_scan_int64:
32604|  4.17k|int janet_scan_int64(const uint8_t *str, int32_t len, int64_t *out) {
32605|  4.17k|    int neg;
32606|  4.17k|    uint64_t bi;
32607|  4.17k|    if (scan_uint64(str, len, &bi, &neg)) {
  ------------------
  |  Branch (32607:9): [True: 2.48k, False: 1.68k]
  ------------------
32608|  2.48k|        if (neg && bi <= ((UINT64_MAX / 2) + 1)) {
  ------------------
  |  Branch (32608:13): [True: 78, False: 2.41k]
  |  Branch (32608:20): [True: 78, False: 0]
  ------------------
32609|     78|            if (bi > INT64_MAX) {
  ------------------
  |  Branch (32609:17): [True: 0, False: 78]
  ------------------
32610|      0|                *out = INT64_MIN;
32611|     78|            } else {
32612|     78|                *out = -((int64_t) bi);
32613|     78|            }
32614|     78|            return 1;
32615|     78|        }
32616|  2.41k|        if (!neg && bi <= INT64_MAX) {
  ------------------
  |  Branch (32616:13): [True: 2.41k, False: 0]
  |  Branch (32616:21): [True: 2.40k, False: 4]
  ------------------
32617|  2.40k|            *out = (int64_t) bi;
32618|  2.40k|            return 1;
32619|  2.40k|        }
32620|  2.41k|    }
32621|  1.68k|    return 0;
32622|  4.17k|}
janet_scan_uint64:
32624|  2.56k|int janet_scan_uint64(const uint8_t *str, int32_t len, uint64_t *out) {
32625|  2.56k|    int neg;
32626|  2.56k|    uint64_t bi;
32627|  2.56k|    if (scan_uint64(str, len, &bi, &neg)) {
  ------------------
  |  Branch (32627:9): [True: 2.44k, False: 121]
  ------------------
32628|  2.44k|        if (!neg) {
  ------------------
  |  Branch (32628:13): [True: 2.43k, False: 5]
  ------------------
32629|  2.43k|            *out = bi;
32630|  2.43k|            return 1;
32631|  2.43k|        }
32632|  2.44k|    }
32633|    126|    return 0;
32634|  2.56k|}
janet_scan_numeric:
32641|   522k|    Janet *out) {
32642|   522k|    int result;
32643|   522k|    double num;
32644|   522k|    int64_t i64 = 0;
32645|   522k|    uint64_t u64 = 0;
32646|   522k|    if (len < 2 || str[len - 2] != ':') {
  ------------------
  |  Branch (32646:9): [True: 265k, False: 256k]
  |  Branch (32646:20): [True: 247k, False: 8.45k]
  ------------------
32647|   513k|        result = janet_scan_number_base(str, len, 0, &num);
32648|   513k|        *out = janet_wrap_number(num);
  ------------------
  |  |  830|   513k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
32649|   513k|        return result;
32650|   513k|    }
32651|  8.45k|    switch (str[len - 1]) {
32652|    648|        default:
  ------------------
  |  Branch (32652:9): [True: 648, False: 7.80k]
  ------------------
32653|    648|            return 1;
32654|  1.10k|        case 'n':
  ------------------
  |  Branch (32654:9): [True: 1.10k, False: 7.35k]
  ------------------
32655|  1.10k|            result = janet_scan_number_base(str, len - 2, 0, &num);
32656|  1.10k|            *out = janet_wrap_number(num);
  ------------------
  |  |  830|  1.10k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
32657|  1.10k|            return result;
32658|       |        /* Condition is inverted janet_scan_int64 and janet_scan_uint64 */
32659|  4.15k|        case 's':
  ------------------
  |  Branch (32659:9): [True: 4.15k, False: 4.29k]
  ------------------
32660|  4.15k|            result = !janet_scan_int64(str, len - 2, &i64);
32661|  4.15k|            *out = janet_wrap_s64(i64);
32662|  4.15k|            return result;
32663|  2.54k|        case 'u':
  ------------------
  |  Branch (32663:9): [True: 2.54k, False: 5.90k]
  ------------------
32664|  2.54k|            result = !janet_scan_uint64(str, len - 2, &u64);
32665|  2.54k|            *out = janet_wrap_u64(u64);
32666|  2.54k|            return result;
32667|  8.45k|    }
32668|  8.45k|}
janet_buffer_dtostr:
32672|    895|void janet_buffer_dtostr(JanetBuffer *buffer, double x) {
32673|    895|#define BUFSIZE 32
32674|    895|    janet_buffer_extra(buffer, BUFSIZE);
  ------------------
  |  |32673|    895|#define BUFSIZE 32
  ------------------
32675|    895|    int count = snprintf((char *) buffer->data + buffer->count, BUFSIZE, "%.17g", x);
  ------------------
  |  |32673|    895|#define BUFSIZE 32
  ------------------
32676|    895|#undef BUFSIZE
32677|       |    /* fix locale issues with commas */
32678|  4.18k|    for (int i = 0; i < count; i++) {
  ------------------
  |  Branch (32678:21): [True: 3.28k, False: 895]
  ------------------
32679|  3.28k|        char c = buffer->data[buffer->count + i];
32680|  3.28k|        if (c == ',') {
  ------------------
  |  Branch (32680:13): [True: 0, False: 3.28k]
  ------------------
32681|      0|            buffer->data[buffer->count + i] = '.';
32682|      0|        }
32683|  3.28k|    }
32684|    895|    buffer->count += count;
32685|    895|}
janet_struct_begin:
32722|  10.6M|JanetKV *janet_struct_begin(int32_t count) {
32723|       |    /* Calculate capacity as power of 2 after 2 * count. */
32724|  10.6M|    int32_t capacity = janet_tablen(2 * count);
32725|  10.6M|    if (capacity < 0) capacity = janet_tablen(count + 1);
  ------------------
  |  Branch (32725:9): [True: 0, False: 10.6M]
  ------------------
32726|       |
32727|  10.6M|    size_t size = sizeof(JanetStructHead) + (size_t) capacity * sizeof(JanetKV);
32728|  10.6M|    JanetStructHead *head = janet_gcalloc(JANET_MEMORY_STRUCT, size);
32729|  10.6M|    head->length = count;
32730|  10.6M|    head->capacity = capacity;
32731|  10.6M|    head->hash = 0;
32732|  10.6M|    head->proto = NULL;
32733|       |
32734|  10.6M|    JanetKV *st = (JanetKV *)(head->data);
32735|  10.6M|    janet_memempty(st, capacity);
32736|  10.6M|    return st;
32737|  10.6M|}
janet_struct_find:
32741|  22.0M|const JanetKV *janet_struct_find(const JanetKV *st, Janet key) {
32742|  22.0M|    int32_t cap = janet_struct_capacity(st);
  ------------------
  |  | 1839|  22.0M|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1836|  22.0M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
32743|  22.0M|    int32_t index = janet_maphash(cap, janet_hash(key));
  ------------------
  |  |  393|  22.0M|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
32744|  22.0M|    int32_t i;
32745|  22.8M|    for (i = index; i < cap; i++)
  ------------------
  |  Branch (32745:21): [True: 22.8M, False: 9.90k]
  ------------------
32746|  22.8M|        if (janet_checktype(st[i].key, JANET_NIL) || janet_equals(st[i].key, key))
  ------------------
  |  |  801|  45.6M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 16.3M, False: 6.46M]
  |  |  |  Branch (801:6): [Folded, False: 22.8M]
  |  |  ------------------
  |  |  802|  45.6M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  45.6M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  22.8M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  22.8M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  22.8M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  22.8M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (32746:54): [True: 5.70M, False: 761k]
  ------------------
32747|  22.0M|            return st + i;
32748|  14.0k|    for (i = 0; i < index; i++)
  ------------------
  |  Branch (32748:17): [True: 14.0k, False: 0]
  ------------------
32749|  14.0k|        if (janet_checktype(st[i].key, JANET_NIL) || janet_equals(st[i].key, key))
  ------------------
  |  |  801|  28.0k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 1.03k, False: 12.9k]
  |  |  |  Branch (801:6): [Folded, False: 14.0k]
  |  |  ------------------
  |  |  802|  28.0k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  28.0k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  14.0k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  14.0k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  14.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  14.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (32749:54): [True: 8.87k, False: 4.10k]
  ------------------
32750|  9.90k|            return st + i;
32751|      0|    return NULL;
32752|  9.90k|}
janet_struct_put_ext:
32762|   114M|void janet_struct_put_ext(JanetKV *st, Janet key, Janet value, int replace) {
32763|   114M|    int32_t cap = janet_struct_capacity(st);
  ------------------
  |  | 1839|   114M|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1836|   114M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
32764|   114M|    int32_t hash = janet_hash(key);
32765|   114M|    int32_t index = janet_maphash(cap, hash);
  ------------------
  |  |  393|   114M|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
32766|   114M|    int32_t i, j, dist;
32767|   114M|    int32_t bounds[4] = {index, cap, 0, index};
32768|   114M|    if (janet_checktype(key, JANET_NIL) || janet_checktype(value, JANET_NIL)) return;
  ------------------
  |  |  801|   229M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 1.23k, False: 114M]
  |  |  |  Branch (801:6): [Folded, False: 114M]
  |  |  ------------------
  |  |  802|   229M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   229M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   114M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   114M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   114M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   114M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (janet_checktype(key, JANET_NIL) || janet_checktype(value, JANET_NIL)) return;
  ------------------
  |  |  801|   114M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 204k, False: 114M]
  |  |  |  Branch (801:6): [Folded, False: 114M]
  |  |  ------------------
  |  |  802|   114M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   114M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   114M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   114M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   114M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   114M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32769|   114M|    if (janet_checktype(key, JANET_NUMBER) && isnan(janet_unwrap_number(key))) return;
  ------------------
  |  |  801|   229M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 9.79k, False: 114M]
  |  |  |  Branch (801:6): [True: 114M, Folded]
  |  |  ------------------
  |  |  802|   229M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|   114M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 9.80k, False: 114M]
  |  |  |  |  |  Branch (798:28): [True: 18.4E, False: 114M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  18.4E|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  18.4E|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  18.4E|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  18.4E|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  18.4E|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (32769:47): [True: 0, False: 9.79k]
  ------------------
32770|       |    /* Avoid extra items */
32771|   114M|    if (janet_struct_hash(st) == janet_struct_length(st)) return;
  ------------------
  |  | 1840|   114M|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1836|   114M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                  if (janet_struct_hash(st) == janet_struct_length(st)) return;
  ------------------
  |  | 1838|   114M|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1836|   114M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (32771:9): [True: 0, False: 114M]
  ------------------
32772|   114M|    for (dist = 0, j = 0; j < 4; j += 2)
  ------------------
  |  Branch (32772:27): [True: 114M, False: 18.4E]
  ------------------
32773|   125M|        for (i = bounds[j]; i < bounds[j + 1]; i++, dist++) {
  ------------------
  |  Branch (32773:29): [True: 125M, False: 4.96k]
  ------------------
32774|   125M|            int status;
32775|   125M|            int32_t otherhash;
32776|   125M|            int32_t otherindex, otherdist;
32777|   125M|            JanetKV *kv = st + i;
32778|       |            /* We found an empty slot, so just add key and value */
32779|   125M|            if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  801|   125M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 114M, False: 10.6M]
  |  |  |  Branch (801:6): [Folded, False: 125M]
  |  |  ------------------
  |  |  802|   125M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   125M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   125M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   125M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   125M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   125M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32780|   114M|                kv->key = key;
32781|   114M|                kv->value = value;
32782|       |                /* Update the temporary count */
32783|   114M|                janet_struct_hash(st)++;
  ------------------
  |  | 1840|   114M|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1836|   114M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
32784|   114M|                return;
32785|   114M|            }
32786|       |            /* Robinhood hashing - check if colliding kv pair
32787|       |             * is closer to their source than current. We use robinhood
32788|       |             * hashing to ensure that equivalent structs that are constructed
32789|       |             * with different order have the same internal layout, and therefor
32790|       |             * will compare properly - i.e., {1 2 3 4} should equal {3 4 1 2}.
32791|       |             * Collisions are resolved via an insertion sort insertion. */
32792|  10.6M|            otherhash = janet_hash(kv->key);
32793|  10.6M|            otherindex = janet_maphash(cap, otherhash);
  ------------------
  |  |  393|  10.6M|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
32794|  10.6M|            otherdist = (i + cap - otherindex) & (cap - 1);
32795|  10.6M|            if (dist < otherdist)
  ------------------
  |  Branch (32795:17): [True: 78.8k, False: 10.6M]
  ------------------
32796|  78.8k|                status = -1;
32797|  10.6M|            else if (otherdist < dist)
  ------------------
  |  Branch (32797:22): [True: 2.84k, False: 10.6M]
  ------------------
32798|  2.84k|                status = 1;
32799|  10.6M|            else if (hash < otherhash)
  ------------------
  |  Branch (32799:22): [True: 10.4M, False: 122k]
  ------------------
32800|  10.4M|                status = -1;
32801|   122k|            else if (otherhash < hash)
  ------------------
  |  Branch (32801:22): [True: 108k, False: 13.4k]
  ------------------
32802|   108k|                status = 1;
32803|  13.4k|            else
32804|  13.4k|                status = janet_compare(key, kv->key);
32805|       |            /* If other is closer to their ideal slot */
32806|  10.6M|            if (status == 1) {
  ------------------
  |  Branch (32806:17): [True: 111k, False: 10.5M]
  ------------------
32807|       |                /* Swap current kv pair with pair in slot */
32808|   111k|                JanetKV temp = *kv;
32809|   111k|                kv->key = key;
32810|   111k|                kv->value = value;
32811|   111k|                key = temp.key;
32812|   111k|                value = temp.value;
32813|       |                /* Save dist and hash of new kv pair */
32814|   111k|                dist = otherdist;
32815|   111k|                hash = otherhash;
32816|  10.5M|            } else if (status == 0) {
  ------------------
  |  Branch (32816:24): [True: 13.3k, False: 10.5M]
  ------------------
32817|  13.3k|                if (replace) {
  ------------------
  |  Branch (32817:21): [True: 13.3k, False: 0]
  ------------------
32818|       |                    /* A key was added to the struct more than once - replace old value */
32819|  13.3k|                    kv->value = value;
32820|  13.3k|                }
32821|  13.3k|                return;
32822|  13.3k|            }
32823|  10.6M|        }
32824|   114M|}
janet_struct_put:
32826|   114M|void janet_struct_put(JanetKV *st, Janet key, Janet value) {
32827|   114M|    janet_struct_put_ext(st, key, value, 1);
32828|   114M|}
janet_struct_end:
32831|  10.5M|const JanetKV *janet_struct_end(JanetKV *st) {
32832|  10.5M|    if (janet_struct_hash(st) != janet_struct_length(st)) {
  ------------------
  |  | 1840|  10.5M|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1836|  10.5M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                  if (janet_struct_hash(st) != janet_struct_length(st)) {
  ------------------
  |  | 1838|  10.5M|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1836|  10.5M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (32832:9): [True: 104k, False: 10.4M]
  ------------------
32833|       |        /* Error building struct, probably duplicate values. We need to rebuild
32834|       |         * the struct using only the values that went in. The second creation should always
32835|       |         * succeed. */
32836|   104k|        JanetKV *newst = janet_struct_begin(janet_struct_hash(st));
  ------------------
  |  | 1840|   104k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1836|   104k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
32837|  1.82M|        for (int32_t i = 0; i < janet_struct_capacity(st); i++) {
  ------------------
  |  | 1839|  1.82M|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1836|  1.82M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (32837:29): [True: 1.71M, False: 104k]
  ------------------
32838|  1.71M|            JanetKV *kv = st + i;
32839|  1.71M|            if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  801|  1.71M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 1.71M]
  |  |  ------------------
  |  |  802|  1.71M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  1.71M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  1.71M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  1.71M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.71M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.71M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (32839:17): [True: 418k, False: 1.29M]
  ------------------
32840|   418k|                janet_struct_put(newst, kv->key, kv->value);
32841|   418k|            }
32842|  1.71M|        }
32843|   104k|        janet_struct_proto(newst) = janet_struct_proto(st);
  ------------------
  |  | 1841|   104k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1836|   104k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                      janet_struct_proto(newst) = janet_struct_proto(st);
  ------------------
  |  | 1841|   104k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1836|   104k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
32844|   104k|        st = newst;
32845|   104k|    }
32846|  10.5M|    janet_struct_hash(st) = janet_kv_calchash(st, janet_struct_capacity(st));
  ------------------
  |  | 1840|  10.5M|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1836|  10.5M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                  janet_struct_hash(st) = janet_kv_calchash(st, janet_struct_capacity(st));
  ------------------
  |  | 1839|  10.5M|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1836|  10.5M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
32847|  10.5M|    if (janet_struct_proto(st)) {
  ------------------
  |  | 1841|  10.5M|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1836|  10.5M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1841:31): [True: 3, False: 10.5M]
  |  |  ------------------
  ------------------
32848|      3|        janet_struct_hash(st) += 2654435761u * janet_struct_hash(janet_struct_proto(st));
  ------------------
  |  | 1840|      3|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1836|      3|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                      janet_struct_hash(st) += 2654435761u * janet_struct_hash(janet_struct_proto(st));
  ------------------
  |  | 1840|      3|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1836|      3|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
32849|      3|    }
32850|  10.5M|    return (const JanetKV *)st;
32851|  10.5M|}
janet_struct_rawget:
32854|  61.2k|Janet janet_struct_rawget(const JanetKV *st, Janet key) {
32855|  61.2k|    const JanetKV *kv = janet_struct_find(st, key);
32856|  61.2k|    return kv ? kv->value : janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (32856:12): [True: 61.2k, False: 0]
  ------------------
32857|  61.2k|}
janet_struct_get:
32860|  22.0M|Janet janet_struct_get(const JanetKV *st, Janet key) {
32861|  38.3M|    for (int i = JANET_MAX_PROTO_DEPTH; st && i; --i, st = janet_struct_proto(st)) {
  ------------------
  |  |  294|  22.0M|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
                  for (int i = JANET_MAX_PROTO_DEPTH; st && i; --i, st = janet_struct_proto(st)) {
  ------------------
  |  | 1841|  16.3M|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1836|  16.3M|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (32861:41): [True: 22.0M, False: 16.3M]
  |  Branch (32861:47): [True: 22.0M, False: 0]
  ------------------
32862|  22.0M|        const JanetKV *kv = janet_struct_find(st, key);
32863|  22.0M|        if (NULL != kv && !janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  801|  22.0M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 22.0M]
  |  |  ------------------
  |  |  802|  22.0M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  22.0M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  22.0M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  22.0M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  22.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  22.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (32863:13): [True: 22.0M, False: 0]
  |  Branch (32863:27): [True: 5.66M, False: 16.3M]
  ------------------
32864|  5.66M|            return kv->value;
32865|  5.66M|        }
32866|  22.0M|    }
32867|  16.3M|    return janet_wrap_nil();
  ------------------
  |  |  826|  16.3M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  16.3M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  16.3M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  16.3M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32868|  22.0M|}
cfun_struct_getproto:
32915|      2|              "Return the prototype of a struct, or nil if it doesn't have one.") {
32916|      2|    janet_fixarity(argc, 1);
32917|      2|    JanetStruct st = janet_getstruct(argv, 0);
32918|      2|    return janet_struct_proto(st)
  ------------------
  |  | 1841|      2|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1836|      2|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1841:31): [True: 0, False: 2]
  |  |  ------------------
  ------------------
32919|      2|           ? janet_wrap_struct(janet_struct_proto(st))
  ------------------
  |  |  837|      0|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32920|      2|           : janet_wrap_nil();
  ------------------
  |  |  826|      2|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      2|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32921|      2|}
cfun_struct_to_table:
32959|      1|              "table's prototypes into the new struct's prototypes as well.") {
32960|      1|    janet_arity(argc, 1, 2);
32961|      1|    JanetStruct st = janet_getstruct(argv, 0);
32962|      1|    int recursive = argc > 1 && janet_truthy(argv[1]);
  ------------------
  |  |  813|      0|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 0, False: 0]
  |  |  ------------------
  |  |  814|      0|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 0, False: 0]
  |  |  |  Branch (814:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (32962:21): [True: 0, False: 1]
  ------------------
32963|      1|    JanetTable *tab = NULL;
32964|      1|    JanetStruct cursor = st;
32965|      1|    JanetTable *tab_cursor = tab;
32966|      1|    do {
32967|      1|        if (tab) {
  ------------------
  |  Branch (32967:13): [True: 0, False: 1]
  ------------------
32968|      0|            tab_cursor->proto = janet_table(janet_struct_length(cursor));
  ------------------
  |  | 1838|      0|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1836|      0|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
32969|      0|            tab_cursor = tab_cursor->proto;
32970|      1|        } else {
32971|      1|            tab = janet_table(janet_struct_length(cursor));
  ------------------
  |  | 1838|      1|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1836|      1|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
32972|      1|            tab_cursor = tab;
32973|      1|        }
32974|       |        /* TODO - implement as memcpy since struct memory should be compatible
32975|       |         * with table memory */
32976|      1|        for (int32_t i = 0; i < janet_struct_capacity(cursor); i++) {
  ------------------
  |  | 1839|      1|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1836|      1|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (32976:29): [True: 0, False: 1]
  ------------------
32977|      0|            const JanetKV *kv = cursor + i;
32978|      0|            if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (32978:17): [True: 0, False: 0]
  ------------------
32979|      0|                janet_table_put(tab_cursor, kv->key, kv->value);
32980|      0|            }
32981|      0|        }
32982|      1|        cursor = janet_struct_proto(cursor);
  ------------------
  |  | 1841|      1|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1836|      1|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
32983|      1|    } while (recursive && cursor);
  ------------------
  |  Branch (32983:14): [True: 0, False: 1]
  |  Branch (32983:27): [True: 0, False: 0]
  ------------------
32984|      1|    return janet_wrap_table(tab);
  ------------------
  |  |  841|      1|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|      1|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
32985|      1|}
cfun_struct_rawget:
32991|  61.2k|              "nil without checking the prototype. Returns the value in the struct.") {
32992|  61.2k|    janet_fixarity(argc, 2);
32993|  61.2k|    JanetStruct st = janet_getstruct(argv, 0);
32994|  61.2k|    return janet_struct_rawget(st, argv[1]);
32995|  61.2k|}
janet_lib_struct:
32998|  7.16k|void janet_lib_struct(JanetTable *env) {
32999|  7.16k|    JanetRegExt struct_cfuns[] = {
33000|  7.16k|        JANET_CORE_REG("struct/with-proto", cfun_struct_with_proto),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33001|  7.16k|        JANET_CORE_REG("struct/getproto", cfun_struct_getproto),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33002|  7.16k|        JANET_CORE_REG("struct/proto-flatten", cfun_struct_flatten),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33003|  7.16k|        JANET_CORE_REG("struct/to-table", cfun_struct_to_table),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33004|  7.16k|        JANET_CORE_REG("struct/rawget", cfun_struct_rawget),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33005|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
33006|  7.16k|    };
33007|       |    janet_core_cfuns_ext(env, NULL, struct_cfuns);
33008|  7.16k|}
janet_symcache_init:
33053|  7.65k|void janet_symcache_init() {
33054|  7.65k|    janet_vm.cache_capacity = 1024;
33055|  7.65k|    janet_vm.cache = janet_calloc(1, (size_t) janet_vm.cache_capacity * sizeof(const uint8_t *));
  ------------------
  |  | 2399|  7.65k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
33056|  7.65k|    if (NULL == janet_vm.cache) {
  ------------------
  |  Branch (33056:9): [True: 0, False: 7.65k]
  ------------------
33057|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
33058|      0|    }
33059|  7.65k|    memset(&janet_vm.gensym_counter, '0', sizeof(janet_vm.gensym_counter));
33060|  7.65k|    janet_vm.gensym_counter[0] = '_';
33061|  7.65k|    janet_vm.cache_count = 0;
33062|  7.65k|    janet_vm.cache_deleted = 0;
33063|  7.65k|}
janet_symcache_deinit:
33066|  7.65k|void janet_symcache_deinit() {
33067|  7.65k|    janet_free((void *)janet_vm.cache);
  ------------------
  |  | 2402|  7.65k|#define janet_free(X) free((X))
  ------------------
33068|       |    janet_vm.cache = NULL;
33069|  7.65k|    janet_vm.cache_capacity = 0;
33070|  7.65k|    janet_vm.cache_count = 0;
33071|  7.65k|    janet_vm.cache_deleted = 0;
33072|  7.65k|}
janet_symbol_deinit:
33174|  21.6M|void janet_symbol_deinit(const uint8_t *sym) {
33175|  21.6M|    int status = 0;
33176|  21.6M|    const uint8_t **bucket = janet_symcache_find(sym, &status);
  ------------------
  |  |33129|  21.6M|    janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1803|  21.6M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1802|  21.6M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1804|  21.6M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1802|  21.6M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33177|  21.6M|    if (status) {
  ------------------
  |  Branch (33177:9): [True: 21.6M, False: 735]
  ------------------
33178|  21.6M|        janet_vm.cache_count--;
33179|  21.6M|        janet_vm.cache_deleted++;
33180|  21.6M|        *bucket = JANET_SYMCACHE_DELETED;
33181|  21.6M|    }
33182|  21.6M|}
janet_symbol:
33185|   180M|const uint8_t *janet_symbol(const uint8_t *str, int32_t len) {
33186|   180M|    int32_t hash = janet_string_calchash(str, len);
33187|   180M|    uint8_t *newstr;
33188|   180M|    int success = 0;
33189|   180M|    const uint8_t **bucket = janet_symcache_findmem(str, len, hash, &success);
33190|   180M|    if (success)
  ------------------
  |  Branch (33190:9): [True: 159M, False: 20.9M]
  ------------------
33191|   159M|        return *bucket;
33192|  20.9M|    JanetStringHead *head = janet_gcalloc(JANET_MEMORY_SYMBOL, sizeof(JanetStringHead) + (size_t) len + 1);
33193|  20.9M|    head->hash = hash;
33194|  20.9M|    head->length = len;
33195|  20.9M|    newstr = (uint8_t *)(head->data);
33196|  20.9M|    safe_memcpy(newstr, str, len);
33197|  20.9M|    newstr[len] = 0;
33198|  20.9M|    janet_symcache_put((const uint8_t *)newstr, bucket);
33199|  20.9M|    return newstr;
33200|   180M|}
janet_csymbol:
33203|   154M|const uint8_t *janet_csymbol(const char *cstr) {
33204|   154M|    return janet_symbol((const uint8_t *)cstr, (int32_t) strlen(cstr));
33205|   154M|}
janet_symbol_gen:
33228|   720k|const uint8_t *janet_symbol_gen(void) {
33229|   720k|    const uint8_t **bucket = NULL;
33230|   720k|    uint8_t *sym;
33231|   720k|    int32_t hash = 0;
33232|   720k|    int status;
33233|       |    /* Leave spaces for 6 base 64 digits and two dashes. That means 64^6 possible suffixes, which
33234|       |     * is enough for resolving collisions. */
33235|  2.23M|    do {
33236|  2.23M|        hash = janet_string_calchash(
33237|  2.23M|                   janet_vm.gensym_counter,
33238|  2.23M|                   sizeof(janet_vm.gensym_counter) - 1);
33239|  2.23M|        bucket = janet_symcache_findmem(
33240|  2.23M|                     janet_vm.gensym_counter,
33241|  2.23M|                     sizeof(janet_vm.gensym_counter) - 1,
33242|  2.23M|                     hash,
33243|  2.23M|                     &status);
33244|  2.23M|    } while (status && (inc_gensym(), 1));
  ------------------
  |  Branch (33244:14): [True: 1.51M, False: 720k]
  |  Branch (33244:24): [True: 1.51M, False: 0]
  ------------------
33245|   720k|    JanetStringHead *head = janet_gcalloc(JANET_MEMORY_SYMBOL, sizeof(JanetStringHead) + sizeof(janet_vm.gensym_counter));
33246|   720k|    head->length = sizeof(janet_vm.gensym_counter) - 1;
33247|   720k|    head->hash = hash;
33248|   720k|    sym = (uint8_t *)(head->data);
33249|   720k|    memcpy(sym, janet_vm.gensym_counter, sizeof(janet_vm.gensym_counter));
33250|   720k|    sym[head->length] = 0;
33251|   720k|    janet_symcache_put((const uint8_t *)sym, bucket);
33252|   720k|    return (const uint8_t *)sym;
33253|   720k|}
janet_table_init:
33329|  18.7k|JanetTable *janet_table_init(JanetTable *table, int32_t capacity) {
33330|  18.7k|    return janet_table_init_impl(table, capacity, 1);
33331|  18.7k|}
janet_table_init_raw:
33334|  22.9k|JanetTable *janet_table_init_raw(JanetTable *table, int32_t capacity) {
33335|  22.9k|    return janet_table_init_impl(table, capacity, 0);
33336|  22.9k|}
janet_table_deinit:
33339|  41.6k|void janet_table_deinit(JanetTable *table) {
33340|  41.6k|    if (table->gc.flags & JANET_TABLE_FLAG_STACK) {
  ------------------
  |  |33289|  41.6k|#define JANET_TABLE_FLAG_STACK 0x10000
  ------------------
  |  Branch (33340:9): [True: 18.7k, False: 22.9k]
  ------------------
33341|  18.7k|        janet_sfree(table->data);
33342|  22.9k|    } else {
33343|  22.9k|        janet_free(table->data);
  ------------------
  |  | 2402|  22.9k|#define janet_free(X) free((X))
  ------------------
33344|  22.9k|    }
33345|  41.6k|}
janet_table:
33349|  5.75M|JanetTable *janet_table(int32_t capacity) {
33350|  5.75M|    JanetTable *table = janet_gcalloc(JANET_MEMORY_TABLE, sizeof(JanetTable));
33351|  5.75M|    return janet_table_init_impl(table, capacity, 0);
33352|  5.75M|}
janet_table_weakk:
33354|      5|JanetTable *janet_table_weakk(int32_t capacity) {
33355|      5|    JanetTable *table = janet_gcalloc(JANET_MEMORY_TABLE_WEAKK, sizeof(JanetTable));
33356|      5|    return janet_table_init_impl(table, capacity, 0);
33357|      5|}
janet_table_weakv:
33359|     19|JanetTable *janet_table_weakv(int32_t capacity) {
33360|     19|    JanetTable *table = janet_gcalloc(JANET_MEMORY_TABLE_WEAKV, sizeof(JanetTable));
33361|     19|    return janet_table_init_impl(table, capacity, 0);
33362|     19|}
janet_table_weakkv:
33364|      9|JanetTable *janet_table_weakkv(int32_t capacity) {
33365|      9|    JanetTable *table = janet_gcalloc(JANET_MEMORY_TABLE_WEAKKV, sizeof(JanetTable));
33366|      9|    return janet_table_init_impl(table, capacity, 0);
33367|      9|}
janet_table_find:
33371|   125M|JanetKV *janet_table_find(JanetTable *t, Janet key) {
33372|   125M|    return (JanetKV *) janet_dict_find(t->data, t->capacity, key);
33373|   125M|}
janet_table_get:
33407|  17.6M|Janet janet_table_get(JanetTable *t, Janet key) {
33408|  26.7M|    for (int i = JANET_MAX_PROTO_DEPTH; t && i; t = t->proto, --i) {
  ------------------
  |  |  294|  17.6M|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
  |  Branch (33408:41): [True: 18.0M, False: 8.75M]
  |  Branch (33408:46): [True: 18.0M, False: 18.4E]
  ------------------
33409|  18.0M|        JanetKV *bucket = janet_table_find(t, key);
33410|  18.0M|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL))
  ------------------
  |  |  801|  18.0M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 18.0M]
  |  |  ------------------
  |  |  802|  18.0M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  18.0M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  18.0M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  18.0M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  18.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  18.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33410:13): [True: 18.0M, False: 18.4E]
  |  Branch (33410:31): [True: 8.86M, False: 9.16M]
  ------------------
33411|  8.86M|            return bucket->value;
33412|  18.0M|    }
33413|  8.75M|    return janet_wrap_nil();
  ------------------
  |  |  826|  8.75M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  8.75M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  8.75M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  8.75M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33414|  17.6M|}
janet_table_get_keyword:
33417|  1.96M|Janet janet_table_get_keyword(JanetTable *t, const char *keyword) {
33418|  1.96M|    int32_t keyword_len = (int32_t) strlen(keyword);
33419|  3.02M|    for (int i = JANET_MAX_PROTO_DEPTH; t && i; t = t->proto, --i) {
  ------------------
  |  |  294|  1.96M|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
  |  Branch (33419:41): [True: 1.96M, False: 1.06M]
  |  Branch (33419:46): [True: 1.96M, False: 0]
  ------------------
33420|  1.96M|        JanetKV *bucket = (JanetKV *) janet_dict_find_keyword(t->data, t->capacity, (const uint8_t *) keyword, keyword_len);
33421|  1.96M|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL))
  ------------------
  |  |  801|  1.96M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 1.96M]
  |  |  ------------------
  |  |  802|  1.96M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  1.96M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  1.96M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  1.96M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.96M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.96M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33421:13): [True: 1.96M, False: 0]
  |  Branch (33421:31): [True: 905k, False: 1.06M]
  ------------------
33422|   905k|            return bucket->value;
33423|  1.96M|    }
33424|  1.06M|    return janet_wrap_nil();
  ------------------
  |  |  826|  1.06M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  1.06M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.06M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.06M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33425|  1.96M|}
janet_table_get_ex:
33428|    119|Janet janet_table_get_ex(JanetTable *t, Janet key, JanetTable **which) {
33429|    238|    for (int i = JANET_MAX_PROTO_DEPTH; t && i; t = t->proto, --i) {
  ------------------
  |  |  294|    119|#define JANET_MAX_PROTO_DEPTH 200
  ------------------
  |  Branch (33429:41): [True: 119, False: 119]
  |  Branch (33429:46): [True: 119, False: 0]
  ------------------
33430|    119|        JanetKV *bucket = janet_table_find(t, key);
33431|    119|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
  ------------------
  |  |  801|    119|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 119]
  |  |  ------------------
  |  |  802|    119|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|    119|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|    119|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|    119|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    119|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    119|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33431:13): [True: 119, False: 0]
  |  Branch (33431:31): [True: 0, False: 119]
  ------------------
33432|      0|            *which = t;
33433|      0|            return bucket->value;
33434|      0|        }
33435|    119|    }
33436|    119|    return janet_wrap_nil();
  ------------------
  |  |  826|    119|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|    119|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    119|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    119|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33437|    119|}
janet_table_rawget:
33440|  14.2k|Janet janet_table_rawget(JanetTable *t, Janet key) {
33441|  14.2k|    JanetKV *bucket = janet_table_find(t, key);
33442|  14.2k|    if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL))
  ------------------
  |  |  801|  14.2k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 14.2k]
  |  |  ------------------
  |  |  802|  14.2k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  14.2k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  14.2k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  14.2k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  14.2k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  14.2k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33442:9): [True: 14.2k, False: 0]
  |  Branch (33442:27): [True: 9.48k, False: 4.75k]
  ------------------
33443|  9.48k|        return bucket->value;
33444|  4.75k|    else
33445|  4.75k|        return janet_wrap_nil();
  ------------------
  |  |  826|  4.75k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  4.75k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  4.75k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  4.75k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33446|  14.2k|}
janet_table_remove:
33450|  1.05M|Janet janet_table_remove(JanetTable *t, Janet key) {
33451|  1.05M|    JanetKV *bucket = janet_table_find(t, key);
33452|  1.05M|    if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
  ------------------
  |  |  801|  1.05M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 1.05M]
  |  |  ------------------
  |  |  802|  1.05M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  1.05M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  1.05M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  1.05M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.05M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.05M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33452:9): [True: 1.05M, False: 0]
  |  Branch (33452:27): [True: 420k, False: 629k]
  ------------------
33453|   420k|        Janet ret = bucket->value;
33454|   420k|        t->count--;
33455|   420k|        t->deleted++;
33456|   420k|        bucket->key = janet_wrap_nil();
  ------------------
  |  |  826|   420k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|   420k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   420k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   420k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33457|   420k|        bucket->value = janet_wrap_false();
  ------------------
  |  |  828|   420k|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  817|   420k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   420k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   420k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33458|   420k|        return ret;
33459|   629k|    } else {
33460|   629k|        return janet_wrap_nil();
  ------------------
  |  |  826|   629k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|   629k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   629k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   629k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33461|   629k|    }
33462|  1.05M|}
janet_table_put:
33465|  39.1M|void janet_table_put(JanetTable *t, Janet key, Janet value) {
33466|  39.1M|    if (janet_checktype(key, JANET_NIL)) return;
  ------------------
  |  |  801|  39.1M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 1, False: 39.1M]
  |  |  |  Branch (801:6): [Folded, False: 39.1M]
  |  |  ------------------
  |  |  802|  39.1M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  39.1M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  39.1M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  39.1M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  39.1M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  39.1M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33467|  39.1M|    if (janet_checktype(key, JANET_NUMBER) && isnan(janet_unwrap_number(key))) return;
  ------------------
  |  |  801|  78.2M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 10.7k, False: 39.1M]
  |  |  |  Branch (801:6): [True: 39.1M, Folded]
  |  |  ------------------
  |  |  802|  78.2M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|  39.1M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 10.3k, False: 39.1M]
  |  |  |  |  |  Branch (798:28): [True: 202, False: 39.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  78.2M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|    853|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|    853|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    853|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    853|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33467:47): [True: 342, False: 10.4k]
  ------------------
33468|  39.1M|    if (janet_checktype(value, JANET_NIL)) {
  ------------------
  |  |  801|  39.1M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 405k, False: 38.7M]
  |  |  |  Branch (801:6): [Folded, False: 39.1M]
  |  |  ------------------
  |  |  802|  39.1M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  39.1M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  39.1M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  39.1M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  39.1M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  39.1M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33469|   405k|        janet_table_remove(t, key);
33470|  38.7M|    } else {
33471|  38.7M|        JanetKV *bucket = janet_table_find(t, key);
33472|  38.7M|        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
  ------------------
  |  |  801|  38.7M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 38.7M]
  |  |  ------------------
  |  |  802|  38.7M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  38.7M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  38.7M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  38.7M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  38.7M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  38.7M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33472:13): [True: 38.7M, False: 1.41k]
  |  Branch (33472:31): [True: 435k, False: 38.2M]
  ------------------
33473|   435k|            bucket->value = value;
33474|  38.2M|        } else {
33475|  38.2M|            if (NULL == bucket || 2 * (t->count + t->deleted + 1) > t->capacity) {
  ------------------
  |  Branch (33475:17): [True: 1.23k, False: 38.2M]
  |  Branch (33475:35): [True: 4.56M, False: 33.7M]
  ------------------
33476|  4.56M|                janet_table_rehash(t, janet_tablen(2 * t->count + 2));
33477|  4.56M|            }
33478|  38.2M|            bucket = janet_table_find(t, key);
33479|  38.2M|            if (janet_checktype(bucket->value, JANET_BOOLEAN))
  ------------------
  |  |  801|  38.2M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 38.2M]
  |  |  |  Branch (801:6): [Folded, False: 38.2M]
  |  |  ------------------
  |  |  802|  38.2M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  38.2M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  38.2M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  38.2M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  38.2M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  38.2M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33480|      0|                --t->deleted;
33481|  38.2M|            bucket->key = key;
33482|  38.2M|            bucket->value = value;
33483|  38.2M|            ++t->count;
33484|  38.2M|        }
33485|  38.7M|    }
33486|  39.1M|}
janet_table_clear:
33506|     16|void janet_table_clear(JanetTable *t) {
33507|     16|    int32_t capacity = t->capacity;
33508|     16|    JanetKV *data = t->data;
33509|     16|    janet_memempty(data, capacity);
33510|     16|    t->count = 0;
33511|     16|    t->deleted = 0;
33512|     16|}
janet_table_clone:
33515|  3.43k|JanetTable *janet_table_clone(JanetTable *table) {
33516|  3.43k|    JanetTable *newTable = janet_gcalloc(JANET_MEMORY_TABLE, sizeof(JanetTable));
33517|  3.43k|    newTable->count = table->count;
33518|  3.43k|    newTable->capacity = table->capacity;
33519|  3.43k|    newTable->deleted = table->deleted;
33520|  3.43k|    newTable->proto = table->proto;
33521|  3.43k|    newTable->data = janet_malloc(newTable->capacity * sizeof(JanetKV));
  ------------------
  |  | 2393|  3.43k|#define janet_malloc(X) malloc((X))
  ------------------
33522|  3.43k|    if (NULL == newTable->data) {
  ------------------
  |  Branch (33522:9): [True: 0, False: 3.43k]
  ------------------
33523|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
33524|      0|    }
33525|  3.43k|    memcpy(newTable->data, table->data, (size_t) table->capacity * sizeof(JanetKV));
33526|  3.43k|    return newTable;
33527|  3.43k|}
janet_table_merge_struct:
33546|     27|void janet_table_merge_struct(JanetTable *table, const JanetKV *other) {
33547|       |    janet_table_mergekv(table, other, janet_struct_capacity(other));
  ------------------
  |  | 1839|     27|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1836|     27|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
33548|     27|}
janet_table_to_struct:
33551|  22.8k|const JanetKV *janet_table_to_struct(JanetTable *t) {
33552|  22.8k|    JanetKV *st = janet_struct_begin(t->count);
33553|  22.8k|    JanetKV *kv = t->data;
33554|  22.8k|    JanetKV *end = t->data + t->capacity;
33555|   334k|    while (kv < end) {
  ------------------
  |  Branch (33555:12): [True: 311k, False: 22.8k]
  ------------------
33556|   311k|        if (!janet_checktype(kv->key, JANET_NIL))
  ------------------
  |  |  801|   311k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 311k]
  |  |  ------------------
  |  |  802|   311k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   311k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   311k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   311k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   311k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   311k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33556:13): [True: 112k, False: 199k]
  ------------------
33557|   112k|            janet_struct_put(st, kv->key, kv->value);
33558|   311k|        kv++;
33559|   311k|    }
33560|  22.8k|    return janet_struct_end(st);
33561|  22.8k|}
cfun_table_new:
33586|      4|              "Returns the new table.") {
33587|      4|    janet_fixarity(argc, 1);
33588|      4|    int32_t cap = janet_getnat(argv, 0);
33589|      4|    return janet_wrap_table(janet_table(cap));
  ------------------
  |  |  841|      4|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|      4|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      4|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33590|      4|}
cfun_table_weak:
33595|      7|              "Returns the new table.") {
33596|      7|    janet_fixarity(argc, 1);
33597|      7|    int32_t cap = janet_getnat(argv, 0);
33598|      7|    return janet_wrap_table(janet_table_weakkv(cap));
  ------------------
  |  |  841|      7|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|      7|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      7|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      7|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33599|      7|}
cfun_table_weak_values:
33613|      1|              "Returns the new table.") {
33614|      1|    janet_fixarity(argc, 1);
33615|      1|    int32_t cap = janet_getnat(argv, 0);
33616|      1|    return janet_wrap_table(janet_table_weakv(cap));
  ------------------
  |  |  841|      1|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|      1|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33617|      1|}
cfun_table_getproto:
33622|     47|              "has no prototype, otherwise returns the prototype.") {
33623|     47|    janet_fixarity(argc, 1);
33624|     47|    JanetTable *t = janet_gettable(argv, 0);
33625|     47|    return t->proto
  ------------------
  |  Branch (33625:12): [True: 0, False: 47]
  ------------------
33626|     47|           ? janet_wrap_table(t->proto)
  ------------------
  |  |  841|      0|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33627|     47|           : janet_wrap_nil();
  ------------------
  |  |  826|     47|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|     47|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     47|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     47|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33628|     47|}
cfun_table_setproto:
33632|   102k|              "Set the prototype of a table. Returns the original table `tab`.") {
33633|   102k|    janet_fixarity(argc, 2);
33634|   102k|    JanetTable *table = janet_gettable(argv, 0);
33635|   102k|    JanetTable *proto = NULL;
33636|   102k|    if (!janet_checktype(argv[1], JANET_NIL)) {
  ------------------
  |  |  801|   102k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 102k]
  |  |  ------------------
  |  |  802|   102k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   102k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   102k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   102k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   102k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   102k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33636:9): [True: 102k, False: 2]
  ------------------
33637|   102k|        proto = janet_gettable(argv, 1);
33638|   102k|    }
33639|   102k|    table->proto = proto;
33640|   102k|    return argv[0];
33641|   102k|}
cfun_table_tostruct:
33645|  22.8k|              "Convert a table to a struct. Returns a new struct.") {
33646|  22.8k|    janet_arity(argc, 1, 2);
33647|  22.8k|    JanetTable *t = janet_gettable(argv, 0);
33648|  22.8k|    JanetStruct proto = janet_optstruct(argv, argc, 1, NULL);
33649|  22.8k|    JanetStruct st = janet_table_to_struct(t);
33650|  22.8k|    janet_struct_proto(st) = proto;
  ------------------
  |  | 1841|  22.8k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1836|  22.8k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
33651|  22.8k|    return janet_wrap_struct(st);
  ------------------
  |  |  837|  22.8k|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  823|  22.8k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  22.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  22.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33652|  22.8k|}
cfun_table_rawget:
33658|  12.7k|              "nil without checking the prototype. Returns the value in the table.") {
33659|  12.7k|    janet_fixarity(argc, 2);
33660|  12.7k|    JanetTable *table = janet_gettable(argv, 0);
33661|  12.7k|    return janet_table_rawget(table, argv[1]);
33662|  12.7k|}
cfun_table_clear:
33675|     16|              "Remove all key-value pairs in a table and return the modified table `tab`.") {
33676|     16|    janet_fixarity(argc, 1);
33677|     16|    JanetTable *table = janet_gettable(argv, 0);
33678|     16|    janet_table_clear(table);
33679|     16|    return janet_wrap_table(table);
  ------------------
  |  |  841|     16|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|     16|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     16|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     16|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33680|     16|}
janet_lib_table:
33691|  7.16k|void janet_lib_table(JanetTable *env) {
33692|  7.16k|    JanetRegExt table_cfuns[] = {
33693|  7.16k|        JANET_CORE_REG("table/new", cfun_table_new),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33694|  7.16k|        JANET_CORE_REG("table/weak", cfun_table_weak),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33695|  7.16k|        JANET_CORE_REG("table/weak-keys", cfun_table_weak_keys),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33696|  7.16k|        JANET_CORE_REG("table/weak-values", cfun_table_weak_values),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33697|  7.16k|        JANET_CORE_REG("table/to-struct", cfun_table_tostruct),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33698|  7.16k|        JANET_CORE_REG("table/getproto", cfun_table_getproto),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33699|  7.16k|        JANET_CORE_REG("table/setproto", cfun_table_setproto),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33700|  7.16k|        JANET_CORE_REG("table/rawget", cfun_table_rawget),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33701|  7.16k|        JANET_CORE_REG("table/clone", cfun_table_clone),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33702|  7.16k|        JANET_CORE_REG("table/clear", cfun_table_clear),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33703|  7.16k|        JANET_CORE_REG("table/proto-flatten", cfun_table_proto_flatten),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33704|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
33705|  7.16k|    };
33706|       |    janet_core_cfuns_ext(env, NULL, table_cfuns);
33707|  7.16k|}
janet_tuple_begin:
33746|  62.2M|Janet *janet_tuple_begin(int32_t length) {
33747|  62.2M|    size_t size = sizeof(JanetTupleHead) + ((size_t) length * sizeof(Janet));
33748|  62.2M|    JanetTupleHead *head = janet_gcalloc(JANET_MEMORY_TUPLE, size);
33749|  62.2M|    head->sm_line = -1;
33750|  62.2M|    head->sm_column = -1;
33751|  62.2M|    head->length = length;
33752|  62.2M|    return (Janet *)(head->data);
33753|  62.2M|}
janet_tuple_end:
33756|  62.2M|const Janet *janet_tuple_end(Janet *tuple) {
33757|  62.2M|    janet_tuple_hash(tuple) = janet_array_calchash(tuple, janet_tuple_length(tuple));
  ------------------
  |  | 1793|  62.2M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1790|  62.2M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                  janet_tuple_hash(tuple) = janet_array_calchash(tuple, janet_tuple_length(tuple));
  ------------------
  |  | 1792|  62.2M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|  62.2M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
33758|  62.2M|    return (const Janet *)tuple;
33759|  62.2M|}
janet_tuple_n:
33762|  51.9M|const Janet *janet_tuple_n(const Janet *values, int32_t n) {
33763|  51.9M|    Janet *t = janet_tuple_begin(n);
33764|  51.9M|    safe_memcpy(t, values, sizeof(Janet) * n);
33765|  51.9M|    return janet_tuple_end(t);
33766|  51.9M|}
cfun_tuple_brackets:
33772|  4.69M|              "Creates a new bracketed tuple containing the elements xs.") {
33773|  4.69M|    const Janet *tup = janet_tuple_n(argv, argc);
33774|  4.69M|    janet_tuple_flag(tup) |= JANET_TUPLE_FLAG_BRACKETCTOR;
  ------------------
  |  | 1796|  4.69M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1790|  4.69M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                  janet_tuple_flag(tup) |= JANET_TUPLE_FLAG_BRACKETCTOR;
  ------------------
  |  | 1788|  4.69M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
33775|  4.69M|    return janet_wrap_tuple(tup);
  ------------------
  |  |  838|  4.69M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|  4.69M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  4.69M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  4.69M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33776|  4.69M|}
cfun_tuple_slice:
33786|  17.3M|              "negative slice range. Returns the new tuple.") {
33787|  17.3M|    JanetView view = janet_getindexed(argv, 0);
33788|  17.3M|    JanetRange range = janet_getslice(argc, argv);
33789|  17.3M|    return janet_wrap_tuple(janet_tuple_n(view.items + range.start, range.end - range.start));
  ------------------
  |  |  838|  17.3M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|  17.3M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  17.3M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  17.3M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33790|  17.3M|}
cfun_tuple_type:
33798|  22.0M|              "the compiler.") {
33799|  22.0M|    janet_fixarity(argc, 1);
33800|  22.0M|    const Janet *tup = janet_gettuple(argv, 0);
33801|  22.0M|    if (janet_tuple_flag(tup) & JANET_TUPLE_FLAG_BRACKETCTOR) {
  ------------------
  |  | 1796|  22.0M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1790|  22.0M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                  if (janet_tuple_flag(tup) & JANET_TUPLE_FLAG_BRACKETCTOR) {
  ------------------
  |  | 1788|  22.0M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (33801:9): [True: 4.69M, False: 17.4M]
  ------------------
33802|  4.69M|        return janet_ckeywordv("brackets");
  ------------------
  |  | 1833|  4.69M|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|  4.69M|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|  4.69M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  4.69M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  4.69M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33803|  17.4M|    } else {
33804|  17.4M|        return janet_ckeywordv("parens");
  ------------------
  |  | 1833|  17.4M|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|  17.4M|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|  17.4M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  17.4M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  17.4M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33805|  17.4M|    }
33806|  22.0M|}
cfun_tuple_sourcemap:
33811|  9.89M|              "which is another tuple (line, column).") {
33812|  9.89M|    janet_fixarity(argc, 1);
33813|  9.89M|    const Janet *tup = janet_gettuple(argv, 0);
33814|  9.89M|    Janet contents[2];
33815|  9.89M|    contents[0] = janet_wrap_integer(janet_tuple_head(tup)->sm_line);
  ------------------
  |  |  958|  9.89M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|  9.89M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
33816|  9.89M|    contents[1] = janet_wrap_integer(janet_tuple_head(tup)->sm_column);
  ------------------
  |  |  958|  9.89M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|  9.89M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
33817|  9.89M|    return janet_wrap_tuple(janet_tuple_n(contents, 2));
  ------------------
  |  |  838|  9.89M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|  9.89M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  9.89M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  9.89M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33818|  9.89M|}
cfun_tuple_setmap:
33823|  9.89M|              "should be integers.") {
33824|  9.89M|    janet_fixarity(argc, 3);
33825|  9.89M|    const Janet *tup = janet_gettuple(argv, 0);
33826|  9.89M|    janet_tuple_head(tup)->sm_line = janet_getinteger(argv, 1);
  ------------------
  |  | 1790|  9.89M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
33827|       |    janet_tuple_head(tup)->sm_column = janet_getinteger(argv, 2);
  ------------------
  |  | 1790|  9.89M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
33828|  9.89M|    return argv[0];
33829|  9.89M|}
cfun_tuple_join:
33833|      8|              "Create a tuple by joining together other tuples and arrays.") {
33834|      8|    janet_arity(argc, 0, -1);
33835|      8|    int32_t total_len = 0;
33836|      8|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (33836:25): [True: 1, False: 7]
  ------------------
33837|      1|        int32_t len = 0;
33838|      1|        const Janet *vals = NULL;
33839|      1|        if (!janet_indexed_view(argv[i], &vals, &len)) {
  ------------------
  |  Branch (33839:13): [True: 1, False: 0]
  ------------------
33840|      1|            janet_panicf("expected indexed type for argument %d, got %v", i, argv[i]);
33841|      1|        }
33842|      0|        if (INT32_MAX - total_len < len) {
  ------------------
  |  Branch (33842:13): [True: 0, False: 0]
  ------------------
33843|      0|            janet_panic("tuple too large");
33844|      0|        }
33845|      0|        total_len += len;
33846|      0|    }
33847|      7|    Janet *tup = janet_tuple_begin(total_len);
33848|      7|    Janet *tup_cursor = tup;
33849|      7|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (33849:25): [True: 0, False: 7]
  ------------------
33850|      0|        int32_t len = 0;
33851|      0|        const Janet *vals = NULL;
33852|      0|        janet_indexed_view(argv[i], &vals, &len);
33853|      0|        memcpy(tup_cursor, vals, len * sizeof(Janet));
33854|      0|        tup_cursor += len;
33855|      0|    }
33856|      7|    return janet_wrap_tuple(janet_tuple_end(tup));
  ------------------
  |  |  838|      7|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|      7|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      7|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      7|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33857|      8|}
janet_lib_tuple:
33860|  7.16k|void janet_lib_tuple(JanetTable *env) {
33861|  7.16k|    JanetRegExt tuple_cfuns[] = {
33862|  7.16k|        JANET_CORE_REG("tuple/brackets", cfun_tuple_brackets),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33863|  7.16k|        JANET_CORE_REG("tuple/slice", cfun_tuple_slice),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33864|  7.16k|        JANET_CORE_REG("tuple/type", cfun_tuple_type),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33865|  7.16k|        JANET_CORE_REG("tuple/sourcemap", cfun_tuple_sourcemap),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33866|  7.16k|        JANET_CORE_REG("tuple/setmap", cfun_tuple_setmap),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33867|  7.16k|        JANET_CORE_REG("tuple/join", cfun_tuple_join),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
33868|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
33869|  7.16k|    };
33870|       |    janet_core_cfuns_ext(env, NULL, tuple_cfuns);
33871|  7.16k|}
janet_hash_mix:
33996|  1.00G|uint32_t janet_hash_mix(uint32_t input, uint32_t more) {
33997|  1.00G|    uint32_t mix1 = (more + 0x9e3779b9 + (input << 6) + (input >> 2));
33998|  1.00G|    return input ^ (0x9e3779b9 + (mix1 << 6) + (mix1 >> 2));
33999|  1.00G|}
janet_string_calchash:
34003|   196M|int32_t janet_string_calchash(const uint8_t *str, int32_t len) {
34004|   196M|    if (NULL == str || len == 0) return 5381;
  ------------------
  |  Branch (34004:9): [True: 102k, False: 196M]
  |  Branch (34004:24): [True: 68.4k, False: 196M]
  ------------------
34005|   196M|    const uint8_t *end = str + len;
34006|   196M|    uint32_t hash = 5381;
34007|  2.44G|    while (str < end)
  ------------------
  |  Branch (34007:12): [True: 2.24G, False: 196M]
  ------------------
34008|  2.24G|        hash = (hash << 5) + hash + *str++;
34009|   196M|    hash = janet_hash_mix(hash, (uint32_t) len);
34010|   196M|    return (int32_t) hash;
34011|   196M|}
janet_array_calchash:
34126|  62.2M|int32_t janet_array_calchash(const Janet *array, int32_t len) {
34127|  62.2M|    const Janet *end = array + len;
34128|  62.2M|    uint32_t hash = 33;
34129|   204M|    while (array < end) {
  ------------------
  |  Branch (34129:12): [True: 142M, False: 62.2M]
  ------------------
34130|   142M|        hash = janet_hash_mix(hash, janet_hash(*array++));
34131|   142M|    }
34132|  62.2M|    return (int32_t) hash;
34133|  62.2M|}
janet_kv_calchash:
34136|  10.5M|int32_t janet_kv_calchash(const JanetKV *kvs, int32_t len) {
34137|  10.5M|    const JanetKV *end = kvs + len;
34138|  10.5M|    uint32_t hash = 33;
34139|   343M|    while (kvs < end) {
  ------------------
  |  Branch (34139:12): [True: 332M, False: 10.5M]
  ------------------
34140|   332M|        hash = janet_hash_mix(hash, janet_hash(kvs->key));
34141|   332M|        hash = janet_hash_mix(hash, janet_hash(kvs->value));
34142|   332M|        kvs++;
34143|   332M|    }
34144|  10.5M|    return (int32_t) hash;
34145|  10.5M|}
janet_tablen:
34149|  21.0M|int32_t janet_tablen(int32_t n) {
34150|  21.0M|    if (n < 0) return 0;
  ------------------
  |  Branch (34150:9): [True: 0, False: 21.0M]
  ------------------
34151|  21.0M|    n |= n >> 1;
34152|  21.0M|    n |= n >> 2;
34153|  21.0M|    n |= n >> 4;
34154|  21.0M|    n |= n >> 8;
34155|  21.0M|    n |= n >> 16;
34156|  21.0M|    return n == INT32_MAX ? INT32_MAX : n + 1;
  ------------------
  |  Branch (34156:12): [True: 0, False: 21.0M]
  ------------------
34157|  21.0M|}
safe_memcpy:
34160|   132M|void safe_memcpy(void *dest, const void *src, size_t len) {
34161|   132M|    if (!len) return;
  ------------------
  |  Branch (34161:9): [True: 35.1M, False: 97.1M]
  ------------------
34162|  97.1M|    memcpy(dest, src, len);
34163|  97.1M|}
janet_dict_find:
34167|   125M|const JanetKV *janet_dict_find(const JanetKV *buckets, int32_t cap, Janet key) {
34168|   125M|    int32_t index = janet_maphash(cap, janet_hash(key));
  ------------------
  |  |  393|   125M|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
34169|   125M|    int32_t i;
34170|   125M|    const JanetKV *first_bucket = NULL;
34171|       |    /* Higher half */
34172|   317M|    for (i = index; i < cap; i++) {
  ------------------
  |  Branch (34172:21): [True: 316M, False: 501k]
  ------------------
34173|   316M|        const JanetKV *kv = buckets + i;
34174|   316M|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  801|   316M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 212M, False: 104M]
  |  |  |  Branch (801:6): [Folded, False: 316M]
  |  |  ------------------
  |  |  802|   316M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   316M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   316M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   316M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   316M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   316M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34175|   212M|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  801|   212M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 114M, False: 97.7M]
  |  |  |  Branch (801:6): [Folded, False: 212M]
  |  |  ------------------
  |  |  802|   212M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   212M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   212M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   212M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   212M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   212M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34176|   114M|                return kv;
34177|   114M|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (34177:24): [True: 1.42M, False: 96.3M]
  ------------------
34178|  1.42M|                first_bucket = kv;
34179|  1.42M|            }
34180|   212M|        } else if (janet_equals(kv->key, key)) {
  ------------------
  |  Branch (34180:20): [True: 10.0M, False: 93.9M]
  ------------------
34181|  10.0M|            return buckets + i;
34182|  10.0M|        }
34183|   316M|    }
34184|       |    /* Lower half */
34185|   548k|    for (i = 0; i < index; i++) {
  ------------------
  |  Branch (34185:17): [True: 548k, False: 18.4E]
  ------------------
34186|   548k|        const JanetKV *kv = buckets + i;
34187|   548k|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  801|   548k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 512k, False: 36.5k]
  |  |  |  Branch (801:6): [Folded, False: 548k]
  |  |  ------------------
  |  |  802|   548k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   548k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   548k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   548k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   548k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   548k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34188|   512k|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  801|   512k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 508k, False: 4.13k]
  |  |  |  Branch (801:6): [Folded, False: 512k]
  |  |  ------------------
  |  |  802|   512k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   512k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   512k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   512k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   512k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   512k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34189|   508k|                return kv;
34190|   508k|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (34190:24): [True: 801, False: 3.33k]
  ------------------
34191|    801|                first_bucket = kv;
34192|    801|            }
34193|   512k|        } else if (janet_equals(kv->key, key)) {
  ------------------
  |  Branch (34193:20): [True: 7.10k, False: 29.4k]
  ------------------
34194|  7.10k|            return buckets + i;
34195|  7.10k|        }
34196|   548k|    }
34197|  18.4E|    return first_bucket;
34198|   501k|}
janet_dict_find_keyword:
34204|  1.96M|    const uint8_t *cstr, int32_t cstr_len) {
34205|  1.96M|    int32_t hash = janet_string_calchash(cstr, cstr_len);
34206|  1.96M|    int32_t index = janet_maphash(cap, hash);
  ------------------
  |  |  393|  1.96M|#define janet_maphash(cap, hash) ((uint32_t)(hash) & (cap - 1))
  ------------------
34207|  1.96M|    int32_t i;
34208|  1.96M|    const JanetKV *first_bucket = NULL;
34209|       |    /* Higher half */
34210|  3.44M|    for (i = index; i < cap; i++) {
  ------------------
  |  Branch (34210:21): [True: 3.02M, False: 413k]
  ------------------
34211|  3.02M|        const JanetKV *kv = buckets + i;
34212|  3.02M|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  801|  3.02M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 648k, False: 2.37M]
  |  |  |  Branch (801:6): [Folded, False: 3.02M]
  |  |  ------------------
  |  |  802|  3.02M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  3.02M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  3.02M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  3.02M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  3.02M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  3.02M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34213|   648k|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  801|   648k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 648k, False: 493]
  |  |  |  Branch (801:6): [Folded, False: 648k]
  |  |  ------------------
  |  |  802|   648k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   648k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   648k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   648k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   648k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   648k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34214|   648k|                return kv;
34215|   648k|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (34215:24): [True: 145, False: 348]
  ------------------
34216|    145|                first_bucket = kv;
34217|    145|            }
34218|  2.37M|        } else if (janet_checktype(kv->key, JANET_KEYWORD)) {
  ------------------
  |  |  801|  2.37M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 1.85M, False: 523k]
  |  |  |  Branch (801:6): [Folded, False: 2.37M]
  |  |  ------------------
  |  |  802|  2.37M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  2.37M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  2.37M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  2.37M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  2.37M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  2.37M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34219|       |            /* Works for symbol and keyword, too */
34220|  1.85M|            JanetString str = janet_unwrap_string(kv->key);
  ------------------
  |  |  858|  1.85M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
34221|  1.85M|            int32_t len = janet_string_length(str);
  ------------------
  |  | 1803|  1.85M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|  1.85M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
34222|  1.85M|            if (hash == janet_string_hash(str) && len == cstr_len && !memcmp(str, cstr, len)) {
  ------------------
  |  | 1804|  3.71M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1802|  1.85M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (34222:17): [True: 905k, False: 950k]
  |  Branch (34222:51): [True: 905k, False: 0]
  |  Branch (34222:70): [True: 905k, False: 0]
  ------------------
34223|   905k|                return buckets + i;
34224|   905k|            }
34225|  1.85M|        }
34226|  3.02M|    }
34227|       |    /* Lower half */
34228|   413k|    for (i = 0; i < index; i++) {
  ------------------
  |  Branch (34228:17): [True: 413k, False: 0]
  ------------------
34229|   413k|        const JanetKV *kv = buckets + i;
34230|   413k|        if (janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  801|   413k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 413k, False: 332]
  |  |  |  Branch (801:6): [Folded, False: 413k]
  |  |  ------------------
  |  |  802|   413k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   413k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   413k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   413k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   413k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   413k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34231|   413k|            if (janet_checktype(kv->value, JANET_NIL)) {
  ------------------
  |  |  801|   413k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 413k, False: 0]
  |  |  |  Branch (801:6): [Folded, False: 413k]
  |  |  ------------------
  |  |  802|   413k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   413k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   413k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   413k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   413k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   413k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34232|   413k|                return kv;
34233|   413k|            } else if (NULL == first_bucket) {
  ------------------
  |  Branch (34233:24): [True: 0, False: 0]
  ------------------
34234|      0|                first_bucket = kv;
34235|      0|            }
34236|   413k|        } else if (janet_checktype(kv->key, JANET_KEYWORD)) {
  ------------------
  |  |  801|    332|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 332, False: 0]
  |  |  |  Branch (801:6): [Folded, False: 332]
  |  |  ------------------
  |  |  802|    332|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|    332|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|    332|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|    332|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    332|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    332|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34237|       |            /* Works for symbol and keyword, too */
34238|    332|            JanetString str = janet_unwrap_string(kv->key);
  ------------------
  |  |  858|    332|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
34239|    332|            int32_t len = janet_string_length(str);
  ------------------
  |  | 1803|    332|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|    332|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
34240|    332|            if (hash == janet_string_hash(str) && len == cstr_len && !memcmp(str, cstr, len)) {
  ------------------
  |  | 1804|    664|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1802|    332|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (34240:17): [True: 0, False: 332]
  |  Branch (34240:51): [True: 0, False: 0]
  |  Branch (34240:70): [True: 0, False: 0]
  ------------------
34241|      0|                return buckets + i;
34242|      0|            }
34243|    332|        }
34244|   413k|    }
34245|      0|    return first_bucket;
34246|   413k|}
janet_dictionary_next:
34258|  12.6k|const JanetKV *janet_dictionary_next(const JanetKV *kvs, int32_t cap, const JanetKV *kv) {
34259|  12.6k|    const JanetKV *end = kvs + cap;
34260|  12.6k|    kv = (kv == NULL) ? kvs : kv + 1;
  ------------------
  |  Branch (34260:10): [True: 10.8k, False: 1.82k]
  ------------------
34261|  26.5k|    while (kv < end) {
  ------------------
  |  Branch (34261:12): [True: 15.7k, False: 10.8k]
  ------------------
34262|  15.7k|        if (!janet_checktype(kv->key, JANET_NIL))
  ------------------
  |  |  801|  15.7k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 15.7k]
  |  |  ------------------
  |  |  802|  15.7k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  15.7k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  15.7k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  15.7k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  15.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  15.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (34262:13): [True: 1.82k, False: 13.9k]
  ------------------
34263|  1.82k|            return kv;
34264|  13.9k|        kv++;
34265|  13.9k|    }
34266|  10.8k|    return NULL;
34267|  12.6k|}
janet_cstrcmp:
34271|  12.3M|int janet_cstrcmp(const uint8_t *str, const char *other) {
34272|  12.3M|    int32_t len = janet_string_length(str);
  ------------------
  |  | 1803|  12.3M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|  12.3M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
34273|  12.3M|    int32_t index;
34274|  30.1M|    for (index = 0; index < len; index++) {
  ------------------
  |  Branch (34274:21): [True: 27.8M, False: 2.36M]
  ------------------
34275|  27.8M|        uint8_t c = str[index];
34276|  27.8M|        uint8_t k = ((const uint8_t *)other)[index];
34277|  27.8M|        if (c < k) return -1;
  ------------------
  |  Branch (34277:13): [True: 2.40M, False: 25.4M]
  ------------------
34278|  25.4M|        if (c > k) return 1;
  ------------------
  |  Branch (34278:13): [True: 7.53M, False: 17.8M]
  ------------------
34279|  17.8M|        if (k == '\0') break;
  ------------------
  |  Branch (34279:13): [True: 0, False: 17.8M]
  ------------------
34280|  17.8M|    }
34281|  2.36M|    return (other[index] == '\0') ? 0 : -1;
  ------------------
  |  Branch (34281:12): [True: 2.36M, False: 1.07k]
  ------------------
34282|  12.3M|}
janet_strbinsearch:
34291|  1.01M|    const uint8_t *key) {
34292|  1.01M|    size_t low = 0;
34293|  1.01M|    size_t hi = tabcount;
34294|  1.01M|    const char *t = (const char *)tab;
34295|  2.84M|    while (low < hi) {
  ------------------
  |  Branch (34295:12): [True: 2.68M, False: 162k]
  ------------------
34296|  2.68M|        size_t mid = low + ((hi - low) / 2);
34297|  2.68M|        const char **item = (const char **)(t + mid * itemsize);
34298|  2.68M|        const char *name = *item;
34299|  2.68M|        int comp = janet_cstrcmp(key, name);
34300|  2.68M|        if (comp < 0) {
  ------------------
  |  Branch (34300:13): [True: 1.18M, False: 1.50M]
  ------------------
34301|  1.18M|            hi = mid;
34302|  1.50M|        } else if (comp > 0) {
  ------------------
  |  Branch (34302:20): [True: 650k, False: 849k]
  ------------------
34303|   650k|            low = mid + 1;
34304|   849k|        } else {
34305|   849k|            return (const void *)item;
34306|   849k|        }
34307|  2.68M|    }
34308|   162k|    return NULL;
34309|  1.01M|}
janet_registry_put:
34371|  2.52M|    int32_t source_line) {
34372|  2.52M|    if (janet_vm.registry_count == janet_vm.registry_cap) {
  ------------------
  |  Branch (34372:9): [True: 7.16k, False: 2.51M]
  ------------------
34373|  7.16k|        size_t newcap = (janet_vm.registry_count + 1) * 2;
34374|       |        /* Size it nicely with core by default */
34375|  7.16k|        if (newcap < 512) {
  ------------------
  |  Branch (34375:13): [True: 7.16k, False: 0]
  ------------------
34376|  7.16k|            newcap = 512;
34377|  7.16k|        }
34378|  7.16k|        void *newmem = janet_realloc(janet_vm.registry, newcap * sizeof(JanetCFunRegistry));
  ------------------
  |  | 2396|  7.16k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
34379|  7.16k|        if (NULL == newmem) {
  ------------------
  |  Branch (34379:13): [True: 0, False: 7.16k]
  ------------------
34380|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
34381|      0|        }
34382|  7.16k|        janet_vm.registry = newmem;
34383|  7.16k|        janet_vm.registry_cap = newcap;
34384|  7.16k|    }
34385|  2.52M|    JanetCFunRegistry value = {
34386|  2.52M|        key,
34387|  2.52M|        name,
34388|  2.52M|        name_prefix,
34389|  2.52M|        source_file,
34390|  2.52M|        source_line
34391|  2.52M|    };
34392|  2.52M|    janet_vm.registry[janet_vm.registry_count++] = value;
34393|  2.52M|    janet_vm.registry_dirty = 1;
34394|  2.52M|}
janet_registry_get:
34396|  1.27k|JanetCFunRegistry *janet_registry_get(JanetCFunction key) {
34397|  1.27k|    if (janet_vm.registry_dirty) {
  ------------------
  |  Branch (34397:9): [True: 1.26k, False: 13]
  ------------------
34398|  1.26k|        janet_registry_sort();
34399|  1.26k|    }
34400|   263k|    for (size_t i = 0; i < janet_vm.registry_count; i++) {
  ------------------
  |  Branch (34400:24): [True: 263k, False: 37]
  ------------------
34401|   263k|        if (janet_vm.registry[i].cfun == key) {
  ------------------
  |  Branch (34401:13): [True: 1.23k, False: 262k]
  ------------------
34402|  1.23k|            return janet_vm.registry + i;
34403|  1.23k|        }
34404|   263k|    }
34405|     37|    JanetCFunRegistry *lo = janet_vm.registry;
34406|     37|    JanetCFunRegistry *hi = lo + janet_vm.registry_count;
34407|    333|    while (lo < hi) {
  ------------------
  |  Branch (34407:12): [True: 296, False: 37]
  ------------------
34408|    296|        JanetCFunRegistry *mid = lo + (hi - lo) / 2;
34409|    296|        if (mid->cfun == key) {
  ------------------
  |  Branch (34409:13): [True: 0, False: 296]
  ------------------
34410|      0|            return mid;
34411|      0|        }
34412|    296|        if ((void *)(mid->cfun) > (void *)(key)) {
  ------------------
  |  Branch (34412:13): [True: 0, False: 296]
  ------------------
34413|      0|            hi = mid;
34414|    296|        } else {
34415|    296|            lo = mid + 1;
34416|    296|        }
34417|    296|    }
34418|     37|    return NULL;
34419|     37|}
janet_register_abstract_type:
34520|  64.4k|void janet_register_abstract_type(const JanetAbstractType *at) {
34521|  64.4k|    janet_check_pointer_align((void *) at);
34522|  64.4k|    Janet sym = janet_csymbolv(at->name);
  ------------------
  |  | 1827|  64.4k|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  844|  64.4k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|  64.4k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  64.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  64.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34523|  64.4k|    Janet check = janet_table_get(janet_vm.abstract_registry, sym);
34524|  64.4k|    if (!janet_checktype(check, JANET_NIL) && at != janet_unwrap_pointer(check)) {
  ------------------
  |  |  801|   128k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 64.4k]
  |  |  ------------------
  |  |  802|   128k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   128k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  64.4k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  64.4k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  64.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  64.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (!janet_checktype(check, JANET_NIL) && at != janet_unwrap_pointer(check)) {
  ------------------
  |  |  862|      0|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (34524:9): [True: 0, False: 64.4k]
  |  Branch (34524:47): [True: 0, False: 0]
  ------------------
34525|      0|        janet_panicf("cannot register abstract type %s, "
34526|      0|                     "a type with the same name exists", at->name);
34527|      0|    }
34528|  64.4k|    janet_table_put(janet_vm.abstract_registry, sym, janet_wrap_pointer((void *) at));
  ------------------
  |  |  849|  64.4k|#define janet_wrap_pointer(s) janet_nanbox_wrap_((s), JANET_POINTER)
  |  |  ------------------
  |  |  |  |  820|  64.4k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  64.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  64.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34529|  64.4k|}
janet_get_abstract_type:
34531|  1.04k|const JanetAbstractType *janet_get_abstract_type(Janet key) {
34532|  1.04k|    Janet wrapped = janet_table_get(janet_vm.abstract_registry, key);
34533|  1.04k|    if (janet_checktype(wrapped, JANET_NIL)) {
  ------------------
  |  |  801|  1.04k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 1, False: 1.04k]
  |  |  |  Branch (801:6): [Folded, False: 1.04k]
  |  |  ------------------
  |  |  802|  1.04k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  1.04k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  1.04k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  1.04k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34534|      1|        return NULL;
34535|      1|    }
34536|  1.04k|    return (JanetAbstractType *)(janet_unwrap_pointer(wrapped));
  ------------------
  |  |  862|  1.04k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
34537|  1.04k|}
janet_core_def_sm:
34540|  21.4k|void janet_core_def_sm(JanetTable *env, const char *name, Janet x, const void *p, const void *sf, int32_t sl) {
34541|  21.4k|    (void) sf;
34542|  21.4k|    (void) sl;
34543|  21.4k|    (void) p;
34544|  21.4k|    Janet key = janet_csymbolv(name);
  ------------------
  |  | 1827|  21.4k|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  844|  21.4k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|  21.4k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  21.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  21.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34545|  21.4k|    janet_table_put(env, key, x);
34546|  21.4k|    if (janet_checktype(x, JANET_CFUNCTION)) {
  ------------------
  |  |  801|  21.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 21.4k]
  |  |  |  Branch (801:6): [Folded, False: 21.4k]
  |  |  ------------------
  |  |  802|  21.4k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  21.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  21.4k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  21.4k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  21.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  21.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34547|      0|        janet_registry_put(janet_unwrap_cfunction(x), name, NULL, NULL, 0);
  ------------------
  |  |  864|      0|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
34548|      0|    }
34549|  21.4k|}
janet_core_cfuns_ext:
34551|   157k|void janet_core_cfuns_ext(JanetTable *env, const char *regprefix, const JanetRegExt *cfuns) {
34552|   157k|    (void) regprefix;
34553|  2.67M|    while (cfuns->name) {
  ------------------
  |  Branch (34553:12): [True: 2.52M, False: 157k]
  ------------------
34554|  2.52M|        janet_check_pointer_align(cfuns->cfun);
34555|  2.52M|        Janet fun = janet_wrap_cfunction(cfuns->cfun);
  ------------------
  |  |  848|  2.52M|#define janet_wrap_cfunction(s) janet_nanbox_wrap_((s), JANET_CFUNCTION)
  |  |  ------------------
  |  |  |  |  820|  2.52M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  2.52M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  2.52M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34556|  2.52M|        janet_table_put(env, janet_csymbolv(cfuns->name), fun);
  ------------------
  |  | 1827|  2.52M|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  844|  2.52M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|  2.52M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  2.52M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  2.52M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34557|  2.52M|        janet_registry_put(cfuns->cfun, cfuns->name, regprefix, cfuns->source_file, cfuns->source_line);
34558|  2.52M|        cfuns++;
34559|  2.52M|    }
34560|   157k|}
janet_binding_from_entry:
34563|   292k|JanetBinding janet_binding_from_entry(Janet entry) {
34564|   292k|    JanetTable *entry_table;
34565|   292k|    JanetBinding binding = {
34566|   292k|        JANET_BINDING_NONE,
34567|   292k|        janet_wrap_nil(),
  ------------------
  |  |  826|   292k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|   292k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   292k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   292k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34568|   292k|        JANET_BINDING_DEP_NONE
34569|   292k|    };
34570|       |
34571|       |    /* Check environment for entry */
34572|   292k|    if (!janet_checktype(entry, JANET_TABLE))
  ------------------
  |  |  801|   292k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 292k]
  |  |  ------------------
  |  |  802|   292k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   292k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   292k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   292k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   292k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   292k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (34572:9): [True: 23.5k, False: 268k]
  ------------------
34573|  23.5k|        return binding;
34574|   268k|    entry_table = janet_unwrap_table(entry);
  ------------------
  |  |  856|   268k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
34575|       |
34576|   268k|    Janet deprecate = janet_table_get_keyword(entry_table, "deprecated");
34577|   268k|    int macro = janet_truthy(janet_table_get_keyword(entry_table, "macro"));
  ------------------
  |  |  813|   268k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|   537k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 268k]
  |  |  |  |  ------------------
  |  |  |  |  802|   537k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|   537k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|   268k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|   268k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|   268k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|   268k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 206k, False: 62.0k]
  |  |  ------------------
  |  |  814|   268k|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|   412k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 206k]
  |  |  |  |  ------------------
  |  |  |  |  802|   412k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|   412k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|   206k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|   206k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|   206k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|   206k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 0, False: 206k]
  |  |  |  Branch (814:47): [True: 206k, False: 0]
  |  |  ------------------
  ------------------
34578|   268k|    Janet value = janet_table_get_keyword(entry_table, "value");
34579|   268k|    Janet ref = janet_table_get_keyword(entry_table, "ref");
34580|       |
34581|   268k|    if (janet_checktype(deprecate, JANET_KEYWORD)) {
  ------------------
  |  |  801|   268k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 268k]
  |  |  |  Branch (801:6): [Folded, False: 268k]
  |  |  ------------------
  |  |  802|   268k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   268k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   268k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   268k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   268k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   268k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34582|      0|        JanetKeyword depkw = janet_unwrap_keyword(deprecate);
  ------------------
  |  |  860|      0|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
34583|      0|        if (!janet_cstrcmp(depkw, "relaxed")) {
  ------------------
  |  Branch (34583:13): [True: 0, False: 0]
  ------------------
34584|      0|            binding.deprecation = JANET_BINDING_DEP_RELAXED;
34585|      0|        } else if (!janet_cstrcmp(depkw, "normal")) {
  ------------------
  |  Branch (34585:20): [True: 0, False: 0]
  ------------------
34586|      0|            binding.deprecation = JANET_BINDING_DEP_NORMAL;
34587|      0|        } else if (!janet_cstrcmp(depkw, "strict")) {
  ------------------
  |  Branch (34587:20): [True: 0, False: 0]
  ------------------
34588|      0|            binding.deprecation = JANET_BINDING_DEP_STRICT;
34589|      0|        }
34590|   268k|    } else if (!janet_checktype(deprecate, JANET_NIL)) {
  ------------------
  |  |  801|   268k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 268k]
  |  |  ------------------
  |  |  802|   268k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   268k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   268k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   268k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   268k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   268k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (34590:16): [True: 0, False: 268k]
  ------------------
34591|      0|        binding.deprecation = JANET_BINDING_DEP_NORMAL;
34592|      0|    }
34593|       |
34594|   268k|    int ref_is_valid = janet_checktype(ref, JANET_ARRAY);
  ------------------
  |  |  801|   268k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 268k]
  |  |  ------------------
  |  |  802|   268k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   268k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   268k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   268k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   268k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   268k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34595|   268k|    int redef = ref_is_valid && janet_truthy(janet_table_get_keyword(entry_table, "redef"));
  ------------------
  |  |  813|   268k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|     70|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 35]
  |  |  |  |  ------------------
  |  |  |  |  802|     70|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|     70|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|     35|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|     35|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|     35|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|     35|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 0, False: 35]
  |  |  ------------------
  |  |  814|   268k|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 0, False: 0]
  |  |  |  Branch (814:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (34595:17): [True: 35, False: 268k]
  ------------------
34596|       |
34597|   268k|    if (macro) {
  ------------------
  |  Branch (34597:9): [True: 206k, False: 62.0k]
  ------------------
34598|   206k|        binding.value = redef ? ref : value;
  ------------------
  |  Branch (34598:25): [True: 0, False: 206k]
  ------------------
34599|   206k|        binding.type = redef ? JANET_BINDING_DYNAMIC_MACRO : JANET_BINDING_MACRO;
  ------------------
  |  Branch (34599:24): [True: 0, False: 206k]
  ------------------
34600|   206k|        return binding;
34601|   206k|    }
34602|       |
34603|  62.0k|    if (ref_is_valid) {
  ------------------
  |  Branch (34603:9): [True: 35, False: 61.9k]
  ------------------
34604|     35|        binding.value = ref;
34605|     35|        binding.type = redef ? JANET_BINDING_DYNAMIC_DEF : JANET_BINDING_VAR;
  ------------------
  |  Branch (34605:24): [True: 0, False: 35]
  ------------------
34606|  61.9k|    } else {
34607|  61.9k|        binding.value = value;
34608|  61.9k|        binding.type = JANET_BINDING_DEF;
34609|  61.9k|    }
34610|       |
34611|  62.0k|    return binding;
34612|   268k|}
janet_text_substitution:
34643|    462|    JanetArray *extra_argv) {
34644|    462|    int32_t extra_argc = extra_argv == NULL ? 0 : extra_argv->count;
  ------------------
  |  Branch (34644:26): [True: 23, False: 439]
  ------------------
34645|    462|    JanetType type = janet_type(*subst);
  ------------------
  |  |  790|    462|    (isnan((x).number) \
  |  |  791|    462|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|    462|        : JANET_NUMBER)
  ------------------
  |  Branch (34645:22): [True: 458, False: 4]
  ------------------
34646|    462|    switch (type) {
34647|     79|        case JANET_FUNCTION:
  ------------------
  |  Branch (34647:9): [True: 79, False: 383]
  ------------------
34648|     79|        case JANET_CFUNCTION: {
  ------------------
  |  Branch (34648:9): [True: 0, False: 462]
  ------------------
34649|     79|            int32_t argc = 1 + extra_argc;
34650|     79|            Janet *argv = janet_tuple_begin(argc);
34651|     79|            argv[0] = janet_stringv(bytes, len);
  ------------------
  |  | 1817|     79|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  843|     79|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|     79|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|     79|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|     79|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34652|    252|            for (int32_t i = 0; i < extra_argc; i++) {
  ------------------
  |  Branch (34652:33): [True: 173, False: 79]
  ------------------
34653|    173|                argv[i + 1] = extra_argv->data[i];
34654|    173|            }
34655|     79|            janet_tuple_end(argv);
34656|     79|            if (type == JANET_FUNCTION) {
  ------------------
  |  Branch (34656:17): [True: 79, False: 0]
  ------------------
34657|     79|                return to_byte_view(janet_call(janet_unwrap_function(*subst), argc, argv));
  ------------------
  |  |  863|     79|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
34658|     79|            } else {
34659|      0|                return to_byte_view(janet_unwrap_cfunction(*subst)(argc, argv));
  ------------------
  |  |  864|      0|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
34660|      0|            }
34661|     79|        }
34662|    383|        default:
  ------------------
  |  Branch (34662:9): [True: 383, False: 79]
  ------------------
34663|    383|            return memoize_byte_view(subst);
34664|    462|    }
34665|    462|}
janet_resolve_ext:
34667|   292k|JanetBinding janet_resolve_ext(JanetTable *env, const uint8_t *sym) {
34668|   292k|    Janet entry = janet_table_get(env, janet_wrap_symbol(sym));
  ------------------
  |  |  844|   292k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  823|   292k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   292k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   292k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34669|   292k|    return janet_binding_from_entry(entry);
34670|   292k|}
janet_resolve:
34672|   176k|JanetBindingType janet_resolve(JanetTable *env, const uint8_t *sym, Janet *out) {
34673|   176k|    JanetBinding binding = janet_resolve_ext(env, sym);
34674|   176k|    if (binding.type == JANET_BINDING_DYNAMIC_DEF || binding.type == JANET_BINDING_DYNAMIC_MACRO) {
  ------------------
  |  Branch (34674:9): [True: 0, False: 176k]
  |  Branch (34674:54): [True: 0, False: 176k]
  ------------------
34675|      0|        *out = janet_array_peek(janet_unwrap_array(binding.value));
  ------------------
  |  |  855|      0|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
34676|   176k|    } else {
34677|   176k|        *out = binding.value;
34678|   176k|    }
34679|   176k|    return binding.type;
34680|   176k|}
janet_indexed_view:
34692|  40.7M|int janet_indexed_view(Janet seq, const Janet **data, int32_t *len) {
34693|  40.7M|    if (janet_checktype(seq, JANET_ARRAY)) {
  ------------------
  |  |  801|  40.7M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 12.3M, False: 28.3M]
  |  |  |  Branch (801:6): [Folded, False: 40.7M]
  |  |  ------------------
  |  |  802|  40.7M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  40.7M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  40.7M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  40.7M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  40.7M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  40.7M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34694|  12.3M|        *data = janet_unwrap_array(seq)->data;
  ------------------
  |  |  855|  12.3M|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
34695|  12.3M|        *len = janet_unwrap_array(seq)->count;
  ------------------
  |  |  855|  12.3M|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
34696|  12.3M|        return 1;
34697|  28.3M|    } else if (janet_checktype(seq, JANET_TUPLE)) {
  ------------------
  |  |  801|  28.3M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 28.3M, False: 83]
  |  |  |  Branch (801:6): [Folded, False: 28.3M]
  |  |  ------------------
  |  |  802|  28.3M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  28.3M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  28.3M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  28.3M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  28.3M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  28.3M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34698|  28.3M|        *data = janet_unwrap_tuple(seq);
  ------------------
  |  |  853|  28.3M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
34699|  28.3M|        *len = janet_tuple_length(janet_unwrap_tuple(seq));
  ------------------
  |  | 1792|  28.3M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|  28.3M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
34700|  28.3M|        return 1;
34701|  28.3M|    }
34702|     83|    return 0;
34703|  40.7M|}
janet_bytes_view:
34707|  21.2M|int janet_bytes_view(Janet str, const uint8_t **data, int32_t *len) {
34708|  21.2M|    JanetType t = janet_type(str);
  ------------------
  |  |  790|  21.2M|    (isnan((x).number) \
  |  |  791|  21.2M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  21.2M|        : JANET_NUMBER)
  ------------------
  |  Branch (34708:19): [True: 21.2M, False: 42]
  ------------------
34709|  21.2M|    if (t == JANET_STRING || t == JANET_SYMBOL || t == JANET_KEYWORD) {
  ------------------
  |  Branch (34709:9): [True: 236k, False: 21.0M]
  |  Branch (34709:30): [True: 20.9M, False: 52.6k]
  |  Branch (34709:51): [True: 3.68k, False: 48.9k]
  ------------------
34710|  21.2M|        *data = janet_unwrap_string(str);
  ------------------
  |  |  858|  21.2M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
34711|  21.2M|        *len = janet_string_length(janet_unwrap_string(str));
  ------------------
  |  | 1803|  21.2M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|  21.2M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
34712|  21.2M|        return 1;
34713|  21.2M|    } else if (t == JANET_BUFFER) {
  ------------------
  |  Branch (34713:16): [True: 46.9k, False: 2.00k]
  ------------------
34714|  46.9k|        *data = janet_unwrap_buffer(str)->data;
  ------------------
  |  |  857|  46.9k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
34715|  46.9k|        *len = janet_unwrap_buffer(str)->count;
  ------------------
  |  |  857|  46.9k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
34716|  46.9k|        return 1;
34717|  46.9k|    } else if (t == JANET_ABSTRACT) {
  ------------------
  |  Branch (34717:16): [True: 22, False: 1.98k]
  ------------------
34718|     22|        void *abst = janet_unwrap_abstract(str);
  ------------------
  |  |  861|     22|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
34719|     22|        const JanetAbstractType *atype = janet_abstract_type(abst);
  ------------------
  |  | 1889|     22|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|     22|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
34720|     22|        if (NULL == atype->bytes) {
  ------------------
  |  Branch (34720:13): [True: 22, False: 0]
  ------------------
34721|     22|            return 0;
34722|     22|        }
34723|      0|        JanetByteView view = atype->bytes(abst, janet_abstract_size(abst));
  ------------------
  |  | 1890|      0|#define janet_abstract_size(u) (janet_abstract_head(u)->size)
  |  |  ------------------
  |  |  |  | 1887|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
34724|      0|        *data = view.bytes;
34725|      0|        *len = view.len;
34726|      0|        return 1;
34727|     22|    }
34728|  1.98k|    return 0;
34729|  21.2M|}
janet_dictionary_view:
34734|  20.7k|int janet_dictionary_view(Janet tab, const JanetKV **data, int32_t *len, int32_t *cap) {
34735|  20.7k|    if (janet_checktype(tab, JANET_TABLE)) {
  ------------------
  |  |  801|  20.7k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 259, False: 20.4k]
  |  |  |  Branch (801:6): [Folded, False: 20.7k]
  |  |  ------------------
  |  |  802|  20.7k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  20.7k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  20.7k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  20.7k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  20.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  20.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34736|    259|        *data = janet_unwrap_table(tab)->data;
  ------------------
  |  |  856|    259|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
34737|    259|        *cap = janet_unwrap_table(tab)->capacity;
  ------------------
  |  |  856|    259|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
34738|    259|        *len = janet_unwrap_table(tab)->count;
  ------------------
  |  |  856|    259|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
34739|    259|        return 1;
34740|  20.4k|    } else if (janet_checktype(tab, JANET_STRUCT)) {
  ------------------
  |  |  801|  20.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 20.4k, False: 2]
  |  |  |  Branch (801:6): [Folded, False: 20.4k]
  |  |  ------------------
  |  |  802|  20.4k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  20.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  20.4k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  20.4k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  20.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  20.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34741|  20.4k|        *data = janet_unwrap_struct(tab);
  ------------------
  |  |  852|  20.4k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
34742|  20.4k|        *cap = janet_struct_capacity(janet_unwrap_struct(tab));
  ------------------
  |  | 1839|  20.4k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1836|  20.4k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34743|  20.4k|        *len = janet_struct_length(janet_unwrap_struct(tab));
  ------------------
  |  | 1838|  20.4k|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1836|  20.4k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
34744|  20.4k|        return 1;
34745|  20.4k|    }
34746|      2|    return 0;
34747|  20.7k|}
janet_checkint:
34749|   157M|int janet_checkint(Janet x) {
34750|   157M|    if (!janet_checktype(x, JANET_NUMBER))
  ------------------
  |  |  801|   157M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [True: 157M, Folded]
  |  |  ------------------
  |  |  802|   157M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|   157M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 154M, False: 2.53M]
  |  |  |  |  |  Branch (798:28): [True: 18.4E, False: 2.53M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   157M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|    336|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|    336|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    336|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    336|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (34750:9): [True: 2.53M, False: 154M]
  ------------------
34751|  2.53M|        return 0;
34752|   154M|    double dval = janet_unwrap_number(x);
  ------------------
  |  |  834|   154M|#define janet_unwrap_number(x) ((x).number)
  ------------------
34753|       |    return janet_checkintrange(dval);
  ------------------
  |  |  953|   154M|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  ------------------
  |  |  |  Branch (953:33): [True: 154M, False: 18.4E]
  |  |  |  Branch (953:53): [True: 154M, False: 2.17k]
  |  |  |  Branch (953:73): [True: 154M, False: 1.16k]
  |  |  ------------------
  ------------------
34754|   157M|}
janet_checksize:
34791|      5|int janet_checksize(Janet x) {
34792|      5|    if (!janet_checktype(x, JANET_NUMBER))
  ------------------
  |  |  801|      5|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [True: 5, Folded]
  |  |  ------------------
  |  |  802|      5|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      5|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 3, False: 2]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      5|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (34792:9): [True: 2, False: 3]
  ------------------
34793|      2|        return 0;
34794|      3|    double dval = janet_unwrap_number(x);
  ------------------
  |  |  834|      3|#define janet_unwrap_number(x) ((x).number)
  ------------------
34795|      3|    if (dval != (double)((size_t) dval)) return 0;
  ------------------
  |  Branch (34795:9): [True: 0, False: 3]
  ------------------
34796|       |#ifdef JANET_PLAN9
34797|       |    return dval <= SIZE_MAX;
34798|       |#else
34799|      3|    if (SIZE_MAX > JANET_INTMAX_INT64) {
  ------------------
  |  |  162|      3|#define JANET_INTMAX_INT64 9007199254740992
  ------------------
  |  Branch (34799:9): [True: 3, Folded]
  ------------------
34800|      3|        return dval <= JANET_INTMAX_INT64;
  ------------------
  |  |  162|      3|#define JANET_INTMAX_INT64 9007199254740992
  ------------------
34801|      3|    } else {
34802|       |        return dval <= SIZE_MAX;
34803|      0|    }
34804|      3|#endif
34805|      3|}
janet_sorted_keys:
34817|  3.27k|int32_t janet_sorted_keys(const JanetKV *dict, int32_t cap, int32_t *index_buffer) {
34818|       |
34819|       |    /* First, put populated indices into index_buffer */
34820|  3.27k|    int32_t next_index = 0;
34821|  28.7k|    for (int32_t i = 0; i < cap; i++) {
  ------------------
  |  Branch (34821:25): [True: 25.4k, False: 3.27k]
  ------------------
34822|  25.4k|        if (!janet_checktype(dict[i].key, JANET_NIL)) {
  ------------------
  |  |  801|  25.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 25.4k]
  |  |  ------------------
  |  |  802|  25.4k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  25.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  25.4k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  25.4k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  25.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  25.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (34822:13): [True: 8.29k, False: 17.1k]
  ------------------
34823|  8.29k|            index_buffer[next_index++] = i;
34824|  8.29k|        }
34825|  25.4k|    }
34826|       |
34827|       |    /* Next, sort those (simple insertion sort here for now) */
34828|  8.42k|    for (int32_t i = 1; i < next_index; i++) {
  ------------------
  |  Branch (34828:25): [True: 5.14k, False: 3.27k]
  ------------------
34829|  5.14k|        int32_t index_to_insert = index_buffer[i];
34830|  5.14k|        Janet lhs = dict[index_to_insert].key;
34831|  26.9k|        for (int32_t j = i - 1; j >= 0; j--) {
  ------------------
  |  Branch (34831:33): [True: 23.7k, False: 3.17k]
  ------------------
34832|  23.7k|            index_buffer[j + 1] = index_buffer[j];
34833|  23.7k|            Janet rhs = dict[index_buffer[j]].key;
34834|  23.7k|            if (janet_compare(lhs, rhs) >= 0) {
  ------------------
  |  Branch (34834:17): [True: 1.96k, False: 21.7k]
  ------------------
34835|  1.96k|                index_buffer[j + 1] = index_to_insert;
34836|  1.96k|                break;
34837|  21.7k|            } else if (j == 0) {
  ------------------
  |  Branch (34837:24): [True: 3.17k, False: 18.6k]
  ------------------
34838|  3.17k|                index_buffer[0] = index_to_insert;
34839|  3.17k|            }
34840|  23.7k|        }
34841|  5.14k|    }
34842|       |
34843|       |    /* Return number of indices found */
34844|  3.27k|    return next_index;
34845|       |
34846|  3.27k|}
janet_gettime:
34905|  4.15k|int janet_gettime(struct timespec *spec, enum JanetTimeSource source) {
34906|  4.15k|    clockid_t cid = CLOCK_REALTIME;
34907|  4.15k|    if (source == JANET_TIME_REALTIME) {
  ------------------
  |  Branch (34907:9): [True: 1, False: 4.15k]
  ------------------
34908|      1|        cid = CLOCK_REALTIME;
34909|  4.15k|    } else if (source == JANET_TIME_MONOTONIC) {
  ------------------
  |  Branch (34909:16): [True: 4.15k, False: 0]
  ------------------
34910|  4.15k|        cid = CLOCK_MONOTONIC;
34911|  4.15k|    } else if (source == JANET_TIME_CPUTIME) {
  ------------------
  |  Branch (34911:16): [True: 0, False: 0]
  ------------------
34912|       |        cid = CLOCK_PROCESS_CPUTIME_ID;
34913|      0|    }
34914|  4.15k|    return clock_gettime(cid, spec);
34915|  4.15k|}
janet_strerror:
34920|     31|const char *janet_strerror(int e) {
34921|       |#ifdef JANET_WINDOWS
34922|       |    /* Microsoft strerror seems sane here and is thread safe by default */
34923|       |    return strerror(e);
34924|       |#elif defined(__GLIBC__)
34925|       |    /* See https://linux.die.net/man/3/strerror_r */
34926|     31|    return strerror_r(e, janet_vm.strerror_buf, sizeof(janet_vm.strerror_buf));
34927|       |#else
34928|       |    strerror_r(e, janet_vm.strerror_buf, sizeof(janet_vm.strerror_buf));
34929|       |    return janet_vm.strerror_buf;
34930|       |#endif
34931|     31|}
janet_cryptorand:
34939|      7|int janet_cryptorand(uint8_t *out, size_t n) {
34940|      7|#ifndef JANET_NO_CRYPTORAND
34941|       |#ifdef JANET_WINDOWS
34942|       |    for (size_t i = 0; i < n; i += sizeof(unsigned int)) {
34943|       |        unsigned int v;
34944|       |        if (rand_s(&v))
34945|       |            return -1;
34946|       |        for (int32_t j = 0; (j < (int32_t) sizeof(unsigned int)) && (i + j < n); j++) {
34947|       |            out[i + j] = v & 0xff;
34948|       |            v = v >> 8;
34949|       |        }
34950|       |    }
34951|       |    return 0;
34952|       |#elif defined(JANET_BSD) || defined(MAC_OS_X_VERSION_10_7)
34953|       |    arc4random_buf(out, n);
34954|       |    return 0;
34955|       |#else
34956|       |    /* We should be able to call getrandom on linux, but it doesn't seem
34957|       |       to be uniformly supported on linux distros.
34958|       |       On Mac, arc4random_buf wasn't available on until 10.7.
34959|       |       In these cases, use this fallback path for now... */
34960|      7|    int rc;
34961|      7|    int randfd;
34962|      7|    RETRY_EINTR(randfd, open("/dev/urandom", O_RDONLY | O_CLOEXEC));
  ------------------
  |  |  526|      7|#define RETRY_EINTR(RC, CALL) do { (RC) = CALL; } while((RC) < 0 && errno == EINTR)
  |  |  ------------------
  |  |  |  Branch (526:57): [True: 0, False: 7]
  |  |  |  Branch (526:69): [True: 0, False: 0]
  |  |  ------------------
  ------------------
34963|      7|    if (randfd < 0)
  ------------------
  |  Branch (34963:9): [True: 0, False: 7]
  ------------------
34964|      0|        return -1;
34965|     13|    while (n > 0) {
  ------------------
  |  Branch (34965:12): [True: 6, False: 7]
  ------------------
34966|      6|        ssize_t nread;
34967|      6|        RETRY_EINTR(nread, read(randfd, out, n));
  ------------------
  |  |  526|      6|#define RETRY_EINTR(RC, CALL) do { (RC) = CALL; } while((RC) < 0 && errno == EINTR)
  |  |  ------------------
  |  |  |  Branch (526:57): [True: 0, False: 6]
  |  |  |  Branch (526:69): [True: 0, False: 0]
  |  |  ------------------
  ------------------
34968|      6|        if (nread <= 0) {
  ------------------
  |  Branch (34968:13): [True: 0, False: 6]
  ------------------
34969|      0|            RETRY_EINTR(rc, close(randfd));
  ------------------
  |  |  526|      0|#define RETRY_EINTR(RC, CALL) do { (RC) = CALL; } while((RC) < 0 && errno == EINTR)
  |  |  ------------------
  |  |  |  Branch (526:57): [True: 0, False: 0]
  |  |  |  Branch (526:69): [True: 0, False: 0]
  |  |  ------------------
  ------------------
34970|      0|            return -1;
34971|      0|        }
34972|      6|        out += nread;
34973|      6|        n -= nread;
34974|      6|    }
34975|      7|    RETRY_EINTR(rc, close(randfd));
  ------------------
  |  |  526|      7|#define RETRY_EINTR(RC, CALL) do { (RC) = CALL; } while((RC) < 0 && errno == EINTR)
  |  |  ------------------
  |  |  |  Branch (526:57): [True: 0, False: 7]
  |  |  |  Branch (526:69): [True: 0, False: 0]
  |  |  ------------------
  ------------------
34976|      7|    return 0;
34977|      7|#endif
34978|       |#else
34979|       |    (void) out;
34980|       |    (void) n;
34981|       |    return -1;
34982|       |#endif
34983|      7|}
janet_next_impl:
35211|  42.6M|Janet janet_next_impl(Janet ds, Janet key, int is_interpreter) {
35212|  42.6M|    JanetType t = janet_type(ds);
  ------------------
  |  |  790|  42.6M|    (isnan((x).number) \
  |  |  791|  42.6M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  42.6M|        : JANET_NUMBER)
  ------------------
  |  Branch (35212:19): [True: 42.6M, False: 28]
  ------------------
35213|  42.6M|    switch (t) {
35214|    103|        default:
  ------------------
  |  Branch (35214:9): [True: 103, False: 42.6M]
  ------------------
35215|    103|            janet_panicf("expected iterable type, got %v", ds);
35216|   361k|        case JANET_TABLE:
  ------------------
  |  Branch (35216:9): [True: 361k, False: 42.2M]
  ------------------
35217|   601k|        case JANET_STRUCT: {
  ------------------
  |  Branch (35217:9): [True: 240k, False: 42.3M]
  ------------------
35218|   601k|            const JanetKV *start;
35219|   601k|            int32_t cap;
35220|   601k|            if (t == JANET_TABLE) {
  ------------------
  |  Branch (35220:17): [True: 361k, False: 240k]
  ------------------
35221|   361k|                JanetTable *tab = janet_unwrap_table(ds);
  ------------------
  |  |  856|   361k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
35222|   361k|                cap = tab->capacity;
35223|   361k|                start = tab->data;
35224|   361k|            } else {
35225|   240k|                JanetStruct st = janet_unwrap_struct(ds);
  ------------------
  |  |  852|   240k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
35226|   240k|                cap = janet_struct_capacity(st);
  ------------------
  |  | 1839|   240k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1836|   240k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
35227|   240k|                start = st;
35228|   240k|            }
35229|   601k|            const JanetKV *end = start + cap;
35230|   601k|            const JanetKV *kv = janet_checktype(key, JANET_NIL)
  ------------------
  |  |  801|   601k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 245k, False: 356k]
  |  |  |  Branch (801:6): [Folded, False: 601k]
  |  |  ------------------
  |  |  802|   601k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   601k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   601k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   601k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   601k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   601k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35231|   601k|                                ? start
35232|   601k|                                : janet_dict_find(start, cap, key) + 1;
35233|  1.50M|            while (kv < end) {
  ------------------
  |  Branch (35233:20): [True: 1.27M, False: 226k]
  ------------------
35234|  1.27M|                if (!janet_checktype(kv->key, JANET_NIL)) return kv->key;
  ------------------
  |  |  801|  1.27M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 1.27M]
  |  |  ------------------
  |  |  802|  1.27M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  1.27M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  1.27M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  1.27M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.27M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.27M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35234:21): [True: 375k, False: 898k]
  ------------------
35235|   898k|                kv++;
35236|   898k|            }
35237|   226k|            break;
35238|   601k|        }
35239|   226k|        case JANET_STRING:
  ------------------
  |  Branch (35239:9): [True: 24.1k, False: 42.6M]
  ------------------
35240|  24.4k|        case JANET_KEYWORD:
  ------------------
  |  Branch (35240:9): [True: 305, False: 42.6M]
  ------------------
35241|   165k|        case JANET_SYMBOL:
  ------------------
  |  Branch (35241:9): [True: 141k, False: 42.4M]
  ------------------
35242|   183k|        case JANET_BUFFER:
  ------------------
  |  Branch (35242:9): [True: 17.9k, False: 42.6M]
  ------------------
35243|   910k|        case JANET_ARRAY:
  ------------------
  |  Branch (35243:9): [True: 726k, False: 41.9M]
  ------------------
35244|  42.0M|        case JANET_TUPLE: {
  ------------------
  |  Branch (35244:9): [True: 41.1M, False: 1.51M]
  ------------------
35245|  42.0M|            int32_t i;
35246|  42.0M|            if (janet_checktype(key, JANET_NIL)) {
  ------------------
  |  |  801|  42.0M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 17.3M, False: 24.6M]
  |  |  |  Branch (801:6): [Folded, False: 42.0M]
  |  |  ------------------
  |  |  802|  42.0M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  42.0M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  42.0M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  42.0M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  42.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  42.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35247|  17.3M|                i = 0;
35248|  24.6M|            } else if (janet_checkint(key)) {
  ------------------
  |  Branch (35248:24): [True: 24.6M, False: 0]
  ------------------
35249|  24.6M|                i = janet_unwrap_integer(key) + 1;
  ------------------
  |  |  957|  24.6M|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  834|  24.6M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
35250|  24.6M|            } else {
35251|      0|                break;
35252|      0|            }
35253|  42.0M|            int32_t len;
35254|  42.0M|            if (t == JANET_BUFFER) {
  ------------------
  |  Branch (35254:17): [True: 17.9k, False: 42.0M]
  ------------------
35255|  17.9k|                len = janet_unwrap_buffer(ds)->count;
  ------------------
  |  |  857|  17.9k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
35256|  42.0M|            } else if (t == JANET_ARRAY) {
  ------------------
  |  Branch (35256:24): [True: 726k, False: 41.2M]
  ------------------
35257|   726k|                len = janet_unwrap_array(ds)->count;
  ------------------
  |  |  855|   726k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
35258|  41.2M|            } else if (t == JANET_TUPLE) {
  ------------------
  |  Branch (35258:24): [True: 41.1M, False: 165k]
  ------------------
35259|  41.1M|                len = janet_tuple_length(janet_unwrap_tuple(ds));
  ------------------
  |  | 1792|  41.1M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|  41.1M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
35260|  41.1M|            } else {
35261|   165k|                len = janet_string_length(janet_unwrap_string(ds));
  ------------------
  |  | 1803|   165k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|   165k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
35262|   165k|            }
35263|  42.0M|            if (i < len && i >= 0) {
  ------------------
  |  Branch (35263:17): [True: 30.1M, False: 11.9M]
  |  Branch (35263:28): [True: 30.1M, False: 0]
  ------------------
35264|  30.1M|                return janet_wrap_integer(i);
  ------------------
  |  |  958|  30.1M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|  30.1M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35265|  30.1M|            }
35266|  11.9M|            break;
35267|  42.0M|        }
35268|  11.9M|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35268:9): [True: 1.70k, False: 42.6M]
  ------------------
35269|  1.70k|            JanetAbstract abst = janet_unwrap_abstract(ds);
  ------------------
  |  |  861|  1.70k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
35270|  1.70k|            const JanetAbstractType *at = janet_abstract_type(abst);
  ------------------
  |  | 1889|  1.70k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|  1.70k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35271|  1.70k|            if (NULL == at->next) break;
  ------------------
  |  Branch (35271:17): [True: 0, False: 1.70k]
  ------------------
35272|  1.70k|            return at->next(abst, key);
35273|  1.70k|        }
35274|      3|        case JANET_FIBER: {
  ------------------
  |  Branch (35274:9): [True: 3, False: 42.6M]
  ------------------
35275|      3|            JanetFiber *child = janet_unwrap_fiber(ds);
  ------------------
  |  |  854|      3|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
35276|      3|            Janet retreg;
35277|      3|            JanetFiberStatus status = janet_fiber_status(child);
35278|      3|            if (status == JANET_STATUS_ALIVE ||
  ------------------
  |  Branch (35278:17): [True: 0, False: 3]
  ------------------
35279|      3|                    status == JANET_STATUS_DEAD ||
  ------------------
  |  Branch (35279:21): [True: 0, False: 3]
  ------------------
35280|      3|                    status == JANET_STATUS_ERROR ||
  ------------------
  |  Branch (35280:21): [True: 0, False: 3]
  ------------------
35281|      3|                    status == JANET_STATUS_USER0 ||
  ------------------
  |  Branch (35281:21): [True: 0, False: 3]
  ------------------
35282|      3|                    status == JANET_STATUS_USER1 ||
  ------------------
  |  Branch (35282:21): [True: 0, False: 3]
  ------------------
35283|      3|                    status == JANET_STATUS_USER2 ||
  ------------------
  |  Branch (35283:21): [True: 0, False: 3]
  ------------------
35284|      3|                    status == JANET_STATUS_USER3 ||
  ------------------
  |  Branch (35284:21): [True: 0, False: 3]
  ------------------
35285|      3|                    status == JANET_STATUS_USER4) {
  ------------------
  |  Branch (35285:21): [True: 0, False: 3]
  ------------------
35286|      0|                return janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35287|      0|            }
35288|      3|            janet_vm.fiber->child = child;
35289|      3|            JanetSignal sig = janet_continue(child, janet_wrap_nil(), &retreg);
  ------------------
  |  |  826|      3|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      3|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35290|      3|            if (sig != JANET_SIGNAL_OK && !(child->flags & (1 << sig))) {
  ------------------
  |  Branch (35290:17): [True: 0, False: 3]
  |  Branch (35290:43): [True: 0, False: 0]
  ------------------
35291|      0|                if (is_interpreter) {
  ------------------
  |  Branch (35291:21): [True: 0, False: 0]
  ------------------
35292|      0|                    janet_signalv(sig, retreg);
35293|      0|                } else {
35294|      0|                    janet_vm.fiber->child = NULL;
35295|      0|                    janet_panicv(retreg);
35296|      0|                }
35297|      0|            }
35298|      3|            janet_vm.fiber->child = NULL;
35299|      3|            if (sig == JANET_SIGNAL_OK ||
  ------------------
  |  Branch (35299:17): [True: 3, False: 0]
  ------------------
35300|      0|                    sig == JANET_SIGNAL_ERROR ||
  ------------------
  |  Branch (35300:21): [True: 0, False: 0]
  ------------------
35301|      0|                    sig == JANET_SIGNAL_USER0 ||
  ------------------
  |  Branch (35301:21): [True: 0, False: 0]
  ------------------
35302|      0|                    sig == JANET_SIGNAL_USER1 ||
  ------------------
  |  Branch (35302:21): [True: 0, False: 0]
  ------------------
35303|      0|                    sig == JANET_SIGNAL_USER2 ||
  ------------------
  |  Branch (35303:21): [True: 0, False: 0]
  ------------------
35304|      0|                    sig == JANET_SIGNAL_USER3 ||
  ------------------
  |  Branch (35304:21): [True: 0, False: 0]
  ------------------
35305|      3|                    sig == JANET_SIGNAL_USER4) {
  ------------------
  |  Branch (35305:21): [True: 0, False: 0]
  ------------------
35306|       |                /* Fiber cannot be resumed, so discard last value. */
35307|      3|                return janet_wrap_nil();
  ------------------
  |  |  826|      3|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      3|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35308|      3|            } else {
35309|      0|                return janet_wrap_integer(0);
  ------------------
  |  |  958|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35310|      0|            }
35311|      3|        }
35312|  42.6M|    }
35313|  12.1M|    return janet_wrap_nil();
  ------------------
  |  |  826|  12.1M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  12.1M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  12.1M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  12.1M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35314|  42.6M|}
janet_equals:
35330|  5.01G|int janet_equals(Janet x, Janet y) {
35331|  5.01G|    janet_vm.traversal = janet_vm.traversal_base;
35332|  5.01G|    do {
35333|  5.01G|        if (janet_type(x) != janet_type(y)) return 0;
  ------------------
  |  |  790|  5.01G|    (isnan((x).number) \
  |  |  791|  5.01G|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  5.01G|        : JANET_NUMBER)
  ------------------
                      if (janet_type(x) != janet_type(y)) return 0;
  ------------------
  |  |  790|  5.01G|    (isnan((x).number) \
  |  |  791|  5.01G|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  5.01G|        : JANET_NUMBER)
  ------------------
  |  Branch (35333:13): [True: 5.00G, False: 11.3M]
  |  Branch (35333:13): [True: 123M, False: 4.88G]
  |  Branch (35333:30): [True: 4.99G, False: 16.7M]
  ------------------
35334|  4.88G|        switch (janet_type(x)) {
  ------------------
  |  |  790|  4.88G|    (isnan((x).number) \
  |  |  791|  4.88G|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  4.88G|        : JANET_NUMBER)
  ------------------
  |  Branch (35334:17): [True: 4.87G, False: 11.2M]
  ------------------
35335|   393k|            case JANET_NIL:
  ------------------
  |  Branch (35335:13): [True: 393k, False: 4.88G]
  ------------------
35336|   393k|                break;
35337|  1.43k|            case JANET_BOOLEAN:
  ------------------
  |  Branch (35337:13): [True: 1.43k, False: 4.88G]
  ------------------
35338|  1.43k|                if (janet_unwrap_boolean(x) != janet_unwrap_boolean(y)) return 0;
  ------------------
  |  |  833|  1.43k|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
                              if (janet_unwrap_boolean(x) != janet_unwrap_boolean(y)) return 0;
  ------------------
  |  |  833|  1.43k|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
  |  Branch (35338:21): [True: 20, False: 1.41k]
  ------------------
35339|  1.41k|                break;
35340|  11.2M|            case JANET_NUMBER:
  ------------------
  |  Branch (35340:13): [True: 11.2M, False: 4.87G]
  ------------------
35341|  11.2M|                if (janet_unwrap_number(x) != janet_unwrap_number(y)) return 0;
  ------------------
  |  |  834|  11.2M|#define janet_unwrap_number(x) ((x).number)
  ------------------
                              if (janet_unwrap_number(x) != janet_unwrap_number(y)) return 0;
  ------------------
  |  |  834|  11.2M|#define janet_unwrap_number(x) ((x).number)
  ------------------
  |  Branch (35341:21): [True: 405k, False: 10.8M]
  ------------------
35342|  10.8M|                break;
35343|  10.8M|            case JANET_STRING:
  ------------------
  |  Branch (35343:13): [True: 1.22M, False: 4.88G]
  ------------------
35344|  1.22M|                if (!janet_string_equal(janet_unwrap_string(x), janet_unwrap_string(y))) return 0;
  ------------------
  |  |  858|  1.22M|#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;
  ------------------
  |  |  858|  1.22M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (35344:21): [True: 463k, False: 758k]
  ------------------
35345|   758k|                break;
35346|   758k|            case JANET_ABSTRACT:
  ------------------
  |  Branch (35346:13): [True: 8.91k, False: 4.88G]
  ------------------
35347|  8.91k|                if (janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y))) return 0;
  ------------------
  |  |  861|  8.91k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
                              if (janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y))) return 0;
  ------------------
  |  |  861|  8.91k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (35347:21): [True: 2.32k, False: 6.58k]
  ------------------
35348|  6.58k|                break;
35349|  4.87G|            default:
  ------------------
  |  Branch (35349:13): [True: 4.87G, False: 16.3M]
  ------------------
35350|  4.87G|                if (janet_unwrap_pointer(x) != janet_unwrap_pointer(y)) return 0;
  ------------------
  |  |  862|  4.87G|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
                              if (janet_unwrap_pointer(x) != janet_unwrap_pointer(y)) return 0;
  ------------------
  |  |  862|  4.87G|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (35350:21): [True: 4.73G, False: 137M]
  ------------------
35351|   137M|                break;
35352|   137M|            case JANET_TUPLE: {
  ------------------
  |  Branch (35352:13): [True: 3.53M, False: 4.88G]
  ------------------
35353|  3.53M|                const Janet *t1 = janet_unwrap_tuple(x);
  ------------------
  |  |  853|  3.53M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
35354|  3.53M|                const Janet *t2 = janet_unwrap_tuple(y);
  ------------------
  |  |  853|  3.53M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
35355|  3.53M|                if (t1 == t2) break;
  ------------------
  |  Branch (35355:21): [True: 588k, False: 2.94M]
  ------------------
35356|  2.94M|                if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(t1) ^ janet_tuple_flag(t2))) return 0;
  ------------------
  |  | 1788|  2.94M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
                              if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(t1) ^ janet_tuple_flag(t2))) return 0;
  ------------------
  |  | 1796|  2.94M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1790|  2.94M|#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;
  ------------------
  |  | 1796|  2.94M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1790|  2.94M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35356:21): [True: 12.3k, False: 2.93M]
  ------------------
35357|  2.93M|                if (janet_tuple_hash(t1) != janet_tuple_hash(t2)) return 0;
  ------------------
  |  | 1793|  2.93M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1790|  2.93M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_tuple_hash(t1) != janet_tuple_hash(t2)) return 0;
  ------------------
  |  | 1793|  2.93M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1790|  2.93M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35357:21): [True: 2.65M, False: 275k]
  ------------------
35358|   275k|                if (janet_tuple_length(t1) != janet_tuple_length(t2)) return 0;
  ------------------
  |  | 1792|   275k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|   275k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_tuple_length(t1) != janet_tuple_length(t2)) return 0;
  ------------------
  |  | 1792|   275k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|   275k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35358:21): [True: 0, False: 275k]
  ------------------
35359|   275k|                push_traversal_node(janet_tuple_head(t1), janet_tuple_head(t2), 0);
  ------------------
  |  | 1790|   275k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
                              push_traversal_node(janet_tuple_head(t1), janet_tuple_head(t2), 0);
  ------------------
  |  | 1790|   275k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
35360|   275k|                break;
35361|   275k|            }
35362|      0|            break;
35363|  18.4k|            case JANET_STRUCT: {
  ------------------
  |  Branch (35363:13): [True: 18.4k, False: 4.88G]
  ------------------
35364|  18.4k|                const JanetKV *s1 = janet_unwrap_struct(x);
  ------------------
  |  |  852|  18.4k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
35365|  18.4k|                const JanetKV *s2 = janet_unwrap_struct(y);
  ------------------
  |  |  852|  18.4k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
35366|  18.4k|                if (s1 == s2) break;
  ------------------
  |  Branch (35366:21): [True: 12.7k, False: 5.63k]
  ------------------
35367|  5.63k|                if (janet_struct_hash(s1) != janet_struct_hash(s2)) return 0;
  ------------------
  |  | 1840|  5.63k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1836|  5.63k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_struct_hash(s1) != janet_struct_hash(s2)) return 0;
  ------------------
  |  | 1840|  5.63k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1836|  5.63k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35367:21): [True: 176, False: 5.46k]
  ------------------
35368|  5.46k|                if (janet_struct_length(s1) != janet_struct_length(s2)) return 0;
  ------------------
  |  | 1838|  5.46k|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1836|  5.46k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                              if (janet_struct_length(s1) != janet_struct_length(s2)) return 0;
  ------------------
  |  | 1838|  5.46k|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1836|  5.46k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35368:21): [True: 0, False: 5.46k]
  ------------------
35369|  5.46k|                if (janet_struct_proto(s1) && !janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1841|  10.9k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1836|  5.46k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1841:31): [True: 0, False: 5.46k]
  |  |  ------------------
  ------------------
                              if (janet_struct_proto(s1) && !janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1841|      0|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1836|      0|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35369:47): [True: 0, False: 0]
  ------------------
35370|  5.46k|                if (!janet_struct_proto(s1) && janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1841|  10.9k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1836|  5.46k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                              if (!janet_struct_proto(s1) && janet_struct_proto(s2)) return 0;
  ------------------
  |  | 1841|  5.46k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1836|  5.46k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1841:31): [True: 0, False: 5.46k]
  |  |  ------------------
  ------------------
  |  Branch (35370:21): [True: 5.46k, False: 0]
  ------------------
35371|  5.46k|                push_traversal_node(janet_struct_head(s1), janet_struct_head(s2), 0);
  ------------------
  |  | 1836|  5.46k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
                              push_traversal_node(janet_struct_head(s1), janet_struct_head(s2), 0);
  ------------------
  |  | 1836|  5.46k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
35372|  5.46k|                break;
35373|  5.46k|            }
35374|      0|            break;
35375|  4.88G|        }
35376|  4.88G|    } while (!traversal_next(&x, &y));
  ------------------
  |  Branch (35376:14): [True: 591k, False: 149M]
  ------------------
35377|   149M|    return 1;
35378|  5.01G|}
janet_hash:
35390|  1.08G|int32_t janet_hash(Janet x) {
35391|  1.08G|    int32_t hash = 0;
35392|  1.08G|    switch (janet_type(x)) {
  ------------------
  |  |  790|  1.08G|    (isnan((x).number) \
  |  |  791|  1.08G|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  1.08G|        : JANET_NUMBER)
  ------------------
  |  Branch (35392:13): [True: 1.05G, False: 31.0M]
  ------------------
35393|   437M|        case JANET_NIL:
  ------------------
  |  Branch (35393:9): [True: 437M, False: 643M]
  ------------------
35394|   437M|            hash = 0;
35395|   437M|            break;
35396|  55.4k|        case JANET_BOOLEAN:
  ------------------
  |  Branch (35396:9): [True: 55.4k, False: 1.08G]
  ------------------
35397|  55.4k|            hash = janet_unwrap_boolean(x);
  ------------------
  |  |  833|  55.4k|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
35398|  55.4k|            break;
35399|  9.16M|        case JANET_STRING:
  ------------------
  |  Branch (35399:9): [True: 9.16M, False: 1.07G]
  ------------------
35400|   345M|        case JANET_SYMBOL:
  ------------------
  |  Branch (35400:9): [True: 336M, False: 744M]
  ------------------
35401|   427M|        case JANET_KEYWORD:
  ------------------
  |  Branch (35401:9): [True: 81.5M, False: 999M]
  ------------------
35402|   427M|            hash = janet_string_hash(janet_unwrap_string(x));
  ------------------
  |  | 1804|   427M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  ------------------
  |  |  |  | 1802|   427M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
35403|   427M|            break;
35404|  50.5M|        case JANET_TUPLE:
  ------------------
  |  Branch (35404:9): [True: 50.5M, False: 1.03G]
  ------------------
35405|  50.5M|            hash = janet_tuple_hash(janet_unwrap_tuple(x));
  ------------------
  |  | 1793|  50.5M|#define janet_tuple_hash(t) (janet_tuple_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1790|  50.5M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
35406|  50.5M|            uint32_t inc = (janet_tuple_flag(janet_unwrap_tuple(x)) & JANET_TUPLE_FLAG_BRACKETCTOR) ? 1 : 0;
  ------------------
  |  | 1796|  50.5M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1790|  50.5M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                          uint32_t inc = (janet_tuple_flag(janet_unwrap_tuple(x)) & JANET_TUPLE_FLAG_BRACKETCTOR) ? 1 : 0;
  ------------------
  |  | 1788|  50.5M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (35406:28): [True: 19.3M, False: 31.2M]
  ------------------
35407|  50.5M|            hash = (int32_t)((uint32_t)hash + inc); /* avoid overflow undefined behavior */
35408|  50.5M|            break;
35409|   127k|        case JANET_STRUCT:
  ------------------
  |  Branch (35409:9): [True: 127k, False: 1.08G]
  ------------------
35410|   127k|            hash = janet_struct_hash(janet_unwrap_struct(x));
  ------------------
  |  | 1840|   127k|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1836|   127k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
35411|   127k|            break;
35412|  31.0M|        case JANET_NUMBER: {
  ------------------
  |  Branch (35412:9): [True: 31.0M, False: 1.05G]
  ------------------
35413|  31.0M|            union {
35414|  31.0M|                double d;
35415|  31.0M|                uint64_t u;
35416|  31.0M|            } as;
35417|  31.0M|            as.d = janet_unwrap_number(x);
  ------------------
  |  |  834|  31.0M|#define janet_unwrap_number(x) ((x).number)
  ------------------
35418|  31.0M|            as.d += 0.0; /* normalize negative 0 */
35419|  31.0M|            as.u = murmur64(as.u);
35420|  31.0M|            uint32_t hi = (uint32_t)(as.u >> 32);
35421|  31.0M|            hash = (int32_t)hi;
35422|  31.0M|            break;
35423|   345M|        }
35424|  86.2k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35424:9): [True: 86.2k, False: 1.08G]
  ------------------
35425|  86.2k|            JanetAbstract xx = janet_unwrap_abstract(x);
  ------------------
  |  |  861|  86.2k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
35426|  86.2k|            const JanetAbstractType *at = janet_abstract_type(xx);
  ------------------
  |  | 1889|  86.2k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|  86.2k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35427|  86.2k|            if (at->hash != NULL) {
  ------------------
  |  Branch (35427:17): [True: 10.9k, False: 75.2k]
  ------------------
35428|  10.9k|                hash = at->hash(xx, janet_abstract_size(xx));
  ------------------
  |  | 1890|  10.9k|#define janet_abstract_size(u) (janet_abstract_head(u)->size)
  |  |  ------------------
  |  |  |  | 1887|  10.9k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35429|  10.9k|                break;
35430|  10.9k|            }
35431|  86.2k|        }
35432|       |        /* fallthrough */
35433|   134M|        default:
  ------------------
  |  Branch (35433:9): [True: 134M, False: 946M]
  ------------------
35434|   134M|            if (sizeof(double) == sizeof(void *)) {
  ------------------
  |  Branch (35434:17): [True: 134M, Folded]
  ------------------
35435|       |                /* Assuming 8 byte pointer (8 byte aligned) */
35436|   134M|                uint64_t i = murmur64(janet_u64(x));
  ------------------
  |  |  783|   134M|#define janet_u64(x) ((x).u64)
  ------------------
35437|   134M|                hash = (int32_t)(i >> 32);
35438|  18.4E|            } else {
35439|       |                /* Assuming 4 byte pointer (or smaller) */
35440|  18.4E|                uintptr_t diff = (uintptr_t) janet_unwrap_pointer(x);
  ------------------
  |  |  862|  18.4E|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
35441|  18.4E|                uint32_t hilo = (uint32_t) diff * 2654435769u;
35442|  18.4E|                hash = (int32_t)((hilo << 16) | (hilo >> 16));
35443|  18.4E|            }
35444|   134M|            break;
35445|  1.08G|    }
35446|  1.08G|    return hash;
35447|  1.08G|}
janet_compare:
35452|   293k|int janet_compare(Janet x, Janet y) {
35453|   293k|    janet_vm.traversal = janet_vm.traversal_base;
35454|   293k|    int status;
35455|   383k|    do {
35456|   383k|        JanetType tx = janet_type(x);
  ------------------
  |  |  790|   383k|    (isnan((x).number) \
  |  |  791|   383k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|   383k|        : JANET_NUMBER)
  ------------------
  |  Branch (35456:24): [True: 380k, False: 2.99k]
  ------------------
35457|   383k|        JanetType ty = janet_type(y);
  ------------------
  |  |  790|   383k|    (isnan((x).number) \
  |  |  791|   383k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|   383k|        : JANET_NUMBER)
  ------------------
  |  Branch (35457:24): [True: 381k, False: 1.40k]
  ------------------
35458|   383k|        if (tx != ty) return tx < ty ? -1 : 1;
  ------------------
  |  Branch (35458:13): [True: 15.0k, False: 368k]
  |  Branch (35458:30): [True: 12.1k, False: 2.97k]
  ------------------
35459|   368k|        switch (tx) {
35460|  4.85k|            case JANET_NIL:
  ------------------
  |  Branch (35460:13): [True: 4.85k, False: 363k]
  ------------------
35461|  4.85k|                break;
35462|    291|            case JANET_BOOLEAN: {
  ------------------
  |  Branch (35462:13): [True: 291, False: 367k]
  ------------------
35463|    291|                int diff = janet_unwrap_boolean(x) - janet_unwrap_boolean(y);
  ------------------
  |  |  833|    291|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
                              int diff = janet_unwrap_boolean(x) - janet_unwrap_boolean(y);
  ------------------
  |  |  833|    291|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
35464|    291|                if (diff) return diff;
  ------------------
  |  Branch (35464:21): [True: 225, False: 66]
  ------------------
35465|     66|                break;
35466|    291|            }
35467|  1.02k|            case JANET_NUMBER: {
  ------------------
  |  Branch (35467:13): [True: 1.02k, False: 367k]
  ------------------
35468|  1.02k|                double xx = janet_unwrap_number(x);
  ------------------
  |  |  834|  1.02k|#define janet_unwrap_number(x) ((x).number)
  ------------------
35469|  1.02k|                double yy = janet_unwrap_number(y);
  ------------------
  |  |  834|  1.02k|#define janet_unwrap_number(x) ((x).number)
  ------------------
35470|  1.02k|                if (xx == yy) {
  ------------------
  |  Branch (35470:21): [True: 819, False: 205]
  ------------------
35471|    819|                    break;
35472|    819|                } else {
35473|    205|                    return (xx < yy) ? -1 : 1;
  ------------------
  |  Branch (35473:28): [True: 85, False: 120]
  ------------------
35474|    205|                }
35475|  1.02k|            }
35476|  2.15k|            case JANET_STRING:
  ------------------
  |  Branch (35476:13): [True: 2.15k, False: 365k]
  ------------------
35477|   298k|            case JANET_SYMBOL:
  ------------------
  |  Branch (35477:13): [True: 296k, False: 72.0k]
  ------------------
35478|   307k|            case JANET_KEYWORD: {
  ------------------
  |  Branch (35478:13): [True: 8.91k, False: 359k]
  ------------------
35479|   307k|                int diff = janet_string_compare(janet_unwrap_string(x), janet_unwrap_string(y));
  ------------------
  |  |  858|   307k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
                              int diff = janet_string_compare(janet_unwrap_string(x), janet_unwrap_string(y));
  ------------------
  |  |  858|   307k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
35480|   307k|                if (diff) return diff;
  ------------------
  |  Branch (35480:21): [True: 223k, False: 83.2k]
  ------------------
35481|  83.2k|                break;
35482|   307k|            }
35483|  83.2k|            case JANET_ABSTRACT: {
  ------------------
  |  Branch (35483:13): [True: 206, False: 367k]
  ------------------
35484|    206|                int diff = janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y));
  ------------------
  |  |  861|    206|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
                              int diff = janet_compare_abstract(janet_unwrap_abstract(x), janet_unwrap_abstract(y));
  ------------------
  |  |  861|    206|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
35485|    206|                if (diff) return diff;
  ------------------
  |  Branch (35485:21): [True: 128, False: 78]
  ------------------
35486|     78|                break;
35487|    206|            }
35488|  10.8k|            default: {
  ------------------
  |  Branch (35488:13): [True: 10.8k, False: 357k]
  ------------------
35489|  10.8k|                if (janet_unwrap_pointer(x) == janet_unwrap_pointer(y)) {
  ------------------
  |  |  862|  10.8k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
                              if (janet_unwrap_pointer(x) == janet_unwrap_pointer(y)) {
  ------------------
  |  |  862|  10.8k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (35489:21): [True: 2.21k, False: 8.59k]
  ------------------
35490|  2.21k|                    break;
35491|  8.59k|                } else {
35492|  8.59k|                    return janet_unwrap_pointer(x) > janet_unwrap_pointer(y) ? 1 : -1;
  ------------------
  |  |  862|  8.59k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
                                  return janet_unwrap_pointer(x) > janet_unwrap_pointer(y) ? 1 : -1;
  ------------------
  |  |  862|  8.59k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (35492:28): [True: 355, False: 8.24k]
  ------------------
35493|  8.59k|                }
35494|  10.8k|            }
35495|  43.1k|            case JANET_TUPLE: {
  ------------------
  |  Branch (35495:13): [True: 43.1k, False: 324k]
  ------------------
35496|  43.1k|                const Janet *lhs = janet_unwrap_tuple(x);
  ------------------
  |  |  853|  43.1k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
35497|  43.1k|                const Janet *rhs = janet_unwrap_tuple(y);
  ------------------
  |  |  853|  43.1k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
35498|  43.1k|                if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(lhs) ^ janet_tuple_flag(rhs))) {
  ------------------
  |  | 1788|  43.1k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
                              if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(lhs) ^ janet_tuple_flag(rhs))) {
  ------------------
  |  | 1796|  43.1k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1790|  43.1k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                              if (JANET_TUPLE_FLAG_BRACKETCTOR & (janet_tuple_flag(lhs) ^ janet_tuple_flag(rhs))) {
  ------------------
  |  | 1796|  43.1k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1790|  43.1k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35498:21): [True: 42, False: 43.1k]
  ------------------
35499|     42|                    return (janet_tuple_flag(lhs) & JANET_TUPLE_FLAG_BRACKETCTOR) ? 1 : -1;
  ------------------
  |  | 1796|     42|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1790|     42|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                                  return (janet_tuple_flag(lhs) & JANET_TUPLE_FLAG_BRACKETCTOR) ? 1 : -1;
  ------------------
  |  | 1788|     42|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (35499:28): [True: 5, False: 37]
  ------------------
35500|     42|                }
35501|  43.1k|                push_traversal_node(janet_tuple_head(lhs), janet_tuple_head(rhs), 1);
  ------------------
  |  | 1790|  43.1k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
                              push_traversal_node(janet_tuple_head(lhs), janet_tuple_head(rhs), 1);
  ------------------
  |  | 1790|  43.1k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  ------------------
35502|  43.1k|                break;
35503|  43.1k|            }
35504|    583|            case JANET_STRUCT: {
  ------------------
  |  Branch (35504:13): [True: 583, False: 367k]
  ------------------
35505|    583|                const JanetKV *lhs = janet_unwrap_struct(x);
  ------------------
  |  |  852|    583|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
35506|    583|                const JanetKV *rhs = janet_unwrap_struct(y);
  ------------------
  |  |  852|    583|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
35507|    583|                int32_t llen = janet_struct_capacity(lhs);
  ------------------
  |  | 1839|    583|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1836|    583|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
35508|    583|                int32_t rlen = janet_struct_capacity(rhs);
  ------------------
  |  | 1839|    583|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1836|    583|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
35509|    583|                int32_t lhash = janet_struct_hash(lhs);
  ------------------
  |  | 1840|    583|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1836|    583|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
35510|    583|                int32_t rhash = janet_struct_hash(rhs);
  ------------------
  |  | 1840|    583|#define janet_struct_hash(t) (janet_struct_head(t)->hash)
  |  |  ------------------
  |  |  |  | 1836|    583|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
35511|    583|                if (llen < rlen) return -1;
  ------------------
  |  Branch (35511:21): [True: 16, False: 567]
  ------------------
35512|    567|                if (llen > rlen) return 1;
  ------------------
  |  Branch (35512:21): [True: 20, False: 547]
  ------------------
35513|    547|                if (lhash < rhash) return -1;
  ------------------
  |  Branch (35513:21): [True: 59, False: 488]
  ------------------
35514|    488|                if (lhash > rhash) return 1;
  ------------------
  |  Branch (35514:21): [True: 55, False: 433]
  ------------------
35515|    433|                push_traversal_node(janet_struct_head(lhs), janet_struct_head(rhs), 0);
  ------------------
  |  | 1836|    433|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
                              push_traversal_node(janet_struct_head(lhs), janet_struct_head(rhs), 0);
  ------------------
  |  | 1836|    433|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  ------------------
35516|    433|                break;
35517|    488|            }
35518|   368k|        }
35519|   368k|    } while (!(status = traversal_next(&x, &y)));
  ------------------
  |  Branch (35519:14): [True: 89.1k, False: 45.7k]
  ------------------
35520|  45.7k|    return status - 2;
35521|   293k|}
janet_in:
35534|   110M|Janet janet_in(Janet ds, Janet key) {
35535|   110M|    Janet value;
35536|   110M|    JanetType type = janet_type(ds);
  ------------------
  |  |  790|   110M|    (isnan((x).number) \
  |  |  791|   110M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|   110M|        : JANET_NUMBER)
  ------------------
  |  Branch (35536:22): [True: 110M, False: 0]
  ------------------
35537|   110M|    switch (type) {
35538|      2|        default:
  ------------------
  |  Branch (35538:9): [True: 2, False: 110M]
  ------------------
35539|      2|            janet_panicf("expected %T, got %v", JANET_TFLAG_LENGTHABLE, ds);
  ------------------
  |  |  610|      2|#define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  607|      2|#define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  594|      2|#define JANET_TFLAG_STRING (1 << JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  595|      2|#define JANET_TFLAG_SYMBOL (1 << JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  601|      2|#define JANET_TFLAG_BUFFER (1 << JANET_BUFFER)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  596|      2|#define JANET_TFLAG_KEYWORD (1 << JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  608|      2|#define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  597|      2|#define JANET_TFLAG_ARRAY (1 << JANET_ARRAY)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  598|      2|#define JANET_TFLAG_TUPLE (1 << JANET_TUPLE)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  609|      2|#define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  599|      2|#define JANET_TFLAG_TABLE (1 << JANET_TABLE)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  600|      2|#define JANET_TFLAG_STRUCT (1 << JANET_STRUCT)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35540|      0|            break;
35541|  12.0M|        case JANET_STRUCT:
  ------------------
  |  Branch (35541:9): [True: 12.0M, False: 98.8M]
  ------------------
35542|  12.0M|            value = janet_struct_get(janet_unwrap_struct(ds), key);
  ------------------
  |  |  852|  12.0M|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
35543|  12.0M|            break;
35544|   930k|        case JANET_TABLE:
  ------------------
  |  Branch (35544:9): [True: 930k, False: 109M]
  ------------------
35545|   930k|            value = janet_table_get(janet_unwrap_table(ds), key);
  ------------------
  |  |  856|   930k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
35546|   930k|            break;
35547|   935k|        case JANET_ARRAY: {
  ------------------
  |  Branch (35547:9): [True: 935k, False: 109M]
  ------------------
35548|   935k|            JanetArray *array = janet_unwrap_array(ds);
  ------------------
  |  |  855|   935k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
35549|   935k|            int32_t index = getter_checkint(type, key, array->count);
35550|   935k|            value = array->data[index];
35551|   935k|            break;
35552|      0|        }
35553|  96.3M|        case JANET_TUPLE: {
  ------------------
  |  Branch (35553:9): [True: 96.3M, False: 14.5M]
  ------------------
35554|  96.3M|            const Janet *tuple = janet_unwrap_tuple(ds);
  ------------------
  |  |  853|  96.3M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
35555|  96.3M|            int32_t len = janet_tuple_length(tuple);
  ------------------
  |  | 1792|  96.3M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|  96.3M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
35556|  96.3M|            value = tuple[getter_checkint(type, key, len)];
35557|  96.3M|            break;
35558|      0|        }
35559|  18.7k|        case JANET_BUFFER: {
  ------------------
  |  Branch (35559:9): [True: 18.7k, False: 110M]
  ------------------
35560|  18.7k|            JanetBuffer *buffer = janet_unwrap_buffer(ds);
  ------------------
  |  |  857|  18.7k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
35561|  18.7k|            int32_t index = getter_checkint(type, key, buffer->count);
35562|  18.7k|            value = janet_wrap_integer(buffer->data[index]);
  ------------------
  |  |  958|  18.7k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|  18.7k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35563|  18.7k|            break;
35564|      0|        }
35565|  59.7k|        case JANET_STRING:
  ------------------
  |  Branch (35565:9): [True: 59.7k, False: 110M]
  ------------------
35566|   201k|        case JANET_SYMBOL:
  ------------------
  |  Branch (35566:9): [True: 142k, False: 110M]
  ------------------
35567|   202k|        case JANET_KEYWORD: {
  ------------------
  |  Branch (35567:9): [True: 1.09k, False: 110M]
  ------------------
35568|   202k|            const uint8_t *str = janet_unwrap_string(ds);
  ------------------
  |  |  858|   202k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
35569|   202k|            int32_t index = getter_checkint(type, key, janet_string_length(str));
  ------------------
  |  | 1803|   202k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|   202k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
35570|   202k|            value = janet_wrap_integer(str[index]);
  ------------------
  |  |  958|   202k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|   202k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35571|   202k|            break;
35572|   201k|        }
35573|   409k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35573:9): [True: 409k, False: 110M]
  ------------------
35574|   409k|            JanetAbstractType *type = (JanetAbstractType *)janet_abstract_type(janet_unwrap_abstract(ds));
  ------------------
  |  | 1889|   409k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|   409k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35575|   409k|            if (type->get) {
  ------------------
  |  Branch (35575:17): [True: 409k, False: 0]
  ------------------
35576|   409k|                if (!(type->get)(janet_unwrap_abstract(ds), key, &value))
  ------------------
  |  |  861|   409k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (35576:21): [True: 13, False: 409k]
  ------------------
35577|     13|                    janet_panicf("key %v not found in %v ", key, ds);
35578|   409k|            } else {
35579|      0|                janet_panicf("no getter for %v", ds);
35580|      0|            }
35581|   409k|            break;
35582|   409k|        }
35583|   409k|        case JANET_FIBER: {
  ------------------
  |  Branch (35583:9): [True: 1, False: 110M]
  ------------------
35584|       |            /* Bit of a hack to allow iterating over fibers. */
35585|      1|            if (janet_equals(key, janet_wrap_integer(0))) {
  ------------------
  |  |  958|      1|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|      1|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
  |  Branch (35585:17): [True: 0, False: 1]
  ------------------
35586|      0|                return janet_unwrap_fiber(ds)->last_value;
  ------------------
  |  |  854|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
35587|      1|            } else {
35588|      1|                janet_panicf("expected key 0, got %v", key);
35589|      1|            }
35590|      1|        }
35591|   110M|    }
35592|   110M|    return value;
35593|   110M|}
janet_get:
35595|  13.8M|Janet janet_get(Janet ds, Janet key) {
35596|  13.8M|    JanetType t = janet_type(ds);
  ------------------
  |  |  790|  13.8M|    (isnan((x).number) \
  |  |  791|  13.8M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  13.8M|        : JANET_NUMBER)
  ------------------
  |  Branch (35596:19): [True: 13.8M, False: 431]
  ------------------
35597|  13.8M|    switch (t) {
35598|    535|        default:
  ------------------
  |  Branch (35598:9): [True: 535, False: 13.8M]
  ------------------
35599|    535|            return janet_wrap_nil();
  ------------------
  |  |  826|    535|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|    535|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    535|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    535|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35600|   111k|        case JANET_STRING:
  ------------------
  |  Branch (35600:9): [True: 111k, False: 13.7M]
  ------------------
35601|   111k|        case JANET_SYMBOL:
  ------------------
  |  Branch (35601:9): [True: 57, False: 13.8M]
  ------------------
35602|   111k|        case JANET_KEYWORD: {
  ------------------
  |  Branch (35602:9): [True: 1, False: 13.8M]
  ------------------
35603|   111k|            if (!janet_checkint(key)) return janet_wrap_nil();
  ------------------
  |  |  826|    135|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|    135|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    135|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    135|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35603:17): [True: 135, False: 111k]
  ------------------
35604|   111k|            int32_t index = janet_unwrap_integer(key);
  ------------------
  |  |  957|   111k|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  834|   111k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
35605|   111k|            if (index < 0) return janet_wrap_nil();
  ------------------
  |  |  826|      9|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      9|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      9|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      9|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35605:17): [True: 9, False: 111k]
  ------------------
35606|   111k|            const uint8_t *str = janet_unwrap_string(ds);
  ------------------
  |  |  858|   111k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
35607|   111k|            if (index >= janet_string_length(str)) return janet_wrap_nil();
  ------------------
  |  | 1803|   111k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|   111k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
                          if (index >= janet_string_length(str)) return janet_wrap_nil();
  ------------------
  |  |  826|    266|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|    266|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    266|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    266|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35607:17): [True: 266, False: 110k]
  ------------------
35608|   110k|            return janet_wrap_integer(str[index]);
  ------------------
  |  |  958|   110k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|   110k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35609|   111k|        }
35610|   317k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35610:9): [True: 317k, False: 13.5M]
  ------------------
35611|   317k|            Janet value;
35612|   317k|            void *abst = janet_unwrap_abstract(ds);
  ------------------
  |  |  861|   317k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
35613|   317k|            JanetAbstractType *type = (JanetAbstractType *)janet_abstract_type(abst);
  ------------------
  |  | 1889|   317k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|   317k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35614|   317k|            if (!type->get) return janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35614:17): [True: 0, False: 317k]
  ------------------
35615|   317k|            if ((type->get)(abst, key, &value))
  ------------------
  |  Branch (35615:17): [True: 317k, False: 9]
  ------------------
35616|   317k|                return value;
35617|      9|            return janet_wrap_nil();
  ------------------
  |  |  826|      9|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      9|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      9|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      9|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35618|   317k|        }
35619|  29.7k|        case JANET_ARRAY:
  ------------------
  |  Branch (35619:9): [True: 29.7k, False: 13.8M]
  ------------------
35620|  2.16M|        case JANET_TUPLE:
  ------------------
  |  Branch (35620:9): [True: 2.13M, False: 11.7M]
  ------------------
35621|  2.37M|        case JANET_BUFFER: {
  ------------------
  |  Branch (35621:9): [True: 215k, False: 13.6M]
  ------------------
35622|  2.37M|            if (!janet_checkint(key)) return janet_wrap_nil();
  ------------------
  |  |  826|     42|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|     42|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     42|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     42|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35622:17): [True: 42, False: 2.37M]
  ------------------
35623|  2.37M|            int32_t index = janet_unwrap_integer(key);
  ------------------
  |  |  957|  2.37M|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  834|  2.37M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
35624|  2.37M|            if (index < 0) return janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35624:17): [True: 0, False: 2.37M]
  ------------------
35625|  2.37M|            if (t == JANET_ARRAY) {
  ------------------
  |  Branch (35625:17): [True: 29.7k, False: 2.34M]
  ------------------
35626|  29.7k|                JanetArray *a = janet_unwrap_array(ds);
  ------------------
  |  |  855|  29.7k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
35627|  29.7k|                if (index >= a->count) return janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35627:21): [True: 0, False: 29.7k]
  ------------------
35628|  29.7k|                return a->data[index];
35629|  2.34M|            } else if (t == JANET_BUFFER) {
  ------------------
  |  Branch (35629:24): [True: 215k, False: 2.13M]
  ------------------
35630|   215k|                JanetBuffer *b = janet_unwrap_buffer(ds);
  ------------------
  |  |  857|   215k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
35631|   215k|                if (index >= b->count) return janet_wrap_nil();
  ------------------
  |  |  826|   204k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|   204k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   204k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   204k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35631:21): [True: 204k, False: 11.2k]
  ------------------
35632|  11.2k|                return janet_wrap_integer(b->data[index]);
  ------------------
  |  |  958|  11.2k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|  11.2k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35633|  2.13M|            } else {
35634|  2.13M|                const Janet *t = janet_unwrap_tuple(ds);
  ------------------
  |  |  853|  2.13M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
35635|  2.13M|                if (index >= janet_tuple_length(t)) return janet_wrap_nil();
  ------------------
  |  | 1792|  2.13M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|  2.13M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                              if (index >= janet_tuple_length(t)) return janet_wrap_nil();
  ------------------
  |  |  826|  1.70k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  1.70k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.70k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.70k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (35635:21): [True: 1.70k, False: 2.13M]
  ------------------
35636|  2.13M|                return t[index];
35637|  2.13M|            }
35638|  2.37M|        }
35639|  1.05M|        case JANET_TABLE: {
  ------------------
  |  Branch (35639:9): [True: 1.05M, False: 12.8M]
  ------------------
35640|  1.05M|            return janet_table_get(janet_unwrap_table(ds), key);
  ------------------
  |  |  856|  1.05M|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
35641|  2.37M|        }
35642|  10.0M|        case JANET_STRUCT: {
  ------------------
  |  Branch (35642:9): [True: 10.0M, False: 3.86M]
  ------------------
35643|  10.0M|            const JanetKV *st = janet_unwrap_struct(ds);
  ------------------
  |  |  852|  10.0M|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
35644|  10.0M|            return janet_struct_get(st, key);
35645|  2.37M|        }
35646|     17|        case JANET_FIBER: {
  ------------------
  |  Branch (35646:9): [True: 17, False: 13.8M]
  ------------------
35647|       |            /* Bit of a hack to allow iterating over fibers. */
35648|     17|            if (janet_equals(key, janet_wrap_integer(0))) {
  ------------------
  |  |  958|     17|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|     17|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
  |  Branch (35648:17): [True: 0, False: 17]
  ------------------
35649|      0|                return janet_unwrap_fiber(ds)->last_value;
  ------------------
  |  |  854|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
35650|     17|            } else {
35651|     17|                return janet_wrap_nil();
  ------------------
  |  |  826|     17|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|     17|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     17|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     17|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35652|     17|            }
35653|     17|        }
35654|  13.8M|    }
35655|  13.8M|}
janet_getindex:
35657|   373k|Janet janet_getindex(Janet ds, int32_t index) {
35658|   373k|    Janet value;
35659|   373k|    if (index < 0) janet_panic("expected non-negative index");
  ------------------
  |  Branch (35659:9): [True: 0, False: 373k]
  ------------------
35660|   373k|    switch (janet_type(ds)) {
  ------------------
  |  |  790|   373k|    (isnan((x).number) \
  |  |  791|   373k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|   373k|        : JANET_NUMBER)
  ------------------
  |  Branch (35660:13): [True: 373k, False: 331]
  ------------------
35661|    354|        default:
  ------------------
  |  Branch (35661:9): [True: 354, False: 373k]
  ------------------
35662|    354|            janet_panicf("expected %T, got %v", JANET_TFLAG_LENGTHABLE, ds);
  ------------------
  |  |  610|    354|#define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  607|    354|#define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  594|    354|#define JANET_TFLAG_STRING (1 << JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  595|    354|#define JANET_TFLAG_SYMBOL (1 << JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  601|    354|#define JANET_TFLAG_BUFFER (1 << JANET_BUFFER)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  596|    354|#define JANET_TFLAG_KEYWORD (1 << JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  608|    354|#define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  597|    354|#define JANET_TFLAG_ARRAY (1 << JANET_ARRAY)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  598|    354|#define JANET_TFLAG_TUPLE (1 << JANET_TUPLE)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  609|    354|#define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  599|    354|#define JANET_TFLAG_TABLE (1 << JANET_TABLE)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  600|    354|#define JANET_TFLAG_STRUCT (1 << JANET_STRUCT)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35663|      0|            break;
35664|  5.86k|        case JANET_STRING:
  ------------------
  |  Branch (35664:9): [True: 5.86k, False: 367k]
  ------------------
35665|  7.03k|        case JANET_SYMBOL:
  ------------------
  |  Branch (35665:9): [True: 1.16k, False: 372k]
  ------------------
35666|  7.19k|        case JANET_KEYWORD:
  ------------------
  |  Branch (35666:9): [True: 158, False: 373k]
  ------------------
35667|  7.19k|            if (index >= janet_string_length(janet_unwrap_string(ds))) {
  ------------------
  |  | 1803|  7.19k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|  7.19k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35667:17): [True: 6.22k, False: 969]
  ------------------
35668|  6.22k|                value = janet_wrap_nil();
  ------------------
  |  |  826|  6.22k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  6.22k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  6.22k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  6.22k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35669|  6.22k|            } else {
35670|    969|                value = janet_wrap_integer(janet_unwrap_string(ds)[index]);
  ------------------
  |  |  958|    969|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|    969|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35671|    969|            }
35672|  7.19k|            break;
35673|    112|        case JANET_ARRAY:
  ------------------
  |  Branch (35673:9): [True: 112, False: 373k]
  ------------------
35674|    112|            if (index >= janet_unwrap_array(ds)->count) {
  ------------------
  |  |  855|    112|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (35674:17): [True: 86, False: 26]
  ------------------
35675|     86|                value = janet_wrap_nil();
  ------------------
  |  |  826|     86|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|     86|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     86|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     86|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35676|     86|            } else {
35677|     26|                value = janet_unwrap_array(ds)->data[index];
  ------------------
  |  |  855|     26|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
35678|     26|            }
35679|    112|            break;
35680|    218|        case JANET_BUFFER:
  ------------------
  |  Branch (35680:9): [True: 218, False: 373k]
  ------------------
35681|    218|            if (index >= janet_unwrap_buffer(ds)->count) {
  ------------------
  |  |  857|    218|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (35681:17): [True: 137, False: 81]
  ------------------
35682|    137|                value = janet_wrap_nil();
  ------------------
  |  |  826|    137|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|    137|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    137|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    137|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35683|    137|            } else {
35684|     81|                value = janet_wrap_integer(janet_unwrap_buffer(ds)->data[index]);
  ------------------
  |  |  958|     81|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|     81|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35685|     81|            }
35686|    218|            break;
35687|   365k|        case JANET_TUPLE:
  ------------------
  |  Branch (35687:9): [True: 365k, False: 7.90k]
  ------------------
35688|   365k|            if (index >= janet_tuple_length(janet_unwrap_tuple(ds))) {
  ------------------
  |  | 1792|   365k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|   365k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (35688:17): [True: 70, False: 365k]
  ------------------
35689|     70|                value = janet_wrap_nil();
  ------------------
  |  |  826|     70|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|     70|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     70|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     70|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35690|   365k|            } else {
35691|   365k|                value = janet_unwrap_tuple(ds)[index];
  ------------------
  |  |  853|   365k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
35692|   365k|            }
35693|   365k|            break;
35694|      2|        case JANET_TABLE:
  ------------------
  |  Branch (35694:9): [True: 2, False: 373k]
  ------------------
35695|      2|            value = janet_table_get(janet_unwrap_table(ds), janet_wrap_integer(index));
  ------------------
  |  |  856|      2|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
                          value = janet_table_get(janet_unwrap_table(ds), janet_wrap_integer(index));
  ------------------
  |  |  958|      2|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|      2|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35696|      2|            break;
35697|     15|        case JANET_STRUCT:
  ------------------
  |  Branch (35697:9): [True: 15, False: 373k]
  ------------------
35698|     15|            value = janet_struct_get(janet_unwrap_struct(ds), janet_wrap_integer(index));
  ------------------
  |  |  852|     15|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
                          value = janet_struct_get(janet_unwrap_struct(ds), janet_wrap_integer(index));
  ------------------
  |  |  958|     15|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|     15|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35699|     15|            break;
35700|     12|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35700:9): [True: 12, False: 373k]
  ------------------
35701|     12|            JanetAbstractType *type = (JanetAbstractType *)janet_abstract_type(janet_unwrap_abstract(ds));
  ------------------
  |  | 1889|     12|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|     12|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35702|     12|            if (type->get) {
  ------------------
  |  Branch (35702:17): [True: 12, False: 0]
  ------------------
35703|     12|                if (!(type->get)(janet_unwrap_abstract(ds), janet_wrap_integer(index), &value))
  ------------------
  |  |  861|     12|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
                              if (!(type->get)(janet_unwrap_abstract(ds), janet_wrap_integer(index), &value))
  ------------------
  |  |  958|     12|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|     12|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
  |  Branch (35703:21): [True: 12, False: 0]
  ------------------
35704|     12|                    value = janet_wrap_nil();
  ------------------
  |  |  826|     12|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|     12|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     12|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     12|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35705|     12|            } else {
35706|      0|                janet_panicf("no getter for %v", ds);
35707|      0|            }
35708|     12|            break;
35709|     12|        }
35710|     12|        case JANET_FIBER: {
  ------------------
  |  Branch (35710:9): [True: 0, False: 373k]
  ------------------
35711|      0|            if (index == 0) {
  ------------------
  |  Branch (35711:17): [True: 0, False: 0]
  ------------------
35712|      0|                value = janet_unwrap_fiber(ds)->last_value;
  ------------------
  |  |  854|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
35713|      0|            } else {
35714|      0|                value = janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35715|      0|            }
35716|      0|            break;
35717|     12|        }
35718|   373k|    }
35719|   373k|    return value;
35720|   373k|}
janet_length:
35722|  17.4M|int32_t janet_length(Janet x) {
35723|  17.4M|    switch (janet_type(x)) {
  ------------------
  |  |  790|  17.4M|    (isnan((x).number) \
  |  |  791|  17.4M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  17.4M|        : JANET_NUMBER)
  ------------------
  |  Branch (35723:13): [True: 17.4M, False: 0]
  ------------------
35724|      0|        default:
  ------------------
  |  Branch (35724:9): [True: 0, False: 17.4M]
  ------------------
35725|      0|            janet_panicf("expected %T, got %v", JANET_TFLAG_LENGTHABLE, x);
  ------------------
  |  |  610|      0|#define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  607|      0|#define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  594|      0|#define JANET_TFLAG_STRING (1 << JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  595|      0|#define JANET_TFLAG_SYMBOL (1 << JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  601|      0|#define JANET_TFLAG_BUFFER (1 << JANET_BUFFER)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  596|      0|#define JANET_TFLAG_KEYWORD (1 << JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  608|      0|#define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  597|      0|#define JANET_TFLAG_ARRAY (1 << JANET_ARRAY)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  598|      0|#define JANET_TFLAG_TUPLE (1 << JANET_TUPLE)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  609|      0|#define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  599|      0|#define JANET_TFLAG_TABLE (1 << JANET_TABLE)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  600|      0|#define JANET_TFLAG_STRUCT (1 << JANET_STRUCT)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35726|    159|        case JANET_STRING:
  ------------------
  |  Branch (35726:9): [True: 159, False: 17.4M]
  ------------------
35727|  12.1k|        case JANET_SYMBOL:
  ------------------
  |  Branch (35727:9): [True: 11.9k, False: 17.3M]
  ------------------
35728|  14.5k|        case JANET_KEYWORD:
  ------------------
  |  Branch (35728:9): [True: 2.46k, False: 17.3M]
  ------------------
35729|  14.5k|            return janet_string_length(janet_unwrap_string(x));
  ------------------
  |  | 1803|  14.5k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|  14.5k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
35730|  2.30M|        case JANET_ARRAY:
  ------------------
  |  Branch (35730:9): [True: 2.30M, False: 15.0M]
  ------------------
35731|  2.30M|            return janet_unwrap_array(x)->count;
  ------------------
  |  |  855|  2.30M|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
35732|      1|        case JANET_BUFFER:
  ------------------
  |  Branch (35732:9): [True: 1, False: 17.4M]
  ------------------
35733|      1|            return janet_unwrap_buffer(x)->count;
  ------------------
  |  |  857|      1|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
35734|  15.0M|        case JANET_TUPLE:
  ------------------
  |  Branch (35734:9): [True: 15.0M, False: 2.32M]
  ------------------
35735|  15.0M|            return janet_tuple_length(janet_unwrap_tuple(x));
  ------------------
  |  | 1792|  15.0M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|  15.0M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
35736|      0|        case JANET_STRUCT:
  ------------------
  |  Branch (35736:9): [True: 0, False: 17.4M]
  ------------------
35737|      0|            return janet_struct_length(janet_unwrap_struct(x));
  ------------------
  |  | 1838|      0|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1836|      0|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
35738|      0|        case JANET_TABLE:
  ------------------
  |  Branch (35738:9): [True: 0, False: 17.4M]
  ------------------
35739|      0|            return janet_unwrap_table(x)->count;
  ------------------
  |  |  856|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
35740|      0|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35740:9): [True: 0, False: 17.4M]
  ------------------
35741|      0|            void *abst = janet_unwrap_abstract(x);
  ------------------
  |  |  861|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
35742|      0|            const JanetAbstractType *type = janet_abstract_type(abst);
  ------------------
  |  | 1889|      0|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35743|      0|            if (type->length != NULL) {
  ------------------
  |  Branch (35743:17): [True: 0, False: 0]
  ------------------
35744|      0|                size_t len = type->length(abst, janet_abstract_size(abst));
  ------------------
  |  | 1890|      0|#define janet_abstract_size(u) (janet_abstract_head(u)->size)
  |  |  ------------------
  |  |  |  | 1887|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35745|      0|                if (len > INT32_MAX) {
  ------------------
  |  Branch (35745:21): [True: 0, False: 0]
  ------------------
35746|      0|                    janet_panicf("invalid integer length %u", len);
35747|      0|                }
35748|      0|                return (int32_t)(len);
35749|      0|            }
35750|      0|            Janet argv[1] = { x };
35751|      0|            Janet len = janet_mcall("length", 1, argv);
35752|      0|            if (!janet_checkint(len))
  ------------------
  |  Branch (35752:17): [True: 0, False: 0]
  ------------------
35753|      0|                janet_panicf("invalid integer length %v", len);
35754|      0|            return janet_unwrap_integer(len);
  ------------------
  |  |  957|      0|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
35755|      0|        }
35756|  17.4M|    }
35757|  17.4M|}
janet_lengthv:
35759|  44.8M|Janet janet_lengthv(Janet x) {
35760|  44.8M|    switch (janet_type(x)) {
  ------------------
  |  |  790|  44.8M|    (isnan((x).number) \
  |  |  791|  44.8M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  44.8M|        : JANET_NUMBER)
  ------------------
  |  Branch (35760:13): [True: 44.8M, False: 0]
  ------------------
35761|      0|        default:
  ------------------
  |  Branch (35761:9): [True: 0, False: 44.8M]
  ------------------
35762|      0|            janet_panicf("expected %T, got %v", JANET_TFLAG_LENGTHABLE, x);
  ------------------
  |  |  610|      0|#define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  607|      0|#define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  594|      0|#define JANET_TFLAG_STRING (1 << JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  595|      0|#define JANET_TFLAG_SYMBOL (1 << JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  601|      0|#define JANET_TFLAG_BUFFER (1 << JANET_BUFFER)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_BYTES (JANET_TFLAG_STRING | JANET_TFLAG_SYMBOL | JANET_TFLAG_BUFFER | JANET_TFLAG_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  596|      0|#define JANET_TFLAG_KEYWORD (1 << JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  608|      0|#define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  597|      0|#define JANET_TFLAG_ARRAY (1 << JANET_ARRAY)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  598|      0|#define JANET_TFLAG_TUPLE (1 << JANET_TUPLE)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define JANET_TFLAG_LENGTHABLE (JANET_TFLAG_BYTES | JANET_TFLAG_INDEXED | JANET_TFLAG_DICTIONARY)
  |  |  ------------------
  |  |  |  |  609|      0|#define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  599|      0|#define JANET_TFLAG_TABLE (1 << JANET_TABLE)
  |  |  |  |  ------------------
  |  |  |  |               #define JANET_TFLAG_DICTIONARY (JANET_TFLAG_TABLE | JANET_TFLAG_STRUCT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  600|      0|#define JANET_TFLAG_STRUCT (1 << JANET_STRUCT)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35763|  12.5k|        case JANET_STRING:
  ------------------
  |  Branch (35763:9): [True: 12.5k, False: 44.7M]
  ------------------
35764|  12.8k|        case JANET_SYMBOL:
  ------------------
  |  Branch (35764:9): [True: 278, False: 44.8M]
  ------------------
35765|  13.1k|        case JANET_KEYWORD:
  ------------------
  |  Branch (35765:9): [True: 281, False: 44.8M]
  ------------------
35766|  13.1k|            return janet_wrap_integer(janet_string_length(janet_unwrap_string(x)));
  ------------------
  |  |  958|  13.1k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|  13.1k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35767|   220k|        case JANET_ARRAY:
  ------------------
  |  Branch (35767:9): [True: 220k, False: 44.5M]
  ------------------
35768|   220k|            return janet_wrap_integer(janet_unwrap_array(x)->count);
  ------------------
  |  |  958|   220k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|   220k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35769|   154k|        case JANET_BUFFER:
  ------------------
  |  Branch (35769:9): [True: 154k, False: 44.6M]
  ------------------
35770|   154k|            return janet_wrap_integer(janet_unwrap_buffer(x)->count);
  ------------------
  |  |  958|   154k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|   154k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35771|  44.2M|        case JANET_TUPLE:
  ------------------
  |  Branch (35771:9): [True: 44.2M, False: 511k]
  ------------------
35772|  44.2M|            return janet_wrap_integer(janet_tuple_length(janet_unwrap_tuple(x)));
  ------------------
  |  |  958|  44.2M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|  44.2M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35773|  35.9k|        case JANET_STRUCT:
  ------------------
  |  Branch (35773:9): [True: 35.9k, False: 44.7M]
  ------------------
35774|  35.9k|            return janet_wrap_integer(janet_struct_length(janet_unwrap_struct(x)));
  ------------------
  |  |  958|  35.9k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|  35.9k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35775|  87.5k|        case JANET_TABLE:
  ------------------
  |  Branch (35775:9): [True: 87.5k, False: 44.7M]
  ------------------
35776|  87.5k|            return janet_wrap_integer(janet_unwrap_table(x)->count);
  ------------------
  |  |  958|  87.5k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|  87.5k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35777|      1|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35777:9): [True: 1, False: 44.8M]
  ------------------
35778|      1|            void *abst = janet_unwrap_abstract(x);
  ------------------
  |  |  861|      1|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
35779|      1|            const JanetAbstractType *type = janet_abstract_type(abst);
  ------------------
  |  | 1889|      1|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|      1|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35780|      1|            if (type->length != NULL) {
  ------------------
  |  Branch (35780:17): [True: 0, False: 1]
  ------------------
35781|      0|                size_t len = type->length(abst, janet_abstract_size(abst));
  ------------------
  |  | 1890|      0|#define janet_abstract_size(u) (janet_abstract_head(u)->size)
  |  |  ------------------
  |  |  |  | 1887|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35782|       |                /* If len is always less then double, we can never overflow */
35783|       |#ifdef JANET_32
35784|       |                return janet_wrap_number(len);
35785|       |#else
35786|      0|                if (len < (size_t) JANET_INTMAX_INT64) {
  ------------------
  |  |  162|      0|#define JANET_INTMAX_INT64 9007199254740992
  ------------------
  |  Branch (35786:21): [True: 0, False: 0]
  ------------------
35787|      0|                    return janet_wrap_number((double) len);
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
35788|      0|                } else {
35789|      0|                    janet_panicf("integer length %u too large", len);
35790|      0|                }
35791|      0|#endif
35792|      0|            }
35793|      1|            Janet argv[1] = { x };
35794|      1|            return janet_mcall("length", 1, argv);
35795|      1|        }
35796|  44.8M|    }
35797|  44.8M|}
janet_putindex:
35799|     17|void janet_putindex(Janet ds, int32_t index, Janet value) {
35800|     17|    switch (janet_type(ds)) {
  ------------------
  |  |  790|     17|    (isnan((x).number) \
  |  |  791|     17|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|     17|        : JANET_NUMBER)
  ------------------
  |  Branch (35800:13): [True: 17, False: 0]
  ------------------
35801|      0|        default:
  ------------------
  |  Branch (35801:9): [True: 0, False: 17]
  ------------------
35802|      0|            janet_panicf("expected %T, got %v",
35803|      0|                         JANET_TFLAG_ARRAY | JANET_TFLAG_BUFFER | JANET_TFLAG_TABLE, ds);
  ------------------
  |  |  597|      0|#define JANET_TFLAG_ARRAY (1 << JANET_ARRAY)
  ------------------
                                       JANET_TFLAG_ARRAY | JANET_TFLAG_BUFFER | JANET_TFLAG_TABLE, ds);
  ------------------
  |  |  601|      0|#define JANET_TFLAG_BUFFER (1 << JANET_BUFFER)
  ------------------
                                       JANET_TFLAG_ARRAY | JANET_TFLAG_BUFFER | JANET_TFLAG_TABLE, ds);
  ------------------
  |  |  599|      0|#define JANET_TFLAG_TABLE (1 << JANET_TABLE)
  ------------------
35804|     17|        case JANET_ARRAY: {
  ------------------
  |  Branch (35804:9): [True: 17, False: 0]
  ------------------
35805|     17|            JanetArray *array = janet_unwrap_array(ds);
  ------------------
  |  |  855|     17|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
35806|     17|            if (index >= array->count) {
  ------------------
  |  Branch (35806:17): [True: 0, False: 17]
  ------------------
35807|      0|                janet_array_ensure(array, index + 1, 2);
35808|      0|                for (int32_t i = array->count; i < index + 1; i++) {
  ------------------
  |  Branch (35808:48): [True: 0, False: 0]
  ------------------
35809|      0|                    array->data[i] = janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35810|      0|                }
35811|      0|                array->count = index + 1;
35812|      0|            }
35813|     17|            array->data[index] = value;
35814|     17|            break;
35815|      0|        }
35816|      0|        case JANET_BUFFER: {
  ------------------
  |  Branch (35816:9): [True: 0, False: 17]
  ------------------
35817|      0|            JanetBuffer *buffer = janet_unwrap_buffer(ds);
  ------------------
  |  |  857|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
35818|      0|            if (!janet_checkint(value))
  ------------------
  |  Branch (35818:17): [True: 0, False: 0]
  ------------------
35819|      0|                janet_panicf("can only put integers in buffers, got %v", value);
35820|      0|            if (index >= buffer->count) {
  ------------------
  |  Branch (35820:17): [True: 0, False: 0]
  ------------------
35821|      0|                janet_buffer_ensure(buffer, index + 1, 2);
35822|      0|                memset(buffer->data + buffer->count, 0, index + 1 - buffer->count);
35823|      0|                buffer->count = index + 1;
35824|      0|            }
35825|      0|            buffer->data[index] = (uint8_t)(janet_unwrap_integer(value) & 0xFF);
  ------------------
  |  |  957|      0|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
35826|      0|            break;
35827|      0|        }
35828|      0|        case JANET_TABLE: {
  ------------------
  |  Branch (35828:9): [True: 0, False: 17]
  ------------------
35829|      0|            JanetTable *table = janet_unwrap_table(ds);
  ------------------
  |  |  856|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
35830|      0|            janet_table_put(table, janet_wrap_integer(index), value);
  ------------------
  |  |  958|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35831|      0|            break;
35832|      0|        }
35833|      0|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35833:9): [True: 0, False: 17]
  ------------------
35834|      0|            JanetAbstractType *type = (JanetAbstractType *)janet_abstract_type(janet_unwrap_abstract(ds));
  ------------------
  |  | 1889|      0|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35835|      0|            if (type->put) {
  ------------------
  |  Branch (35835:17): [True: 0, False: 0]
  ------------------
35836|      0|                (type->put)(janet_unwrap_abstract(ds), janet_wrap_integer(index), value);
  ------------------
  |  |  861|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
                              (type->put)(janet_unwrap_abstract(ds), janet_wrap_integer(index), value);
  ------------------
  |  |  958|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
35837|      0|            } else {
35838|      0|                janet_panicf("no setter for %v ", ds);
35839|      0|            }
35840|      0|            break;
35841|      0|        }
35842|     17|    }
35843|     17|}
janet_put:
35845|   647k|void janet_put(Janet ds, Janet key, Janet value) {
35846|   647k|    JanetType type = janet_type(ds);
  ------------------
  |  |  790|   647k|    (isnan((x).number) \
  |  |  791|   647k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|   647k|        : JANET_NUMBER)
  ------------------
  |  Branch (35846:22): [True: 647k, False: 0]
  ------------------
35847|   647k|    switch (type) {
35848|      0|        default:
  ------------------
  |  Branch (35848:9): [True: 0, False: 647k]
  ------------------
35849|      0|            janet_panicf("expected %T, got %v",
35850|      0|                         JANET_TFLAG_ARRAY | JANET_TFLAG_BUFFER | JANET_TFLAG_TABLE, ds);
  ------------------
  |  |  597|      0|#define JANET_TFLAG_ARRAY (1 << JANET_ARRAY)
  ------------------
                                       JANET_TFLAG_ARRAY | JANET_TFLAG_BUFFER | JANET_TFLAG_TABLE, ds);
  ------------------
  |  |  601|      0|#define JANET_TFLAG_BUFFER (1 << JANET_BUFFER)
  ------------------
                                       JANET_TFLAG_ARRAY | JANET_TFLAG_BUFFER | JANET_TFLAG_TABLE, ds);
  ------------------
  |  |  599|      0|#define JANET_TFLAG_TABLE (1 << JANET_TABLE)
  ------------------
35851|   346k|        case JANET_ARRAY: {
  ------------------
  |  Branch (35851:9): [True: 346k, False: 300k]
  ------------------
35852|   346k|            JanetArray *array = janet_unwrap_array(ds);
  ------------------
  |  |  855|   346k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
35853|   346k|            int32_t index = getter_checkint(type, key, INT32_MAX - 1);
35854|   346k|            if (index >= array->count) {
  ------------------
  |  Branch (35854:17): [True: 0, False: 346k]
  ------------------
35855|      0|                janet_array_ensure(array, index + 1, 2);
35856|      0|                for (int32_t i = array->count; i < index + 1; i++) {
  ------------------
  |  Branch (35856:48): [True: 0, False: 0]
  ------------------
35857|      0|                    array->data[i] = janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35858|      0|                }
35859|      0|                array->count = index + 1;
35860|      0|            }
35861|   346k|            array->data[index] = value;
35862|   346k|            break;
35863|      0|        }
35864|  6.55k|        case JANET_BUFFER: {
  ------------------
  |  Branch (35864:9): [True: 6.55k, False: 640k]
  ------------------
35865|  6.55k|            JanetBuffer *buffer = janet_unwrap_buffer(ds);
  ------------------
  |  |  857|  6.55k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
35866|  6.55k|            int32_t index = getter_checkint(type, key, INT32_MAX - 1);
35867|  6.55k|            if (!janet_checkint(value))
  ------------------
  |  Branch (35867:17): [True: 0, False: 6.55k]
  ------------------
35868|      0|                janet_panicf("can only put integers in buffers, got %v", value);
35869|  6.55k|            if (index >= buffer->count) {
  ------------------
  |  Branch (35869:17): [True: 0, False: 6.55k]
  ------------------
35870|      0|                janet_buffer_ensure(buffer, index + 1, 2);
35871|      0|                memset(buffer->data + buffer->count, 0, index + 1 - buffer->count);
35872|      0|                buffer->count = index + 1;
35873|      0|            }
35874|  6.55k|            buffer->data[index] = (uint8_t)(janet_unwrap_integer(value) & 0xFF);
  ------------------
  |  |  957|  6.55k|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  834|  6.55k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
35875|  6.55k|            break;
35876|  6.55k|        }
35877|   294k|        case JANET_TABLE:
  ------------------
  |  Branch (35877:9): [True: 294k, False: 353k]
  ------------------
35878|   294k|            janet_table_put(janet_unwrap_table(ds), key, value);
  ------------------
  |  |  856|   294k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
35879|   294k|            break;
35880|      0|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (35880:9): [True: 0, False: 647k]
  ------------------
35881|      0|            JanetAbstractType *type = (JanetAbstractType *)janet_abstract_type(janet_unwrap_abstract(ds));
  ------------------
  |  | 1889|      0|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35882|      0|            if (type->put) {
  ------------------
  |  Branch (35882:17): [True: 0, False: 0]
  ------------------
35883|      0|                (type->put)(janet_unwrap_abstract(ds), key, value);
  ------------------
  |  |  861|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
35884|      0|            } else {
35885|      0|                janet_panicf("no setter for %v ", ds);
35886|      0|            }
35887|      0|            break;
35888|      0|        }
35889|   647k|    }
35890|   647k|}
janet_v_grow:
35925|  5.51M|void *janet_v_grow(void *v, int32_t increment, int32_t itemsize) {
35926|  5.51M|    int32_t dbl_cur = (NULL != v) ? 2 * janet_v__cap(v) : 0;
  ------------------
  |  |  714|  3.14M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  ------------------
  |  |  |  |  713|  3.14M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
  |  Branch (35926:23): [True: 3.14M, False: 2.37M]
  ------------------
35927|  5.51M|    int32_t min_needed = janet_v_count(v) + increment;
  ------------------
  |  |  708|  5.51M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  3.14M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  3.14M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 3.14M, False: 2.37M]
  |  |  ------------------
  ------------------
35928|  5.51M|    int32_t m = dbl_cur > min_needed ? dbl_cur : min_needed;
  ------------------
  |  Branch (35928:17): [True: 1.50M, False: 4.01M]
  ------------------
35929|  5.51M|    size_t newsize = ((size_t) itemsize) * m + sizeof(int32_t) * 2;
35930|  5.51M|    int32_t *p = (int32_t *) janet_srealloc(v ? janet_v__raw(v) : 0, newsize);
  ------------------
  |  |  713|  3.14M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  ------------------
  |  Branch (35930:45): [True: 3.14M, False: 2.37M]
  ------------------
35931|  5.51M|    if (!v) p[1] = 0;
  ------------------
  |  Branch (35931:9): [True: 2.37M, False: 3.14M]
  ------------------
35932|  5.51M|    p[0] = m;
35933|  5.51M|    return p + 2;
35934|  5.51M|}
janet_v_flattenmem:
35937|  2.10M|void *janet_v_flattenmem(void *v, int32_t itemsize) {
35938|  2.10M|    char *p;
35939|  2.10M|    if (NULL == v) return NULL;
  ------------------
  |  Branch (35939:9): [True: 1.40M, False: 704k]
  ------------------
35940|   704k|    size_t size = (size_t) itemsize * janet_v__cnt(v);
  ------------------
  |  |  715|   704k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  ------------------
  |  |  |  |  713|   704k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
35941|   704k|    p = janet_malloc(size);
  ------------------
  |  | 2393|   704k|#define janet_malloc(X) malloc((X))
  ------------------
35942|   704k|    if (NULL != p) {
  ------------------
  |  Branch (35942:9): [True: 704k, False: 0]
  ------------------
35943|   704k|        safe_memcpy(p, v, size);
35944|   704k|        return p;
35945|   704k|    } else {
35946|       |        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
35947|      0|    }
35948|   704k|}
janet_call:
37335|    103|Janet janet_call(JanetFunction *fun, int32_t argc, const Janet *argv) {
37336|       |    /* Check entry conditions */
37337|    103|    if (!janet_vm.fiber)
  ------------------
  |  Branch (37337:9): [True: 0, False: 103]
  ------------------
37338|      0|        janet_panic("janet_call failed because there is no current fiber");
37339|    103|    if (janet_vm.stackn >= JANET_RECURSION_GUARD)
  ------------------
  |  |  291|    103|#define JANET_RECURSION_GUARD 1024
  ------------------
  |  Branch (37339:9): [True: 0, False: 103]
  ------------------
37340|      0|        janet_panic("C stack recursed too deeply");
37341|       |
37342|       |    /* Dirty stack */
37343|    103|    int32_t dirty_stack = janet_vm.fiber->stacktop - janet_vm.fiber->stackstart;
37344|    103|    if (dirty_stack) {
  ------------------
  |  Branch (37344:9): [True: 0, False: 103]
  ------------------
37345|      0|        janet_fiber_cframe(janet_vm.fiber, void_cfunction);
37346|      0|    }
37347|       |
37348|       |    /* Tracing */
37349|    103|    if (fun->gc.flags & JANET_FUNCFLAG_TRACE) {
  ------------------
  |  | 1155|    103|#define JANET_FUNCFLAG_TRACE (1 << 16)
  ------------------
  |  Branch (37349:9): [True: 0, False: 103]
  ------------------
37350|      0|        janet_vm.stackn++;
37351|      0|        vm_do_trace(fun, argc, argv);
  ------------------
  |  |36194|      0|#define vm_do_trace(func, argc, argv) do { \
  |  |36195|      0|    JanetFunction* _func = (func);\
  |  |36196|      0|    if (_func->def->name) {\
  |  |  ------------------
  |  |  |  Branch (36196:9): [True: 0, False: 0]
  |  |  ------------------
  |  |36197|      0|        janet_eprintf("trace (%S", _func->def->name);\
  |  |  ------------------
  |  |  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36198|      0|    } else {\
  |  |36199|      0|        janet_eprintf("trace (%p", janet_wrap_function(_func));\
  |  |  ------------------
  |  |  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36200|      0|    }\
  |  |36201|      0|    int32_t _argc = (argc);\
  |  |36202|      0|    for (int32_t i = 0; i < _argc; i++) {\
  |  |  ------------------
  |  |  |  Branch (36202:25): [True: 0, False: 0]
  |  |  ------------------
  |  |36203|      0|        janet_eprintf(" %p", (argv)[i]);\
  |  |  ------------------
  |  |  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36204|      0|    }\
  |  |36205|      0|    janet_eprintf(")\n");\
  |  |  ------------------
  |  |  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36206|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (36206:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37352|      0|        janet_vm.stackn--;
37353|      0|    }
37354|       |
37355|       |    /* Push frame */
37356|    103|    janet_fiber_pushn(janet_vm.fiber, argv, argc);
37357|    103|    if (janet_fiber_funcframe(janet_vm.fiber, fun)) {
  ------------------
  |  Branch (37357:9): [True: 6, False: 97]
  ------------------
37358|      6|        int32_t min = fun->def->min_arity;
37359|      6|        int32_t max = fun->def->max_arity;
37360|      6|        Janet funv = janet_wrap_function(fun);
  ------------------
  |  |  847|      6|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  820|      6|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      6|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      6|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37361|      6|        if (min == max && min != argc)
  ------------------
  |  Branch (37361:13): [True: 6, False: 0]
  |  Branch (37361:27): [True: 6, False: 0]
  ------------------
37362|      6|            janet_panicf("arity mismatch in %v, expected %d, got %d", funv, min, argc);
37363|      0|        if (min >= 0 && argc < min)
  ------------------
  |  Branch (37363:13): [True: 0, False: 0]
  |  Branch (37363:25): [True: 0, False: 0]
  ------------------
37364|      0|            janet_panicf("arity mismatch in %v, expected at least %d, got %d", funv, min, argc);
37365|      0|        janet_panicf("arity mismatch in %v, expected at most %d, got %d", funv, max, argc);
37366|      0|    }
37367|     97|    janet_fiber_frame(janet_vm.fiber)->flags |= JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  |  802|     97|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  801|     97|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|     97|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  janet_fiber_frame(janet_vm.fiber)->flags |= JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  | 1004|     97|#define JANET_STACKFRAME_ENTRANCE 2
  ------------------
37368|       |
37369|       |    /* Set up */
37370|     97|    int32_t oldn = janet_vm.stackn++;
37371|     97|    int handle = janet_gclock();
37372|       |
37373|       |    /* Run vm */
37374|     97|    janet_vm.fiber->flags |= JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  784|     97|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
                  janet_vm.fiber->flags |= JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  785|     97|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  ------------------
37375|     97|    int old_coerce_error = janet_vm.coerce_error;
37376|     97|    janet_vm.coerce_error = 1;
37377|     97|    JanetSignal signal = run_vm(janet_vm.fiber, janet_wrap_nil());
  ------------------
  |  |  826|     97|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|     97|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     97|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     97|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37378|     97|    janet_vm.coerce_error = old_coerce_error;
37379|       |
37380|       |    /* Teardown */
37381|     97|    janet_vm.stackn = oldn;
37382|     97|    janet_gcunlock(handle);
37383|     97|    if (dirty_stack) {
  ------------------
  |  Branch (37383:9): [True: 0, False: 97]
  ------------------
37384|      0|        janet_fiber_popframe(janet_vm.fiber);
37385|      0|        janet_vm.fiber->stacktop += dirty_stack;
37386|      0|    }
37387|       |
37388|     97|    if (signal != JANET_SIGNAL_OK) {
  ------------------
  |  Branch (37388:9): [True: 0, False: 97]
  ------------------
37389|       |        /* Should match logic in janet_signalv */
37390|      0|#ifdef JANET_EV
37391|      0|        if (janet_vm.root_fiber != NULL && signal == JANET_SIGNAL_EVENT) {
  ------------------
  |  Branch (37391:13): [True: 0, False: 0]
  |  Branch (37391:44): [True: 0, False: 0]
  ------------------
37392|      0|            janet_vm.root_fiber->sched_id++;
37393|      0|        }
37394|      0|#endif
37395|      0|        if (signal != JANET_SIGNAL_ERROR) {
  ------------------
  |  Branch (37395:13): [True: 0, False: 0]
  ------------------
37396|      0|            *janet_vm.return_reg = janet_wrap_string(janet_formatc("%v coerced from %s to error", *janet_vm.return_reg, janet_signal_names[signal]));
  ------------------
  |  |  843|      0|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37397|      0|        }
37398|      0|        janet_panicv(*janet_vm.return_reg);
37399|      0|    }
37400|       |
37401|     97|    return *janet_vm.return_reg;
37402|     97|}
janet_try_init:
37438|   395k|void janet_try_init(JanetTryState *state) {
37439|   395k|    state->stackn = janet_vm.stackn++;
37440|   395k|    state->gc_handle = janet_vm.gc_suspend;
37441|   395k|    state->vm_fiber = janet_vm.fiber;
37442|   395k|    state->vm_jmp_buf = janet_vm.signal_buf;
37443|   395k|    state->vm_return_reg = janet_vm.return_reg;
37444|   395k|    state->coerce_error = janet_vm.coerce_error;
37445|   395k|    janet_vm.return_reg = &(state->payload);
37446|   395k|    janet_vm.signal_buf = &(state->buf);
37447|   395k|    janet_vm.coerce_error = 0;
37448|   395k|}
janet_restore:
37450|   395k|void janet_restore(JanetTryState *state) {
37451|   395k|    janet_vm.stackn = state->stackn;
37452|   395k|    janet_vm.gc_suspend = state->gc_handle;
37453|   395k|    janet_vm.fiber = state->vm_fiber;
37454|   395k|    janet_vm.signal_buf = state->vm_jmp_buf;
37455|   395k|    janet_vm.return_reg = state->vm_return_reg;
37456|   395k|    janet_vm.coerce_error = state->coerce_error;
37457|   395k|}
janet_continue:
37554|   387k|JanetSignal janet_continue(JanetFiber *fiber, Janet in, Janet *out) {
37555|       |    /* Check conditions */
37556|   387k|    JanetSignal tmp_signal = janet_check_can_resume(fiber, out, 0);
37557|   387k|    if (tmp_signal) return tmp_signal;
  ------------------
  |  Branch (37557:9): [True: 0, False: 387k]
  ------------------
37558|   387k|    return janet_continue_no_check(fiber, in, out);
37559|   387k|}
janet_continue_signal:
37562|    538|JanetSignal janet_continue_signal(JanetFiber *fiber, Janet in, Janet *out, JanetSignal sig) {
37563|    538|    JanetSignal tmp_signal = janet_check_can_resume(fiber, out, sig != JANET_SIGNAL_OK);
37564|    538|    if (tmp_signal) return tmp_signal;
  ------------------
  |  Branch (37564:9): [True: 0, False: 538]
  ------------------
37565|    538|    if (sig != JANET_SIGNAL_OK) {
  ------------------
  |  Branch (37565:9): [True: 0, False: 538]
  ------------------
37566|      0|        JanetFiber *child = fiber;
37567|      0|        while (child->child) child = child->child;
  ------------------
  |  Branch (37567:16): [True: 0, False: 0]
  ------------------
37568|      0|        child->gc.flags &= ~JANET_FIBER_STATUS_MASK;
  ------------------
  |  |  779|      0|#define JANET_FIBER_STATUS_MASK 0x3F0000
  ------------------
37569|      0|        child->gc.flags |= sig << JANET_FIBER_STATUS_OFFSET;
  ------------------
  |  |  781|      0|#define JANET_FIBER_STATUS_OFFSET 16
  ------------------
37570|      0|        child->flags |= JANET_FIBER_RESUME_SIGNAL;
  ------------------
  |  |  780|      0|#define JANET_FIBER_RESUME_SIGNAL 0x400000
  ------------------
37571|      0|    }
37572|    538|    return janet_continue_no_check(fiber, in, out);
37573|    538|}
janet_mcall:
37595|  3.40k|Janet janet_mcall(const char *name, int32_t argc, Janet *argv) {
37596|       |    /* At least 1 argument */
37597|  3.40k|    if (argc < 1) {
  ------------------
  |  Branch (37597:9): [True: 0, False: 3.40k]
  ------------------
37598|      0|        janet_panicf("method :%s expected at least 1 argument", name);
37599|      0|    }
37600|       |    /* Find method */
37601|  3.40k|    Janet method = janet_method_lookup(argv[0], name);
37602|  3.40k|    if (janet_checktype(method, JANET_NIL)) {
  ------------------
  |  |  801|  3.40k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 19, False: 3.38k]
  |  |  |  Branch (801:6): [Folded, False: 3.40k]
  |  |  ------------------
  |  |  802|  3.40k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  3.40k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  3.40k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  3.40k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  3.40k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  3.40k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37603|     19|        janet_panicf("could not find method :%s for %v", name, argv[0]);
37604|     19|    }
37605|       |    /* Invoke method */
37606|  3.38k|    return janet_method_invoke(method, argc, argv);
37607|  3.40k|}
janet_init:
37610|  7.65k|int janet_init(void) {
37611|       |
37612|       |    /* Garbage collection */
37613|  7.65k|    janet_vm.blocks = NULL;
37614|  7.65k|    janet_vm.weak_blocks = NULL;
37615|  7.65k|    janet_vm.next_collection = 0;
37616|  7.65k|    janet_vm.gc_interval = 0x400000;
37617|  7.65k|    janet_vm.block_count = 0;
37618|  7.65k|    janet_vm.gc_mark_phase = 0;
37619|       |
37620|  7.65k|    janet_symcache_init();
37621|       |
37622|       |    /* Initialize gc roots */
37623|  7.65k|    janet_vm.roots = NULL;
37624|  7.65k|    janet_vm.root_count = 0;
37625|  7.65k|    janet_vm.root_capacity = 0;
37626|       |
37627|       |    /* Scratch memory */
37628|  7.65k|    janet_vm.user = NULL;
37629|  7.65k|    janet_vm.scratch_mem = NULL;
37630|  7.65k|    janet_vm.scratch_len = 0;
37631|  7.65k|    janet_vm.scratch_cap = 0;
37632|       |
37633|       |    /* Sandbox flags */
37634|  7.65k|    janet_vm.sandbox_flags = 0;
37635|       |
37636|       |    /* Initialize registry */
37637|  7.65k|    janet_vm.registry = NULL;
37638|  7.65k|    janet_vm.registry_cap = 0;
37639|  7.65k|    janet_vm.registry_count = 0;
37640|  7.65k|    janet_vm.registry_dirty = 0;
37641|       |
37642|       |    /* Initialize abstract registry */
37643|  7.65k|    janet_vm.abstract_registry = janet_table(0);
37644|  7.65k|    janet_gcroot(janet_wrap_table(janet_vm.abstract_registry));
  ------------------
  |  |  841|  7.65k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|  7.65k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  7.65k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  7.65k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37645|       |
37646|       |    /* Traversal */
37647|  7.65k|    janet_vm.traversal = NULL;
37648|  7.65k|    janet_vm.traversal_base = NULL;
37649|  7.65k|    janet_vm.traversal_top = NULL;
37650|       |
37651|       |    /* Core env */
37652|  7.65k|    janet_vm.core_env = NULL;
37653|       |
37654|       |    /* Auto suspension */
37655|  7.65k|    janet_vm.auto_suspend = 0;
37656|       |
37657|       |    /* Dynamic bindings */
37658|  7.65k|    janet_vm.top_dyns = NULL;
37659|       |
37660|       |    /* Seed RNG */
37661|  7.65k|    janet_rng_seed(janet_default_rng(), 0);
37662|       |
37663|       |    /* Fibers */
37664|  7.65k|    janet_vm.fiber = NULL;
37665|  7.65k|    janet_vm.root_fiber = NULL;
37666|  7.65k|    janet_vm.stackn = 0;
37667|       |
37668|  7.65k|#ifdef JANET_EV
37669|  7.65k|    janet_ev_init();
37670|  7.65k|#endif
37671|  7.65k|#ifdef JANET_NET
37672|  7.65k|    janet_net_init();
37673|  7.65k|#endif
37674|  7.65k|    return 0;
37675|  7.65k|}
janet_sandbox_assert:
37683|  7.09k|void janet_sandbox_assert(uint32_t forbidden_flags) {
37684|  7.09k|    if (forbidden_flags & janet_vm.sandbox_flags) {
  ------------------
  |  Branch (37684:9): [True: 0, False: 7.09k]
  ------------------
37685|      0|        janet_panic("operation forbidden by sandbox");
37686|      0|    }
37687|  7.09k|}
janet_deinit:
37690|  7.65k|void janet_deinit(void) {
37691|  7.65k|    janet_clear_memory();
37692|  7.65k|    janet_symcache_deinit();
37693|  7.65k|    janet_free(janet_vm.roots);
  ------------------
  |  | 2402|  7.65k|#define janet_free(X) free((X))
  ------------------
37694|  7.65k|    janet_vm.roots = NULL;
37695|  7.65k|    janet_vm.root_count = 0;
37696|  7.65k|    janet_vm.root_capacity = 0;
37697|  7.65k|    janet_vm.abstract_registry = NULL;
37698|  7.65k|    janet_vm.core_env = NULL;
37699|  7.65k|    janet_vm.top_dyns = NULL;
37700|  7.65k|    janet_vm.user = NULL;
37701|  7.65k|    janet_free(janet_vm.traversal_base);
  ------------------
  |  | 2402|  7.65k|#define janet_free(X) free((X))
  ------------------
37702|  7.65k|    janet_vm.fiber = NULL;
37703|  7.65k|    janet_vm.root_fiber = NULL;
37704|  7.65k|    janet_free(janet_vm.registry);
  ------------------
  |  | 2402|  7.65k|#define janet_free(X) free((X))
  ------------------
37705|       |    janet_vm.registry = NULL;
37706|  7.65k|#ifdef JANET_EV
37707|  7.65k|    janet_ev_deinit();
37708|  7.65k|#endif
37709|  7.65k|#ifdef JANET_NET
37710|  7.65k|    janet_net_deinit();
37711|  7.65k|#endif
37712|  7.65k|}
janet_memalloc_empty:
37880|  10.3M|void *janet_memalloc_empty(int32_t count) {
37881|  10.3M|    int32_t i;
37882|  10.3M|    void *mem = janet_malloc((size_t) count * sizeof(JanetKV));
  ------------------
  |  | 2393|  10.3M|#define janet_malloc(X) malloc((X))
  ------------------
37883|  10.3M|    janet_vm.next_collection += (size_t) count * sizeof(JanetKV);
37884|  10.3M|    if (NULL == mem) {
  ------------------
  |  Branch (37884:9): [True: 0, False: 10.3M]
  ------------------
37885|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
37886|      0|    }
37887|  10.3M|    JanetKV *mmem = (JanetKV *)mem;
37888|   160M|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (37888:17): [True: 150M, False: 10.3M]
  ------------------
37889|   150M|        JanetKV *kv = mmem + i;
37890|   150M|        kv->key = janet_wrap_nil();
  ------------------
  |  |  826|   150M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|   150M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   150M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   150M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37891|   150M|        kv->value = janet_wrap_nil();
  ------------------
  |  |  826|   150M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|   150M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   150M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   150M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37892|   150M|    }
37893|  10.3M|    return mem;
37894|  10.3M|}
janet_memempty:
37896|  10.6M|void janet_memempty(JanetKV *mem, int32_t count) {
37897|  10.6M|    int32_t i;
37898|   345M|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (37898:17): [True: 334M, False: 10.6M]
  ------------------
37899|   334M|        mem[i].key = janet_wrap_nil();
  ------------------
  |  |  826|   334M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|   334M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   334M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   334M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37900|   334M|        mem[i].value = janet_wrap_nil();
  ------------------
  |  |  826|   334M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|   334M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   334M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   334M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37901|   334M|    }
37902|  10.6M|}
janet_wrap_number_safe:
37906|  52.5k|Janet janet_wrap_number_safe(double d) {
37907|  52.5k|    Janet ret;
37908|  52.5k|    ret.number = isnan(d) ? NAN : d;
  ------------------
  |  Branch (37908:18): [True: 7.50k, False: 45.0k]
  ------------------
37909|  52.5k|    return ret;
37910|  52.5k|}
janet_nanbox_to_pointer:
37912|  11.4G|void *janet_nanbox_to_pointer(Janet x) {
37913|  11.4G|    x.i64 &= JANET_NANBOX_PAYLOADBITS;
  ------------------
  |  |  786|  11.4G|#define JANET_NANBOX_PAYLOADBITS 0x00007FFFFFFFFFFFllu
  ------------------
37914|  11.4G|    x.u64 <<= JANET_NANBOX_64_POINTER_SHIFT; /* Alignment, usually 0 */
  ------------------
  |  |  336|  11.4G|#define JANET_NANBOX_64_POINTER_SHIFT 0
  ------------------
37915|  11.4G|    return x.pointer;
37916|  11.4G|}
janet_nanbox_from_pointer:
37918|   168M|Janet janet_nanbox_from_pointer(void *p, uint64_t tagmask) {
37919|   168M|    Janet ret;
37920|   168M|    ret.pointer = p;
37921|       |    /* Should be noop when pointer shift is 0 */
37922|       |    /*
37923|       |    janet_assert(!(ret.u64 & (uint64_t) ((1 << JANET_NANBOX_64_POINTER_SHIFT) - 1)), "unaligned pointer wrap");
37924|       |    */
37925|   168M|    ret.u64 >>= JANET_NANBOX_64_POINTER_SHIFT; /* Alignment, usually 0 */
  ------------------
  |  |  336|   168M|#define JANET_NANBOX_64_POINTER_SHIFT 0
  ------------------
37926|   168M|    ret.u64 |= tagmask;
37927|   168M|    return ret;
37928|   168M|}
janet_nanbox_from_cpointer:
37930|   271M|Janet janet_nanbox_from_cpointer(const void *p, uint64_t tagmask) {
37931|   271M|    Janet ret;
37932|   271M|    ret.pointer = (void *)p;
37933|       |    /* Should be noop when pointer shift is 0 */
37934|       |    /*
37935|       |    janet_assert(!(ret.u64 & (uint64_t) ((1 << JANET_NANBOX_64_POINTER_SHIFT) - 1)), "unaligned pointer wrap");
37936|       |    */
37937|   271M|    ret.u64 >>= JANET_NANBOX_64_POINTER_SHIFT; /* Alignment, usually 0 */
  ------------------
  |  |  336|   271M|#define JANET_NANBOX_64_POINTER_SHIFT 0
  ------------------
37938|   271M|    ret.u64 |= tagmask;
37939|   271M|    return ret;
37940|   271M|}
janet_nanbox_from_double:
37942|   352M|Janet janet_nanbox_from_double(double d) {
37943|   352M|    Janet ret;
37944|   352M|    ret.number = d;
37945|   352M|    return ret;
37946|   352M|}
janet_nanbox_from_bits:
37948|  3.93G|Janet janet_nanbox_from_bits(uint64_t bits) {
37949|  3.93G|    Janet ret;
37950|  3.93G|    ret.u64 = bits;
37951|  3.93G|    return ret;
37952|  3.93G|}
janet.c:janet_array_impl:
 1547|   114k|static void janet_array_impl(JanetArray *array, int32_t capacity) {
 1548|   114k|    Janet *data = NULL;
 1549|   114k|    if (capacity > 0) {
  ------------------
  |  Branch (1549:9): [True: 60.7k, False: 53.5k]
  ------------------
 1550|  60.7k|        janet_vm.next_collection += capacity * sizeof(Janet);
 1551|  60.7k|        data = (Janet *) janet_malloc(sizeof(Janet) * (size_t) capacity);
  ------------------
  |  | 2393|  60.7k|#define janet_malloc(X) malloc((X))
  ------------------
 1552|  60.7k|        if (NULL == data) {
  ------------------
  |  Branch (1552:13): [True: 0, False: 60.7k]
  ------------------
 1553|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1554|      0|        }
 1555|  60.7k|    }
 1556|   114k|    array->count = 0;
 1557|   114k|    array->capacity = capacity;
 1558|   114k|    array->data = data;
 1559|   114k|}
janet.c:janet_buffer_init_impl:
 3114|  5.80M|static JanetBuffer *janet_buffer_init_impl(JanetBuffer *buffer, int32_t capacity) {
 3115|  5.80M|    uint8_t *data = NULL;
 3116|  5.80M|    if (capacity < 4) capacity = 4;
  ------------------
  |  Branch (3116:9): [True: 5.51M, False: 298k]
  ------------------
 3117|  5.80M|    janet_gcpressure(capacity);
 3118|  5.80M|    data = janet_malloc(sizeof(uint8_t) * (size_t) capacity);
  ------------------
  |  | 2393|  5.80M|#define janet_malloc(X) malloc((X))
  ------------------
 3119|  5.80M|    if (NULL == data) {
  ------------------
  |  Branch (3119:9): [True: 0, False: 5.80M]
  ------------------
 3120|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3121|      0|    }
 3122|  5.80M|    buffer->count = 0;
 3123|  5.80M|    buffer->capacity = capacity;
 3124|  5.80M|    buffer->data = data;
 3125|  5.80M|    return buffer;
 3126|  5.80M|}
janet.c:janet_buffer_can_realloc:
 3107|  10.8M|static void janet_buffer_can_realloc(JanetBuffer *buffer) {
 3108|  10.8M|    if (buffer->gc.flags & JANET_BUFFER_FLAG_NO_REALLOC) {
  ------------------
  |  | 1770|  10.8M|#define JANET_BUFFER_FLAG_NO_REALLOC 0x10000
  ------------------
  |  Branch (3108:9): [True: 0, False: 10.8M]
  ------------------
 3109|      0|        janet_panic("buffer cannot reallocate foreign memory");
 3110|      0|    }
 3111|  10.8M|}
janet.c:buffer_push_impl:
 3531|  61.8k|static void buffer_push_impl(JanetBuffer *buffer, Janet *argv, int32_t argc_offset, int32_t argc) {
 3532|   123k|    for (int32_t i = argc_offset; i < argc; i++) {
  ------------------
  |  Branch (3532:35): [True: 61.8k, False: 61.8k]
  ------------------
 3533|  61.8k|        if (janet_checktype(argv[i], JANET_NUMBER)) {
  ------------------
  |  |  801|  61.8k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 48.1k, False: 13.6k]
  |  |  |  Branch (801:6): [True: 61.8k, Folded]
  |  |  ------------------
  |  |  802|  61.8k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|  61.8k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 48.1k, False: 13.6k]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 13.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  61.8k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3534|  48.1k|            janet_buffer_push_u8(buffer, (uint8_t)(janet_getinteger(argv, i) & 0xFF));
 3535|  48.1k|        } else {
 3536|  13.6k|            JanetByteView view = janet_getbytes(argv, i);
 3537|  13.6k|            if (view.bytes == buffer->data) {
  ------------------
  |  Branch (3537:17): [True: 0, False: 13.6k]
  ------------------
 3538|      0|                janet_buffer_ensure(buffer, buffer->count + view.len, 2);
 3539|      0|                view.bytes = buffer->data;
 3540|      0|            }
 3541|  13.6k|            janet_buffer_push_bytes(buffer, view.bytes, view.len);
 3542|  13.6k|        }
 3543|  61.8k|    }
 3544|  61.8k|}
janet.c:bitloc:
 3618|      9|static void bitloc(int32_t argc, Janet *argv, JanetBuffer **b, int32_t *index, int *bit) {
 3619|      9|    janet_fixarity(argc, 2);
 3620|      9|    JanetBuffer *buffer = janet_getbuffer(argv, 0);
 3621|      9|    double x = janet_getnumber(argv, 1);
 3622|      9|    int64_t bitindex = (int64_t) x;
 3623|      9|    int64_t byteindex = bitindex >> 3;
 3624|      9|    int which_bit = bitindex & 7;
 3625|      9|    if (bitindex != x || bitindex < 0 || byteindex >= buffer->count)
  ------------------
  |  Branch (3625:9): [True: 4, False: 5]
  |  Branch (3625:26): [True: 0, False: 5]
  |  Branch (3625:42): [True: 3, False: 2]
  ------------------
 3626|      4|        janet_panicf("invalid bit index %v", argv[1]);
 3627|      5|    *b = buffer;
 3628|      5|    *index = (int32_t) byteindex;
 3629|      5|    *bit = which_bit;
 3630|      5|}
janet.c:janet_strlike_cmp:
 4653|  29.5k|static int janet_strlike_cmp(JanetType type, Janet x, const char *cstring) {
 4654|  29.5k|    if (janet_type(x) != type) return 0;
  ------------------
  |  |  790|  29.5k|    (isnan((x).number) \
  |  |  791|  29.5k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  29.5k|        : JANET_NUMBER)
  ------------------
  |  Branch (4654:9): [True: 28.6k, False: 975]
  |  Branch (4654:9): [True: 7.23k, False: 22.3k]
  ------------------
 4655|  22.3k|    return !janet_cstrcmp(janet_unwrap_string(x), cstring);
  ------------------
  |  |  858|  22.3k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
 4656|  29.5k|}
janet.c:maxarity1:
 5048|      7|static int maxarity1(JanetFopts opts, JanetSlot *args) {
 5049|      7|    (void) opts;
 5050|       |    return janet_v_count(args) <= 1;
  ------------------
  |  |  708|      7|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|      6|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|      6|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 6, False: 1]
  |  |  ------------------
  ------------------
 5051|      7|}
janet.c:do_debug:
 5166|      2|static JanetSlot do_debug(JanetFopts opts, JanetSlot *args) {
 5167|      2|    (void)args;
 5168|      2|    int32_t len = janet_v_count(args);
  ------------------
  |  |  708|      2|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|      1|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|      1|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 1, False: 1]
  |  |  ------------------
  ------------------
 5169|      2|    JanetSlot t = janetc_gettarget(opts);
 5170|      2|    janetc_emit_ssu(opts.compiler, JOP_SIGNAL, t,
 5171|      2|                    (len == 1) ? args[0] : janetc_cslot(janet_wrap_nil()),
  ------------------
  |  |  826|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5171:21): [True: 1, False: 1]
  ------------------
 5172|      2|                    JANET_SIGNAL_DEBUG,
 5173|      2|                    1);
 5174|      2|    return t;
 5175|      2|}
janet.c:fixarity1:
 5044|     77|static int fixarity1(JanetFopts opts, JanetSlot *args) {
 5045|     77|    (void) opts;
 5046|       |    return janet_v_count(args) == 1;
  ------------------
  |  |  708|     77|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|     76|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|     76|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 76, False: 1]
  |  |  ------------------
  ------------------
 5047|     77|}
janet.c:do_error:
 5162|     20|static JanetSlot do_error(JanetFopts opts, JanetSlot *args) {
 5163|     20|    janetc_emit_s(opts.compiler, JOP_ERROR, args[0], 0);
 5164|     20|    return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|     20|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|     20|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     20|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     20|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5165|     20|}
janet.c:minarity2:
 5052|  4.31k|static int minarity2(JanetFopts opts, JanetSlot *args) {
 5053|  4.31k|    (void) opts;
 5054|       |    return janet_v_count(args) >= 2;
  ------------------
  |  |  708|  4.31k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  4.31k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  4.31k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 4.31k, False: 0]
  |  |  ------------------
  ------------------
 5055|  4.31k|}
janet.c:do_apply:
 5248|  4.31k|static JanetSlot do_apply(JanetFopts opts, JanetSlot *args) {
 5249|       |    /* Push phase */
 5250|  4.31k|    JanetCompiler *c = opts.compiler;
 5251|  4.31k|    int32_t i;
 5252|  4.31k|    for (i = 1; i < janet_v_count(args) - 3; i += 3)
  ------------------
  |  |  708|  4.31k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  4.31k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  4.31k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 4.31k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (5252:17): [True: 0, False: 4.31k]
  ------------------
 5253|      0|        janetc_emit_sss(c, JOP_PUSH_3, args[i], args[i + 1], args[i + 2], 0);
 5254|  4.31k|    if (i == janet_v_count(args) - 3)
  ------------------
  |  |  708|  4.31k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  4.31k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  4.31k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 4.31k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (5254:9): [True: 0, False: 4.31k]
  ------------------
 5255|      0|        janetc_emit_ss(c, JOP_PUSH_2, args[i], args[i + 1], 0);
 5256|  4.31k|    else if (i == janet_v_count(args) - 2)
  ------------------
  |  |  708|  4.31k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  4.31k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  4.31k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 4.31k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (5256:14): [True: 0, False: 4.31k]
  ------------------
 5257|      0|        janetc_emit_s(c, JOP_PUSH, args[i], 0);
 5258|       |    /* Push array phase */
 5259|  4.31k|    janetc_emit_s(c, JOP_PUSH_ARRAY, janet_v_last(args), 0);
  ------------------
  |  |  709|  4.31k|#define janet_v_last(v)         ((v)[janet_v__cnt(v) - 1])
  |  |  ------------------
  |  |  |  |  715|  4.31k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  4.31k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5260|       |    /* Call phase */
 5261|  4.31k|    JanetSlot target;
 5262|  4.31k|    if (opts.flags & JANET_FOPTS_TAIL) {
  ------------------
  |  | 1091|  4.31k|#define JANET_FOPTS_TAIL 0x10000
  ------------------
  |  Branch (5262:9): [True: 0, False: 4.31k]
  ------------------
 5263|      0|        janetc_emit_s(c, JOP_TAILCALL, args[0], 0);
 5264|      0|        target = janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5265|      0|        target.flags |= JANET_SLOT_RETURNED;
  ------------------
  |  |  987|      0|#define JANET_SLOT_RETURNED 0x100000
  ------------------
 5266|  4.31k|    } else {
 5267|  4.31k|        target = janetc_gettarget(opts);
 5268|  4.31k|        janetc_emit_ss(c, JOP_CALL, target, args[0], 1);
 5269|  4.31k|    }
 5270|  4.31k|    return target;
 5271|  4.31k|}
janet.c:do_yield:
 5235|      2|static JanetSlot do_yield(JanetFopts opts, JanetSlot *args) {
 5236|      2|    if (janet_v_count(args) == 0) {
  ------------------
  |  |  708|      2|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|      2|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|      2|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (5236:9): [True: 0, False: 2]
  ------------------
 5237|      0|        return genericSSI(opts, JOP_SIGNAL, janetc_cslot(janet_wrap_nil()), 3);
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5238|      2|    } else {
 5239|      2|        return genericSSI(opts, JOP_SIGNAL, args[0], 3);
 5240|      2|    }
 5241|      2|}
janet.c:genericSSI:
 5073|      2|static JanetSlot genericSSI(JanetFopts opts, int op, JanetSlot s, int32_t imm) {
 5074|      2|    JanetSlot target = janetc_gettarget(opts);
 5075|      2|    janetc_emit_ssi(opts.compiler, op, target, s, imm, 1);
 5076|      2|    return target;
 5077|      2|}
janet.c:arity1or2:
 5034|  3.05k|static int arity1or2(JanetFopts opts, JanetSlot *args) {
 5035|  3.05k|    (void) opts;
 5036|  3.05k|    int32_t arity = janet_v_count(args);
  ------------------
  |  |  708|  3.05k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  3.05k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  3.05k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 3.05k, False: 0]
  |  |  ------------------
  ------------------
 5037|  3.05k|    return arity == 1 || arity == 2;
  ------------------
  |  Branch (5037:12): [True: 46, False: 3.01k]
  |  Branch (5037:26): [True: 3.01k, False: 0]
  ------------------
 5038|  3.05k|}
janet.c:do_resume:
 5242|     46|static JanetSlot do_resume(JanetFopts opts, JanetSlot *args) {
 5243|     46|    return opfunction(opts, args, JOP_RESUME, janet_wrap_nil());
  ------------------
  |  |  826|     46|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|     46|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     46|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     46|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5244|     46|}
janet.c:opfunction:
 5084|  3.05k|    Janet defaultArg2) {
 5085|  3.05k|    JanetCompiler *c = opts.compiler;
 5086|  3.05k|    int32_t len;
 5087|  3.05k|    len = janet_v_count(args);
  ------------------
  |  |  708|  3.05k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  3.05k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  3.05k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 3.05k, False: 0]
  |  |  ------------------
  ------------------
 5088|  3.05k|    JanetSlot t;
 5089|  3.05k|    if (len == 1) {
  ------------------
  |  Branch (5089:9): [True: 46, False: 3.01k]
  ------------------
 5090|     46|        t = janetc_gettarget(opts);
 5091|     46|        janetc_emit_sss(c, op, t, args[0], janetc_cslot(defaultArg2), 1);
 5092|     46|        return t;
 5093|  3.01k|    } else {
 5094|       |        /* len == 2 */
 5095|  3.01k|        t = janetc_gettarget(opts);
 5096|  3.01k|        janetc_emit_sss(c, op, t, args[0], args[1], 1);
 5097|  3.01k|    }
 5098|  3.01k|    return t;
 5099|  3.05k|}
janet.c:fixarity2:
 5056|  2.04k|static int fixarity2(JanetFopts opts, JanetSlot *args) {
 5057|  2.04k|    (void) opts;
 5058|       |    return janet_v_count(args) == 2;
  ------------------
  |  |  708|  2.04k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  2.04k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  2.04k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 2.04k, False: 0]
  |  |  ------------------
  ------------------
 5059|  2.04k|}
janet.c:do_in:
 5176|  1.98k|static JanetSlot do_in(JanetFopts opts, JanetSlot *args) {
 5177|  1.98k|    return opreduce(opts, args, JOP_IN, 0, janet_wrap_nil(), janet_wrap_nil());
  ------------------
  |  |  826|  1.98k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  1.98k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.98k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.98k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  return opreduce(opts, args, JOP_IN, 0, janet_wrap_nil(), janet_wrap_nil());
  ------------------
  |  |  826|  1.98k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  1.98k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.98k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.98k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5178|  1.98k|}
janet.c:opreduce:
 5123|  3.23k|    Janet unary) {
 5124|  3.23k|    JanetCompiler *c = opts.compiler;
 5125|  3.23k|    int32_t i, len;
 5126|  3.23k|    int8_t imm = 0;
 5127|  3.23k|    len = janet_v_count(args);
  ------------------
  |  |  708|  3.23k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  3.12k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  3.12k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 3.12k, False: 114]
  |  |  ------------------
  ------------------
 5128|  3.23k|    JanetSlot t;
 5129|  3.23k|    if (len == 0) {
  ------------------
  |  Branch (5129:9): [True: 114, False: 3.12k]
  ------------------
 5130|    114|        return janetc_cslot(nullary);
 5131|  3.12k|    } else if (len == 1) {
  ------------------
  |  Branch (5131:16): [True: 153, False: 2.96k]
  ------------------
 5132|    153|        t = janetc_gettarget(opts);
 5133|       |        /* Special case subtract to be times -1 */
 5134|    153|        if (op == JOP_SUBTRACT) {
  ------------------
  |  Branch (5134:13): [True: 11, False: 142]
  ------------------
 5135|     11|            janetc_emit_ssi(c, JOP_MULTIPLY_IMMEDIATE, t, args[0], -1, 1);
 5136|    142|        } else {
 5137|    142|            janetc_emit_sss(c, op, t, janetc_cslot(unary), args[0], 1);
 5138|    142|        }
 5139|    153|        return t;
 5140|    153|    }
 5141|  2.96k|    t = janetc_gettarget(opts);
 5142|  2.96k|    if (opim && can_slot_be_imm(args[1], &imm)) {
  ------------------
  |  Branch (5142:9): [True: 584, False: 2.38k]
  |  Branch (5142:17): [True: 107, False: 477]
  ------------------
 5143|    107|        janetc_emit_ssi(c, opim, t, args[0], imm, 1);
 5144|  2.86k|    } else {
 5145|  2.86k|        janetc_emit_sss(c, op, t, args[0], args[1], 1);
 5146|  2.86k|    }
 5147|  15.8k|    for (i = 2; i < len; i++) {
  ------------------
  |  Branch (5147:17): [True: 12.8k, False: 2.96k]
  ------------------
 5148|  12.8k|        if (opim && can_slot_be_imm(args[i], &imm)) {
  ------------------
  |  Branch (5148:13): [True: 9.63k, False: 3.20k]
  |  Branch (5148:21): [True: 1.24k, False: 8.39k]
  ------------------
 5149|  1.24k|            janetc_emit_ssi(c, opim, t, t, imm, 1);
 5150|  11.5k|        } else {
 5151|  11.5k|            janetc_emit_sss(c, op, t, t, args[i], 1);
 5152|  11.5k|        }
 5153|  12.8k|    }
 5154|  2.96k|    return t;
 5155|  3.23k|}
janet.c:can_slot_be_imm:
 5111|  75.1k|static int can_slot_be_imm(JanetSlot s, int8_t *out) {
 5112|  75.1k|    if (!(s.flags & JANET_SLOT_CONSTANT)) return 0;
  ------------------
  |  |  983|  75.1k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (5112:9): [True: 25.2k, False: 49.9k]
  ------------------
 5113|  49.9k|    return can_be_imm(s.constant, out);
 5114|  75.1k|}
janet.c:can_be_imm:
 5102|  49.9k|static int can_be_imm(Janet x, int8_t *out) {
 5103|  49.9k|    if (!janet_checkint(x)) return 0;
  ------------------
  |  Branch (5103:9): [True: 45.7k, False: 4.13k]
  ------------------
 5104|  4.13k|    int32_t integer = janet_unwrap_integer(x);
  ------------------
  |  |  957|  4.13k|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  834|  4.13k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
 5105|  4.13k|    if (integer > INT8_MAX || integer < INT8_MIN) return 0;
  ------------------
  |  Branch (5105:9): [True: 1.14k, False: 2.99k]
  |  Branch (5105:31): [True: 174, False: 2.81k]
  ------------------
 5106|  2.81k|    *out = (int8_t) integer;
 5107|  2.81k|    return 1;
 5108|  4.13k|}
janet.c:do_length:
 5232|     42|static JanetSlot do_length(JanetFopts opts, JanetSlot *args) {
 5233|     42|    return genericSS(opts, JOP_LENGTH, args[0]);
 5234|     42|}
janet.c:genericSS:
 5066|     42|static JanetSlot genericSS(JanetFopts opts, int op, JanetSlot s) {
 5067|     42|    JanetSlot target = janetc_gettarget(opts);
 5068|     42|    janetc_emit_ss(opts.compiler, op, target, s, 1);
 5069|     42|    return target;
 5070|     42|}
janet.c:do_add:
 5275|    152|static JanetSlot do_add(JanetFopts opts, JanetSlot *args) {
 5276|    152|    return opreduce(opts, args, JOP_ADD, JOP_ADD_IMMEDIATE, janet_wrap_integer(0), janet_wrap_integer(0));
  ------------------
  |  |  958|    152|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|    152|#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));
  ------------------
  |  |  958|    152|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|    152|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 5277|    152|}
janet.c:do_sub:
 5278|    100|static JanetSlot do_sub(JanetFopts opts, JanetSlot *args) {
 5279|    100|    return opreduce(opts, args, JOP_SUBTRACT, JOP_SUBTRACT_IMMEDIATE, janet_wrap_integer(0), janet_wrap_integer(0));
  ------------------
  |  |  958|    100|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|    100|#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));
  ------------------
  |  |  958|    100|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|    100|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 5280|    100|}
janet.c:do_mul:
 5281|     97|static JanetSlot do_mul(JanetFopts opts, JanetSlot *args) {
 5282|     97|    return opreduce(opts, args, JOP_MULTIPLY, JOP_MULTIPLY_IMMEDIATE, janet_wrap_integer(1), janet_wrap_integer(1));
  ------------------
  |  |  958|     97|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|     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));
  ------------------
  |  |  958|     97|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|     97|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 5283|     97|}
janet.c:do_div:
 5284|    475|static JanetSlot do_div(JanetFopts opts, JanetSlot *args) {
 5285|    475|    return opreduce(opts, args, JOP_DIVIDE, JOP_DIVIDE_IMMEDIATE, janet_wrap_integer(1), janet_wrap_integer(1));
  ------------------
  |  |  958|    475|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|    475|#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));
  ------------------
  |  |  958|    475|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|    475|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 5286|    475|}
janet.c:do_bor:
 5299|     62|static JanetSlot do_bor(JanetFopts opts, JanetSlot *args) {
 5300|     62|    return opreduce(opts, args, JOP_BOR, 0, janet_wrap_integer(0), janet_wrap_integer(0));
  ------------------
  |  |  958|     62|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|     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));
  ------------------
  |  |  958|     62|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|     62|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 5301|     62|}
janet.c:do_gt:
 5357|    248|static JanetSlot do_gt(JanetFopts opts, JanetSlot *args) {
 5358|    248|    return compreduce(opts, args, JOP_GREATER_THAN, JOP_GREATER_THAN_IMMEDIATE, 0);
 5359|    248|}
janet.c:compreduce:
 5324|  2.24k|    int invert) {
 5325|  2.24k|    JanetCompiler *c = opts.compiler;
 5326|  2.24k|    int32_t i, len;
 5327|  2.24k|    int8_t imm = 0;
 5328|  2.24k|    len = janet_v_count(args);
  ------------------
  |  |  708|  2.24k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  1.54k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  1.54k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 1.54k, False: 697]
  |  |  ------------------
  ------------------
 5329|  2.24k|    int32_t *labels = NULL;
 5330|  2.24k|    JanetSlot t;
 5331|  2.24k|    if (len < 2) {
  ------------------
  |  Branch (5331:9): [True: 817, False: 1.42k]
  ------------------
 5332|    817|        return invert
  ------------------
  |  Branch (5332:16): [True: 0, False: 817]
  ------------------
 5333|    817|               ? janetc_cslot(janet_wrap_false())
  ------------------
  |  |  828|      0|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5334|    817|               : janetc_cslot(janet_wrap_true());
  ------------------
  |  |  827|    817|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  817|    817|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    817|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    817|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5335|    817|    }
 5336|  1.42k|    t = janetc_gettarget(opts);
 5337|  70.8k|    for (i = 1; i < len; i++) {
  ------------------
  |  Branch (5337:17): [True: 69.4k, False: 1.42k]
  ------------------
 5338|  69.4k|        if (opim && can_slot_be_imm(args[i], &imm)) {
  ------------------
  |  Branch (5338:13): [True: 64.9k, False: 4.52k]
  |  Branch (5338:21): [True: 1.46k, False: 63.4k]
  ------------------
 5339|  1.46k|            janetc_emit_ssi(c, opim, t, args[i - 1], imm, 1);
 5340|  67.9k|        } else {
 5341|  67.9k|            janetc_emit_sss(c, op, t, args[i - 1], args[i], 1);
 5342|  67.9k|        }
 5343|  69.4k|        if (i != (len - 1)) {
  ------------------
  |  Branch (5343:13): [True: 68.0k, False: 1.42k]
  ------------------
 5344|  68.0k|            int32_t label = janetc_emit_si(c, invert ? JOP_JUMP_IF : JOP_JUMP_IF_NOT, t, 0, 1);
  ------------------
  |  Branch (5344:47): [True: 0, False: 68.0k]
  ------------------
 5345|  68.0k|            janet_v_push(labels, label);
  ------------------
  |  |  706|  68.0k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  68.0k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  68.0k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  66.8k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  66.8k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  66.8k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  66.8k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 1.14k, False: 66.8k]
  |  |  |  |  |  |  |  Branch (717:50): [True: 3.91k, False: 62.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  5.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))
  |  |  ------------------
  |  |  |  |  715|  68.0k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  68.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5346|  68.0k|        }
 5347|  69.4k|    }
 5348|  1.42k|    int32_t end = janet_v_count(c->buffer);
  ------------------
  |  |  708|  1.42k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  1.42k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  1.42k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 1.42k, False: 0]
  |  |  ------------------
  ------------------
 5349|  69.4k|    for (i = 0; i < janet_v_count(labels); i++) {
  ------------------
  |  |  708|  69.4k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  69.1k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  69.1k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 69.1k, False: 279]
  |  |  ------------------
  ------------------
  |  Branch (5349:17): [True: 68.0k, False: 1.42k]
  ------------------
 5350|  68.0k|        int32_t label = labels[i];
 5351|  68.0k|        c->buffer[label] |= ((uint32_t)(end - label) << 16);
 5352|  68.0k|    }
 5353|       |    janet_v_free(labels);
  ------------------
  |  |  705|  1.42k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  713|  1.14k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (705:34): [True: 1.14k, False: 279]
  |  |  ------------------
  ------------------
 5354|  1.42k|    return t;
 5355|  2.24k|}
janet.c:do_lt:
 5360|    990|static JanetSlot do_lt(JanetFopts opts, JanetSlot *args) {
 5361|    990|    return compreduce(opts, args, JOP_LESS_THAN, JOP_LESS_THAN_IMMEDIATE, 0);
 5362|    990|}
janet.c:do_gte:
 5363|     73|static JanetSlot do_gte(JanetFopts opts, JanetSlot *args) {
 5364|     73|    return compreduce(opts, args, JOP_GREATER_THAN_EQUAL, 0, 0);
 5365|     73|}
janet.c:do_lte:
 5366|    198|static JanetSlot do_lte(JanetFopts opts, JanetSlot *args) {
 5367|    198|    return compreduce(opts, args, JOP_LESS_THAN_EQUAL, 0, 0);
 5368|    198|}
janet.c:do_eq:
 5369|    734|static JanetSlot do_eq(JanetFopts opts, JanetSlot *args) {
 5370|    734|    return compreduce(opts, args, JOP_EQUALS, JOP_EQUALS_IMMEDIATE, 0);
 5371|    734|}
janet.c:do_neq:
 5372|      1|static JanetSlot do_neq(JanetFopts opts, JanetSlot *args) {
 5373|      1|    return compreduce(opts, args, JOP_NOT_EQUALS, JOP_NOT_EQUALS_IMMEDIATE, 1);
 5374|      1|}
janet.c:do_propagate:
 5159|     45|static JanetSlot do_propagate(JanetFopts opts, JanetSlot *args) {
 5160|     45|    return opreduce(opts, args, JOP_PROPAGATE, 0, janet_wrap_nil(), janet_wrap_nil());
  ------------------
  |  |  826|     45|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|     45|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     45|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     45|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  return opreduce(opts, args, JOP_PROPAGATE, 0, janet_wrap_nil(), janet_wrap_nil());
  ------------------
  |  |  826|     45|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|     45|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     45|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     45|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5161|     45|}
janet.c:arity2or3:
 5039|    217|static int arity2or3(JanetFopts opts, JanetSlot *args) {
 5040|    217|    (void) opts;
 5041|    217|    int32_t arity = janet_v_count(args);
  ------------------
  |  |  708|    217|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|    217|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|    217|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 217, False: 0]
  |  |  ------------------
  ------------------
 5042|    217|    return arity == 2 || arity == 3;
  ------------------
  |  Branch (5042:12): [True: 185, False: 32]
  |  Branch (5042:26): [True: 27, False: 5]
  ------------------
 5043|    217|}
janet.c:do_get:
 5179|    212|static JanetSlot do_get(JanetFopts opts, JanetSlot *args) {
 5180|    212|    if (janet_v_count(args) == 3) {
  ------------------
  |  |  708|    212|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|    212|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|    212|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 212, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (5180:9): [True: 27, False: 185]
  ------------------
 5181|     27|        JanetCompiler *c = opts.compiler;
 5182|     27|        JanetSlot t = janetc_gettarget(opts);
 5183|     27|        int target_is_default = janetc_sequal(t, args[2]);
 5184|     27|        JanetSlot dflt_slot = args[2];
 5185|     27|        if (target_is_default) {
  ------------------
  |  Branch (5185:13): [True: 0, False: 27]
  ------------------
 5186|      0|            dflt_slot = janetc_farslot(c);
 5187|      0|            janetc_copy(c, dflt_slot, t);
 5188|      0|        }
 5189|     27|        janetc_emit_sss(c, JOP_GET, t, args[0], args[1], 1);
 5190|     27|        int32_t label = janetc_emit_si(c, JOP_JUMP_IF_NOT_NIL, t, 0, 0);
 5191|     27|        janetc_copy(c, t, dflt_slot);
 5192|     27|        if (target_is_default) janetc_freeslot(c, dflt_slot);
  ------------------
  |  Branch (5192:13): [True: 0, False: 27]
  ------------------
 5193|     27|        int32_t current = janet_v_count(c->buffer);
  ------------------
  |  |  708|     27|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|     27|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|     27|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 27, False: 0]
  |  |  ------------------
  ------------------
 5194|     27|        c->buffer[label] |= (uint32_t)(current - label) << 16;
 5195|     27|        return t;
 5196|    185|    } else {
 5197|    185|        return opreduce(opts, args, JOP_GET, 0, janet_wrap_nil(), janet_wrap_nil());
  ------------------
  |  |  826|    185|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|    185|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    185|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    185|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      return opreduce(opts, args, JOP_GET, 0, janet_wrap_nil(), janet_wrap_nil());
  ------------------
  |  |  826|    185|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|    185|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    185|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    185|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5198|    185|    }
 5199|    212|}
janet.c:do_next:
 5200|  3.01k|static JanetSlot do_next(JanetFopts opts, JanetSlot *args) {
 5201|  3.01k|    return opfunction(opts, args, JOP_NEXT, janet_wrap_nil());
  ------------------
  |  |  826|  3.01k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  3.01k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  3.01k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  3.01k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5202|  3.01k|}
janet.c:do_modulo:
 5290|     33|static JanetSlot do_modulo(JanetFopts opts, JanetSlot *args) {
 5291|     33|    return opreduce(opts, args, JOP_MODULO, 0, janet_wrap_integer(0), janet_wrap_integer(1));
  ------------------
  |  |  958|     33|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|     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));
  ------------------
  |  |  958|     33|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|     33|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 5292|     33|}
janet.c:do_remainder:
 5293|    100|static JanetSlot do_remainder(JanetFopts opts, JanetSlot *args) {
 5294|    100|    return opreduce(opts, args, JOP_REMAINDER, 0, janet_wrap_integer(0), janet_wrap_integer(1));
  ------------------
  |  |  958|    100|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|    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));
  ------------------
  |  |  958|    100|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|    100|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
 5295|    100|}
janet.c:do_cmp:
 5203|      1|static JanetSlot do_cmp(JanetFopts opts, JanetSlot *args) {
 5204|      1|    return opreduce(opts, args, JOP_COMPARE, 0, janet_wrap_nil(), janet_wrap_nil());
  ------------------
  |  |  826|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  return opreduce(opts, args, JOP_COMPARE, 0, janet_wrap_nil(), janet_wrap_nil());
  ------------------
  |  |  826|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5205|      1|}
janet.c:macroexpand1:
 6248|  1.29M|    const JanetSpecial **spec) {
 6249|  1.29M|    if (!janet_checktype(x, JANET_TUPLE))
  ------------------
  |  |  801|  1.29M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 1.29M]
  |  |  ------------------
  |  |  802|  1.29M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  1.29M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  1.29M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  1.29M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.29M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.29M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6249:9): [True: 259k, False: 1.03M]
  ------------------
 6250|   259k|        return 0;
 6251|  1.03M|    const Janet *form = janet_unwrap_tuple(x);
  ------------------
  |  |  853|  1.03M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
 6252|  1.03M|    if (janet_tuple_length(form) == 0)
  ------------------
  |  | 1792|  1.03M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|  1.03M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (6252:9): [True: 5.16k, False: 1.02M]
  ------------------
 6253|  5.16k|        return 0;
 6254|       |    /* Source map - only set when we get a tuple */
 6255|  1.02M|    if (janet_tuple_sm_line(form) >= 0) {
  ------------------
  |  | 1794|  1.02M|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1790|  1.02M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (6255:9): [True: 505k, False: 521k]
  ------------------
 6256|   505k|        c->current_mapping.line = janet_tuple_sm_line(form);
  ------------------
  |  | 1794|   505k|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1790|   505k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
 6257|   505k|        c->current_mapping.column = janet_tuple_sm_column(form);
  ------------------
  |  | 1795|   505k|#define janet_tuple_sm_column(t) (janet_tuple_head(t)->sm_column)
  |  |  ------------------
  |  |  |  | 1790|   505k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
 6258|   505k|    }
 6259|       |    /* Bracketed tuples are not specials or macros! */
 6260|  1.02M|    if (janet_tuple_flag(form) & JANET_TUPLE_FLAG_BRACKETCTOR)
  ------------------
  |  | 1796|  1.02M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1790|  1.02M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                  if (janet_tuple_flag(form) & JANET_TUPLE_FLAG_BRACKETCTOR)
  ------------------
  |  | 1788|  1.02M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (6260:9): [True: 967, False: 1.02M]
  ------------------
 6261|    967|        return 0;
 6262|  1.02M|    if (!janet_checktype(form[0], JANET_SYMBOL))
  ------------------
  |  |  801|  1.02M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 1.02M]
  |  |  ------------------
  |  |  802|  1.02M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  1.02M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  1.02M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  1.02M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.02M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.02M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6262:9): [True: 15.3k, False: 1.01M]
  ------------------
 6263|  15.3k|        return 0;
 6264|  1.01M|    const uint8_t *name = janet_unwrap_symbol(form[0]);
  ------------------
  |  |  859|  1.01M|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
 6265|  1.01M|    const JanetSpecial *s = janetc_special(name);
 6266|  1.01M|    if (s) {
  ------------------
  |  Branch (6266:9): [True: 848k, False: 162k]
  ------------------
 6267|   848k|        *spec = s;
 6268|   848k|        return 0;
 6269|   848k|    }
 6270|   162k|    Janet macroval;
 6271|   162k|    JanetBindingType btype = janet_resolve(c->env, name, &macroval);
 6272|   162k|    if (!(btype == JANET_BINDING_MACRO || btype == JANET_BINDING_DYNAMIC_MACRO) ||
  ------------------
  |  Branch (6272:11): [True: 151k, False: 10.8k]
  |  Branch (6272:43): [True: 0, False: 10.8k]
  ------------------
 6273|   151k|            !janet_checktype(macroval, JANET_FUNCTION))
  ------------------
  |  |  801|   151k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 151k]
  |  |  ------------------
  |  |  802|   151k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   151k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   151k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   151k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   151k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   151k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6273:13): [True: 0, False: 151k]
  ------------------
 6274|  10.8k|        return 0;
 6275|       |
 6276|       |    /* Evaluate macro */
 6277|   151k|    JanetFunction *macro = janet_unwrap_function(macroval);
  ------------------
  |  |  863|   151k|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
 6278|   151k|    int32_t arity = janet_tuple_length(form) - 1;
  ------------------
  |  | 1792|   151k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|   151k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
 6279|   151k|    JanetFiber *fiberp = janet_fiber(macro, 64, arity, form + 1);
 6280|   151k|    if (NULL == fiberp) {
  ------------------
  |  Branch (6280:9): [True: 6, False: 151k]
  ------------------
 6281|      6|        int32_t minar = macro->def->min_arity;
 6282|      6|        int32_t maxar = macro->def->max_arity;
 6283|      6|        const uint8_t *es = NULL;
 6284|      6|        if (minar >= 0 && arity < minar)
  ------------------
  |  Branch (6284:13): [True: 6, False: 0]
  |  Branch (6284:27): [True: 1, False: 5]
  ------------------
 6285|      1|            es = janet_formatc("macro arity mismatch, expected at least %d, got %d", minar, arity);
 6286|      6|        if (maxar >= 0 && arity > maxar)
  ------------------
  |  Branch (6286:13): [True: 6, False: 0]
  |  Branch (6286:27): [True: 5, False: 1]
  ------------------
 6287|      5|            es = janet_formatc("macro arity mismatch, expected at most %d, got %d", maxar, arity);
 6288|      6|        c->result.macrofiber = NULL;
 6289|      6|        janetc_error(c, es);
 6290|      6|        return 0;
 6291|      6|    }
 6292|       |    /* Set env */
 6293|   151k|    fiberp->env = c->env;
 6294|   151k|    int lock = janet_gclock();
 6295|   151k|    Janet mf_kw = janet_ckeywordv("macro-form");
  ------------------
  |  | 1833|   151k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|   151k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|   151k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|   151k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|   151k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6296|   151k|    janet_table_put(c->env, mf_kw, x);
 6297|   151k|    Janet ml_kw = janet_ckeywordv("macro-lints");
  ------------------
  |  | 1833|   151k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|   151k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|   151k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|   151k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|   151k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6298|   151k|    if (c->lints) {
  ------------------
  |  Branch (6298:9): [True: 0, False: 151k]
  ------------------
 6299|      0|        janet_table_put(c->env, ml_kw, janet_wrap_array(c->lints));
  ------------------
  |  |  840|      0|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6300|      0|    }
 6301|   151k|    Janet tempOut;
 6302|   151k|    JanetSignal status = janet_continue(fiberp, janet_wrap_nil(), &tempOut);
  ------------------
  |  |  826|   151k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|   151k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   151k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   151k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6303|   151k|    janet_table_put(c->env, mf_kw, janet_wrap_nil());
  ------------------
  |  |  826|   151k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|   151k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   151k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   151k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6304|   151k|    janet_table_put(c->env, ml_kw, janet_wrap_nil());
  ------------------
  |  |  826|   151k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|   151k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   151k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   151k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6305|   151k|    janet_gcunlock(lock);
 6306|   151k|    if (status != JANET_SIGNAL_OK) {
  ------------------
  |  Branch (6306:9): [True: 150, False: 151k]
  ------------------
 6307|    150|        const uint8_t *es = janet_formatc("(macro) %V", tempOut);
 6308|    150|        c->result.macrofiber = fiberp;
 6309|    150|        janetc_error(c, es);
 6310|    150|        return 0;
 6311|   151k|    } else {
 6312|   151k|        *out = tempOut;
 6313|   151k|    }
 6314|       |
 6315|   151k|    return 1;
 6316|   151k|}
janet.c:janetc_tuple:
 6218|    967|static JanetSlot janetc_tuple(JanetFopts opts, Janet x) {
 6219|    967|    JanetCompiler *c = opts.compiler;
 6220|    967|    const Janet *t = janet_unwrap_tuple(x);
  ------------------
  |  |  853|    967|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
 6221|    967|    return janetc_maker(opts,
 6222|       |                        janetc_toslots(c, t, janet_tuple_length(t)),
  ------------------
  |  | 1792|    967|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|    967|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
 6223|    967|                        JOP_MAKE_TUPLE);
 6224|    967|}
janet.c:janetc_maker:
 6170|  7.83k|static JanetSlot janetc_maker(JanetFopts opts, JanetSlot *slots, int op) {
 6171|  7.83k|    JanetCompiler *c = opts.compiler;
 6172|  7.83k|    JanetSlot retslot;
 6173|       |
 6174|       |    /* Check if this structure is composed entirely of constants */
 6175|  7.83k|    int can_inline = 1;
 6176|  13.8k|    for (int32_t i = 0; i < janet_v_count(slots); i++) {
  ------------------
  |  |  708|  13.8k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  8.04k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  8.04k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 8.04k, False: 5.79k]
  |  |  ------------------
  ------------------
  |  Branch (6176:25): [True: 6.30k, False: 7.54k]
  ------------------
 6177|  6.30k|        if (!(slots[i].flags & JANET_SLOT_CONSTANT) ||
  ------------------
  |  |  983|  6.30k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (6177:13): [True: 279, False: 6.02k]
  ------------------
 6178|  6.02k|                (slots[i].flags & JANET_SLOT_SPLICED)) {
  ------------------
  |  |  991|  6.02k|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
  |  Branch (6178:17): [True: 6, False: 6.01k]
  ------------------
 6179|    285|            can_inline = 0;
 6180|    285|            break;
 6181|    285|        }
 6182|  6.30k|    }
 6183|       |
 6184|  7.83k|    if (can_inline && (op == JOP_MAKE_STRUCT)) {
  ------------------
  |  Branch (6184:9): [True: 7.54k, False: 285]
  |  Branch (6184:23): [True: 5.81k, False: 1.73k]
  ------------------
 6185|  5.81k|        JanetKV *st = janet_struct_begin(janet_v_count(slots) / 2);
  ------------------
  |  |  708|  5.81k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|    141|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|    141|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 141, False: 5.66k]
  |  |  ------------------
  ------------------
 6186|  7.16k|        for (int32_t i = 0; i < janet_v_count(slots); i += 2) {
  ------------------
  |  |  708|  7.16k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  1.49k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  1.49k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 1.49k, False: 5.66k]
  |  |  ------------------
  ------------------
  |  Branch (6186:29): [True: 1.35k, False: 5.81k]
  ------------------
 6187|  1.35k|            Janet k = slots[i].constant;
 6188|  1.35k|            Janet v = slots[i + 1].constant;
 6189|  1.35k|            janet_struct_put(st, k, v);
 6190|  1.35k|        }
 6191|  5.81k|        retslot = janetc_cslot(janet_wrap_struct(janet_struct_end(st)));
  ------------------
  |  |  837|  5.81k|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  823|  5.81k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  5.81k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  5.81k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6192|  5.81k|        janetc_freeslots(c, slots);
 6193|  5.81k|    } else if (can_inline && (op == JOP_MAKE_TUPLE)) {
  ------------------
  |  Branch (6193:16): [True: 1.73k, False: 285]
  |  Branch (6193:30): [True: 808, False: 927]
  ------------------
 6194|    808|        Janet *tup = janet_tuple_begin(janet_v_count(slots));
  ------------------
  |  |  708|    808|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|    808|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|    808|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 808, False: 0]
  |  |  ------------------
  ------------------
 6195|  2.96k|        for (int32_t i = 0; i < janet_v_count(slots); i++) {
  ------------------
  |  |  708|  2.96k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  2.96k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  2.96k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 2.96k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (6195:29): [True: 2.15k, False: 808]
  ------------------
 6196|  2.15k|            tup[i] = slots[i].constant;
 6197|  2.15k|        }
 6198|    808|        retslot = janetc_cslot(janet_wrap_tuple(janet_tuple_end(tup)));
  ------------------
  |  |  838|    808|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|    808|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    808|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    808|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6199|    808|        janetc_freeslots(c, slots);
 6200|  1.21k|    } else {
 6201|  1.21k|        janetc_pushslots(c, slots);
 6202|  1.21k|        janetc_freeslots(c, slots);
 6203|  1.21k|        retslot = janetc_gettarget(opts);
 6204|  1.21k|        janetc_emit_s(c, op, retslot, 1);
 6205|  1.21k|    }
 6206|       |
 6207|  7.83k|    return retslot;
 6208|  7.83k|}
janet.c:janetc_call:
 6034|  26.3k|static JanetSlot janetc_call(JanetFopts opts, JanetSlot *slots, JanetSlot fun, const Janet *form) {
 6035|  26.3k|    JanetSlot retslot;
 6036|  26.3k|    JanetCompiler *c = opts.compiler;
 6037|  26.3k|    int specialized = 0;
 6038|  26.3k|    if (fun.flags & JANET_SLOT_CONSTANT && !has_spliced(slots)) {
  ------------------
  |  |  983|  52.6k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (6038:9): [True: 24.5k, False: 1.73k]
  |  Branch (6038:44): [True: 24.0k, False: 523]
  ------------------
 6039|  24.0k|        if (janet_checktype(fun.constant, JANET_FUNCTION)) {
  ------------------
  |  |  801|  24.0k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 14.1k, False: 9.88k]
  |  |  |  Branch (801:6): [Folded, False: 24.0k]
  |  |  ------------------
  |  |  802|  24.0k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  24.0k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  24.0k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  24.0k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  24.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  24.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6040|  14.1k|            JanetFunction *f = janet_unwrap_function(fun.constant);
  ------------------
  |  |  863|  14.1k|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
 6041|  14.1k|            const JanetFunOptimizer *o = janetc_funopt(f->def->flags);
 6042|  14.1k|            if (o && (!o->can_optimize || o->can_optimize(opts, slots))) {
  ------------------
  |  Branch (6042:17): [True: 12.9k, False: 1.20k]
  |  Branch (6042:23): [True: 3.26k, False: 9.72k]
  |  Branch (6042:43): [True: 9.68k, False: 35]
  ------------------
 6043|  12.9k|                specialized = 1;
 6044|  12.9k|                retslot = o->optimize(opts, slots);
 6045|  12.9k|            }
 6046|  14.1k|        }
 6047|       |        /* TODO janet function inlining (no c functions)*/
 6048|  24.0k|    }
 6049|  26.3k|    if (!specialized) {
  ------------------
  |  Branch (6049:9): [True: 13.3k, False: 12.9k]
  ------------------
 6050|  13.3k|        int32_t min_arity = janetc_pushslots(c, slots);
 6051|       |        /* Check for provably incorrect function calls */
 6052|  13.3k|        if (fun.flags & JANET_SLOT_CONSTANT) {
  ------------------
  |  |  983|  13.3k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (6052:13): [True: 11.6k, False: 1.73k]
  ------------------
 6053|       |
 6054|       |            /* Check for bad arity type if fun is a constant */
 6055|  11.6k|            switch (janet_type(fun.constant)) {
  ------------------
  |  |  790|  11.6k|    (isnan((x).number) \
  |  |  791|  11.6k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  11.6k|        : JANET_NUMBER)
  ------------------
  |  Branch (6055:21): [True: 11.5k, False: 148]
  ------------------
 6056|  1.64k|                case JANET_FUNCTION: {
  ------------------
  |  Branch (6056:17): [True: 1.64k, False: 10.0k]
  ------------------
 6057|  1.64k|                    JanetFunction *f = janet_unwrap_function(fun.constant);
  ------------------
  |  |  863|  1.64k|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
 6058|  1.64k|                    int32_t min = f->def->min_arity;
 6059|  1.64k|                    int32_t max = f->def->max_arity;
 6060|  1.64k|                    int structarg = f->def->flags & JANET_FUNCDEF_FLAG_STRUCTARG;
  ------------------
  |  | 1096|  1.64k|#define JANET_FUNCDEF_FLAG_STRUCTARG 0x1000000
  ------------------
 6061|  1.64k|                    int namedarg = f->def->flags & JANET_FUNCDEF_FLAG_NAMEDARGS;
  ------------------
  |  | 1098|  1.64k|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
 6062|  1.64k|                    if (min_arity < 0) {
  ------------------
  |  Branch (6062:25): [True: 403, False: 1.24k]
  ------------------
 6063|       |                        /* Call has splices */
 6064|    403|                        min_arity = -1 - min_arity;
 6065|    403|                        if (min_arity > max && max >= 0) {
  ------------------
  |  Branch (6065:29): [True: 11, False: 392]
  |  Branch (6065:48): [True: 11, False: 0]
  ------------------
 6066|     11|                            const uint8_t *es = janet_formatc(
 6067|     11|                                                    "%v expects at most %d argument%s, got at least %d",
 6068|     11|                                                    fun.constant, max, max == 1 ? "" : "s", min_arity);
  ------------------
  |  Branch (6068:72): [True: 6, False: 5]
  ------------------
 6069|     11|                            janetc_error(c, es);
 6070|     11|                        }
 6071|  1.24k|                    } else {
 6072|       |                        /* Call has no splices */
 6073|  1.24k|                        if (min_arity > max && max >= 0) {
  ------------------
  |  Branch (6073:29): [True: 27, False: 1.21k]
  |  Branch (6073:48): [True: 27, False: 0]
  ------------------
 6074|     27|                            const uint8_t *es = janet_formatc(
 6075|     27|                                                    "%v expects at most %d argument%s, got %d",
 6076|     27|                                                    fun.constant, max, max == 1 ? "" : "s", min_arity);
  ------------------
  |  Branch (6076:72): [True: 21, False: 6]
  ------------------
 6077|     27|                            janetc_error(c, es);
 6078|     27|                        }
 6079|  1.24k|                        if (min_arity < min) {
  ------------------
  |  Branch (6079:29): [True: 12, False: 1.22k]
  ------------------
 6080|     12|                            const uint8_t *es = janet_formatc(
 6081|     12|                                                    "%v expects at least %d argument%s, got %d",
 6082|     12|                                                    fun.constant, min, min == 1 ? "" : "s", min_arity);
  ------------------
  |  Branch (6082:72): [True: 1, False: 11]
  ------------------
 6083|     12|                            janetc_error(c, es);
 6084|     12|                        }
 6085|  1.24k|                        if (structarg && (min_arity > f->def->arity) && ((min_arity - f->def->arity) & 1)) {
  ------------------
  |  Branch (6085:29): [True: 20, False: 1.22k]
  |  Branch (6085:42): [True: 18, False: 2]
  |  Branch (6085:73): [True: 4, False: 14]
  ------------------
 6086|       |                            /* If we have an odd number of variadic arguments to a `&keys` function, that is almost certainly wrong. */
 6087|      4|                            if (namedarg) {
  ------------------
  |  Branch (6087:33): [True: 0, False: 4]
  ------------------
 6088|      0|                                janetc_lintf(c, JANET_C_LINT_NORMAL,
 6089|      0|                                             "odd number of named arguments to `&named` function %v", fun.constant);
 6090|      4|                            } else {
 6091|      4|                                janetc_lintf(c, JANET_C_LINT_NORMAL,
 6092|      4|                                             "odd number of named arguments to `&keys` function %v", fun.constant);
 6093|      4|                            }
 6094|      4|                        }
 6095|  1.24k|                        if (namedarg && f->def->named_args_count > 0) {
  ------------------
  |  Branch (6095:29): [True: 0, False: 1.24k]
  |  Branch (6095:41): [True: 0, False: 0]
  ------------------
 6096|       |                            /* For each argument passed in, check if it is one of the used named arguments
 6097|       |                             * by checking the list defined in the function def. If not, raise a normal compiler
 6098|       |                             * lint. We can also do a strict lint for _missing_ named arguments, although in many
 6099|       |                             * cases those are assumed to have some kind of default, or we have dynamic keys. */
 6100|      0|                            int32_t first_arg_key_index = f->def->arity + 1;
 6101|      0|                            for (int32_t i = first_arg_key_index; i < janet_tuple_length(form); i += 2) {
  ------------------
  |  | 1792|      0|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|      0|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (6101:67): [True: 0, False: 0]
  ------------------
 6102|      0|                                Janet argkey = form[i];
 6103|       |                                /* Assumption: The first N constants of a function are its named argument keys. This
 6104|       |                                 * may change if the compiler changes, but is true for all Janet generated functions. */
 6105|      0|                                int found = 0;
 6106|      0|                                if (janet_checktype(argkey, JANET_KEYWORD)) {
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 0]
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6107|      0|                                    for (int32_t j = 0; j < f->def->named_args_count && j < f->def->constants_length; j++) {
  ------------------
  |  Branch (6107:57): [True: 0, False: 0]
  |  Branch (6107:89): [True: 0, False: 0]
  ------------------
 6108|      0|                                        if (janet_equals(argkey, f->def->constants[j])) {
  ------------------
  |  Branch (6108:45): [True: 0, False: 0]
  ------------------
 6109|      0|                                            found = 1;
 6110|      0|                                            break;
 6111|      0|                                        }
 6112|      0|                                    }
 6113|      0|                                } else if (janet_checktype(argkey, JANET_TUPLE)) {
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 0]
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6114|       |                                    /* Possible lint : too dynamic, be dumber
 6115|       |                                     * (defn f [&named x] [x])
 6116|       |                                     * (f (if (coin-flip) :x :w) 10)
 6117|       |                                     * A tuple could be a function call the evaluates to a valid key */
 6118|      0|                                    found = 1;
 6119|      0|                                }
 6120|      0|                                if (!found) {
  ------------------
  |  Branch (6120:37): [True: 0, False: 0]
  ------------------
 6121|      0|                                    janetc_lintf(c, JANET_C_LINT_NORMAL,
 6122|      0|                                                 "unused named argument %v to function %v", argkey, fun.constant);
 6123|      0|                                }
 6124|      0|                            }
 6125|      0|                        }
 6126|  1.24k|                    }
 6127|  1.64k|                }
 6128|  1.64k|                break;
 6129|  6.41k|                case JANET_CFUNCTION:
  ------------------
  |  Branch (6129:17): [True: 6.41k, False: 5.23k]
  ------------------
 6130|  6.42k|                case JANET_ABSTRACT:
  ------------------
  |  Branch (6130:17): [True: 12, False: 11.6k]
  ------------------
 6131|  7.59k|                case JANET_NIL:
  ------------------
  |  Branch (6131:17): [True: 1.17k, False: 10.4k]
  ------------------
 6132|  7.59k|                    break;
 6133|    276|                case JANET_KEYWORD:
  ------------------
  |  Branch (6133:17): [True: 276, False: 11.3k]
  ------------------
 6134|    276|                    if (min_arity == 0) {
  ------------------
  |  Branch (6134:25): [True: 0, False: 276]
  ------------------
 6135|      0|                        const uint8_t *es = janet_formatc("%v expects at least 1 argument, got 0",
 6136|      0|                                                          fun.constant);
 6137|      0|                        janetc_error(c, es);
 6138|      0|                    }
 6139|    276|                    break;
 6140|  2.13k|                default:
  ------------------
  |  Branch (6140:17): [True: 2.13k, False: 9.51k]
  ------------------
 6141|  2.13k|                    if (min_arity > 1 || min_arity == 0) {
  ------------------
  |  Branch (6141:25): [True: 680, False: 1.45k]
  |  Branch (6141:42): [True: 43, False: 1.40k]
  ------------------
 6142|    723|                        const uint8_t *es = janet_formatc("%v expects 1 argument, got %d",
 6143|    723|                                                          fun.constant, min_arity);
 6144|    723|                        janetc_error(c, es);
 6145|    723|                    }
 6146|  2.13k|                    if (min_arity < -2) {
  ------------------
  |  Branch (6146:25): [True: 53, False: 2.07k]
  ------------------
 6147|     53|                        const uint8_t *es = janet_formatc("%v expects 1 argument, got at least %d",
 6148|     53|                                                          fun.constant, -1 - min_arity);
 6149|     53|                        janetc_error(c, es);
 6150|     53|                    }
 6151|  2.13k|                    break;
 6152|  11.6k|            }
 6153|  11.6k|        }
 6154|       |
 6155|  13.3k|        if ((opts.flags & JANET_FOPTS_TAIL) &&
  ------------------
  |  | 1091|  13.3k|#define JANET_FOPTS_TAIL 0x10000
  ------------------
  |  Branch (6155:13): [True: 7.12k, False: 6.25k]
  ------------------
 6156|       |                /* Prevent top level tail calls for better errors */
 6157|  7.12k|                !(c->scope->flags & JANET_SCOPE_TOP)) {
  ------------------
  |  | 1005|  7.12k|#define JANET_SCOPE_TOP 4
  ------------------
  |  Branch (6157:17): [True: 869, False: 6.26k]
  ------------------
 6158|    869|            janetc_emit_s(c, JOP_TAILCALL, fun, 0);
 6159|    869|            retslot = janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|    869|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|    869|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    869|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    869|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6160|    869|            retslot.flags = JANET_SLOT_RETURNED;
  ------------------
  |  |  987|    869|#define JANET_SLOT_RETURNED 0x100000
  ------------------
 6161|  12.5k|        } else {
 6162|  12.5k|            retslot = janetc_gettarget(opts);
 6163|  12.5k|            janetc_emit_ss(c, JOP_CALL, retslot, fun, 1);
 6164|  12.5k|        }
 6165|  13.3k|    }
 6166|  26.3k|    janetc_freeslots(c, slots);
 6167|  26.3k|    return retslot;
 6168|  26.3k|}
janet.c:has_spliced:
 5996|  24.5k|static int has_spliced(JanetSlot *slots) {
 5997|  24.5k|    int32_t i;
 5998|   250k|    for (i = 0; i < janet_v_count(slots); i++) {
  ------------------
  |  |  708|   250k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|   248k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|   248k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 248k, False: 2.03k]
  |  |  ------------------
  ------------------
  |  Branch (5998:17): [True: 226k, False: 24.0k]
  ------------------
 5999|   226k|        if (slots[i].flags & JANET_SLOT_SPLICED)
  ------------------
  |  |  991|   226k|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
  |  Branch (5999:13): [True: 523, False: 226k]
  ------------------
 6000|    523|            return 1;
 6001|   226k|    }
 6002|  24.0k|    return 0;
 6003|  24.5k|}
janet.c:janetc_array:
 6210|    174|static JanetSlot janetc_array(JanetFopts opts, Janet x) {
 6211|    174|    JanetCompiler *c = opts.compiler;
 6212|    174|    JanetArray *a = janet_unwrap_array(x);
  ------------------
  |  |  855|    174|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
 6213|    174|    return janetc_maker(opts,
 6214|    174|                        janetc_toslots(c, a->data, a->count),
 6215|    174|                        JOP_MAKE_ARRAY);
 6216|    174|}
janet.c:janetc_tablector:
 6226|  5.92k|static JanetSlot janetc_tablector(JanetFopts opts, Janet x, int op) {
 6227|  5.92k|    JanetCompiler *c = opts.compiler;
 6228|  5.92k|    return janetc_maker(opts,
 6229|  5.92k|                        janetc_toslotskv(c, x),
 6230|  5.92k|                        op);
 6231|  5.92k|}
janet.c:janetc_bufferctor:
 6233|    764|static JanetSlot janetc_bufferctor(JanetFopts opts, Janet x) {
 6234|    764|    JanetCompiler *c = opts.compiler;
 6235|    764|    JanetBuffer *b = janet_unwrap_buffer(x);
  ------------------
  |  |  857|    764|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
 6236|    764|    Janet onearg = janet_stringv(b->data, b->count);
  ------------------
  |  | 1817|    764|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  843|    764|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|    764|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|    764|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|    764|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6237|    764|    return janetc_maker(opts,
 6238|    764|                        janetc_toslots(c, &onearg, 1),
 6239|    764|                        JOP_MAKE_BUFFER);
 6240|    764|}
janet.c:janetc_init:
 6568|   238k|static void janetc_init(JanetCompiler *c, JanetTable *env, const uint8_t *where, JanetArray *lints) {
 6569|   238k|    c->scope = NULL;
 6570|   238k|    c->buffer = NULL;
 6571|   238k|    c->mapbuffer = NULL;
 6572|   238k|    c->recursion_guard = JANET_RECURSION_GUARD;
  ------------------
  |  |  291|   238k|#define JANET_RECURSION_GUARD 1024
  ------------------
 6573|   238k|    c->env = env;
 6574|   238k|    c->source = where;
 6575|   238k|    c->current_mapping.line = -1;
 6576|   238k|    c->current_mapping.column = -1;
 6577|   238k|    c->lints = lints;
 6578|   238k|    c->is_redef = janet_truthy(janet_table_get_keyword(c->env, "redef"));
  ------------------
  |  |  813|   238k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|   476k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 238k]
  |  |  |  |  ------------------
  |  |  |  |  802|   476k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|   476k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|   238k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|   238k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|   238k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|   238k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 0, False: 238k]
  |  |  ------------------
  |  |  814|   238k|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 0, False: 0]
  |  |  |  Branch (814:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 6579|       |    /* Init result */
 6580|   238k|    c->result.error = NULL;
 6581|   238k|    c->result.status = JANET_COMPILE_OK;
 6582|   238k|    c->result.funcdef = NULL;
 6583|       |    c->result.macrofiber = NULL;
 6584|   238k|    c->result.error_mapping.line = -1;
 6585|   238k|    c->result.error_mapping.column = -1;
 6586|   238k|}
janet.c:janetc_deinit:
 6589|   238k|static void janetc_deinit(JanetCompiler *c) {
 6590|   238k|    janet_v_free(c->buffer);
  ------------------
  |  |  705|   238k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  713|   237k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (705:34): [True: 237k, False: 976]
  |  |  ------------------
  ------------------
 6591|   238k|    janet_v_free(c->mapbuffer);
  ------------------
  |  |  705|   238k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  713|   237k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (705:34): [True: 237k, False: 976]
  |  |  ------------------
  ------------------
 6592|       |    c->env = NULL;
 6593|   238k|}
janet.c:janet_dyncstring:
 6782|  24.9k|static const char *janet_dyncstring(const char *name, const char *dflt) {
 6783|  24.9k|    Janet x = janet_dyn(name);
 6784|  24.9k|    if (janet_checktype(x, JANET_NIL)) return dflt;
  ------------------
  |  |  801|  24.9k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 12.4k, False: 12.4k]
  |  |  |  Branch (801:6): [Folded, False: 24.9k]
  |  |  ------------------
  |  |  802|  24.9k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  24.9k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  24.9k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  24.9k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  24.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  24.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6785|  12.4k|    if (!janet_checktype(x, JANET_STRING)) {
  ------------------
  |  |  801|  12.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 12.4k]
  |  |  ------------------
  |  |  802|  12.4k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  12.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  12.4k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  12.4k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  12.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  12.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (6785:9): [True: 0, False: 12.4k]
  ------------------
 6786|      0|        janet_panicf("expected string, got %v", x);
 6787|      0|    }
 6788|  12.4k|    const uint8_t *jstr = janet_unwrap_string(x);
  ------------------
  |  |  858|  12.4k|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
 6789|  12.4k|    const char *cstr = (const char *)jstr;
 6790|  12.4k|    if (strlen(cstr) != (size_t) janet_string_length(jstr)) {
  ------------------
  |  | 1803|  12.4k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|  12.4k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (6790:9): [True: 0, False: 12.4k]
  ------------------
 6791|      0|        janet_panicf("string %v contains embedded 0s", x);
 6792|      0|    }
 6793|  12.4k|    return cstr;
 6794|  12.4k|}
janet.c:is_path_sep:
 6796|   257k|static int is_path_sep(char c) {
 6797|       |#ifdef JANET_WINDOWS
 6798|       |    if (c == '\\') return 1;
 6799|       |#endif
 6800|   257k|    return c == '/';
 6801|   257k|}
janet.c:janet_load_libs:
 7783|  7.16k|static void janet_load_libs(JanetTable *env) {
 7784|  7.16k|    JanetRegExt corelib_cfuns[] = {
 7785|  7.16k|        JANET_CORE_REG("native", janet_core_native),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7786|  7.16k|        JANET_CORE_REG("describe", janet_core_describe),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7787|  7.16k|        JANET_CORE_REG("string", janet_core_string),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7788|  7.16k|        JANET_CORE_REG("symbol", janet_core_symbol),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7789|  7.16k|        JANET_CORE_REG("keyword", janet_core_keyword),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7790|  7.16k|        JANET_CORE_REG("buffer", janet_core_buffer),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7791|  7.16k|        JANET_CORE_REG("abstract?", janet_core_is_abstract),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7792|  7.16k|        JANET_CORE_REG("table", janet_core_table),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7793|  7.16k|        JANET_CORE_REG("array", janet_core_array),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7794|  7.16k|        JANET_CORE_REG("scan-number", janet_core_scannumber),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7795|  7.16k|        JANET_CORE_REG("tuple", janet_core_tuple),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7796|  7.16k|        JANET_CORE_REG("struct", janet_core_struct),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7797|  7.16k|        JANET_CORE_REG("gensym", janet_core_gensym),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7798|  7.16k|        JANET_CORE_REG("gccollect", janet_core_gccollect),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7799|  7.16k|        JANET_CORE_REG("gcsetinterval", janet_core_gcsetinterval),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7800|  7.16k|        JANET_CORE_REG("gcinterval", janet_core_gcinterval),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7801|  7.16k|        JANET_CORE_REG("type", janet_core_type),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7802|  7.16k|        JANET_CORE_REG("hash", janet_core_hash),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7803|  7.16k|        JANET_CORE_REG("getline", janet_core_getline),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7804|  7.16k|        JANET_CORE_REG("dyn", janet_core_dyn),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7805|  7.16k|        JANET_CORE_REG("setdyn", janet_core_setdyn),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7806|  7.16k|        JANET_CORE_REG("trace", janet_core_trace),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7807|  7.16k|        JANET_CORE_REG("untrace", janet_core_untrace),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7808|  7.16k|        JANET_CORE_REG("module/expand-path", janet_core_expand_path),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7809|  7.16k|        JANET_CORE_REG("int?", janet_core_check_int),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7810|  7.16k|        JANET_CORE_REG("nat?", janet_core_check_nat),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7811|  7.16k|        JANET_CORE_REG("bytes?", janet_core_is_bytes),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7812|  7.16k|        JANET_CORE_REG("indexed?", janet_core_is_indexed),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7813|  7.16k|        JANET_CORE_REG("dictionary?", janet_core_is_dictionary),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7814|  7.16k|        JANET_CORE_REG("lengthable?", janet_core_is_lengthable),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7815|  7.16k|        JANET_CORE_REG("slice", janet_core_slice),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7816|  7.16k|        JANET_CORE_REG("range", janet_core_range),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7817|  7.16k|        JANET_CORE_REG("signal", janet_core_signal),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7818|  7.16k|        JANET_CORE_REG("memcmp", janet_core_memcmp),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7819|  7.16k|        JANET_CORE_REG("getproto", janet_core_getproto),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7820|  7.16k|        JANET_CORE_REG("sandbox", janet_core_sandbox),
  ------------------
  |  |  476|  7.16k|#define JANET_CORE_REG JANET_REG_S
  |  |  ------------------
  |  |  |  | 2109|  7.16k|#define JANET_REG_S(JNAME, CNAME) {JNAME, CNAME, NULL, __FILE__, CNAME##_sourceline_}
  |  |  ------------------
  ------------------
 7821|  7.16k|        JANET_REG_END
  ------------------
  |  | 2099|  7.16k|#define JANET_REG_END {NULL, NULL, NULL, NULL, 0}
  ------------------
 7822|  7.16k|    };
 7823|       |    janet_core_cfuns_ext(env, NULL, corelib_cfuns);
 7824|  7.16k|    janet_lib_io(env);
 7825|  7.16k|    janet_lib_math(env);
 7826|  7.16k|    janet_lib_array(env);
 7827|  7.16k|    janet_lib_tuple(env);
 7828|  7.16k|    janet_lib_buffer(env);
 7829|  7.16k|    janet_lib_table(env);
 7830|  7.16k|    janet_lib_struct(env);
 7831|  7.16k|    janet_lib_fiber(env);
 7832|  7.16k|    janet_lib_os(env);
 7833|  7.16k|    janet_lib_parse(env);
 7834|  7.16k|    janet_lib_compile(env);
 7835|  7.16k|    janet_lib_debug(env);
 7836|  7.16k|    janet_lib_string(env);
 7837|  7.16k|    janet_lib_marsh(env);
 7838|  7.16k|#ifdef JANET_PEG
 7839|  7.16k|    janet_lib_peg(env);
 7840|  7.16k|#endif
 7841|  7.16k|#ifdef JANET_ASSEMBLER
 7842|  7.16k|    janet_lib_asm(env);
 7843|  7.16k|#endif
 7844|  7.16k|#ifdef JANET_INT_TYPES
 7845|  7.16k|    janet_lib_inttypes(env);
 7846|  7.16k|#endif
 7847|  7.16k|#ifdef JANET_EV
 7848|  7.16k|    janet_lib_ev(env);
 7849|  7.16k|#ifdef JANET_FILEWATCH
 7850|  7.16k|    janet_lib_filewatch(env);
 7851|  7.16k|#endif
 7852|  7.16k|#endif
 7853|  7.16k|#ifdef JANET_NET
 7854|  7.16k|    janet_lib_net(env);
 7855|  7.16k|#endif
 7856|  7.16k|#ifdef JANET_FFI
 7857|  7.16k|    janet_lib_ffi(env);
 7858|  7.16k|#endif
 7859|  7.16k|}
janet.c:helper_find:
 8309|      2|static void helper_find(int32_t argc, Janet *argv, JanetFuncDef **def, int32_t *bytecode_offset) {
 8310|      2|    janet_fixarity(argc, 3);
 8311|      2|    const uint8_t *source = janet_getstring(argv, 0);
 8312|      2|    int32_t line = janet_getinteger(argv, 1);
 8313|      2|    int32_t col = janet_getinteger(argv, 2);
 8314|      2|    janet_debug_find(def, bytecode_offset, source, line, col);
 8315|      2|}
janet.c:helper_find_fun:
 8319|     20|static void helper_find_fun(int32_t argc, Janet *argv, JanetFuncDef **def, int32_t *bytecode_offset) {
 8320|     20|    janet_arity(argc, 1, 2);
 8321|     20|    JanetFunction *func = janet_getfunction(argv, 0);
 8322|     20|    int32_t offset = (argc == 2) ? janet_getinteger(argv, 1) : 0;
  ------------------
  |  Branch (8322:22): [True: 6, False: 14]
  ------------------
 8323|     20|    *def = func->def;
 8324|     20|    *bytecode_offset = offset;
 8325|     20|}
janet.c:janetc_movenear:
 8685|  8.93M|                            JanetSlot src) {
 8686|  8.93M|    janet_assert(dest <= 255, "dest slot index must be <= 255");
  ------------------
  |  |  386|  8.93M|#define janet_assert(c, m) do { \
  |  |  387|  8.93M|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 8.93M]
  |  |  ------------------
  |  |  388|  8.93M|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 8.93M]
  |  |  ------------------
  ------------------
 8687|  8.93M|    if (src.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF)) {
  ------------------
  |  |  983|  8.93M|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
                  if (src.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF)) {
  ------------------
  |  |  986|  8.93M|#define JANET_SLOT_REF 0x80000
  ------------------
  |  Branch (8687:9): [True: 1.90M, False: 7.02M]
  ------------------
 8688|  1.90M|        janetc_loadconst(c, src.constant, dest);
 8689|       |        /* If we also are a reference, deref the one element array */
 8690|  1.90M|        if (src.flags & JANET_SLOT_REF) {
  ------------------
  |  |  986|  1.90M|#define JANET_SLOT_REF 0x80000
  ------------------
  |  Branch (8690:13): [True: 22, False: 1.90M]
  ------------------
 8691|     22|            janetc_emit(c,
 8692|     22|                        ((uint32_t) dest << 16) |
 8693|     22|                        ((uint32_t) dest << 8) |
 8694|     22|                        JOP_GET_INDEX);
 8695|     22|        }
 8696|  7.02M|    } else if (src.envindex >= 0) {
  ------------------
  |  Branch (8696:16): [True: 11.7k, False: 7.01M]
  ------------------
 8697|  11.7k|        janetc_emit(c,
 8698|  11.7k|                    ((uint32_t)(src.index) << 24) |
 8699|  11.7k|                    ((uint32_t)(src.envindex) << 16) |
 8700|  11.7k|                    ((uint32_t)(dest) << 8) |
 8701|  11.7k|                    JOP_LOAD_UPVALUE);
 8702|  7.01M|    } else if (src.index != dest) {
  ------------------
  |  Branch (8702:16): [True: 7.01M, False: 0]
  ------------------
 8703|  7.01M|        janet_assert(src.index >= 0, "bad slot");
  ------------------
  |  |  386|  7.01M|#define janet_assert(c, m) do { \
  |  |  387|  7.01M|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 7.01M]
  |  |  ------------------
  |  |  388|  7.01M|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 7.01M]
  |  |  ------------------
  ------------------
 8704|  7.01M|        janetc_emit(c,
 8705|  7.01M|                    ((uint32_t)(src.index) << 16) |
 8706|  7.01M|                    ((uint32_t)(dest) << 8) |
 8707|  7.01M|                    JOP_MOVE_NEAR);
 8708|  7.01M|    }
 8709|  8.93M|}
janet.c:janetc_loadconst:
 8647|  1.90M|static void janetc_loadconst(JanetCompiler *c, Janet k, int32_t reg) {
 8648|  1.90M|    switch (janet_type(k)) {
  ------------------
  |  |  790|  1.90M|    (isnan((x).number) \
  |  |  791|  1.90M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  1.90M|        : JANET_NUMBER)
  ------------------
  |  Branch (8648:13): [True: 1.86M, False: 46.9k]
  ------------------
 8649|  94.3k|        case JANET_NIL:
  ------------------
  |  Branch (8649:9): [True: 94.3k, False: 1.81M]
  ------------------
 8650|  94.3k|            janetc_emit(c, ((uint32_t) reg << 8) | JOP_LOAD_NIL);
 8651|  94.3k|            break;
 8652|  1.00k|        case JANET_BOOLEAN:
  ------------------
  |  Branch (8652:9): [True: 1.00k, False: 1.90M]
  ------------------
 8653|  1.00k|            janetc_emit(c, ((uint32_t) reg << 8) |
 8654|  1.00k|                        (janet_unwrap_boolean(k) ? JOP_LOAD_TRUE : JOP_LOAD_FALSE));
  ------------------
  |  |  833|  1.00k|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  |  |  ------------------
  |  |  |  Branch (833:33): [True: 971, False: 38]
  |  |  ------------------
  ------------------
 8655|  1.00k|            break;
 8656|  46.9k|        case JANET_NUMBER: {
  ------------------
  |  Branch (8656:9): [True: 46.9k, False: 1.86M]
  ------------------
 8657|  46.9k|            double dval = janet_unwrap_number(k);
  ------------------
  |  |  834|  46.9k|#define janet_unwrap_number(x) ((x).number)
  ------------------
 8658|  46.9k|            if (dval < INT16_MIN || dval > INT16_MAX)
  ------------------
  |  Branch (8658:17): [True: 527, False: 46.3k]
  |  Branch (8658:37): [True: 2.67k, False: 43.7k]
  ------------------
 8659|  3.19k|                goto do_constant;
 8660|  43.7k|            int32_t i = (int32_t) dval;
 8661|  43.7k|            if (dval != i)
  ------------------
  |  Branch (8661:17): [True: 670, False: 43.0k]
  ------------------
 8662|    670|                goto do_constant;
 8663|  43.0k|            uint32_t iu = (uint32_t)i;
 8664|  43.0k|            janetc_emit(c,
 8665|  43.0k|                        ((uint32_t) iu << 16) |
 8666|  43.0k|                        ((uint32_t) reg << 8) |
 8667|  43.0k|                        JOP_LOAD_INTEGER);
 8668|  43.0k|            break;
 8669|  43.7k|        }
 8670|  1.76M|        default:
  ------------------
  |  Branch (8670:9): [True: 1.76M, False: 142k]
  ------------------
 8671|  1.76M|        do_constant: {
 8672|  1.76M|                int32_t cindex = janetc_const(c, k);
 8673|  1.76M|                janetc_emit(c,
 8674|  1.76M|                            ((uint32_t) cindex << 16) |
 8675|  1.76M|                            ((uint32_t) reg << 8) |
 8676|  1.76M|                            JOP_LOAD_CONSTANT);
 8677|  1.76M|                break;
 8678|  1.76M|            }
 8679|  1.90M|    }
 8680|  1.90M|}
janet.c:janetc_const:
 8622|  1.76M|static int32_t janetc_const(JanetCompiler *c, Janet x) {
 8623|  1.76M|    JanetScope *scope = c->scope;
 8624|  1.76M|    int32_t i, len;
 8625|       |    /* Get the topmost function scope */
 8626|  2.48M|    while (scope) {
  ------------------
  |  Branch (8626:12): [True: 2.48M, False: 0]
  ------------------
 8627|  2.48M|        if (scope->flags & JANET_SCOPE_FUNCTION)
  ------------------
  |  | 1003|  2.48M|#define JANET_SCOPE_FUNCTION 1
  ------------------
  |  Branch (8627:13): [True: 1.76M, False: 715k]
  ------------------
 8628|  1.76M|            break;
 8629|   715k|        scope = scope->parent;
 8630|   715k|    }
 8631|       |    /* Check if already added */
 8632|  1.76M|    len = janet_v_count(scope->consts);
  ------------------
  |  |  708|  1.76M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  1.52M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  1.52M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 1.52M, False: 244k]
  |  |  ------------------
  ------------------
 8633|  4.62G|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (8633:17): [True: 4.61G, False: 609k]
  ------------------
 8634|  4.61G|        if (janet_equals(x, scope->consts[i]))
  ------------------
  |  Branch (8634:13): [True: 1.15M, False: 4.61G]
  ------------------
 8635|  1.15M|            return i;
 8636|  4.61G|    }
 8637|       |    /* Ensure not too many constants. */
 8638|   609k|    if (len >= 0xFFFF) {
  ------------------
  |  Branch (8638:9): [True: 34.4k, False: 575k]
  ------------------
 8639|  34.4k|        janetc_cerror(c, "too many constants");
 8640|  34.4k|        return 0;
 8641|  34.4k|    }
 8642|   575k|    janet_v_push(scope->consts, x);
  ------------------
  |  |  706|   575k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|   575k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|   575k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|   330k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|   330k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|   330k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|   330k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 244k, False: 330k]
  |  |  |  |  |  |  |  Branch (717:50): [True: 167k, False: 163k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   412k|#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))
  |  |  ------------------
  |  |  |  |  715|   575k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|   575k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8643|   575k|    return len;
 8644|   609k|}
janet.c:janetc_moveback:
 8714|  6.19M|                            int32_t src) {
 8715|  6.19M|    if (dest.flags & JANET_SLOT_REF) {
  ------------------
  |  |  986|  6.19M|#define JANET_SLOT_REF 0x80000
  ------------------
  |  Branch (8715:9): [True: 0, False: 6.19M]
  ------------------
 8716|      0|        int32_t refreg = janetc_regalloc_temp(&c->scope->ra, JANETC_REGTEMP_5);
 8717|      0|        janetc_loadconst(c, dest.constant, refreg);
 8718|      0|        janetc_emit(c,
 8719|      0|                    ((uint32_t) src << 16) |
 8720|      0|                    ((uint32_t) refreg << 8) |
 8721|      0|                    JOP_PUT_INDEX);
 8722|      0|        janetc_regalloc_freetemp(&c->scope->ra, refreg, JANETC_REGTEMP_5);
 8723|  6.19M|    } else if (dest.envindex >= 0) {
  ------------------
  |  Branch (8723:16): [True: 852, False: 6.19M]
  ------------------
 8724|       |        /* Convert src to near reg */
 8725|    852|        if (src > 255) {
  ------------------
  |  Branch (8725:13): [True: 0, False: 852]
  ------------------
 8726|      0|            int32_t newsrc = JANETC_REGTEMP_5 + 0xF0;
 8727|      0|            janetc_emit(c, JOP_MOVE_NEAR | ((uint32_t)(src) << 16) | ((uint32_t) newsrc << 8));
 8728|      0|            src = newsrc;
 8729|      0|        }
 8730|    852|        janetc_emit(c,
 8731|    852|                    ((uint32_t)(dest.index) << 24) |
 8732|    852|                    ((uint32_t)(dest.envindex) << 16) |
 8733|    852|                    ((uint32_t)(src) << 8) |
 8734|    852|                    JOP_SET_UPVALUE);
 8735|  6.19M|    } else if (dest.index != src) {
  ------------------
  |  Branch (8735:16): [True: 4.12M, False: 2.07M]
  ------------------
 8736|  4.12M|        janet_assert(dest.index >= 0, "bad slot");
  ------------------
  |  |  386|  4.12M|#define janet_assert(c, m) do { \
  |  |  387|  4.12M|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 4.12M]
  |  |  ------------------
  |  |  388|  4.12M|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 4.12M]
  |  |  ------------------
  ------------------
 8737|       |        /* Convert src to near reg */
 8738|  4.12M|        if (src > 255) {
  ------------------
  |  Branch (8738:13): [True: 0, False: 4.12M]
  ------------------
 8739|      0|            int32_t newsrc = JANETC_REGTEMP_5 + 0xF0;
 8740|      0|            janetc_emit(c, JOP_MOVE_NEAR | ((uint32_t)(src) << 16) | ((uint32_t)newsrc << 8));
 8741|      0|            src = newsrc;
 8742|      0|        }
 8743|  4.12M|        janetc_emit(c,
 8744|  4.12M|                    ((uint32_t)(dest.index) << 16) |
 8745|  4.12M|                    ((uint32_t)(src) << 8) |
 8746|  4.12M|                    JOP_MOVE_FAR);
 8747|  4.12M|    }
 8748|  6.19M|}
janet.c:janetc_regfar:
 8761|  2.82M|static int32_t janetc_regfar(JanetCompiler *c, JanetSlot s, JanetcRegisterTemp tag) {
 8762|       |    /* check if already near register */
 8763|  2.82M|    if (s.envindex < 0 && s.index >= 0) {
  ------------------
  |  Branch (8763:9): [True: 2.81M, False: 7.49k]
  |  Branch (8763:27): [True: 2.32M, False: 487k]
  ------------------
 8764|  2.32M|        return s.index;
 8765|  2.32M|    }
 8766|   495k|    int32_t reg;
 8767|   495k|    int32_t nearreg = janetc_regalloc_temp(&c->scope->ra, tag);
 8768|   495k|    janetc_movenear(c, nearreg, s);
 8769|   495k|    if (nearreg >= 0xF0) {
  ------------------
  |  Branch (8769:9): [True: 172k, False: 322k]
  ------------------
 8770|   172k|        reg = janetc_allocfar(c);
 8771|   172k|        janetc_emit(c, JOP_MOVE_FAR | ((uint32_t) nearreg << 8) | ((uint32_t) reg << 16));
 8772|   172k|        janetc_regalloc_freetemp(&c->scope->ra, nearreg, tag);
 8773|   322k|    } else {
 8774|   322k|        reg = nearreg;
 8775|   322k|        janetc_regalloc_freetemp(&c->scope->ra, nearreg, tag);
 8776|   322k|        janetc_regalloc_touch(&c->scope->ra, reg);
 8777|   322k|    }
 8778|   495k|    return reg;
 8779|  2.82M|}
janet.c:janetc_free_regnear:
 8751|  11.4M|static void janetc_free_regnear(JanetCompiler *c, JanetSlot s, int32_t reg, JanetcRegisterTemp tag) {
 8752|  11.4M|    if (reg != s.index ||
  ------------------
  |  Branch (8752:9): [True: 7.35M, False: 4.05M]
  ------------------
 8753|  4.05M|            s.envindex >= 0 ||
  ------------------
  |  Branch (8753:13): [True: 1.08k, False: 4.04M]
  ------------------
 8754|  7.35M|            s.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF)) {
  ------------------
  |  |  983|  4.04M|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
                          s.flags & (JANET_SLOT_CONSTANT | JANET_SLOT_REF)) {
  ------------------
  |  |  986|  4.04M|#define JANET_SLOT_REF 0x80000
  ------------------
  |  Branch (8754:13): [True: 0, False: 4.04M]
  ------------------
 8755|       |        /* We need to free the temporary slot */
 8756|  7.35M|        janetc_regalloc_freetemp(&c->scope->ra, reg, tag);
 8757|  7.35M|    }
 8758|  11.4M|}
janet.c:emit1s:
 8837|   542k|static int32_t emit1s(JanetCompiler *c, uint8_t op, JanetSlot s, int32_t rest, int wr) {
 8838|   542k|    int32_t reg = janetc_regnear(c, s, JANETC_REGTEMP_0);
 8839|   542k|    int32_t label = janet_v_count(c->buffer);
  ------------------
  |  |  708|   542k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|   542k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|   542k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 542k, False: 11]
  |  |  ------------------
  ------------------
 8840|   542k|    janetc_emit(c, op | ((uint32_t) reg << 8) | ((uint32_t) rest << 16));
 8841|   542k|    if (wr)
  ------------------
  |  Branch (8841:9): [True: 533k, False: 8.56k]
  ------------------
 8842|   533k|        janetc_moveback(c, s, reg);
 8843|   542k|    janetc_free_regnear(c, s, reg, JANETC_REGTEMP_0);
 8844|   542k|    return label;
 8845|   542k|}
janet.c:janetc_regnear:
 8782|  8.58M|static int32_t janetc_regnear(JanetCompiler *c, JanetSlot s, JanetcRegisterTemp tag) {
 8783|       |    /* check if already near register */
 8784|  8.58M|    if (s.envindex < 0 && s.index >= 0 && s.index <= 0xFF) {
  ------------------
  |  Branch (8784:9): [True: 8.57M, False: 4.27k]
  |  Branch (8784:27): [True: 7.16M, False: 1.41M]
  |  Branch (8784:43): [True: 1.72M, False: 5.44M]
  ------------------
 8785|  1.72M|        return s.index;
 8786|  1.72M|    }
 8787|  6.85M|    int32_t reg = janetc_regalloc_temp(&c->scope->ra, tag);
 8788|  6.85M|    janetc_movenear(c, reg, s);
 8789|  6.85M|    return reg;
 8790|  8.58M|}
janet.c:emit2s:
 8878|  3.07M|static int32_t emit2s(JanetCompiler *c, uint8_t op, JanetSlot s1, JanetSlot s2, int32_t rest, int wr) {
 8879|  3.07M|    int32_t reg1 = janetc_regnear(c, s1, JANETC_REGTEMP_0);
 8880|  3.07M|    int32_t reg2 = janetc_regnear(c, s2, JANETC_REGTEMP_1);
 8881|  3.07M|    int32_t label = janet_v_count(c->buffer);
  ------------------
  |  |  708|  3.07M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  3.07M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  3.07M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 3.07M, False: 309]
  |  |  ------------------
  ------------------
 8882|  3.07M|    janetc_emit(c, op | ((uint32_t) reg1 << 8) | ((uint32_t) reg2 << 16) | ((uint32_t)rest << 24));
 8883|  3.07M|    janetc_free_regnear(c, s2, reg2, JANETC_REGTEMP_1);
 8884|  3.07M|    if (wr)
  ------------------
  |  Branch (8884:9): [True: 3.07M, False: 3.07k]
  ------------------
 8885|  3.07M|        janetc_moveback(c, s1, reg1);
 8886|  3.07M|    janetc_free_regnear(c, s1, reg1, JANETC_REGTEMP_0);
 8887|  3.07M|    return label;
 8888|  3.07M|}
janet.c:janet_stream_close_impl:
 9287|     22|static void janet_stream_close_impl(JanetStream *stream) {
 9288|     22|    stream->flags |= JANET_STREAM_CLOSED;
  ------------------
  |  |  617|     22|#define JANET_STREAM_CLOSED 0x1
  ------------------
 9289|     22|    int canclose = !(stream->flags & JANET_STREAM_NOT_CLOSEABLE);
  ------------------
  |  |  624|     22|#define JANET_STREAM_NOT_CLOSEABLE 0x2000
  ------------------
 9290|       |    /* 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)
 9291|       |     * then skip unregister to save a syscall */
 9292|       |#ifdef JANET_WINDOWS
 9293|       |    if (stream->handle != INVALID_HANDLE_VALUE) {
 9294|       |#ifdef JANET_NET
 9295|       |        if (stream->flags & JANET_STREAM_SOCKET) {
 9296|       |            if (canclose) closesocket((SOCKET) stream->handle);
 9297|       |        } else
 9298|       |#endif
 9299|       |        {
 9300|       |            if (canclose) CloseHandle(stream->handle);
 9301|       |        }
 9302|       |        stream->handle = INVALID_HANDLE_VALUE;
 9303|       |    }
 9304|       |#else
 9305|     22|    int canunregister = !(stream->flags & JANET_STREAM_UNREGISTERED);
  ------------------
  |  |  619|     22|#define JANET_STREAM_UNREGISTERED 0x4
  ------------------
 9306|     22|    if (stream->handle != -1) {
  ------------------
  |  Branch (9306:9): [True: 22, False: 0]
  ------------------
 9307|     22|        if (canunregister) janet_unregister_stream(stream);
  ------------------
  |  Branch (9307:13): [True: 16, False: 6]
  ------------------
 9308|     22|        if (canclose) close(stream->handle);
  ------------------
  |  Branch (9308:13): [True: 22, False: 0]
  ------------------
 9309|     22|        stream->handle = -1;
 9310|     22|    }
 9311|     22|#endif
 9312|     22|}
janet.c:janet_unregister_stream:
10714|     16|void janet_unregister_stream(JanetStream *stream) {
10715|     16|    if (stream->flags & JANET_STREAM_NODUPS) return;
  ------------------
  |  |  626|     16|#define JANET_STREAM_NODUPS 0x20000
  ------------------
  |  Branch (10715:9): [True: 6, False: 10]
  ------------------
10716|     10|    int status;
10717|     10|    do {
10718|     10|        status = epoll_ctl(janet_vm.epoll, EPOLL_CTL_DEL, stream->handle, NULL);
10719|     10|    } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (10719:14): [True: 0, False: 10]
  |  Branch (10719:30): [True: 0, False: 0]
  ------------------
10720|     10|    if (status == -1) {
  ------------------
  |  Branch (10720:9): [True: 0, False: 10]
  ------------------
10721|      0|        janet_panicv(janet_ev_lasterr());
10722|      0|    }
10723|     10|    stream->flags |= JANET_STREAM_UNREGISTERED;
  ------------------
  |  |  619|     10|#define JANET_STREAM_UNREGISTERED 0x4
  ------------------
10724|     10|}
janet.c:janet_stream_gc:
 9329|     22|static int janet_stream_gc(void *p, size_t s) {
 9330|     22|    (void) s;
 9331|     22|    JanetStream *stream = (JanetStream *)p;
 9332|     22|    janet_stream_close_impl(stream);
 9333|     22|    return 0;
 9334|     22|}
janet.c:janet_schedule_general:
 9442|    718|static void janet_schedule_general(JanetFiber *fiber, Janet value, JanetSignal sig, int soon) {
 9443|    718|    if (fiber->gc.flags & JANET_FIBER_EV_FLAG_CANCELED) return;
  ------------------
  |  |  789|    718|#define JANET_FIBER_EV_FLAG_CANCELED 0x10000
  ------------------
  |  Branch (9443:9): [True: 0, False: 718]
  ------------------
 9444|    718|    if (!(fiber->gc.flags & JANET_FIBER_FLAG_ROOT)) {
  ------------------
  |  |  791|    718|#define JANET_FIBER_FLAG_ROOT 0x40000
  ------------------
  |  Branch (9444:9): [True: 672, False: 46]
  ------------------
 9445|    672|        Janet task_element = janet_wrap_fiber(fiber);
  ------------------
  |  |  839|    672|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|    672|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    672|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    672|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9446|    672|        janet_table_put(&janet_vm.active_tasks, task_element, janet_wrap_true());
  ------------------
  |  |  827|    672|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  817|    672|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    672|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    672|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9447|    672|    }
 9448|    718|    JanetTask t = { fiber, value, sig, ++fiber->sched_id };
 9449|    718|    fiber->gc.flags |= JANET_FIBER_FLAG_ROOT;
  ------------------
  |  |  791|    718|#define JANET_FIBER_FLAG_ROOT 0x40000
  ------------------
 9450|    718|    if (sig == JANET_SIGNAL_ERROR) fiber->gc.flags |= JANET_FIBER_EV_FLAG_CANCELED;
  ------------------
  |  |  789|      0|#define JANET_FIBER_EV_FLAG_CANCELED 0x10000
  ------------------
  |  Branch (9450:9): [True: 0, False: 718]
  ------------------
 9451|    718|    if (soon) {
  ------------------
  |  Branch (9451:9): [True: 0, False: 718]
  ------------------
 9452|      0|        janet_assert(!janet_q_push_head(&janet_vm.spawn, &t, sizeof(t)), "schedule queue overflow");
  ------------------
  |  |  386|      0|#define janet_assert(c, m) do { \
  |  |  387|      0|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  388|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
 9453|    718|    } else {
 9454|       |        janet_assert(!janet_q_push(&janet_vm.spawn, &t, sizeof(t)), "schedule queue overflow");
  ------------------
  |  |  386|    718|#define janet_assert(c, m) do { \
  |  |  387|    718|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 718]
  |  |  ------------------
  |  |  388|    718|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 718]
  |  |  ------------------
  ------------------
 9455|    718|    }
 9456|    718|}
janet.c:janet_q_maybe_resize:
 9071|    752|static int janet_q_maybe_resize(JanetQueue *q, size_t itemsize) {
 9072|    752|    int32_t count = janet_q_count(q);
 9073|       |    /* Resize if needed */
 9074|    752|    if (count + 1 >= q->capacity) {
  ------------------
  |  Branch (9074:9): [True: 566, False: 186]
  ------------------
 9075|    566|        if (count + 1 >= JANET_MAX_Q_CAPACITY) return 1;
  ------------------
  |  | 9052|    566|#define JANET_MAX_Q_CAPACITY 0x7FFFFFF
  ------------------
  |  Branch (9075:13): [True: 0, False: 566]
  ------------------
 9076|    566|        int32_t newcap = (count + 2) * 2;
 9077|    566|        if (newcap > JANET_MAX_Q_CAPACITY) newcap = JANET_MAX_Q_CAPACITY;
  ------------------
  |  | 9052|    566|#define JANET_MAX_Q_CAPACITY 0x7FFFFFF
  ------------------
                      if (newcap > JANET_MAX_Q_CAPACITY) newcap = JANET_MAX_Q_CAPACITY;
  ------------------
  |  | 9052|      0|#define JANET_MAX_Q_CAPACITY 0x7FFFFFF
  ------------------
  |  Branch (9077:13): [True: 0, False: 566]
  ------------------
 9078|    566|        q->data = janet_realloc(q->data, itemsize * newcap);
  ------------------
  |  | 2396|    566|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 9079|    566|        if (NULL == q->data) {
  ------------------
  |  Branch (9079:13): [True: 0, False: 566]
  ------------------
 9080|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
 9081|      0|        }
 9082|    566|        if (q->head > q->tail) {
  ------------------
  |  Branch (9082:13): [True: 0, False: 566]
  ------------------
 9083|       |            /* Two segments, fix 2nd seg. */
 9084|      0|            int32_t newhead = q->head + (newcap - q->capacity);
 9085|      0|            size_t seg1 = (size_t)(q->capacity - q->head);
 9086|      0|            if (seg1 > 0) {
  ------------------
  |  Branch (9086:17): [True: 0, False: 0]
  ------------------
 9087|      0|                memmove((char *) q->data + (newhead * itemsize),
 9088|      0|                        (char *) q->data + (q->head * itemsize),
 9089|      0|                        seg1 * itemsize);
 9090|      0|            }
 9091|      0|            q->head = newhead;
 9092|      0|        }
 9093|    566|        q->capacity = newcap;
 9094|    566|    }
 9095|    752|    return 0;
 9096|    752|}
janet.c:janet_q_push:
 9098|    752|static int janet_q_push(JanetQueue *q, void *item, size_t itemsize) {
 9099|    752|    if (janet_q_maybe_resize(q, itemsize)) return 1;
  ------------------
  |  Branch (9099:9): [True: 0, False: 752]
  ------------------
 9100|    752|    memcpy((char *) q->data + itemsize * q->tail, item, itemsize);
 9101|    752|    q->tail = q->tail + 1 < q->capacity ? q->tail + 1 : 0;
  ------------------
  |  Branch (9101:15): [True: 752, False: 0]
  ------------------
 9102|    752|    return 0;
 9103|    752|}
janet.c:janet_q_init:
 9054|  12.3k|static void janet_q_init(JanetQueue *q) {
 9055|       |    q->data = NULL;
 9056|  12.3k|    q->head = 0;
 9057|  12.3k|    q->tail = 0;
 9058|  12.3k|    q->capacity = 0;
 9059|  12.3k|}
janet.c:peek_timeout:
 9136|  11.8k|static int peek_timeout(JanetTimeout *out) {
 9137|  11.8k|    if (janet_vm.tq_count == 0) return 0;
  ------------------
  |  Branch (9137:9): [True: 8.23k, False: 3.61k]
  ------------------
 9138|  3.61k|    *out = janet_vm.tq[0];
 9139|  3.61k|    return 1;
 9140|  11.8k|}
janet.c:handle_timeout_worker:
 9546|  3.61k|static void handle_timeout_worker(JanetTimeout to, int cancel) {
 9547|  3.61k|    if (!to.has_worker) return;
  ------------------
  |  Branch (9547:9): [True: 3.61k, False: 0]
  ------------------
 9548|       |#ifdef JANET_WINDOWS
 9549|       |    if (cancel && to.worker_event) {
 9550|       |        SetEvent(to.worker_event);
 9551|       |    }
 9552|       |    WaitForSingleObject(to.worker, INFINITE);
 9553|       |    CloseHandle(to.worker);
 9554|       |    if (to.worker_event) {
 9555|       |        CloseHandle(to.worker_event);
 9556|       |    }
 9557|       |#else
 9558|       |#ifdef JANET_ANDROID
 9559|       |    if (cancel) janet_assert(!pthread_kill(to.worker, SIGUSR1), "pthread_kill");
 9560|       |#else
 9561|      0|    if (cancel) janet_assert(!pthread_cancel(to.worker), "pthread_cancel");
  ------------------
  |  |  386|      0|#define janet_assert(c, m) do { \
  |  |  387|      0|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  388|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (9561:9): [True: 0, False: 0]
  ------------------
 9562|      0|#endif
 9563|      0|    void *res = NULL;
 9564|       |    janet_assert(!pthread_join(to.worker, &res), "pthread_join");
  ------------------
  |  |  386|      0|#define janet_assert(c, m) do { \
  |  |  387|      0|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  388|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
 9565|      0|#endif
 9566|      0|}
janet.c:pop_timeout:
 9143|  3.61k|static void pop_timeout(size_t index) {
 9144|  3.61k|    if (janet_vm.tq_count <= index) return;
  ------------------
  |  Branch (9144:9): [True: 0, False: 3.61k]
  ------------------
 9145|  3.61k|    janet_vm.tq[index] = janet_vm.tq[--janet_vm.tq_count];
 9146|  7.75k|    for (;;) {
 9147|  7.75k|        size_t left = (index << 1) + 1;
 9148|  7.75k|        size_t right = left + 1;
 9149|  7.75k|        size_t smallest = index;
 9150|  7.75k|        if (left < janet_vm.tq_count &&
  ------------------
  |  Branch (9150:13): [True: 7.03k, False: 725]
  ------------------
 9151|  7.03k|                (janet_vm.tq[left].when < janet_vm.tq[smallest].when))
  ------------------
  |  Branch (9151:17): [True: 2.77k, False: 4.25k]
  ------------------
 9152|  2.77k|            smallest = left;
 9153|  7.75k|        if (right < janet_vm.tq_count &&
  ------------------
  |  Branch (9153:13): [True: 6.89k, False: 862]
  ------------------
 9154|  6.89k|                (janet_vm.tq[right].when < janet_vm.tq[smallest].when))
  ------------------
  |  Branch (9154:17): [True: 1.71k, False: 5.17k]
  ------------------
 9155|  1.71k|            smallest = right;
 9156|  7.75k|        if (smallest == index) return;
  ------------------
  |  Branch (9156:13): [True: 3.61k, False: 4.14k]
  ------------------
 9157|  4.14k|        JanetTimeout temp = janet_vm.tq[index];
 9158|  4.14k|        janet_vm.tq[index] = janet_vm.tq[smallest];
 9159|  4.14k|        janet_vm.tq[smallest] = temp;
 9160|  4.14k|        index = smallest;
 9161|  4.14k|    }
 9162|  3.61k|}
janet.c:janet_q_deinit:
 9061|  12.3k|static void janet_q_deinit(JanetQueue *q) {
 9062|  12.3k|    janet_free(q->data);
  ------------------
  |  | 2402|  12.3k|#define janet_free(X) free((X))
  ------------------
 9063|  12.3k|}
janet.c:ts_delta:
 9127|  3.61k|static JanetTimestamp ts_delta(JanetTimestamp ts, double delta) {
 9128|  3.61k|    if (isinf(delta)) {
  ------------------
  |  Branch (9128:9): [True: 8, False: 3.60k]
  ------------------
 9129|      8|        return delta < 0 ? ts : INT64_MAX;
  ------------------
  |  Branch (9129:16): [True: 0, False: 8]
  ------------------
 9130|      8|    }
 9131|  3.60k|    ts += (int64_t)round(delta * 1000);
 9132|  3.60k|    return ts;
 9133|  3.61k|}
janet.c:add_timeout:
 9165|  3.61k|static void add_timeout(JanetTimeout to) {
 9166|  3.61k|    size_t oldcount = janet_vm.tq_count;
 9167|  3.61k|    size_t newcount = oldcount + 1;
 9168|  3.61k|    if (newcount > janet_vm.tq_capacity) {
  ------------------
  |  Branch (9168:9): [True: 254, False: 3.36k]
  ------------------
 9169|    254|        size_t newcap = 2 * newcount;
 9170|    254|        JanetTimeout *tq = janet_realloc(janet_vm.tq, newcap * sizeof(JanetTimeout));
  ------------------
  |  | 2396|    254|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
 9171|    254|        if (NULL == tq) {
  ------------------
  |  Branch (9171:13): [True: 0, False: 254]
  ------------------
 9172|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
 9173|      0|        }
 9174|    254|        janet_vm.tq = tq;
 9175|    254|        janet_vm.tq_capacity = newcap;
 9176|    254|    }
 9177|       |    /* Append */
 9178|  3.61k|    janet_vm.tq_count = (int32_t) newcount;
 9179|  3.61k|    janet_vm.tq[oldcount] = to;
 9180|       |    /* Heapify */
 9181|  3.61k|    size_t index = oldcount;
 9182|  4.05k|    while (index > 0) {
  ------------------
  |  Branch (9182:12): [True: 3.88k, False: 168]
  ------------------
 9183|  3.88k|        size_t parent = (index - 1) >> 1;
 9184|  3.88k|        if (janet_vm.tq[parent].when <= janet_vm.tq[index].when) break;
  ------------------
  |  Branch (9184:13): [True: 3.44k, False: 435]
  ------------------
 9185|       |        /* Swap */
 9186|    435|        JanetTimeout tmp = janet_vm.tq[index];
 9187|    435|        janet_vm.tq[index] = janet_vm.tq[parent];
 9188|    435|        janet_vm.tq[parent] = tmp;
 9189|       |        /* Next */
 9190|    435|        index = parent;
 9191|    435|    }
 9192|  3.61k|}
janet.c:janet_channel_pop:
10061|     34|static int janet_channel_pop(JanetChannel *channel, Janet *item, int is_choice) {
10062|     34|    janet_chan_lock(channel);
10063|     34|    return janet_channel_pop_with_lock(channel, item, is_choice);
10064|     34|}
janet.c:janet_chan_init:
 9728|  1.55k|static void janet_chan_init(JanetChannel *chan, int32_t limit, int threaded) {
 9729|  1.55k|    chan->limit = limit;
 9730|  1.55k|    chan->closed = 0;
 9731|  1.55k|    chan->is_threaded = threaded;
 9732|  1.55k|    janet_q_init(&chan->items);
 9733|  1.55k|    janet_q_init(&chan->read_pending);
 9734|  1.55k|    janet_q_init(&chan->write_pending);
 9735|  1.55k|    janet_os_mutex_init((JanetOSMutex *) &chan->lock);
 9736|  1.55k|}
janet.c:janet_chan_lock:
 9738|  1.58k|static void janet_chan_lock(JanetChannel *chan) {
 9739|  1.58k|    if (!janet_chan_is_threaded(chan)) return;
  ------------------
  |  Branch (9739:9): [True: 1.58k, False: 0]
  ------------------
 9740|      0|    janet_os_mutex_lock((JanetOSMutex *) &chan->lock);
 9741|      0|}
janet.c:janet_chan_is_threaded:
 9680|  4.76k|static inline int janet_chan_is_threaded(JanetChannel *chan) {
 9681|  4.76k|    return chan->is_threaded;
 9682|  4.76k|}
janet.c:janet_chan_unlock:
 9743|  1.58k|static void janet_chan_unlock(JanetChannel *chan) {
 9744|  1.58k|    if (!janet_chan_is_threaded(chan)) return;
  ------------------
  |  Branch (9744:9): [True: 1.58k, False: 0]
  ------------------
 9745|      0|    janet_os_mutex_unlock((JanetOSMutex *) &chan->lock);
 9746|      0|}
janet.c:janet_q_count:
 9065|    752|static int32_t janet_q_count(JanetQueue *q) {
 9066|    752|    return (q->head > q->tail)
  ------------------
  |  Branch (9066:12): [True: 0, False: 752]
  ------------------
 9067|    752|           ? (q->tail + q->capacity - q->head)
 9068|    752|           : (q->tail - q->head);
 9069|    752|}
janet.c:janet_channel_pop_with_lock:
10012|     34|static int janet_channel_pop_with_lock(JanetChannel *channel, Janet *item, int is_choice) {
10013|     34|    JanetChannelPending writer;
10014|     34|    if (channel->closed) {
  ------------------
  |  Branch (10014:9): [True: 0, False: 34]
  ------------------
10015|      0|        janet_chan_unlock(channel);
10016|      0|        *item = janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10017|      0|        return 1;
10018|      0|    }
10019|     34|    int is_threaded = janet_chan_is_threaded(channel);
10020|     34|    if (janet_q_pop(&channel->items, item, sizeof(Janet))) {
  ------------------
  |  Branch (10020:9): [True: 34, False: 0]
  ------------------
10021|       |        /* Queue empty */
10022|     34|        if (is_choice == 2) return 0; /* Skip pending read */
  ------------------
  |  Branch (10022:13): [True: 0, False: 34]
  ------------------
10023|     34|        JanetChannelPending pending;
10024|     34|        pending.thread = &janet_vm;
10025|     34|        pending.fiber = janet_vm.root_fiber,
10026|     34|        pending.sched_id = janet_vm.root_fiber->sched_id;
10027|     34|        pending.mode = is_choice ? JANET_CP_MODE_CHOICE_READ : JANET_CP_MODE_READ;
  ------------------
  |  Branch (10027:24): [True: 0, False: 34]
  ------------------
10028|     34|        janet_q_push(&channel->read_pending, &pending, sizeof(pending));
10029|     34|        janet_chan_unlock(channel);
10030|     34|        if (is_threaded) {
  ------------------
  |  Branch (10030:13): [True: 0, False: 34]
  ------------------
10031|      0|            janet_gcroot(janet_wrap_fiber(pending.fiber));
  ------------------
  |  |  839|      0|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10032|      0|        }
10033|     34|        return 0;
10034|     34|    }
10035|      0|    janet_assert(!janet_chan_unpack(channel, item, 0), "bad channel packing");
  ------------------
  |  |  386|      0|#define janet_assert(c, m) do { \
  |  |  387|      0|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  388|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
10036|      0|    if (!janet_q_pop(&channel->write_pending, &writer, sizeof(writer))) {
  ------------------
  |  Branch (10036:9): [True: 0, False: 0]
  ------------------
10037|       |        /* Pending writer */
10038|      0|        if (is_threaded) {
  ------------------
  |  Branch (10038:13): [True: 0, False: 0]
  ------------------
10039|      0|            JanetVM *vm = writer.thread;
10040|      0|            JanetEVGenericMessage msg;
10041|      0|            msg.tag = writer.mode;
10042|      0|            msg.fiber = writer.fiber;
10043|      0|            msg.argi = (int32_t) writer.sched_id;
10044|      0|            msg.argp = channel;
10045|      0|            msg.argj = janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10046|      0|            if (vm) {
  ------------------
  |  Branch (10046:17): [True: 0, False: 0]
  ------------------
10047|      0|                janet_ev_post_event(vm, janet_thread_chan_cb, msg);
10048|      0|            }
10049|      0|        } else {
10050|      0|            if (writer.mode == JANET_CP_MODE_CHOICE_WRITE) {
  ------------------
  |  Branch (10050:17): [True: 0, False: 0]
  ------------------
10051|      0|                janet_schedule(writer.fiber, make_write_result(channel));
10052|      0|            } else {
10053|      0|                janet_schedule(writer.fiber, janet_wrap_abstract(channel));
  ------------------
  |  |  846|      0|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10054|      0|            }
10055|      0|        }
10056|      0|    }
10057|      0|    janet_chan_unlock(channel);
10058|      0|    return 1;
10059|      0|}
janet.c:fisher_yates_args:
10241|     16|static void fisher_yates_args(int32_t argc, Janet *argv) {
10242|    356|    for (int32_t i = argc; i > 1; i--) {
  ------------------
  |  Branch (10242:28): [True: 340, False: 16]
  ------------------
10243|    340|        int32_t swap_index = janet_rng_u32(&janet_vm.ev_rng) % i;
10244|    340|        Janet temp = argv[swap_index];
10245|    340|        argv[swap_index] = argv[i - 1];
10246|    340|        argv[i - 1] = temp;
10247|    340|    }
10248|     16|}
janet.c:janet_q_pop:
 9116|    572|static int janet_q_pop(JanetQueue *q, void *out, size_t itemsize) {
 9117|    572|    if (q->head == q->tail) return 1;
  ------------------
  |  Branch (9117:9): [True: 34, False: 538]
  ------------------
 9118|    538|    memcpy(out, (char *) q->data + itemsize * q->head, itemsize);
 9119|    538|    q->head = q->head + 1 < q->capacity ? q->head + 1 : 0;
  ------------------
  |  Branch (9119:15): [True: 538, False: 0]
  ------------------
 9120|    538|    return 0;
 9121|    572|}
janet.c:janet_chanat_gc:
 9775|  1.55k|static int janet_chanat_gc(void *p, size_t s) {
 9776|  1.55k|    (void) s;
 9777|  1.55k|    JanetChannel *channel = p;
 9778|  1.55k|    janet_chan_deinit(channel);
 9779|  1.55k|    return 0;
 9780|  1.55k|}
janet.c:janet_chan_deinit:
 9748|  1.55k|static void janet_chan_deinit(JanetChannel *chan) {
 9749|  1.55k|    if (janet_chan_is_threaded(chan)) {
  ------------------
  |  Branch (9749:9): [True: 0, False: 1.55k]
  ------------------
 9750|      0|        Janet item;
 9751|      0|        janet_chan_lock(chan);
 9752|      0|        janet_q_deinit(&chan->read_pending);
 9753|      0|        janet_q_deinit(&chan->write_pending);
 9754|      0|        while (!janet_q_pop(&chan->items, &item, sizeof(item))) {
  ------------------
  |  Branch (9754:16): [True: 0, False: 0]
  ------------------
 9755|      0|            janet_chan_unpack(chan, &item, 1);
 9756|      0|        }
 9757|      0|        janet_q_deinit(&chan->items);
 9758|      0|        janet_chan_unlock(chan);
 9759|  1.55k|    } else {
 9760|  1.55k|        janet_q_deinit(&chan->read_pending);
 9761|  1.55k|        janet_q_deinit(&chan->write_pending);
 9762|  1.55k|        janet_q_deinit(&chan->items);
 9763|  1.55k|    }
 9764|  1.55k|    janet_os_mutex_deinit((JanetOSMutex *) &chan->lock);
 9765|  1.55k|}
janet.c:janet_chanat_mark:
 9823|     20|static int janet_chanat_mark(void *p, size_t s) {
 9824|     20|    (void) s;
 9825|     20|    JanetChannel *chan = p;
 9826|     20|    janet_chanat_mark_fq(&chan->read_pending);
 9827|     20|    janet_chanat_mark_fq(&chan->write_pending);
 9828|     20|    JanetQueue *items = &chan->items;
 9829|     20|    Janet *data = chan->items.data;
 9830|     20|    if (items->head <= items->tail) {
  ------------------
  |  Branch (9830:9): [True: 20, False: 0]
  ------------------
 9831|     20|        for (int32_t i = items->head; i < items->tail; i++)
  ------------------
  |  Branch (9831:39): [True: 0, False: 20]
  ------------------
 9832|      0|            janet_mark(data[i]);
 9833|     20|    } else {
 9834|      0|        for (int32_t i = items->head; i < items->capacity; i++)
  ------------------
  |  Branch (9834:39): [True: 0, False: 0]
  ------------------
 9835|      0|            janet_mark(data[i]);
 9836|      0|        for (int32_t i = 0; i < items->tail; i++)
  ------------------
  |  Branch (9836:29): [True: 0, False: 0]
  ------------------
 9837|      0|            janet_mark(data[i]);
 9838|      0|    }
 9839|     20|    return 0;
 9840|     20|}
janet.c:janet_chanat_mark_fq:
 9810|     40|static void janet_chanat_mark_fq(JanetQueue *fq) {
 9811|     40|    JanetChannelPending *pending = fq->data;
 9812|     40|    if (fq->head <= fq->tail) {
  ------------------
  |  Branch (9812:9): [True: 40, False: 0]
  ------------------
 9813|     60|        for (int32_t i = fq->head; i < fq->tail; i++)
  ------------------
  |  Branch (9813:36): [True: 20, False: 40]
  ------------------
 9814|     20|            janet_mark(janet_wrap_fiber(pending[i].fiber));
  ------------------
  |  |  839|     20|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|     20|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     20|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     20|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9815|     40|    } else {
 9816|      0|        for (int32_t i = fq->head; i < fq->capacity; i++)
  ------------------
  |  Branch (9816:36): [True: 0, False: 0]
  ------------------
 9817|      0|            janet_mark(janet_wrap_fiber(pending[i].fiber));
  ------------------
  |  |  839|      0|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9818|      0|        for (int32_t i = 0; i < fq->tail; i++)
  ------------------
  |  Branch (9818:29): [True: 0, False: 0]
  ------------------
 9819|      0|            janet_mark(janet_wrap_fiber(pending[i].fiber));
  ------------------
  |  |  839|      0|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9820|      0|    }
 9821|     40|}
janet.c:janet_chanat_get:
10351|      1|static int janet_chanat_get(void *p, Janet key, Janet *out) {
10352|      1|    (void) p;
10353|      1|    if (!janet_checktype(key, JANET_KEYWORD)) return 0;
  ------------------
  |  |  801|      1|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 1]
  |  |  ------------------
  |  |  802|      1|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      1|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      1|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      1|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (10353:9): [True: 1, False: 0]
  ------------------
10354|      0|    return janet_getmethod(janet_unwrap_keyword(key), ev_chanat_methods, out);
  ------------------
  |  |  860|      0|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
10355|      1|}
janet.c:janet_chanat_gcperthread:
 9798|  1.55k|static int janet_chanat_gcperthread(void *p, size_t s) {
 9799|  1.55k|    (void) s;
 9800|  1.55k|    JanetChannel *chan = p;
 9801|  1.55k|    janet_chan_lock(chan);
 9802|       |    /* Make sure that the internals of the threaded channel no longer reference _this_ thread. Replace
 9803|       |     * those references with NULL. */
 9804|  1.55k|    janet_chanat_remove_vmref(&chan->read_pending);
 9805|  1.55k|    janet_chanat_remove_vmref(&chan->write_pending);
 9806|  1.55k|    janet_chan_unlock(chan);
 9807|  1.55k|    return 0;
 9808|  1.55k|}
janet.c:janet_chanat_remove_vmref:
 9782|  3.10k|static void janet_chanat_remove_vmref(JanetQueue *fq) {
 9783|  3.10k|    JanetChannelPending *pending = fq->data;
 9784|  3.10k|    if (fq->head <= fq->tail) {
  ------------------
  |  Branch (9784:9): [True: 3.10k, False: 0]
  ------------------
 9785|  3.14k|        for (int32_t i = fq->head; i < fq->tail; i++) {
  ------------------
  |  Branch (9785:36): [True: 34, False: 3.10k]
  ------------------
 9786|     34|            if (pending[i].thread == &janet_vm) pending[i].thread = NULL;
  ------------------
  |  Branch (9786:17): [True: 34, False: 0]
  ------------------
 9787|     34|        }
 9788|  3.10k|    } else {
 9789|      0|        for (int32_t i = fq->head; i < fq->capacity; i++) {
  ------------------
  |  Branch (9789:36): [True: 0, False: 0]
  ------------------
 9790|      0|            if (pending[i].thread == &janet_vm) pending[i].thread = NULL;
  ------------------
  |  Branch (9790:17): [True: 0, False: 0]
  ------------------
 9791|      0|        }
 9792|      0|        for (int32_t i = 0; i < fq->tail; i++) {
  ------------------
  |  Branch (9792:29): [True: 0, False: 0]
  ------------------
 9793|      0|            if (pending[i].thread == &janet_vm) pending[i].thread = NULL;
  ------------------
  |  Branch (9793:17): [True: 0, False: 0]
  ------------------
 9794|      0|        }
 9795|      0|    }
 9796|  3.10k|}
janet.c:ts_now:
10671|  4.15k|static JanetTimestamp ts_now(void) {
10672|  4.15k|    struct timespec now;
10673|  4.15k|    janet_assert(-1 != janet_gettime(&now, JANET_TIME_MONOTONIC), "failed to get time");
  ------------------
  |  |  386|  4.15k|#define janet_assert(c, m) do { \
  |  |  387|  4.15k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 4.15k]
  |  |  ------------------
  |  |  388|  4.15k|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 4.15k]
  |  |  ------------------
  ------------------
10674|  4.15k|    uint64_t res = 1000 * now.tv_sec;
10675|  4.15k|    res += now.tv_nsec / 1000000;
10676|  4.15k|    return res;
10677|  4.15k|}
janet.c:janet_register_stream:
10702|     22|static void janet_register_stream(JanetStream *stream) {
10703|     22|    janet_register_stream_impl(stream, 0, 1);
10704|     22|}
janet.c:janet_register_stream_impl:
10680|     22|static void janet_register_stream_impl(JanetStream *stream, int mod, int edge_trigger) {
10681|     22|    struct epoll_event ev;
10682|     22|    ev.events = edge_trigger ? EPOLLET : 0;
  ------------------
  |  Branch (10682:17): [True: 22, False: 0]
  ------------------
10683|     22|    if (stream->flags & (JANET_STREAM_READABLE | JANET_STREAM_ACCEPTABLE)) ev.events |= EPOLLIN;
  ------------------
  |  |  620|     22|#define JANET_STREAM_READABLE 0x200
  ------------------
                  if (stream->flags & (JANET_STREAM_READABLE | JANET_STREAM_ACCEPTABLE)) ev.events |= EPOLLIN;
  ------------------
  |  |  622|     22|#define JANET_STREAM_ACCEPTABLE 0x800
  ------------------
  |  Branch (10683:9): [True: 15, False: 7]
  ------------------
10684|     22|    if (stream->flags & JANET_STREAM_WRITABLE) ev.events |= EPOLLOUT;
  ------------------
  |  |  621|     22|#define JANET_STREAM_WRITABLE 0x400
  ------------------
  |  Branch (10684:9): [True: 11, False: 11]
  ------------------
10685|     22|    ev.data.ptr = stream;
10686|     22|    int status;
10687|     22|    do {
10688|     22|        status = epoll_ctl(janet_vm.epoll, mod ? EPOLL_CTL_MOD : EPOLL_CTL_ADD, stream->handle, &ev);
  ------------------
  |  Branch (10688:44): [True: 0, False: 22]
  ------------------
10689|     22|    } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (10689:14): [True: 6, False: 16]
  |  Branch (10689:30): [True: 0, False: 6]
  ------------------
10690|     22|    if (status == -1) {
  ------------------
  |  Branch (10690:9): [True: 6, False: 16]
  ------------------
10691|      6|        if (errno == EPERM) {
  ------------------
  |  Branch (10691:13): [True: 6, False: 0]
  ------------------
10692|       |            /* Couldn't add to event loop, so assume that it completes
10693|       |             * synchronously. */
10694|      6|            stream->flags |= JANET_STREAM_UNREGISTERED;
  ------------------
  |  |  619|      6|#define JANET_STREAM_UNREGISTERED 0x4
  ------------------
10695|      6|        } else {
10696|       |            /* Unexpected error */
10697|      0|            janet_panicv(janet_ev_lasterr());
10698|      0|        }
10699|      6|    }
10700|     22|}
janet.c:janet_ev_handle_selfpipe:
10561|     45|static void janet_ev_handle_selfpipe(void) {
10562|     45|    JanetSelfPipeEvent response;
10563|     45|    int status;
10564|     90|recur:
10565|     90|    do {
10566|     90|        status = read(janet_vm.selfpipe[0], &response, sizeof(response));
10567|     90|    } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (10567:14): [True: 45, False: 45]
  |  Branch (10567:30): [True: 0, False: 45]
  ------------------
10568|     90|    if (status > 0) {
  ------------------
  |  Branch (10568:9): [True: 45, False: 45]
  ------------------
10569|     45|        if (NULL != response.cb) {
  ------------------
  |  Branch (10569:13): [True: 45, False: 0]
  ------------------
10570|     45|            response.cb(response.msg);
10571|     45|            janet_ev_dec_refcount();
10572|     45|        }
10573|     45|        goto recur;
10574|     45|    }
10575|     90|}
janet.c:janet_ev_setup_selfpipe:
10554|  7.65k|static void janet_ev_setup_selfpipe(void) {
10555|  7.65k|    if (janet_make_pipe(janet_vm.selfpipe, 1)) {
  ------------------
  |  Branch (10555:9): [True: 0, False: 7.65k]
  ------------------
10556|       |        JANET_EXIT("failed to initialize self pipe in event loop");
  ------------------
  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  377|      0|        __FILE__,\
  |  |  378|      0|        __LINE__,\
  |  |  379|      0|        (m));\
  |  |  380|      0|    abort();\
  |  |  381|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
10557|      0|    }
10558|  7.65k|}
janet.c:janet_ev_cleanup_selfpipe:
10577|  7.65k|static void janet_ev_cleanup_selfpipe(void) {
10578|  7.65k|    close(janet_vm.selfpipe[0]);
10579|  7.65k|    close(janet_vm.selfpipe[1]);
10580|  7.65k|}
janet.c:janet_thread_body:
11236|    492|static void *janet_thread_body(void *ptr) {
11237|    492|    JanetEVThreadInit *init = (JanetEVThreadInit *)ptr;
11238|    492|    JanetEVGenericMessage msg = init->msg;
11239|    492|    JanetThreadedSubroutine subr = init->subr;
11240|    492|    JanetThreadedCallback cb = init->cb;
11241|    492|    int fd = init->write_pipe;
11242|    492|    janet_free(init);
  ------------------
  |  | 2402|    492|#define janet_free(X) free((X))
  ------------------
11243|    492|    JanetSelfPipeEvent response;
11244|    492|    memset(&response, 0, sizeof(response));
11245|    492|    response.msg = subr(msg);
11246|    492|    response.cb = cb;
11247|       |    /* handle a bit of back pressure before giving up. */
11248|    492|    int tries = 4;
11249|    501|    while (tries > 0) {
  ------------------
  |  Branch (11249:12): [True: 501, False: 0]
  ------------------
11250|    501|        int status;
11251|    501|        do {
11252|    501|            status = write(fd, &response, sizeof(response));
11253|    501|        } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (11253:18): [True: 9, False: 492]
  |  Branch (11253:34): [True: 0, False: 9]
  ------------------
11254|    501|        if (status > 0) break;
  ------------------
  |  Branch (11254:13): [True: 492, False: 9]
  ------------------
11255|      9|        sleep(1);
11256|      9|        tries--;
11257|      9|    }
11258|       |    return NULL;
11259|    492|}
janet.c:janet_go_thread_subr:
12032|    492|static JanetEVGenericMessage janet_go_thread_subr(JanetEVGenericMessage args) {
12033|    492|    JanetBuffer *buffer = (JanetBuffer *) args.argp;
12034|    492|    const uint8_t *nextbytes = buffer->data;
12035|    492|    const uint8_t *endbytes = nextbytes + buffer->count;
12036|    492|    uint32_t flags = args.tag;
12037|    492|    args.tag = 0;
12038|    492|    args.argp = NULL;
12039|    492|    janet_init();
12040|    492|    janet_vm.sandbox_flags = (uint32_t) args.argi;
12041|    492|    JanetTryState tstate;
12042|    492|    JanetSignal signal = janet_try(&tstate);
  ------------------
  |  | 1971|    492|#define janet_try(state) (janet_try_init(state), (JanetSignal) setjmp((state)->buf))
  ------------------
12043|    492|    if (!signal) {
  ------------------
  |  Branch (12043:9): [True: 492, False: 0]
  ------------------
12044|       |
12045|       |        /* Set abstract registry */
12046|    492|        if (!(flags & 0x2)) {
  ------------------
  |  Branch (12046:13): [True: 490, False: 2]
  ------------------
12047|    490|            Janet aregv = janet_unmarshal(nextbytes, endbytes - nextbytes,
12048|    490|                                          JANET_MARSHAL_UNSAFE, NULL, &nextbytes);
  ------------------
  |  | 1901|    490|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
12049|    490|            janet_assert(janet_checktype(aregv, JANET_TABLE), "expected table for abstract registry");
  ------------------
  |  |  386|    490|#define janet_assert(c, m) do { \
  |  |  387|    980|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 490]
  |  |  |  Branch (387:11): [True: 0, False: 0]
  |  |  |  Branch (387:11): [True: 0, False: 0]
  |  |  |  Branch (387:11): [Folded, False: 490]
  |  |  ------------------
  |  |  388|    490|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 490]
  |  |  ------------------
  ------------------
12050|    490|            janet_vm.abstract_registry = janet_unwrap_table(aregv);
  ------------------
  |  |  856|    490|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
12051|    490|            janet_gcroot(janet_wrap_table(janet_vm.abstract_registry));
  ------------------
  |  |  841|    490|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|    490|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    490|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    490|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12052|    490|        }
12053|       |
12054|       |        /* Get supervisor */
12055|    492|        if (flags & JANET_THREAD_SUPERVISOR_FLAG) {
  ------------------
  |  |12029|    492|#define JANET_THREAD_SUPERVISOR_FLAG 0x100
  ------------------
  |  Branch (12055:13): [True: 0, False: 492]
  ------------------
12056|      0|            Janet sup =
12057|      0|                janet_unmarshal(nextbytes, endbytes - nextbytes,
12058|      0|                                JANET_MARSHAL_UNSAFE, NULL, &nextbytes);
  ------------------
  |  | 1901|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
12059|       |            /* Hack - use a global variable to avoid longjmp clobber */
12060|      0|            janet_vm.user = janet_unwrap_pointer(sup);
  ------------------
  |  |  862|      0|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
12061|      0|        }
12062|       |
12063|       |        /* Set cfunction registry */
12064|    492|        if (!(flags & 0x4)) {
  ------------------
  |  Branch (12064:13): [True: 492, False: 0]
  ------------------
12065|    492|            uint32_t count1;
12066|    492|            memcpy(&count1, nextbytes, sizeof(count1));
12067|    492|            size_t count = (size_t) count1;
12068|       |            /* Use division to avoid overflowing size_t */
12069|    492|            janet_assert(count <= (endbytes - nextbytes - sizeof(count1)) / sizeof(JanetCFunRegistry), "thread message invalid");
  ------------------
  |  |  386|    492|#define janet_assert(c, m) do { \
  |  |  387|    492|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 492]
  |  |  ------------------
  |  |  388|    492|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 492]
  |  |  ------------------
  ------------------
12070|    492|            janet_vm.registry_count = count;
12071|    492|            janet_vm.registry_cap = count;
12072|    492|            janet_vm.registry = janet_malloc(count * sizeof(JanetCFunRegistry));
  ------------------
  |  | 2393|    492|#define janet_malloc(X) malloc((X))
  ------------------
12073|    492|            if (janet_vm.registry == NULL) {
  ------------------
  |  Branch (12073:17): [True: 0, False: 492]
  ------------------
12074|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
12075|      0|            }
12076|    492|            janet_vm.registry_dirty = 1;
12077|    492|            nextbytes += sizeof(uint32_t);
12078|    492|            memcpy(janet_vm.registry, nextbytes, count * sizeof(JanetCFunRegistry));
12079|    492|            nextbytes += count * sizeof(JanetCFunRegistry);
12080|    492|        }
12081|       |
12082|    492|        Janet fiberv = janet_unmarshal(nextbytes, endbytes - nextbytes,
12083|    492|                                       JANET_MARSHAL_UNSAFE, NULL, &nextbytes);
  ------------------
  |  | 1901|    492|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
12084|    492|        Janet value = janet_unmarshal(nextbytes, endbytes - nextbytes,
12085|    492|                                      JANET_MARSHAL_UNSAFE, NULL, &nextbytes);
  ------------------
  |  | 1901|    492|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
12086|    492|        JanetFiber *fiber;
12087|    492|        if (!janet_checktype(fiberv, JANET_FIBER)) {
  ------------------
  |  |  801|    492|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 492]
  |  |  ------------------
  |  |  802|    492|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|    492|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|    492|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|    492|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    492|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    492|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (12087:13): [True: 210, False: 282]
  ------------------
12088|    210|            janet_assert(janet_checktype(fiberv, JANET_FUNCTION), "expected function or fiber");
  ------------------
  |  |  386|    210|#define janet_assert(c, m) do { \
  |  |  387|    420|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 210]
  |  |  |  Branch (387:11): [True: 0, False: 0]
  |  |  |  Branch (387:11): [True: 0, False: 0]
  |  |  |  Branch (387:11): [Folded, False: 210]
  |  |  ------------------
  |  |  388|    210|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 210]
  |  |  ------------------
  ------------------
12089|    210|            JanetFunction *func = janet_unwrap_function(fiberv);
  ------------------
  |  |  863|    210|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
12090|       |            /* 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
12091|       |             * 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. */
12092|    210|            janet_assert(func->def->min_arity >= 0 && func->def->min_arity <= 1, "thread function must accept 0 or 1 arguments");
  ------------------
  |  |  386|    210|#define janet_assert(c, m) do { \
  |  |  387|    420|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:11): [True: 210, False: 0]
  |  |  |  Branch (387:11): [True: 210, False: 0]
  |  |  ------------------
  |  |  388|    210|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 210]
  |  |  ------------------
  ------------------
12093|    210|            fiber = janet_fiber(func, 64, func->def->min_arity, &value);
12094|    210|            janet_assert(fiber != NULL, "bad fiber in thread setup");
  ------------------
  |  |  386|    210|#define janet_assert(c, m) do { \
  |  |  387|    210|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 210]
  |  |  ------------------
  |  |  388|    210|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 210]
  |  |  ------------------
  ------------------
12095|    210|            fiber->flags |=
12096|    210|                JANET_FIBER_MASK_ERROR |
  ------------------
  |  |  761|    210|#define JANET_FIBER_MASK_ERROR 2
  ------------------
12097|    210|                JANET_FIBER_MASK_USER0 |
  ------------------
  |  |  765|    210|#define JANET_FIBER_MASK_USER0 (16 << 0)
  ------------------
12098|    210|                JANET_FIBER_MASK_USER1 |
  ------------------
  |  |  766|    210|#define JANET_FIBER_MASK_USER1 (16 << 1)
  ------------------
12099|    210|                JANET_FIBER_MASK_USER2 |
  ------------------
  |  |  767|    210|#define JANET_FIBER_MASK_USER2 (16 << 2)
  ------------------
12100|    210|                JANET_FIBER_MASK_USER3 |
  ------------------
  |  |  768|    210|#define JANET_FIBER_MASK_USER3 (16 << 3)
  ------------------
12101|    210|                JANET_FIBER_MASK_USER4;
  ------------------
  |  |  769|    210|#define JANET_FIBER_MASK_USER4 (16 << 4)
  ------------------
12102|    282|        } else {
12103|    282|            fiber = janet_unwrap_fiber(fiberv);
  ------------------
  |  |  854|    282|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
12104|    282|        }
12105|    492|        if (flags & 0x8) {
  ------------------
  |  Branch (12105:13): [True: 0, False: 492]
  ------------------
12106|      0|            if (NULL == fiber->env) fiber->env = janet_table(0);
  ------------------
  |  Branch (12106:17): [True: 0, False: 0]
  ------------------
12107|      0|            janet_table_put(fiber->env, janet_ckeywordv("task-id"), value);
  ------------------
  |  | 1833|      0|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      0|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12108|      0|        }
12109|    492|        fiber->supervisor_channel = janet_vm.user;
12110|    492|        janet_schedule(fiber, value);
12111|    492|        janet_loop();
12112|    492|        args.tag = JANET_EV_TCTAG_NIL;
  ------------------
  |  | 1569|    492|#define JANET_EV_TCTAG_NIL 0          /* resume with nil */
  ------------------
12113|    492|        janet_restore(&tstate);
12114|    492|    } else {
12115|      0|        janet_restore(&tstate);
12116|      0|        void *supervisor = janet_vm.user;
12117|      0|        if (NULL != supervisor) {
  ------------------
  |  Branch (12117:13): [True: 0, False: 0]
  ------------------
12118|       |            /* Got a supervisor, write error there */
12119|      0|            Janet pair[] = {
12120|      0|                janet_ckeywordv("error"),
  ------------------
  |  | 1833|      0|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      0|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12121|      0|                tstate.payload
12122|      0|            };
12123|      0|            janet_channel_push((JanetChannel *)supervisor,
12124|      0|                               janet_wrap_tuple(janet_tuple_n(pair, 2)), 2);
  ------------------
  |  |  838|      0|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12125|      0|        } else if (flags & 0x1) {
  ------------------
  |  Branch (12125:20): [True: 0, False: 0]
  ------------------
12126|       |            /* No wait, just print to stderr */
12127|      0|            janet_eprintf("thread start failure: %v\n", tstate.payload);
  ------------------
  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
12128|      0|        } else {
12129|       |            /* Make ev/thread call from parent thread error */
12130|      0|            if (janet_checktype(tstate.payload, JANET_STRING)) {
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 0]
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
12131|      0|                args.tag = JANET_EV_TCTAG_ERR_STRINGF;
  ------------------
  |  | 1575|      0|#define JANET_EV_TCTAG_ERR_STRINGF 6  /* cancel with janet_cstringv((const char *) argp), then call free on argp. */
  ------------------
12132|      0|                JanetString msg = janet_unwrap_string(tstate.payload);
  ------------------
  |  |  858|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
12133|      0|                args.argp = janet_malloc(janet_string_length(msg) + 1);
  ------------------
  |  | 2393|      0|#define janet_malloc(X) malloc((X))
  ------------------
12134|      0|                memcpy(args.argp, msg, janet_string_length(msg) + 1);
  ------------------
  |  | 1803|      0|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|      0|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
12135|      0|            } else {
12136|      0|                args.tag = JANET_EV_TCTAG_ERR_STRING;
  ------------------
  |  | 1574|      0|#define JANET_EV_TCTAG_ERR_STRING 5   /* cancel with janet_cstringv((const char *) argp) */
  ------------------
12137|      0|                args.argp = "failed to start thread";
12138|      0|            }
12139|      0|        }
12140|      0|    }
12141|    492|    janet_buffer_deinit(buffer);
12142|    492|    janet_free(buffer);
  ------------------
  |  | 2402|    492|#define janet_free(X) free((X))
  ------------------
12143|    492|    janet_deinit();
12144|    492|    return args;
12145|    492|}
janet.c:mutexgc:
12389|     10|static int mutexgc(void *p, size_t size) {
12390|     10|    (void) size;
12391|     10|    janet_os_mutex_deinit(p);
12392|     10|    return 0;
12393|     10|}
janet.c:rwlockgc:
12431|     22|static int rwlockgc(void *p, size_t size) {
12432|     22|    (void) size;
12433|     22|    janet_os_rwlock_deinit(p);
12434|     22|    return 0;
12435|     22|}
janet.c:build_struct_type:
12996|    124|static JanetFFIStruct *build_struct_type(int32_t argc, const Janet *argv) {
12997|       |    /* Use :pack to indicate a single packed struct member and :pack-all
12998|       |     * to pack the remaining members */
12999|    124|    int32_t member_count = argc;
13000|    124|    int all_packed = 0;
13001|  1.58k|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (13001:25): [True: 1.46k, False: 124]
  ------------------
13002|  1.46k|        if (janet_keyeq(argv[i], "pack")) {
  ------------------
  |  Branch (13002:13): [True: 49, False: 1.41k]
  ------------------
13003|     49|            member_count--;
13004|  1.41k|        } else if (janet_keyeq(argv[i], "pack-all")) {
  ------------------
  |  Branch (13004:20): [True: 0, False: 1.41k]
  ------------------
13005|      0|            member_count--;
13006|      0|            all_packed = 1;
13007|      0|        }
13008|  1.46k|    }
13009|       |
13010|    124|    JanetFFIStruct *st = janet_abstract(&janet_struct_type,
13011|    124|                                        sizeof(JanetFFIStruct) + argc * sizeof(JanetFFIStructMember));
13012|    124|    st->field_count = 0;
13013|    124|    st->size = 0;
13014|    124|    st->align = 1;
13015|    124|    if (argc == 0) {
  ------------------
  |  Branch (13015:9): [True: 1, False: 123]
  ------------------
13016|      1|        janet_panic("invalid empty struct");
13017|      1|    }
13018|    123|    uint32_t is_aligned = 1;
13019|    123|    int32_t i = 0;
13020|    259|    for (int32_t j = 0; j < argc; j++) {
  ------------------
  |  Branch (13020:25): [True: 148, False: 111]
  ------------------
13021|    148|        int pack_one = 0;
13022|    148|        if (janet_keyeq(argv[j], "pack") || janet_keyeq(argv[j], "pack-all")) {
  ------------------
  |  Branch (13022:13): [True: 19, False: 129]
  |  Branch (13022:45): [True: 0, False: 129]
  ------------------
13023|     19|            pack_one = 1;
13024|     19|            j++;
13025|     19|            if (j == argc) break;
  ------------------
  |  Branch (13025:17): [True: 12, False: 7]
  ------------------
13026|     19|        }
13027|    136|        st->fields[i].type = decode_ffi_type(argv[j]);
13028|    136|        size_t el_size = type_size(st->fields[i].type);
13029|    136|        size_t el_align = type_align(st->fields[i].type);
13030|    136|        if (el_align <= 0) janet_panicf("bad field type %V", argv[j]);
  ------------------
  |  Branch (13030:13): [True: 0, False: 136]
  ------------------
13031|    136|        if (all_packed || pack_one) {
  ------------------
  |  Branch (13031:13): [True: 110, False: 26]
  |  Branch (13031:27): [True: 0, False: 26]
  ------------------
13032|      0|            if (st->size % el_align != 0) is_aligned = 0;
  ------------------
  |  Branch (13032:17): [True: 0, False: 0]
  ------------------
13033|      0|            st->fields[i].offset = st->size;
13034|      0|            st->size += (uint32_t) el_size;
13035|    136|        } else {
13036|    136|            if (el_align > st->align) st->align = (uint32_t) el_align;
  ------------------
  |  Branch (13036:17): [True: 16, False: 120]
  ------------------
13037|    136|            st->fields[i].offset = (uint32_t)(((st->size + el_align - 1) / el_align) * el_align);
13038|    136|            st->size = (uint32_t)(el_size + st->fields[i].offset);
13039|    136|        }
13040|    136|        i++;
13041|    136|    }
13042|    123|    st->is_aligned = is_aligned;
13043|    123|    st->size += (st->align - 1);
13044|    123|    st->size /= st->align;
13045|    123|    st->size *= st->align;
13046|    123|    st->field_count = member_count;
13047|    123|    return st;
13048|    123|}
janet.c:type_size:
12901|     26|static size_t type_size(JanetFFIType t) {
12902|     26|    size_t count = t.array_count < 0 ? 1 : (size_t) t.array_count;
  ------------------
  |  Branch (12902:20): [True: 23, False: 3]
  ------------------
12903|     26|    if (t.prim == JANET_FFI_TYPE_STRUCT) {
  ------------------
  |  Branch (12903:9): [True: 1, False: 25]
  ------------------
12904|      1|        return t.st->size * count;
12905|     25|    } else {
12906|     25|        return janet_ffi_type_info[t.prim].size * count;
12907|     25|    }
12908|     26|}
janet.c:decode_ffi_type:
13050|    144|static JanetFFIType decode_ffi_type(Janet x) {
13051|    144|    if (janet_checktype(x, JANET_KEYWORD)) {
  ------------------
  |  |  801|    144|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 112, False: 32]
  |  |  |  Branch (801:6): [Folded, False: 144]
  |  |  ------------------
  |  |  802|    144|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|    144|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|    144|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|    144|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    144|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    144|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13052|    112|        return prim_type(decode_ffi_prim(janet_unwrap_keyword(x)));
  ------------------
  |  |  860|    112|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
13053|    112|    }
13054|     32|    JanetFFIType ret;
13055|     32|    ret.array_count = -1;
13056|     32|    ret.prim = JANET_FFI_TYPE_STRUCT;
13057|     32|    if (janet_checkabstract(x, &janet_struct_type)) {
  ------------------
  |  Branch (13057:9): [True: 1, False: 31]
  ------------------
13058|      1|        ret.st = janet_unwrap_abstract(x);
  ------------------
  |  |  861|      1|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
13059|      1|        return ret;
13060|      1|    }
13061|     31|    int32_t len;
13062|     31|    const Janet *els;
13063|     31|    if (janet_indexed_view(x, &els, &len)) {
  ------------------
  |  Branch (13063:9): [True: 14, False: 17]
  ------------------
13064|     14|        if (janet_checktype(x, JANET_ARRAY)) {
  ------------------
  |  |  801|     14|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 9, False: 5]
  |  |  |  Branch (801:6): [Folded, False: 14]
  |  |  ------------------
  |  |  802|     14|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|     14|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|     14|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|     14|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     14|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     14|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13065|      9|            if (len != 2 && len != 1) janet_panicf("array type must be of form @[type count], got %v", x);
  ------------------
  |  Branch (13065:17): [True: 4, False: 5]
  |  Branch (13065:29): [True: 1, False: 3]
  ------------------
13066|      8|            ret = decode_ffi_type(els[0]);
13067|      8|            int32_t array_count = len == 1 ? 0 : janet_getnat(els, 1);
  ------------------
  |  Branch (13067:35): [True: 1, False: 7]
  ------------------
13068|      8|            ret.array_count = array_count;
13069|      8|        } else {
13070|      5|            ret.st = build_struct_type(len, els);
13071|      5|        }
13072|     13|        return ret;
13073|     17|    } else {
13074|     17|        janet_panicf("bad native type %v", x);
13075|     17|    }
13076|     31|}
janet.c:prim_type:
12893|     28|static JanetFFIType prim_type(JanetFFIPrimType pt) {
12894|     28|    JanetFFIType t;
12895|     28|    t.prim = pt;
12896|       |    t.st = NULL;
12897|     28|    t.array_count = -1;
12898|     28|    return t;
12899|     28|}
janet.c:decode_ffi_prim:
12933|    112|static JanetFFIPrimType decode_ffi_prim(const uint8_t *name) {
12934|    112|    if (!janet_cstrcmp(name, "void")) return JANET_FFI_TYPE_VOID;
  ------------------
  |  Branch (12934:9): [True: 0, False: 112]
  ------------------
12935|    112|    if (!janet_cstrcmp(name, "bool")) return JANET_FFI_TYPE_BOOL;
  ------------------
  |  Branch (12935:9): [True: 0, False: 112]
  ------------------
12936|    112|    if (!janet_cstrcmp(name, "ptr")) return JANET_FFI_TYPE_PTR;
  ------------------
  |  Branch (12936:9): [True: 11, False: 101]
  ------------------
12937|    101|    if (!janet_cstrcmp(name, "pointer")) return JANET_FFI_TYPE_PTR;
  ------------------
  |  Branch (12937:9): [True: 0, False: 101]
  ------------------
12938|    101|    if (!janet_cstrcmp(name, "string")) return JANET_FFI_TYPE_STRING;
  ------------------
  |  Branch (12938:9): [True: 1, False: 100]
  ------------------
12939|    100|    if (!janet_cstrcmp(name, "float")) return JANET_FFI_TYPE_FLOAT;
  ------------------
  |  Branch (12939:9): [True: 0, False: 100]
  ------------------
12940|    100|    if (!janet_cstrcmp(name, "double")) return JANET_FFI_TYPE_DOUBLE;
  ------------------
  |  Branch (12940:9): [True: 0, False: 100]
  ------------------
12941|    100|    if (!janet_cstrcmp(name, "int8")) return JANET_FFI_TYPE_INT8;
  ------------------
  |  Branch (12941:9): [True: 4, False: 96]
  ------------------
12942|     96|    if (!janet_cstrcmp(name, "uint8")) return JANET_FFI_TYPE_UINT8;
  ------------------
  |  Branch (12942:9): [True: 1, False: 95]
  ------------------
12943|     95|    if (!janet_cstrcmp(name, "int16")) return JANET_FFI_TYPE_INT16;
  ------------------
  |  Branch (12943:9): [True: 1, False: 94]
  ------------------
12944|     94|    if (!janet_cstrcmp(name, "uint16")) return JANET_FFI_TYPE_UINT16;
  ------------------
  |  Branch (12944:9): [True: 0, False: 94]
  ------------------
12945|     94|    if (!janet_cstrcmp(name, "int32")) return JANET_FFI_TYPE_INT32;
  ------------------
  |  Branch (12945:9): [True: 0, False: 94]
  ------------------
12946|     94|    if (!janet_cstrcmp(name, "uint32")) return JANET_FFI_TYPE_UINT32;
  ------------------
  |  Branch (12946:9): [True: 0, False: 94]
  ------------------
12947|     94|    if (!janet_cstrcmp(name, "int64")) return JANET_FFI_TYPE_INT64;
  ------------------
  |  Branch (12947:9): [True: 0, False: 94]
  ------------------
12948|     94|    if (!janet_cstrcmp(name, "uint64")) return JANET_FFI_TYPE_UINT64;
  ------------------
  |  Branch (12948:9): [True: 0, False: 94]
  ------------------
12949|     94|#ifdef JANET_64
12950|     94|    if (!janet_cstrcmp(name, "size")) return JANET_FFI_TYPE_UINT64;
  ------------------
  |  Branch (12950:9): [True: 0, False: 94]
  ------------------
12951|     94|    if (!janet_cstrcmp(name, "ssize")) return JANET_FFI_TYPE_INT64;
  ------------------
  |  Branch (12951:9): [True: 0, False: 94]
  ------------------
12952|       |#else
12953|       |    if (!janet_cstrcmp(name, "size")) return JANET_FFI_TYPE_UINT32;
12954|       |    if (!janet_cstrcmp(name, "ssize")) return JANET_FFI_TYPE_INT32;
12955|       |#endif
12956|       |    /* aliases */
12957|     94|    if (!janet_cstrcmp(name, "r32")) return JANET_FFI_TYPE_FLOAT;
  ------------------
  |  Branch (12957:9): [True: 0, False: 94]
  ------------------
12958|     94|    if (!janet_cstrcmp(name, "r64")) return JANET_FFI_TYPE_DOUBLE;
  ------------------
  |  Branch (12958:9): [True: 0, False: 94]
  ------------------
12959|     94|    if (!janet_cstrcmp(name, "s8")) return JANET_FFI_TYPE_INT8;
  ------------------
  |  Branch (12959:9): [True: 0, False: 94]
  ------------------
12960|     94|    if (!janet_cstrcmp(name, "u8")) return JANET_FFI_TYPE_UINT8;
  ------------------
  |  Branch (12960:9): [True: 0, False: 94]
  ------------------
12961|     94|    if (!janet_cstrcmp(name, "s16")) return JANET_FFI_TYPE_INT16;
  ------------------
  |  Branch (12961:9): [True: 0, False: 94]
  ------------------
12962|     94|    if (!janet_cstrcmp(name, "u16")) return JANET_FFI_TYPE_UINT16;
  ------------------
  |  Branch (12962:9): [True: 0, False: 94]
  ------------------
12963|     94|    if (!janet_cstrcmp(name, "s32")) return JANET_FFI_TYPE_INT32;
  ------------------
  |  Branch (12963:9): [True: 0, False: 94]
  ------------------
12964|     94|    if (!janet_cstrcmp(name, "u32")) return JANET_FFI_TYPE_UINT32;
  ------------------
  |  Branch (12964:9): [True: 0, False: 94]
  ------------------
12965|     94|    if (!janet_cstrcmp(name, "s64")) return JANET_FFI_TYPE_INT64;
  ------------------
  |  Branch (12965:9): [True: 0, False: 94]
  ------------------
12966|     94|    if (!janet_cstrcmp(name, "u64")) return JANET_FFI_TYPE_UINT64;
  ------------------
  |  Branch (12966:9): [True: 0, False: 94]
  ------------------
12967|     94|    if (!janet_cstrcmp(name, "char")) return JANET_FFI_TYPE_INT8;
  ------------------
  |  Branch (12967:9): [True: 0, False: 94]
  ------------------
12968|     94|    if (!janet_cstrcmp(name, "short")) return JANET_FFI_TYPE_INT16;
  ------------------
  |  Branch (12968:9): [True: 0, False: 94]
  ------------------
12969|     94|    if (!janet_cstrcmp(name, "int")) return JANET_FFI_TYPE_INT32;
  ------------------
  |  Branch (12969:9): [True: 5, False: 89]
  ------------------
12970|     89|    if (!janet_cstrcmp(name, "long")) return JANET_FFI_TYPE_INT64;
  ------------------
  |  Branch (12970:9): [True: 0, False: 89]
  ------------------
12971|     89|    if (!janet_cstrcmp(name, "byte")) return JANET_FFI_TYPE_UINT8;
  ------------------
  |  Branch (12971:9): [True: 0, False: 89]
  ------------------
12972|     89|    if (!janet_cstrcmp(name, "uchar")) return JANET_FFI_TYPE_UINT8;
  ------------------
  |  Branch (12972:9): [True: 0, False: 89]
  ------------------
12973|     89|    if (!janet_cstrcmp(name, "ushort")) return JANET_FFI_TYPE_UINT16;
  ------------------
  |  Branch (12973:9): [True: 0, False: 89]
  ------------------
12974|     89|    if (!janet_cstrcmp(name, "uint")) return JANET_FFI_TYPE_UINT32;
  ------------------
  |  Branch (12974:9): [True: 5, False: 84]
  ------------------
12975|     84|    if (!janet_cstrcmp(name, "ulong")) return JANET_FFI_TYPE_UINT64;
  ------------------
  |  Branch (12975:9): [True: 0, False: 84]
  ------------------
12976|     84|    janet_panicf("unknown machine type %s", name);
12977|     84|}
janet.c:type_align:
12910|     26|static size_t type_align(JanetFFIType t) {
12911|     26|    if (t.prim == JANET_FFI_TYPE_STRUCT) {
  ------------------
  |  Branch (12911:9): [True: 1, False: 25]
  ------------------
12912|      1|        return t.st->align;
12913|     25|    } else {
12914|     25|        return janet_ffi_type_info[t.prim].align;
12915|     25|    }
12916|     26|}
janet.c:decode_ffi_cc:
12918|      1|static JanetFFICallingConvention decode_ffi_cc(const uint8_t *name) {
12919|      1|    if (!janet_cstrcmp(name, "none")) return JANET_FFI_CC_NONE;
  ------------------
  |  Branch (12919:9): [True: 0, False: 1]
  ------------------
12920|       |#ifdef JANET_FFI_WIN64_ENABLED
12921|       |    if (!janet_cstrcmp(name, "win64")) return JANET_FFI_CC_WIN_64;
12922|       |#endif
12923|      1|#ifdef JANET_FFI_SYSV64_ENABLED
12924|      1|    if (!janet_cstrcmp(name, "sysv64")) return JANET_FFI_CC_SYSV_64;
  ------------------
  |  Branch (12924:9): [True: 0, False: 1]
  ------------------
12925|      1|#endif
12926|       |#ifdef JANET_FFI_AAPCS64_ENABLED
12927|       |    if (!janet_cstrcmp(name, "aapcs64")) return JANET_FFI_CC_AAPCS64;
12928|       |#endif
12929|      1|    if (!janet_cstrcmp(name, "default")) return JANET_FFI_CC_DEFAULT;
  ------------------
  |  |12783|      0|#define JANET_FFI_CC_DEFAULT JANET_FFI_CC_SYSV_64
  ------------------
  |  Branch (12929:9): [True: 0, False: 1]
  ------------------
12930|      1|    janet_panicf("unknown calling convention %s", name);
12931|      1|}
janet.c:janet_ffi_get_callable_pointer:
13125|      2|static void *janet_ffi_get_callable_pointer(const Janet *argv, int32_t n) {
13126|      2|    switch (janet_type(argv[n])) {
  ------------------
  |  |  790|      2|    (isnan((x).number) \
  |  |  791|      2|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|      2|        : JANET_NUMBER)
  ------------------
  |  Branch (13126:13): [True: 1, False: 1]
  ------------------
13127|      2|        default:
  ------------------
  |  Branch (13127:9): [True: 2, False: 0]
  ------------------
13128|      2|            break;
13129|      2|        case JANET_POINTER:
  ------------------
  |  Branch (13129:9): [True: 0, False: 2]
  ------------------
13130|      0|            return janet_unwrap_pointer(argv[n]);
  ------------------
  |  |  862|      0|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
13131|      0|        case JANET_ABSTRACT:
  ------------------
  |  Branch (13131:9): [True: 0, False: 2]
  ------------------
13132|      0|            if (!janet_checkabstract(argv[n], &janet_type_ffijit)) break;
  ------------------
  |  Branch (13132:17): [True: 0, False: 0]
  ------------------
13133|      0|            return ((JanetFFIJittedFn *)janet_unwrap_abstract(argv[n]))->function_pointer;
  ------------------
  |  |  861|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
13134|      2|    }
13135|      2|    janet_panicf("bad slot #%d, expected ffi callable pointer type, got %v", n, argv[n]);
13136|      2|}
janet.c:fiber_reset:
14563|   388k|static void fiber_reset(JanetFiber *fiber) {
14564|   388k|    fiber->maxstack = JANET_STACK_MAX;
  ------------------
  |  |  302|   388k|#define JANET_STACK_MAX 0x7fffffff
  ------------------
14565|   388k|    fiber->frame = 0;
14566|   388k|    fiber->stackstart = JANET_FRAME_SIZE;
  ------------------
  |  | 1017|   388k|#define JANET_FRAME_SIZE 4
  ------------------
14567|   388k|    fiber->stacktop = JANET_FRAME_SIZE;
  ------------------
  |  | 1017|   388k|#define JANET_FRAME_SIZE 4
  ------------------
14568|   388k|    fiber->child = NULL;
14569|   388k|    fiber->flags = JANET_FIBER_MASK_YIELD | JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  763|   388k|#define JANET_FIBER_MASK_YIELD 8
  ------------------
                  fiber->flags = JANET_FIBER_MASK_YIELD | JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  784|   388k|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
                  fiber->flags = JANET_FIBER_MASK_YIELD | JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  785|   388k|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  ------------------
14570|   388k|    fiber->env = NULL;
14571|   388k|    fiber->last_value = janet_wrap_nil();
  ------------------
  |  |  826|   388k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|   388k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   388k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   388k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14572|   388k|#ifdef JANET_EV
14573|   388k|    fiber->sched_id = 0;
14574|   388k|    fiber->ev_callback = NULL;
14575|   388k|    fiber->ev_state = NULL;
14576|   388k|    fiber->ev_stream = NULL;
14577|   388k|    fiber->supervisor_channel = NULL;
14578|   388k|#endif
14579|   388k|    janet_fiber_set_status(fiber, JANET_STATUS_NEW);
  ------------------
  |  |  796|   388k|#define janet_fiber_set_status(f, s) do {\
  |  |  797|   388k|    (f)->flags &= ~JANET_FIBER_STATUS_MASK;\
  |  |  ------------------
  |  |  |  |  779|   388k|#define JANET_FIBER_STATUS_MASK 0x3F0000
  |  |  ------------------
  |  |  798|   388k|    (f)->flags |= (s) << JANET_FIBER_STATUS_OFFSET;\
  |  |  ------------------
  |  |  |  |  781|   388k|#define JANET_FIBER_STATUS_OFFSET 16
  |  |  ------------------
  |  |  799|   388k|} while (0)
  |  |  ------------------
  |  |  |  Branch (799:10): [Folded, False: 388k]
  |  |  ------------------
  ------------------
14580|   388k|}
janet.c:fiber_alloc:
14582|   388k|static JanetFiber *fiber_alloc(int32_t capacity) {
14583|   388k|    Janet *data;
14584|   388k|    JanetFiber *fiber = janet_gcalloc(JANET_MEMORY_FIBER, sizeof(JanetFiber));
14585|   388k|    if (capacity < 32) {
  ------------------
  |  Branch (14585:9): [True: 0, False: 388k]
  ------------------
14586|      0|        capacity = 32;
14587|      0|    }
14588|   388k|    fiber->capacity = capacity;
14589|   388k|    data = janet_malloc(sizeof(Janet) * (size_t) capacity);
  ------------------
  |  | 2393|   388k|#define janet_malloc(X) malloc((X))
  ------------------
14590|   388k|    if (NULL == data) {
  ------------------
  |  Branch (14590:9): [True: 0, False: 388k]
  ------------------
14591|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
14592|      0|    }
14593|   388k|    janet_vm.next_collection += sizeof(Janet) * capacity;
14594|   388k|    fiber->data = data;
14595|   388k|    return fiber;
14596|   388k|}
janet.c:janet_fiber_grow:
14661|  7.72k|static void janet_fiber_grow(JanetFiber *fiber, int32_t needed) {
14662|  7.72k|    int32_t cap = needed > (INT32_MAX / 2) ? INT32_MAX : 2 * needed;
  ------------------
  |  Branch (14662:19): [True: 0, False: 7.72k]
  ------------------
14663|  7.72k|    janet_fiber_setcapacity(fiber, cap);
14664|  7.72k|}
janet.c:make_struct_n:
14712|     38|static Janet make_struct_n(const Janet *args, int32_t n) {
14713|     38|    int32_t i = 0;
14714|     38|    JanetKV *st = janet_struct_begin(n & (~1));
14715|  2.35k|    for (; i < n; i += 2) {
  ------------------
  |  Branch (14715:12): [True: 2.31k, False: 38]
  ------------------
14716|  2.31k|        janet_struct_put(st, args[i], args[i + 1]);
14717|  2.31k|    }
14718|     38|    return janet_wrap_struct(janet_struct_end(st));
  ------------------
  |  |  837|     38|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  823|     38|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     38|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     38|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
14719|     38|}
janet.c:janet_env_detach:
14784|   149M|static void janet_env_detach(JanetFuncEnv *env) {
14785|       |    /* Check for closure environment */
14786|   149M|    if (env) {
  ------------------
  |  Branch (14786:9): [True: 11.1M, False: 137M]
  ------------------
14787|  11.1M|        janet_env_valid(env);
14788|  11.1M|        int32_t len = env->length;
14789|  11.1M|        size_t s = sizeof(Janet) * (size_t) len;
14790|  11.1M|        Janet *vmem = janet_malloc(s);
  ------------------
  |  | 2393|  11.1M|#define janet_malloc(X) malloc((X))
  ------------------
14791|  11.1M|        janet_vm.next_collection += (uint32_t) s;
14792|  11.1M|        if (NULL == vmem) {
  ------------------
  |  Branch (14792:13): [True: 0, False: 11.1M]
  ------------------
14793|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
14794|      0|        }
14795|  11.1M|        Janet *values = env->as.fiber->data + env->offset;
14796|  11.1M|        safe_memcpy(vmem, values, s);
14797|  11.1M|        uint32_t *bitset = janet_stack_frame(values)->func->def->closure_bitset;
  ------------------
  |  |  801|  11.1M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1017|  11.1M|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
14798|  11.1M|        if (bitset) {
  ------------------
  |  Branch (14798:13): [True: 11.1M, False: 0]
  ------------------
14799|       |            /* Clear unneeded references in closure environment */
14800|  22.5M|            for (int32_t i = 0; i < len; i += 32) {
  ------------------
  |  Branch (14800:33): [True: 11.3M, False: 11.1M]
  ------------------
14801|  11.3M|                uint32_t mask = ~(bitset[i >> 5]);
14802|  11.3M|                int32_t maxj = i + 32 > len ? len : i + 32;
  ------------------
  |  Branch (14802:32): [True: 11.1M, False: 204k]
  ------------------
14803|   352M|                for (int32_t j = i; j < maxj; j++) {
  ------------------
  |  Branch (14803:37): [True: 341M, False: 11.3M]
  ------------------
14804|   341M|                    if (mask & 1) vmem[j] = janet_wrap_nil();
  ------------------
  |  |  826|   275M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|   275M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   275M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   275M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (14804:25): [True: 275M, False: 65.7M]
  ------------------
14805|   341M|                    mask >>= 1;
14806|   341M|                }
14807|  11.3M|            }
14808|  11.1M|        }
14809|  11.1M|        env->offset = 0;
14810|  11.1M|        env->as.values = vmem;
14811|  11.1M|    }
14812|   149M|}
janet.c:janet_mark_string:
16294|  35.6M|static void janet_mark_string(const uint8_t *str) {
16295|  35.6M|    janet_gc_mark(janet_string_head(str));
  ------------------
  |  |  631|  35.6M|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|  35.6M|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|  35.6M|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16296|  35.6M|}
janet.c:janet_mark_buffer:
16298|  22.5k|static void janet_mark_buffer(JanetBuffer *buffer) {
16299|  22.5k|    janet_gc_mark(buffer);
  ------------------
  |  |  631|  22.5k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|  22.5k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|  22.5k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16300|  22.5k|}
janet.c:janet_mark_abstract:
16302|  18.4k|static void janet_mark_abstract(void *adata) {
16303|  18.4k|#ifdef JANET_EV
16304|       |    /* Check if abstract type is a threaded abstract type. If it is, marking means
16305|       |     * updating the threaded_abstract table. */
16306|  18.4k|    if ((janet_abstract_head(adata)->gc.flags & JANET_MEM_TYPEBITS) == JANET_MEMORY_THREADED_ABSTRACT) {
  ------------------
  |  | 1887|  18.4k|#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) {
  ------------------
  |  |  624|  18.4k|#define JANET_MEM_TYPEBITS 0xFF
  ------------------
  |  Branch (16306:9): [True: 0, False: 18.4k]
  ------------------
16307|      0|        janet_table_put(&janet_vm.threaded_abstracts, janet_wrap_abstract(adata), janet_wrap_true());
  ------------------
  |  |  846|      0|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      janet_table_put(&janet_vm.threaded_abstracts, janet_wrap_abstract(adata), janet_wrap_true());
  ------------------
  |  |  827|      0|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
16308|      0|        return;
16309|      0|    }
16310|  18.4k|#endif
16311|  18.4k|    if (janet_gc_reachable(janet_abstract_head(adata)))
  ------------------
  |  |  632|  18.4k|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|  18.4k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|  18.4k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (632:31): [True: 13.5k, False: 4.91k]
  |  |  ------------------
  ------------------
16312|  13.5k|        return;
16313|  4.91k|    janet_gc_mark(janet_abstract_head(adata));
  ------------------
  |  |  631|  4.91k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|  4.91k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|  4.91k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16314|  4.91k|    if (janet_abstract_head(adata)->type->gcmark) {
  ------------------
  |  | 1887|  4.91k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
  |  Branch (16314:9): [True: 1.24k, False: 3.67k]
  ------------------
16315|  1.24k|        janet_abstract_head(adata)->type->gcmark(adata, janet_abstract_size(adata));
  ------------------
  |  | 1887|  1.24k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
                      janet_abstract_head(adata)->type->gcmark(adata, janet_abstract_size(adata));
  ------------------
  |  | 1890|  1.24k|#define janet_abstract_size(u) (janet_abstract_head(u)->size)
  |  |  ------------------
  |  |  |  | 1887|  1.24k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
16316|  1.24k|    }
16317|  4.91k|}
janet.c:janet_mark_array:
16358|  11.1k|static void janet_mark_array(JanetArray *array) {
16359|  11.1k|    if (janet_gc_reachable(array))
  ------------------
  |  |  632|  11.1k|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|  11.1k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|  11.1k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (632:31): [True: 7.37k, False: 3.76k]
  |  |  ------------------
  ------------------
16360|  7.37k|        return;
16361|  3.76k|    janet_gc_mark(array);
  ------------------
  |  |  631|  3.76k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|  3.76k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|  3.76k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16362|  3.76k|    if (janet_gc_type((JanetGCObject *) array) == JANET_MEMORY_ARRAY) {
  ------------------
  |  |  629|  3.76k|#define janet_gc_type(m) (janet_gc_header(m)->flags & 0xFF)
  |  |  ------------------
  |  |  |  |  622|  3.76k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
  |  Branch (16362:9): [True: 3.75k, False: 10]
  ------------------
16363|  3.75k|        janet_mark_many(array->data, array->count);
16364|  3.75k|    }
16365|  3.76k|}
janet.c:janet_mark_many:
16320|  1.88M|static void janet_mark_many(const Janet *values, int32_t n) {
16321|  1.88M|    if (values == NULL)
  ------------------
  |  Branch (16321:9): [True: 335k, False: 1.55M]
  ------------------
16322|   335k|        return;
16323|  1.55M|    const Janet *end = values + n;
16324|   180M|    while (values < end) {
  ------------------
  |  Branch (16324:12): [True: 178M, False: 1.55M]
  ------------------
16325|   178M|        janet_mark(*values);
16326|   178M|        values += 1;
16327|   178M|    }
16328|  1.55M|}
janet.c:janet_mark_table:
16367|   929k|static void janet_mark_table(JanetTable *table) {
16368|   929k|recur: /* Manual tail recursion */
16369|   929k|    if (janet_gc_reachable(table))
  ------------------
  |  |  632|   929k|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|   929k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|   929k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (632:31): [True: 39.3k, False: 889k]
  |  |  ------------------
  ------------------
16370|  39.3k|        return;
16371|   889k|    janet_gc_mark(table);
  ------------------
  |  |  631|   889k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|   889k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|   889k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16372|   889k|    enum JanetMemoryType memtype = janet_gc_type(table);
  ------------------
  |  |  629|   889k|#define janet_gc_type(m) (janet_gc_header(m)->flags & 0xFF)
  |  |  ------------------
  |  |  |  |  622|   889k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
16373|   889k|    if (memtype == JANET_MEMORY_TABLE_WEAKK) {
  ------------------
  |  Branch (16373:9): [True: 0, False: 889k]
  ------------------
16374|      0|        janet_mark_values(table->data, table->capacity);
16375|   889k|    } else if (memtype == JANET_MEMORY_TABLE_WEAKV) {
  ------------------
  |  Branch (16375:16): [True: 0, False: 889k]
  ------------------
16376|      0|        janet_mark_keys(table->data, table->capacity);
16377|   889k|    } else if (memtype == JANET_MEMORY_TABLE) {
  ------------------
  |  Branch (16377:16): [True: 889k, False: 3]
  ------------------
16378|   889k|        janet_mark_kvs(table->data, table->capacity);
16379|   889k|    }
16380|       |    /* do nothing for JANET_MEMORY_TABLE_WEAKKV */
16381|   889k|    if (table->proto) {
  ------------------
  |  Branch (16381:9): [True: 109, False: 889k]
  ------------------
16382|    109|        table = table->proto;
16383|    109|        goto recur;
16384|    109|    }
16385|   889k|}
janet.c:janet_mark_kvs:
16349|   898k|static void janet_mark_kvs(const JanetKV *kvs, int32_t n) {
16350|   898k|    const JanetKV *end = kvs + n;
16351|  15.7M|    while (kvs < end) {
  ------------------
  |  Branch (16351:12): [True: 14.8M, False: 898k]
  ------------------
16352|  14.8M|        janet_mark(kvs->key);
16353|  14.8M|        janet_mark(kvs->value);
16354|  14.8M|        kvs++;
16355|  14.8M|    }
16356|   898k|}
janet.c:janet_mark_struct:
16387|  9.76k|static void janet_mark_struct(const JanetKV *st) {
16388|  9.76k|recur:
16389|  9.76k|    if (janet_gc_reachable(janet_struct_head(st)))
  ------------------
  |  |  632|  9.76k|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|  9.76k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|  9.76k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (632:31): [True: 1.21k, False: 8.54k]
  |  |  ------------------
  ------------------
16390|  1.21k|        return;
16391|  8.54k|    janet_gc_mark(janet_struct_head(st));
  ------------------
  |  |  631|  8.54k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|  8.54k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|  8.54k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16392|  8.54k|    janet_mark_kvs(st, janet_struct_capacity(st));
  ------------------
  |  | 1839|  8.54k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1836|  8.54k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
16393|  8.54k|    st = janet_struct_proto(st);
  ------------------
  |  | 1841|  8.54k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1836|  8.54k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
16394|  8.54k|    if (st) goto recur;
  ------------------
  |  Branch (16394:9): [True: 0, False: 8.54k]
  ------------------
16395|  8.54k|}
janet.c:janet_mark_tuple:
16397|  1.00M|static void janet_mark_tuple(const Janet *tuple) {
16398|  1.00M|    if (janet_gc_reachable(janet_tuple_head(tuple)))
  ------------------
  |  |  632|  1.00M|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|  1.00M|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|  1.00M|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (632:31): [True: 12.2k, False: 996k]
  |  |  ------------------
  ------------------
16399|  12.2k|        return;
16400|   996k|    janet_gc_mark(janet_tuple_head(tuple));
  ------------------
  |  |  631|   996k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|   996k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|   996k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16401|       |    janet_mark_many(tuple, janet_tuple_length(tuple));
  ------------------
  |  | 1792|   996k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|   996k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
16402|   996k|}
janet.c:janet_mark_function:
16443|  1.75M|static void janet_mark_function(JanetFunction *func) {
16444|  1.75M|    int32_t i;
16445|  1.75M|    int32_t numenvs;
16446|  1.75M|    if (janet_gc_reachable(func))
  ------------------
  |  |  632|  1.75M|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|  1.75M|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|  1.75M|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (632:31): [True: 1.28M, False: 470k]
  |  |  ------------------
  ------------------
16447|  1.28M|        return;
16448|   470k|    janet_gc_mark(func);
  ------------------
  |  |  631|   470k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|   470k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|   470k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16449|   470k|    if (NULL != func->def) {
  ------------------
  |  Branch (16449:9): [True: 470k, False: 0]
  ------------------
16450|       |        /* this should always be true, except if function is only partially constructed */
16451|   470k|        numenvs = func->def->environments_length;
16452|   522k|        for (i = 0; i < numenvs; ++i) {
  ------------------
  |  Branch (16452:21): [True: 52.4k, False: 470k]
  ------------------
16453|  52.4k|            janet_mark_funcenv(func->envs[i]);
16454|  52.4k|        }
16455|   470k|        janet_mark_funcdef(func->def);
16456|   470k|    }
16457|   470k|}
janet.c:janet_mark_funcenv:
16405|  52.5k|static void janet_mark_funcenv(JanetFuncEnv *env) {
16406|  52.5k|    if (janet_gc_reachable(env))
  ------------------
  |  |  632|  52.5k|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|  52.5k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|  52.5k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (632:31): [True: 42.6k, False: 9.85k]
  |  |  ------------------
  ------------------
16407|  42.6k|        return;
16408|  9.85k|    janet_gc_mark(env);
  ------------------
  |  |  631|  9.85k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|  9.85k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|  9.85k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16409|       |    /* If closure env references a dead fiber, we can just copy out the stack frame we need so
16410|       |     * we don't need to keep around the whole dead fiber. */
16411|  9.85k|    janet_env_maybe_detach(env);
16412|  9.85k|    if (env->offset > 0) {
  ------------------
  |  Branch (16412:9): [True: 77, False: 9.77k]
  ------------------
16413|       |        /* On stack */
16414|     77|        janet_mark_fiber(env->as.fiber);
16415|  9.77k|    } else {
16416|       |        /* Not on stack */
16417|  9.77k|        janet_mark_many(env->as.values, env->length);
16418|  9.77k|    }
16419|  9.85k|}
janet.c:janet_mark_funcdef:
16422|   882k|static void janet_mark_funcdef(JanetFuncDef *def) {
16423|   882k|    int32_t i;
16424|   882k|    if (janet_gc_reachable(def))
  ------------------
  |  |  632|   882k|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|   882k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|   882k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (632:31): [True: 6.30k, False: 876k]
  |  |  ------------------
  ------------------
16425|  6.30k|        return;
16426|   876k|    janet_gc_mark(def);
  ------------------
  |  |  631|   876k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|   876k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|   876k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16427|   876k|    janet_mark_many(def->constants, def->constants_length);
16428|  1.28M|    for (i = 0; i < def->defs_length; ++i) {
  ------------------
  |  Branch (16428:17): [True: 412k, False: 876k]
  ------------------
16429|   412k|        janet_mark_funcdef(def->defs[i]);
16430|   412k|    }
16431|   876k|    if (def->source)
  ------------------
  |  Branch (16431:9): [True: 836k, False: 40.1k]
  ------------------
16432|   836k|        janet_mark_string(def->source);
16433|   876k|    if (def->name)
  ------------------
  |  Branch (16433:9): [True: 832k, False: 43.8k]
  ------------------
16434|   832k|        janet_mark_string(def->name);
16435|   876k|    if (def->symbolmap) {
  ------------------
  |  Branch (16435:9): [True: 637k, False: 239k]
  ------------------
16436|  25.8M|        for (int i = 0; i < def->symbolmap_length; i++) {
  ------------------
  |  Branch (16436:25): [True: 25.2M, False: 637k]
  ------------------
16437|  25.2M|            janet_mark_string(def->symbolmap[i].symbol);
16438|  25.2M|        }
16439|   637k|    }
16440|       |
16441|   876k|}
janet.c:janet_mark_fiber:
16459|  1.74k|static void janet_mark_fiber(JanetFiber *fiber) {
16460|  1.74k|    int32_t i, j;
16461|  1.74k|    JanetStackFrame *frame;
16462|  1.76k|recur:
16463|  1.76k|    if (janet_gc_reachable(fiber))
  ------------------
  |  |  632|  1.76k|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|  1.76k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|  1.76k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  |  |  |  Branch (632:31): [True: 342, False: 1.41k]
  |  |  ------------------
  ------------------
16464|    342|        return;
16465|  1.41k|    janet_gc_mark(fiber);
  ------------------
  |  |  631|  1.41k|#define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|  1.41k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_mark(m) (janet_gc_header(m)->flags |= JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|  1.41k|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16466|       |
16467|  1.41k|    janet_mark(fiber->last_value);
16468|       |
16469|       |    /* Mark values on the argument stack */
16470|  1.41k|    janet_mark_many(fiber->data + fiber->stackstart,
16471|  1.41k|                    fiber->stacktop - fiber->stackstart);
16472|       |
16473|  1.41k|    i = fiber->frame;
16474|  1.41k|    j = fiber->stackstart - JANET_FRAME_SIZE;
  ------------------
  |  | 1017|  1.41k|#define JANET_FRAME_SIZE 4
  ------------------
16475|  3.06k|    while (i > 0) {
  ------------------
  |  Branch (16475:12): [True: 1.64k, False: 1.41k]
  ------------------
16476|  1.64k|        frame = (JanetStackFrame *)(fiber->data + i - JANET_FRAME_SIZE);
  ------------------
  |  | 1017|  1.64k|#define JANET_FRAME_SIZE 4
  ------------------
16477|  1.64k|        if (NULL != frame->func)
  ------------------
  |  Branch (16477:13): [True: 1.52k, False: 112]
  ------------------
16478|  1.52k|            janet_mark_function(frame->func);
16479|  1.64k|        if (NULL != frame->env)
  ------------------
  |  Branch (16479:13): [True: 77, False: 1.56k]
  ------------------
16480|     77|            janet_mark_funcenv(frame->env);
16481|       |        /* Mark all values in the stack frame */
16482|  1.64k|        janet_mark_many(fiber->data + i, j - i);
16483|  1.64k|        j = i - JANET_FRAME_SIZE;
  ------------------
  |  | 1017|  1.64k|#define JANET_FRAME_SIZE 4
  ------------------
16484|  1.64k|        i = frame->prevframe;
16485|  1.64k|    }
16486|       |
16487|  1.41k|    if (fiber->env)
  ------------------
  |  Branch (16487:9): [True: 1.41k, False: 0]
  ------------------
16488|  1.41k|        janet_mark_table(fiber->env);
16489|       |
16490|  1.41k|#ifdef JANET_EV
16491|  1.41k|    if (fiber->supervisor_channel) {
  ------------------
  |  Branch (16491:9): [True: 67, False: 1.35k]
  ------------------
16492|     67|        janet_mark_abstract(fiber->supervisor_channel);
16493|     67|    }
16494|  1.41k|    if (fiber->ev_stream) {
  ------------------
  |  Branch (16494:9): [True: 0, False: 1.41k]
  ------------------
16495|      0|        janet_mark_abstract(fiber->ev_stream);
16496|      0|    }
16497|  1.41k|    if (fiber->ev_callback) {
  ------------------
  |  Branch (16497:9): [True: 0, False: 1.41k]
  ------------------
16498|      0|        fiber->ev_callback(fiber, JANET_ASYNC_EVENT_MARK);
16499|      0|    }
16500|  1.41k|#endif
16501|       |
16502|       |    /* Explicit tail recursion */
16503|  1.41k|    if (fiber->child) {
  ------------------
  |  Branch (16503:9): [True: 20, False: 1.39k]
  ------------------
16504|     20|        fiber = fiber->child;
16505|     20|        goto recur;
16506|     20|    }
16507|  1.41k|}
janet.c:janet_check_liveref:
16576|  3.67M|static int janet_check_liveref(Janet x) {
16577|  3.67M|    switch (janet_type(x)) {
  ------------------
  |  |  790|  3.67M|    (isnan((x).number) \
  |  |  791|  3.67M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  3.67M|        : JANET_NUMBER)
  ------------------
  |  Branch (16577:13): [True: 3.67M, False: 0]
  ------------------
16578|  3.67M|        default:
  ------------------
  |  Branch (16578:9): [True: 3.67M, False: 0]
  ------------------
16579|  3.67M|            return 1;
16580|      0|        case JANET_ARRAY:
  ------------------
  |  Branch (16580:9): [True: 0, False: 3.67M]
  ------------------
16581|      0|        case JANET_TABLE:
  ------------------
  |  Branch (16581:9): [True: 0, False: 3.67M]
  ------------------
16582|      0|        case JANET_FUNCTION:
  ------------------
  |  Branch (16582:9): [True: 0, False: 3.67M]
  ------------------
16583|      0|        case JANET_BUFFER:
  ------------------
  |  Branch (16583:9): [True: 0, False: 3.67M]
  ------------------
16584|      0|        case JANET_FIBER:
  ------------------
  |  Branch (16584:9): [True: 0, False: 3.67M]
  ------------------
16585|      0|            return janet_gc_reachable(janet_unwrap_pointer(x));
  ------------------
  |  |  632|      0|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|      0|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|      0|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16586|      0|        case JANET_STRING:
  ------------------
  |  Branch (16586:9): [True: 0, False: 3.67M]
  ------------------
16587|      0|        case JANET_SYMBOL:
  ------------------
  |  Branch (16587:9): [True: 0, False: 3.67M]
  ------------------
16588|      0|        case JANET_KEYWORD:
  ------------------
  |  Branch (16588:9): [True: 0, False: 3.67M]
  ------------------
16589|      0|            return janet_gc_reachable(janet_string_head(janet_unwrap_string(x)));
  ------------------
  |  |  632|      0|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|      0|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|      0|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16590|      0|        case JANET_ABSTRACT:
  ------------------
  |  Branch (16590:9): [True: 0, False: 3.67M]
  ------------------
16591|      0|            return janet_gc_reachable(janet_abstract_head(janet_unwrap_abstract(x)));
  ------------------
  |  |  632|      0|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|      0|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|      0|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16592|      0|        case JANET_TUPLE:
  ------------------
  |  Branch (16592:9): [True: 0, False: 3.67M]
  ------------------
16593|      0|            return janet_gc_reachable(janet_tuple_head(janet_unwrap_tuple(x)));
  ------------------
  |  |  632|      0|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|      0|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|      0|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16594|      0|        case JANET_STRUCT:
  ------------------
  |  Branch (16594:9): [True: 0, False: 3.67M]
  ------------------
16595|      0|            return janet_gc_reachable(janet_struct_head(janet_unwrap_struct(x)));
  ------------------
  |  |  632|      0|#define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  622|      0|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  |  |               #define janet_gc_reachable(m) (janet_gc_header(m)->flags & JANET_MEM_REACHABLE)
  |  |  ------------------
  |  |  |  |  625|      0|#define JANET_MEM_REACHABLE 0x100
  |  |  ------------------
  ------------------
16596|  3.67M|    }
16597|  3.67M|}
janet.c:janet_deinit_block:
16510|   235M|static void janet_deinit_block(JanetGCObject *mem) {
16511|   235M|    switch (mem->flags & JANET_MEM_TYPEBITS) {
  ------------------
  |  |  624|   235M|#define JANET_MEM_TYPEBITS 0xFF
  ------------------
16512|  84.7M|        default:
  ------------------
  |  Branch (16512:9): [True: 84.7M, False: 150M]
  ------------------
16513|   173M|        case JANET_MEMORY_FUNCTION:
  ------------------
  |  Branch (16513:9): [True: 88.6M, False: 147M]
  ------------------
16514|   173M|            break; /* Do nothing for non gc types */
16515|  21.6M|        case JANET_MEMORY_SYMBOL:
  ------------------
  |  Branch (16515:9): [True: 21.6M, False: 214M]
  ------------------
16516|  21.6M|            janet_symbol_deinit(((JanetStringHead *) mem)->data);
16517|  21.6M|            break;
16518|  12.7M|        case JANET_MEMORY_ARRAY:
  ------------------
  |  Branch (16518:9): [True: 12.7M, False: 222M]
  ------------------
16519|  12.7M|        case JANET_MEMORY_ARRAY_WEAK:
  ------------------
  |  Branch (16519:9): [True: 8, False: 235M]
  ------------------
16520|  12.7M|            janet_free(((JanetArray *) mem)->data);
  ------------------
  |  | 2402|  12.7M|#define janet_free(X) free((X))
  ------------------
16521|  12.7M|            break;
16522|  5.75M|        case JANET_MEMORY_TABLE:
  ------------------
  |  Branch (16522:9): [True: 5.75M, False: 229M]
  ------------------
16523|  5.75M|        case JANET_MEMORY_TABLE_WEAKK:
  ------------------
  |  Branch (16523:9): [True: 0, False: 235M]
  ------------------
16524|  5.75M|        case JANET_MEMORY_TABLE_WEAKV:
  ------------------
  |  Branch (16524:9): [True: 0, False: 235M]
  ------------------
16525|  5.75M|        case JANET_MEMORY_TABLE_WEAKKV:
  ------------------
  |  Branch (16525:9): [True: 0, False: 235M]
  ------------------
16526|  5.75M|            janet_free(((JanetTable *) mem)->data);
  ------------------
  |  | 2402|  5.75M|#define janet_free(X) free((X))
  ------------------
16527|  5.75M|            break;
16528|   389k|        case JANET_MEMORY_FIBER: {
  ------------------
  |  Branch (16528:9): [True: 389k, False: 235M]
  ------------------
16529|   389k|            JanetFiber *f = (JanetFiber *)mem;
16530|   389k|#ifdef JANET_EV
16531|   389k|            if (f->ev_state && !(f->flags & JANET_FIBER_EV_FLAG_IN_FLIGHT)) {
  ------------------
  |  |  792|      0|#define JANET_FIBER_EV_FLAG_IN_FLIGHT 0x1
  ------------------
  |  Branch (16531:17): [True: 0, False: 389k]
  |  Branch (16531:32): [True: 0, False: 0]
  ------------------
16532|      0|                janet_ev_dec_refcount();
16533|      0|                janet_free(f->ev_state);
  ------------------
  |  | 2402|      0|#define janet_free(X) free((X))
  ------------------
16534|   389k|            } else if (f->gc.flags & JANET_FIBER_EV_FLAG_SUSPENDED) {
  ------------------
  |  |  790|   389k|#define JANET_FIBER_EV_FLAG_SUSPENDED 0x20000
  ------------------
  |  Branch (16534:24): [True: 0, False: 389k]
  ------------------
16535|      0|                janet_ev_dec_refcount();
16536|      0|            }
16537|   389k|#endif
16538|   389k|            janet_free(f->data);
  ------------------
  |  | 2402|   389k|#define janet_free(X) free((X))
  ------------------
16539|   389k|        }
16540|   389k|        break;
16541|  5.60M|        case JANET_MEMORY_BUFFER:
  ------------------
  |  Branch (16541:9): [True: 5.60M, False: 230M]
  ------------------
16542|  5.60M|            janet_buffer_deinit((JanetBuffer *) mem);
16543|  5.60M|            break;
16544|   152k|        case JANET_MEMORY_ABSTRACT: {
  ------------------
  |  Branch (16544:9): [True: 152k, False: 235M]
  ------------------
16545|   152k|            JanetAbstractHead *head = (JanetAbstractHead *)mem;
16546|   152k|            if (head->type->gcperthread) {
  ------------------
  |  Branch (16546:17): [True: 1.55k, False: 151k]
  ------------------
16547|  1.55k|                janet_assert(!head->type->gcperthread(head->data, head->size), "per-thread finalizer failed");
  ------------------
  |  |  386|  1.55k|#define janet_assert(c, m) do { \
  |  |  387|  1.55k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 1.55k]
  |  |  ------------------
  |  |  388|  1.55k|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 1.55k]
  |  |  ------------------
  ------------------
16548|  1.55k|            }
16549|   152k|            if (head->type->gc) {
  ------------------
  |  Branch (16549:17): [True: 133k, False: 19.2k]
  ------------------
16550|   133k|                janet_assert(!head->type->gc(head->data, head->size), "finalizer failed");
  ------------------
  |  |  386|   133k|#define janet_assert(c, m) do { \
  |  |  387|   133k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 133k]
  |  |  ------------------
  |  |  388|   133k|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 133k]
  |  |  ------------------
  ------------------
16551|   133k|            }
16552|   152k|        }
16553|   152k|        break;
16554|  11.2M|        case JANET_MEMORY_FUNCENV: {
  ------------------
  |  Branch (16554:9): [True: 11.2M, False: 224M]
  ------------------
16555|  11.2M|            JanetFuncEnv *env = (JanetFuncEnv *)mem;
16556|  11.2M|            if (0 == env->offset)
  ------------------
  |  Branch (16556:17): [True: 11.2M, False: 11.2k]
  ------------------
16557|  11.2M|                janet_free(env->as.values);
  ------------------
  |  | 2402|  11.2M|#define janet_free(X) free((X))
  ------------------
16558|  11.2M|        }
16559|  11.2M|        break;
16560|  4.82M|        case JANET_MEMORY_FUNCDEF: {
  ------------------
  |  Branch (16560:9): [True: 4.82M, False: 230M]
  ------------------
16561|  4.82M|            JanetFuncDef *def = (JanetFuncDef *)mem;
16562|       |            /* TODO - get this all with one alloc and one free */
16563|  4.82M|            janet_free(def->defs);
  ------------------
  |  | 2402|  4.82M|#define janet_free(X) free((X))
  ------------------
16564|  4.82M|            janet_free(def->environments);
  ------------------
  |  | 2402|  4.82M|#define janet_free(X) free((X))
  ------------------
16565|  4.82M|            janet_free(def->constants);
  ------------------
  |  | 2402|  4.82M|#define janet_free(X) free((X))
  ------------------
16566|  4.82M|            janet_free(def->bytecode);
  ------------------
  |  | 2402|  4.82M|#define janet_free(X) free((X))
  ------------------
16567|  4.82M|            janet_free(def->sourcemap);
  ------------------
  |  | 2402|  4.82M|#define janet_free(X) free((X))
  ------------------
16568|  4.82M|            janet_free(def->closure_bitset);
  ------------------
  |  | 2402|  4.82M|#define janet_free(X) free((X))
  ------------------
16569|  4.82M|            janet_free(def->symbolmap);
  ------------------
  |  | 2402|  4.82M|#define janet_free(X) free((X))
  ------------------
16570|  4.82M|        }
16571|  4.82M|        break;
16572|   235M|    }
16573|   235M|}
janet.c:janet_free_all_scratch:
16760|  8.87k|static void janet_free_all_scratch(void) {
16761|   105k|    for (size_t i = 0; i < janet_vm.scratch_len; i++) {
  ------------------
  |  Branch (16761:24): [True: 96.5k, False: 8.87k]
  ------------------
16762|  96.5k|        free_one_scratch(janet_vm.scratch_mem[i]);
16763|  96.5k|    }
16764|  8.87k|    janet_vm.scratch_len = 0;
16765|  8.87k|}
janet.c:janet_gc_idequals:
16823|  50.8k|static int janet_gc_idequals(Janet lhs, Janet rhs) {
16824|  50.8k|    if (janet_type(lhs) != janet_type(rhs))
  ------------------
  |  |  790|  50.8k|    (isnan((x).number) \
  |  |  791|  50.8k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  50.8k|        : JANET_NUMBER)
  ------------------
                  if (janet_type(lhs) != janet_type(rhs))
  ------------------
  |  |  790|  50.8k|    (isnan((x).number) \
  |  |  791|  50.8k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  50.8k|        : JANET_NUMBER)
  ------------------
  |  Branch (16824:9): [True: 50.8k, False: 0]
  |  Branch (16824:9): [True: 36.3k, False: 14.5k]
  |  Branch (16824:28): [True: 50.8k, False: 0]
  ------------------
16825|  36.3k|        return 0;
16826|  14.5k|    switch (janet_type(lhs)) {
  ------------------
  |  |  790|  14.5k|    (isnan((x).number) \
  |  |  791|  14.5k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  14.5k|        : JANET_NUMBER)
  ------------------
  |  Branch (16826:13): [True: 14.5k, False: 0]
  ------------------
16827|      0|        case JANET_BOOLEAN:
  ------------------
  |  Branch (16827:9): [True: 0, False: 14.5k]
  ------------------
16828|      0|        case JANET_NIL:
  ------------------
  |  Branch (16828:9): [True: 0, False: 14.5k]
  ------------------
16829|      0|        case JANET_NUMBER:
  ------------------
  |  Branch (16829:9): [True: 0, False: 14.5k]
  ------------------
16830|       |            /* These values don't really matter to the gc so returning 1 all the time is fine. */
16831|      0|            return 1;
16832|  14.5k|        default:
  ------------------
  |  Branch (16832:9): [True: 14.5k, False: 0]
  ------------------
16833|  14.5k|            return janet_unwrap_pointer(lhs) == janet_unwrap_pointer(rhs);
  ------------------
  |  |  862|  14.5k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
                          return janet_unwrap_pointer(lhs) == janet_unwrap_pointer(rhs);
  ------------------
  |  |  862|  14.5k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
16834|  14.5k|    }
16835|  14.5k|}
janet.c:janet_mem2scratch:
16767|  6.17M|static JanetScratch *janet_mem2scratch(void *mem) {
16768|  6.17M|    JanetScratch *s = (JanetScratch *)mem;
16769|  6.17M|    return s - 1;
16770|  6.17M|}
janet.c:free_one_scratch:
16752|  3.13M|static void free_one_scratch(JanetScratch *s) {
16753|  3.13M|    if (NULL != s->finalize) {
  ------------------
  |  Branch (16753:9): [True: 0, False: 3.13M]
  ------------------
16754|      0|        s->finalize((char *) s->mem);
16755|      0|    }
16756|  3.13M|    janet_free(s);
  ------------------
  |  | 2402|  3.13M|#define janet_free(X) free((X))
  ------------------
16757|  3.13M|}
janet.c:int64_marshal:
17040|     16|static void int64_marshal(void *p, JanetMarshalContext *ctx) {
17041|     16|    janet_marshal_abstract(ctx, p);
17042|     16|    janet_marshal_int64(ctx, *((int64_t *)p));
17043|     16|}
janet.c:int64_unmarshal:
17045|     15|static void *int64_unmarshal(JanetMarshalContext *ctx) {
17046|     15|    int64_t *p = janet_unmarshal_abstract(ctx, sizeof(int64_t));
17047|     15|    p[0] = janet_unmarshal_int64(ctx);
17048|     15|    return p;
17049|     15|}
janet.c:it_s64_tostring:
17051|     92|static void it_s64_tostring(void *p, JanetBuffer *buffer) {
17052|     92|    char str[32];
17053|       |    snprintf(str, sizeof(str), "%" PRId64, *((int64_t *)p));
17054|     92|    janet_buffer_push_cstring(buffer, str);
17055|     92|}
janet.c:janet_int64_compare:
17028|    956|static int janet_int64_compare(void *p1, void *p2) {
17029|    956|    int64_t x = *((int64_t *)p1);
17030|    956|    int64_t y = *((int64_t *)p2);
17031|    956|    return x == y ? 0 : x < y ? -1 : 1;
  ------------------
  |  Branch (17031:12): [True: 372, False: 584]
  |  Branch (17031:25): [True: 225, False: 359]
  ------------------
17032|    956|}
janet.c:janet_int64_hash:
17022|  10.9k|static int32_t janet_int64_hash(void *p1, size_t size) {
17023|  10.9k|    (void) size;
17024|  10.9k|    int32_t *words = p1;
17025|  10.9k|    return words[0] ^ words[1];
17026|  10.9k|}
janet.c:it_u64_tostring:
17057|    137|static void it_u64_tostring(void *p, JanetBuffer *buffer) {
17058|    137|    char str[32];
17059|       |    snprintf(str, sizeof(str), "%" PRIu64, *((uint64_t *)p));
17060|    137|    janet_buffer_push_cstring(buffer, str);
17061|    137|}
janet.c:janet_uint64_compare:
17034|  1.62k|static int janet_uint64_compare(void *p1, void *p2) {
17035|  1.62k|    uint64_t x = *((uint64_t *)p1);
17036|  1.62k|    uint64_t y = *((uint64_t *)p2);
17037|  1.62k|    return x == y ? 0 : x < y ? -1 : 1;
  ------------------
  |  Branch (17037:12): [True: 711, False: 917]
  |  Branch (17037:25): [True: 251, False: 666]
  ------------------
17038|  1.62k|}
janet.c:cfun_it_s64_add:
17396|     88|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17397|     88|    janet_arity(argc, 2, -1); \
17398|     88|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17399|     88|    *box = janet_unwrap_##type(argv[0]); \
17400|    175|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17400:25): [True: 87, False: 88]
  ------------------
17401|     88|        /* This avoids undefined behavior. See above for why. */ \
17402|     88|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17403|     88|    return janet_wrap_abstract(box); \
  ------------------
  |  |  846|     88|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|     88|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     88|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     88|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17404|     88|} \
janet.c:cfun_it_s64_sub:
17396|  9.05k|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17397|  9.05k|    janet_arity(argc, 2, -1); \
17398|  9.05k|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17399|  9.05k|    *box = janet_unwrap_##type(argv[0]); \
17400|  23.9k|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17400:25): [True: 14.8k, False: 9.05k]
  ------------------
17401|  9.05k|        /* This avoids undefined behavior. See above for why. */ \
17402|  14.8k|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17403|  9.05k|    return janet_wrap_abstract(box); \
  ------------------
  |  |  846|  9.05k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|  9.05k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  9.05k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  9.05k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17404|  9.05k|} \
janet.c:cfun_it_s64_subi:
17407|      1|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name##i(int32_t argc, Janet *argv) { \
17408|      1|    janet_fixarity(argc, 2); \
17409|      1|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17410|      1|    *box = janet_unwrap_##type(argv[1]); \
17411|      1|    /* This avoids undefined behavior. See above for why. */ \
17412|      1|    *box = (T) ((uint64_t) *box) oper ((uint64_t) janet_unwrap_##type(argv[0])); \
17413|      1|    return janet_wrap_abstract(box); \
  ------------------
  |  |  846|      1|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|      1|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17414|      1|} \
janet.c:cfun_it_s64_mul:
17396|     27|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17397|     27|    janet_arity(argc, 2, -1); \
17398|     27|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17399|     27|    *box = janet_unwrap_##type(argv[0]); \
17400|     94|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17400:25): [True: 67, False: 27]
  ------------------
17401|     27|        /* This avoids undefined behavior. See above for why. */ \
17402|     67|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17403|     27|    return janet_wrap_abstract(box); \
  ------------------
  |  |  846|     27|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|     27|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     27|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     27|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17404|     27|} \
janet.c:cfun_it_s64_mod:
17501|     94|static JANET_CFUNCTION_ALIGN Janet cfun_it_s64_mod(int32_t argc, Janet *argv) {
17502|     94|    janet_fixarity(argc, 2);
17503|     94|    int64_t *box = janet_abstract(&janet_s64_type, sizeof(int64_t));
17504|     94|    int64_t op1 = janet_unwrap_s64(argv[0]);
17505|     94|    int64_t op2 = janet_unwrap_s64(argv[1]);
17506|     94|    if (op2 == 0) {
  ------------------
  |  Branch (17506:9): [True: 31, False: 63]
  ------------------
17507|     31|        *box = op1;
17508|     63|    } else {
17509|     63|        int64_t x = op1 % op2;
17510|     63|        *box = (((op1 ^ op2) < 0) && (x != 0)) ? x + op2 : x;
  ------------------
  |  Branch (17510:17): [True: 11, False: 52]
  |  Branch (17510:38): [True: 8, False: 3]
  ------------------
17511|     63|    }
17512|     94|    return janet_wrap_abstract(box);
  ------------------
  |  |  846|     94|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|     94|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     94|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     94|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17513|     94|}
janet.c:cfun_it_s64_modi:
17515|      5|static JANET_CFUNCTION_ALIGN Janet cfun_it_s64_modi(int32_t argc, Janet *argv) {
17516|      5|    janet_fixarity(argc, 2);
17517|      5|    int64_t *box = janet_abstract(&janet_s64_type, sizeof(int64_t));
17518|      5|    int64_t op2 = janet_unwrap_s64(argv[0]);
17519|      5|    int64_t op1 = janet_unwrap_s64(argv[1]);
17520|      5|    if (op2 == 0) {
  ------------------
  |  Branch (17520:9): [True: 1, False: 4]
  ------------------
17521|      1|        *box = op1;
17522|      4|    } else {
17523|      4|        int64_t x = op1 % op2;
17524|      4|        *box = (((op1 ^ op2) < 0) && (x != 0)) ? x + op2 : x;
  ------------------
  |  Branch (17524:17): [True: 2, False: 2]
  |  Branch (17524:38): [True: 2, False: 0]
  ------------------
17525|      4|    }
17526|      5|    return janet_wrap_abstract(box);
  ------------------
  |  |  846|      5|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|      5|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      5|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      5|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17527|      5|}
janet.c:cfun_it_s64_and:
17396|     14|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17397|     14|    janet_arity(argc, 2, -1); \
17398|     14|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17399|     14|    *box = janet_unwrap_##type(argv[0]); \
17400|     31|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17400:25): [True: 17, False: 14]
  ------------------
17401|     14|        /* This avoids undefined behavior. See above for why. */ \
17402|     17|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17403|     14|    return janet_wrap_abstract(box); \
  ------------------
  |  |  846|     14|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|     14|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     14|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     14|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17404|     14|} \
janet.c:cfun_it_s64_or:
17396|     15|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17397|     15|    janet_arity(argc, 2, -1); \
17398|     15|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17399|     15|    *box = janet_unwrap_##type(argv[0]); \
17400|     30|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17400:25): [True: 15, False: 15]
  ------------------
17401|     15|        /* This avoids undefined behavior. See above for why. */ \
17402|     15|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17403|     15|    return janet_wrap_abstract(box); \
  ------------------
  |  |  846|     15|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|     15|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     15|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     15|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17404|     15|} \
janet.c:cfun_it_s64_xor:
17396|     16|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17397|     16|    janet_arity(argc, 2, -1); \
17398|     16|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17399|     16|    *box = janet_unwrap_##type(argv[0]); \
17400|     77|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17400:25): [True: 61, False: 16]
  ------------------
17401|     16|        /* This avoids undefined behavior. See above for why. */ \
17402|     61|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17403|     16|    return janet_wrap_abstract(box); \
  ------------------
  |  |  846|     16|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|     16|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     16|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     16|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17404|     16|} \
janet.c:cfun_it_s64_rshift:
17396|      2|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17397|      2|    janet_arity(argc, 2, -1); \
17398|      2|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17399|      2|    *box = janet_unwrap_##type(argv[0]); \
17400|      4|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17400:25): [True: 2, False: 2]
  ------------------
17401|      2|        /* This avoids undefined behavior. See above for why. */ \
17402|      2|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17403|      2|    return janet_wrap_abstract(box); \
  ------------------
  |  |  846|      2|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|      2|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      2|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      2|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17404|      2|} \
janet.c:cfun_it_s64_compare:
17313|      1|static JANET_CFUNCTION_ALIGN Janet cfun_it_s64_compare(int32_t argc, Janet *argv) {
17314|      1|    janet_fixarity(argc, 2);
17315|      1|    if (janet_is_int(argv[0]) != JANET_INT_S64) {
  ------------------
  |  Branch (17315:9): [True: 0, False: 1]
  ------------------
17316|      0|        janet_panic("compare method requires int/s64 as first argument");
17317|      0|    }
17318|      1|    int64_t x = janet_unwrap_s64(argv[0]);
17319|      1|    switch (janet_type(argv[1])) {
  ------------------
  |  |  790|      1|    (isnan((x).number) \
  |  |  791|      1|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|      1|        : JANET_NUMBER)
  ------------------
  |  Branch (17319:13): [True: 1, False: 0]
  ------------------
17320|      1|        default:
  ------------------
  |  Branch (17320:9): [True: 1, False: 0]
  ------------------
17321|      1|            break;
17322|      1|        case JANET_NUMBER : {
  ------------------
  |  Branch (17322:9): [True: 0, False: 1]
  ------------------
17323|      0|            double y = janet_unwrap_number(argv[1]);
  ------------------
  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  ------------------
17324|      0|            return janet_wrap_number(compare_int64_double(x, y));
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
17325|      0|        }
17326|      0|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (17326:9): [True: 0, False: 1]
  ------------------
17327|      0|            void *abst = janet_unwrap_abstract(argv[1]);
  ------------------
  |  |  861|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
17328|      0|            if (janet_abstract_type(abst) == &janet_s64_type) {
  ------------------
  |  | 1889|      0|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (17328:17): [True: 0, False: 0]
  ------------------
17329|      0|                int64_t y = *(int64_t *)abst;
17330|      0|                return janet_wrap_number((x < y) ? -1 : (x > y ? 1 : 0));
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |  |  Branch (830:55): [True: 0, False: 0]
  |  |  |  Branch (830:55): [True: 0, False: 0]
  |  |  ------------------
  ------------------
17331|      0|            } else if (janet_abstract_type(abst) == &janet_u64_type) {
  ------------------
  |  | 1889|      0|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (17331:24): [True: 0, False: 0]
  ------------------
17332|      0|                uint64_t y = *(uint64_t *)abst;
17333|      0|                if (x < 0) {
  ------------------
  |  Branch (17333:21): [True: 0, False: 0]
  ------------------
17334|      0|                    return janet_wrap_number(-1);
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
17335|      0|                } else if (y > INT64_MAX) {
  ------------------
  |  Branch (17335:28): [True: 0, False: 0]
  ------------------
17336|      0|                    return janet_wrap_number(-1);
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
17337|      0|                } else {
17338|      0|                    int64_t y2 = (int64_t) y;
17339|      0|                    return janet_wrap_number((x < y2) ? -1 : (x > y2 ? 1 : 0));
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |  |  Branch (830:55): [True: 0, False: 0]
  |  |  |  Branch (830:55): [True: 0, False: 0]
  |  |  ------------------
  ------------------
17340|      0|                }
17341|      0|            }
17342|      0|            break;
17343|      0|        }
17344|      1|    }
17345|      1|    return janet_wrap_nil();
  ------------------
  |  |  826|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17346|      1|}
janet.c:janet_uint64_next:
17626|  1.70k|static Janet janet_uint64_next(void *p, Janet key) {
17627|  1.70k|    (void) p;
17628|  1.70k|    return janet_nextmethod(it_u64_methods, key);
17629|  1.70k|}
janet.c:cfun_it_u64_add:
17396|     40|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17397|     40|    janet_arity(argc, 2, -1); \
17398|     40|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17399|     40|    *box = janet_unwrap_##type(argv[0]); \
17400|     83|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17400:25): [True: 43, False: 40]
  ------------------
17401|     40|        /* This avoids undefined behavior. See above for why. */ \
17402|     43|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17403|     40|    return janet_wrap_abstract(box); \
  ------------------
  |  |  846|     40|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|     40|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     40|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     40|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17404|     40|} \
janet.c:cfun_it_u64_sub:
17396|    263|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17397|    263|    janet_arity(argc, 2, -1); \
17398|    263|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17399|    263|    *box = janet_unwrap_##type(argv[0]); \
17400|    530|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17400:25): [True: 267, False: 263]
  ------------------
17401|    263|        /* This avoids undefined behavior. See above for why. */ \
17402|    267|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17403|    263|    return janet_wrap_abstract(box); \
  ------------------
  |  |  846|    263|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|    263|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    263|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    263|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17404|    263|} \
janet.c:cfun_it_u64_subi:
17407|     18|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name##i(int32_t argc, Janet *argv) { \
17408|     18|    janet_fixarity(argc, 2); \
17409|     18|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17410|     18|    *box = janet_unwrap_##type(argv[1]); \
17411|     18|    /* This avoids undefined behavior. See above for why. */ \
17412|     18|    *box = (T) ((uint64_t) *box) oper ((uint64_t) janet_unwrap_##type(argv[0])); \
17413|     18|    return janet_wrap_abstract(box); \
  ------------------
  |  |  846|     18|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|     18|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     18|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     18|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17414|     18|} \
janet.c:cfun_it_u64_mul:
17396|     22|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17397|     22|    janet_arity(argc, 2, -1); \
17398|     22|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17399|     22|    *box = janet_unwrap_##type(argv[0]); \
17400|     72|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17400:25): [True: 50, False: 22]
  ------------------
17401|     22|        /* This avoids undefined behavior. See above for why. */ \
17402|     50|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17403|     22|    return janet_wrap_abstract(box); \
  ------------------
  |  |  846|     22|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|     22|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     22|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     22|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17404|     22|} \
janet.c:cfun_it_u64_div:
17430|     63|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17431|     63|    janet_arity(argc, 2, -1);                       \
17432|     63|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17433|     63|    *box = janet_unwrap_##type(argv[0]); \
17434|    128|    for (int32_t i = 1; i < argc; i++) { \
  ------------------
  |  Branch (17434:25): [True: 69, False: 59]
  ------------------
17435|     69|      T value = janet_unwrap_##type(argv[i]); \
17436|     69|      if (value == 0) DIVZERO(name); \
  ------------------
  |  |17424|      4|#define DIVZERO(name) DIVZERO_##name
  |  |  ------------------
  |  |  |  |17425|      4|#define DIVZERO_div janet_panic("division by zero")
  |  |  ------------------
  ------------------
  |  Branch (17436:11): [True: 4, False: 65]
  ------------------
17437|     69|      *box oper##= value; \
17438|     65|    } \
17439|     63|    return janet_wrap_abstract(box); \
  ------------------
  |  |  846|     59|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|     59|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     59|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     59|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17440|     63|} \
janet.c:cfun_it_u64_mod:
17430|     18|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17431|     18|    janet_arity(argc, 2, -1);                       \
17432|     18|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17433|     18|    *box = janet_unwrap_##type(argv[0]); \
17434|     36|    for (int32_t i = 1; i < argc; i++) { \
  ------------------
  |  Branch (17434:25): [True: 18, False: 18]
  ------------------
17435|     18|      T value = janet_unwrap_##type(argv[i]); \
17436|     18|      if (value == 0) DIVZERO(name); \
  ------------------
  |  |17424|      0|#define DIVZERO(name) DIVZERO_##name
  |  |  ------------------
  |  |  |  |17427|      0|#define DIVZERO_mod return janet_wrap_abstract(box)
  |  |  |  |  ------------------
  |  |  |  |  |  |  846|      0|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (17436:11): [True: 0, False: 18]
  ------------------
17437|     18|      *box oper##= value; \
17438|     18|    } \
17439|     18|    return janet_wrap_abstract(box); \
  ------------------
  |  |  846|     18|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|     18|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     18|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     18|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17440|     18|} \
janet.c:cfun_it_u64_modi:
17443|      3|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name##i(int32_t argc, Janet *argv) { \
17444|      3|    janet_fixarity(argc, 2);                       \
17445|      3|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17446|      3|    *box = janet_unwrap_##type(argv[1]); \
17447|      3|    T value = janet_unwrap_##type(argv[0]); \
17448|      3|    if (value == 0) DIVZERO(name); \
  ------------------
  |  |17424|      0|#define DIVZERO(name) DIVZERO_##name
  |  |  ------------------
  |  |  |  |17427|      0|#define DIVZERO_mod return janet_wrap_abstract(box)
  |  |  |  |  ------------------
  |  |  |  |  |  |  846|      0|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (17448:9): [True: 0, False: 3]
  ------------------
17449|      3|    *box oper##= value; \
17450|      3|    return janet_wrap_abstract(box); \
  ------------------
  |  |  846|      3|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|      3|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17451|      3|} \
janet.c:cfun_it_u64_rem:
17430|    206|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17431|    206|    janet_arity(argc, 2, -1);                       \
17432|    206|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17433|    206|    *box = janet_unwrap_##type(argv[0]); \
17434|    420|    for (int32_t i = 1; i < argc; i++) { \
  ------------------
  |  Branch (17434:25): [True: 215, False: 205]
  ------------------
17435|    215|      T value = janet_unwrap_##type(argv[i]); \
17436|    215|      if (value == 0) DIVZERO(name); \
  ------------------
  |  |17424|      1|#define DIVZERO(name) DIVZERO_##name
  |  |  ------------------
  |  |  |  |17426|      1|#define DIVZERO_rem janet_panic("division by zero")
  |  |  ------------------
  ------------------
  |  Branch (17436:11): [True: 1, False: 214]
  ------------------
17437|    215|      *box oper##= value; \
17438|    214|    } \
17439|    206|    return janet_wrap_abstract(box); \
  ------------------
  |  |  846|    205|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|    205|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    205|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    205|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17440|    206|} \
janet.c:cfun_it_u64_remi:
17443|     17|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name##i(int32_t argc, Janet *argv) { \
17444|     17|    janet_fixarity(argc, 2);                       \
17445|     17|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17446|     17|    *box = janet_unwrap_##type(argv[1]); \
17447|     17|    T value = janet_unwrap_##type(argv[0]); \
17448|     17|    if (value == 0) DIVZERO(name); \
  ------------------
  |  |17424|      1|#define DIVZERO(name) DIVZERO_##name
  |  |  ------------------
  |  |  |  |17426|      1|#define DIVZERO_rem janet_panic("division by zero")
  |  |  ------------------
  ------------------
  |  Branch (17448:9): [True: 1, False: 16]
  ------------------
17449|     17|    *box oper##= value; \
17450|     16|    return janet_wrap_abstract(box); \
  ------------------
  |  |  846|     16|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|     16|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     16|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     16|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17451|     17|} \
janet.c:cfun_it_u64_and:
17396|     14|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17397|     14|    janet_arity(argc, 2, -1); \
17398|     14|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17399|     14|    *box = janet_unwrap_##type(argv[0]); \
17400|     41|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17400:25): [True: 27, False: 14]
  ------------------
17401|     14|        /* This avoids undefined behavior. See above for why. */ \
17402|     27|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17403|     14|    return janet_wrap_abstract(box); \
  ------------------
  |  |  846|     14|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|     14|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     14|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     14|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17404|     14|} \
janet.c:cfun_it_u64_or:
17396|    105|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17397|    105|    janet_arity(argc, 2, -1); \
17398|    105|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17399|    105|    *box = janet_unwrap_##type(argv[0]); \
17400|    210|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17400:25): [True: 105, False: 105]
  ------------------
17401|    105|        /* This avoids undefined behavior. See above for why. */ \
17402|    105|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17403|    105|    return janet_wrap_abstract(box); \
  ------------------
  |  |  846|    105|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|    105|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    105|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    105|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17404|    105|} \
janet.c:cfun_it_u64_xor:
17396|  1.50k|static JANET_CFUNCTION_ALIGN Janet cfun_it_##type##_##name(int32_t argc, Janet *argv) { \
17397|  1.50k|    janet_arity(argc, 2, -1); \
17398|  1.50k|    T *box = janet_abstract(&janet_##type##_type, sizeof(T)); \
17399|  1.50k|    *box = janet_unwrap_##type(argv[0]); \
17400|  6.03k|    for (int32_t i = 1; i < argc; i++) \
  ------------------
  |  Branch (17400:25): [True: 4.52k, False: 1.50k]
  ------------------
17401|  1.50k|        /* This avoids undefined behavior. See above for why. */ \
17402|  4.52k|        *box = (T) ((uint64_t) (*box)) oper ((uint64_t) janet_unwrap_##type(argv[i])); \
17403|  1.50k|    return janet_wrap_abstract(box); \
  ------------------
  |  |  846|  1.50k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|  1.50k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.50k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.50k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
17404|  1.50k|} \
janet.c:it_s64_get:
17631|  9.57k|static int it_s64_get(void *p, Janet key, Janet *out) {
17632|  9.57k|    (void) p;
17633|  9.57k|    if (!janet_checktype(key, JANET_KEYWORD))
  ------------------
  |  |  801|  9.57k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 9.57k]
  |  |  ------------------
  |  |  802|  9.57k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  9.57k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  9.57k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  9.57k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  9.57k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  9.57k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (17633:9): [True: 4, False: 9.57k]
  ------------------
17634|      4|        return 0;
17635|  9.57k|    return janet_getmethod(janet_unwrap_keyword(key), it_s64_methods, out);
  ------------------
  |  |  860|  9.57k|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
17636|  9.57k|}
janet.c:it_u64_get:
17638|  3.91k|static int it_u64_get(void *p, Janet key, Janet *out) {
17639|  3.91k|    (void) p;
17640|  3.91k|    if (!janet_checktype(key, JANET_KEYWORD))
  ------------------
  |  |  801|  3.91k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 3.91k]
  |  |  ------------------
  |  |  802|  3.91k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  3.91k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  3.91k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  3.91k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  3.91k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  3.91k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (17640:9): [True: 10, False: 3.90k]
  ------------------
17641|     10|        return 0;
17642|  3.90k|    return janet_getmethod(janet_unwrap_keyword(key), it_u64_methods, out);
  ------------------
  |  |  860|  3.90k|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
17643|  3.91k|}
janet.c:checkflags:
17731|      5|static int32_t checkflags(const uint8_t *str) {
17732|      5|    int32_t flags = 0;
17733|      5|    int32_t i;
17734|      5|    int32_t len = janet_string_length(str);
  ------------------
  |  | 1803|      5|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|      5|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
17735|      5|    if (!len || len > 10)
  ------------------
  |  Branch (17735:9): [True: 0, False: 5]
  |  Branch (17735:17): [True: 1, False: 4]
  ------------------
17736|      1|        janet_panic("file mode must have a length between 1 and 10");
17737|      4|    switch (*str) {
17738|      0|        default:
  ------------------
  |  Branch (17738:9): [True: 0, False: 4]
  ------------------
17739|      0|            janet_panicf("invalid flag %c, expected w, a, or r", *str);
17740|      0|            break;
17741|      3|        case 'w':
  ------------------
  |  Branch (17741:9): [True: 3, False: 1]
  ------------------
17742|      3|            flags |= JANET_FILE_WRITE;
  ------------------
  |  | 2261|      3|#define JANET_FILE_WRITE 1
  ------------------
17743|      3|            janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2018|      3|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
17744|      3|            break;
17745|      0|        case 'a':
  ------------------
  |  Branch (17745:9): [True: 0, False: 4]
  ------------------
17746|      0|            flags |= JANET_FILE_APPEND;
  ------------------
  |  | 2263|      0|#define JANET_FILE_APPEND 4
  ------------------
17747|      0|            janet_sandbox_assert(JANET_SANDBOX_FS);
  ------------------
  |  | 2029|      0|#define JANET_SANDBOX_FS (JANET_SANDBOX_FS_WRITE | JANET_SANDBOX_FS_READ | JANET_SANDBOX_FS_TEMP)
  |  |  ------------------
  |  |  |  | 2018|      0|#define JANET_SANDBOX_FS_WRITE 32
  |  |  ------------------
  |  |               #define JANET_SANDBOX_FS (JANET_SANDBOX_FS_WRITE | JANET_SANDBOX_FS_READ | JANET_SANDBOX_FS_TEMP)
  |  |  ------------------
  |  |  |  | 2019|      0|#define JANET_SANDBOX_FS_READ 64
  |  |  ------------------
  |  |               #define JANET_SANDBOX_FS (JANET_SANDBOX_FS_WRITE | JANET_SANDBOX_FS_READ | JANET_SANDBOX_FS_TEMP)
  |  |  ------------------
  |  |  |  | 2023|      0|#define JANET_SANDBOX_FS_TEMP 1024
  |  |  ------------------
  ------------------
17748|      0|            break;
17749|      1|        case 'r':
  ------------------
  |  Branch (17749:9): [True: 1, False: 3]
  ------------------
17750|      1|            flags |= JANET_FILE_READ;
  ------------------
  |  | 2262|      1|#define JANET_FILE_READ 2
  ------------------
17751|      1|            janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2019|      1|#define JANET_SANDBOX_FS_READ 64
  ------------------
17752|      1|            break;
17753|      4|    }
17754|      8|    for (i = 1; i < len; i++) {
  ------------------
  |  Branch (17754:17): [True: 6, False: 2]
  ------------------
17755|      6|        switch (str[i]) {
17756|      1|            default:
  ------------------
  |  Branch (17756:13): [True: 1, False: 5]
  ------------------
17757|      1|                janet_panicf("invalid flag %c, expected +, b, or n", str[i]);
17758|      0|                break;
17759|      0|            case '+':
  ------------------
  |  Branch (17759:13): [True: 0, False: 6]
  ------------------
17760|      0|                if (flags & JANET_FILE_UPDATE) return -1;
  ------------------
  |  | 2264|      0|#define JANET_FILE_UPDATE 8
  ------------------
  |  Branch (17760:21): [True: 0, False: 0]
  ------------------
17761|      0|                janet_sandbox_assert(JANET_SANDBOX_FS_WRITE);
  ------------------
  |  | 2018|      0|#define JANET_SANDBOX_FS_WRITE 32
  ------------------
17762|      0|                flags |= JANET_FILE_UPDATE;
  ------------------
  |  | 2264|      0|#define JANET_FILE_UPDATE 8
  ------------------
17763|      0|                break;
17764|      2|            case 'b':
  ------------------
  |  Branch (17764:13): [True: 2, False: 4]
  ------------------
17765|      2|                if (flags & JANET_FILE_BINARY) return -1;
  ------------------
  |  | 2267|      2|#define JANET_FILE_BINARY 64
  ------------------
  |  Branch (17765:21): [True: 0, False: 2]
  ------------------
17766|      2|                flags |= JANET_FILE_BINARY;
  ------------------
  |  | 2267|      2|#define JANET_FILE_BINARY 64
  ------------------
17767|      2|                break;
17768|      3|            case 'n':
  ------------------
  |  Branch (17768:13): [True: 3, False: 3]
  ------------------
17769|      3|                if (flags & JANET_FILE_NONIL) return -1;
  ------------------
  |  | 2269|      3|#define JANET_FILE_NONIL 512
  ------------------
  |  Branch (17769:21): [True: 1, False: 2]
  ------------------
17770|      2|                flags |= JANET_FILE_NONIL;
  ------------------
  |  | 2269|      2|#define JANET_FILE_NONIL 512
  ------------------
17771|      2|                break;
17772|      6|        }
17773|      6|    }
17774|      2|    return flags;
17775|      4|}
janet.c:makef:
17777|  21.4k|static void *makef(FILE *f, int32_t flags, size_t bufsize) {
17778|  21.4k|    JanetFile *iof = (JanetFile *) janet_abstract(&janet_file_type, sizeof(JanetFile));
17779|  21.4k|    iof->file = f;
17780|  21.4k|    iof->flags = flags;
17781|  21.4k|    iof->vbufsize = bufsize;
17782|  21.4k|#if !(defined(JANET_WINDOWS) || defined(JANET_PLAN9))
17783|       |    /* While we would like fopen to set cloexec by default (like O_CLOEXEC) with the e flag, that is
17784|       |     * not standard. */
17785|  21.4k|    if (!(flags & JANET_FILE_NOT_CLOSEABLE))
  ------------------
  |  | 2265|  21.4k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
  |  Branch (17785:9): [True: 3, False: 21.4k]
  ------------------
17786|      3|        fcntl(fileno(f), F_SETFD, FD_CLOEXEC);
17787|  21.4k|#endif
17788|  21.4k|    return iof;
17789|  21.4k|}
janet.c:cfun_io_gc:
17980|  22.5k|static int cfun_io_gc(void *p, size_t len) {
17981|  22.5k|    (void) len;
17982|  22.5k|    JanetFile *iof = (JanetFile *)p;
17983|  22.5k|    janet_file_close(iof);
17984|  22.5k|    return 0;
17985|  22.5k|}
janet.c:io_file_get:
18064|      7|static int io_file_get(void *p, Janet key, Janet *out) {
18065|      7|    (void) p;
18066|      7|    if (!janet_checktype(key, JANET_KEYWORD))
  ------------------
  |  |  801|      7|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 7]
  |  |  ------------------
  |  |  802|      7|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      7|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      7|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      7|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      7|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      7|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (18066:9): [True: 0, False: 7]
  ------------------
18067|      0|        return 0;
18068|      7|    return janet_getmethod(janet_unwrap_keyword(key), io_file_methods, out);
  ------------------
  |  |  860|      7|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
18069|      7|}
janet.c:io_file_marshal:
18076|  1.02k|static void io_file_marshal(void *p, JanetMarshalContext *ctx) {
18077|  1.02k|    JanetFile *iof = (JanetFile *)p;
18078|  1.02k|    if (janet_marshal_flags(ctx) & JANET_MARSHAL_UNSAFE) {
  ------------------
  |  | 1901|  1.02k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (18078:9): [True: 1.02k, False: 0]
  ------------------
18079|  1.02k|        janet_marshal_abstract(ctx, p);
18080|  1.02k|        int fno = -1;
18081|       |#ifdef JANET_WINDOWS
18082|       |        if (iof->flags & JANET_FILE_NOT_CLOSEABLE) {
18083|       |            fno = _fileno(iof->file);
18084|       |        } else {
18085|       |            fno = _dup(_fileno(iof->file));
18086|       |        }
18087|       |#else
18088|  1.02k|        if (iof->flags & JANET_FILE_NOT_CLOSEABLE) {
  ------------------
  |  | 2265|  1.02k|#define JANET_FILE_NOT_CLOSEABLE 16
  ------------------
  |  Branch (18088:13): [True: 1.02k, False: 0]
  ------------------
18089|  1.02k|            fno = fileno(iof->file);
18090|  1.02k|        } else {
18091|       |#ifdef JANET_PLAN9
18092|       |            fno = dup(fileno(iof->file), -1);
18093|       |#else
18094|      0|            fno = dup(fileno(iof->file));
18095|      0|#endif
18096|      0|        }
18097|  1.02k|#endif
18098|  1.02k|        janet_marshal_int(ctx, fno);
18099|  1.02k|        janet_marshal_int(ctx, iof->flags);
18100|  1.02k|        janet_marshal_size(ctx, iof->vbufsize);
18101|  1.02k|    } else {
18102|      0|        janet_panic("cannot marshal file in safe mode");
18103|      0|    }
18104|  1.02k|}
janet.c:io_file_unmarshal:
18106|  1.02k|static void *io_file_unmarshal(JanetMarshalContext *ctx) {
18107|  1.02k|    if (janet_unmarshal_flags(ctx) & JANET_MARSHAL_UNSAFE) {
  ------------------
  |  | 1901|  1.02k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (18107:9): [True: 1.02k, False: 0]
  ------------------
18108|  1.02k|        JanetFile *iof = janet_unmarshal_abstract(ctx, sizeof(JanetFile));
18109|  1.02k|        int32_t fd = janet_unmarshal_int(ctx);
18110|  1.02k|        int32_t flags = janet_unmarshal_int(ctx);
18111|  1.02k|        char fmt[4] = {0};
18112|  1.02k|        int index = 0;
18113|  1.02k|        if (flags & JANET_FILE_READ) fmt[index++] = 'r';
  ------------------
  |  | 2262|  1.02k|#define JANET_FILE_READ 2
  ------------------
  |  Branch (18113:13): [True: 342, False: 684]
  ------------------
18114|  1.02k|        if (flags & JANET_FILE_APPEND) {
  ------------------
  |  | 2263|  1.02k|#define JANET_FILE_APPEND 4
  ------------------
  |  Branch (18114:13): [True: 684, False: 342]
  ------------------
18115|    684|            fmt[index++] = 'a';
18116|    684|        } else if (flags & JANET_FILE_WRITE) {
  ------------------
  |  | 2261|    342|#define JANET_FILE_WRITE 1
  ------------------
  |  Branch (18116:20): [True: 0, False: 342]
  ------------------
18117|      0|            fmt[index++] = 'w';
18118|      0|        }
18119|       |#ifdef JANET_WINDOWS
18120|       |        iof->file = _fdopen(fd, fmt);
18121|       |#else
18122|  1.02k|        iof->file = fdopen(fd, fmt);
18123|  1.02k|#endif
18124|  1.02k|        if (iof->file == NULL) {
  ------------------
  |  Branch (18124:13): [True: 0, False: 1.02k]
  ------------------
18125|      0|            iof->flags = JANET_FILE_CLOSED;
  ------------------
  |  | 2266|      0|#define JANET_FILE_CLOSED 32
  ------------------
18126|  1.02k|        } else {
18127|  1.02k|            iof->flags = flags;
18128|  1.02k|        }
18129|  1.02k|        iof->vbufsize = janet_unmarshal_size(ctx);
18130|  1.02k|        if (iof->vbufsize != BUFSIZ) {
  ------------------
  |  Branch (18130:13): [True: 0, False: 1.02k]
  ------------------
18131|      0|            int result = setvbuf(iof->file, NULL, iof->vbufsize ? _IOFBF : _IONBF, iof->vbufsize);
  ------------------
  |  Branch (18131:51): [True: 0, False: 0]
  ------------------
18132|      0|            janet_assert(!result, "unmarshal setvbuf");
  ------------------
  |  |  386|      0|#define janet_assert(c, m) do { \
  |  |  387|      0|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  388|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
18133|      0|        }
18134|  1.02k|        return iof;
18135|  1.02k|    } else {
18136|      0|        janet_panic("cannot unmarshal file in safe mode");
18137|      0|    }
18138|  1.02k|}
janet.c:cfun_io_print_impl:
18219|  1.73k|                                int newline, const char *name, FILE *dflt_file) {
18220|  1.73k|    Janet x = janet_dyn(name);
18221|  1.73k|    return cfun_io_print_impl_x(argc, argv, newline, dflt_file, 0, x);
18222|  1.73k|}
janet.c:cfun_io_print_impl_x:
18150|  1.75k|                                  FILE *dflt_file, int32_t offset, Janet x) {
18151|  1.75k|    FILE *f;
18152|  1.75k|    switch (janet_type(x)) {
  ------------------
  |  |  790|  1.75k|    (isnan((x).number) \
  |  |  791|  1.75k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  1.75k|        : JANET_NUMBER)
  ------------------
  |  Branch (18152:13): [True: 1.75k, False: 0]
  ------------------
18153|      1|        default:
  ------------------
  |  Branch (18153:9): [True: 1, False: 1.75k]
  ------------------
18154|      1|            janet_panicf("cannot print to %v", x);
18155|      0|        case JANET_BUFFER: {
  ------------------
  |  Branch (18155:9): [True: 0, False: 1.75k]
  ------------------
18156|       |            /* Special case buffer */
18157|      0|            JanetBuffer *buf = janet_unwrap_buffer(x);
  ------------------
  |  |  857|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
18158|      0|            for (int32_t i = offset; i < argc; ++i) {
  ------------------
  |  Branch (18158:38): [True: 0, False: 0]
  ------------------
18159|      0|                janet_to_string_b(buf, argv[i]);
18160|      0|            }
18161|      0|            if (newline)
  ------------------
  |  Branch (18161:17): [True: 0, False: 0]
  ------------------
18162|      0|                janet_buffer_push_u8(buf, '\n');
18163|      0|            return janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18164|      0|        }
18165|     23|        case JANET_FUNCTION: {
  ------------------
  |  Branch (18165:9): [True: 23, False: 1.73k]
  ------------------
18166|       |            /* Special case function */
18167|     23|            JanetFunction *fun = janet_unwrap_function(x);
  ------------------
  |  |  863|     23|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
18168|     23|            JanetBuffer *buf = janet_buffer(0);
18169|  65.9k|            for (int32_t i = offset; i < argc; ++i) {
  ------------------
  |  Branch (18169:38): [True: 65.8k, False: 23]
  ------------------
18170|  65.8k|                janet_to_string_b(buf, argv[i]);
18171|  65.8k|            }
18172|     23|            if (newline)
  ------------------
  |  Branch (18172:17): [True: 2, False: 21]
  ------------------
18173|      2|                janet_buffer_push_u8(buf, '\n');
18174|     23|            Janet args[1] = { janet_wrap_buffer(buf) };
  ------------------
  |  |  842|     23|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  820|     23|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     23|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     23|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18175|     23|            janet_call(fun, 1, args);
18176|     23|            return janet_wrap_nil();
  ------------------
  |  |  826|     23|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|     23|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     23|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     23|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18177|      0|        }
18178|  1.73k|        case JANET_NIL:
  ------------------
  |  Branch (18178:9): [True: 1.73k, False: 24]
  ------------------
18179|  1.73k|            f = dflt_file;
18180|  1.73k|            if (f == NULL) janet_panic("cannot print to nil");
  ------------------
  |  Branch (18180:17): [True: 0, False: 1.73k]
  ------------------
18181|  1.73k|            break;
18182|  1.73k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (18182:9): [True: 0, False: 1.75k]
  ------------------
18183|      0|            void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  861|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18184|      0|            if (janet_abstract_type(abstract) != &janet_file_type)
  ------------------
  |  | 1889|      0|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (18184:17): [True: 0, False: 0]
  ------------------
18185|      0|                return janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18186|      0|            JanetFile *iofile = abstract;
18187|      0|            io_assert_writeable(iofile);
18188|      0|            f = iofile->file;
18189|      0|            break;
18190|      0|        }
18191|  1.75k|    }
18192|  6.90k|    for (int32_t i = offset; i < argc; ++i) {
  ------------------
  |  Branch (18192:30): [True: 5.17k, False: 1.73k]
  ------------------
18193|  5.17k|        int32_t len;
18194|  5.17k|        const uint8_t *vstr;
18195|  5.17k|        if (janet_checktype(argv[i], JANET_BUFFER)) {
  ------------------
  |  |  801|  5.17k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 81, False: 5.09k]
  |  |  |  Branch (801:6): [Folded, False: 5.17k]
  |  |  ------------------
  |  |  802|  5.17k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  5.17k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  5.17k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  5.17k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  5.17k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  5.17k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18196|     81|            JanetBuffer *b = janet_unwrap_buffer(argv[i]);
  ------------------
  |  |  857|     81|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
18197|     81|            vstr = b->data;
18198|     81|            len = b->count;
18199|  5.09k|        } else {
18200|  5.09k|            vstr = janet_to_string(argv[i]);
18201|  5.09k|            len = janet_string_length(vstr);
  ------------------
  |  | 1803|  5.09k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|  5.09k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
18202|  5.09k|        }
18203|  5.17k|        if (len) {
  ------------------
  |  Branch (18203:13): [True: 4.50k, False: 667]
  ------------------
18204|  4.50k|            if (1 != fwrite(vstr, len, 1, f)) {
  ------------------
  |  Branch (18204:17): [True: 0, False: 4.50k]
  ------------------
18205|      0|                if (f == dflt_file) {
  ------------------
  |  Branch (18205:21): [True: 0, False: 0]
  ------------------
18206|      0|                    janet_panicf("cannot print %d bytes", len);
18207|      0|                } else {
18208|      0|                    janet_panicf("cannot print %d bytes to %v", len, x);
18209|      0|                }
18210|      0|            }
18211|  4.50k|        }
18212|  5.17k|    }
18213|  1.73k|    if (newline)
  ------------------
  |  Branch (18213:9): [True: 1.71k, False: 23]
  ------------------
18214|  1.71k|        putc('\n', f);
18215|  1.73k|    return janet_wrap_nil();
  ------------------
  |  |  826|  1.73k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  1.73k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.73k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.73k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18216|  1.73k|}
janet.c:cfun_io_printf_impl:
18327|    175|                                 const char *name, FILE *dflt_file) {
18328|    175|    janet_arity(argc, 1, -1);
18329|    175|    Janet x = janet_dyn(name);
18330|    175|    return cfun_io_printf_impl_x(argc, argv, newline, dflt_file, 0, x);
18331|       |
18332|    175|}
janet.c:cfun_io_printf_impl_x:
18270|    178|                                   FILE *dflt_file, int32_t offset, Janet x) {
18271|    178|    FILE *f;
18272|    178|    const char *fmt = janet_getcstring(argv, offset);
18273|    178|    switch (janet_type(x)) {
  ------------------
  |  |  790|    178|    (isnan((x).number) \
  |  |  791|    178|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|    178|        : JANET_NUMBER)
  ------------------
  |  Branch (18273:13): [True: 173, False: 5]
  ------------------
18274|      2|        default:
  ------------------
  |  Branch (18274:9): [True: 2, False: 176]
  ------------------
18275|      2|            janet_panicf("cannot print to %v", x);
18276|      0|        case JANET_BUFFER: {
  ------------------
  |  Branch (18276:9): [True: 0, False: 178]
  ------------------
18277|       |            /* Special case buffer */
18278|      0|            JanetBuffer *buf = janet_unwrap_buffer(x);
  ------------------
  |  |  857|      0|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
18279|      0|            janet_buffer_format(buf, fmt, offset, argc, argv);
18280|      0|            if (newline) janet_buffer_push_u8(buf, '\n');
  ------------------
  |  Branch (18280:17): [True: 0, False: 0]
  ------------------
18281|      0|            return janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18282|      0|        }
18283|      1|        case JANET_FUNCTION: {
  ------------------
  |  Branch (18283:9): [True: 1, False: 177]
  ------------------
18284|       |            /* Special case function */
18285|      1|            JanetFunction *fun = janet_unwrap_function(x);
  ------------------
  |  |  863|      1|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
18286|      1|            JanetBuffer *buf = janet_buffer(0);
18287|      1|            janet_buffer_format(buf, fmt, offset, argc, argv);
18288|      1|            if (newline) janet_buffer_push_u8(buf, '\n');
  ------------------
  |  Branch (18288:17): [True: 0, False: 1]
  ------------------
18289|      1|            Janet args[1] = { janet_wrap_buffer(buf) };
  ------------------
  |  |  842|      1|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  820|      1|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18290|      1|            janet_call(fun, 1, args);
18291|      1|            return janet_wrap_nil();
  ------------------
  |  |  826|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18292|      0|        }
18293|    171|        case JANET_NIL:
  ------------------
  |  Branch (18293:9): [True: 171, False: 7]
  ------------------
18294|    171|            f = dflt_file;
18295|    171|            if (f == NULL) janet_panic("cannot print to nil");
  ------------------
  |  Branch (18295:17): [True: 0, False: 171]
  ------------------
18296|    171|            break;
18297|    171|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (18297:9): [True: 0, False: 178]
  ------------------
18298|      0|            void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  861|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18299|      0|            if (janet_abstract_type(abstract) != &janet_file_type)
  ------------------
  |  | 1889|      0|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (18299:17): [True: 0, False: 0]
  ------------------
18300|      0|                return janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18301|      0|            JanetFile *iofile = abstract;
18302|      0|            if (iofile->flags & JANET_FILE_CLOSED) {
  ------------------
  |  | 2266|      0|#define JANET_FILE_CLOSED 32
  ------------------
  |  Branch (18302:17): [True: 0, False: 0]
  ------------------
18303|      0|                janet_panic("cannot print to closed file");
18304|      0|            }
18305|      0|            io_assert_writeable(iofile);
18306|      0|            f = iofile->file;
18307|      0|            break;
18308|      0|        }
18309|    178|    }
18310|    171|    JanetBuffer *buf = janet_buffer(10);
18311|    171|    janet_buffer_format(buf, fmt, offset, argc, argv);
18312|    171|    if (newline) janet_buffer_push_u8(buf, '\n');
  ------------------
  |  Branch (18312:9): [True: 2, False: 169]
  ------------------
18313|    171|    if (buf->count) {
  ------------------
  |  Branch (18313:9): [True: 90, False: 81]
  ------------------
18314|     90|        if (1 != fwrite(buf->data, buf->count, 1, f)) {
  ------------------
  |  Branch (18314:13): [True: 0, False: 90]
  ------------------
18315|      0|            janet_panicf("could not print %d bytes to file", buf->count);
18316|      0|        }
18317|     90|    }
18318|       |    /* Clear buffer to make things easier for GC */
18319|    171|    buf->count = 0;
18320|    171|    buf->capacity = 0;
18321|    171|    janet_free(buf->data);
  ------------------
  |  | 2402|    171|#define janet_free(X) free((X))
  ------------------
18322|    171|    buf->data = NULL;
18323|    171|    return janet_wrap_nil();
  ------------------
  |  |  826|    171|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|    171|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    171|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    171|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18324|    171|}
janet.c:janet_flusher:
18372|      2|static void janet_flusher(const char *name, FILE *dflt_file) {
18373|      2|    Janet x = janet_dyn(name);
18374|      2|    switch (janet_type(x)) {
  ------------------
  |  |  790|      2|    (isnan((x).number) \
  |  |  791|      2|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|      2|        : JANET_NUMBER)
  ------------------
  |  Branch (18374:13): [True: 2, False: 0]
  ------------------
18375|      0|        default:
  ------------------
  |  Branch (18375:9): [True: 0, False: 2]
  ------------------
18376|      0|            break;
18377|      2|        case JANET_NIL:
  ------------------
  |  Branch (18377:9): [True: 2, False: 0]
  ------------------
18378|      2|            fflush(dflt_file);
18379|      2|            break;
18380|      0|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (18380:9): [True: 0, False: 2]
  ------------------
18381|      0|            void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  861|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18382|      0|            if (janet_abstract_type(abstract) != &janet_file_type) break;
  ------------------
  |  | 1889|      0|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|      0|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (18382:17): [True: 0, False: 0]
  ------------------
18383|      0|            JanetFile *iofile = abstract;
18384|      0|            fflush(iofile->file);
18385|      0|            break;
18386|      0|        }
18387|      2|    }
18388|      2|}
janet.c:push64:
18710|  1.04k|static void push64(MarshalState *st, uint64_t x) {
18711|  1.04k|    if (x <= 0xF0) {
  ------------------
  |  Branch (18711:9): [True: 10, False: 1.03k]
  ------------------
18712|       |        /* Single byte */
18713|     10|        pushbyte(st, (uint8_t) x);
18714|  1.03k|    } else {
18715|       |        /* Multibyte, little endian */
18716|  1.03k|        uint8_t bytes[9];
18717|  1.03k|        int nbytes = 0;
18718|  3.10k|        while (x) {
  ------------------
  |  Branch (18718:16): [True: 2.07k, False: 1.03k]
  ------------------
18719|  2.07k|            bytes[++nbytes] = x & 0xFF;
18720|  2.07k|            x >>= 8;
18721|  2.07k|        }
18722|  1.03k|        bytes[0] = 0xF0 + nbytes;
18723|  1.03k|        pushbytes(st, bytes, nbytes + 1);
18724|  1.03k|    }
18725|  1.04k|}
janet.c:pushint:
18678|  28.7M|static void pushint(MarshalState *st, int32_t x) {
18679|  28.7M|    if (x >= 0 && x < 128) {
  ------------------
  |  Branch (18679:9): [True: 27.6M, False: 1.14M]
  |  Branch (18679:19): [True: 22.6M, False: 5.02M]
  ------------------
18680|  22.6M|        janet_buffer_push_u8(st->buf, x);
18681|  22.6M|    } else if (x <= 8191 && x >= -8192) {
  ------------------
  |  Branch (18681:16): [True: 5.31M, False: 849k]
  |  Branch (18681:29): [True: 5.31M, False: 403]
  ------------------
18682|  5.31M|        uint8_t intbuf[2];
18683|  5.31M|        intbuf[0] = ((x >> 8) & 0x3F) | 0x80;
18684|  5.31M|        intbuf[1] = x & 0xFF;
18685|  5.31M|        janet_buffer_push_bytes(st->buf, intbuf, 2);
18686|  5.31M|    } else {
18687|   849k|        uint8_t intbuf[5];
18688|   849k|        intbuf[0] = LB_INTEGER;
18689|   849k|        intbuf[1] = (x >> 24) & 0xFF;
18690|   849k|        intbuf[2] = (x >> 16) & 0xFF;
18691|   849k|        intbuf[3] = (x >> 8) & 0xFF;
18692|   849k|        intbuf[4] = x & 0xFF;
18693|   849k|        janet_buffer_push_bytes(st->buf, intbuf, 5);
18694|   849k|    }
18695|  28.7M|}
janet.c:pushpointer:
18705|  4.41k|static void pushpointer(MarshalState *st, const void *ptr) {
18706|  4.41k|    janet_buffer_push_bytes(st->buf, (const uint8_t *) &ptr, sizeof(ptr));
18707|  4.41k|}
janet.c:pushbyte:
18697|  30.4M|static void pushbyte(MarshalState *st, uint8_t b) {
18698|  30.4M|    janet_buffer_push_u8(st->buf, b);
18699|  30.4M|}
janet.c:pushbytes:
18701|  1.81M|static void pushbytes(MarshalState *st, const uint8_t *bytes, int32_t len) {
18702|  1.81M|    janet_buffer_push_bytes(st->buf, bytes, len);
18703|  1.81M|}
janet.c:marshal_one:
19011|  7.69M|static void marshal_one(MarshalState *st, Janet x, int flags) {
19012|  7.69M|    MARSH_STACKCHECK;
  ------------------
  |  |18734|  7.69M|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  291|  7.69M|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (18734:30): [True: 0, False: 7.69M]
  |  |  ------------------
  ------------------
19013|  7.69M|    JanetType type = janet_type(x);
  ------------------
  |  |  790|  7.69M|    (isnan((x).number) \
  |  |  791|  7.69M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  7.69M|        : JANET_NUMBER)
  ------------------
  |  Branch (19013:22): [True: 7.21M, False: 475k]
  ------------------
19014|       |
19015|       |    /* Check simple primitives (non reference types, no benefit from memoization) */
19016|  7.69M|    switch (type) {
19017|  7.01M|        default:
  ------------------
  |  Branch (19017:9): [True: 7.01M, False: 677k]
  ------------------
19018|  7.01M|            break;
19019|  7.01M|        case JANET_NIL:
  ------------------
  |  Branch (19019:9): [True: 157k, False: 7.53M]
  ------------------
19020|   157k|            pushbyte(st, LB_NIL);
19021|   157k|            return;
19022|  45.1k|        case JANET_BOOLEAN:
  ------------------
  |  Branch (19022:9): [True: 45.1k, False: 7.64M]
  ------------------
19023|  45.1k|            pushbyte(st, janet_unwrap_boolean(x) ? LB_TRUE : LB_FALSE);
  ------------------
  |  |  833|  45.1k|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  |  |  ------------------
  |  |  |  Branch (833:33): [True: 45.1k, False: 11]
  |  |  ------------------
  ------------------
19024|  45.1k|            return;
19025|   476k|        case JANET_NUMBER: {
  ------------------
  |  Branch (19025:9): [True: 476k, False: 7.21M]
  ------------------
19026|   476k|            double xval = janet_unwrap_number(x);
  ------------------
  |  |  834|   476k|#define janet_unwrap_number(x) ((x).number)
  ------------------
19027|   476k|            if (janet_checkintrange(xval)) {
  ------------------
  |  |  953|   476k|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  ------------------
  |  |  |  Branch (953:33): [True: 475k, False: 1.03k]
  |  |  |  Branch (953:53): [True: 473k, False: 1.40k]
  |  |  |  Branch (953:73): [True: 473k, False: 691]
  |  |  ------------------
  ------------------
19028|   473k|                pushint(st, (int32_t) xval);
19029|   473k|                return;
19030|   473k|            }
19031|  3.12k|            break;
19032|   476k|        }
19033|  7.69M|    }
19034|       |
19035|       |    /* Check reference and registry value */
19036|  7.01M|    {
19037|  7.01M|        Janet check;
19038|  7.01M|        if (st->maybe_cycles) {
  ------------------
  |  Branch (19038:13): [True: 7.01M, False: 43]
  ------------------
19039|  7.01M|            check = janet_table_get(&st->seen, x);
19040|  7.01M|            if (janet_checkint(check)) {
  ------------------
  |  Branch (19040:17): [True: 4.54M, False: 2.47M]
  ------------------
19041|  4.54M|                pushbyte(st, LB_REFERENCE);
19042|  4.54M|                pushint(st, janet_unwrap_integer(check));
  ------------------
  |  |  957|  4.54M|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  834|  4.54M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
19043|  4.54M|                return;
19044|  4.54M|            }
19045|  7.01M|        }
19046|  2.47M|        if (st->rreg) {
  ------------------
  |  Branch (19046:13): [True: 134, False: 2.47M]
  ------------------
19047|    134|            check = janet_table_get(st->rreg, x);
19048|    134|            if (janet_checktype(check, JANET_SYMBOL)) {
  ------------------
  |  |  801|    134|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 134]
  |  |  |  Branch (801:6): [Folded, False: 134]
  |  |  ------------------
  |  |  802|    134|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|    134|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|    134|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|    134|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    134|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    134|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19049|      0|                MARK_SEEN();
  ------------------
  |  |18966|      0|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18966:14): [True: 0, False: 0]
  |  |  ------------------
  |  |18967|      0|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  958|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18968|      0|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18968:16): [Folded, False: 0]
  |  |  ------------------
  ------------------
19050|      0|                const uint8_t *regname = janet_unwrap_symbol(check);
  ------------------
  |  |  859|      0|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
19051|      0|                pushbyte(st, LB_REGISTRY);
19052|      0|                pushint(st, janet_string_length(regname));
  ------------------
  |  | 1803|      0|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|      0|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
19053|      0|                pushbytes(st, regname, janet_string_length(regname));
  ------------------
  |  | 1803|      0|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|      0|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
19054|      0|                return;
19055|      0|            }
19056|    134|        }
19057|  2.47M|    }
19058|       |
19059|       |    /* Reference types */
19060|  2.47M|    switch (type) {
19061|  2.44k|        case JANET_NUMBER: {
  ------------------
  |  Branch (19061:9): [True: 2.44k, False: 2.47M]
  ------------------
19062|  2.44k|            union {
19063|  2.44k|                double d;
19064|  2.44k|                uint8_t bytes[8];
19065|  2.44k|            } u;
19066|  2.44k|            u.d = janet_unwrap_number(x);
  ------------------
  |  |  834|  2.44k|#define janet_unwrap_number(x) ((x).number)
  ------------------
19067|       |#ifdef JANET_BIG_ENDIAN
19068|       |            /* Swap byte order */
19069|       |            uint8_t temp;
19070|       |            temp = u.bytes[7];
19071|       |            u.bytes[7] = u.bytes[0];
19072|       |            u.bytes[0] = temp;
19073|       |            temp = u.bytes[6];
19074|       |            u.bytes[6] = u.bytes[1];
19075|       |            u.bytes[1] = temp;
19076|       |            temp = u.bytes[5];
19077|       |            u.bytes[5] = u.bytes[2];
19078|       |            u.bytes[2] = temp;
19079|       |            temp = u.bytes[4];
19080|       |            u.bytes[4] = u.bytes[3];
19081|       |            u.bytes[3] = temp;
19082|       |#endif
19083|  2.44k|            pushbyte(st, LB_REAL);
19084|  2.44k|            pushbytes(st, u.bytes, 8);
19085|  2.44k|            MARK_SEEN();
  ------------------
  |  |18966|  2.44k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18966:14): [True: 2.44k, False: 0]
  |  |  ------------------
  |  |18967|  2.44k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  958|  2.44k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|  2.44k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18968|  2.44k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18968:16): [Folded, False: 2.44k]
  |  |  ------------------
  ------------------
19086|  2.44k|            return;
19087|      0|        }
19088|   511k|        case JANET_STRING:
  ------------------
  |  Branch (19088:9): [True: 511k, False: 1.96M]
  ------------------
19089|  1.60M|        case JANET_SYMBOL:
  ------------------
  |  Branch (19089:9): [True: 1.09M, False: 1.38M]
  ------------------
19090|  1.68M|        case JANET_KEYWORD: {
  ------------------
  |  Branch (19090:9): [True: 81.0k, False: 2.39M]
  ------------------
19091|  1.68M|            const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  858|  1.68M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
19092|  1.68M|            int32_t length = janet_string_length(str);
  ------------------
  |  | 1803|  1.68M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|  1.68M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
19093|       |            /* Record reference */
19094|  1.68M|            MARK_SEEN();
  ------------------
  |  |18966|  1.68M|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18966:14): [True: 1.68M, False: 27]
  |  |  ------------------
  |  |18967|  1.68M|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  958|  1.68M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|  1.68M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18968|  1.68M|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18968:16): [Folded, False: 1.68M]
  |  |  ------------------
  ------------------
19095|  1.68M|            uint8_t lb = (type == JANET_STRING) ? LB_STRING :
  ------------------
  |  Branch (19095:26): [True: 511k, False: 1.17M]
  ------------------
19096|  1.68M|                         (type == JANET_SYMBOL) ? LB_SYMBOL :
  ------------------
  |  Branch (19096:26): [True: 1.09M, False: 81.1k]
  ------------------
19097|  1.17M|                         LB_KEYWORD;
19098|  1.68M|            pushbyte(st, lb);
19099|  1.68M|            pushint(st, length);
19100|  1.68M|            pushbytes(st, str, length);
19101|  1.68M|            return;
19102|  1.60M|        }
19103|  4.78k|        case JANET_BUFFER: {
  ------------------
  |  Branch (19103:9): [True: 4.78k, False: 2.47M]
  ------------------
19104|  4.78k|            JanetBuffer *buffer = janet_unwrap_buffer(x);
  ------------------
  |  |  857|  4.78k|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
19105|       |            /* Record reference */
19106|  4.78k|            MARK_SEEN();
  ------------------
  |  |18966|  4.78k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18966:14): [True: 4.78k, False: 0]
  |  |  ------------------
  |  |18967|  4.78k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  958|  4.78k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|  4.78k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18968|  4.78k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18968:16): [Folded, False: 4.78k]
  |  |  ------------------
  ------------------
19107|  4.78k|#ifdef JANET_EV
19108|  4.78k|            if ((flags & JANET_MARSHAL_UNSAFE) &&
  ------------------
  |  | 1901|  4.78k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (19108:17): [True: 344, False: 4.43k]
  ------------------
19109|    344|                    (buffer->gc.flags & JANET_BUFFER_FLAG_NO_REALLOC)) {
  ------------------
  |  | 1770|    344|#define JANET_BUFFER_FLAG_NO_REALLOC 0x10000
  ------------------
  |  Branch (19109:21): [True: 0, False: 344]
  ------------------
19110|      0|                pushbyte(st, LB_POINTER_BUFFER);
19111|      0|                pushint(st, buffer->count);
19112|      0|                pushint(st, buffer->capacity);
19113|      0|                pushpointer(st, buffer->data);
19114|      0|                return;
19115|      0|            }
19116|  4.78k|#endif
19117|  4.78k|            pushbyte(st, LB_BUFFER);
19118|  4.78k|            pushint(st, buffer->count);
19119|  4.78k|            pushbytes(st, buffer->data, buffer->count);
19120|  4.78k|            return;
19121|  4.78k|        }
19122|  1.03k|        case JANET_ARRAY: {
  ------------------
  |  Branch (19122:9): [True: 1.03k, False: 2.47M]
  ------------------
19123|  1.03k|            int32_t i;
19124|  1.03k|            JanetArray *a = janet_unwrap_array(x);
  ------------------
  |  |  855|  1.03k|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
19125|  1.03k|            MARK_SEEN();
  ------------------
  |  |18966|  1.03k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18966:14): [True: 1.03k, False: 0]
  |  |  ------------------
  |  |18967|  1.03k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  958|  1.03k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|  1.03k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18968|  1.03k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18968:16): [Folded, False: 1.03k]
  |  |  ------------------
  ------------------
19126|  1.03k|            enum JanetMemoryType memtype = janet_gc_type(a);
  ------------------
  |  |  629|  1.03k|#define janet_gc_type(m) (janet_gc_header(m)->flags & 0xFF)
  |  |  ------------------
  |  |  |  |  622|  1.03k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
19127|  1.03k|            pushbyte(st, memtype == JANET_MEMORY_ARRAY_WEAK ? LB_ARRAY_WEAK : LB_ARRAY);
  ------------------
  |  Branch (19127:26): [True: 0, False: 1.03k]
  ------------------
19128|  1.03k|            pushint(st, a->count);
19129|  8.91k|            for (i = 0; i < a->count; i++)
  ------------------
  |  Branch (19129:25): [True: 7.88k, False: 1.03k]
  ------------------
19130|  7.88k|                marshal_one(st, a->data[i], flags + 1);
19131|  1.03k|            return;
19132|  4.78k|        }
19133|   267k|        case JANET_TUPLE: {
  ------------------
  |  Branch (19133:9): [True: 267k, False: 2.20M]
  ------------------
19134|   267k|            int32_t i, count, flag;
19135|   267k|            const Janet *tup = janet_unwrap_tuple(x);
  ------------------
  |  |  853|   267k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
19136|   267k|            count = janet_tuple_length(tup);
  ------------------
  |  | 1792|   267k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|   267k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
19137|   267k|            flag = janet_tuple_flag(tup) >> 16;
  ------------------
  |  | 1796|   267k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1790|   267k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
19138|   267k|            pushbyte(st, LB_TUPLE);
19139|   267k|            pushint(st, count);
19140|   267k|            pushint(st, flag);
19141|  1.02M|            for (i = 0; i < count; i++)
  ------------------
  |  Branch (19141:25): [True: 761k, False: 267k]
  ------------------
19142|   761k|                marshal_one(st, tup[i], flags + 1);
19143|       |            /* Mark as seen AFTER marshaling */
19144|   267k|            MARK_SEEN();
  ------------------
  |  |18966|   267k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18966:14): [True: 267k, False: 3]
  |  |  ------------------
  |  |18967|   267k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  958|   267k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|   267k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18968|   267k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18968:16): [Folded, False: 267k]
  |  |  ------------------
  ------------------
19145|   267k|            return;
19146|  4.78k|        }
19147|   250k|        case JANET_TABLE: {
  ------------------
  |  Branch (19147:9): [True: 250k, False: 2.22M]
  ------------------
19148|   250k|            JanetTable *t = janet_unwrap_table(x);
  ------------------
  |  |  856|   250k|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
19149|   250k|            MARK_SEEN();
  ------------------
  |  |18966|   250k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18966:14): [True: 250k, False: 0]
  |  |  ------------------
  |  |18967|   250k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  958|   250k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|   250k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18968|   250k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18968:16): [Folded, False: 250k]
  |  |  ------------------
  ------------------
19150|   250k|            enum JanetMemoryType memtype = janet_gc_type(t);
  ------------------
  |  |  629|   250k|#define janet_gc_type(m) (janet_gc_header(m)->flags & 0xFF)
  |  |  ------------------
  |  |  |  |  622|   250k|#define janet_gc_header(mem) ((JanetGCObject *)(mem))
  |  |  ------------------
  ------------------
19151|   250k|            if (memtype == JANET_MEMORY_TABLE_WEAKK) {
  ------------------
  |  Branch (19151:17): [True: 0, False: 250k]
  ------------------
19152|      0|                pushbyte(st, t->proto ? LB_TABLE_WEAKK_PROTO : LB_TABLE_WEAKK);
  ------------------
  |  Branch (19152:30): [True: 0, False: 0]
  ------------------
19153|   250k|            } else if (memtype == JANET_MEMORY_TABLE_WEAKV) {
  ------------------
  |  Branch (19153:24): [True: 0, False: 250k]
  ------------------
19154|      0|                pushbyte(st, t->proto ? LB_TABLE_WEAKV_PROTO : LB_TABLE_WEAKV);
  ------------------
  |  Branch (19154:30): [True: 0, False: 0]
  ------------------
19155|   250k|            } else if (memtype == JANET_MEMORY_TABLE_WEAKKV) {
  ------------------
  |  Branch (19155:24): [True: 0, False: 250k]
  ------------------
19156|      0|                pushbyte(st, t->proto ? LB_TABLE_WEAKKV_PROTO : LB_TABLE_WEAKKV);
  ------------------
  |  Branch (19156:30): [True: 0, False: 0]
  ------------------
19157|   250k|            } else {
19158|   250k|                pushbyte(st, t->proto ? LB_TABLE_PROTO : LB_TABLE);
  ------------------
  |  Branch (19158:30): [True: 0, False: 250k]
  ------------------
19159|   250k|            }
19160|   250k|            pushint(st, t->count);
19161|   250k|            if (t->proto)
  ------------------
  |  Branch (19161:17): [True: 0, False: 250k]
  ------------------
19162|      0|                marshal_one(st, janet_wrap_table(t->proto), flags + 1);
  ------------------
  |  |  841|      0|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19163|  4.37M|            for (int32_t i = 0; i < t->capacity; i++) {
  ------------------
  |  Branch (19163:33): [True: 4.12M, False: 250k]
  ------------------
19164|  4.12M|                if (janet_checktype(t->data[i].key, JANET_NIL))
  ------------------
  |  |  801|  4.12M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 2.63M, False: 1.48M]
  |  |  |  Branch (801:6): [Folded, False: 4.12M]
  |  |  ------------------
  |  |  802|  4.12M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  4.12M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  4.12M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  4.12M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  4.12M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  4.12M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19165|  2.63M|                    continue;
19166|  1.48M|                marshal_one(st, t->data[i].key, flags + 1);
19167|  1.48M|                marshal_one(st, t->data[i].value, flags + 1);
19168|  1.48M|            }
19169|   250k|            return;
19170|  4.78k|        }
19171|  2.41k|        case JANET_STRUCT: {
  ------------------
  |  Branch (19171:9): [True: 2.41k, False: 2.47M]
  ------------------
19172|  2.41k|            int32_t count;
19173|  2.41k|            const JanetKV *struct_ = janet_unwrap_struct(x);
  ------------------
  |  |  852|  2.41k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
19174|  2.41k|            count = janet_struct_length(struct_);
  ------------------
  |  | 1838|  2.41k|#define janet_struct_length(t) (janet_struct_head(t)->length)
  |  |  ------------------
  |  |  |  | 1836|  2.41k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
19175|  2.41k|            pushbyte(st, janet_struct_proto(struct_) ? LB_STRUCT_PROTO : LB_STRUCT);
  ------------------
  |  | 1841|  2.41k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1836|  2.41k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1841:31): [True: 0, False: 2.41k]
  |  |  ------------------
  ------------------
19176|  2.41k|            pushint(st, count);
19177|  2.41k|            if (janet_struct_proto(struct_))
  ------------------
  |  | 1841|  2.41k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1836|  2.41k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  |  |  |  Branch (1841:31): [True: 0, False: 2.41k]
  |  |  ------------------
  ------------------
19178|      0|                marshal_one(st, janet_wrap_struct(janet_struct_proto(struct_)), flags + 1);
  ------------------
  |  |  837|      0|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19179|  43.8k|            for (int32_t i = 0; i < janet_struct_capacity(struct_); i++) {
  ------------------
  |  | 1839|  43.8k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1836|  43.8k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (19179:33): [True: 41.4k, False: 2.41k]
  ------------------
19180|  41.4k|                if (janet_checktype(struct_[i].key, JANET_NIL))
  ------------------
  |  |  801|  41.4k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 26.0k, False: 15.3k]
  |  |  |  Branch (801:6): [Folded, False: 41.4k]
  |  |  ------------------
  |  |  802|  41.4k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  41.4k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  41.4k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  41.4k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  41.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  41.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19181|  26.0k|                    continue;
19182|  15.3k|                marshal_one(st, struct_[i].key, flags + 1);
19183|  15.3k|                marshal_one(st, struct_[i].value, flags + 1);
19184|  15.3k|            }
19185|       |            /* Mark as seen AFTER marshaling */
19186|  2.41k|            MARK_SEEN();
  ------------------
  |  |18966|  2.41k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18966:14): [True: 2.41k, False: 0]
  |  |  ------------------
  |  |18967|  2.41k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  958|  2.41k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|  2.41k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18968|  2.41k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18968:16): [Folded, False: 2.41k]
  |  |  ------------------
  ------------------
19187|  2.41k|            return;
19188|  4.78k|        }
19189|  1.04k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (19189:9): [True: 1.04k, False: 2.47M]
  ------------------
19190|  1.04k|            marshal_one_abstract(st, x, flags);
19191|  1.04k|            return;
19192|  4.78k|        }
19193|   136k|        case JANET_FUNCTION: {
  ------------------
  |  Branch (19193:9): [True: 136k, False: 2.33M]
  ------------------
19194|   136k|            pushbyte(st, LB_FUNCTION);
19195|   136k|            JanetFunction *func = janet_unwrap_function(x);
  ------------------
  |  |  863|   136k|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
19196|   136k|            pushint(st, func->def->environments_length);
19197|       |            /* Mark seen before reading def */
19198|   136k|            MARK_SEEN();
  ------------------
  |  |18966|   136k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18966:14): [True: 136k, False: 0]
  |  |  ------------------
  |  |18967|   136k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  958|   136k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|   136k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18968|   136k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18968:16): [Folded, False: 136k]
  |  |  ------------------
  ------------------
19199|   136k|            marshal_one_def(st, func->def, flags);
19200|   151k|            for (int32_t i = 0; i < func->def->environments_length; i++)
  ------------------
  |  Branch (19200:33): [True: 14.7k, False: 136k]
  ------------------
19201|  14.7k|                marshal_one_env(st, func->envs[i], flags + 1);
19202|   136k|            return;
19203|  4.78k|        }
19204|    343|        case JANET_FIBER: {
  ------------------
  |  Branch (19204:9): [True: 343, False: 2.47M]
  ------------------
19205|    343|            MARK_SEEN();
  ------------------
  |  |18966|    343|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18966:14): [True: 343, False: 0]
  |  |  ------------------
  |  |18967|    343|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  958|    343|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|    343|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18968|    343|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18968:16): [Folded, False: 343]
  |  |  ------------------
  ------------------
19206|    343|            pushbyte(st, LB_FIBER);
19207|    343|            marshal_one_fiber(st, janet_unwrap_fiber(x), flags + 1);
  ------------------
  |  |  854|    343|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
19208|    343|            return;
19209|  4.78k|        }
19210|   120k|        case JANET_CFUNCTION: {
  ------------------
  |  Branch (19210:9): [True: 120k, False: 2.35M]
  ------------------
19211|   120k|            if (!(flags & JANET_MARSHAL_UNSAFE)) goto no_registry;
  ------------------
  |  | 1901|   120k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (19211:17): [True: 1, False: 120k]
  ------------------
19212|   120k|            MARK_SEEN();
  ------------------
  |  |18966|   120k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18966:14): [True: 120k, False: 0]
  |  |  ------------------
  |  |18967|   120k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  958|   120k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|   120k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18968|   120k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18968:16): [Folded, False: 120k]
  |  |  ------------------
  ------------------
19213|   120k|            pushbyte(st, LB_UNSAFE_CFUNCTION);
19214|   120k|            JanetCFunction cfn = janet_unwrap_cfunction(x);
  ------------------
  |  |  864|   120k|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
19215|   120k|            pushbytes(st, (uint8_t *) &cfn, sizeof(JanetCFunction));
19216|   120k|            return;
19217|   120k|        }
19218|  4.41k|        case JANET_POINTER: {
  ------------------
  |  Branch (19218:9): [True: 4.41k, False: 2.47M]
  ------------------
19219|  4.41k|            if (!(flags & JANET_MARSHAL_UNSAFE)) goto no_registry;
  ------------------
  |  | 1901|  4.41k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (19219:17): [True: 0, False: 4.41k]
  ------------------
19220|  4.41k|            MARK_SEEN();
  ------------------
  |  |18966|  4.41k|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18966:14): [True: 4.41k, False: 0]
  |  |  ------------------
  |  |18967|  4.41k|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  958|  4.41k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|  4.41k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18968|  4.41k|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18968:16): [Folded, False: 4.41k]
  |  |  ------------------
  ------------------
19221|  4.41k|            pushbyte(st, LB_UNSAFE_POINTER);
19222|  4.41k|            pushpointer(st, janet_unwrap_pointer(x));
  ------------------
  |  |  862|  4.41k|#define janet_unwrap_pointer(x) (janet_nanbox_to_pointer(x))
  ------------------
19223|  4.41k|            return;
19224|  4.41k|        }
19225|      1|    no_registry:
19226|      1|        default: {
  ------------------
  |  Branch (19226:9): [True: 0, False: 2.47M]
  ------------------
19227|      1|            janet_panicf("no registry value and cannot marshal %p", x);
19228|      1|        }
19229|  2.47M|    }
19230|  2.47M|#undef MARK_SEEN
19231|  2.47M|}
janet.c:marshal_one_abstract:
18981|  1.04k|static void marshal_one_abstract(MarshalState *st, Janet x, int flags) {
18982|  1.04k|    void *abstract = janet_unwrap_abstract(x);
  ------------------
  |  |  861|  1.04k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
18983|  1.04k|#ifdef JANET_EV
18984|       |    /* Threaded abstract types get passed through as pointers in the unsafe mode */
18985|  1.04k|    if ((flags & JANET_MARSHAL_UNSAFE) &&
  ------------------
  |  | 1901|  1.04k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (18985:9): [True: 1.04k, False: 1]
  ------------------
18986|  1.04k|            (JANET_MEMORY_THREADED_ABSTRACT == (janet_abstract_head(abstract)->gc.flags & JANET_MEM_TYPEBITS))) {
  ------------------
  |  | 1887|  1.04k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  ------------------
                          (JANET_MEMORY_THREADED_ABSTRACT == (janet_abstract_head(abstract)->gc.flags & JANET_MEM_TYPEBITS))) {
  ------------------
  |  |  624|  1.04k|#define JANET_MEM_TYPEBITS 0xFF
  ------------------
  |  Branch (18986:13): [True: 0, False: 1.04k]
  ------------------
18987|       |
18988|       |        /* Increment refcount before sending message. This prevents a "death in transit" problem
18989|       |         * where a message is garbage collected while in transit between two threads - i.e., the sending threads
18990|       |         * loses the reference and runs a garbage collection before the receiving thread gets the message. */
18991|      0|        janet_abstract_incref(abstract);
18992|      0|        pushbyte(st, LB_THREADED_ABSTRACT);
18993|      0|        pushbytes(st, (uint8_t *) &abstract, sizeof(abstract));
18994|      0|        MARK_SEEN();
  ------------------
  |  |18966|      0|    do { if (st->maybe_cycles) { \
  |  |  ------------------
  |  |  |  Branch (18966:14): [True: 0, False: 0]
  |  |  ------------------
  |  |18967|      0|        janet_table_put(&st->seen, x, janet_wrap_integer(st->nextid++)); \
  |  |  ------------------
  |  |  |  |  958|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |18968|      0|    } } while (0)
  |  |  ------------------
  |  |  |  Branch (18968:16): [Folded, False: 0]
  |  |  ------------------
  ------------------
18995|      0|        return;
18996|      0|    }
18997|  1.04k|#endif
18998|  1.04k|    const JanetAbstractType *at = janet_abstract_type(abstract);
  ------------------
  |  | 1889|  1.04k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|  1.04k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
18999|  1.04k|    if (at->marshal) {
  ------------------
  |  Branch (18999:9): [True: 1.04k, False: 0]
  ------------------
19000|  1.04k|        pushbyte(st, LB_ABSTRACT);
19001|  1.04k|        marshal_one(st, janet_csymbolv(at->name), flags + 1);
  ------------------
  |  | 1827|  1.04k|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  844|  1.04k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|  1.04k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  1.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  1.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19002|  1.04k|        JanetMarshalContext context = {st, NULL, flags + 1, NULL, at};
19003|  1.04k|        at->marshal(abstract, &context);
19004|  1.04k|    } else {
19005|      0|        janet_panicf("cannot marshal %p", x);
19006|      0|    }
19007|  1.04k|}
janet.c:marshal_one_def:
18801|   318k|static void marshal_one_def(MarshalState *st, JanetFuncDef *def, int flags) {
18802|   318k|    MARSH_STACKCHECK;
  ------------------
  |  |18734|   318k|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  291|   318k|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (18734:30): [True: 0, False: 318k]
  |  |  ------------------
  ------------------
18803|   320M|    for (int32_t i = 0; i < janet_v_count(st->seen_defs); i++) {
  ------------------
  |  |  708|   320M|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|   320M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|   320M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 320M, False: 5.08k]
  |  |  ------------------
  ------------------
  |  Branch (18803:25): [True: 320M, False: 316k]
  ------------------
18804|   320M|        if (st->seen_defs[i] == def) {
  ------------------
  |  Branch (18804:13): [True: 1.36k, False: 320M]
  ------------------
18805|  1.36k|            pushbyte(st, LB_FUNCDEF_REF);
18806|  1.36k|            pushint(st, i);
18807|  1.36k|            return;
18808|  1.36k|        }
18809|   320M|    }
18810|       |    /* Add to lookup */
18811|   316k|    janet_v_push(st->seen_defs, def);
  ------------------
  |  |  706|   316k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|   316k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|   316k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|   311k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|   311k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|   311k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|   311k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 5.01k, False: 311k]
  |  |  |  |  |  |  |  Branch (717:50): [True: 17.1k, False: 294k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  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))
  |  |  ------------------
  |  |  |  |  715|   316k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|   316k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18812|       |
18813|   316k|    pushint(st, def->flags);
18814|   316k|    pushint(st, def->slotcount);
18815|   316k|    pushint(st, def->arity);
18816|   316k|    pushint(st, def->min_arity);
18817|   316k|    pushint(st, def->max_arity);
18818|   316k|    pushint(st, def->constants_length);
18819|   316k|    pushint(st, def->bytecode_length);
18820|   316k|    if (def->flags & JANET_FUNCDEF_FLAG_NAMEDARGS)
  ------------------
  |  | 1098|   316k|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (18820:9): [True: 684, False: 315k]
  ------------------
18821|    684|        pushint(st, def->named_args_count);
18822|   316k|    if (def->flags & JANET_FUNCDEF_FLAG_HASENVS)
  ------------------
  |  | 1094|   316k|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (18822:9): [True: 305k, False: 11.3k]
  ------------------
18823|   305k|        pushint(st, def->environments_length);
18824|   316k|    if (def->flags & JANET_FUNCDEF_FLAG_HASDEFS)
  ------------------
  |  | 1093|   316k|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (18824:9): [True: 119k, False: 196k]
  ------------------
18825|   119k|        pushint(st, def->defs_length);
18826|   316k|    if (def->flags & JANET_FUNCDEF_FLAG_HASSYMBOLMAP)
  ------------------
  |  | 1090|   316k|#define JANET_FUNCDEF_FLAG_HASSYMBOLMAP 0x40000
  ------------------
  |  Branch (18826:9): [True: 178k, False: 138k]
  ------------------
18827|   178k|        pushint(st, def->symbolmap_length);
18828|   316k|    if (def->flags & JANET_FUNCDEF_FLAG_HASNAME)
  ------------------
  |  | 1091|   316k|#define JANET_FUNCDEF_FLAG_HASNAME 0x80000
  ------------------
  |  Branch (18828:9): [True: 304k, False: 12.3k]
  ------------------
18829|   304k|        marshal_one(st, janet_wrap_string(def->name), flags);
  ------------------
  |  |  843|   304k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|   304k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   304k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   304k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18830|   316k|    if (def->flags & JANET_FUNCDEF_FLAG_HASSOURCE)
  ------------------
  |  | 1092|   316k|#define JANET_FUNCDEF_FLAG_HASSOURCE 0x100000
  ------------------
  |  Branch (18830:9): [True: 305k, False: 11.3k]
  ------------------
18831|   305k|        marshal_one(st, janet_wrap_string(def->source), flags);
  ------------------
  |  |  843|   305k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|   305k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   305k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   305k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18832|       |
18833|       |    /* marshal constants */
18834|  1.11M|    for (int32_t i = 0; i < def->constants_length; i++)
  ------------------
  |  Branch (18834:25): [True: 800k, False: 316k]
  ------------------
18835|   800k|        marshal_one(st, def->constants[i], flags + 1);
18836|       |
18837|       |    /* Marshal symbol map, if needed */
18838|  2.63M|    for (int32_t i = 0; i < def->symbolmap_length; i++) {
  ------------------
  |  Branch (18838:25): [True: 2.31M, False: 316k]
  ------------------
18839|  2.31M|        pushint(st, (int32_t) def->symbolmap[i].birth_pc);
18840|  2.31M|        pushint(st, (int32_t) def->symbolmap[i].death_pc);
18841|  2.31M|        pushint(st, (int32_t) def->symbolmap[i].slot_index);
18842|  2.31M|        marshal_one(st, janet_wrap_symbol(def->symbolmap[i].symbol), flags + 1);
  ------------------
  |  |  844|  2.31M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  823|  2.31M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  2.31M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  2.31M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18843|  2.31M|    }
18844|       |
18845|       |    /* marshal the bytecode */
18846|   316k|    janet_marshal_u32s(st, def->bytecode, def->bytecode_length);
18847|       |
18848|       |    /* marshal the environments if needed */
18849|   384k|    for (int32_t i = 0; i < def->environments_length; i++)
  ------------------
  |  Branch (18849:25): [True: 67.3k, False: 316k]
  ------------------
18850|  67.3k|        pushint(st, def->environments[i]);
18851|       |
18852|       |    /* marshal the sub funcdefs if needed */
18853|   498k|    for (int32_t i = 0; i < def->defs_length; i++)
  ------------------
  |  Branch (18853:25): [True: 181k, False: 316k]
  ------------------
18854|   181k|        marshal_one_def(st, def->defs[i], flags + 1);
18855|       |
18856|       |    /* marshal source maps if needed */
18857|   316k|    if (def->flags & JANET_FUNCDEF_FLAG_HASSOURCEMAP) {
  ------------------
  |  | 1095|   316k|#define JANET_FUNCDEF_FLAG_HASSOURCEMAP 0x800000
  ------------------
  |  Branch (18857:9): [True: 305k, False: 11.3k]
  ------------------
18858|   305k|        int32_t current = 0;
18859|  5.96M|        for (int32_t i = 0; i < def->bytecode_length; i++) {
  ------------------
  |  Branch (18859:29): [True: 5.65M, False: 305k]
  ------------------
18860|  5.65M|            JanetSourceMapping map = def->sourcemap[i];
18861|  5.65M|            pushint(st, map.line - current);
18862|  5.65M|            pushint(st, map.column);
18863|  5.65M|            current = map.line;
18864|  5.65M|        }
18865|   305k|    }
18866|       |
18867|       |    /* Marshal closure bitset, if needed */
18868|   316k|    if (def->flags & JANET_FUNCDEF_FLAG_HASCLOBITSET) {
  ------------------
  |  | 1097|   316k|#define JANET_FUNCDEF_FLAG_HASCLOBITSET 0x2000000
  ------------------
  |  Branch (18868:9): [True: 20.1k, False: 296k]
  ------------------
18869|  20.1k|        janet_marshal_u32s(st, def->closure_bitset, ((def->slotcount + 31) >> 5));
18870|  20.1k|    }
18871|   316k|}
janet.c:janet_marshal_u32s:
18791|   336k|static void janet_marshal_u32s(MarshalState *st, const uint32_t *u32s, int32_t n) {
18792|  6.14M|    for (int32_t i = 0; i < n; i++) {
  ------------------
  |  Branch (18792:25): [True: 5.81M, False: 336k]
  ------------------
18793|  5.81M|        pushbyte(st, u32s[i] & 0xFF);
18794|  5.81M|        pushbyte(st, (u32s[i] >> 8) & 0xFF);
18795|  5.81M|        pushbyte(st, (u32s[i] >> 16) & 0xFF);
18796|  5.81M|        pushbyte(st, (u32s[i] >> 24) & 0xFF);
18797|  5.81M|    }
18798|   336k|}
janet.c:marshal_one_env:
18750|  14.7k|static void marshal_one_env(MarshalState *st, JanetFuncEnv *env, int flags) {
18751|  14.7k|    MARSH_STACKCHECK;
  ------------------
  |  |18734|  14.7k|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  291|  14.7k|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (18734:30): [True: 0, False: 14.7k]
  |  |  ------------------
  ------------------
18752|  84.4k|    for (int32_t i = 0; i < janet_v_count(st->seen_envs); i++) {
  ------------------
  |  |  708|  84.4k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  84.1k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  84.1k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 84.1k, False: 342]
  |  |  ------------------
  ------------------
  |  Branch (18752:25): [True: 81.7k, False: 2.73k]
  ------------------
18753|  81.7k|        if (st->seen_envs[i] == env) {
  ------------------
  |  Branch (18753:13): [True: 11.9k, False: 69.7k]
  ------------------
18754|  11.9k|            pushbyte(st, LB_FUNCENV_REF);
18755|  11.9k|            pushint(st, i);
18756|  11.9k|            return;
18757|  11.9k|        }
18758|  81.7k|    }
18759|  2.73k|    janet_env_valid(env);
18760|  2.73k|    janet_v_push(st->seen_envs, env);
  ------------------
  |  |  706|  2.73k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  2.73k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  2.73k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  2.39k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  2.39k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  2.39k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  2.39k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 342, False: 2.39k]
  |  |  |  |  |  |  |  Branch (717:50): [True: 1.36k, False: 1.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  1.71k|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  715|  2.73k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  2.73k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18761|       |
18762|       |    /* Special case for early detachment */
18763|  2.73k|    if (env->offset > 0 && fiber_cannot_be_marshalled(env->as.fiber)) {
  ------------------
  |  Branch (18763:9): [True: 0, False: 2.73k]
  |  Branch (18763:28): [True: 0, False: 0]
  ------------------
18764|      0|        pushint(st, 0);
18765|      0|        pushint(st, env->length);
18766|      0|        Janet *values = env->as.fiber->data + env->offset;
18767|      0|        uint32_t *bitset = janet_stack_frame(values)->func->def->closure_bitset;
  ------------------
  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
18768|      0|        for (int32_t i = 0; i < env->length; i++) {
  ------------------
  |  Branch (18768:29): [True: 0, False: 0]
  ------------------
18769|      0|            if (1 & (bitset[i >> 5] >> (i & 0x1F))) {
  ------------------
  |  Branch (18769:17): [True: 0, False: 0]
  ------------------
18770|      0|                marshal_one(st, values[i], flags + 1);
18771|      0|            } else {
18772|      0|                pushbyte(st, LB_NIL);
18773|      0|            }
18774|      0|        }
18775|  2.73k|    } else {
18776|  2.73k|        janet_env_maybe_detach(env);
18777|  2.73k|        pushint(st, env->offset);
18778|  2.73k|        pushint(st, env->length);
18779|  2.73k|        if (env->offset > 0) {
  ------------------
  |  Branch (18779:13): [True: 0, False: 2.73k]
  ------------------
18780|       |            /* On stack variant */
18781|      0|            marshal_one(st, janet_wrap_fiber(env->as.fiber), flags + 1);
  ------------------
  |  |  839|      0|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18782|  2.73k|        } else {
18783|       |            /* Off stack variant */
18784|  35.5k|            for (int32_t i = 0; i < env->length; i++)
  ------------------
  |  Branch (18784:33): [True: 32.8k, False: 2.73k]
  ------------------
18785|  32.8k|                marshal_one(st, env->as.values[i], flags + 1);
18786|  2.73k|        }
18787|  2.73k|    }
18788|  2.73k|}
janet.c:marshal_one_fiber:
18878|    343|static void marshal_one_fiber(MarshalState *st, JanetFiber *fiber, int flags) {
18879|    343|    MARSH_STACKCHECK;
  ------------------
  |  |18734|    343|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  291|    343|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (18734:30): [True: 0, False: 343]
  |  |  ------------------
  ------------------
18880|    343|    int32_t fflags = fiber->flags;
18881|    343|    if (fiber->child) fflags |= JANET_FIBER_FLAG_HASCHILD;
  ------------------
  |  |18873|      0|#define JANET_FIBER_FLAG_HASCHILD (1 << 29)
  ------------------
  |  Branch (18881:9): [True: 0, False: 343]
  ------------------
18882|    343|    if (fiber->env) fflags |= JANET_FIBER_FLAG_HASENV;
  ------------------
  |  |18874|    343|#define JANET_FIBER_FLAG_HASENV   (1 << 30)
  ------------------
  |  Branch (18882:9): [True: 343, False: 0]
  ------------------
18883|    343|    if (janet_fiber_status(fiber) == JANET_STATUS_ALIVE)
  ------------------
  |  Branch (18883:9): [True: 0, False: 343]
  ------------------
18884|      0|        janet_panic("cannot marshal alive fiber");
18885|    343|    pushint(st, fflags);
18886|    343|    pushint(st, fiber->frame);
18887|    343|    pushint(st, fiber->stackstart);
18888|    343|    pushint(st, fiber->stacktop);
18889|    343|    pushint(st, fiber->maxstack);
18890|       |    /* Do frames */
18891|    343|    int32_t i = fiber->frame;
18892|    343|    int32_t j = fiber->stackstart - JANET_FRAME_SIZE;
  ------------------
  |  | 1017|    343|#define JANET_FRAME_SIZE 4
  ------------------
18893|    686|    while (i > 0) {
  ------------------
  |  Branch (18893:12): [True: 343, False: 343]
  ------------------
18894|    343|        JanetStackFrame *frame = (JanetStackFrame *)(fiber->data + i - JANET_FRAME_SIZE);
  ------------------
  |  | 1017|    343|#define JANET_FRAME_SIZE 4
  ------------------
18895|    343|        if (frame->env) frame->flags |= JANET_STACKFRAME_HASENV;
  ------------------
  |  |18875|      0|#define JANET_STACKFRAME_HASENV   (INT32_MIN)
  ------------------
  |  Branch (18895:13): [True: 0, False: 343]
  ------------------
18896|    343|        if (!frame->func) janet_panicf("cannot marshal fiber with c stackframe (%v)", janet_wrap_cfunction((JanetCFunction) frame->pc));
  ------------------
  |  |  848|      0|#define janet_wrap_cfunction(s) janet_nanbox_wrap_((s), JANET_CFUNCTION)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (18896:13): [True: 0, False: 343]
  ------------------
18897|    343|        pushint(st, frame->flags);
18898|    343|        pushint(st, frame->prevframe);
18899|    343|        int32_t pcdiff = (int32_t)(frame->pc - frame->func->def->bytecode);
18900|    343|        pushint(st, pcdiff);
18901|    343|        marshal_one(st, janet_wrap_function(frame->func), flags + 1);
  ------------------
  |  |  847|    343|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  820|    343|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    343|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    343|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18902|    343|        if (frame->env) marshal_one_env(st, frame->env, flags + 1);
  ------------------
  |  Branch (18902:13): [True: 0, False: 343]
  ------------------
18903|       |        /* Marshal all values in the stack frame */
18904|   136k|        for (int32_t k = i; k < j; k++)
  ------------------
  |  Branch (18904:29): [True: 136k, False: 343]
  ------------------
18905|   136k|            marshal_one(st, fiber->data[k], flags + 1);
18906|    343|        j = i - JANET_FRAME_SIZE;
  ------------------
  |  | 1017|    343|#define JANET_FRAME_SIZE 4
  ------------------
18907|    343|        i = frame->prevframe;
18908|    343|    }
18909|    343|    if (fiber->env) {
  ------------------
  |  Branch (18909:9): [True: 343, False: 0]
  ------------------
18910|    343|        marshal_one(st, janet_wrap_table(fiber->env), flags + 1);
  ------------------
  |  |  841|    343|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|    343|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    343|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    343|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18911|    343|    }
18912|    343|    if (fiber->child)
  ------------------
  |  Branch (18912:9): [True: 0, False: 343]
  ------------------
18913|      0|        marshal_one(st, janet_wrap_fiber(fiber->child), flags + 1);
  ------------------
  |  |  839|      0|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
18914|    343|    marshal_one(st, fiber->last_value, flags + 1);
18915|    343|}
janet.c:readint:
19267|   526M|static int32_t readint(UnmarshalState *st, const uint8_t **atdata) {
19268|   526M|    const uint8_t *data = *atdata;
19269|   526M|    int32_t ret;
19270|   526M|    MARSH_EOS(st, data);
  ------------------
  |  |19262|   526M|#define MARSH_EOS(st, data) do { \
  |  |19263|   526M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19263:9): [True: 1, False: 526M]
  |  |  ------------------
  |  |19264|   526M|} while (0)
  |  |  ------------------
  |  |  |  Branch (19264:10): [Folded, False: 526M]
  |  |  ------------------
  ------------------
19271|   526M|    if (*data < 128) {
  ------------------
  |  Branch (19271:9): [True: 428M, False: 98.6M]
  ------------------
19272|   428M|        ret = *data++;
19273|   428M|    } else if (*data < 192) {
  ------------------
  |  Branch (19273:16): [True: 93.3M, False: 5.25M]
  ------------------
19274|  93.3M|        MARSH_EOS(st, data + 1);
  ------------------
  |  |19262|  93.3M|#define MARSH_EOS(st, data) do { \
  |  |19263|  93.3M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19263:9): [True: 0, False: 93.3M]
  |  |  ------------------
  |  |19264|  93.3M|} while (0)
  |  |  ------------------
  |  |  |  Branch (19264:10): [Folded, False: 93.3M]
  |  |  ------------------
  ------------------
19275|  93.3M|        uint32_t uret = ((data[0] & 0x3F) << 8) + data[1];
19276|       |        /* Sign extend 18 MSBs */
19277|  93.3M|        uret |= (uret >> 13) ? 0xFFFFC000 : 0;
  ------------------
  |  Branch (19277:17): [True: 25.0M, False: 68.3M]
  ------------------
19278|  93.3M|        ret = (int32_t)uret;
19279|  93.3M|        data += 2;
19280|  93.3M|    } else if (*data == LB_INTEGER) {
  ------------------
  |  Branch (19280:16): [True: 5.87M, False: 18.4E]
  ------------------
19281|  5.87M|        MARSH_EOS(st, data + 4);
  ------------------
  |  |19262|  5.87M|#define MARSH_EOS(st, data) do { \
  |  |19263|  5.87M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19263:9): [True: 1, False: 5.87M]
  |  |  ------------------
  |  |19264|  5.87M|} while (0)
  |  |  ------------------
  |  |  |  Branch (19264:10): [Folded, False: 5.87M]
  |  |  ------------------
  ------------------
19282|  5.87M|        uint32_t ui = ((uint32_t)(data[1]) << 24) |
19283|  5.87M|                      ((uint32_t)(data[2]) << 16) |
19284|  5.87M|                      ((uint32_t)(data[3]) << 8) |
19285|  5.87M|                      (uint32_t)(data[4]);
19286|  5.87M|        ret = (int32_t)ui;
19287|  5.87M|        data += 5;
19288|  18.4E|    } else {
19289|  18.4E|        janet_panicf("expected integer, got byte %x at index %d",
19290|  18.4E|                     *data,
19291|  18.4E|                     data - st->start);
19292|      0|        ret = 0;
19293|      0|    }
19294|   527M|    *atdata = data;
19295|   527M|    return ret;
19296|   526M|}
janet.c:read64:
19308|  1.04k|static uint64_t read64(UnmarshalState *st, const uint8_t **atdata) {
19309|  1.04k|    uint64_t ret;
19310|  1.04k|    const uint8_t *data = *atdata;
19311|  1.04k|    MARSH_EOS(st, data);
  ------------------
  |  |19262|  1.04k|#define MARSH_EOS(st, data) do { \
  |  |19263|  1.04k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19263:9): [True: 0, False: 1.04k]
  |  |  ------------------
  |  |19264|  1.04k|} while (0)
  |  |  ------------------
  |  |  |  Branch (19264:10): [Folded, False: 1.04k]
  |  |  ------------------
  ------------------
19312|  1.04k|    if (*data <= 0xF0) {
  ------------------
  |  Branch (19312:9): [True: 10, False: 1.03k]
  ------------------
19313|       |        /* Single byte */
19314|     10|        ret = *data;
19315|     10|        *atdata = data + 1;
19316|  1.03k|    } else {
19317|       |        /* Multibyte, little endian */
19318|  1.03k|        int nbytes = *data - 0xF0;
19319|  1.03k|        ret = 0;
19320|  1.03k|        if (nbytes > 8) janet_panic("invalid 64 bit integer");
  ------------------
  |  Branch (19320:13): [True: 0, False: 1.03k]
  ------------------
19321|  1.03k|        MARSH_EOS(st, data + nbytes);
  ------------------
  |  |19262|  1.03k|#define MARSH_EOS(st, data) do { \
  |  |19263|  1.03k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19263:9): [True: 0, False: 1.03k]
  |  |  ------------------
  |  |19264|  1.03k|} while (0)
  |  |  ------------------
  |  |  |  Branch (19264:10): [Folded, False: 1.03k]
  |  |  ------------------
  ------------------
19322|  3.09k|        for (int i = nbytes; i > 0; i--)
  ------------------
  |  Branch (19322:30): [True: 2.06k, False: 1.03k]
  ------------------
19323|  2.06k|            ret = (ret << 8) + data[i];
19324|  1.03k|        *atdata = data + nbytes + 1;
19325|  1.03k|    }
19326|  1.04k|    return ret;
19327|  1.04k|}
janet.c:unmarshal_one:
19875|   140M|    int flags) {
19876|   140M|    uint8_t lead;
19877|   140M|    MARSH_STACKCHECK;
  ------------------
  |  |18734|   140M|#define MARSH_STACKCHECK if ((flags & 0xFFFF) > JANET_RECURSION_GUARD) janet_panic("stack overflow")
  |  |  ------------------
  |  |  |  |  291|   140M|#define JANET_RECURSION_GUARD 1024
  |  |  ------------------
  |  |  |  Branch (18734:30): [True: 0, False: 140M]
  |  |  ------------------
  ------------------
19878|   140M|    MARSH_EOS(st, data);
  ------------------
  |  |19262|   140M|#define MARSH_EOS(st, data) do { \
  |  |19263|   140M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19263:9): [True: 2, False: 140M]
  |  |  ------------------
  |  |19264|   140M|} while (0)
  |  |  ------------------
  |  |  |  Branch (19264:10): [Folded, False: 140M]
  |  |  ------------------
  ------------------
19879|   140M|    lead = data[0];
19880|   140M|    if (lead < LB_REAL) {
  ------------------
  |  Branch (19880:9): [True: 10.3M, False: 130M]
  ------------------
19881|  10.3M|        *out = janet_wrap_integer(readint(st, &data));
  ------------------
  |  |  958|  10.3M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|  10.3M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
19882|  10.3M|        return data;
19883|  10.3M|    }
19884|   130M|    switch (lead) {
19885|   579k|        case LB_NIL:
  ------------------
  |  Branch (19885:9): [True: 579k, False: 129M]
  ------------------
19886|   579k|            *out = janet_wrap_nil();
  ------------------
  |  |  826|   579k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|   579k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   579k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   579k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19887|   579k|            return data + 1;
19888|    101|        case LB_FALSE:
  ------------------
  |  Branch (19888:9): [True: 101, False: 130M]
  ------------------
19889|    101|            *out = janet_wrap_false();
  ------------------
  |  |  828|    101|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  817|    101|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    101|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    101|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19890|    101|            return data + 1;
19891|   990k|        case LB_TRUE:
  ------------------
  |  Branch (19891:9): [True: 990k, False: 129M]
  ------------------
19892|   990k|            *out = janet_wrap_true();
  ------------------
  |  |  827|   990k|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  817|   990k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   990k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   990k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19893|   990k|            return data + 1;
19894|  22.5k|        case LB_INTEGER:
  ------------------
  |  Branch (19894:9): [True: 22.5k, False: 129M]
  ------------------
19895|       |            /* Long integer */
19896|  22.5k|            MARSH_EOS(st, data + 4);
  ------------------
  |  |19262|  22.5k|#define MARSH_EOS(st, data) do { \
  |  |19263|  22.5k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19263:9): [True: 0, False: 22.5k]
  |  |  ------------------
  |  |19264|  22.5k|} while (0)
  |  |  ------------------
  |  |  |  Branch (19264:10): [Folded, False: 22.5k]
  |  |  ------------------
  ------------------
19897|  22.5k|            uint32_t ui = ((uint32_t)(data[4])) |
19898|  22.5k|                          ((uint32_t)(data[3]) << 8) |
19899|  22.5k|                          ((uint32_t)(data[2]) << 16) |
19900|  22.5k|                          ((uint32_t)(data[1]) << 24);
19901|  22.5k|            int32_t si = (int32_t)ui;
19902|  22.5k|            *out = janet_wrap_integer(si);
  ------------------
  |  |  958|  22.5k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|  22.5k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
19903|  22.5k|            return data + 5;
19904|  52.5k|        case LB_REAL:
  ------------------
  |  Branch (19904:9): [True: 52.5k, False: 129M]
  ------------------
19905|       |            /* Real */
19906|  52.5k|        {
19907|  52.5k|            union {
19908|  52.5k|                double d;
19909|  52.5k|                uint8_t bytes[8];
19910|  52.5k|            } u;
19911|  52.5k|            MARSH_EOS(st, data + 8);
  ------------------
  |  |19262|  52.5k|#define MARSH_EOS(st, data) do { \
  |  |19263|  52.5k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19263:9): [True: 3, False: 52.5k]
  |  |  ------------------
  |  |19264|  52.5k|} while (0)
  |  |  ------------------
  |  |  |  Branch (19264:10): [Folded, False: 52.5k]
  |  |  ------------------
  ------------------
19912|       |#ifdef JANET_BIG_ENDIAN
19913|       |            u.bytes[0] = data[8];
19914|       |            u.bytes[1] = data[7];
19915|       |            u.bytes[2] = data[6];
19916|       |            u.bytes[3] = data[5];
19917|       |            u.bytes[4] = data[4];
19918|       |            u.bytes[5] = data[3];
19919|       |            u.bytes[6] = data[2];
19920|       |            u.bytes[7] = data[1];
19921|       |#else
19922|  52.5k|            memcpy(&u.bytes, data + 1, sizeof(double));
19923|  52.5k|#endif
19924|  52.5k|            *out = janet_wrap_number_safe(u.d);
19925|  52.5k|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  706|  52.5k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  52.5k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  52.5k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  52.5k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  52.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  52.5k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  52.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 5, False: 52.5k]
  |  |  |  |  |  |  |  Branch (717:50): [True: 20, False: 52.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|     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))
  |  |  ------------------
  |  |  |  |  715|  52.5k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  52.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19926|  52.5k|            return data + 9;
19927|  52.5k|        }
19928|  11.0M|        case LB_STRING:
  ------------------
  |  Branch (19928:9): [True: 11.0M, False: 118M]
  ------------------
19929|  25.7M|        case LB_SYMBOL:
  ------------------
  |  Branch (19929:9): [True: 14.7M, False: 115M]
  ------------------
19930|  25.7M|        case LB_BUFFER:
  ------------------
  |  Branch (19930:9): [True: 7.50k, False: 130M]
  ------------------
19931|  27.5M|        case LB_KEYWORD:
  ------------------
  |  Branch (19931:9): [True: 1.77M, False: 128M]
  ------------------
19932|  30.1M|        case LB_REGISTRY: {
  ------------------
  |  Branch (19932:9): [True: 2.54M, False: 127M]
  ------------------
19933|  30.1M|            data++;
19934|  30.1M|            int32_t len = readnat(st, &data);
19935|  30.1M|            MARSH_EOS(st, data - 1 + len);
  ------------------
  |  |19262|  30.1M|#define MARSH_EOS(st, data) do { \
  |  |19263|  30.1M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19263:9): [True: 3, False: 30.1M]
  |  |  ------------------
  |  |19264|  30.1M|} while (0)
  |  |  ------------------
  |  |  |  Branch (19264:10): [Folded, False: 30.1M]
  |  |  ------------------
  ------------------
19936|  30.1M|            if (lead == LB_STRING) {
  ------------------
  |  Branch (19936:17): [True: 11.0M, False: 19.0M]
  ------------------
19937|  11.0M|                const uint8_t *str = janet_string(data, len);
19938|  11.0M|                *out = janet_wrap_string(str);
  ------------------
  |  |  843|  11.0M|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|  11.0M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  11.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  11.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19939|  19.0M|            } else if (lead == LB_SYMBOL) {
  ------------------
  |  Branch (19939:24): [True: 14.7M, False: 4.32M]
  ------------------
19940|  14.7M|                const uint8_t *str = janet_symbol(data, len);
19941|  14.7M|                *out = janet_wrap_symbol(str);
  ------------------
  |  |  844|  14.7M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  823|  14.7M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  14.7M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  14.7M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19942|  14.7M|            } else if (lead == LB_KEYWORD) {
  ------------------
  |  Branch (19942:24): [True: 1.77M, False: 2.55M]
  ------------------
19943|  1.77M|                const uint8_t *str = janet_keyword(data, len);
  ------------------
  |  | 1830|  1.77M|#define janet_keyword janet_symbol
  ------------------
19944|  1.77M|                *out = janet_wrap_keyword(str);
  ------------------
  |  |  845|  1.77M|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  ------------------
  |  |  |  |  823|  1.77M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.77M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.77M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19945|  2.55M|            } else if (lead == LB_REGISTRY) {
  ------------------
  |  Branch (19945:24): [True: 2.54M, False: 7.15k]
  ------------------
19946|  2.54M|                if (st->reg) {
  ------------------
  |  Branch (19946:21): [True: 2.54M, False: 1]
  ------------------
19947|  2.54M|                    Janet regkey = janet_symbolv(data, len);
  ------------------
  |  | 1826|  2.54M|#define janet_symbolv(str, len) janet_wrap_symbol(janet_symbol((str), (len)))
  |  |  ------------------
  |  |  |  |  844|  2.54M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|  2.54M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  2.54M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  2.54M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19948|  2.54M|                    *out = janet_table_get(st->reg, regkey);
19949|  2.54M|                } else {
19950|      1|                    *out = janet_wrap_nil();
  ------------------
  |  |  826|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19951|      1|                }
19952|  2.54M|            } else { /* (lead == LB_BUFFER) */
19953|  7.15k|                JanetBuffer *buffer = janet_buffer(len);
19954|  7.15k|                buffer->count = len;
19955|  7.15k|                safe_memcpy(buffer->data, data, len);
19956|  7.15k|                *out = janet_wrap_buffer(buffer);
  ------------------
  |  |  842|  7.15k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  820|  7.15k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  7.15k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  7.15k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19957|  7.15k|            }
19958|  30.1M|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  706|  30.1M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  30.1M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  30.1M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  30.1M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  30.1M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  30.1M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  30.1M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 2.26k, False: 30.1M]
  |  |  |  |  |  |  |  Branch (717:50): [True: 91.6k, False: 30.0M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  91.6k|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  715|  30.1M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  30.1M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19959|  30.1M|            return data + len;
19960|  30.1M|        }
19961|    354|        case LB_FIBER: {
  ------------------
  |  Branch (19961:9): [True: 354, False: 130M]
  ------------------
19962|    354|            JanetFiber *fiber;
19963|    354|            data = unmarshal_one_fiber(st, data + 1, &fiber, flags + 1);
19964|    354|            *out = janet_wrap_fiber(fiber);
  ------------------
  |  |  839|    354|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|    354|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    354|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    354|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19965|    354|            return data;
19966|  30.1M|        }
19967|  2.88M|        case LB_FUNCTION: {
  ------------------
  |  Branch (19967:9): [True: 2.88M, False: 127M]
  ------------------
19968|  2.88M|            JanetFunction *func;
19969|  2.88M|            JanetFuncDef *def;
19970|  2.88M|            data++;
19971|  2.88M|            int32_t len = readnat(st, &data);
19972|  2.88M|            if (len > 255) {
  ------------------
  |  Branch (19972:17): [True: 1, False: 2.88M]
  ------------------
19973|      1|                janet_panicf("invalid function - too many environments (%d)", len);
19974|      1|            }
19975|  2.88M|            func = janet_gcalloc(JANET_MEMORY_FUNCTION, sizeof(JanetFunction) +
19976|  2.88M|                                 len * sizeof(JanetFuncEnv));
19977|  2.88M|            func->def = NULL;
19978|  3.20M|            for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (19978:33): [True: 322k, False: 2.88M]
  ------------------
19979|   322k|                func->envs[i] = NULL;
19980|   322k|            }
19981|  2.88M|            *out = janet_wrap_function(func);
  ------------------
  |  |  847|  2.88M|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  820|  2.88M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  2.88M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  2.88M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19982|  2.88M|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  706|  2.88M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  2.88M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  2.88M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  2.88M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  2.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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  2.88M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  2.88M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 202, False: 2.88M]
  |  |  |  |  |  |  |  Branch (717:50): [True: 653, False: 2.88M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    887|#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))
  |  |  ------------------
  |  |  |  |  715|  2.88M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  2.88M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19983|  2.88M|            data = unmarshal_one_def(st, data, &def, flags + 1);
19984|  2.88M|            func->def = def;
19985|  3.20M|            for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (19985:33): [True: 322k, False: 2.88M]
  ------------------
19986|   322k|                data = unmarshal_one_env(st, data, &(func->envs[i]), flags + 1);
19987|   322k|            }
19988|  2.88M|            return data;
19989|  2.88M|        }
19990|  1.04k|        case LB_ABSTRACT: {
  ------------------
  |  Branch (19990:9): [True: 1.04k, False: 130M]
  ------------------
19991|  1.04k|            data++;
19992|  1.04k|            return unmarshal_one_abstract(st, data, out, flags);
19993|  2.88M|        }
19994|  84.1M|        case LB_REFERENCE:
  ------------------
  |  Branch (19994:9): [True: 84.1M, False: 45.8M]
  ------------------
19995|  84.1M|        case LB_ARRAY:
  ------------------
  |  Branch (19995:9): [True: 22.5k, False: 129M]
  ------------------
19996|  84.1M|        case LB_ARRAY_WEAK:
  ------------------
  |  Branch (19996:9): [True: 12, False: 130M]
  ------------------
19997|  89.8M|        case LB_TUPLE:
  ------------------
  |  Branch (19997:9): [True: 5.63M, False: 124M]
  ------------------
19998|  89.8M|        case LB_STRUCT:
  ------------------
  |  Branch (19998:9): [True: 52.5k, False: 129M]
  ------------------
19999|  89.8M|        case LB_STRUCT_PROTO:
  ------------------
  |  Branch (19999:9): [True: 8, False: 130M]
  ------------------
20000|  95.3M|        case LB_TABLE:
  ------------------
  |  Branch (20000:9): [True: 5.47M, False: 124M]
  ------------------
20001|  95.3M|        case LB_TABLE_PROTO:
  ------------------
  |  Branch (20001:9): [True: 3, False: 130M]
  ------------------
20002|  95.3M|        case LB_TABLE_WEAKK:
  ------------------
  |  Branch (20002:9): [True: 2, False: 130M]
  ------------------
20003|  95.3M|        case LB_TABLE_WEAKV:
  ------------------
  |  Branch (20003:9): [True: 19, False: 130M]
  ------------------
20004|  95.3M|        case LB_TABLE_WEAKKV:
  ------------------
  |  Branch (20004:9): [True: 5, False: 130M]
  ------------------
20005|  95.3M|        case LB_TABLE_WEAKK_PROTO:
  ------------------
  |  Branch (20005:9): [True: 4, False: 130M]
  ------------------
20006|  95.3M|        case LB_TABLE_WEAKV_PROTO:
  ------------------
  |  Branch (20006:9): [True: 1, False: 130M]
  ------------------
20007|  95.3M|        case LB_TABLE_WEAKKV_PROTO:
  ------------------
  |  Branch (20007:9): [True: 1, False: 130M]
  ------------------
20008|       |            /* Things that open with integers */
20009|  95.3M|        {
20010|  95.3M|            data++;
20011|  95.3M|            int32_t len = readnat(st, &data);
20012|       |            /* DOS check */
20013|  95.3M|            if (lead != LB_REFERENCE) {
  ------------------
  |  Branch (20013:17): [True: 11.1M, False: 84.1M]
  ------------------
20014|  11.1M|                MARSH_EOS(st, data - 1 + len);
  ------------------
  |  |19262|  11.1M|#define MARSH_EOS(st, data) do { \
  |  |19263|  11.1M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19263:9): [True: 1, False: 11.1M]
  |  |  ------------------
  |  |19264|  11.1M|} while (0)
  |  |  ------------------
  |  |  |  Branch (19264:10): [Folded, False: 11.1M]
  |  |  ------------------
  ------------------
20015|  11.1M|            }
20016|  95.3M|            if (lead == LB_ARRAY || lead == LB_ARRAY_WEAK) {
  ------------------
  |  Branch (20016:17): [True: 36.3k, False: 95.3M]
  |  Branch (20016:37): [True: 18.4E, False: 95.3M]
  ------------------
20017|       |                /* Array */
20018|  22.5k|                JanetArray *array = (lead == LB_ARRAY_WEAK) ? janet_array_weak(len) : janet_array(len);
  ------------------
  |  Branch (20018:37): [True: 10, False: 22.5k]
  ------------------
20019|  22.5k|                array->count = len;
20020|  22.5k|                *out = janet_wrap_array(array);
  ------------------
  |  |  840|  22.5k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  820|  22.5k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  22.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  22.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20021|  22.5k|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  706|  22.5k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  22.5k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  22.5k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  22.5k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  22.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  22.5k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  22.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 6, False: 22.5k]
  |  |  |  |  |  |  |  Branch (717:50): [True: 10, False: 22.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|     16|#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))
  |  |  ------------------
  |  |  |  |  715|  22.5k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  22.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20022|   195k|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (20022:37): [True: 172k, False: 22.5k]
  ------------------
20023|   172k|                    data = unmarshal_one(st, data, array->data + i, flags + 1);
20024|   172k|                }
20025|  95.3M|            } else if (lead == LB_TUPLE) {
  ------------------
  |  Branch (20025:24): [True: 5.63M, False: 89.6M]
  ------------------
20026|       |                /* Tuple */
20027|  5.63M|                Janet *tup = janet_tuple_begin(len);
20028|  5.63M|                int32_t flag = readint(st, &data);
20029|  5.63M|                janet_tuple_flag(tup) |= (int32_t) (((uint32_t) flag) << 16); /* Avoid left shift of negative value */
  ------------------
  |  | 1796|  5.63M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1790|  5.63M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
20030|  22.3M|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (20030:37): [True: 16.6M, False: 5.63M]
  ------------------
20031|  16.6M|                    data = unmarshal_one(st, data, tup + i, flags + 1);
20032|  16.6M|                }
20033|  5.63M|                *out = janet_wrap_tuple(janet_tuple_end(tup));
  ------------------
  |  |  838|  5.63M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|  5.63M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  5.63M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  5.63M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20034|  5.63M|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  706|  5.63M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  5.63M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  5.63M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  5.63M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  5.63M|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  5.63M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  5.63M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 18.4E, False: 5.63M]
  |  |  |  |  |  |  |  Branch (717:50): [True: 464, False: 5.63M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    474|#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))
  |  |  ------------------
  |  |  |  |  715|  5.63M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  5.63M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20035|  89.6M|            } else if (lead == LB_STRUCT || lead == LB_STRUCT_PROTO) {
  ------------------
  |  Branch (20035:24): [True: 57.4k, False: 89.6M]
  |  Branch (20035:45): [True: 18.4E, False: 89.6M]
  ------------------
20036|       |                /* Struct */
20037|  52.5k|                JanetKV *struct_ = janet_struct_begin(len);
20038|  52.5k|                if (lead == LB_STRUCT_PROTO) {
  ------------------
  |  Branch (20038:21): [True: 7, False: 52.5k]
  ------------------
20039|      7|                    Janet proto;
20040|      7|                    data = unmarshal_one(st, data, &proto, flags + 1);
20041|      7|                    janet_asserttype(proto, JANET_STRUCT, st);
20042|      7|                    janet_struct_proto(struct_) = janet_unwrap_struct(proto);
  ------------------
  |  | 1841|      7|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1836|      7|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
                                  janet_struct_proto(struct_) = janet_unwrap_struct(proto);
  ------------------
  |  |  852|      7|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
20043|      7|                }
20044|   390k|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (20044:37): [True: 337k, False: 52.5k]
  ------------------
20045|   337k|                    Janet key, value;
20046|   337k|                    data = unmarshal_one(st, data, &key, flags + 1);
20047|   337k|                    data = unmarshal_one(st, data, &value, flags + 1);
20048|   337k|                    janet_struct_put(struct_, key, value);
20049|   337k|                }
20050|  52.5k|                *out = janet_wrap_struct(janet_struct_end(struct_));
  ------------------
  |  |  837|  52.5k|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  823|  52.5k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  52.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  52.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20051|  52.5k|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  706|  52.5k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  52.5k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  52.5k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  52.5k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  52.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  52.5k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  52.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 11, False: 52.5k]
  |  |  |  |  |  |  |  Branch (717:50): [True: 10, False: 52.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|     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))
  |  |  ------------------
  |  |  |  |  715|  52.5k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  52.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20052|  89.6M|            } else if (lead == LB_REFERENCE) {
  ------------------
  |  Branch (20052:24): [True: 84.1M, False: 5.47M]
  ------------------
20053|  84.1M|                if (len >= janet_v_count(st->lookup))
  ------------------
  |  |  708|  18.4E|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  84.1M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  84.1M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 84.1M, False: 18.4E]
  |  |  ------------------
  ------------------
  |  Branch (20053:21): [True: 0, False: 84.1M]
  ------------------
20054|      0|                    janet_panicf("invalid reference %d", len);
20055|  84.1M|                *out = st->lookup[len];
20056|  84.1M|            } else {
20057|       |                /* Table */
20058|  5.47M|                JanetTable *t;
20059|  5.47M|                if (lead == LB_TABLE_WEAKK_PROTO || lead == LB_TABLE_WEAKK) {
  ------------------
  |  Branch (20059:21): [True: 18.4E, False: 5.47M]
  |  Branch (20059:53): [True: 18.4E, False: 5.47M]
  ------------------
20060|      5|                    t = janet_table_weakk(len);
20061|  5.47M|                } else if (lead == LB_TABLE_WEAKV_PROTO || lead == LB_TABLE_WEAKV) {
  ------------------
  |  Branch (20061:28): [True: 18.4E, False: 5.47M]
  |  Branch (20061:60): [True: 13, False: 5.47M]
  ------------------
20062|     19|                    t = janet_table_weakv(len);
20063|  5.47M|                } else if (lead == LB_TABLE_WEAKKV_PROTO || lead == LB_TABLE_WEAKKV) {
  ------------------
  |  Branch (20063:28): [True: 18.4E, False: 5.47M]
  |  Branch (20063:61): [True: 4, False: 5.47M]
  ------------------
20064|      6|                    t = janet_table_weakkv(len);
20065|  5.47M|                } else {
20066|  5.47M|                    t = janet_table(len);
20067|  5.47M|                }
20068|  5.47M|                *out = janet_wrap_table(t);
  ------------------
  |  |  841|  5.47M|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|  5.47M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  5.47M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  5.47M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20069|  5.47M|                janet_v_push(st->lookup, *out);
  ------------------
  |  |  706|  5.47M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  5.47M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  5.47M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  5.47M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  5.47M|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  5.47M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  5.47M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 3.79k, False: 5.47M]
  |  |  |  |  |  |  |  Branch (717:50): [True: 7.34k, False: 5.46M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  15.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))
  |  |  ------------------
  |  |  |  |  715|  5.47M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  5.47M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20070|  5.47M|                if (lead == LB_TABLE_PROTO || lead == LB_TABLE_WEAKK_PROTO || lead == LB_TABLE_WEAKV_PROTO || lead == LB_TABLE_WEAKKV_PROTO) {
  ------------------
  |  Branch (20070:21): [True: 18.4E, False: 5.47M]
  |  Branch (20070:47): [True: 5, False: 5.47M]
  |  Branch (20070:79): [True: 18.4E, False: 5.47M]
  |  Branch (20070:111): [True: 0, False: 5.47M]
  ------------------
20071|      7|                    Janet proto;
20072|      7|                    data = unmarshal_one(st, data, &proto, flags + 1);
20073|      7|                    janet_asserttype(proto, JANET_TABLE, st);
20074|      7|                    t->proto = janet_unwrap_table(proto);
  ------------------
  |  |  856|      7|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
20075|      7|                }
20076|  33.3M|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (20076:37): [True: 27.8M, False: 5.47M]
  ------------------
20077|  27.8M|                    Janet key, value;
20078|  27.8M|                    data = unmarshal_one(st, data, &key, flags + 1);
20079|  27.8M|                    data = unmarshal_one(st, data, &value, flags + 1);
20080|  27.8M|                    janet_table_put(t, key, value);
20081|  27.8M|                }
20082|  5.47M|            }
20083|  95.3M|            return data;
20084|  95.3M|        }
20085|  4.41k|        case LB_UNSAFE_POINTER: {
  ------------------
  |  Branch (20085:9): [True: 4.41k, False: 130M]
  ------------------
20086|  4.41k|            MARSH_EOS(st, data + sizeof(void *));
  ------------------
  |  |19262|  4.41k|#define MARSH_EOS(st, data) do { \
  |  |19263|  4.41k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19263:9): [True: 0, False: 4.41k]
  |  |  ------------------
  |  |19264|  4.41k|} while (0)
  |  |  ------------------
  |  |  |  Branch (19264:10): [Folded, False: 4.41k]
  |  |  ------------------
  ------------------
20087|  4.41k|            data++;
20088|  4.41k|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1901|  4.41k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (20088:17): [True: 0, False: 4.41k]
  ------------------
20089|      0|                janet_panicf("unsafe flag not given, "
20090|      0|                             "will not unmarshal raw pointer at index %d",
20091|      0|                             (int)(data - st->start));
20092|      0|            }
20093|  4.41k|            union {
20094|  4.41k|                void *ptr;
20095|  4.41k|                uint8_t bytes[sizeof(void *)];
20096|  4.41k|            } u;
20097|  4.41k|            memcpy(u.bytes, data, sizeof(void *));
20098|  4.41k|            data += sizeof(void *);
20099|  4.41k|            *out = janet_wrap_pointer(u.ptr);
  ------------------
  |  |  849|  4.41k|#define janet_wrap_pointer(s) janet_nanbox_wrap_((s), JANET_POINTER)
  |  |  ------------------
  |  |  |  |  820|  4.41k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  4.41k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  4.41k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20100|  4.41k|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  706|  4.41k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  4.41k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  4.41k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  4.41k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  4.41k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  4.41k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  4.41k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 0, False: 4.41k]
  |  |  |  |  |  |  |  Branch (717:50): [True: 490, False: 3.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    490|#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))
  |  |  ------------------
  |  |  |  |  715|  4.41k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  4.41k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20101|  4.41k|            return data;
20102|  4.41k|        }
20103|      0|#ifdef JANET_EV
20104|      1|        case LB_POINTER_BUFFER: {
  ------------------
  |  Branch (20104:9): [True: 1, False: 130M]
  ------------------
20105|      1|            data++;
20106|      1|            int32_t count = readnat(st, &data);
20107|      1|            int32_t capacity = readnat(st, &data);
20108|      1|            MARSH_EOS(st, data + sizeof(void *));
  ------------------
  |  |19262|      1|#define MARSH_EOS(st, data) do { \
  |  |19263|      1|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19263:9): [True: 0, False: 1]
  |  |  ------------------
  |  |19264|      1|} while (0)
  |  |  ------------------
  |  |  |  Branch (19264:10): [Folded, False: 1]
  |  |  ------------------
  ------------------
20109|      1|            union {
20110|      1|                void *ptr;
20111|      1|                uint8_t bytes[sizeof(void *)];
20112|      1|            } u;
20113|      1|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1901|      1|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (20113:17): [True: 1, False: 0]
  ------------------
20114|      1|                janet_panicf("unsafe flag not given, "
20115|      1|                             "will not unmarshal raw pointer at index %d",
20116|      1|                             (int)(data - st->start));
20117|      1|            }
20118|      0|            memcpy(u.bytes, data, sizeof(void *));
20119|      0|            data += sizeof(void *);
20120|      0|            JanetBuffer *buffer = janet_pointer_buffer_unsafe(u.ptr, capacity, count);
20121|      0|            *out = janet_wrap_buffer(buffer);
  ------------------
  |  |  842|      0|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20122|      0|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  706|      0|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|      0|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|      0|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|      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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|      0|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (717:50): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|      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))
  |  |  ------------------
  |  |  |  |  715|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20123|      0|            return data;
20124|      1|        }
20125|      0|#endif
20126|   120k|        case LB_UNSAFE_CFUNCTION: {
  ------------------
  |  Branch (20126:9): [True: 120k, False: 129M]
  ------------------
20127|   120k|            MARSH_EOS(st, data + sizeof(JanetCFunction));
  ------------------
  |  |19262|   120k|#define MARSH_EOS(st, data) do { \
  |  |19263|   120k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19263:9): [True: 0, False: 120k]
  |  |  ------------------
  |  |19264|   120k|} while (0)
  |  |  ------------------
  |  |  |  Branch (19264:10): [Folded, False: 120k]
  |  |  ------------------
  ------------------
20128|   120k|            data++;
20129|   120k|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1901|   120k|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (20129:17): [True: 0, False: 120k]
  ------------------
20130|      0|                janet_panicf("unsafe flag not given, "
20131|      0|                             "will not unmarshal function pointer at index %d",
20132|      0|                             (int)(data - st->start));
20133|      0|            }
20134|   120k|            union {
20135|   120k|                JanetCFunction ptr;
20136|   120k|                uint8_t bytes[sizeof(JanetCFunction)];
20137|   120k|            } u;
20138|   120k|            memcpy(u.bytes, data, sizeof(JanetCFunction));
20139|   120k|            data += sizeof(JanetCFunction);
20140|   120k|            *out = janet_wrap_cfunction(u.ptr);
  ------------------
  |  |  848|   120k|#define janet_wrap_cfunction(s) janet_nanbox_wrap_((s), JANET_CFUNCTION)
  |  |  ------------------
  |  |  |  |  820|   120k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   120k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   120k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20141|   120k|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  706|   120k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|   120k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|   120k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|   120k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|   120k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|   120k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|   120k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 0, False: 120k]
  |  |  |  |  |  |  |  Branch (717:50): [True: 242, False: 120k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    242|#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))
  |  |  ------------------
  |  |  |  |  715|   120k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|   120k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20142|   120k|            return data;
20143|   120k|        }
20144|      0|#ifdef JANET_EV
20145|      1|        case LB_THREADED_ABSTRACT: {
  ------------------
  |  Branch (20145:9): [True: 1, False: 130M]
  ------------------
20146|      1|            MARSH_EOS(st, data + sizeof(void *));
  ------------------
  |  |19262|      1|#define MARSH_EOS(st, data) do { \
  |  |19263|      1|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19263:9): [True: 1, False: 0]
  |  |  ------------------
  |  |19264|      1|} while (0)
  |  |  ------------------
  |  |  |  Branch (19264:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
20147|      0|            data++;
20148|      0|            if (!(flags & JANET_MARSHAL_UNSAFE)) {
  ------------------
  |  | 1901|      0|#define JANET_MARSHAL_UNSAFE 0x20000
  ------------------
  |  Branch (20148:17): [True: 0, False: 0]
  ------------------
20149|      0|                janet_panicf("unsafe flag not given, "
20150|      0|                             "will not unmarshal threaded abstract pointer at index %d",
20151|      0|                             (int)(data - st->start));
20152|      0|            }
20153|      0|            union {
20154|      0|                void *ptr;
20155|      0|                uint8_t bytes[sizeof(void *)];
20156|      0|            } u;
20157|      0|            memcpy(u.bytes, data, sizeof(void *));
20158|      0|            data += sizeof(void *);
20159|       |
20160|      0|            if (flags & JANET_MARSHAL_DECREF) {
  ------------------
  |  |  384|      0|#define JANET_MARSHAL_DECREF 0x40000
  ------------------
  |  Branch (20160:17): [True: 0, False: 0]
  ------------------
20161|       |                /* Decrement immediately and don't bother putting into heap */
20162|      0|                janet_abstract_decref(u.ptr);
20163|      0|                *out = janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20164|      0|            } else {
20165|      0|                *out = janet_wrap_abstract(u.ptr);
  ------------------
  |  |  846|      0|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20166|      0|                Janet check = janet_table_get(&janet_vm.threaded_abstracts, *out);
20167|      0|                if (janet_checktype(check, JANET_NIL)) {
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 0]
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20168|       |                    /* Transfers reference from threaded channel buffer to current heap */
20169|      0|                    janet_table_put(&janet_vm.threaded_abstracts, *out, janet_wrap_false());
  ------------------
  |  |  828|      0|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20170|      0|                } else {
20171|       |                    /* Heap reference already accounted for, remove threaded channel reference. */
20172|      0|                    janet_abstract_decref(u.ptr);
20173|      0|                }
20174|      0|            }
20175|       |
20176|      0|            janet_v_push(st->lookup, *out);
  ------------------
  |  |  706|      0|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|      0|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|      0|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|      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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|      0|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (717:50): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|      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))
  |  |  ------------------
  |  |  |  |  715|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
20177|      0|            return data;
20178|      0|        }
20179|      0|#endif
20180|      4|        default: {
  ------------------
  |  Branch (20180:9): [True: 4, False: 130M]
  ------------------
20181|      4|            janet_panicf("unknown byte %x at index %d",
20182|      4|                         *data,
20183|      4|                         (int)(data - st->start));
20184|      0|            return NULL;
20185|      0|        }
20186|   130M|    }
20187|   130M|}
janet.c:readnat:
19299|   161M|static int32_t readnat(UnmarshalState *st, const uint8_t **atdata) {
19300|   161M|    int32_t ret = readint(st, atdata);
19301|   161M|    if (ret < 0) {
  ------------------
  |  Branch (19301:9): [True: 8, False: 161M]
  ------------------
19302|      8|        janet_panicf("expected integer >= 0, got %d", ret);
19303|      8|    }
19304|   161M|    return ret;
19305|   161M|}
janet.c:unmarshal_one_fiber:
19618|    354|    int flags) {
19619|       |
19620|       |    /* Initialize a new fiber with gc friendly defaults */
19621|    354|    JanetFiber *fiber = janet_gcalloc(JANET_MEMORY_FIBER, sizeof(JanetFiber));
19622|    354|    fiber->flags = 0;
19623|    354|    fiber->frame = 0;
19624|    354|    fiber->stackstart = 0;
19625|    354|    fiber->stacktop = 0;
19626|    354|    fiber->capacity = 0;
19627|    354|    fiber->maxstack = 0;
19628|    354|    fiber->data = NULL;
19629|    354|    fiber->child = NULL;
19630|    354|    fiber->env = NULL;
19631|    354|    fiber->last_value = janet_wrap_nil();
  ------------------
  |  |  826|    354|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|    354|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    354|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    354|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19632|    354|#ifdef JANET_EV
19633|    354|    fiber->sched_id = 0;
19634|    354|    fiber->supervisor_channel = NULL;
19635|    354|    fiber->ev_state = NULL;
19636|    354|    fiber->ev_callback = NULL;
19637|    354|    fiber->ev_stream = NULL;
19638|    354|#endif
19639|       |
19640|       |    /* Push fiber to seen stack */
19641|    354|    janet_v_push(st->lookup, janet_wrap_fiber(fiber));
  ------------------
  |  |  706|    354|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|    354|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|    354|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|      1|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|      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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|      1|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|      1|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 353, False: 1]
  |  |  |  |  |  |  |  Branch (717:50): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    354|#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))
  |  |  ------------------
  |  |  |  |  715|    354|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|    354|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19642|       |
19643|       |    /* Read ints */
19644|    354|    int32_t fiber_flags = readint(st, &data);
19645|    354|    int32_t frame = readnat(st, &data);
19646|    354|    int32_t fiber_stackstart = readnat(st, &data);
19647|    354|    int32_t fiber_stacktop = readnat(st, &data);
19648|    354|    int32_t fiber_maxstack = readnat(st, &data);
19649|    354|    JanetTable *fiber_env = NULL;
19650|       |
19651|       |    /* Check for bad flags and ints */
19652|    354|    if ((int32_t)(frame + JANET_FRAME_SIZE) > fiber_stackstart ||
  ------------------
  |  | 1017|    354|#define JANET_FRAME_SIZE 4
  ------------------
  |  Branch (19652:9): [True: 9, False: 345]
  ------------------
19653|    345|            fiber_stackstart > fiber_stacktop ||
  ------------------
  |  Branch (19653:13): [True: 1, False: 344]
  ------------------
19654|    344|            fiber_stacktop > fiber_maxstack) {
  ------------------
  |  Branch (19654:13): [True: 1, False: 343]
  ------------------
19655|      4|        janet_panic("fiber has incorrect stack setup");
19656|      4|    }
19657|       |
19658|       |    /* Allocate stack memory */
19659|    350|    if (fiber_stacktop < INT32_MAX - 10) {
  ------------------
  |  Branch (19659:9): [True: 343, False: 7]
  ------------------
19660|    343|        fiber->capacity = fiber_stacktop + 10;
19661|    343|    } else {
19662|       |        /* Extra capacity is usually nice to avoid immediately reallocing on pushed arguments, but not needed */
19663|      7|        fiber->capacity = INT32_MAX;
19664|      7|    }
19665|    350|    fiber->data = janet_malloc(sizeof(Janet) * fiber->capacity);
  ------------------
  |  | 2393|    350|#define janet_malloc(X) malloc((X))
  ------------------
19666|    350|    if (!fiber->data) {
  ------------------
  |  Branch (19666:9): [True: 0, False: 350]
  ------------------
19667|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
19668|      0|    }
19669|   142k|    for (int32_t i = 0; i < fiber->capacity; i++) {
  ------------------
  |  Branch (19669:25): [True: 142k, False: 350]
  ------------------
19670|   142k|        fiber->data[i] = janet_wrap_nil();
  ------------------
  |  |  826|   142k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|   142k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   142k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   142k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19671|   142k|    }
19672|       |
19673|       |    /* get frames */
19674|    350|    int32_t stack = frame;
19675|    350|    int32_t stacktop = fiber_stackstart - JANET_FRAME_SIZE;
  ------------------
  |  | 1017|    350|#define JANET_FRAME_SIZE 4
  ------------------
19676|    693|    while (stack > 0) {
  ------------------
  |  Branch (19676:12): [True: 343, False: 350]
  ------------------
19677|    343|        JanetFunction *func = NULL;
19678|    343|        JanetFuncDef *def = NULL;
19679|    343|        JanetFuncEnv *env = NULL;
19680|    343|        int32_t frameflags = readint(st, &data);
19681|    343|        int32_t prevframe = readnat(st, &data);
19682|    343|        int32_t pcdiff = readnat(st, &data);
19683|       |
19684|       |        /* Get frame items */
19685|    343|        Janet *framestack = fiber->data + stack;
19686|    343|        JanetStackFrame *framep = janet_stack_frame(framestack);
  ------------------
  |  |  801|    343|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1017|    343|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
19687|       |
19688|       |        /* Get function */
19689|    343|        Janet funcv;
19690|    343|        data = unmarshal_one(st, data, &funcv, flags + 1);
19691|    343|        janet_asserttype(funcv, JANET_FUNCTION, st);
19692|    343|        func = janet_unwrap_function(funcv);
  ------------------
  |  |  863|    343|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
19693|    343|        def = func->def;
19694|       |
19695|       |        /* Check env */
19696|    343|        if (frameflags & JANET_STACKFRAME_HASENV) {
  ------------------
  |  |18875|    343|#define JANET_STACKFRAME_HASENV   (INT32_MIN)
  ------------------
  |  Branch (19696:13): [True: 0, False: 343]
  ------------------
19697|      0|            frameflags &= ~JANET_STACKFRAME_HASENV;
  ------------------
  |  |18875|      0|#define JANET_STACKFRAME_HASENV   (INT32_MIN)
  ------------------
19698|      0|            data = unmarshal_one_env(st, data, &env, flags + 1);
19699|      0|        }
19700|       |
19701|       |        /* Error checking */
19702|    343|        int32_t expected_framesize = def->slotcount;
19703|    343|        if (expected_framesize != stacktop - stack) {
  ------------------
  |  Branch (19703:13): [True: 0, False: 343]
  ------------------
19704|      0|            janet_panic("fiber stackframe size mismatch");
19705|      0|        }
19706|    343|        if (pcdiff >= def->bytecode_length) {
  ------------------
  |  Branch (19706:13): [True: 0, False: 343]
  ------------------
19707|      0|            janet_panic("fiber stackframe has invalid pc");
19708|      0|        }
19709|    343|        if ((int32_t)(prevframe + JANET_FRAME_SIZE) > stack) {
  ------------------
  |  | 1017|    343|#define JANET_FRAME_SIZE 4
  ------------------
  |  Branch (19709:13): [True: 0, False: 343]
  ------------------
19710|      0|            janet_panic("fiber stackframe does not align with previous frame");
19711|      0|        }
19712|       |
19713|       |        /* Get stack items */
19714|   136k|        for (int32_t i = stack; i < stacktop; i++)
  ------------------
  |  Branch (19714:33): [True: 136k, False: 343]
  ------------------
19715|   136k|            data = unmarshal_one(st, data, fiber->data + i, flags + 1);
19716|       |
19717|       |        /* Set frame */
19718|    343|        framep->env = env;
19719|    343|        framep->pc = def->bytecode + pcdiff;
19720|    343|        framep->prevframe = prevframe;
19721|    343|        framep->flags = frameflags;
19722|    343|        framep->func = func;
19723|       |
19724|       |        /* Goto previous frame */
19725|    343|        stacktop = stack - JANET_FRAME_SIZE;
  ------------------
  |  | 1017|    343|#define JANET_FRAME_SIZE 4
  ------------------
19726|    343|        stack = prevframe;
19727|    343|    }
19728|    350|    if (stack < 0) {
  ------------------
  |  Branch (19728:9): [True: 0, False: 350]
  ------------------
19729|      0|        janet_panic("fiber has too many stackframes");
19730|      0|    }
19731|       |
19732|       |    /* Check for fiber env */
19733|    350|    if (fiber_flags & JANET_FIBER_FLAG_HASENV) {
  ------------------
  |  |18874|    350|#define JANET_FIBER_FLAG_HASENV   (1 << 30)
  ------------------
  |  Branch (19733:9): [True: 343, False: 7]
  ------------------
19734|    343|        Janet envv;
19735|    343|        fiber_flags &= ~JANET_FIBER_FLAG_HASENV;
  ------------------
  |  |18874|    343|#define JANET_FIBER_FLAG_HASENV   (1 << 30)
  ------------------
19736|    343|        data = unmarshal_one(st, data, &envv, flags + 1);
19737|    343|        janet_asserttype(envv, JANET_TABLE, st);
19738|    343|        fiber_env = janet_unwrap_table(envv);
  ------------------
  |  |  856|    343|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
19739|    343|    }
19740|       |
19741|       |    /* Check for child fiber */
19742|    350|    if (fiber_flags & JANET_FIBER_FLAG_HASCHILD) {
  ------------------
  |  |18873|    350|#define JANET_FIBER_FLAG_HASCHILD (1 << 29)
  ------------------
  |  Branch (19742:9): [True: 0, False: 350]
  ------------------
19743|      0|        Janet fiberv;
19744|      0|        fiber_flags &= ~JANET_FIBER_FLAG_HASCHILD;
  ------------------
  |  |18873|      0|#define JANET_FIBER_FLAG_HASCHILD (1 << 29)
  ------------------
19745|      0|        data = unmarshal_one(st, data, &fiberv, flags + 1);
19746|      0|        janet_asserttype(fiberv, JANET_FIBER, st);
19747|      0|        fiber->child = janet_unwrap_fiber(fiberv);
  ------------------
  |  |  854|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
19748|      0|    }
19749|       |
19750|       |    /* Get the fiber last value */
19751|    350|    data = unmarshal_one(st, data, &fiber->last_value, flags + 1);
19752|       |
19753|       |    /* We have valid fiber, finally construct remaining fields. */
19754|    350|    fiber->frame = frame;
19755|    350|    fiber->flags = fiber_flags;
19756|    350|    fiber->stackstart = fiber_stackstart;
19757|    350|    fiber->stacktop = fiber_stacktop;
19758|    350|    fiber->maxstack = fiber_maxstack;
19759|    350|    fiber->env = fiber_env;
19760|       |
19761|    350|    int status = janet_fiber_status(fiber);
19762|    350|    if (status < 0 || status > JANET_STATUS_ALIVE) {
  ------------------
  |  Branch (19762:9): [True: 7, False: 343]
  |  Branch (19762:23): [True: 0, False: 343]
  ------------------
19763|      0|        janet_panic("invalid fiber status");
19764|      0|    }
19765|       |
19766|       |    /* Return data */
19767|    350|    *out = fiber;
19768|    350|    return data;
19769|    350|}
janet.c:unmarshal_one_def:
19438|  4.15M|    int flags) {
19439|  4.15M|    MARSH_EOS(st, data);
  ------------------
  |  |19262|  4.15M|#define MARSH_EOS(st, data) do { \
  |  |19263|  4.15M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19263:9): [True: 0, False: 4.15M]
  |  |  ------------------
  |  |19264|  4.15M|} while (0)
  |  |  ------------------
  |  |  |  Branch (19264:10): [Folded, False: 4.15M]
  |  |  ------------------
  ------------------
19440|  4.15M|    if (*data == LB_FUNCDEF_REF) {
  ------------------
  |  Branch (19440:9): [True: 30.0k, False: 4.12M]
  ------------------
19441|  30.0k|        data++;
19442|  30.0k|        int32_t index = readint(st, &data);
19443|  30.0k|        if (index < 0 || index >= janet_v_count(st->lookup_defs))
  ------------------
  |  |  708|  30.0k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  30.0k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  30.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 30.0k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (19443:13): [True: 0, False: 30.0k]
  |  Branch (19443:26): [True: 0, False: 30.0k]
  ------------------
19444|      0|            janet_panicf("invalid funcdef reference %d", index);
19445|  30.0k|        *out = st->lookup_defs[index];
19446|  4.12M|    } else {
19447|       |        /* Initialize with values that will not break garbage collection
19448|       |         * if unmarshalling fails. */
19449|  4.12M|        JanetFuncDef *def = janet_gcalloc(JANET_MEMORY_FUNCDEF, sizeof(JanetFuncDef));
19450|  4.12M|        def->environments_length = 0;
19451|  4.12M|        def->defs_length = 0;
19452|  4.12M|        def->constants_length = 0;
19453|  4.12M|        def->bytecode_length = 0;
19454|  4.12M|        def->name = NULL;
19455|  4.12M|        def->source = NULL;
19456|  4.12M|        def->closure_bitset = NULL;
19457|  4.12M|        def->defs = NULL;
19458|  4.12M|        def->environments = NULL;
19459|  4.12M|        def->constants = NULL;
19460|  4.12M|        def->bytecode = NULL;
19461|  4.12M|        def->sourcemap = NULL;
19462|  4.12M|        def->symbolmap = NULL;
19463|  4.12M|        def->symbolmap_length = 0;
19464|  4.12M|        def->named_args_count = 0;
19465|  4.12M|        janet_v_push(st->lookup_defs, def);
  ------------------
  |  |  706|  4.12M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  4.12M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  4.12M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  4.11M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  4.11M|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  4.11M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  4.11M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 7.69k, False: 4.11M]
  |  |  |  |  |  |  |  Branch (717:50): [True: 75.5k, False: 4.04M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  83.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))
  |  |  ------------------
  |  |  |  |  715|  4.12M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  4.12M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19466|       |
19467|       |        /* Set default lengths to zero */
19468|  4.12M|        int32_t bytecode_length = 0;
19469|  4.12M|        int32_t constants_length = 0;
19470|  4.12M|        int32_t environments_length = 0;
19471|  4.12M|        int32_t defs_length = 0;
19472|  4.12M|        int32_t symbolmap_length = 0;
19473|       |
19474|       |        /* Read flags and other fixed values */
19475|  4.12M|        def->flags = readint(st, &data);
19476|  4.12M|        def->slotcount = readnat(st, &data);
19477|  4.12M|        def->arity = readnat(st, &data);
19478|  4.12M|        def->min_arity = readnat(st, &data);
19479|  4.12M|        def->max_arity = readnat(st, &data);
19480|       |
19481|       |        /* Read some lengths */
19482|  4.12M|        constants_length = readnat(st, &data);
19483|  4.12M|        bytecode_length = readnat(st, &data);
19484|  4.12M|        if (def->flags & JANET_FUNCDEF_FLAG_NAMEDARGS)
  ------------------
  |  | 1098|  4.12M|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (19484:13): [True: 15.0k, False: 4.11M]
  ------------------
19485|  15.0k|            def->named_args_count = readnat(st, &data);
19486|  4.12M|        if (def->flags & JANET_FUNCDEF_FLAG_HASENVS)
  ------------------
  |  | 1094|  4.12M|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (19486:13): [True: 3.87M, False: 247k]
  ------------------
19487|  3.87M|            environments_length = readnat(st, &data);
19488|  4.12M|        if (def->flags & JANET_FUNCDEF_FLAG_HASDEFS)
  ------------------
  |  | 1093|  4.12M|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (19488:13): [True: 594k, False: 3.53M]
  ------------------
19489|   594k|            defs_length = readnat(st, &data);
19490|  4.12M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSYMBOLMAP)
  ------------------
  |  | 1090|  4.12M|#define JANET_FUNCDEF_FLAG_HASSYMBOLMAP 0x40000
  ------------------
  |  Branch (19490:13): [True: 3.73M, False: 393k]
  ------------------
19491|  3.73M|            symbolmap_length = readnat(st, &data);
19492|       |
19493|       |        /* Check name and source (optional) */
19494|  4.12M|        if (def->flags & JANET_FUNCDEF_FLAG_HASNAME) {
  ------------------
  |  | 1091|  4.12M|#define JANET_FUNCDEF_FLAG_HASNAME 0x80000
  ------------------
  |  Branch (19494:13): [True: 3.85M, False: 270k]
  ------------------
19495|  3.85M|            Janet x;
19496|  3.85M|            data = unmarshal_one(st, data, &x, flags + 1);
19497|  3.85M|            janet_asserttype(x, JANET_STRING, st);
19498|  3.85M|            def->name = janet_unwrap_string(x);
  ------------------
  |  |  858|  3.85M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
19499|  3.85M|        }
19500|  4.12M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSOURCE) {
  ------------------
  |  | 1092|  4.12M|#define JANET_FUNCDEF_FLAG_HASSOURCE 0x100000
  ------------------
  |  Branch (19500:13): [True: 3.87M, False: 247k]
  ------------------
19501|  3.87M|            Janet x;
19502|  3.87M|            data = unmarshal_one(st, data, &x, flags + 1);
19503|  3.87M|            janet_asserttype(x, JANET_STRING, st);
19504|  3.87M|            def->source = janet_unwrap_string(x);
  ------------------
  |  |  858|  3.87M|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
19505|  3.87M|        }
19506|       |
19507|       |        /* Unmarshal constants */
19508|  4.12M|        if (constants_length) {
  ------------------
  |  Branch (19508:13): [True: 3.09M, False: 1.03M]
  ------------------
19509|  3.09M|            def->constants = janet_malloc(sizeof(Janet) * constants_length);
  ------------------
  |  | 2393|  3.09M|#define janet_malloc(X) malloc((X))
  ------------------
19510|  3.09M|            if (!def->constants) {
  ------------------
  |  Branch (19510:17): [True: 0, False: 3.09M]
  ------------------
19511|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
19512|      0|            }
19513|  20.0M|            for (int32_t i = 0; i < constants_length; i++)
  ------------------
  |  Branch (19513:33): [True: 16.9M, False: 3.09M]
  ------------------
19514|  16.9M|                data = unmarshal_one(st, data, def->constants + i, flags + 1);
19515|  3.09M|        } else {
19516|  1.03M|            def->constants = NULL;
19517|  1.03M|        }
19518|  4.12M|        def->constants_length = constants_length;
19519|       |
19520|       |        /* Unmarshal symbol map, if needed */
19521|  4.12M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSYMBOLMAP) {
  ------------------
  |  | 1090|  4.12M|#define JANET_FUNCDEF_FLAG_HASSYMBOLMAP 0x40000
  ------------------
  |  Branch (19521:13): [True: 3.73M, False: 393k]
  ------------------
19522|  3.73M|            size_t size = sizeof(JanetSymbolMap) * symbolmap_length;
19523|  3.73M|            def->symbolmap = janet_malloc(size);
  ------------------
  |  | 2393|  3.73M|#define janet_malloc(X) malloc((X))
  ------------------
19524|  3.73M|            if (def->symbolmap == NULL) {
  ------------------
  |  Branch (19524:17): [True: 0, False: 3.73M]
  ------------------
19525|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
19526|      0|            }
19527|  45.5M|            for (int32_t i = 0; i < symbolmap_length; i++) {
  ------------------
  |  Branch (19527:33): [True: 41.7M, False: 3.73M]
  ------------------
19528|  41.7M|                def->symbolmap[i].birth_pc = (uint32_t) readint(st, &data);
19529|  41.7M|                def->symbolmap[i].death_pc = (uint32_t) readint(st, &data);
19530|  41.7M|                def->symbolmap[i].slot_index = (uint32_t) readint(st, &data);
19531|  41.7M|                Janet value;
19532|  41.7M|                data = unmarshal_one(st, data, &value, flags + 1);
19533|  41.7M|                if (!janet_checktype(value, JANET_SYMBOL)) {
  ------------------
  |  |  801|  41.7M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 41.7M]
  |  |  ------------------
  |  |  802|  41.7M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  41.7M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  41.7M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  41.7M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  41.7M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  41.7M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (19533:21): [True: 0, False: 41.7M]
  ------------------
19534|      0|                    janet_panicf("corrupted symbolmap when unmarshalling debug info, got %v", value);
19535|      0|                }
19536|  41.7M|                def->symbolmap[i].symbol = janet_unwrap_symbol(value);
  ------------------
  |  |  859|  41.7M|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
19537|  41.7M|            }
19538|  3.73M|            def->symbolmap_length = (uint32_t) symbolmap_length;
19539|  3.73M|        }
19540|       |
19541|       |        /* Unmarshal bytecode */
19542|  4.12M|        def->bytecode = janet_malloc(sizeof(uint32_t) * bytecode_length);
  ------------------
  |  | 2393|  4.12M|#define janet_malloc(X) malloc((X))
  ------------------
19543|  4.12M|        if (!def->bytecode) {
  ------------------
  |  Branch (19543:13): [True: 0, False: 4.12M]
  ------------------
19544|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
19545|      0|        }
19546|  4.12M|        data = janet_unmarshal_u32s(st, data, def->bytecode, bytecode_length);
19547|  4.12M|        def->bytecode_length = bytecode_length;
19548|       |
19549|       |        /* Unmarshal environments */
19550|  4.12M|        if (def->flags & JANET_FUNCDEF_FLAG_HASENVS) {
  ------------------
  |  | 1094|  4.12M|#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
  ------------------
  |  Branch (19550:13): [True: 3.87M, False: 247k]
  ------------------
19551|  3.87M|            def->environments = janet_calloc(1, sizeof(int32_t) * (size_t) environments_length);
  ------------------
  |  | 2399|  3.87M|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
19552|  3.87M|            if (!def->environments) {
  ------------------
  |  Branch (19552:17): [True: 0, False: 3.87M]
  ------------------
19553|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
19554|      0|            }
19555|  5.35M|            for (int32_t i = 0; i < environments_length; i++) {
  ------------------
  |  Branch (19555:33): [True: 1.47M, False: 3.87M]
  ------------------
19556|  1.47M|                def->environments[i] = readint(st, &data);
19557|  1.47M|            }
19558|  3.87M|        } else {
19559|   247k|            def->environments = NULL;
19560|   247k|        }
19561|  4.12M|        def->environments_length = environments_length;
19562|       |
19563|       |        /* Unmarshal sub funcdefs */
19564|  4.12M|        if (def->flags & JANET_FUNCDEF_FLAG_HASDEFS) {
  ------------------
  |  | 1093|  4.12M|#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
  ------------------
  |  Branch (19564:13): [True: 594k, False: 3.53M]
  ------------------
19565|   594k|            def->defs = janet_calloc(1, sizeof(JanetFuncDef *) * (size_t) defs_length);
  ------------------
  |  | 2399|   594k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
19566|   594k|            if (!def->defs) {
  ------------------
  |  Branch (19566:17): [True: 0, False: 594k]
  ------------------
19567|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
19568|      0|            }
19569|  1.86M|            for (int32_t i = 0; i < defs_length; i++) {
  ------------------
  |  Branch (19569:33): [True: 1.27M, False: 594k]
  ------------------
19570|  1.27M|                data = unmarshal_one_def(st, data, def->defs + i, flags + 1);
19571|  1.27M|            }
19572|  3.53M|        } else {
19573|  3.53M|            def->defs = NULL;
19574|  3.53M|        }
19575|  4.12M|        def->defs_length = defs_length;
19576|       |
19577|       |        /* Unmarshal source maps if needed */
19578|  4.12M|        if (def->flags & JANET_FUNCDEF_FLAG_HASSOURCEMAP) {
  ------------------
  |  | 1095|  4.12M|#define JANET_FUNCDEF_FLAG_HASSOURCEMAP 0x800000
  ------------------
  |  Branch (19578:13): [True: 3.87M, False: 247k]
  ------------------
19579|  3.87M|            int32_t current = 0;
19580|  3.87M|            def->sourcemap = janet_malloc(sizeof(JanetSourceMapping) * (size_t) bytecode_length);
  ------------------
  |  | 2393|  3.87M|#define janet_malloc(X) malloc((X))
  ------------------
19581|  3.87M|            if (!def->sourcemap) {
  ------------------
  |  Branch (19581:17): [True: 0, False: 3.87M]
  ------------------
19582|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
19583|      0|            }
19584|   113M|            for (int32_t i = 0; i < bytecode_length; i++) {
  ------------------
  |  Branch (19584:33): [True: 109M, False: 3.87M]
  ------------------
19585|   109M|                current += readint(st, &data);
19586|   109M|                def->sourcemap[i].line = current;
19587|   109M|                def->sourcemap[i].column = readint(st, &data);
19588|   109M|            }
19589|  3.87M|        } else {
19590|   247k|            def->sourcemap = NULL;
19591|   247k|        }
19592|       |
19593|       |        /* Unmarshal closure bitset if needed */
19594|  4.12M|        if (def->flags & JANET_FUNCDEF_FLAG_HASCLOBITSET) {
  ------------------
  |  | 1097|  4.12M|#define JANET_FUNCDEF_FLAG_HASCLOBITSET 0x2000000
  ------------------
  |  Branch (19594:13): [True: 442k, False: 3.68M]
  ------------------
19595|   442k|            int32_t n = (def->slotcount + 31) >> 5;
19596|   442k|            def->closure_bitset = janet_malloc(sizeof(uint32_t) * (size_t) n);
  ------------------
  |  | 2393|   442k|#define janet_malloc(X) malloc((X))
  ------------------
19597|   442k|            if (NULL == def->closure_bitset) {
  ------------------
  |  Branch (19597:17): [True: 0, False: 442k]
  ------------------
19598|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
19599|      0|            }
19600|   442k|            data = janet_unmarshal_u32s(st, data, def->closure_bitset, n);
19601|   442k|        }
19602|       |
19603|       |        /* Validate */
19604|  4.12M|        if (janet_verify(def))
  ------------------
  |  Branch (19604:13): [True: 0, False: 4.12M]
  ------------------
19605|      0|            janet_panic("funcdef has invalid bytecode");
19606|       |
19607|       |        /* Set def */
19608|  4.12M|        *out = def;
19609|  4.12M|    }
19610|  4.15M|    return data;
19611|  4.15M|}
janet.c:janet_unmarshal_u32s:
19420|  4.56M|static const uint8_t *janet_unmarshal_u32s(UnmarshalState *st, const uint8_t *data, uint32_t *into, int32_t n) {
19421|   117M|    for (int32_t i = 0; i < n; i++) {
  ------------------
  |  Branch (19421:25): [True: 113M, False: 4.56M]
  ------------------
19422|   113M|        MARSH_EOS(st, data + 3);
  ------------------
  |  |19262|   113M|#define MARSH_EOS(st, data) do { \
  |  |19263|   113M|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19263:9): [True: 0, False: 113M]
  |  |  ------------------
  |  |19264|   113M|} while (0)
  |  |  ------------------
  |  |  |  Branch (19264:10): [Folded, False: 113M]
  |  |  ------------------
  ------------------
19423|   113M|        into[i] =
19424|   113M|            (uint32_t)(data[0]) |
19425|   113M|            ((uint32_t)(data[1]) << 8) |
19426|   113M|            ((uint32_t)(data[2]) << 16) |
19427|   113M|            ((uint32_t)(data[3]) << 24);
19428|   113M|        data += 4;
19429|   113M|    }
19430|  4.56M|    return data;
19431|  4.56M|}
janet.c:unmarshal_one_env:
19376|   322k|    int flags) {
19377|   322k|    MARSH_EOS(st, data);
  ------------------
  |  |19262|   322k|#define MARSH_EOS(st, data) do { \
  |  |19263|   322k|    if ((data) >= (st)->end) janet_panic("unexpected end of source");\
  |  |  ------------------
  |  |  |  Branch (19263:9): [True: 0, False: 322k]
  |  |  ------------------
  |  |19264|   322k|} while (0)
  |  |  ------------------
  |  |  |  Branch (19264:10): [Folded, False: 322k]
  |  |  ------------------
  ------------------
19378|   322k|    if (*data == LB_FUNCENV_REF) {
  ------------------
  |  Branch (19378:9): [True: 262k, False: 60.0k]
  ------------------
19379|   262k|        data++;
19380|   262k|        int32_t index = readint(st, &data);
19381|   262k|        if (index < 0 || index >= janet_v_count(st->lookup_envs))
  ------------------
  |  |  708|   262k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|   262k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|   262k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 262k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (19381:13): [True: 18.4E, False: 262k]
  |  Branch (19381:26): [True: 0, False: 262k]
  ------------------
19382|      0|            janet_panicf("invalid funcenv reference %d", index);
19383|   262k|        *out = st->lookup_envs[index];
19384|   262k|    } else {
19385|  60.0k|        JanetFuncEnv *env = janet_gcalloc(JANET_MEMORY_FUNCENV, sizeof(JanetFuncEnv));
19386|  60.0k|        env->length = 0;
19387|  60.0k|        env->offset = 0;
19388|  60.0k|        env->as.values = NULL;
19389|  60.0k|        janet_v_push(st->lookup_envs, env);
  ------------------
  |  |  706|  60.0k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  60.0k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  60.0k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  52.5k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  52.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  52.5k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  52.5k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 7.50k, False: 52.5k]
  |  |  |  |  |  |  |  Branch (717:50): [True: 30.0k, False: 22.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  37.5k|#define janet_v__grow(v, n)      ((v) = janet_v_grow((v), (n), sizeof(*(v))))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  715|  60.0k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  60.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19390|  60.0k|        int32_t offset = readnat(st, &data);
19391|  60.0k|        int32_t length = readnat(st, &data);
19392|  60.0k|        if (offset > 0) {
  ------------------
  |  Branch (19392:13): [True: 0, False: 60.0k]
  ------------------
19393|      0|            Janet fiberv;
19394|       |            /* On stack variant */
19395|      0|            data = unmarshal_one(st, data, &fiberv, flags);
19396|      0|            janet_asserttype(fiberv, JANET_FIBER, st);
19397|      0|            env->as.fiber = janet_unwrap_fiber(fiberv);
  ------------------
  |  |  854|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
19398|       |            /* Negative offset indicates untrusted input */
19399|      0|            env->offset = -offset;
19400|  60.0k|        } else {
19401|       |            /* Off stack variant */
19402|  60.0k|            if (length == 0) {
  ------------------
  |  Branch (19402:17): [True: 0, False: 60.0k]
  ------------------
19403|      0|                janet_panic("invalid funcenv length");
19404|      0|            }
19405|  60.0k|            env->as.values = janet_malloc(sizeof(Janet) * (size_t) length);
  ------------------
  |  | 2393|  60.0k|#define janet_malloc(X) malloc((X))
  ------------------
19406|  60.0k|            if (!env->as.values) {
  ------------------
  |  Branch (19406:17): [True: 0, False: 60.0k]
  ------------------
19407|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
19408|      0|            }
19409|  60.0k|            env->offset = 0;
19410|   780k|            for (int32_t i = 0; i < length; i++)
  ------------------
  |  Branch (19410:33): [True: 720k, False: 60.0k]
  ------------------
19411|   720k|                data = unmarshal_one(st, data, env->as.values + i, flags);
19412|  60.0k|        }
19413|  60.0k|        env->length = length;
19414|  60.0k|        *out = env;
19415|  60.0k|    }
19416|   322k|    return data;
19417|   322k|}
janet.c:unmarshal_one_abstract:
19853|  1.04k|static const uint8_t *unmarshal_one_abstract(UnmarshalState *st, const uint8_t *data, Janet *out, int flags) {
19854|  1.04k|    Janet key;
19855|  1.04k|    data = unmarshal_one(st, data, &key, flags + 1);
19856|  1.04k|    const JanetAbstractType *at = janet_get_abstract_type(key);
19857|  1.04k|    if (at == NULL) janet_panic("unknown abstract type");
  ------------------
  |  Branch (19857:9): [True: 1, False: 1.04k]
  ------------------
19858|  1.04k|    if (at->unmarshal) {
  ------------------
  |  Branch (19858:9): [True: 1.04k, False: 0]
  ------------------
19859|  1.04k|        JanetMarshalContext context = {NULL, st, flags, data, at};
19860|  1.04k|        void *abst = at->unmarshal(&context);
19861|  1.04k|        janet_assert(abst != NULL, "null pointer abstract");
  ------------------
  |  |  386|  1.04k|#define janet_assert(c, m) do { \
  |  |  387|  1.04k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 1.04k]
  |  |  ------------------
  |  |  388|  1.04k|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 1.04k]
  |  |  ------------------
  ------------------
19862|  1.04k|        *out = janet_wrap_abstract(abst);
  ------------------
  |  |  846|  1.04k|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|  1.04k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
19863|  1.04k|        if (context.at != NULL) {
  ------------------
  |  Branch (19863:13): [True: 0, False: 1.04k]
  ------------------
19864|      0|            janet_panic("janet_unmarshal_abstract not called");
19865|      0|        }
19866|  1.04k|        return context.data;
19867|  1.04k|    }
19868|      0|    janet_panic("invalid abstract type - no unmarshal function pointer");
19869|  1.04k|}
janet.c:janet_asserttype:
19338|  7.73M|static void janet_asserttype(Janet x, JanetType t, UnmarshalState *st) {
19339|  7.73M|    if (!janet_checktype(x, t)) {
  ------------------
  |  |  801|  7.73M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [True: 0, False: 7.73M]
  |  |  ------------------
  |  |  802|  7.73M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  7.73M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  7.73M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  7.73M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  7.73M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  7.73M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (19339:9): [True: 3, False: 7.73M]
  ------------------
19340|       |#ifdef JANET_MARSHAL_DEBUG
19341|       |        dump_reference_table(st);
19342|       |#else
19343|      3|        (void) st;
19344|      3|#endif
19345|      3|        janet_panicf("expected type %T, got %v", 1 << t, x);
19346|      3|    }
19347|  7.73M|}
janet.c:janet_rng_get:
20499|     10|static int janet_rng_get(void *p, Janet key, Janet *out) {
20500|     10|    (void) p;
20501|     10|    if (!janet_checktype(key, JANET_KEYWORD)) return 0;
  ------------------
  |  |  801|     10|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 10]
  |  |  ------------------
  |  |  802|     10|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|     10|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|     10|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|     10|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     10|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     10|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (20501:9): [True: 1, False: 9]
  ------------------
20502|      9|    return janet_getmethod(janet_unwrap_keyword(key), rng_methods, out);
  ------------------
  |  |  860|      9|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
20503|     10|}
janet.c:janet_net_socknoblock:
20842|      6|static void janet_net_socknoblock(JSock s) {
20843|       |#ifdef JANET_WINDOWS
20844|       |    unsigned long arg = 1;
20845|       |    ioctlsocket(s, FIONBIO, &arg);
20846|       |#else
20847|       |#if !defined(SOCK_CLOEXEC) && defined(O_CLOEXEC)
20848|       |    int extra = O_CLOEXEC;
20849|       |#else
20850|      6|    int extra = 0;
20851|      6|#endif
20852|      6|    fcntl(s, F_SETFL, fcntl(s, F_GETFL, 0) | O_NONBLOCK | extra);
20853|       |#ifdef SO_NOSIGPIPE
20854|       |    int enable = 1;
20855|       |    setsockopt(s, SOL_SOCKET, SO_NOSIGPIPE, &enable, sizeof(int));
20856|       |#endif
20857|      6|#endif
20858|      6|}
janet.c:janet_get_sockettype:
21121|     21|static int janet_get_sockettype(Janet *argv, int32_t argc, int32_t n) {
21122|     21|    JanetKeyword stype = janet_optkeyword(argv, argc, n, NULL);
21123|     21|    int socktype = SOCK_DGRAM;
21124|     21|    if ((NULL == stype) || !janet_cstrcmp(stype, "stream")) {
  ------------------
  |  Branch (21124:9): [True: 10, False: 11]
  |  Branch (21124:28): [True: 0, False: 11]
  ------------------
21125|      9|        socktype = SOCK_STREAM;
21126|     12|    } else if (janet_cstrcmp(stype, "datagram")) {
  ------------------
  |  Branch (21126:16): [True: 11, False: 1]
  ------------------
21127|     11|        janet_panicf("expected socket type as :stream or :datagram, got %v", argv[n]);
21128|     11|    }
21129|     10|    return socktype;
21130|     21|}
janet.c:janet_get_addrinfo:
21135|      3|static struct addrinfo *janet_get_addrinfo(Janet *argv, int32_t offset, int socktype, int passive, int *is_unix, socklen_t *sizeout) {
21136|       |    /* Unix socket support - not yet supported on windows. */
21137|      3|#ifndef JANET_WINDOWS
21138|      3|    if (janet_keyeq(argv[offset], "unix")) {
  ------------------
  |  Branch (21138:9): [True: 0, False: 3]
  ------------------
21139|      0|        const char *path = janet_getcstring(argv, offset + 1);
21140|      0|        struct sockaddr_un *saddr = janet_calloc(1, sizeof(struct sockaddr_un));
  ------------------
  |  | 2399|      0|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
21141|      0|        if (saddr == NULL) {
  ------------------
  |  Branch (21141:13): [True: 0, False: 0]
  ------------------
21142|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
21143|      0|        }
21144|      0|        saddr->sun_family = AF_UNIX;
21145|      0|        size_t path_size = sizeof(saddr->sun_path);
21146|      0|        snprintf(saddr->sun_path, path_size, "%s", path);
21147|      0|        *sizeout = sizeof(struct sockaddr_un);
21148|      0|#ifdef JANET_LINUX
21149|      0|        if (path[0] == '@') {
  ------------------
  |  Branch (21149:13): [True: 0, False: 0]
  ------------------
21150|      0|            saddr->sun_path[0] = '\0';
21151|      0|            *sizeout = offsetof(struct sockaddr_un, sun_path) + janet_string_length(path);
  ------------------
  |  | 1803|      0|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|      0|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
21152|      0|        }
21153|      0|#endif
21154|      0|        *is_unix = 1;
21155|      0|        return (struct addrinfo *) saddr;
21156|      0|    }
21157|      3|#endif
21158|       |    /* Get host and port */
21159|      3|    char *host = (char *)janet_getcstring(argv, offset);
21160|      3|    char *port = NULL;
21161|      3|    if (janet_checkint(argv[offset + 1])) {
  ------------------
  |  Branch (21161:9): [True: 0, False: 3]
  ------------------
21162|      0|        port = (char *)janet_to_string(argv[offset + 1]);
21163|      3|    } else {
21164|      3|        port = (char *)janet_optcstring(argv, offset + 2, offset + 1, NULL);
21165|      3|    }
21166|       |    /* getaddrinfo */
21167|      3|    struct addrinfo *ai = NULL;
21168|      3|    struct addrinfo hints;
21169|      3|    memset(&hints, 0, sizeof(hints));
21170|      3|    hints.ai_family = AF_UNSPEC;
21171|      3|    hints.ai_socktype = socktype;
21172|      3|    hints.ai_flags = passive ? AI_PASSIVE : 0;
  ------------------
  |  Branch (21172:22): [True: 0, False: 3]
  ------------------
21173|      3|    int status = getaddrinfo(host, port, &hints, &ai);
21174|      3|    if (status) {
  ------------------
  |  Branch (21174:9): [True: 1, False: 2]
  ------------------
21175|      1|        janet_panicf("could not get address info: %s", gai_strerror(status));
21176|      1|    }
21177|      2|    *is_unix = 0;
21178|       |#ifdef JANET_WINDOWS
21179|       |    *sizeout = 0;
21180|       |#else
21181|      2|    *sizeout = sizeof(struct sockaddr_un);
21182|      2|#endif
21183|      2|    return ai;
21184|      3|}
janet.c:make_stream:
21984|      6|static JanetStream *make_stream(JSock handle, uint32_t flags) {
21985|      6|    return janet_stream((JanetHandle) handle, flags | JANET_STREAM_SOCKET | JANET_STREAM_NODUPS, net_stream_methods);
  ------------------
  |  |  618|      6|#define JANET_STREAM_SOCKET 0x2
  ------------------
                  return janet_stream((JanetHandle) handle, flags | JANET_STREAM_SOCKET | JANET_STREAM_NODUPS, net_stream_methods);
  ------------------
  |  |  626|      6|#define JANET_STREAM_NODUPS 0x20000
  ------------------
21986|      6|}
janet.c:get_signal_kw:
22810|      1|static int get_signal_kw(const Janet *argv, int32_t n) {
22811|      1|    JanetKeyword signal_kw = janet_getkeyword(argv, n);
22812|      1|    const struct keyword_signal *ptr = signal_keywords;
22813|      1|    while (ptr->keyword) {
  ------------------
  |  Branch (22813:12): [True: 0, False: 1]
  ------------------
22814|      0|        if (!janet_cstrcmp(signal_kw, ptr->keyword)) {
  ------------------
  |  Branch (22814:13): [True: 0, False: 0]
  ------------------
22815|      0|            return ptr->signal;
22816|      0|        }
22817|      0|        ptr++;
22818|      0|    }
22819|      1|    janet_panicf("undefined signal %v", argv[n]);
22820|      1|}
janet.c:os_execute_impl:
23206|      3|static Janet os_execute_impl(int32_t argc, Janet *argv, JanetExecuteMode mode) {
23207|      3|    janet_sandbox_assert(JANET_SANDBOX_SUBPROCESS);
  ------------------
  |  | 2014|      3|#define JANET_SANDBOX_SUBPROCESS 2
  ------------------
23208|      3|    janet_arity(argc, 1, 3);
23209|       |
23210|       |    /* Get flags */
23211|      3|    int is_spawn = mode == JANET_EXECUTE_SPAWN;
23212|      3|    uint64_t flags = 0;
23213|      3|    if (argc > 1) {
  ------------------
  |  Branch (23213:9): [True: 2, False: 1]
  ------------------
23214|      2|        flags = janet_getflags(argv, 1, "epxd");
23215|      2|    }
23216|       |
23217|       |    /* Get environment */
23218|      3|    int use_environ = !janet_flag_at(flags, 0);
  ------------------
  |  | 1986|      3|#define janet_flag_at(F, I) ((F) & ((1ULL) << (I)))
  ------------------
23219|      3|    EnvBlock envp = os_execute_env(argc, argv);
23220|       |
23221|       |    /* Get arguments */
23222|      3|    JanetView exargs = janet_getindexed(argv, 0);
23223|      3|    if (exargs.len < 1) {
  ------------------
  |  Branch (23223:9): [True: 0, False: 3]
  ------------------
23224|      0|        janet_panic("expected at least 1 command line argument");
23225|      0|    }
23226|       |
23227|       |    /* Optional stdio redirections */
23228|      3|    JanetAbstract orig_in = NULL, orig_out = NULL, orig_err = NULL;
23229|      3|    JanetHandle new_in = JANET_HANDLE_NONE, new_out = JANET_HANDLE_NONE, new_err = JANET_HANDLE_NONE;
  ------------------
  |  |  433|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
                  JanetHandle new_in = JANET_HANDLE_NONE, new_out = JANET_HANDLE_NONE, new_err = JANET_HANDLE_NONE;
  ------------------
  |  |  433|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
                  JanetHandle new_in = JANET_HANDLE_NONE, new_out = JANET_HANDLE_NONE, new_err = JANET_HANDLE_NONE;
  ------------------
  |  |  433|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
23230|      3|    JanetHandle pipe_in = JANET_HANDLE_NONE, pipe_out = JANET_HANDLE_NONE, pipe_err = JANET_HANDLE_NONE;
  ------------------
  |  |  433|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
                  JanetHandle pipe_in = JANET_HANDLE_NONE, pipe_out = JANET_HANDLE_NONE, pipe_err = JANET_HANDLE_NONE;
  ------------------
  |  |  433|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
                  JanetHandle pipe_in = JANET_HANDLE_NONE, pipe_out = JANET_HANDLE_NONE, pipe_err = JANET_HANDLE_NONE;
  ------------------
  |  |  433|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
23231|      3|    int stderr_is_stdout = 0;
23232|      3|    int pipe_errflag = 0; /* Track errors setting up pipes */
23233|      3|    int pipe_owner_flags = (is_spawn && (flags & 0x8)) ? JANET_PROC_ALLOW_ZOMBIE : 0;
  ------------------
  |  |22547|      0|#define JANET_PROC_ALLOW_ZOMBIE 128
  ------------------
  |  Branch (23233:29): [True: 0, False: 3]
  |  Branch (23233:41): [True: 0, False: 0]
  ------------------
23234|       |
23235|       |    /* Get optional redirections */
23236|      3|    if (argc > 2 && (mode != JANET_EXECUTE_EXEC)) {
  ------------------
  |  Branch (23236:9): [True: 0, False: 3]
  |  Branch (23236:21): [True: 0, False: 0]
  ------------------
23237|      0|        JanetDictView tab = janet_getdictionary(argv, 2);
23238|      0|        Janet maybe_stdin = janet_dictionary_get(tab.kvs, tab.cap, janet_ckeywordv("in"));
  ------------------
  |  | 1833|      0|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      0|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23239|      0|        Janet maybe_stdout = janet_dictionary_get(tab.kvs, tab.cap, janet_ckeywordv("out"));
  ------------------
  |  | 1833|      0|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      0|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23240|      0|        Janet maybe_stderr = janet_dictionary_get(tab.kvs, tab.cap, janet_ckeywordv("err"));
  ------------------
  |  | 1833|      0|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      0|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23241|      0|        if (is_spawn && janet_keyeq(maybe_stdin, "pipe")) {
  ------------------
  |  Branch (23241:13): [True: 0, False: 0]
  |  Branch (23241:25): [True: 0, False: 0]
  ------------------
23242|      0|            new_in = make_pipes(&pipe_in, 1, &pipe_errflag);
23243|      0|            pipe_owner_flags |= JANET_PROC_OWNS_STDIN;
  ------------------
  |  |22544|      0|#define JANET_PROC_OWNS_STDIN 16
  ------------------
23244|      0|        } else if (!janet_checktype(maybe_stdin, JANET_NIL)) {
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (23244:20): [True: 0, False: 0]
  ------------------
23245|      0|            new_in = janet_getjstream(&maybe_stdin, 0, &orig_in);
23246|      0|        }
23247|      0|        if (is_spawn && janet_keyeq(maybe_stdout, "pipe")) {
  ------------------
  |  Branch (23247:13): [True: 0, False: 0]
  |  Branch (23247:25): [True: 0, False: 0]
  ------------------
23248|      0|            new_out = make_pipes(&pipe_out, 0, &pipe_errflag);
23249|      0|            pipe_owner_flags |= JANET_PROC_OWNS_STDOUT;
  ------------------
  |  |22545|      0|#define JANET_PROC_OWNS_STDOUT 32
  ------------------
23250|      0|        } else if (!janet_checktype(maybe_stdout, JANET_NIL)) {
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (23250:20): [True: 0, False: 0]
  ------------------
23251|      0|            new_out = janet_getjstream(&maybe_stdout, 0, &orig_out);
23252|      0|        }
23253|      0|        if (is_spawn && janet_keyeq(maybe_stderr, "pipe")) {
  ------------------
  |  Branch (23253:13): [True: 0, False: 0]
  |  Branch (23253:25): [True: 0, False: 0]
  ------------------
23254|      0|            new_err = make_pipes(&pipe_err, 0, &pipe_errflag);
23255|      0|            pipe_owner_flags |= JANET_PROC_OWNS_STDERR;
  ------------------
  |  |22546|      0|#define JANET_PROC_OWNS_STDERR 64
  ------------------
23256|      0|        } else if (janet_keyeq(maybe_stderr, "out")) {
  ------------------
  |  Branch (23256:20): [True: 0, False: 0]
  ------------------
23257|      0|            stderr_is_stdout = 1;
23258|      0|        } else if (!janet_checktype(maybe_stderr, JANET_NIL)) {
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (23258:20): [True: 0, False: 0]
  ------------------
23259|      0|            new_err = janet_getjstream(&maybe_stderr, 0, &orig_err);
23260|      0|        }
23261|      0|    }
23262|       |
23263|       |    /* Optional working directory. Available for both os/execute and os/spawn. */
23264|      3|    const char *chdir_path = NULL;
23265|      3|    if (argc > 2) {
  ------------------
  |  Branch (23265:9): [True: 0, False: 3]
  ------------------
23266|      0|        JanetDictView tab = janet_getdictionary(argv, 2);
23267|      0|        Janet workdir = janet_dictionary_get(tab.kvs, tab.cap, janet_ckeywordv("cd"));
  ------------------
  |  | 1833|      0|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      0|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23268|      0|        if (janet_checktype(workdir, JANET_STRING)) {
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 0]
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23269|      0|            chdir_path = (const char *) janet_unwrap_string(workdir);
  ------------------
  |  |  858|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
23270|       |#ifndef JANET_SPAWN_CHDIR
23271|       |            janet_panicf(":cd argument not supported on this system - %s", chdir_path);
23272|       |#endif
23273|      0|        } else if (!janet_checktype(workdir, JANET_NIL)) {
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (23273:20): [True: 0, False: 0]
  ------------------
23274|      0|            janet_panicf("expected string for :cd argumnet, got %v", workdir);
23275|      0|        }
23276|      0|    }
23277|       |
23278|       |    /* Clean up if any of the pipes have any issues */
23279|      3|    if (pipe_errflag) {
  ------------------
  |  Branch (23279:9): [True: 0, False: 3]
  ------------------
23280|      0|        if (pipe_in != JANET_HANDLE_NONE) close_handle(pipe_in);
  ------------------
  |  |  433|      0|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23280:13): [True: 0, False: 0]
  ------------------
23281|      0|        if (pipe_out != JANET_HANDLE_NONE) close_handle(pipe_out);
  ------------------
  |  |  433|      0|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23281:13): [True: 0, False: 0]
  ------------------
23282|      0|        if (pipe_err != JANET_HANDLE_NONE) close_handle(pipe_err);
  ------------------
  |  |  433|      0|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23282:13): [True: 0, False: 0]
  ------------------
23283|      0|        janet_panic("failed to create pipes");
23284|      0|    }
23285|       |
23286|       |#ifdef JANET_WINDOWS
23287|       |
23288|       |    HANDLE pHandle, tHandle;
23289|       |    SECURITY_ATTRIBUTES saAttr;
23290|       |    PROCESS_INFORMATION processInfo;
23291|       |    STARTUPINFO startupInfo;
23292|       |    LPCSTR lpCurrentDirectory = NULL;
23293|       |    memset(&saAttr, 0, sizeof(saAttr));
23294|       |    memset(&processInfo, 0, sizeof(processInfo));
23295|       |    memset(&startupInfo, 0, sizeof(startupInfo));
23296|       |    startupInfo.cb = sizeof(startupInfo);
23297|       |    startupInfo.dwFlags |= STARTF_USESTDHANDLES;
23298|       |    saAttr.nLength = sizeof(saAttr);
23299|       |
23300|       |    JanetBuffer *buf = os_exec_escape(exargs);
23301|       |    if (buf->count > 8191) {
23302|       |        if (pipe_in != JANET_HANDLE_NONE) CloseHandle(pipe_in);
23303|       |        if (pipe_out != JANET_HANDLE_NONE) CloseHandle(pipe_out);
23304|       |        if (pipe_err != JANET_HANDLE_NONE) CloseHandle(pipe_err);
23305|       |        janet_panic("command line string too long (max 8191 characters)");
23306|       |    }
23307|       |    const char *path = (const char *) janet_unwrap_string(exargs.items[0]);
23308|       |
23309|       |    if (chdir_path != NULL) {
23310|       |        lpCurrentDirectory = chdir_path;
23311|       |    }
23312|       |
23313|       |    /* Do IO redirection */
23314|       |
23315|       |    if (pipe_in != JANET_HANDLE_NONE) {
23316|       |        startupInfo.hStdInput = pipe_in;
23317|       |    } else if (new_in != JANET_HANDLE_NONE) {
23318|       |        startupInfo.hStdInput = new_in;
23319|       |    } else {
23320|       |        startupInfo.hStdInput = (HANDLE) _get_osfhandle(_fileno(stdin));
23321|       |    }
23322|       |
23323|       |    if (pipe_out != JANET_HANDLE_NONE) {
23324|       |        startupInfo.hStdOutput = pipe_out;
23325|       |    } else if (new_out != JANET_HANDLE_NONE) {
23326|       |        startupInfo.hStdOutput = new_out;
23327|       |    } else {
23328|       |        startupInfo.hStdOutput = (HANDLE) _get_osfhandle(_fileno(stdout));
23329|       |    }
23330|       |
23331|       |    if (pipe_err != JANET_HANDLE_NONE) {
23332|       |        startupInfo.hStdError = pipe_err;
23333|       |    } else if (new_err != NULL) {
23334|       |        startupInfo.hStdError = new_err;
23335|       |    } else if (stderr_is_stdout) {
23336|       |        startupInfo.hStdError = startupInfo.hStdOutput;
23337|       |    } else {
23338|       |        startupInfo.hStdError = (HANDLE) _get_osfhandle(_fileno(stderr));
23339|       |    }
23340|       |
23341|       |    int cp_failed = 0;
23342|       |    DWORD cp_error_code = 0;
23343|       |    if (!CreateProcess(janet_flag_at(flags, 1) ? NULL : path,
23344|       |                       (char *) buf->data, /* Single CLI argument */
23345|       |                       &saAttr, /* no proc inheritance */
23346|       |                       &saAttr, /* no thread inheritance */
23347|       |                       TRUE, /* handle inheritance */
23348|       |                       0, /* flags */
23349|       |                       use_environ ? NULL : envp, /* pass in environment */
23350|       |                       lpCurrentDirectory,
23351|       |                       &startupInfo,
23352|       |                       &processInfo)) {
23353|       |        cp_failed = 1;
23354|       |        cp_error_code = GetLastError();
23355|       |    }
23356|       |
23357|       |    if (pipe_in != JANET_HANDLE_NONE) CloseHandle(pipe_in);
23358|       |    if (pipe_out != JANET_HANDLE_NONE) CloseHandle(pipe_out);
23359|       |    if (pipe_err != JANET_HANDLE_NONE) CloseHandle(pipe_err);
23360|       |
23361|       |    os_execute_cleanup(envp, NULL);
23362|       |
23363|       |    if (cp_failed)  {
23364|       |        char msgbuf[256];
23365|       |        msgbuf[0] = '\0';
23366|       |        FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
23367|       |                      NULL,
23368|       |                      cp_error_code,
23369|       |                      MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
23370|       |                      msgbuf,
23371|       |                      sizeof(msgbuf),
23372|       |                      NULL);
23373|       |        if (!*msgbuf) snprintf(msgbuf, sizeof(msgbuf), "%" PRIu32, (uint32_t) cp_error_code);
23374|       |        char *c = msgbuf;
23375|       |        while (*c) {
23376|       |            if (*c == '\n' || *c == '\r') {
23377|       |                *c = '\0';
23378|       |                break;
23379|       |            }
23380|       |            c++;
23381|       |        }
23382|       |        janet_panicf("failed to create process: %s", janet_cstringv(msgbuf));
23383|       |    }
23384|       |
23385|       |    pHandle = processInfo.hProcess;
23386|       |    tHandle = processInfo.hThread;
23387|       |
23388|       |#else
23389|       |
23390|       |    /* Result */
23391|      3|    int status = 0;
23392|       |
23393|      3|    const char **child_argv = janet_smalloc(sizeof(char *) * ((size_t) exargs.len + 1));
23394|      3|    for (int32_t i = 0; i < exargs.len; i++)
  ------------------
  |  Branch (23394:25): [True: 0, False: 3]
  ------------------
23395|      0|        child_argv[i] = janet_getcstring(exargs.items, i);
23396|      3|    child_argv[exargs.len] = NULL;
23397|       |    /* Coerce to form that works for spawn. I'm fairly confident no implementation
23398|       |     * of posix_spawn would modify the argv array passed in. */
23399|      3|    char *const *cargv = (char *const *)child_argv;
23400|       |
23401|      3|    if (use_environ) {
  ------------------
  |  Branch (23401:9): [True: 0, False: 3]
  ------------------
23402|      0|        janet_lock_environ();
23403|      0|    }
23404|       |
23405|       |    /* exec mode */
23406|      3|    if (mode == JANET_EXECUTE_EXEC) {
  ------------------
  |  Branch (23406:9): [True: 0, False: 3]
  ------------------
23407|      0|        int status;
23408|       |#ifdef JANET_PLAN9
23409|       |        status = exec(cargv[0], cargv);
23410|       |#else
23411|      0|        if (!use_environ) {
  ------------------
  |  Branch (23411:13): [True: 0, False: 0]
  ------------------
23412|      0|            environ = envp;
23413|      0|        }
23414|      0|        do {
23415|      0|            if (janet_flag_at(flags, 1)) {
  ------------------
  |  | 1986|      0|#define janet_flag_at(F, I) ((F) & ((1ULL) << (I)))
  |  |  ------------------
  |  |  |  Branch (1986:29): [True: 0, False: 0]
  |  |  ------------------
  ------------------
23416|      0|                status = execvp(cargv[0], cargv);
23417|      0|            } else {
23418|      0|                status = execv(cargv[0], cargv);
23419|      0|            }
23420|      0|        } while (status == -1 && errno == EINTR);
  ------------------
  |  Branch (23420:18): [True: 0, False: 0]
  |  Branch (23420:34): [True: 0, False: 0]
  ------------------
23421|      0|#endif
23422|      0|        janet_panicf("%p: %s", cargv[0], janet_strerror(errno ? errno : ENOENT));
  ------------------
  |  Branch (23422:57): [True: 0, False: 0]
  ------------------
23423|      0|    }
23424|       |
23425|      3|#ifndef JANET_NO_SPAWN
23426|       |    /* Use posix_spawn to spawn new process */
23427|       |
23428|       |    /* Posix spawn setup */
23429|      3|    posix_spawn_file_actions_t actions;
23430|      3|    posix_spawn_file_actions_init(&actions);
23431|      3|#ifdef JANET_SPAWN_CHDIR
23432|      3|    if (chdir_path != NULL) {
  ------------------
  |  Branch (23432:9): [True: 0, False: 3]
  ------------------
23433|       |#ifdef JANET_SPAWN_CHDIR_NO_NP
23434|       |        posix_spawn_file_actions_addchdir(&actions, chdir_path);
23435|       |#else
23436|      0|        posix_spawn_file_actions_addchdir_np(&actions, chdir_path);
23437|      0|#endif
23438|      0|    }
23439|      3|#endif
23440|      3|    if (pipe_in != JANET_HANDLE_NONE) {
  ------------------
  |  |  433|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23440:9): [True: 0, False: 3]
  ------------------
23441|      0|        posix_spawn_file_actions_adddup2(&actions, pipe_in, 0);
23442|      0|        posix_spawn_file_actions_addclose(&actions, pipe_in);
23443|      3|    } else if (new_in != JANET_HANDLE_NONE && new_in != 0) {
  ------------------
  |  |  433|      6|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23443:16): [True: 0, False: 3]
  |  Branch (23443:47): [True: 0, False: 0]
  ------------------
23444|      0|        posix_spawn_file_actions_adddup2(&actions, new_in, 0);
23445|      0|        if (new_in != new_out && new_in != new_err)
  ------------------
  |  Branch (23445:13): [True: 0, False: 0]
  |  Branch (23445:34): [True: 0, False: 0]
  ------------------
23446|      0|            posix_spawn_file_actions_addclose(&actions, new_in);
23447|      0|    }
23448|      3|    if (pipe_out != JANET_HANDLE_NONE) {
  ------------------
  |  |  433|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23448:9): [True: 0, False: 3]
  ------------------
23449|      0|        posix_spawn_file_actions_adddup2(&actions, pipe_out, 1);
23450|      0|        posix_spawn_file_actions_addclose(&actions, pipe_out);
23451|      3|    } else if (new_out != JANET_HANDLE_NONE && new_out != 1) {
  ------------------
  |  |  433|      6|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23451:16): [True: 0, False: 3]
  |  Branch (23451:48): [True: 0, False: 0]
  ------------------
23452|      0|        posix_spawn_file_actions_adddup2(&actions, new_out, 1);
23453|      0|        if (new_out != new_err)
  ------------------
  |  Branch (23453:13): [True: 0, False: 0]
  ------------------
23454|      0|            posix_spawn_file_actions_addclose(&actions, new_out);
23455|      0|    }
23456|      3|    if (pipe_err != JANET_HANDLE_NONE) {
  ------------------
  |  |  433|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23456:9): [True: 0, False: 3]
  ------------------
23457|      0|        posix_spawn_file_actions_adddup2(&actions, pipe_err, 2);
23458|      0|        posix_spawn_file_actions_addclose(&actions, pipe_err);
23459|      3|    } else if (new_err != JANET_HANDLE_NONE && new_err != 2) {
  ------------------
  |  |  433|      6|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23459:16): [True: 0, False: 3]
  |  Branch (23459:48): [True: 0, False: 0]
  ------------------
23460|      0|        posix_spawn_file_actions_adddup2(&actions, new_err, 2);
23461|      0|        posix_spawn_file_actions_addclose(&actions, new_err);
23462|      3|    } else if (stderr_is_stdout) {
  ------------------
  |  Branch (23462:16): [True: 0, False: 3]
  ------------------
23463|      0|        posix_spawn_file_actions_adddup2(&actions, 1, 2);
23464|      0|    }
23465|       |
23466|      3|    pid_t pid;
23467|      3|    if (janet_flag_at(flags, 1)) {
  ------------------
  |  | 1986|      3|#define janet_flag_at(F, I) ((F) & ((1ULL) << (I)))
  |  |  ------------------
  |  |  |  Branch (1986:29): [True: 0, False: 3]
  |  |  ------------------
  ------------------
23468|      0|        status = posix_spawnp(&pid,
23469|      0|                              child_argv[0], &actions, NULL, cargv,
23470|      0|                              use_environ ? environ : envp);
  ------------------
  |  Branch (23470:31): [True: 0, False: 0]
  ------------------
23471|      3|    } else {
23472|      3|        status = posix_spawn(&pid,
23473|      3|                             child_argv[0], &actions, NULL, cargv,
23474|      3|                             use_environ ? environ : envp);
  ------------------
  |  Branch (23474:30): [True: 0, False: 3]
  ------------------
23475|      3|    }
23476|       |
23477|      3|    posix_spawn_file_actions_destroy(&actions);
23478|       |
23479|      3|    if (pipe_in != JANET_HANDLE_NONE) close(pipe_in);
  ------------------
  |  |  433|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23479:9): [True: 0, False: 3]
  ------------------
23480|      3|    if (pipe_out != JANET_HANDLE_NONE) close(pipe_out);
  ------------------
  |  |  433|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23480:9): [True: 0, False: 3]
  ------------------
23481|      3|    if (pipe_err != JANET_HANDLE_NONE) close(pipe_err);
  ------------------
  |  |  433|      3|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23481:9): [True: 0, False: 3]
  ------------------
23482|       |
23483|      3|    if (use_environ) {
  ------------------
  |  Branch (23483:9): [True: 0, False: 3]
  ------------------
23484|      0|        janet_unlock_environ();
23485|      0|    }
23486|       |
23487|      3|    os_execute_cleanup(envp, child_argv);
23488|      3|    if (status) {
  ------------------
  |  Branch (23488:9): [True: 0, False: 3]
  ------------------
23489|       |        /* correct for macos bug where errno is not set */
23490|      0|        janet_panicf("%p: %s", argv[0], janet_strerror(errno ? errno : ENOENT));
  ------------------
  |  Branch (23490:56): [True: 0, False: 0]
  ------------------
23491|      0|    }
23492|       |
23493|      3|#endif
23494|      3|#endif
23495|      3|#ifndef JANET_NO_SPAWN
23496|      3|    JanetProc *proc = janet_abstract(&ProcAT, sizeof(JanetProc));
23497|      3|    proc->return_code = -1;
23498|       |#ifdef JANET_WINDOWS
23499|       |    proc->pHandle = pHandle;
23500|       |    proc->tHandle = tHandle;
23501|       |#else
23502|      3|    proc->pid = pid;
23503|      3|#endif
23504|      3|    proc->in = NULL;
23505|      3|    proc->out = NULL;
23506|      3|    proc->err = NULL;
23507|      3|    proc->flags = pipe_owner_flags;
23508|      3|    if (janet_flag_at(flags, 2)) {
  ------------------
  |  | 1986|      3|#define janet_flag_at(F, I) ((F) & ((1ULL) << (I)))
  |  |  ------------------
  |  |  |  Branch (1986:29): [True: 0, False: 3]
  |  |  ------------------
  ------------------
23509|      0|        proc->flags |= JANET_PROC_ERROR_NONZERO;
  ------------------
  |  |22543|      0|#define JANET_PROC_ERROR_NONZERO 8
  ------------------
23510|      0|    }
23511|      3|    if (is_spawn) {
  ------------------
  |  Branch (23511:9): [True: 0, False: 3]
  ------------------
23512|       |        /* Only set up pointers to stdin, stdout, and stderr if os/spawn. */
23513|      0|        if (new_in != JANET_HANDLE_NONE) {
  ------------------
  |  |  433|      0|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23513:13): [True: 0, False: 0]
  ------------------
23514|      0|            proc->in = get_stdio_for_handle(new_in, orig_in, 1);
23515|      0|            if (NULL == proc->in) janet_panic("failed to construct proc");
  ------------------
  |  Branch (23515:17): [True: 0, False: 0]
  ------------------
23516|      0|        }
23517|      0|        if (new_out != JANET_HANDLE_NONE) {
  ------------------
  |  |  433|      0|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23517:13): [True: 0, False: 0]
  ------------------
23518|      0|            proc->out = get_stdio_for_handle(new_out, orig_out, 0);
23519|      0|            if (NULL == proc->out) janet_panic("failed to construct proc");
  ------------------
  |  Branch (23519:17): [True: 0, False: 0]
  ------------------
23520|      0|        }
23521|      0|        if (new_err != JANET_HANDLE_NONE) {
  ------------------
  |  |  433|      0|#define JANET_HANDLE_NONE (-1)
  ------------------
  |  Branch (23521:13): [True: 0, False: 0]
  ------------------
23522|      0|            proc->err = get_stdio_for_handle(new_err, orig_err, 0);
23523|      0|            if (NULL == proc->err) janet_panic("failed to construct proc");
  ------------------
  |  Branch (23523:17): [True: 0, False: 0]
  ------------------
23524|      0|        }
23525|      0|        return janet_wrap_abstract(proc);
  ------------------
  |  |  846|      0|#define janet_wrap_abstract(s) janet_nanbox_wrap_((s), JANET_ABSTRACT)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
23526|      3|    } else {
23527|      3|#ifdef JANET_EV
23528|      3|        os_proc_wait_impl(proc);
23529|       |#else
23530|       |        return os_proc_wait_impl(proc);
23531|       |#endif
23532|      3|    }
23533|      3|#endif
23534|      3|}
janet.c:os_execute_env:
22391|      3|static EnvBlock os_execute_env(int32_t argc, const Janet *argv) {
22392|      3|    if (argc <= 2) return NULL;
  ------------------
  |  Branch (22392:9): [True: 1, False: 2]
  ------------------
22393|      2|    JanetDictView dict = janet_getdictionary(argv, 2);
22394|       |#ifdef JANET_WINDOWS
22395|       |    JanetBuffer *temp = janet_buffer(10);
22396|       |    for (int32_t i = 0; i < dict.cap; i++) {
22397|       |        const JanetKV *kv = dict.kvs + i;
22398|       |        if (!janet_checktype(kv->key, JANET_STRING)) continue;
22399|       |        if (!janet_checktype(kv->value, JANET_STRING)) continue;
22400|       |        const uint8_t *keys = janet_unwrap_string(kv->key);
22401|       |        const uint8_t *vals = janet_unwrap_string(kv->value);
22402|       |        janet_buffer_push_bytes(temp, keys, janet_string_length(keys));
22403|       |        janet_buffer_push_u8(temp, '=');
22404|       |        janet_buffer_push_bytes(temp, vals, janet_string_length(vals));
22405|       |        janet_buffer_push_u8(temp, '\0');
22406|       |    }
22407|       |    /* Windows environment blocks must be double-NULL terminated */
22408|       |    if (temp->count == 0) janet_buffer_push_u8(temp, '\0');
22409|       |    janet_buffer_push_u8(temp, '\0');
22410|       |    char *ret = janet_smalloc(temp->count);
22411|       |    memcpy(ret, temp->data, temp->count);
22412|       |    return ret;
22413|       |#else
22414|      2|    char **envp = janet_smalloc(sizeof(char *) * ((size_t)dict.len + 1));
22415|      2|    int32_t j = 0;
22416|      2|    for (int32_t i = 0; i < dict.cap; i++) {
  ------------------
  |  Branch (22416:25): [True: 0, False: 2]
  ------------------
22417|      0|        const JanetKV *kv = dict.kvs + i;
22418|      0|        if (!janet_checktype(kv->key, JANET_STRING)) continue;
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (22418:13): [True: 0, False: 0]
  ------------------
22419|      0|        if (!janet_checktype(kv->value, JANET_STRING)) continue;
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (22419:13): [True: 0, False: 0]
  ------------------
22420|      0|        const uint8_t *keys = janet_unwrap_string(kv->key);
  ------------------
  |  |  858|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
22421|      0|        const uint8_t *vals = janet_unwrap_string(kv->value);
  ------------------
  |  |  858|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
22422|      0|        int32_t klen = janet_string_length(keys);
  ------------------
  |  | 1803|      0|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|      0|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
22423|      0|        int32_t vlen = janet_string_length(vals);
  ------------------
  |  | 1803|      0|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|      0|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
22424|       |        /* Check keys has no embedded 0s or =s. */
22425|      0|        int skip = 0;
22426|      0|        for (int32_t k = 0; k < klen; k++) {
  ------------------
  |  Branch (22426:29): [True: 0, False: 0]
  ------------------
22427|      0|            if (keys[k] == '\0' || keys[k] == '=') {
  ------------------
  |  Branch (22427:17): [True: 0, False: 0]
  |  Branch (22427:36): [True: 0, False: 0]
  ------------------
22428|      0|                skip = 1;
22429|      0|                break;
22430|      0|            }
22431|      0|        }
22432|      0|        if (skip) continue;
  ------------------
  |  Branch (22432:13): [True: 0, False: 0]
  ------------------
22433|      0|        char *envitem = janet_smalloc((size_t) klen + (size_t) vlen + 2);
22434|      0|        memcpy(envitem, keys, klen);
22435|      0|        envitem[klen] = '=';
22436|      0|        memcpy(envitem + klen + 1, vals, vlen);
22437|      0|        envitem[klen + vlen + 1] = 0;
22438|      0|        envp[j++] = envitem;
22439|      0|    }
22440|       |    envp[j] = NULL;
22441|      2|    return envp;
22442|      3|#endif
22443|      3|}
janet.c:janet_lock_environ:
22162|      3|static void janet_lock_environ(void) {
22163|      3|}
janet.c:janet_unlock_environ:
22164|      3|static void janet_unlock_environ(void) {
22165|      3|}
janet.c:time_to_tm:
23904|      3|static struct tm *time_to_tm(const Janet *argv, int32_t argc, int32_t n, struct tm *t_infos) {
23905|      3|    time_t t;
23906|      3|    if (argc > n && !janet_checktype(argv[n], JANET_NIL)) {
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (23906:9): [True: 0, False: 3]
  |  Branch (23906:21): [True: 0, False: 0]
  ------------------
23907|      0|        int64_t integer = janet_getinteger64(argv, n);
23908|      0|        t = (time_t) integer;
23909|      3|    } else {
23910|      3|        time(&t);
23911|      3|    }
23912|      3|    struct tm *t_info = NULL;
23913|      3|    if (argc > n + 1 && janet_truthy(argv[n + 1])) {
  ------------------
  |  |  813|      0|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 0, False: 0]
  |  |  ------------------
  |  |  814|      0|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 0, False: 0]
  |  |  |  Branch (814:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (23913:9): [True: 0, False: 3]
  ------------------
23914|       |        /* local time */
23915|       |#ifdef JANET_WINDOWS
23916|       |        _tzset();
23917|       |        localtime_s(t_infos, &t);
23918|       |        t_info = t_infos;
23919|       |#elif defined(JANET_PLAN9)
23920|       |        t_info = localtime(&t);
23921|       |#else
23922|      0|        tzset();
23923|      0|        t_info = localtime_r(&t, t_infos);
23924|      0|#endif
23925|      3|    } else {
23926|       |        /* utc time */
23927|       |#ifdef JANET_WINDOWS
23928|       |        gmtime_s(t_infos, &t);
23929|       |        t_info = t_infos;
23930|       |#elif defined(JANET_PLAN9)
23931|       |        t_info = gmtime(&t);
23932|       |#else
23933|      3|        t_info = gmtime_r(&t, t_infos);
23934|      3|#endif
23935|      3|    }
23936|      3|    return t_info;
23937|      3|}
janet.c:os_stat_or_lstat:
24495|  6.24k|static Janet os_stat_or_lstat(int do_lstat, int32_t argc, Janet *argv) {
24496|  6.24k|    janet_sandbox_assert(JANET_SANDBOX_FS_READ);
  ------------------
  |  | 2019|  6.24k|#define JANET_SANDBOX_FS_READ 64
  ------------------
24497|  6.24k|    janet_arity(argc, 1, 2);
24498|  6.24k|    const char *path = janet_getcstring(argv, 0);
24499|  6.24k|    JanetTable *tab = NULL;
24500|  6.24k|    const uint8_t *key = NULL;
24501|  6.24k|    if (argc == 2) {
  ------------------
  |  Branch (24501:9): [True: 6.24k, False: 0]
  ------------------
24502|  6.24k|        if (janet_checktype(argv[1], JANET_KEYWORD)) {
  ------------------
  |  |  801|  6.24k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 6.24k, False: 0]
  |  |  |  Branch (801:6): [Folded, False: 6.24k]
  |  |  ------------------
  |  |  802|  6.24k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  6.24k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  6.24k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  6.24k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  6.24k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  6.24k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24503|  6.24k|            key = janet_getkeyword(argv, 1);
24504|  6.24k|        } else {
24505|      0|            tab = janet_gettable(argv, 1);
24506|      0|        }
24507|  6.24k|    } else {
24508|      0|        tab = janet_table(0);
24509|      0|    }
24510|       |
24511|       |    /* Build result */
24512|  6.24k|    jstat_t st;
24513|       |#ifdef JANET_WINDOWS
24514|       |    (void) do_lstat;
24515|       |    int res = _stat(path, &st);
24516|       |#elif defined(JANET_PLAN9)
24517|       |    (void)do_lstat;
24518|       |    int res = stat(path, &st);
24519|       |#else
24520|  6.24k|    int res;
24521|  6.24k|    if (do_lstat) {
  ------------------
  |  Branch (24521:9): [True: 0, False: 6.24k]
  ------------------
24522|      0|        res = lstat(path, &st);
24523|  6.24k|    } else {
24524|  6.24k|        res = stat(path, &st);
24525|  6.24k|    }
24526|  6.24k|#endif
24527|  6.24k|    if (-1 == res) {
  ------------------
  |  Branch (24527:9): [True: 6.24k, False: 0]
  ------------------
24528|  6.24k|        return janet_wrap_nil();
  ------------------
  |  |  826|  6.24k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  6.24k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  6.24k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  6.24k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24529|  6.24k|    }
24530|       |
24531|      0|    if (NULL == key) {
  ------------------
  |  Branch (24531:9): [True: 0, False: 0]
  ------------------
24532|       |        /* Put results in table */
24533|      0|        for (const struct OsStatGetter *sg = os_stat_getters; sg->name != NULL; sg++) {
  ------------------
  |  Branch (24533:63): [True: 0, False: 0]
  ------------------
24534|      0|            janet_table_put(tab, janet_ckeywordv(sg->name), sg->fn(&st));
  ------------------
  |  | 1833|      0|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      0|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24535|      0|        }
24536|      0|        return janet_wrap_table(tab);
  ------------------
  |  |  841|      0|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24537|      0|    } else {
24538|       |        /* Get one result */
24539|      0|        for (const struct OsStatGetter *sg = os_stat_getters; sg->name != NULL; sg++) {
  ------------------
  |  Branch (24539:63): [True: 0, False: 0]
  ------------------
24540|      0|            if (janet_cstrcmp(key, sg->name)) continue;
  ------------------
  |  Branch (24540:17): [True: 0, False: 0]
  ------------------
24541|      0|            return sg->fn(&st);
24542|      0|        }
24543|      0|        janet_panicf("unexpected keyword %v", janet_wrap_keyword(key));
  ------------------
  |  |  845|      0|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  ------------------
  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24544|      0|    }
24545|      0|}
janet.c:os_getmode:
24409|      1|static jmode_t os_getmode(const Janet *argv, int32_t n) {
24410|      1|    return janet_perm_from_unix(os_get_unix_mode(argv, n));
24411|      1|}
janet.c:janet_perm_from_unix:
24337|     35|static mode_t janet_perm_from_unix(int32_t x) {
24338|     35|    return (mode_t) x;
24339|     35|}
janet.c:os_make_permstring:
24375|  2.29k|static Janet os_make_permstring(int32_t permissions) {
24376|  2.29k|    uint8_t bytes[9] = {0};
24377|  2.29k|    bytes[0] = (permissions & 0400) ? 'r' : '-';
  ------------------
  |  Branch (24377:16): [True: 2.26k, False: 30]
  ------------------
24378|  2.29k|    bytes[1] = (permissions & 0200) ? 'w' : '-';
  ------------------
  |  Branch (24378:16): [True: 16, False: 2.27k]
  ------------------
24379|  2.29k|    bytes[2] = (permissions & 0100) ? 'x' : '-';
  ------------------
  |  Branch (24379:16): [True: 19, False: 2.27k]
  ------------------
24380|  2.29k|    bytes[3] = (permissions & 0040) ? 'r' : '-';
  ------------------
  |  Branch (24380:16): [True: 14, False: 2.27k]
  ------------------
24381|  2.29k|    bytes[4] = (permissions & 0020) ? 'w' : '-';
  ------------------
  |  Branch (24381:16): [True: 16, False: 2.27k]
  ------------------
24382|  2.29k|    bytes[5] = (permissions & 0010) ? 'x' : '-';
  ------------------
  |  Branch (24382:16): [True: 12, False: 2.27k]
  ------------------
24383|  2.29k|    bytes[6] = (permissions & 0004) ? 'r' : '-';
  ------------------
  |  Branch (24383:16): [True: 12, False: 2.27k]
  ------------------
24384|  2.29k|    bytes[7] = (permissions & 0002) ? 'w' : '-';
  ------------------
  |  Branch (24384:16): [True: 14, False: 2.27k]
  ------------------
24385|  2.29k|    bytes[8] = (permissions & 0001) ? 'x' : '-';
  ------------------
  |  Branch (24385:16): [True: 18, False: 2.27k]
  ------------------
24386|  2.29k|    return janet_stringv(bytes, sizeof(bytes));
  ------------------
  |  | 1817|  2.29k|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  843|  2.29k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|  2.29k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  2.29k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  2.29k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
24387|  2.29k|}
janet.c:os_get_unix_mode:
24389|  3.31k|static int32_t os_get_unix_mode(const Janet *argv, int32_t n) {
24390|  3.31k|    int32_t unix_mode;
24391|  3.31k|    if (janet_checkint(argv[n])) {
  ------------------
  |  Branch (24391:9): [True: 3.30k, False: 14]
  ------------------
24392|       |        /* Integer mode */
24393|  3.30k|        int32_t x = janet_unwrap_integer(argv[n]);
  ------------------
  |  |  957|  3.30k|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  834|  3.30k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
24394|  3.30k|        if (x < 0 || x > 0777) {
  ------------------
  |  Branch (24394:13): [True: 1, False: 3.30k]
  |  Branch (24394:22): [True: 1, False: 3.29k]
  ------------------
24395|      2|            janet_panicf("bad slot #%d, expected integer in range [0, 8r777], got %v", n, argv[n]);
24396|      2|        }
24397|  3.29k|        unix_mode = x;
24398|  3.29k|    } else {
24399|       |        /* Bytes mode */
24400|     14|        JanetByteView bytes = janet_getbytes(argv, n);
24401|     14|        if (bytes.len != 9) {
  ------------------
  |  Branch (24401:13): [True: 0, False: 14]
  ------------------
24402|      0|            janet_panicf("bad slot #%d: expected byte sequence of length 9, got %v", n, argv[n]);
24403|      0|        }
24404|     14|        unix_mode = os_parse_permstring(bytes.bytes);
24405|     14|    }
24406|  3.31k|    return unix_mode;
24407|  3.31k|}
janet.c:os_parse_permstring:
24361|     12|static int32_t os_parse_permstring(const uint8_t *perm) {
24362|     12|    int32_t m = 0;
24363|     12|    if (perm[0] == 'r') m |= 0400;
  ------------------
  |  Branch (24363:9): [True: 1, False: 11]
  ------------------
24364|     12|    if (perm[1] == 'w') m |= 0200;
  ------------------
  |  Branch (24364:9): [True: 7, False: 5]
  ------------------
24365|     12|    if (perm[2] == 'x') m |= 0100;
  ------------------
  |  Branch (24365:9): [True: 8, False: 4]
  ------------------
24366|     12|    if (perm[3] == 'r') m |= 0040;
  ------------------
  |  Branch (24366:9): [True: 6, False: 6]
  ------------------
24367|     12|    if (perm[4] == 'w') m |= 0020;
  ------------------
  |  Branch (24367:9): [True: 5, False: 7]
  ------------------
24368|     12|    if (perm[5] == 'x') m |= 0010;
  ------------------
  |  Branch (24368:9): [True: 5, False: 7]
  ------------------
24369|     12|    if (perm[6] == 'r') m |= 0004;
  ------------------
  |  Branch (24369:9): [True: 3, False: 9]
  ------------------
24370|     12|    if (perm[7] == 'w') m |= 0002;
  ------------------
  |  Branch (24370:9): [True: 6, False: 6]
  ------------------
24371|     12|    if (perm[8] == 'x') m |= 0001;
  ------------------
  |  Branch (24371:9): [True: 6, False: 6]
  ------------------
24372|     12|    return m;
24373|     12|}
janet.c:os_optmode:
24730|     36|static jmode_t os_optmode(int32_t argc, const Janet *argv, int32_t n, int32_t dflt) {
24731|     36|    if (argc > n) return os_getmode(argv, n);
  ------------------
  |  Branch (24731:9): [True: 1, False: 35]
  ------------------
24732|     35|    return janet_perm_from_unix(dflt);
24733|     36|}
janet.c:janet_parser_checkdead:
25774|  13.0M|static void janet_parser_checkdead(JanetParser *parser) {
25775|  13.0M|    if (parser->flag) janet_panic("parser is dead, cannot consume");
  ------------------
  |  Branch (25775:9): [True: 0, False: 13.0M]
  ------------------
25776|  13.0M|    if (parser->error) janet_panic("parser has unchecked error, cannot consume");
  ------------------
  |  Branch (25776:9): [True: 0, False: 13.0M]
  ------------------
25777|  13.0M|}
janet.c:delim_error:
25284|  1.43k|static void delim_error(JanetParser *parser, size_t stack_index, char c, const char *msg) {
25285|  1.43k|    JanetParseState *s = parser->states + stack_index;
25286|  1.43k|    JanetBuffer *buffer = janet_buffer(40);
25287|  1.43k|    if (msg) {
  ------------------
  |  Branch (25287:9): [True: 1.43k, False: 0]
  ------------------
25288|  1.43k|        janet_buffer_push_cstring(buffer, msg);
25289|  1.43k|    }
25290|  1.43k|    if (c) {
  ------------------
  |  Branch (25290:9): [True: 681, False: 757]
  ------------------
25291|    681|        janet_buffer_push_u8(buffer, c);
25292|    681|    }
25293|  1.43k|    if (stack_index > 0) {
  ------------------
  |  Branch (25293:9): [True: 793, False: 645]
  ------------------
25294|    793|        janet_buffer_push_cstring(buffer, ", ");
25295|    793|        if (s->flags & PFLAG_PARENS) {
  ------------------
  |  |25220|    793|#define PFLAG_PARENS 0x400
  ------------------
  |  Branch (25295:13): [True: 147, False: 646]
  ------------------
25296|    147|            janet_buffer_push_u8(buffer, '(');
25297|    646|        } else if (s->flags & PFLAG_SQRBRACKETS) {
  ------------------
  |  |25221|    646|#define PFLAG_SQRBRACKETS 0x800
  ------------------
  |  Branch (25297:20): [True: 21, False: 625]
  ------------------
25298|     21|            janet_buffer_push_u8(buffer, '[');
25299|    625|        } else if (s->flags & PFLAG_CURLYBRACKETS) {
  ------------------
  |  |25222|    625|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
  |  Branch (25299:20): [True: 41, False: 584]
  ------------------
25300|     41|            janet_buffer_push_u8(buffer, '{');
25301|    584|        } else if (s->flags & PFLAG_STRING) {
  ------------------
  |  |25223|    584|#define PFLAG_STRING 0x2000
  ------------------
  |  Branch (25301:20): [True: 149, False: 435]
  ------------------
25302|    149|            janet_buffer_push_u8(buffer, '"');
25303|    435|        } else if (s->flags & PFLAG_LONGSTRING) {
  ------------------
  |  |25224|    435|#define PFLAG_LONGSTRING 0x4000
  ------------------
  |  Branch (25303:20): [True: 171, False: 264]
  ------------------
25304|    171|            int32_t i;
25305|  66.5k|            for (i = 0; i < s->argn; i++) {
  ------------------
  |  Branch (25305:25): [True: 66.4k, False: 171]
  ------------------
25306|  66.4k|                janet_buffer_push_u8(buffer, '`');
25307|  66.4k|            }
25308|    171|        }
25309|    793|        janet_formatb(buffer, " opened at line %d, column %d", (int32_t) s->line, (int32_t) s->column);
25310|    793|    }
25311|  1.43k|    parser->error = (const char *) janet_string(buffer->data, buffer->count);
25312|  1.43k|    parser->flag |= JANET_PARSER_GENERATED_ERROR;
  ------------------
  |  |25114|  1.43k|#define JANET_PARSER_GENERATED_ERROR 0x2
  ------------------
25313|  1.43k|}
janet.c:pushstate:
25230|  6.65M|static void pushstate(JanetParser *p, Consumer consumer, int flags) {
25231|  6.65M|    JanetParseState s;
25232|  6.65M|    s.counter = 0;
25233|  6.65M|    s.argn = 0;
25234|  6.65M|    s.flags = flags;
25235|  6.65M|    s.consumer = consumer;
25236|  6.65M|    s.line = p->line;
25237|  6.65M|    s.column = p->column;
25238|  6.65M|    _pushstate(p, s);
25239|  6.65M|}
janet.c:root:
25701|  7.93M|static int root(JanetParser *p, JanetParseState *state, uint8_t c) {
25702|  7.93M|    switch (c) {
25703|  2.79M|        default:
  ------------------
  |  Branch (25703:9): [True: 2.79M, False: 5.14M]
  ------------------
25704|  2.79M|            if (is_whitespace(c)) return 1;
  ------------------
  |  Branch (25704:17): [True: 1.38M, False: 1.40M]
  ------------------
25705|  1.40M|            if (!janet_is_symbol_char(c)) {
  ------------------
  |  Branch (25705:17): [True: 333, False: 1.40M]
  ------------------
25706|    333|                p->error = "unexpected character";
25707|    333|                return 1;
25708|    333|            }
25709|  1.40M|            pushstate(p, tokenchar, PFLAG_TOKEN);
  ------------------
  |  |25228|  1.40M|#define PFLAG_TOKEN 0x40000
  ------------------
25710|  1.40M|            return 0;
25711|   232k|        case '\'':
  ------------------
  |  Branch (25711:9): [True: 232k, False: 7.70M]
  ------------------
25712|   248k|        case ',':
  ------------------
  |  Branch (25712:9): [True: 16.2k, False: 7.91M]
  ------------------
25713|   263k|        case ';':
  ------------------
  |  Branch (25713:9): [True: 15.4k, False: 7.91M]
  ------------------
25714|  2.67M|        case '~':
  ------------------
  |  Branch (25714:9): [True: 2.40M, False: 5.52M]
  ------------------
25715|  4.52M|        case '|':
  ------------------
  |  Branch (25715:9): [True: 1.85M, False: 6.07M]
  ------------------
25716|  4.52M|            pushstate(p, root, PFLAG_READERMAC | c);
  ------------------
  |  |25225|  4.52M|#define PFLAG_READERMAC 0x8000
  ------------------
25717|  4.52M|            return 1;
25718|  45.4k|        case '"':
  ------------------
  |  Branch (25718:9): [True: 45.4k, False: 7.88M]
  ------------------
25719|  45.4k|            pushstate(p, stringchar, PFLAG_STRING);
  ------------------
  |  |25223|  45.4k|#define PFLAG_STRING 0x2000
  ------------------
25720|  45.4k|            return 1;
25721|    974|        case '#':
  ------------------
  |  Branch (25721:9): [True: 974, False: 7.93M]
  ------------------
25722|    974|            pushstate(p, comment, PFLAG_COMMENT);
  ------------------
  |  |25227|    974|#define PFLAG_COMMENT 0x20000
  ------------------
25723|    974|            return 1;
25724|  84.3k|        case '@':
  ------------------
  |  Branch (25724:9): [True: 84.3k, False: 7.84M]
  ------------------
25725|  84.3k|            pushstate(p, atsign, PFLAG_ATSYM);
  ------------------
  |  |25226|  84.3k|#define PFLAG_ATSYM 0x10000
  ------------------
25726|  84.3k|            return 1;
25727|  8.32k|        case '`':
  ------------------
  |  Branch (25727:9): [True: 8.32k, False: 7.92M]
  ------------------
25728|  8.32k|            pushstate(p, longstring, PFLAG_LONGSTRING);
  ------------------
  |  |25224|  8.32k|#define PFLAG_LONGSTRING 0x4000
  ------------------
25729|  8.32k|            return 1;
25730|  34.1k|        case ')':
  ------------------
  |  Branch (25730:9): [True: 34.1k, False: 7.89M]
  ------------------
25731|  37.2k|        case ']':
  ------------------
  |  Branch (25731:9): [True: 3.07k, False: 7.93M]
  ------------------
25732|  83.3k|        case '}': {
  ------------------
  |  Branch (25732:9): [True: 46.1k, False: 7.88M]
  ------------------
25733|  83.3k|            Janet ds;
25734|  83.3k|            if (p->statecount == 1) {
  ------------------
  |  Branch (25734:17): [True: 645, False: 82.6k]
  ------------------
25735|    645|                delim_error(p, 0, c, "unexpected closing delimiter ");
25736|    645|                return 1;
25737|    645|            }
25738|  82.6k|            if ((c == ')' && (state->flags & PFLAG_PARENS)) ||
  ------------------
  |  |25220|  33.5k|#define PFLAG_PARENS 0x400
  ------------------
  |  Branch (25738:18): [True: 33.5k, False: 49.1k]
  |  Branch (25738:30): [True: 33.5k, False: 16]
  ------------------
25739|  49.1k|                    (c == ']' && (state->flags & PFLAG_SQRBRACKETS))) {
  ------------------
  |  |25221|  3.04k|#define PFLAG_SQRBRACKETS 0x800
  ------------------
  |  Branch (25739:22): [True: 3.04k, False: 46.1k]
  |  Branch (25739:34): [True: 3.03k, False: 11]
  ------------------
25740|  36.5k|                if (state->flags & PFLAG_ATSYM) {
  ------------------
  |  |25226|  36.5k|#define PFLAG_ATSYM 0x10000
  ------------------
  |  Branch (25740:21): [True: 1.22k, False: 35.3k]
  ------------------
25741|  1.22k|                    ds = close_array(p, state);
25742|  35.3k|                } else {
25743|  35.3k|                    ds = close_tuple(p, state, c == ']' ? JANET_TUPLE_FLAG_BRACKETCTOR : 0);
  ------------------
  |  | 1788|  2.86k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (25743:48): [True: 2.86k, False: 32.4k]
  ------------------
25744|  35.3k|                }
25745|  46.1k|            } else if (c == '}' && (state->flags & PFLAG_CURLYBRACKETS)) {
  ------------------
  |  |25222|  46.0k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
  |  Branch (25745:24): [True: 46.0k, False: 27]
  |  Branch (25745:36): [True: 46.0k, False: 9]
  ------------------
25746|  46.0k|                if (state->argn & 1) {
  ------------------
  |  Branch (25746:21): [True: 5, False: 46.0k]
  ------------------
25747|      5|                    p->error = "struct and table literals expect even number of arguments";
25748|      5|                    return 1;
25749|      5|                }
25750|  46.0k|                if (state->flags & PFLAG_ATSYM) {
  ------------------
  |  |25226|  46.0k|#define PFLAG_ATSYM 0x10000
  ------------------
  |  Branch (25750:21): [True: 649, False: 45.4k]
  ------------------
25751|    649|                    ds = close_table(p, state);
25752|  45.4k|                } else {
25753|  45.4k|                    ds = close_struct(p, state);
25754|  45.4k|                }
25755|  46.0k|            } else {
25756|     36|                delim_error(p, p->statecount - 1, c, "mismatched delimiter ");
25757|     36|                return 1;
25758|     36|            }
25759|  82.6k|            popstate(p, ds);
25760|  82.6k|        }
25761|      0|        return 1;
25762|   109k|        case '(':
  ------------------
  |  Branch (25762:9): [True: 109k, False: 7.82M]
  ------------------
25763|   109k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS);
  ------------------
  |  |25218|   109k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS);
  ------------------
  |  |25220|   109k|#define PFLAG_PARENS 0x400
  ------------------
25764|   109k|            return 1;
25765|   164k|        case '[':
  ------------------
  |  Branch (25765:9): [True: 164k, False: 7.76M]
  ------------------
25766|   164k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS);
  ------------------
  |  |25218|   164k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS);
  ------------------
  |  |25221|   164k|#define PFLAG_SQRBRACKETS 0x800
  ------------------
25767|   164k|            return 1;
25768|   121k|        case '{':
  ------------------
  |  Branch (25768:9): [True: 121k, False: 7.81M]
  ------------------
25769|   121k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS);
  ------------------
  |  |25218|   121k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS);
  ------------------
  |  |25222|   121k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
25770|   121k|            return 1;
25771|  7.93M|    }
25772|  7.93M|}
janet.c:is_whitespace:
25117|  2.79M|static int is_whitespace(uint8_t c) {
25118|  2.79M|    return c == ' '
  ------------------
  |  Branch (25118:12): [True: 12.8k, False: 2.77M]
  ------------------
25119|  2.77M|           || c == '\t'
  ------------------
  |  Branch (25119:15): [True: 14.5k, False: 2.76M]
  ------------------
25120|  2.76M|           || c == '\n'
  ------------------
  |  Branch (25120:15): [True: 196k, False: 2.56M]
  ------------------
25121|  2.56M|           || c == '\r'
  ------------------
  |  Branch (25121:15): [True: 6.35k, False: 2.56M]
  ------------------
25122|  2.56M|           || c == '\0'
  ------------------
  |  Branch (25122:15): [True: 1.14M, False: 1.41M]
  ------------------
25123|  1.41M|           || c == '\v'
  ------------------
  |  Branch (25123:15): [True: 3.75k, False: 1.41M]
  ------------------
25124|  1.41M|           || c == '\f';
  ------------------
  |  Branch (25124:15): [True: 14.2k, False: 1.40M]
  ------------------
25125|  2.79M|}
janet.c:stringchar:
25496|   801k|static int stringchar(JanetParser *p, JanetParseState *state, uint8_t c) {
25497|       |    /* Enter escape */
25498|   801k|    if (c == '\\') {
  ------------------
  |  Branch (25498:9): [True: 4.36k, False: 796k]
  ------------------
25499|  4.36k|        state->consumer = escape1;
25500|  4.36k|        return 1;
25501|  4.36k|    }
25502|       |    /* String end */
25503|   796k|    if (c == '"') {
  ------------------
  |  Branch (25503:9): [True: 47.3k, False: 749k]
  ------------------
25504|  47.3k|        return stringend(p, state);
25505|  47.3k|    }
25506|       |    /* normal char */
25507|   749k|    if (c != '\n' && c != '\r')
  ------------------
  |  Branch (25507:9): [True: 743k, False: 6.38k]
  |  Branch (25507:22): [True: 733k, False: 10.0k]
  ------------------
25508|   733k|        push_buf(p, c);
25509|   749k|    return 1;
25510|   796k|}
janet.c:escape1:
25411|  4.36k|static int escape1(JanetParser *p, JanetParseState *state, uint8_t c) {
25412|  4.36k|    int e = checkescape(c);
25413|  4.36k|    if (e < 0) {
  ------------------
  |  Branch (25413:9): [True: 29, False: 4.33k]
  ------------------
25414|     29|        p->error = "invalid string escape sequence";
25415|     29|        return 1;
25416|     29|    }
25417|  4.33k|    if (c == 'x') {
  ------------------
  |  Branch (25417:9): [True: 673, False: 3.66k]
  ------------------
25418|    673|        state->counter = 2;
25419|    673|        state->argn = 0;
25420|    673|        state->consumer = escapeh;
25421|  3.66k|    } else if (c == 'u' || c == 'U') {
  ------------------
  |  Branch (25421:16): [True: 1.31k, False: 2.34k]
  |  Branch (25421:28): [True: 63, False: 2.28k]
  ------------------
25422|  1.37k|        state->counter = c == 'u' ? 4 : 6;
  ------------------
  |  Branch (25422:26): [True: 1.31k, False: 63]
  ------------------
25423|  1.37k|        state->argn = 0;
25424|  1.37k|        state->consumer = escapeu;
25425|  2.28k|    } else {
25426|  2.28k|        push_buf(p, (uint8_t) e);
25427|  2.28k|        state->consumer = stringchar;
25428|  2.28k|    }
25429|  4.33k|    return 1;
25430|  4.36k|}
janet.c:checkescape:
25315|  4.36k|static int checkescape(uint8_t c) {
25316|  4.36k|    switch (c) {
25317|     29|        default:
  ------------------
  |  Branch (25317:9): [True: 29, False: 4.33k]
  ------------------
25318|     29|            return -1;
25319|    673|        case 'x':
  ------------------
  |  Branch (25319:9): [True: 673, False: 3.69k]
  ------------------
25320|  1.98k|        case 'u':
  ------------------
  |  Branch (25320:9): [True: 1.31k, False: 3.05k]
  ------------------
25321|  2.05k|        case 'U':
  ------------------
  |  Branch (25321:9): [True: 63, False: 4.30k]
  ------------------
25322|  2.05k|            return 1;
25323|     17|        case 'n':
  ------------------
  |  Branch (25323:9): [True: 17, False: 4.34k]
  ------------------
25324|     17|            return '\n';
25325|      6|        case 't':
  ------------------
  |  Branch (25325:9): [True: 6, False: 4.36k]
  ------------------
25326|      6|            return '\t';
25327|     81|        case 'r':
  ------------------
  |  Branch (25327:9): [True: 81, False: 4.28k]
  ------------------
25328|     81|            return '\r';
25329|    143|        case '0':
  ------------------
  |  Branch (25329:9): [True: 143, False: 4.22k]
  ------------------
25330|    143|            return '\0';
25331|    208|        case 'z':
  ------------------
  |  Branch (25331:9): [True: 208, False: 4.15k]
  ------------------
25332|    208|            return '\0';
25333|      7|        case 'f':
  ------------------
  |  Branch (25333:9): [True: 7, False: 4.35k]
  ------------------
25334|      7|            return '\f';
25335|     13|        case 'v':
  ------------------
  |  Branch (25335:9): [True: 13, False: 4.35k]
  ------------------
25336|     13|            return '\v';
25337|     63|        case 'a':
  ------------------
  |  Branch (25337:9): [True: 63, False: 4.30k]
  ------------------
25338|     63|            return '\a';
25339|    268|        case 'b':
  ------------------
  |  Branch (25339:9): [True: 268, False: 4.09k]
  ------------------
25340|    268|            return '\b';
25341|    249|        case '\'':
  ------------------
  |  Branch (25341:9): [True: 249, False: 4.11k]
  ------------------
25342|    249|            return '\'';
25343|     79|        case '?':
  ------------------
  |  Branch (25343:9): [True: 79, False: 4.28k]
  ------------------
25344|     79|            return '?';
25345|      9|        case 'e':
  ------------------
  |  Branch (25345:9): [True: 9, False: 4.35k]
  ------------------
25346|      9|            return 27;
25347|    229|        case '"':
  ------------------
  |  Branch (25347:9): [True: 229, False: 4.13k]
  ------------------
25348|    229|            return '"';
25349|    914|        case '\\':
  ------------------
  |  Branch (25349:9): [True: 914, False: 3.45k]
  ------------------
25350|    914|            return '\\';
25351|  4.36k|    }
25352|  4.36k|}
janet.c:escapeh:
25375|  1.34k|static int escapeh(JanetParser *p, JanetParseState *state, uint8_t c) {
25376|  1.34k|    int digit = to_hex(c);
25377|  1.34k|    if (digit < 0) {
  ------------------
  |  Branch (25377:9): [True: 2, False: 1.34k]
  ------------------
25378|      2|        p->error = "invalid hex digit in hex escape";
25379|      2|        return 1;
25380|      2|    }
25381|  1.34k|    state->argn = (state->argn << 4) + digit;
25382|  1.34k|    state->counter--;
25383|  1.34k|    if (!state->counter) {
  ------------------
  |  Branch (25383:9): [True: 671, False: 672]
  ------------------
25384|    671|        push_buf(p, (uint8_t)(state->argn & 0xFF));
25385|    671|        state->argn = 0;
25386|    671|        state->consumer = stringchar;
25387|    671|    }
25388|  1.34k|    return 1;
25389|  1.34k|}
janet.c:to_hex:
25180|  6.95k|static int to_hex(uint8_t c) {
25181|  6.95k|    if (c >= '0' && c <= '9') {
  ------------------
  |  Branch (25181:9): [True: 6.94k, False: 12]
  |  Branch (25181:21): [True: 4.71k, False: 2.22k]
  ------------------
25182|  4.71k|        return c - '0';
25183|  4.71k|    } else if (c >= 'A' && c <= 'F') {
  ------------------
  |  Branch (25183:16): [True: 2.22k, False: 14]
  |  Branch (25183:28): [True: 1.38k, False: 842]
  ------------------
25184|  1.38k|        return 10 + c - 'A';
25185|  1.38k|    } else if (c >= 'a' && c <= 'f') {
  ------------------
  |  Branch (25185:16): [True: 841, False: 15]
  |  Branch (25185:28): [True: 835, False: 6]
  ------------------
25186|    835|        return 10 + c - 'a';
25187|    835|    } else {
25188|     21|        return -1;
25189|     21|    }
25190|  6.95k|}
janet.c:escapeu:
25391|  5.60k|static int escapeu(JanetParser *p, JanetParseState *state, uint8_t c) {
25392|  5.60k|    int digit = to_hex(c);
25393|  5.60k|    if (digit < 0) {
  ------------------
  |  Branch (25393:9): [True: 19, False: 5.58k]
  ------------------
25394|     19|        p->error = "invalid hex digit in unicode escape";
25395|     19|        return 1;
25396|     19|    }
25397|  5.58k|    state->argn = (state->argn << 4) + digit;
25398|  5.58k|    state->counter--;
25399|  5.58k|    if (!state->counter) {
  ------------------
  |  Branch (25399:9): [True: 1.35k, False: 4.22k]
  ------------------
25400|  1.35k|        if (state->argn > 0x10FFFF) {
  ------------------
  |  Branch (25400:13): [True: 0, False: 1.35k]
  ------------------
25401|      0|            p->error = "invalid unicode codepoint";
25402|      0|            return 1;
25403|      0|        }
25404|  1.35k|        write_codepoint(p, state->argn);
25405|  1.35k|        state->argn = 0;
25406|  1.35k|        state->consumer = stringchar;
25407|  1.35k|    }
25408|  5.58k|    return 1;
25409|  5.58k|}
janet.c:write_codepoint:
25357|  1.35k|static void write_codepoint(JanetParser *p, int32_t codepoint) {
25358|  1.35k|    if (codepoint <= 0x7F) {
  ------------------
  |  Branch (25358:9): [True: 338, False: 1.02k]
  ------------------
25359|    338|        push_buf(p, (uint8_t) codepoint);
25360|  1.02k|    } else if (codepoint <= 0x7FF) {
  ------------------
  |  Branch (25360:16): [True: 202, False: 819]
  ------------------
25361|    202|        push_buf(p, (uint8_t)((codepoint >>  6) & 0x1F) | 0xC0);
25362|    202|        push_buf(p, (uint8_t)((codepoint >>  0) & 0x3F) | 0x80);
25363|    819|    } else if (codepoint <= 0xFFFF) {
  ------------------
  |  Branch (25363:16): [True: 760, False: 59]
  ------------------
25364|    760|        push_buf(p, (uint8_t)((codepoint >> 12) & 0x0F) | 0xE0);
25365|    760|        push_buf(p, (uint8_t)((codepoint >>  6) & 0x3F) | 0x80);
25366|    760|        push_buf(p, (uint8_t)((codepoint >>  0) & 0x3F) | 0x80);
25367|    760|    } else {
25368|     59|        push_buf(p, (uint8_t)((codepoint >> 18) & 0x07) | 0xF0);
25369|     59|        push_buf(p, (uint8_t)((codepoint >> 12) & 0x3F) | 0x80);
25370|     59|        push_buf(p, (uint8_t)((codepoint >>  6) & 0x3F) | 0x80);
25371|     59|        push_buf(p, (uint8_t)((codepoint >>  0) & 0x3F) | 0x80);
25372|     59|    }
25373|  1.35k|}
janet.c:stringend:
25432|   105k|static int stringend(JanetParser *p, JanetParseState *state) {
25433|   105k|    Janet ret;
25434|   105k|    uint8_t *bufstart = p->buf;
25435|   105k|    int32_t buflen = (int32_t) p->bufcount;
25436|   105k|    if (state->flags & PFLAG_LONGSTRING) {
  ------------------
  |  |25224|   105k|#define PFLAG_LONGSTRING 0x4000
  ------------------
  |  Branch (25436:9): [True: 58.6k, False: 47.3k]
  ------------------
25437|       |        /* Post process to remove leading whitespace */
25438|  58.6k|        JanetParseState top = p->states[p->statecount - 1];
25439|  58.6k|        int32_t indent_col = (int32_t) top.column - 1;
25440|  58.6k|        uint8_t *r = bufstart, *end = r + buflen;
25441|       |        /* Unless there are only spaces before EOLs, disable reindenting */
25442|  58.6k|        int reindent = 1;
25443|  1.05M|        while (reindent && (r < end)) {
  ------------------
  |  Branch (25443:16): [True: 1.05M, False: 774]
  |  Branch (25443:28): [True: 997k, False: 57.8k]
  ------------------
25444|   997k|            if (*r++ == '\n') {
  ------------------
  |  Branch (25444:17): [True: 7.52k, False: 990k]
  ------------------
25445|  7.95k|                for (int32_t j = 0; (r < end) && (*r != '\n') && (j < indent_col); j++, r++) {
  ------------------
  |  Branch (25445:37): [True: 6.84k, False: 1.10k]
  |  Branch (25445:50): [True: 3.87k, False: 2.97k]
  |  Branch (25445:66): [True: 1.21k, False: 2.65k]
  ------------------
25446|  1.21k|                    if (*r != ' ') {
  ------------------
  |  Branch (25446:25): [True: 784, False: 432]
  ------------------
25447|    784|                        reindent = 0;
25448|    784|                        break;
25449|    784|                    }
25450|  1.21k|                }
25451|  7.52k|                if ((r + 1) < end && *r == '\r' && *(r + 1) == '\n') reindent = 1;
  ------------------
  |  Branch (25451:21): [True: 6.25k, False: 1.26k]
  |  Branch (25451:38): [True: 504, False: 5.75k]
  |  Branch (25451:52): [True: 299, False: 205]
  ------------------
25452|  7.52k|            }
25453|   997k|        }
25454|       |        /* Now reindent if able */
25455|  58.6k|        if (reindent) {
  ------------------
  |  Branch (25455:13): [True: 57.8k, False: 774]
  ------------------
25456|  57.8k|            uint8_t *w = bufstart;
25457|  57.8k|            r = bufstart;
25458|   984k|            while (r < end) {
  ------------------
  |  Branch (25458:20): [True: 926k, False: 57.8k]
  ------------------
25459|   926k|                if (*r == '\n') {
  ------------------
  |  Branch (25459:21): [True: 5.78k, False: 920k]
  ------------------
25460|  5.78k|                    *w++ = *r++;
25461|  6.17k|                    for (int32_t j = 0; (r < end) && (*r != '\n') && (j < indent_col); j++, r++);
  ------------------
  |  Branch (25461:41): [True: 5.07k, False: 1.10k]
  |  Branch (25461:54): [True: 3.04k, False: 2.02k]
  |  Branch (25461:70): [True: 390, False: 2.65k]
  ------------------
25462|  5.78k|                    if ((r + 1) < end && *r == '\r' && *(r + 1) == '\n') *w++ = *r++;
  ------------------
  |  Branch (25462:25): [True: 4.62k, False: 1.15k]
  |  Branch (25462:42): [True: 470, False: 4.15k]
  |  Branch (25462:56): [True: 289, False: 181]
  ------------------
25463|   920k|                } else {
25464|   920k|                    *w++ = *r++;
25465|   920k|                }
25466|   926k|            }
25467|  57.8k|            buflen = (int32_t)(w - bufstart);
25468|  57.8k|        }
25469|       |        /* Check for leading EOL so we can remove it */
25470|  58.6k|        if (buflen > 1 && bufstart[0] == '\r' && bufstart[1] == '\n') { /* Windows EOL */
  ------------------
  |  Branch (25470:13): [True: 56.1k, False: 2.43k]
  |  Branch (25470:27): [True: 738, False: 55.4k]
  |  Branch (25470:50): [True: 333, False: 405]
  ------------------
25471|    333|            buflen = buflen - 2;
25472|    333|            bufstart = bufstart + 2;
25473|  58.2k|        } else if (buflen > 0 && bufstart[0] == '\n') { /* Unix EOL */
  ------------------
  |  Branch (25473:20): [True: 58.2k, False: 0]
  |  Branch (25473:34): [True: 572, False: 57.7k]
  ------------------
25474|    572|            buflen--;
25475|    572|            bufstart++;
25476|    572|        }
25477|       |        /* Check for trailing EOL so we can remove it */
25478|  58.6k|        if (buflen > 1 && bufstart[buflen - 2] == '\r' && bufstart[buflen - 1] == '\n') { /* Windows EOL */
  ------------------
  |  Branch (25478:13): [True: 56.0k, False: 2.54k]
  |  Branch (25478:27): [True: 416, False: 55.6k]
  |  Branch (25478:59): [True: 19, False: 397]
  ------------------
25479|     19|            buflen = buflen - 2;
25480|  58.5k|        } else if (buflen > 0 && bufstart[buflen - 1] == '\n') { /* Unix EOL */
  ------------------
  |  Branch (25480:20): [True: 58.2k, False: 353]
  |  Branch (25480:34): [True: 751, False: 57.4k]
  ------------------
25481|    751|            buflen--;
25482|    751|        }
25483|  58.6k|    }
25484|   105k|    if (state->flags & PFLAG_BUFFER) {
  ------------------
  |  |25219|   105k|#define PFLAG_BUFFER 0x200
  ------------------
  |  Branch (25484:9): [True: 52.5k, False: 53.4k]
  ------------------
25485|  52.5k|        JanetBuffer *b = janet_buffer(buflen);
25486|  52.5k|        janet_buffer_push_bytes(b, bufstart, buflen);
25487|  52.5k|        ret = janet_wrap_buffer(b);
  ------------------
  |  |  842|  52.5k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  820|  52.5k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  52.5k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  52.5k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25488|  53.4k|    } else {
25489|  53.4k|        ret = janet_wrap_string(janet_string(bufstart, buflen));
  ------------------
  |  |  843|  53.4k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|  53.4k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  53.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  53.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25490|  53.4k|    }
25491|   105k|    p->bufcount = 0;
25492|   105k|    popstate(p, ret);
25493|   105k|    return 1;
25494|   105k|}
janet.c:comment:
25578|   172k|static int comment(JanetParser *p, JanetParseState *state, uint8_t c) {
25579|   172k|    (void) state;
25580|   172k|    if (c == '\n') {
  ------------------
  |  Branch (25580:9): [True: 933, False: 171k]
  ------------------
25581|    933|        p->statecount--;
25582|    933|        p->bufcount = 0;
25583|   171k|    } else {
25584|   171k|        push_buf(p, c);
25585|   171k|    }
25586|   172k|    return 1;
25587|   172k|}
janet.c:atsign:
25673|  84.3k|static int atsign(JanetParser *p, JanetParseState *state, uint8_t c) {
25674|  84.3k|    (void) state;
25675|  84.3k|    p->statecount--;
25676|  84.3k|    switch (c) {
25677|    706|        case '{':
  ------------------
  |  Branch (25677:9): [True: 706, False: 83.6k]
  ------------------
25678|    706|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |25218|    706|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |25222|    706|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_CURLYBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |25226|    706|#define PFLAG_ATSYM 0x10000
  ------------------
25679|    706|            return 1;
25680|  2.05k|        case '"':
  ------------------
  |  Branch (25680:9): [True: 2.05k, False: 82.3k]
  ------------------
25681|  2.05k|            pushstate(p, stringchar, PFLAG_BUFFER | PFLAG_STRING);
  ------------------
  |  |25219|  2.05k|#define PFLAG_BUFFER 0x200
  ------------------
                          pushstate(p, stringchar, PFLAG_BUFFER | PFLAG_STRING);
  ------------------
  |  |25223|  2.05k|#define PFLAG_STRING 0x2000
  ------------------
25682|  2.05k|            return 1;
25683|  50.4k|        case '`':
  ------------------
  |  Branch (25683:9): [True: 50.4k, False: 33.9k]
  ------------------
25684|  50.4k|            pushstate(p, longstring, PFLAG_BUFFER | PFLAG_LONGSTRING);
  ------------------
  |  |25219|  50.4k|#define PFLAG_BUFFER 0x200
  ------------------
                          pushstate(p, longstring, PFLAG_BUFFER | PFLAG_LONGSTRING);
  ------------------
  |  |25224|  50.4k|#define PFLAG_LONGSTRING 0x4000
  ------------------
25685|  50.4k|            return 1;
25686|    468|        case '[':
  ------------------
  |  Branch (25686:9): [True: 468, False: 83.9k]
  ------------------
25687|    468|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |25218|    468|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |25221|    468|#define PFLAG_SQRBRACKETS 0x800
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_SQRBRACKETS | PFLAG_ATSYM);
  ------------------
  |  |25226|    468|#define PFLAG_ATSYM 0x10000
  ------------------
25688|    468|            return 1;
25689|  18.4k|        case '(':
  ------------------
  |  Branch (25689:9): [True: 18.4k, False: 65.8k]
  ------------------
25690|  18.4k|            pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS | PFLAG_ATSYM);
  ------------------
  |  |25218|  18.4k|#define PFLAG_CONTAINER 0x100
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS | PFLAG_ATSYM);
  ------------------
  |  |25220|  18.4k|#define PFLAG_PARENS 0x400
  ------------------
                          pushstate(p, root, PFLAG_CONTAINER | PFLAG_PARENS | PFLAG_ATSYM);
  ------------------
  |  |25226|  18.4k|#define PFLAG_ATSYM 0x10000
  ------------------
25691|  18.4k|            return 1;
25692|  12.1k|        default:
  ------------------
  |  Branch (25692:9): [True: 12.1k, False: 72.1k]
  ------------------
25693|  12.1k|            break;
25694|  84.3k|    }
25695|  12.1k|    pushstate(p, tokenchar, PFLAG_TOKEN);
  ------------------
  |  |25228|  12.1k|#define PFLAG_TOKEN 0x40000
  ------------------
25696|  12.1k|    push_buf(p, '@'); /* Push the leading at-sign that was dropped */
25697|  12.1k|    return 0;
25698|  84.3k|}
janet.c:longstring:
25629|  1.43M|static int longstring(JanetParser *p, JanetParseState *state, uint8_t c) {
25630|  1.43M|    if (state->flags & PFLAG_INSTRING) {
  ------------------
  |  |25627|  1.43M|#define PFLAG_INSTRING 0x100000
  ------------------
  |  Branch (25630:9): [True: 1.13M, False: 300k]
  ------------------
25631|       |        /* We are inside the long string */
25632|  1.13M|        if (c == '`') {
  ------------------
  |  Branch (25632:13): [True: 61.2k, False: 1.07M]
  ------------------
25633|  61.2k|            state->flags |= PFLAG_END_CANDIDATE;
  ------------------
  |  |25628|  61.2k|#define PFLAG_END_CANDIDATE 0x200000
  ------------------
25634|  61.2k|            state->flags &= ~PFLAG_INSTRING;
  ------------------
  |  |25627|  61.2k|#define PFLAG_INSTRING 0x100000
  ------------------
25635|  61.2k|            state->counter = 1; /* Use counter to keep track of number of '=' seen */
25636|  61.2k|            return 1;
25637|  61.2k|        }
25638|  1.07M|        push_buf(p, c);
25639|  1.07M|        return 1;
25640|  1.13M|    } else if (state->flags & PFLAG_END_CANDIDATE) {
  ------------------
  |  |25628|   300k|#define PFLAG_END_CANDIDATE 0x200000
  ------------------
  |  Branch (25640:16): [True: 159k, False: 140k]
  ------------------
25641|   159k|        int i;
25642|       |        /* We are checking a potential end of the string */
25643|   159k|        if (state->counter == state->argn) {
  ------------------
  |  Branch (25643:13): [True: 58.6k, False: 101k]
  ------------------
25644|  58.6k|            stringend(p, state);
25645|  58.6k|            return 0;
25646|  58.6k|        }
25647|   101k|        if (c == '`' && state->counter < state->argn) {
  ------------------
  |  Branch (25647:13): [True: 98.5k, False: 2.66k]
  |  Branch (25647:25): [True: 98.5k, False: 0]
  ------------------
25648|  98.5k|            state->counter++;
25649|  98.5k|            return 1;
25650|  98.5k|        }
25651|       |        /* Failed end candidate */
25652|  88.2k|        for (i = 0; i < state->counter; i++) {
  ------------------
  |  Branch (25652:21): [True: 85.5k, False: 2.66k]
  ------------------
25653|  85.5k|            push_buf(p, '`');
25654|  85.5k|        }
25655|  2.66k|        push_buf(p, c);
25656|  2.66k|        state->counter = 0;
25657|  2.66k|        state->flags &= ~PFLAG_END_CANDIDATE;
  ------------------
  |  |25628|  2.66k|#define PFLAG_END_CANDIDATE 0x200000
  ------------------
25658|  2.66k|        state->flags |= PFLAG_INSTRING;
  ------------------
  |  |25627|  2.66k|#define PFLAG_INSTRING 0x100000
  ------------------
25659|  2.66k|        return 1;
25660|   140k|    } else {
25661|       |        /* We are at beginning of string */
25662|   140k|        state->argn++;
25663|   140k|        if (c != '`') {
  ------------------
  |  Branch (25663:13): [True: 58.7k, False: 81.9k]
  ------------------
25664|  58.7k|            state->flags |= PFLAG_INSTRING;
  ------------------
  |  |25627|  58.7k|#define PFLAG_INSTRING 0x100000
  ------------------
25665|  58.7k|            push_buf(p, c);
25666|  58.7k|        }
25667|   140k|        return 1;
25668|   140k|    }
25669|  1.43M|}
janet.c:close_array:
25597|  1.22k|static Janet close_array(JanetParser *p, JanetParseState *state) {
25598|  1.22k|    JanetArray *array = janet_array(state->argn);
25599|  14.5k|    for (int32_t i = state->argn - 1; i >= 0; i--)
  ------------------
  |  Branch (25599:39): [True: 13.3k, False: 1.22k]
  ------------------
25600|  13.3k|        array->data[i] = p->args[--p->argcount];
25601|  1.22k|    array->count = state->argn;
25602|  1.22k|    return janet_wrap_array(array);
  ------------------
  |  |  840|  1.22k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  820|  1.22k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.22k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.22k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25603|  1.22k|}
janet.c:close_tuple:
25589|  35.3k|static Janet close_tuple(JanetParser *p, JanetParseState *state, int32_t flag) {
25590|  35.3k|    Janet *ret = janet_tuple_begin(state->argn);
25591|  35.3k|    janet_tuple_flag(ret) |= flag;
  ------------------
  |  | 1796|  35.3k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1790|  35.3k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
25592|  1.10M|    for (int32_t i = state->argn - 1; i >= 0; i--)
  ------------------
  |  Branch (25592:39): [True: 1.06M, False: 35.3k]
  ------------------
25593|  1.06M|        ret[i] = p->args[--p->argcount];
25594|  35.3k|    return janet_wrap_tuple(janet_tuple_end(ret));
  ------------------
  |  |  838|  35.3k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|  35.3k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  35.3k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  35.3k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25595|  35.3k|}
janet.c:close_table:
25616|    649|static Janet close_table(JanetParser *p, JanetParseState *state) {
25617|    649|    JanetTable *table = janet_table(state->argn >> 1);
25618|  1.79k|    for (size_t i = p->argcount - state->argn; i < p->argcount; i += 2) {
  ------------------
  |  Branch (25618:48): [True: 1.14k, False: 649]
  ------------------
25619|  1.14k|        Janet key = p->args[i];
25620|  1.14k|        Janet value = p->args[i + 1];
25621|  1.14k|        janet_table_put(table, key, value);
25622|  1.14k|    }
25623|    649|    p->argcount -= state->argn;
25624|    649|    return janet_wrap_table(table);
  ------------------
  |  |  841|    649|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|    649|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    649|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    649|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25625|    649|}
janet.c:close_struct:
25605|  45.4k|static Janet close_struct(JanetParser *p, JanetParseState *state) {
25606|  45.4k|    JanetKV *st = janet_struct_begin(state->argn >> 1);
25607|  77.7k|    for (size_t i = p->argcount - state->argn; i < p->argcount; i += 2) {
  ------------------
  |  Branch (25607:48): [True: 32.3k, False: 45.4k]
  ------------------
25608|  32.3k|        Janet key = p->args[i];
25609|  32.3k|        Janet value = p->args[i + 1];
25610|  32.3k|        janet_struct_put(st, key, value);
25611|  32.3k|    }
25612|  45.4k|    p->argcount -= state->argn;
25613|  45.4k|    return janet_wrap_struct(janet_struct_end(st));
  ------------------
  |  |  837|  45.4k|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  823|  45.4k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  45.4k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  45.4k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25614|  45.4k|}
janet.c:popstate:
25241|  1.60M|static void popstate(JanetParser *p, Janet val) {
25242|  6.11M|    for (;;) {
25243|  6.11M|        JanetParseState top = p->states[--p->statecount];
25244|  6.11M|        JanetParseState *newtop = p->states + p->statecount - 1;
25245|       |        /* Source mapping info */
25246|  6.11M|        if (janet_checktype(val, JANET_TUPLE)) {
  ------------------
  |  |  801|  6.11M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 4.54M, False: 1.56M]
  |  |  |  Branch (801:6): [Folded, False: 6.11M]
  |  |  ------------------
  |  |  802|  6.11M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  6.11M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  6.11M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  6.11M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  6.11M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  6.11M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25247|  4.54M|            janet_tuple_sm_line(janet_unwrap_tuple(val)) = (int32_t) top.line;
  ------------------
  |  | 1794|  4.54M|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1790|  4.54M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
25248|  4.54M|            janet_tuple_sm_column(janet_unwrap_tuple(val)) = (int32_t) top.column;
  ------------------
  |  | 1795|  4.54M|#define janet_tuple_sm_column(t) (janet_tuple_head(t)->sm_column)
  |  |  ------------------
  |  |  |  | 1790|  4.54M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
25249|  4.54M|        }
25250|  6.11M|        if (newtop->flags & PFLAG_CONTAINER) {
  ------------------
  |  |25218|  6.11M|#define PFLAG_CONTAINER 0x100
  ------------------
  |  Branch (25250:13): [True: 1.60M, False: 4.50M]
  ------------------
25251|  1.60M|            newtop->argn++;
25252|       |            /* Keep track of number of values in the root state */
25253|  1.60M|            if (p->statecount == 1) {
  ------------------
  |  Branch (25253:17): [True: 239k, False: 1.36M]
  ------------------
25254|   239k|                p->pending++;
25255|       |                /* Root items are always wrapped in a tuple for source map info. */
25256|   239k|                const Janet *tup = janet_tuple_n(&val, 1);
25257|   239k|                janet_tuple_sm_line(tup) = (int32_t) top.line;
  ------------------
  |  | 1794|   239k|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1790|   239k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
25258|   239k|                janet_tuple_sm_column(tup) = (int32_t) top.column;
  ------------------
  |  | 1795|   239k|#define janet_tuple_sm_column(t) (janet_tuple_head(t)->sm_column)
  |  |  ------------------
  |  |  |  | 1790|   239k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
25259|   239k|                val = janet_wrap_tuple(tup);
  ------------------
  |  |  838|   239k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|   239k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   239k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   239k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25260|   239k|            }
25261|  1.60M|            push_arg(p, val);
25262|  1.60M|            return;
25263|  4.50M|        } else if (newtop->flags & PFLAG_READERMAC) {
  ------------------
  |  |25225|  4.50M|#define PFLAG_READERMAC 0x8000
  ------------------
  |  Branch (25263:20): [True: 4.50M, False: 0]
  ------------------
25264|  4.50M|            Janet *t = janet_tuple_begin(2);
25265|  4.50M|            int c = newtop->flags & 0xFF;
25266|  4.50M|            const char *which =
25267|  4.50M|                (c == '\'') ? "quote" :
  ------------------
  |  Branch (25267:17): [True: 231k, False: 4.27M]
  ------------------
25268|  4.50M|                (c == ',') ? "unquote" :
  ------------------
  |  Branch (25268:17): [True: 16.0k, False: 4.26M]
  ------------------
25269|  4.27M|                (c == ';') ? "splice" :
  ------------------
  |  Branch (25269:17): [True: 15.3k, False: 4.24M]
  ------------------
25270|  4.26M|                (c == '|') ? "short-fn" :
  ------------------
  |  Branch (25270:17): [True: 1.85M, False: 2.39M]
  ------------------
25271|  4.24M|                (c == '~') ? "quasiquote" : "<unknown>";
  ------------------
  |  Branch (25271:17): [True: 2.39M, False: 0]
  ------------------
25272|  4.50M|            t[0] = janet_csymbolv(which);
  ------------------
  |  | 1827|  4.50M|#define janet_csymbolv(cstr) janet_wrap_symbol(janet_csymbol(cstr))
  |  |  ------------------
  |  |  |  |  844|  4.50M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|  4.50M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  4.50M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  4.50M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25273|  4.50M|            t[1] = val;
25274|       |            /* Quote source mapping info */
25275|  4.50M|            janet_tuple_sm_line(t) = (int32_t) newtop->line;
  ------------------
  |  | 1794|  4.50M|#define janet_tuple_sm_line(t) (janet_tuple_head(t)->sm_line)
  |  |  ------------------
  |  |  |  | 1790|  4.50M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
25276|  4.50M|            janet_tuple_sm_column(t) = (int32_t) newtop->column;
  ------------------
  |  | 1795|  4.50M|#define janet_tuple_sm_column(t) (janet_tuple_head(t)->sm_column)
  |  |  ------------------
  |  |  |  | 1790|  4.50M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
25277|  4.50M|            val = janet_wrap_tuple(janet_tuple_end(t));
  ------------------
  |  |  838|  4.50M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|  4.50M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  4.50M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  4.50M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25278|  4.50M|        } else {
25279|      0|            return;
25280|      0|        }
25281|  6.11M|    }
25282|  1.60M|}
janet.c:parsergc:
25958|   109k|static int parsergc(void *p, size_t size) {
25959|   109k|    JanetParser *parser = (JanetParser *)p;
25960|   109k|    (void) size;
25961|   109k|    janet_parser_deinit(parser);
25962|   109k|    return 0;
25963|   109k|}
janet.c:parsermark:
25945|  1.22k|static int parsermark(void *p, size_t size) {
25946|  1.22k|    size_t i;
25947|  1.22k|    JanetParser *parser = (JanetParser *)p;
25948|  1.22k|    (void) size;
25949|  1.22k|    for (i = 0; i < parser->argcount; i++) {
  ------------------
  |  Branch (25949:17): [True: 0, False: 1.22k]
  ------------------
25950|      0|        janet_mark(parser->args[i]);
25951|      0|    }
25952|  1.22k|    if (parser->flag & JANET_PARSER_GENERATED_ERROR) {
  ------------------
  |  |25114|  1.22k|#define JANET_PARSER_GENERATED_ERROR 0x2
  ------------------
  |  Branch (25952:9): [True: 1, False: 1.22k]
  ------------------
25953|      1|        janet_mark(janet_wrap_string((const uint8_t *) parser->error));
  ------------------
  |  |  843|      1|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|      1|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25954|      1|    }
25955|  1.22k|    return 0;
25956|  1.22k|}
janet.c:tokenchar:
25525|  5.43M|static int tokenchar(JanetParser *p, JanetParseState *state, uint8_t c) {
25526|  5.43M|    Janet ret;
25527|  5.43M|    double numval;
25528|  5.43M|    int32_t blen;
25529|  5.43M|    if (janet_is_symbol_char(c)) {
  ------------------
  |  Branch (25529:9): [True: 4.02M, False: 1.41M]
  ------------------
25530|  4.02M|        push_buf(p, (uint8_t) c);
25531|  4.02M|        if (c > 127) state->argn = 1; /* Use to indicate non ascii */
  ------------------
  |  Branch (25531:13): [True: 19.8k, False: 4.00M]
  ------------------
25532|  4.02M|        return 1;
25533|  4.02M|    }
25534|       |    /* Token finished */
25535|  1.41M|    blen = (int32_t) p->bufcount;
25536|  1.41M|    int start_dig = p->buf[0] >= '0' && p->buf[0] <= '9';
  ------------------
  |  Branch (25536:21): [True: 518k, False: 894k]
  |  Branch (25536:41): [True: 49.7k, False: 468k]
  ------------------
25537|  1.41M|    int start_num = start_dig || p->buf[0] == '-' || p->buf[0] == '+' || p->buf[0] == '.';
  ------------------
  |  Branch (25537:21): [True: 49.7k, False: 1.36M]
  |  Branch (25537:34): [True: 369k, False: 994k]
  |  Branch (25537:54): [True: 97.5k, False: 897k]
  |  Branch (25537:74): [True: 5.78k, False: 891k]
  ------------------
25538|  1.41M|    if (p->buf[0] == ':') {
  ------------------
  |  Branch (25538:9): [True: 29.0k, False: 1.38M]
  ------------------
25539|       |        /* Don't do full utf-8 check unless we have seen non ascii characters. */
25540|  29.0k|        int valid = (!state->argn) || janet_valid_utf8(p->buf + 1, blen - 1);
  ------------------
  |  Branch (25540:21): [True: 28.9k, False: 84]
  |  Branch (25540:39): [True: 67, False: 17]
  ------------------
25541|  29.0k|        if (!valid) {
  ------------------
  |  Branch (25541:13): [True: 17, False: 28.9k]
  ------------------
25542|     17|            p->error = "invalid utf-8 in keyword";
25543|     17|            return 0;
25544|     17|        }
25545|  28.9k|        ret = janet_keywordv(p->buf + 1, blen - 1);
  ------------------
  |  | 1832|  28.9k|#define janet_keywordv(str, len) janet_wrap_keyword(janet_keyword((str), (len)))
  |  |  ------------------
  |  |  |  |  845|  28.9k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|  28.9k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  28.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  28.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25546|  28.9k|#ifdef JANET_INT_TYPES
25547|  1.38M|    } else if (start_num && !janet_scan_numeric(p->buf, blen, &ret)) {
  ------------------
  |  Branch (25547:16): [True: 522k, False: 862k]
  |  Branch (25547:29): [True: 53.7k, False: 468k]
  ------------------
25548|  53.7k|        (void) numval;
25549|       |#else
25550|       |    } else if (start_num && !janet_scan_number(p->buf, blen, &numval)) {
25551|       |        ret = janet_wrap_number(numval);
25552|       |#endif
25553|  1.33M|    } else if (!check_str_const("nil", p->buf, blen)) {
  ------------------
  |  Branch (25553:16): [True: 337, False: 1.33M]
  ------------------
25554|    337|        ret = janet_wrap_nil();
  ------------------
  |  |  826|    337|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|    337|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    337|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    337|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25555|  1.33M|    } else if (!check_str_const("false", p->buf, blen)) {
  ------------------
  |  Branch (25555:16): [True: 75, False: 1.33M]
  ------------------
25556|     75|        ret = janet_wrap_false();
  ------------------
  |  |  828|     75|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  817|     75|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     75|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     75|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25557|  1.33M|    } else if (!check_str_const("true", p->buf, blen)) {
  ------------------
  |  Branch (25557:16): [True: 1.02k, False: 1.32M]
  ------------------
25558|  1.02k|        ret = janet_wrap_true();
  ------------------
  |  |  827|  1.02k|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  817|  1.02k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.02k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.02k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25559|  1.32M|    } else {
25560|  1.32M|        if (start_dig) {
  ------------------
  |  Branch (25560:13): [True: 185, False: 1.32M]
  ------------------
25561|    185|            p->error = "symbol literal cannot start with a digit";
25562|    185|            return 0;
25563|  1.32M|        } else {
25564|       |            /* Don't do full utf-8 check unless we have seen non ascii characters. */
25565|  1.32M|            int valid = (!state->argn) || janet_valid_utf8(p->buf, blen);
  ------------------
  |  Branch (25565:25): [True: 1.32M, False: 4.79k]
  |  Branch (25565:43): [True: 4.20k, False: 583]
  ------------------
25566|  1.32M|            if (!valid) {
  ------------------
  |  Branch (25566:17): [True: 583, False: 1.32M]
  ------------------
25567|    583|                p->error = "invalid utf-8 in symbol";
25568|    583|                return 0;
25569|    583|            }
25570|  1.32M|            ret = janet_symbolv(p->buf, blen);
  ------------------
  |  | 1826|  1.32M|#define janet_symbolv(str, len) janet_wrap_symbol(janet_symbol((str), (len)))
  |  |  ------------------
  |  |  |  |  844|  1.32M|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|  1.32M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  1.32M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  1.32M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
25571|  1.32M|        }
25572|  1.32M|    }
25573|  1.41M|    p->bufcount = 0;
25574|  1.41M|    popstate(p, ret);
25575|  1.41M|    return 0;
25576|  1.41M|}
janet.c:check_str_const:
25513|  3.99M|static int check_str_const(const char *cstr, const uint8_t *str, int32_t len) {
25514|  3.99M|    int32_t index;
25515|  4.01M|    for (index = 0; index < len; index++) {
  ------------------
  |  Branch (25515:21): [True: 4.00M, False: 14.0k]
  ------------------
25516|  4.00M|        uint8_t c = str[index];
25517|  4.00M|        uint8_t k = ((const uint8_t *)cstr)[index];
25518|  4.00M|        if (c < k) return -1;
  ------------------
  |  Branch (25518:13): [True: 3.77M, False: 230k]
  ------------------
25519|   230k|        if (c > k) return 1;
  ------------------
  |  Branch (25519:13): [True: 206k, False: 23.8k]
  ------------------
25520|  23.8k|        if (k == '\0') break;
  ------------------
  |  Branch (25520:13): [True: 0, False: 23.8k]
  ------------------
25521|  23.8k|    }
25522|  14.0k|    return (cstr[index] == '\0') ? 0 : -1;
  ------------------
  |  Branch (25522:12): [True: 1.43k, False: 12.5k]
  ------------------
25523|  3.99M|}
janet.c:parser_state_delimiters:
26263|   102k|static Janet parser_state_delimiters(const JanetParser *_p) {
26264|   102k|    JanetParser *p = (JanetParser *)_p;
26265|   102k|    size_t i;
26266|   102k|    const uint8_t *str;
26267|   102k|    size_t oldcount;
26268|   102k|    oldcount = p->bufcount;
26269|   204k|    for (i = 0; i < p->statecount; i++) {
  ------------------
  |  Branch (26269:17): [True: 102k, False: 102k]
  ------------------
26270|   102k|        JanetParseState *s = p->states + i;
26271|   102k|        if (s->flags & PFLAG_PARENS) {
  ------------------
  |  |25220|   102k|#define PFLAG_PARENS 0x400
  ------------------
  |  Branch (26271:13): [True: 0, False: 102k]
  ------------------
26272|      0|            push_buf(p, '(');
26273|   102k|        } else if (s->flags & PFLAG_SQRBRACKETS) {
  ------------------
  |  |25221|   102k|#define PFLAG_SQRBRACKETS 0x800
  ------------------
  |  Branch (26273:20): [True: 0, False: 102k]
  ------------------
26274|      0|            push_buf(p, '[');
26275|   102k|        } else if (s->flags & PFLAG_CURLYBRACKETS) {
  ------------------
  |  |25222|   102k|#define PFLAG_CURLYBRACKETS 0x1000
  ------------------
  |  Branch (26275:20): [True: 0, False: 102k]
  ------------------
26276|      0|            push_buf(p, '{');
26277|   102k|        } else if (s->flags & PFLAG_STRING) {
  ------------------
  |  |25223|   102k|#define PFLAG_STRING 0x2000
  ------------------
  |  Branch (26277:20): [True: 0, False: 102k]
  ------------------
26278|      0|            push_buf(p, '"');
26279|   102k|        } else if (s->flags & PFLAG_LONGSTRING) {
  ------------------
  |  |25224|   102k|#define PFLAG_LONGSTRING 0x4000
  ------------------
  |  Branch (26279:20): [True: 0, False: 102k]
  ------------------
26280|      0|            int32_t i;
26281|      0|            for (i = 0; i < s->argn; i++) {
  ------------------
  |  Branch (26281:25): [True: 0, False: 0]
  ------------------
26282|      0|                push_buf(p, '`');
26283|      0|            }
26284|      0|        }
26285|   102k|    }
26286|       |    /* avoid ptr arithmetic on NULL */
26287|   102k|    str = janet_string(oldcount ? p->buf + oldcount : p->buf, (int32_t)(p->bufcount - oldcount));
  ------------------
  |  Branch (26287:24): [True: 0, False: 102k]
  ------------------
26288|   102k|    p->bufcount = oldcount;
26289|   102k|    return janet_wrap_string(str);
  ------------------
  |  |  843|   102k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|   102k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   102k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   102k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26290|   102k|}
janet.c:parserget:
26381|   714k|static int parserget(void *p, Janet key, Janet *out) {
26382|   714k|    (void) p;
26383|   714k|    if (!janet_checktype(key, JANET_KEYWORD)) return 0;
  ------------------
  |  |  801|   714k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 714k]
  |  |  ------------------
  |  |  802|   714k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   714k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   714k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   714k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   714k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   714k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (26383:9): [True: 0, False: 714k]
  ------------------
26384|   714k|    return janet_getmethod(janet_unwrap_keyword(key), parser_methods, out);
  ------------------
  |  |  860|   714k|#define janet_unwrap_keyword(x) ((const uint8_t *)janet_nanbox_to_pointer(x))
  ------------------
26385|   714k|}
janet.c:size_padded:
28044|    970|static size_t size_padded(size_t offset, size_t size) {
28045|    970|    size_t x = size + offset - 1;
28046|    970|    return x - (x % size);
28047|    970|}
janet.c:compile_peg:
28310|    645|static JanetPeg *compile_peg(Janet x) {
28311|    645|    Builder builder;
28312|    645|    builder.grammar = janet_table(0);
28313|    645|    builder.default_grammar = NULL;
28314|    645|    {
28315|    645|        Janet default_grammarv = janet_dyn("peg-grammar");
28316|    645|        if (janet_checktype(default_grammarv, JANET_TABLE)) {
  ------------------
  |  |  801|    645|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 645, False: 0]
  |  |  |  Branch (801:6): [Folded, False: 645]
  |  |  ------------------
  |  |  802|    645|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|    645|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|    645|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|    645|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    645|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    645|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28317|    645|            builder.default_grammar = janet_unwrap_table(default_grammarv);
  ------------------
  |  |  856|    645|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
28318|    645|        }
28319|    645|    }
28320|    645|    builder.tags = janet_table(0);
28321|    645|    builder.constants = NULL;
28322|    645|    builder.bytecode = NULL;
28323|    645|    builder.nexttag = 1;
28324|    645|    builder.form = x;
28325|    645|    builder.depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  291|    645|#define JANET_RECURSION_GUARD 1024
  ------------------
28326|    645|    builder.has_backref = 0;
28327|    645|    peg_compile1(&builder, x);
28328|    645|    JanetPeg *peg = make_peg(&builder);
28329|    645|    builder_cleanup(&builder);
28330|    645|    return peg;
28331|    645|}
janet.c:peg_compile1:
27861|  2.43k|static uint32_t peg_compile1(Builder *b, Janet peg) {
27862|       |
27863|       |    /* Keep track of the form being compiled for error purposes */
27864|  2.43k|    Janet old_form = b->form;
27865|  2.43k|    JanetTable *old_grammar = b->grammar;
27866|  2.43k|    b->form = peg;
27867|       |
27868|       |    /* Resolve keyword references */
27869|  2.43k|    int i = JANET_RECURSION_GUARD;
  ------------------
  |  |  291|  2.43k|#define JANET_RECURSION_GUARD 1024
  ------------------
27870|  2.43k|    JanetTable *grammar = old_grammar;
27871|  2.55k|    for (; i > 0 && janet_checktype(peg, JANET_KEYWORD); --i) {
  ------------------
  |  |  801|  2.55k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 119, False: 2.43k]
  |  |  |  Branch (801:6): [Folded, False: 2.55k]
  |  |  ------------------
  |  |  802|  2.55k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  2.55k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  2.55k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  2.55k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  2.55k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  2.55k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (27871:12): [True: 2.55k, False: 0]
  ------------------
27872|    119|        Janet nextPeg = janet_table_get_ex(grammar, peg, &grammar);
27873|    119|        if (!grammar || janet_checktype(nextPeg, JANET_NIL)) {
  ------------------
  |  |  801|    119|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 119, False: 0]
  |  |  |  Branch (801:6): [Folded, False: 119]
  |  |  ------------------
  |  |  802|    119|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|    119|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|    119|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|    119|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    119|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    119|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (27873:13): [True: 0, False: 119]
  ------------------
27874|    119|            nextPeg = (b->default_grammar == NULL)
  ------------------
  |  Branch (27874:23): [True: 0, False: 119]
  ------------------
27875|    119|                      ? janet_wrap_nil()
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27876|    119|                      : janet_table_get(b->default_grammar, peg);
27877|    119|            if (janet_checktype(nextPeg, JANET_NIL)) {
  ------------------
  |  |  801|    119|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 119]
  |  |  |  Branch (801:6): [Folded, False: 119]
  |  |  ------------------
  |  |  802|    119|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|    119|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|    119|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|    119|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    119|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    119|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27878|      0|                peg_panic(b, "unknown rule");
27879|      0|            }
27880|    119|        }
27881|    119|        peg = nextPeg;
27882|    119|        b->form = peg;
27883|    119|        b->grammar = grammar;
27884|    119|    }
27885|  2.43k|    if (i == 0)
  ------------------
  |  Branch (27885:9): [True: 0, False: 2.43k]
  ------------------
27886|      0|        peg_panic(b, "reference chain too deep");
27887|       |
27888|       |    /* Check cache - for tuples we check only the local cache, as
27889|       |     * in a different grammar, the same tuple can compile to a different
27890|       |     * rule - for example, (+ :a :b) depends on whatever :a and :b are bound to. */
27891|  2.43k|    Janet check = janet_checktype(peg, JANET_TUPLE)
  ------------------
  |  |  801|  2.43k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 1.51k, False: 921]
  |  |  |  Branch (801:6): [Folded, False: 2.43k]
  |  |  ------------------
  |  |  802|  2.43k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  2.43k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  2.43k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  2.43k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  2.43k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  2.43k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27892|  2.43k|                  ? janet_table_rawget(grammar, peg)
27893|  2.43k|                  : janet_table_get(grammar, peg);
27894|  2.43k|    if (!janet_checktype(check, JANET_NIL)) {
  ------------------
  |  |  801|  2.43k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 2.43k]
  |  |  ------------------
  |  |  802|  2.43k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  2.43k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  2.43k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  2.43k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  2.43k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  2.43k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (27894:9): [True: 133, False: 2.30k]
  ------------------
27895|    133|        b->form = old_form;
27896|    133|        b->grammar = old_grammar;
27897|    133|        return (uint32_t) janet_unwrap_number(check);
  ------------------
  |  |  834|    133|#define janet_unwrap_number(x) ((x).number)
  ------------------
27898|    133|    }
27899|       |
27900|       |    /* Check depth */
27901|  2.30k|    if (b->depth-- == 0)
  ------------------
  |  Branch (27901:9): [True: 0, False: 2.30k]
  ------------------
27902|      0|        peg_panic(b, "peg grammar recursed too deeply");
27903|       |
27904|       |    /* The final rule to return */
27905|  2.30k|    uint32_t rule = janet_v_count(b->bytecode);
  ------------------
  |  |  708|  2.30k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  1.66k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  1.66k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 1.66k, False: 645]
  |  |  ------------------
  ------------------
27906|       |
27907|       |    /* Add to cache. Do not cache structs, as we don't yet know
27908|       |     * what rule they will return! We can just as effectively cache
27909|       |     * the structs main rule. */
27910|  2.30k|    if (!janet_checktype(peg, JANET_STRUCT)) {
  ------------------
  |  |  801|  2.30k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 2.30k]
  |  |  ------------------
  |  |  802|  2.30k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  2.30k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  2.30k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  2.30k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  2.30k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  2.30k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (27910:9): [True: 2.29k, False: 12]
  ------------------
27911|  2.29k|        JanetTable *which_grammar = grammar;
27912|       |        /* If we are a primitive pattern, add to the global cache (root grammar table) */
27913|  2.29k|        if (!janet_checktype(peg, JANET_TUPLE)) {
  ------------------
  |  |  801|  2.29k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 2.29k]
  |  |  ------------------
  |  |  802|  2.29k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  2.29k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  2.29k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  2.29k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  2.29k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  2.29k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (27913:13): [True: 780, False: 1.51k]
  ------------------
27914|    780|            while (which_grammar->proto)
  ------------------
  |  Branch (27914:20): [True: 0, False: 780]
  ------------------
27915|      0|                which_grammar = which_grammar->proto;
27916|    780|        }
27917|  2.29k|        janet_table_put(which_grammar, peg, janet_wrap_number(rule));
  ------------------
  |  |  830|  2.29k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
27918|  2.29k|    }
27919|       |
27920|  2.30k|    switch (janet_type(peg)) {
  ------------------
  |  |  790|  2.30k|    (isnan((x).number) \
  |  |  791|  2.30k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  2.30k|        : JANET_NUMBER)
  ------------------
  |  Branch (27920:13): [True: 2.13k, False: 167]
  ------------------
27921|     23|        default:
  ------------------
  |  Branch (27921:9): [True: 23, False: 2.28k]
  ------------------
27922|     23|            peg_panic(b, "unexpected peg source");
27923|      0|            return 0;
27924|       |
27925|      7|        case JANET_BOOLEAN: {
  ------------------
  |  Branch (27925:9): [True: 7, False: 2.29k]
  ------------------
27926|      7|            int n = janet_unwrap_boolean(peg);
  ------------------
  |  |  833|      7|#define janet_unwrap_boolean(x) ((x).u64 & 0x1)
  ------------------
27927|      7|            Reserve r = reserve(b, 2);
27928|      7|            emit_1(r, n ? RULE_NCHAR : RULE_NOTNCHAR, 0);
  ------------------
  |  Branch (27928:23): [True: 3, False: 4]
  ------------------
27929|      7|            break;
27930|      0|        }
27931|    167|        case JANET_NUMBER: {
  ------------------
  |  Branch (27931:9): [True: 167, False: 2.13k]
  ------------------
27932|    167|            int32_t n = peg_getinteger(b, peg);
27933|    167|            Reserve r = reserve(b, 2);
27934|    167|            if (n < 0) {
  ------------------
  |  Branch (27934:17): [True: 31, False: 136]
  ------------------
27935|     31|                emit_1(r, RULE_NOTNCHAR, -n);
27936|    136|            } else {
27937|    136|                emit_1(r, RULE_NCHAR, n);
27938|    136|            }
27939|    167|            break;
27940|      0|        }
27941|    389|        case JANET_STRING: {
  ------------------
  |  Branch (27941:9): [True: 389, False: 1.91k]
  ------------------
27942|    389|            const uint8_t *str = janet_unwrap_string(peg);
  ------------------
  |  |  858|    389|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
27943|    389|            int32_t len = janet_string_length(str);
  ------------------
  |  | 1803|    389|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|    389|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
27944|    389|            emit_bytes(b, RULE_LITERAL, len, str);
27945|    389|            break;
27946|      0|        }
27947|    188|        case JANET_BUFFER: {
  ------------------
  |  Branch (27947:9): [True: 188, False: 2.11k]
  ------------------
27948|    188|            const JanetBuffer *buf = janet_unwrap_buffer(peg);
  ------------------
  |  |  857|    188|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
27949|    188|            emit_bytes(b, RULE_LITERAL, buf->count, buf->data);
27950|    188|            break;
27951|      0|        }
27952|      6|        case JANET_TABLE: {
  ------------------
  |  Branch (27952:9): [True: 6, False: 2.30k]
  ------------------
27953|       |            /* Build grammar table */
27954|      6|            JanetTable *new_grammar = janet_table_clone(janet_unwrap_table(peg));
  ------------------
  |  |  856|      6|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
27955|      6|            new_grammar->proto = grammar;
27956|      6|            b->grammar = grammar = new_grammar;
27957|       |            /* Run the main rule */
27958|      6|            Janet main_rule = janet_table_rawget(grammar, janet_ckeywordv("main"));
  ------------------
  |  | 1833|      6|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      6|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      6|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      6|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      6|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27959|      6|            if (janet_checktype(main_rule, JANET_NIL))
  ------------------
  |  |  801|      6|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 6, False: 0]
  |  |  |  Branch (801:6): [Folded, False: 6]
  |  |  ------------------
  |  |  802|      6|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      6|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      6|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      6|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      6|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      6|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27960|      6|                peg_panic(b, "grammar requires :main rule");
27961|      0|            rule = peg_compile1(b, main_rule);
27962|      0|            break;
27963|      6|        }
27964|     12|        case JANET_STRUCT: {
  ------------------
  |  Branch (27964:9): [True: 12, False: 2.29k]
  ------------------
27965|       |            /* Build grammar table */
27966|     12|            const JanetKV *st = janet_unwrap_struct(peg);
  ------------------
  |  |  852|     12|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
27967|     12|            JanetTable *new_grammar = janet_table(2 * janet_struct_capacity(st));
  ------------------
  |  | 1839|     12|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1836|     12|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
27968|    205|            for (int32_t i = 0; i < janet_struct_capacity(st); i++) {
  ------------------
  |  | 1839|    205|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1836|    205|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (27968:33): [True: 193, False: 12]
  ------------------
27969|    193|                if (janet_checktype(st[i].key, JANET_KEYWORD)) {
  ------------------
  |  |  801|    193|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 14, False: 179]
  |  |  |  Branch (801:6): [Folded, False: 193]
  |  |  ------------------
  |  |  802|    193|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|    193|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|    193|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|    193|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    193|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    193|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27970|     14|                    janet_table_put(new_grammar, st[i].key, st[i].value);
27971|     14|                }
27972|    193|            }
27973|     12|            new_grammar->proto = grammar;
27974|     12|            b->grammar = grammar = new_grammar;
27975|       |            /* Run the main rule */
27976|     12|            Janet main_rule = janet_table_rawget(grammar, janet_ckeywordv("main"));
  ------------------
  |  | 1833|     12|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|     12|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|     12|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|     12|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|     12|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27977|     12|            if (janet_checktype(main_rule, JANET_NIL))
  ------------------
  |  |  801|     12|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 12, False: 0]
  |  |  |  Branch (801:6): [Folded, False: 12]
  |  |  ------------------
  |  |  802|     12|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|     12|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|     12|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|     12|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     12|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     12|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27978|     12|                peg_panic(b, "grammar requires :main rule");
27979|      0|            rule = peg_compile1(b, main_rule);
27980|      0|            break;
27981|     12|        }
27982|  1.51k|        case JANET_TUPLE: {
  ------------------
  |  Branch (27982:9): [True: 1.51k, False: 792]
  ------------------
27983|  1.51k|            const Janet *tup = janet_unwrap_tuple(peg);
  ------------------
  |  |  853|  1.51k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
27984|  1.51k|            int32_t len = janet_tuple_length(tup);
  ------------------
  |  | 1792|  1.51k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|  1.51k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
27985|  1.51k|            if (len == 0) peg_panic(b, "tuple in grammar must have non-zero length");
  ------------------
  |  Branch (27985:17): [True: 1, False: 1.51k]
  ------------------
27986|  1.51k|            if (janet_checkint(tup[0])) {
  ------------------
  |  Branch (27986:17): [True: 59, False: 1.45k]
  ------------------
27987|     59|                int32_t n = janet_unwrap_integer(tup[0]);
  ------------------
  |  |  957|     59|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  834|     59|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
27988|     59|                if (n < 0) {
  ------------------
  |  Branch (27988:21): [True: 4, False: 55]
  ------------------
27989|      4|                    peg_panicf(b, "expected non-negative integer, got %d", n);
  ------------------
  |  |27302|      4|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27990|      4|                }
27991|     55|                spec_repeat(b, len, tup);
27992|     55|                break;
27993|     59|            }
27994|  1.45k|            if (!janet_checktype(tup[0], JANET_SYMBOL))
  ------------------
  |  |  801|  1.45k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 1.45k]
  |  |  ------------------
  |  |  802|  1.45k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  1.45k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  1.45k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  1.45k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.45k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.45k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (27994:17): [True: 7, False: 1.44k]
  ------------------
27995|      7|                peg_panicf(b, "expected grammar command, found %v", tup[0]);
  ------------------
  |  |27302|      7|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27996|  1.44k|            const uint8_t *sym = janet_unwrap_symbol(tup[0]);
  ------------------
  |  |  859|  1.44k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
27997|  1.44k|            const SpecialPair *sp = janet_strbinsearch(
27998|  1.44k|                                        &peg_specials,
27999|  1.44k|                                        sizeof(peg_specials) / sizeof(SpecialPair),
28000|  1.44k|                                        sizeof(SpecialPair),
28001|  1.44k|                                        sym);
28002|  1.44k|            if (sp) {
  ------------------
  |  Branch (28002:17): [True: 1.38k, False: 59]
  ------------------
28003|  1.38k|                sp->special(b, len - 1, tup + 1);
28004|  1.38k|            } else {
28005|     59|                peg_panicf(b, "unknown special %S", sym);
  ------------------
  |  |27302|     59|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
28006|     59|            }
28007|  1.38k|            break;
28008|  1.44k|        }
28009|  2.30k|    }
28010|       |
28011|       |    /* Increase depth again */
28012|  1.96k|    b->depth++;
28013|  1.96k|    b->form = old_form;
28014|  1.96k|    b->grammar = old_grammar;
28015|  1.96k|    return rule;
28016|  2.30k|}
janet.c:peg_panic:
27297|    160|JANET_NO_RETURN static void peg_panic(Builder *b, const char *msg) {
27298|    160|    builder_cleanup(b);
27299|    160|    janet_panicf("grammar error in %p, %s", b->form, msg);
27300|    160|}
janet.c:reserve:
27388|  1.40k|static Reserve reserve(Builder *b, int32_t size) {
27389|  1.40k|    Reserve r;
27390|  1.40k|    r.index = janet_v_count(b->bytecode);
  ------------------
  |  |  708|  1.40k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  1.05k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  1.05k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 1.05k, False: 354]
  |  |  ------------------
  ------------------
27391|  1.40k|    r.builder = b;
27392|  1.40k|    r.size = size;
27393|  5.84k|    for (int32_t i = 0; i < size; i++)
  ------------------
  |  Branch (27393:25): [True: 4.43k, False: 1.40k]
  ------------------
27394|       |        janet_v_push(b->bytecode, 0);
  ------------------
  |  |  706|  4.43k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  4.43k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  4.43k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  4.08k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  4.08k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  4.08k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 354, False: 4.08k]
  |  |  |  |  |  |  |  Branch (717:50): [True: 1.02k, False: 3.05k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  1.38k|#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))
  |  |  ------------------
  |  |  |  |  715|  4.43k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  4.43k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27395|  1.40k|    return r;
27396|  1.40k|}
janet.c:emit_1:
27417|    224|static void emit_1(Reserve r, uint32_t op, uint32_t arg) {
27418|    224|    emit_rule(r, op, 1, &arg);
27419|    224|}
janet.c:emit_rule:
27399|  1.22k|static void emit_rule(Reserve r, int32_t op, int32_t n, const uint32_t *body) {
27400|  1.22k|    janet_assert(r.size == n + 1, "bad reserve");
  ------------------
  |  |  386|  1.22k|#define janet_assert(c, m) do { \
  |  |  387|  1.22k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 1.22k]
  |  |  ------------------
  |  |  388|  1.22k|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 1.22k]
  |  |  ------------------
  ------------------
27401|  1.22k|    r.builder->bytecode[r.index] = op;
27402|  1.22k|    memcpy(r.builder->bytecode + r.index + 1, body, n * sizeof(uint32_t));
27403|  1.22k|}
janet.c:peg_getinteger:
27338|    240|static int32_t peg_getinteger(Builder *b, Janet x) {
27339|    240|    if (!janet_checkint(x))
  ------------------
  |  Branch (27339:9): [True: 8, False: 232]
  ------------------
27340|      8|        peg_panicf(b, "expected integer, got %v", x);
  ------------------
  |  |27302|      8|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27341|    232|    return janet_unwrap_integer(x);
  ------------------
  |  |  957|    232|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  834|    232|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
27342|    240|}
janet.c:emit_bytes:
27406|    577|static void emit_bytes(Builder *b, uint32_t op, int32_t len, const uint8_t *bytes) {
27407|    577|    uint32_t next_rule = janet_v_count(b->bytecode);
  ------------------
  |  |  708|    577|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|    552|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|    552|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 552, False: 25]
  |  |  ------------------
  ------------------
27408|    577|    janet_v_push(b->bytecode, op);
  ------------------
  |  |  706|    577|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|    577|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|    577|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|    552|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|    552|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|    552|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|    552|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 25, False: 552]
  |  |  |  |  |  |  |  Branch (717:50): [True: 79, False: 473]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    104|#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))
  |  |  ------------------
  |  |  |  |  715|    577|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|    577|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27409|    577|    janet_v_push(b->bytecode, len);
  ------------------
  |  |  706|    577|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|    577|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|    577|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|    577|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|    577|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|    577|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|    577|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 0, False: 577]
  |  |  |  |  |  |  |  Branch (717:50): [True: 102, False: 475]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    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))
  |  |  ------------------
  |  |  |  |  715|    577|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|    577|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27410|    577|    int32_t words = ((len + 3) >> 2);
27411|  90.6k|    for (int32_t i = 0; i < words; i++)
  ------------------
  |  Branch (27411:25): [True: 90.0k, False: 577]
  ------------------
27412|       |        janet_v_push(b->bytecode, 0);
  ------------------
  |  |  706|  90.0k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  90.0k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  90.0k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  90.0k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  90.0k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  90.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 0, False: 90.0k]
  |  |  |  |  |  |  |  Branch (717:50): [True: 283, False: 89.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    283|#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))
  |  |  ------------------
  |  |  |  |  715|  90.0k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  90.0k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27413|    577|    memcpy(b->bytecode + next_rule + 2, bytes, len);
27414|    577|}
janet.c:spec_repeat:
27561|     55|static void spec_repeat(Builder *b, int32_t argc, const Janet *argv) {
27562|     55|    peg_fixarity(b, argc, 2);
27563|     55|    Reserve r = reserve(b, 4);
27564|     55|    int32_t n = peg_getnat(b, argv[0]);
27565|     55|    uint32_t subrule = peg_compile1(b, argv[1]);
27566|     55|    emit_3(r, RULE_BETWEEN, n, n, subrule);
27567|     55|}
janet.c:peg_fixarity:
27304|    107|static void peg_fixarity(Builder *b, int32_t argc, int32_t arity) {
27305|    107|    if (argc != arity) {
  ------------------
  |  Branch (27305:9): [True: 7, False: 100]
  ------------------
27306|      7|        peg_panicf(b, "expected %d argument%s, got %d",
  ------------------
  |  |27302|     14|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  |  |  ------------------
  |  |  |  Branch (27302:71): [True: 4, False: 3]
  |  |  ------------------
  ------------------
27307|      7|                   arity,
27308|      7|                   arity == 1 ? "" : "s",
27309|      7|                   argc);
27310|      7|    }
27311|    107|}
janet.c:peg_getnat:
27344|     52|static int32_t peg_getnat(Builder *b, Janet x) {
27345|     52|    int32_t i = peg_getinteger(b, x);
27346|     52|    if (i < 0)
  ------------------
  |  Branch (27346:9): [True: 0, False: 52]
  ------------------
27347|      0|        peg_panicf(b, "expected non-negative integer, got %v", x);
  ------------------
  |  |27302|      0|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27348|     52|    return i;
27349|     52|}
janet.c:emit_3:
27424|     69|static void emit_3(Reserve r, uint32_t op, uint32_t arg1, uint32_t arg2, uint32_t arg3) {
27425|     69|    uint32_t arr[3] = {arg1, arg2, arg3};
27426|     69|    emit_rule(r, op, 3, arr);
27427|     69|}
janet.c:spec_not:
27577|     11|static void spec_not(Builder *b, int32_t argc, const Janet *argv) {
27578|     11|    spec_onerule(b, argc, argv, RULE_NOT);
27579|     11|}
janet.c:spec_onerule:
27570|     11|static void spec_onerule(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
27571|     11|    peg_fixarity(b, argc, 1);
27572|     11|    Reserve r = reserve(b, 2);
27573|     11|    uint32_t rule = peg_compile1(b, argv[0]);
27574|     11|    emit_1(r, op, rule);
27575|     11|}
janet.c:spec_position:
27669|     12|static void spec_position(Builder *b, int32_t argc, const Janet *argv) {
27670|     12|    spec_tag1(b, argc, argv, RULE_POSITION);
27671|     12|}
janet.c:spec_tag1:
27661|     12|static void spec_tag1(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
27662|     12|    peg_arity(b, argc, 0, 1);
27663|     12|    Reserve r = reserve(b, 2);
27664|     12|    uint32_t tag = (argc) ? emit_tag(b, argv[0]) : 0;
  ------------------
  |  Branch (27664:20): [True: 2, False: 10]
  ------------------
27665|     12|    (void) argv;
27666|     12|    emit_1(r, op, tag);
27667|     12|}
janet.c:peg_arity:
27313|  1.16k|static void peg_arity(Builder *b, int32_t arity, int32_t min, int32_t max) {
27314|  1.16k|    if (min >= 0 && arity < min)
  ------------------
  |  Branch (27314:9): [True: 1.16k, False: 0]
  |  Branch (27314:21): [True: 4, False: 1.16k]
  ------------------
27315|      4|        peg_panicf(b, "arity mismatch, expected at least %d, got %d", min, arity);
  ------------------
  |  |27302|      4|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27316|  1.16k|    if (max >= 0 && arity > max)
  ------------------
  |  Branch (27316:9): [True: 1.07k, False: 81]
  |  Branch (27316:21): [True: 23, False: 1.05k]
  ------------------
27317|     23|        peg_panicf(b, "arity mismatch, expected at most %d, got %d", max, arity);
  ------------------
  |  |27302|     23|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27318|  1.16k|}
janet.c:emit_tag:
27361|      6|static uint32_t emit_tag(Builder *b, Janet t) {
27362|      6|    if (!janet_checktype(t, JANET_KEYWORD))
  ------------------
  |  |  801|      6|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 6]
  |  |  ------------------
  |  |  802|      6|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      6|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      6|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      6|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      6|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      6|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (27362:9): [True: 6, False: 0]
  ------------------
27363|      6|        peg_panicf(b, "expected keyword for capture tag, got %v", t);
  ------------------
  |  |27302|      6|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27364|      0|    Janet check = janet_table_get(b->tags, t);
27365|      0|    if (janet_checktype(check, JANET_NIL)) {
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 0]
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27366|      0|        uint32_t tag = b->nexttag++;
27367|      0|        if (tag > 255) {
  ------------------
  |  Branch (27367:13): [True: 0, False: 0]
  ------------------
27368|      0|            peg_panic(b, "too many tags - up to 255 tags are supported per peg");
27369|      0|        }
27370|      0|        Janet val = janet_wrap_number(tag);
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
27371|      0|        janet_table_put(b->tags, t, val);
27372|      0|        return tag;
27373|      0|    } else {
27374|      0|        return (uint32_t) janet_unwrap_number(check);
  ------------------
  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  ------------------
27375|      0|    }
27376|      0|}
janet.c:spec_accumulate:
27614|     15|static void spec_accumulate(Builder *b, int32_t argc, const Janet *argv) {
27615|     15|    spec_cap1(b, argc, argv, RULE_ACCUMULATE);
27616|     15|}
janet.c:spec_cap1:
27603|    993|static void spec_cap1(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
27604|    993|    peg_arity(b, argc, 1, 2);
27605|    993|    Reserve r = reserve(b, 3);
27606|    993|    uint32_t tag = (argc == 2) ? emit_tag(b, argv[1]) : 0;
  ------------------
  |  Branch (27606:20): [True: 1, False: 992]
  ------------------
27607|    993|    uint32_t rule = peg_compile1(b, argv[0]);
27608|    993|    emit_2(r, op, rule, tag);
27609|    993|}
janet.c:emit_2:
27420|    867|static void emit_2(Reserve r, uint32_t op, uint32_t arg1, uint32_t arg2) {
27421|    867|    uint32_t arr[2] = {arg1, arg2};
27422|    867|    emit_rule(r, op, 2, arr);
27423|    867|}
janet.c:spec_sequence:
27492|     79|static void spec_sequence(Builder *b, int32_t argc, const Janet *argv) {
27493|     79|    spec_variadic(b, argc, argv, RULE_SEQUENCE);
27494|     79|}
janet.c:spec_variadic:
27477|    172|static void spec_variadic(Builder *b, int32_t argc, const Janet *argv, uint32_t op) {
27478|    172|    uint32_t rule = janet_v_count(b->bytecode);
  ------------------
  |  |  708|    172|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|     34|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|     34|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 34, False: 138]
  |  |  ------------------
  ------------------
27479|    172|    janet_v_push(b->bytecode, op);
  ------------------
  |  |  706|    172|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|    172|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|    172|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|     34|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|     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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|     34|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|     34|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 138, False: 34]
  |  |  |  |  |  |  |  Branch (717:50): [True: 12, False: 22]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    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))
  |  |  ------------------
  |  |  |  |  715|    172|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|    172|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27480|    172|    janet_v_push(b->bytecode, argc);
  ------------------
  |  |  706|    172|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|    172|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|    172|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|    172|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|    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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|    172|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|    172|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 0, False: 172]
  |  |  |  |  |  |  |  Branch (717:50): [True: 140, False: 32]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    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))
  |  |  ------------------
  |  |  |  |  715|    172|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|    172|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27481|  2.34k|    for (int32_t i = 0; i < argc; i++)
  ------------------
  |  Branch (27481:25): [True: 2.17k, False: 172]
  ------------------
27482|  2.17k|        janet_v_push(b->bytecode, 0);
  ------------------
  |  |  706|  2.17k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  2.17k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  2.17k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  2.17k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  2.17k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  2.17k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 0, False: 2.17k]
  |  |  |  |  |  |  |  Branch (717:50): [True: 282, False: 1.89k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    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))
  |  |  ------------------
  |  |  |  |  715|  2.17k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  2.17k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27483|    824|    for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (27483:25): [True: 652, False: 172]
  ------------------
27484|    652|        uint32_t rulei = peg_compile1(b, argv[i]);
27485|    652|        b->bytecode[rule + 2 + i] = rulei;
27486|    652|    }
27487|    172|}
janet.c:spec_choice:
27489|     93|static void spec_choice(Builder *b, int32_t argc, const Janet *argv) {
27490|     93|    spec_variadic(b, argc, argv, RULE_CHOICE);
27491|     93|}
janet.c:spec_reference:
27652|      3|static void spec_reference(Builder *b, int32_t argc, const Janet *argv) {
27653|      3|    peg_arity(b, argc, 1, 2);
27654|      3|    Reserve r = reserve(b, 3);
27655|      3|    uint32_t search = emit_tag(b, argv[0]);
27656|      3|    uint32_t tag = (argc == 2) ? emit_tag(b, argv[1]) : 0;
  ------------------
  |  Branch (27656:20): [True: 0, False: 3]
  ------------------
27657|      3|    b->has_backref = 1;
27658|      3|    emit_2(r, RULE_GETTAG, search, tag);
27659|      3|}
janet.c:spec_replace:
27707|     41|static void spec_replace(Builder *b, int32_t argc, const Janet *argv) {
27708|     41|    peg_arity(b, argc, 2, 3);
27709|     41|    Reserve r = reserve(b, 4);
27710|     41|    uint32_t subrule = peg_compile1(b, argv[0]);
27711|     41|    uint32_t constant = emit_constant(b, argv[1]);
27712|     41|    uint32_t tag = (argc == 3) ? emit_tag(b, argv[2]) : 0;
  ------------------
  |  Branch (27712:20): [True: 2, False: 39]
  ------------------
27713|     41|    emit_3(r, RULE_REPLACE, subrule, constant, tag);
27714|     41|}
janet.c:emit_constant:
27355|     24|static uint32_t emit_constant(Builder *b, Janet c) {
27356|     24|    uint32_t cindex = (uint32_t) janet_v_count(b->constants);
  ------------------
  |  |  708|     24|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 0, False: 24]
  |  |  ------------------
  ------------------
27357|       |    janet_v_push(b->constants, c);
  ------------------
  |  |  706|     24|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|     24|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|     24|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|      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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|      0|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 24, False: 0]
  |  |  |  |  |  |  |  Branch (717:50): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|     24|#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))
  |  |  ------------------
  |  |  |  |  715|     24|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|     24|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27358|     24|    return cindex;
27359|     24|}
janet.c:spec_capture:
27611|    978|static void spec_capture(Builder *b, int32_t argc, const Janet *argv) {
27612|    978|    spec_cap1(b, argc, argv, RULE_CAPTURE);
27613|    978|}
janet.c:spec_look:
27467|     33|static void spec_look(Builder *b, int32_t argc, const Janet *argv) {
27468|     33|    peg_arity(b, argc, 1, 2);
27469|     33|    Reserve r = reserve(b, 3);
27470|     33|    int32_t rulearg = argc == 2 ? 1 : 0;
  ------------------
  |  Branch (27470:23): [True: 21, False: 12]
  ------------------
27471|     33|    int32_t offset = argc == 2 ? peg_getinteger(b, argv[0]) : 0;
  ------------------
  |  Branch (27471:22): [True: 21, False: 12]
  ------------------
27472|     33|    uint32_t subrule = peg_compile1(b, argv[rulearg]);
27473|     33|    emit_2(r, RULE_LOOK, (uint32_t) offset, subrule);
27474|     33|}
janet.c:spec_opt:
27554|      3|static void spec_opt(Builder *b, int32_t argc, const Janet *argv) {
27555|      3|    peg_fixarity(b, argc, 1);
27556|      3|    Reserve r = reserve(b, 4);
27557|      3|    uint32_t subrule = peg_compile1(b, argv[0]);
27558|      3|    emit_3(r, RULE_BETWEEN, 0, 1, subrule);
27559|      3|}
janet.c:spec_debug:
27699|      1|static void spec_debug(Builder *b, int32_t argc, const Janet *argv) {
27700|      1|    peg_arity(b, argc, 0, 0);
27701|      1|    Reserve r = reserve(b, 1);
27702|      1|    uint32_t empty = 0;
27703|      1|    (void) argv;
27704|      1|    emit_rule(r, RULE_DEBUG, 0, &empty);
27705|      1|}
janet.c:spec_branch:
27497|     20|static void spec_branch(Builder *b, int32_t argc, const Janet *argv, uint32_t rule) {
27498|     20|    peg_fixarity(b, argc, 2);
27499|     20|    Reserve r = reserve(b, 3);
27500|     20|    uint32_t rule_a = peg_compile1(b, argv[0]);
27501|     20|    uint32_t rule_b = peg_compile1(b, argv[1]);
27502|     20|    emit_2(r, rule, rule_a, rule_b);
27503|     20|}
janet.c:spec_ifnot:
27508|     20|static void spec_ifnot(Builder *b, int32_t argc, const Janet *argv) {
27509|     20|    spec_branch(b, argc, argv, RULE_IFNOT);
27510|     20|}
janet.c:spec_range:
27437|     81|static void spec_range(Builder *b, int32_t argc, const Janet *argv) {
27438|     81|    peg_arity(b, argc, 1, -1);
27439|     81|    if (argc == 1) {
  ------------------
  |  Branch (27439:9): [True: 38, False: 43]
  ------------------
27440|     38|        Reserve r = reserve(b, 2);
27441|     38|        const uint8_t *str = peg_getrange(b, argv[0]);
27442|     38|        uint32_t arg = str[0] | (str[1] << 16);
27443|     38|        emit_1(r, RULE_RANGE, arg);
27444|     43|    } else {
27445|       |        /* Compile as a set */
27446|     43|        Reserve r = reserve(b, 9);
27447|     43|        uint32_t bitmap[8] = {0};
27448|    132|        for (int32_t i = 0; i < argc; i++) {
  ------------------
  |  Branch (27448:29): [True: 89, False: 43]
  ------------------
27449|     89|            const uint8_t *str = peg_getrange(b, argv[i]);
27450|  2.31k|            for (uint32_t c = str[0]; c <= str[1]; c++)
  ------------------
  |  Branch (27450:39): [True: 2.22k, False: 89]
  ------------------
27451|  2.22k|                bitmap_set(bitmap, c);
27452|     89|        }
27453|     43|        emit_rule(r, RULE_SET, 8, bitmap);
27454|     43|    }
27455|     81|}
janet.c:peg_getrange:
27327|    127|static const uint8_t *peg_getrange(Builder *b, Janet x) {
27328|    127|    if (!janet_checktype(x, JANET_STRING))
  ------------------
  |  |  801|    127|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 127]
  |  |  ------------------
  |  |  802|    127|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|    127|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|    127|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|    127|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    127|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    127|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (27328:9): [True: 0, False: 127]
  ------------------
27329|      0|        peg_panic(b, "expected string for character range");
27330|    127|    const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  858|    127|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
27331|    127|    if (janet_string_length(str) != 2)
  ------------------
  |  | 1803|    127|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|    127|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (27331:9): [True: 0, False: 127]
  ------------------
27332|      0|        peg_panicf(b, "expected string to have length 2, got %v", x);
  ------------------
  |  |27302|      0|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27333|    127|    if (str[1] < str[0])
  ------------------
  |  Branch (27333:9): [True: 0, False: 127]
  ------------------
27334|      0|        peg_panicf(b, "range %v is empty", x);
  ------------------
  |  |27302|      0|#define peg_panicf(b,...) peg_panic((b), (const char *) janet_formatc(__VA_ARGS__))
  ------------------
27335|    127|    return str;
27336|    127|}
janet.c:bitmap_set:
27433|  2.35k|static void bitmap_set(uint32_t *bitmap, uint8_t c) {
27434|  2.35k|    bitmap[c >> 5] |= ((uint32_t)1) << (c & 0x1F);
27435|  2.35k|}
janet.c:spec_set:
27457|     18|static void spec_set(Builder *b, int32_t argc, const Janet *argv) {
27458|     18|    peg_fixarity(b, argc, 1);
27459|     18|    Reserve r = reserve(b, 9);
27460|     18|    const uint8_t *str = peg_getset(b, argv[0]);
27461|     18|    uint32_t bitmap[8] = {0};
27462|    144|    for (int32_t i = 0; i < janet_string_length(str); i++)
  ------------------
  |  | 1803|    144|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|    144|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (27462:25): [True: 126, False: 18]
  ------------------
27463|    126|        bitmap_set(bitmap, str[i]);
27464|     18|    emit_rule(r, RULE_SET, 8, bitmap);
27465|     18|}
janet.c:peg_getset:
27320|     18|static const uint8_t *peg_getset(Builder *b, Janet x) {
27321|     18|    if (!janet_checktype(x, JANET_STRING))
  ------------------
  |  |  801|     18|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 18]
  |  |  ------------------
  |  |  802|     18|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|     18|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|     18|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|     18|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     18|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     18|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (27321:9): [True: 0, False: 18]
  ------------------
27322|      0|        peg_panic(b, "expected string for character set");
27323|     18|    const uint8_t *str = janet_unwrap_string(x);
  ------------------
  |  |  858|     18|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
27324|     18|    return str;
27325|     18|}
janet.c:make_peg:
28291|    485|static JanetPeg *make_peg(Builder *b) {
28292|    485|    size_t bytecode_start = size_padded(sizeof(JanetPeg), sizeof(uint32_t));
28293|    485|    size_t bytecode_size = janet_v_count(b->bytecode) * sizeof(uint32_t);
  ------------------
  |  |  708|    485|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|    485|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|    485|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 485, False: 0]
  |  |  ------------------
  ------------------
28294|    485|    size_t constants_start = size_padded(bytecode_start + bytecode_size, sizeof(Janet));
28295|    485|    size_t constants_size = janet_v_count(b->constants) * sizeof(Janet);
  ------------------
  |  |  708|    485|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|     22|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|     22|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 22, False: 463]
  |  |  ------------------
  ------------------
28296|    485|    size_t total_size = constants_start + constants_size;
28297|    485|    char *mem = janet_abstract(&janet_peg_type, total_size);
28298|    485|    JanetPeg *peg = (JanetPeg *)mem;
28299|    485|    peg->bytecode = (uint32_t *)(mem + bytecode_start);
28300|    485|    peg->constants = (Janet *)(mem + constants_start);
28301|    485|    peg->num_constants = janet_v_count(b->constants);
  ------------------
  |  |  708|    485|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|     22|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|     22|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 22, False: 463]
  |  |  ------------------
  ------------------
28302|    485|    safe_memcpy(peg->bytecode, b->bytecode, bytecode_size);
28303|    485|    safe_memcpy(peg->constants, b->constants, constants_size);
28304|       |    peg->bytecode_len = janet_v_count(b->bytecode);
  ------------------
  |  |  708|    485|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|    485|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|    485|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 485, False: 0]
  |  |  ------------------
  ------------------
28305|    485|    peg->has_backref = b->has_backref;
28306|    485|    return peg;
28307|    485|}
janet.c:builder_cleanup:
27292|    645|static void builder_cleanup(Builder *b) {
27293|    645|    janet_v_free(b->constants);
  ------------------
  |  |  705|    645|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  713|     24|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (705:34): [True: 24, False: 621]
  |  |  ------------------
  ------------------
27294|       |    janet_v_free(b->bytecode);
  ------------------
  |  |  705|    645|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  713|    517|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (705:34): [True: 517, False: 128]
  |  |  ------------------
  ------------------
27295|    645|}
janet.c:peg_cfun_init:
28357|    653|static PegCall peg_cfun_init(int32_t argc, Janet *argv, int get_replace) {
28358|    653|    PegCall ret;
28359|    653|    int32_t min = get_replace ? 3 : 2;
  ------------------
  |  Branch (28359:19): [True: 447, False: 206]
  ------------------
28360|    653|    janet_arity(argc, min, -1);
28361|    653|    if (janet_checktype(argv[0], JANET_ABSTRACT) &&
  ------------------
  |  |  801|  1.30k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 1, False: 652]
  |  |  |  Branch (801:6): [Folded, False: 653]
  |  |  ------------------
  |  |  802|  1.30k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  1.30k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|    653|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|    653|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    653|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    653|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28362|      1|            janet_abstract_type(janet_unwrap_abstract(argv[0])) == &janet_peg_type) {
  ------------------
  |  | 1889|      1|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|      1|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (28362:13): [True: 0, False: 1]
  ------------------
28363|      0|        ret.peg = janet_unwrap_abstract(argv[0]);
  ------------------
  |  |  861|      0|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
28364|    653|    } else {
28365|    653|        ret.peg = compile_peg(argv[0]);
28366|    653|    }
28367|    653|    if (get_replace) {
  ------------------
  |  Branch (28367:9): [True: 333, False: 320]
  ------------------
28368|    333|        ret.subst = argv[1];
28369|    333|        ret.bytes = janet_getbytes(argv, 2);
28370|    333|    } else {
28371|    320|        ret.bytes = janet_getbytes(argv, 1);
28372|    320|    }
28373|    653|    if (argc > min) {
  ------------------
  |  Branch (28373:9): [True: 194, False: 459]
  ------------------
28374|    194|        ret.start = janet_gethalfrange(argv, min, ret.bytes.len, "offset");
28375|    194|        ret.s.extrac = argc - min - 1;
28376|    194|        ret.s.extrav = janet_tuple_n(argv + min + 1, argc - min - 1);
28377|    459|    } else {
28378|    459|        ret.start = 0;
28379|    459|        ret.s.extrac = 0;
28380|    459|        ret.s.extrav = NULL;
28381|    459|    }
28382|    653|    ret.s.mode = PEG_MODE_NORMAL;
28383|    653|    ret.s.text_start = ret.bytes.bytes;
28384|    653|    ret.s.text_end = ret.bytes.bytes + ret.bytes.len;
28385|    653|    ret.s.outer_text_end = ret.s.text_end;
28386|    653|    ret.s.depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  291|    653|#define JANET_RECURSION_GUARD 1024
  ------------------
28387|    653|    ret.s.captures = janet_array(0);
28388|    653|    ret.s.tagged_captures = janet_array(0);
28389|    653|    ret.s.scratch = janet_buffer(10);
28390|    653|    ret.s.tags = janet_buffer(10);
28391|    653|    ret.s.constants = ret.peg->constants;
28392|    653|    ret.s.bytecode = ret.peg->bytecode;
28393|       |    ret.s.linemap = NULL;
28394|    653|    ret.s.linemaplen = -1;
28395|    653|    ret.s.has_backref = ret.peg->has_backref;
28396|    653|    return ret;
28397|    653|}
janet.c:peg_rule:
26600|   177k|    const uint8_t *text) {
26601|   185k|tail:
26602|   185k|    switch (*rule) {
26603|      0|        default:
  ------------------
  |  Branch (26603:9): [True: 0, False: 185k]
  ------------------
26604|      0|            janet_panic("unexpected opcode");
26605|      0|            return NULL;
26606|       |
26607|   152k|        case RULE_LITERAL: {
  ------------------
  |  Branch (26607:9): [True: 152k, False: 32.3k]
  ------------------
26608|   152k|            uint32_t len = rule[1];
26609|   152k|            if (text + len > s->text_end) return NULL;
  ------------------
  |  Branch (26609:17): [True: 3.98k, False: 148k]
  ------------------
26610|   148k|            return memcmp(text, rule + 2, len) ? NULL : text + len;
  ------------------
  |  Branch (26610:20): [True: 17.0k, False: 131k]
  ------------------
26611|   152k|        }
26612|       |
26613|      0|        case RULE_DEBUG: {
  ------------------
  |  Branch (26613:9): [True: 0, False: 185k]
  ------------------
26614|      0|            char buffer[32] = {0};
26615|      0|            size_t len = (size_t)(s->outer_text_end - text);
26616|      0|            memcpy(buffer, text, (len > 31 ? 31 : len));
  ------------------
  |  Branch (26616:35): [True: 0, False: 0]
  ------------------
26617|      0|            janet_eprintf("?? at [%s] (index %d)\n", buffer, (int32_t)(text - s->text_start));
  ------------------
  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
26618|      0|            int has_color = janet_truthy(janet_dyn("err-color"));
  ------------------
  |  |  813|      0|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 0, False: 0]
  |  |  ------------------
  |  |  814|      0|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 0, False: 0]
  |  |  |  Branch (814:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
26619|       |            /* Accumulate buffer */
26620|      0|            if (s->scratch->count) {
  ------------------
  |  Branch (26620:17): [True: 0, False: 0]
  ------------------
26621|      0|                janet_eprintf("accumulate buffer: %v\n", janet_wrap_buffer(s->scratch));
  ------------------
  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
26622|      0|            }
26623|       |            /* Normal captures */
26624|      0|            if (s->captures->count) {
  ------------------
  |  Branch (26624:17): [True: 0, False: 0]
  ------------------
26625|      0|                janet_eprintf("stack [%d]:\n", s->captures->count);
  ------------------
  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
26626|      0|                for (int32_t i = 0; i < s->captures->count; i++) {
  ------------------
  |  Branch (26626:37): [True: 0, False: 0]
  ------------------
26627|      0|                    if (has_color) {
  ------------------
  |  Branch (26627:25): [True: 0, False: 0]
  ------------------
26628|      0|                        janet_eprintf("  [%d]: %M\n", i, s->captures->data[i]);
  ------------------
  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
26629|      0|                    } else {
26630|      0|                        janet_eprintf("  [%d]: %m\n", i, s->captures->data[i]);
  ------------------
  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
26631|      0|                    }
26632|      0|                }
26633|      0|            }
26634|       |            /* Tagged captures */
26635|      0|            if (s->tagged_captures->count) {
  ------------------
  |  Branch (26635:17): [True: 0, False: 0]
  ------------------
26636|      0|                janet_eprintf("tag stack [%d]:\n", s->tagged_captures->count);
  ------------------
  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
26637|      0|                for (int32_t i = 0; i < s->tagged_captures->count; i++) {
  ------------------
  |  Branch (26637:37): [True: 0, False: 0]
  ------------------
26638|      0|                    if (has_color) {
  ------------------
  |  Branch (26638:25): [True: 0, False: 0]
  ------------------
26639|      0|                        janet_eprintf("  [%d] tag=%d: %M\n", i, (int32_t) s->tags->data[i], s->tagged_captures->data[i]);
  ------------------
  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
26640|      0|                    } else {
26641|      0|                        janet_eprintf("  [%d] tag=%d: %m\n", i, (int32_t) s->tags->data[i], s->tagged_captures->data[i]);
  ------------------
  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  ------------------
26642|      0|                    }
26643|      0|                }
26644|      0|            }
26645|      0|            return text;
26646|   152k|        }
26647|       |
26648|    985|        case RULE_NCHAR: {
  ------------------
  |  Branch (26648:9): [True: 985, False: 184k]
  ------------------
26649|    985|            uint32_t n = rule[1];
26650|    985|            return (text + n > s->text_end) ? NULL : text + n;
  ------------------
  |  Branch (26650:20): [True: 396, False: 589]
  ------------------
26651|   152k|        }
26652|       |
26653|    491|        case RULE_NOTNCHAR: {
  ------------------
  |  Branch (26653:9): [True: 491, False: 184k]
  ------------------
26654|    491|            uint32_t n = rule[1];
26655|    491|            return (text + n > s->text_end) ? text : NULL;
  ------------------
  |  Branch (26655:20): [True: 121, False: 370]
  ------------------
26656|   152k|        }
26657|       |
26658|  3.32k|        case RULE_RANGE: {
  ------------------
  |  Branch (26658:9): [True: 3.32k, False: 181k]
  ------------------
26659|  3.32k|            uint8_t lo = rule[1] & 0xFF;
26660|  3.32k|            uint8_t hi = (rule[1] >> 16) & 0xFF;
26661|  3.32k|            return (text < s->text_end &&
  ------------------
  |  Branch (26661:21): [True: 3.32k, False: 0]
  ------------------
26662|  3.32k|                    text[0] >= lo &&
  ------------------
  |  Branch (26662:21): [True: 749, False: 2.58k]
  ------------------
26663|    749|                    text[0] <= hi)
  ------------------
  |  Branch (26663:21): [True: 105, False: 644]
  ------------------
26664|  3.32k|                   ? text + 1
26665|  3.32k|                   : NULL;
26666|   152k|        }
26667|       |
26668|    392|        case RULE_SET: {
  ------------------
  |  Branch (26668:9): [True: 392, False: 184k]
  ------------------
26669|    392|            if (text >= s->text_end) return NULL;
  ------------------
  |  Branch (26669:17): [True: 0, False: 392]
  ------------------
26670|    392|            uint32_t word = rule[1 + (text[0] >> 5)];
26671|    392|            uint32_t mask = (uint32_t)1 << (text[0] & 0x1F);
26672|    392|            return (word & mask)
  ------------------
  |  Branch (26672:20): [True: 38, False: 354]
  ------------------
26673|    392|                   ? text + 1
26674|    392|                   : NULL;
26675|    392|        }
26676|       |
26677|  1.02k|        case RULE_LOOK: {
  ------------------
  |  Branch (26677:9): [True: 1.02k, False: 184k]
  ------------------
26678|  1.02k|            text += ((int32_t *)rule)[1];
26679|  1.02k|            if (text < s->text_start || text > s->text_end) return NULL;
  ------------------
  |  Branch (26679:17): [True: 301, False: 727]
  |  Branch (26679:41): [True: 76, False: 651]
  ------------------
26680|    651|            down1(s);
  ------------------
  |  |26585|    651|#define down1(s) do { \
  |  |26586|    651|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 651]
  |  |  ------------------
  |  |26587|    651|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 651]
  |  |  ------------------
  ------------------
26681|    651|            const uint8_t *result = peg_rule(s, s->bytecode + rule[2], text);
26682|    651|            up1(s);
  ------------------
  |  |26588|    651|#define up1(s) ((s)->depth++)
  ------------------
26683|    651|            text -= ((int32_t *)rule)[1];
26684|    651|            return result ? text : NULL;
  ------------------
  |  Branch (26684:20): [True: 3, False: 648]
  ------------------
26685|    651|        }
26686|       |
26687|  7.46k|        case RULE_CHOICE: {
  ------------------
  |  Branch (26687:9): [True: 7.46k, False: 177k]
  ------------------
26688|  7.46k|            uint32_t len = rule[1];
26689|  7.46k|            const uint32_t *args = rule + 2;
26690|  7.46k|            if (len == 0) return NULL;
  ------------------
  |  Branch (26690:17): [True: 256, False: 7.21k]
  ------------------
26691|  7.21k|            down1(s);
  ------------------
  |  |26585|  7.21k|#define down1(s) do { \
  |  |26586|  7.21k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 7.21k]
  |  |  ------------------
  |  |26587|  7.21k|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 7.21k]
  |  |  ------------------
  ------------------
26692|  7.21k|            CapState cs = cap_save(s);
26693|  17.8k|            for (uint32_t i = 0; i < len - 1; i++) {
  ------------------
  |  Branch (26693:34): [True: 10.6k, False: 7.18k]
  ------------------
26694|  10.6k|                const uint8_t *result = peg_rule(s, s->bytecode + args[i], text);
26695|  10.6k|                if (result) {
  ------------------
  |  Branch (26695:21): [True: 23, False: 10.6k]
  ------------------
26696|     23|                    up1(s);
  ------------------
  |  |26588|     23|#define up1(s) ((s)->depth++)
  ------------------
26697|     23|                    return result;
26698|     23|                }
26699|  10.6k|                cap_load(s, cs);
26700|  10.6k|            }
26701|  7.18k|            up1(s);
  ------------------
  |  |26588|  7.18k|#define up1(s) ((s)->depth++)
  ------------------
26702|  7.18k|            rule = s->bytecode + args[len - 1];
26703|  7.18k|            goto tail;
26704|  7.21k|        }
26705|       |
26706|  9.27k|        case RULE_SEQUENCE: {
  ------------------
  |  Branch (26706:9): [True: 9.27k, False: 175k]
  ------------------
26707|  9.27k|            uint32_t len = rule[1];
26708|  9.27k|            const uint32_t *args = rule + 2;
26709|  9.27k|            if (len == 0) return text;
  ------------------
  |  Branch (26709:17): [True: 8.01k, False: 1.26k]
  ------------------
26710|  1.26k|            down1(s);
  ------------------
  |  |26585|  1.26k|#define down1(s) do { \
  |  |26586|  1.26k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 1.26k]
  |  |  ------------------
  |  |26587|  1.26k|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 1.26k]
  |  |  ------------------
  ------------------
26711|  2.37k|            for (uint32_t i = 0; text && i < len - 1; i++)
  ------------------
  |  Branch (26711:34): [True: 1.69k, False: 684]
  |  Branch (26711:42): [True: 1.11k, False: 576]
  ------------------
26712|  1.11k|                text = peg_rule(s, s->bytecode + args[i], text);
26713|  1.26k|            up1(s);
  ------------------
  |  |26588|  1.26k|#define up1(s) ((s)->depth++)
  ------------------
26714|  1.26k|            if (!text) return NULL;
  ------------------
  |  Branch (26714:17): [True: 684, False: 576]
  ------------------
26715|    576|            rule = s->bytecode + args[len - 1];
26716|    576|            goto tail;
26717|  1.26k|        }
26718|       |
26719|      0|        case RULE_IF: {
  ------------------
  |  Branch (26719:9): [True: 0, False: 185k]
  ------------------
26720|      0|            const uint32_t *rule_a = s->bytecode + rule[1];
26721|      0|            const uint32_t *rule_b = s->bytecode + rule[2];
26722|      0|            down1(s);
  ------------------
  |  |26585|      0|#define down1(s) do { \
  |  |26586|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26587|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
26723|      0|            const uint8_t *result = peg_rule(s, rule_a, text);
26724|      0|            up1(s);
  ------------------
  |  |26588|      0|#define up1(s) ((s)->depth++)
  ------------------
26725|      0|            if (!result) return NULL;
  ------------------
  |  Branch (26725:17): [True: 0, False: 0]
  ------------------
26726|      0|            rule = rule_b;
26727|      0|            goto tail;
26728|      0|        }
26729|    119|        case RULE_IFNOT: {
  ------------------
  |  Branch (26729:9): [True: 119, False: 185k]
  ------------------
26730|    119|            const uint32_t *rule_a = s->bytecode + rule[1];
26731|    119|            const uint32_t *rule_b = s->bytecode + rule[2];
26732|    119|            down1(s);
  ------------------
  |  |26585|    119|#define down1(s) do { \
  |  |26586|    119|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 119]
  |  |  ------------------
  |  |26587|    119|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 119]
  |  |  ------------------
  ------------------
26733|    119|            CapState cs = cap_save(s);
26734|    119|            const uint8_t *result = peg_rule(s, rule_a, text);
26735|    119|            if (!!result) {
  ------------------
  |  Branch (26735:17): [True: 101, False: 18]
  ------------------
26736|    101|                up1(s);
  ------------------
  |  |26588|    101|#define up1(s) ((s)->depth++)
  ------------------
26737|    101|                return NULL;
26738|    101|            } else {
26739|     18|                cap_load(s, cs);
26740|     18|                up1(s);
  ------------------
  |  |26588|     18|#define up1(s) ((s)->depth++)
  ------------------
26741|     18|                rule = rule_b;
26742|     18|                goto tail;
26743|     18|            }
26744|    119|        }
26745|       |
26746|    256|        case RULE_NOT: {
  ------------------
  |  Branch (26746:9): [True: 256, False: 184k]
  ------------------
26747|    256|            const uint32_t *rule_a = s->bytecode + rule[1];
26748|    256|            down1(s);
  ------------------
  |  |26585|    256|#define down1(s) do { \
  |  |26586|    256|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 256]
  |  |  ------------------
  |  |26587|    256|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 256]
  |  |  ------------------
  ------------------
26749|    256|            CapState cs = cap_save(s);
26750|    256|            const uint8_t *result = peg_rule(s, rule_a, text);
26751|    256|            if (result) {
  ------------------
  |  Branch (26751:17): [True: 249, False: 7]
  ------------------
26752|    249|                up1(s);
  ------------------
  |  |26588|    249|#define up1(s) ((s)->depth++)
  ------------------
26753|    249|                return NULL;
26754|    249|            } else {
26755|      7|                cap_load(s, cs);
26756|      7|                up1(s);
  ------------------
  |  |26588|      7|#define up1(s) ((s)->depth++)
  ------------------
26757|      7|                return text;
26758|      7|            }
26759|    256|        }
26760|       |
26761|      0|        case RULE_THRU:
  ------------------
  |  Branch (26761:9): [True: 0, False: 185k]
  ------------------
26762|      0|        case RULE_TO: {
  ------------------
  |  Branch (26762:9): [True: 0, False: 185k]
  ------------------
26763|      0|            const uint32_t *rule_a = s->bytecode + rule[1];
26764|      0|            const uint8_t *next_text = NULL;
26765|      0|            CapState cs = cap_save(s);
26766|      0|            down1(s);
  ------------------
  |  |26585|      0|#define down1(s) do { \
  |  |26586|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26587|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
26767|      0|            while (text <= s->text_end) {
  ------------------
  |  Branch (26767:20): [True: 0, False: 0]
  ------------------
26768|      0|                CapState cs2 = cap_save(s);
26769|      0|                next_text = peg_rule(s, rule_a, text);
26770|      0|                if (next_text) {
  ------------------
  |  Branch (26770:21): [True: 0, False: 0]
  ------------------
26771|      0|                    if (rule[0] == RULE_TO) cap_load(s, cs2);
  ------------------
  |  Branch (26771:25): [True: 0, False: 0]
  ------------------
26772|      0|                    break;
26773|      0|                }
26774|      0|                cap_load(s, cs2);
26775|      0|                text++;
26776|      0|            }
26777|      0|            up1(s);
  ------------------
  |  |26588|      0|#define up1(s) ((s)->depth++)
  ------------------
26778|      0|            if (text > s->text_end) {
  ------------------
  |  Branch (26778:17): [True: 0, False: 0]
  ------------------
26779|      0|                cap_load(s, cs);
26780|      0|                return NULL;
26781|      0|            }
26782|      0|            return rule[0] == RULE_TO ? text : next_text;
  ------------------
  |  Branch (26782:20): [True: 0, False: 0]
  ------------------
26783|      0|        }
26784|       |
26785|    533|        case RULE_BETWEEN: {
  ------------------
  |  Branch (26785:9): [True: 533, False: 184k]
  ------------------
26786|    533|            uint32_t lo = rule[1];
26787|    533|            uint32_t hi = rule[2];
26788|    533|            const uint32_t *rule_a = s->bytecode + rule[3];
26789|    533|            uint32_t captured = 0;
26790|    533|            const uint8_t *next_text;
26791|    533|            CapState cs = cap_save(s);
26792|    533|            down1(s);
  ------------------
  |  |26585|    533|#define down1(s) do { \
  |  |26586|    533|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 533]
  |  |  ------------------
  |  |26587|    533|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 533]
  |  |  ------------------
  ------------------
26793|   141k|            while (captured < hi) {
  ------------------
  |  Branch (26793:20): [True: 141k, False: 39]
  ------------------
26794|   141k|                CapState cs2 = cap_save(s);
26795|   141k|                next_text = peg_rule(s, rule_a, text);
26796|   141k|                if (!next_text || ((next_text == text) && (hi == UINT32_MAX))) {
  ------------------
  |  Branch (26796:21): [True: 494, False: 140k]
  |  Branch (26796:36): [True: 140k, False: 97]
  |  Branch (26796:59): [True: 0, False: 140k]
  ------------------
26797|    494|                    cap_load(s, cs2);
26798|    494|                    break;
26799|    494|                }
26800|   140k|                captured++;
26801|   140k|                text = next_text;
26802|   140k|            }
26803|    533|            up1(s);
  ------------------
  |  |26588|    533|#define up1(s) ((s)->depth++)
  ------------------
26804|    533|            if (captured < lo) {
  ------------------
  |  Branch (26804:17): [True: 493, False: 40]
  ------------------
26805|    493|                cap_load(s, cs);
26806|    493|                return NULL;
26807|    493|            }
26808|     40|            return text;
26809|    533|        }
26810|       |
26811|       |        /* Capturing rules */
26812|       |
26813|      0|        case RULE_GETTAG: {
  ------------------
  |  Branch (26813:9): [True: 0, False: 185k]
  ------------------
26814|      0|            uint32_t search = rule[1];
26815|      0|            uint32_t tag = rule[2];
26816|      0|            for (int32_t i = s->tags->count - 1; i >= 0; i--) {
  ------------------
  |  Branch (26816:50): [True: 0, False: 0]
  ------------------
26817|      0|                if (s->tags->data[i] == search) {
  ------------------
  |  Branch (26817:21): [True: 0, False: 0]
  ------------------
26818|      0|                    pushcap(s, s->tagged_captures->data[i], tag);
26819|      0|                    return text;
26820|      0|                }
26821|      0|            }
26822|      0|            return NULL;
26823|      0|        }
26824|       |
26825|  1.16k|        case RULE_POSITION: {
  ------------------
  |  Branch (26825:9): [True: 1.16k, False: 184k]
  ------------------
26826|  1.16k|            pushcap(s, janet_wrap_number((double)(text - s->text_start)), rule[1]);
  ------------------
  |  |  830|  1.16k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
26827|  1.16k|            return text;
26828|      0|        }
26829|       |
26830|      0|        case RULE_LINE: {
  ------------------
  |  Branch (26830:9): [True: 0, False: 185k]
  ------------------
26831|      0|            LineCol lc = get_linecol_from_position(s, (int32_t)(text - s->text_start));
26832|      0|            pushcap(s, janet_wrap_number((double)(lc.line)), rule[1]);
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
26833|      0|            return text;
26834|      0|        }
26835|       |
26836|      0|        case RULE_COLUMN: {
  ------------------
  |  Branch (26836:9): [True: 0, False: 185k]
  ------------------
26837|      0|            LineCol lc = get_linecol_from_position(s, (int32_t)(text - s->text_start));
26838|      0|            pushcap(s, janet_wrap_number((double)(lc.col)), rule[1]);
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
26839|      0|            return text;
26840|      0|        }
26841|       |
26842|      0|        case RULE_ARGUMENT: {
  ------------------
  |  Branch (26842:9): [True: 0, False: 185k]
  ------------------
26843|      0|            int32_t index = ((int32_t *)rule)[1];
26844|      0|            Janet capture = (index >= s->extrac) ? janet_wrap_nil() : s->extrav[index];
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (26844:29): [True: 0, False: 0]
  ------------------
26845|      0|            pushcap(s, capture, rule[2]);
26846|      0|            return text;
26847|      0|        }
26848|       |
26849|      0|        case RULE_CONSTANT: {
  ------------------
  |  Branch (26849:9): [True: 0, False: 185k]
  ------------------
26850|      0|            pushcap(s, s->constants[rule[1]], rule[2]);
26851|      0|            return text;
26852|      0|        }
26853|       |
26854|  6.60k|        case RULE_CAPTURE: {
  ------------------
  |  Branch (26854:9): [True: 6.60k, False: 178k]
  ------------------
26855|  6.60k|            down1(s);
  ------------------
  |  |26585|  6.60k|#define down1(s) do { \
  |  |26586|  6.60k|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 6.60k]
  |  |  ------------------
  |  |26587|  6.60k|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 6.60k]
  |  |  ------------------
  ------------------
26856|  6.60k|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
26857|  6.60k|            up1(s);
  ------------------
  |  |26588|  6.60k|#define up1(s) ((s)->depth++)
  ------------------
26858|  6.60k|            if (!result) return NULL;
  ------------------
  |  Branch (26858:17): [True: 5.18k, False: 1.41k]
  ------------------
26859|       |            /* Specialized pushcap - avoid intermediate string creation */
26860|  1.41k|            if (!s->has_backref && s->mode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (26860:17): [True: 1.41k, False: 0]
  |  Branch (26860:36): [True: 1, False: 1.41k]
  ------------------
26861|      1|                janet_buffer_push_bytes(s->scratch, text, (int32_t)(result - text));
26862|  1.41k|            } else {
26863|  1.41k|                uint32_t tag = rule[2];
26864|  1.41k|                pushcap(s, janet_stringv(text, (int32_t)(result - text)), tag);
  ------------------
  |  | 1817|  1.41k|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  843|  1.41k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|  1.41k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  1.41k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  1.41k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26865|  1.41k|            }
26866|  1.41k|            return result;
26867|  6.60k|        }
26868|       |
26869|      0|        case RULE_CAPTURE_NUM: {
  ------------------
  |  Branch (26869:9): [True: 0, False: 185k]
  ------------------
26870|      0|            down1(s);
  ------------------
  |  |26585|      0|#define down1(s) do { \
  |  |26586|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26587|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
26871|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
26872|      0|            up1(s);
  ------------------
  |  |26588|      0|#define up1(s) ((s)->depth++)
  ------------------
26873|      0|            if (!result) return NULL;
  ------------------
  |  Branch (26873:17): [True: 0, False: 0]
  ------------------
26874|       |            /* check number parsing */
26875|      0|            double x = 0.0;
26876|      0|            int32_t base = (int32_t) rule[2];
26877|      0|            if (janet_scan_number_base(text, (int32_t)(result - text), base, &x)) return NULL;
  ------------------
  |  Branch (26877:17): [True: 0, False: 0]
  ------------------
26878|       |            /* Specialized pushcap - avoid intermediate string creation */
26879|      0|            if (!s->has_backref && s->mode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (26879:17): [True: 0, False: 0]
  |  Branch (26879:36): [True: 0, False: 0]
  ------------------
26880|      0|                janet_buffer_push_bytes(s->scratch, text, (int32_t)(result - text));
26881|      0|            } else {
26882|      0|                uint32_t tag = rule[3];
26883|      0|                pushcap(s, janet_wrap_number(x), tag);
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
26884|      0|            }
26885|      0|            return result;
26886|      0|        }
26887|       |
26888|    101|        case RULE_ACCUMULATE: {
  ------------------
  |  Branch (26888:9): [True: 101, False: 185k]
  ------------------
26889|    101|            uint32_t tag = rule[2];
26890|    101|            int oldmode = s->mode;
26891|    101|            if (!tag && oldmode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (26891:17): [True: 101, False: 0]
  |  Branch (26891:25): [True: 0, False: 101]
  ------------------
26892|      0|                rule = s->bytecode + rule[1];
26893|      0|                goto tail;
26894|      0|            }
26895|    101|            CapState cs = cap_save(s);
26896|    101|            s->mode = PEG_MODE_ACCUMULATE;
26897|    101|            down1(s);
  ------------------
  |  |26585|    101|#define down1(s) do { \
  |  |26586|    101|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 101]
  |  |  ------------------
  |  |26587|    101|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 101]
  |  |  ------------------
  ------------------
26898|    101|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
26899|    101|            up1(s);
  ------------------
  |  |26588|    101|#define up1(s) ((s)->depth++)
  ------------------
26900|    101|            s->mode = oldmode;
26901|    101|            if (!result) return NULL;
  ------------------
  |  Branch (26901:17): [True: 97, False: 4]
  ------------------
26902|      4|            Janet cap = janet_stringv(s->scratch->data + cs.scratch,
  ------------------
  |  | 1817|      4|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  843|      4|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      4|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      4|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26903|      4|                                      s->scratch->count - cs.scratch);
26904|      4|            cap_load_keept(s, cs);
26905|      4|            pushcap(s, cap, tag);
26906|      4|            return result;
26907|    101|        }
26908|       |
26909|      0|        case RULE_DROP: {
  ------------------
  |  Branch (26909:9): [True: 0, False: 185k]
  ------------------
26910|      0|            CapState cs = cap_save(s);
26911|      0|            down1(s);
  ------------------
  |  |26585|      0|#define down1(s) do { \
  |  |26586|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26587|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
26912|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
26913|      0|            up1(s);
  ------------------
  |  |26588|      0|#define up1(s) ((s)->depth++)
  ------------------
26914|      0|            if (!result) return NULL;
  ------------------
  |  Branch (26914:17): [True: 0, False: 0]
  ------------------
26915|      0|            cap_load(s, cs);
26916|      0|            return result;
26917|      0|        }
26918|       |
26919|      0|        case RULE_ONLY_TAGS: {
  ------------------
  |  Branch (26919:9): [True: 0, False: 185k]
  ------------------
26920|      0|            CapState cs = cap_save(s);
26921|      0|            down1(s);
  ------------------
  |  |26585|      0|#define down1(s) do { \
  |  |26586|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26587|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
26922|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
26923|      0|            up1(s);
  ------------------
  |  |26588|      0|#define up1(s) ((s)->depth++)
  ------------------
26924|      0|            if (!result) return NULL;
  ------------------
  |  Branch (26924:17): [True: 0, False: 0]
  ------------------
26925|      0|            cap_load_keept(s, cs);
26926|      0|            return result;
26927|      0|        }
26928|       |
26929|      0|        case RULE_GROUP: {
  ------------------
  |  Branch (26929:9): [True: 0, False: 185k]
  ------------------
26930|      0|            uint32_t tag = rule[2];
26931|      0|            int oldmode = s->mode;
26932|      0|            CapState cs = cap_save(s);
26933|      0|            s->mode = PEG_MODE_NORMAL;
26934|      0|            down1(s);
  ------------------
  |  |26585|      0|#define down1(s) do { \
  |  |26586|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26587|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
26935|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
26936|      0|            up1(s);
  ------------------
  |  |26588|      0|#define up1(s) ((s)->depth++)
  ------------------
26937|      0|            s->mode = oldmode;
26938|      0|            if (!result) return NULL;
  ------------------
  |  Branch (26938:17): [True: 0, False: 0]
  ------------------
26939|      0|            int32_t num_sub_captures = s->captures->count - cs.cap;
26940|      0|            JanetArray *sub_captures = janet_array(num_sub_captures);
26941|      0|            safe_memcpy(sub_captures->data,
26942|      0|                        s->captures->data + cs.cap,
26943|      0|                        sizeof(Janet) * num_sub_captures);
26944|      0|            sub_captures->count = num_sub_captures;
26945|      0|            cap_load_keept(s, cs);
26946|      0|            pushcap(s, janet_wrap_array(sub_captures), tag);
  ------------------
  |  |  840|      0|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
26947|      0|            return result;
26948|      0|        }
26949|       |
26950|      0|        case RULE_NTH: {
  ------------------
  |  Branch (26950:9): [True: 0, False: 185k]
  ------------------
26951|      0|            uint32_t nth = rule[1];
26952|      0|            if (nth > INT32_MAX) nth = INT32_MAX;
  ------------------
  |  Branch (26952:17): [True: 0, False: 0]
  ------------------
26953|      0|            uint32_t tag = rule[3];
26954|      0|            int oldmode = s->mode;
26955|      0|            CapState cs = cap_save(s);
26956|      0|            s->mode = PEG_MODE_NORMAL;
26957|      0|            down1(s);
  ------------------
  |  |26585|      0|#define down1(s) do { \
  |  |26586|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26587|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
26958|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[2], text);
26959|      0|            up1(s);
  ------------------
  |  |26588|      0|#define up1(s) ((s)->depth++)
  ------------------
26960|      0|            s->mode = oldmode;
26961|      0|            if (!result) return NULL;
  ------------------
  |  Branch (26961:17): [True: 0, False: 0]
  ------------------
26962|      0|            int32_t num_sub_captures = s->captures->count - cs.cap;
26963|      0|            Janet cap;
26964|      0|            if (num_sub_captures > (int32_t) nth) {
  ------------------
  |  Branch (26964:17): [True: 0, False: 0]
  ------------------
26965|      0|                cap = s->captures->data[cs.cap + nth];
26966|      0|            } else {
26967|      0|                return NULL;
26968|      0|            }
26969|      0|            cap_load_keept(s, cs);
26970|      0|            pushcap(s, cap, tag);
26971|      0|            return result;
26972|      0|        }
26973|       |
26974|      0|        case RULE_SUB: {
  ------------------
  |  Branch (26974:9): [True: 0, False: 185k]
  ------------------
26975|      0|            const uint8_t *text_start = text;
26976|      0|            const uint32_t *rule_window = s->bytecode + rule[1];
26977|      0|            const uint32_t *rule_subpattern = s->bytecode + rule[2];
26978|      0|            down1(s);
  ------------------
  |  |26585|      0|#define down1(s) do { \
  |  |26586|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26587|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
26979|      0|            const uint8_t *window_end = peg_rule(s, rule_window, text);
26980|      0|            up1(s);
  ------------------
  |  |26588|      0|#define up1(s) ((s)->depth++)
  ------------------
26981|      0|            if (!window_end) {
  ------------------
  |  Branch (26981:17): [True: 0, False: 0]
  ------------------
26982|      0|                return NULL;
26983|      0|            }
26984|      0|            const uint8_t *saved_end = s->text_end;
26985|      0|            s->text_end = window_end;
26986|      0|            down1(s);
  ------------------
  |  |26585|      0|#define down1(s) do { \
  |  |26586|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26587|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
26987|      0|            const uint8_t *next_text = peg_rule(s, rule_subpattern, text_start);
26988|      0|            up1(s);
  ------------------
  |  |26588|      0|#define up1(s) ((s)->depth++)
  ------------------
26989|      0|            s->text_end = saved_end;
26990|       |
26991|      0|            if (!next_text) {
  ------------------
  |  Branch (26991:17): [True: 0, False: 0]
  ------------------
26992|      0|                return NULL;
26993|      0|            }
26994|       |
26995|      0|            return window_end;
26996|      0|        }
26997|       |
26998|      0|        case RULE_TIL: {
  ------------------
  |  Branch (26998:9): [True: 0, False: 185k]
  ------------------
26999|      0|            const uint32_t *rule_terminus = s->bytecode + rule[1];
27000|      0|            const uint32_t *rule_subpattern = s->bytecode + rule[2];
27001|       |
27002|      0|            const uint8_t *terminus_start = text;
27003|      0|            const uint8_t *terminus_end = NULL;
27004|      0|            down1(s);
  ------------------
  |  |26585|      0|#define down1(s) do { \
  |  |26586|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26587|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27005|      0|            while (terminus_start <= s->text_end) {
  ------------------
  |  Branch (27005:20): [True: 0, False: 0]
  ------------------
27006|      0|                CapState cs2 = cap_save(s);
27007|      0|                terminus_end = peg_rule(s, rule_terminus, terminus_start);
27008|      0|                cap_load(s, cs2);
27009|      0|                if (terminus_end) {
  ------------------
  |  Branch (27009:21): [True: 0, False: 0]
  ------------------
27010|      0|                    break;
27011|      0|                }
27012|      0|                terminus_start++;
27013|      0|            }
27014|      0|            up1(s);
  ------------------
  |  |26588|      0|#define up1(s) ((s)->depth++)
  ------------------
27015|       |
27016|      0|            if (!terminus_end) {
  ------------------
  |  Branch (27016:17): [True: 0, False: 0]
  ------------------
27017|      0|                return NULL;
27018|      0|            }
27019|       |
27020|      0|            const uint8_t *saved_end = s->text_end;
27021|      0|            s->text_end = terminus_start;
27022|      0|            down1(s);
  ------------------
  |  |26585|      0|#define down1(s) do { \
  |  |26586|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26587|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27023|      0|            const uint8_t *matched = peg_rule(s, rule_subpattern, text);
27024|      0|            up1(s);
  ------------------
  |  |26588|      0|#define up1(s) ((s)->depth++)
  ------------------
27025|      0|            s->text_end = saved_end;
27026|       |
27027|      0|            if (!matched) {
  ------------------
  |  Branch (27027:17): [True: 0, False: 0]
  ------------------
27028|      0|                return NULL;
27029|      0|            }
27030|       |
27031|      0|            return terminus_end;
27032|      0|        }
27033|       |
27034|      0|        case RULE_SPLIT: {
  ------------------
  |  Branch (27034:9): [True: 0, False: 185k]
  ------------------
27035|      0|            const uint8_t *saved_end = s->text_end;
27036|      0|            const uint32_t *rule_separator = s->bytecode + rule[1];
27037|      0|            const uint32_t *rule_subpattern = s->bytecode + rule[2];
27038|       |
27039|      0|            const uint8_t *chunk_start = text;
27040|      0|            const uint8_t *chunk_end = NULL;
27041|       |
27042|      0|            while (text <= saved_end) {
  ------------------
  |  Branch (27042:20): [True: 0, False: 0]
  ------------------
27043|       |                /* Find next split (or end of text) */
27044|      0|                CapState cs = cap_save(s);
27045|      0|                down1(s);
  ------------------
  |  |26585|      0|#define down1(s) do { \
  |  |26586|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26587|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27046|      0|                while (text <= saved_end) {
  ------------------
  |  Branch (27046:24): [True: 0, False: 0]
  ------------------
27047|      0|                    chunk_end = text;
27048|      0|                    const uint8_t *check = peg_rule(s, rule_separator, text);
27049|      0|                    cap_load(s, cs);
27050|      0|                    if (check) {
  ------------------
  |  Branch (27050:25): [True: 0, False: 0]
  ------------------
27051|      0|                        text = check;
27052|      0|                        break;
27053|      0|                    }
27054|      0|                    text++;
27055|      0|                }
27056|      0|                up1(s);
  ------------------
  |  |26588|      0|#define up1(s) ((s)->depth++)
  ------------------
27057|       |
27058|       |                /* Match between splits */
27059|      0|                s->text_end = chunk_end;
27060|      0|                down1(s);
  ------------------
  |  |26585|      0|#define down1(s) do { \
  |  |26586|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26587|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27061|      0|                const uint8_t *subpattern_end = peg_rule(s, rule_subpattern, chunk_start);
27062|      0|                up1(s);
  ------------------
  |  |26588|      0|#define up1(s) ((s)->depth++)
  ------------------
27063|      0|                s->text_end = saved_end;
27064|      0|                if (!subpattern_end) return NULL; /* Don't match anything */
  ------------------
  |  Branch (27064:21): [True: 0, False: 0]
  ------------------
27065|       |
27066|       |                /* Ensure forward progress */
27067|      0|                if (text == chunk_start) return NULL;
  ------------------
  |  Branch (27067:21): [True: 0, False: 0]
  ------------------
27068|      0|                chunk_start = text;
27069|      0|            }
27070|       |
27071|      0|            s->text_end = saved_end;
27072|      0|            return s->text_end;
27073|      0|        }
27074|       |
27075|    558|        case RULE_REPLACE:
  ------------------
  |  Branch (27075:9): [True: 558, False: 184k]
  ------------------
27076|    558|        case RULE_MATCHSPLICE:
  ------------------
  |  Branch (27076:9): [True: 0, False: 185k]
  ------------------
27077|    558|        case RULE_MATCHTIME: {
  ------------------
  |  Branch (27077:9): [True: 0, False: 185k]
  ------------------
27078|    558|            uint32_t tag = rule[3];
27079|    558|            int oldmode = s->mode;
27080|    558|            CapState cs = cap_save(s);
27081|    558|            s->mode = PEG_MODE_NORMAL;
27082|    558|            down1(s);
  ------------------
  |  |26585|    558|#define down1(s) do { \
  |  |26586|    558|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 558]
  |  |  ------------------
  |  |26587|    558|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 558]
  |  |  ------------------
  ------------------
27083|    558|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
27084|    558|            up1(s);
  ------------------
  |  |26588|    558|#define up1(s) ((s)->depth++)
  ------------------
27085|    558|            s->mode = oldmode;
27086|    558|            if (!result) return NULL;
  ------------------
  |  Branch (27086:17): [True: 553, False: 5]
  ------------------
27087|       |
27088|      5|            Janet cap = janet_wrap_nil();
  ------------------
  |  |  826|      5|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      5|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      5|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      5|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
27089|      5|            Janet constant = s->constants[rule[2]];
27090|      5|            switch (janet_type(constant)) {
  ------------------
  |  |  790|      5|    (isnan((x).number) \
  |  |  791|      5|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|      5|        : JANET_NUMBER)
  ------------------
  |  Branch (27090:21): [True: 5, False: 0]
  ------------------
27091|      5|                default:
  ------------------
  |  Branch (27091:17): [True: 5, False: 0]
  ------------------
27092|      5|                    cap = constant;
27093|      5|                    break;
27094|      0|                case JANET_STRUCT:
  ------------------
  |  Branch (27094:17): [True: 0, False: 5]
  ------------------
27095|      0|                    if (s->captures->count) {
  ------------------
  |  Branch (27095:25): [True: 0, False: 0]
  ------------------
27096|      0|                        cap = janet_struct_get(janet_unwrap_struct(constant),
  ------------------
  |  |  852|      0|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
27097|      0|                                               s->captures->data[s->captures->count - 1]);
27098|      0|                    }
27099|      0|                    break;
27100|      0|                case JANET_TABLE:
  ------------------
  |  Branch (27100:17): [True: 0, False: 5]
  ------------------
27101|      0|                    if (s->captures->count) {
  ------------------
  |  Branch (27101:25): [True: 0, False: 0]
  ------------------
27102|      0|                        cap = janet_table_get(janet_unwrap_table(constant),
  ------------------
  |  |  856|      0|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
27103|      0|                                              s->captures->data[s->captures->count - 1]);
27104|      0|                    }
27105|      0|                    break;
27106|      0|                case JANET_CFUNCTION:
  ------------------
  |  Branch (27106:17): [True: 0, False: 5]
  ------------------
27107|      0|                    cap = janet_unwrap_cfunction(constant)(s->captures->count - cs.cap,
  ------------------
  |  |  864|      0|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
27108|      0|                                                           s->captures->data + cs.cap);
27109|      0|                    break;
27110|      0|                case JANET_FUNCTION:
  ------------------
  |  Branch (27110:17): [True: 0, False: 5]
  ------------------
27111|      0|                    cap = janet_call(janet_unwrap_function(constant),
  ------------------
  |  |  863|      0|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
27112|      0|                                     s->captures->count - cs.cap,
27113|      0|                                     s->captures->data + cs.cap);
27114|      0|                    break;
27115|      5|            }
27116|      5|            cap_load_keept(s, cs);
27117|      5|            if (rule[0] != RULE_REPLACE && !janet_truthy(cap)) return NULL; /* matchtime or matchtime flatten */
  ------------------
  |  |  813|      0|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 0, False: 0]
  |  |  ------------------
  |  |  814|      0|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 0, False: 0]
  |  |  |  Branch (814:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (27117:17): [True: 0, False: 5]
  ------------------
27118|      5|            const Janet *elements = NULL;
27119|      5|            int32_t len = 0;
27120|      5|            if ((rule[0] == RULE_MATCHSPLICE) && janet_indexed_view(cap, &elements, &len)) {
  ------------------
  |  Branch (27120:17): [True: 0, False: 5]
  |  Branch (27120:50): [True: 0, False: 0]
  ------------------
27121|       |                /* unpack and flatten capture */
27122|      0|                for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (27122:37): [True: 0, False: 0]
  ------------------
27123|      0|                    pushcap(s, elements[i], tag);
27124|      0|                }
27125|      5|            } else {
27126|      5|                pushcap(s, cap, tag);
27127|      5|            }
27128|      5|            return result;
27129|      5|        }
27130|       |
27131|      0|        case RULE_ERROR: {
  ------------------
  |  Branch (27131:9): [True: 0, False: 185k]
  ------------------
27132|      0|            int oldmode = s->mode;
27133|      0|            s->mode = PEG_MODE_NORMAL;
27134|      0|            int32_t old_cap = s->captures->count;
27135|      0|            down1(s);
  ------------------
  |  |26585|      0|#define down1(s) do { \
  |  |26586|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26587|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27136|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
27137|      0|            up1(s);
  ------------------
  |  |26588|      0|#define up1(s) ((s)->depth++)
  ------------------
27138|      0|            s->mode = oldmode;
27139|      0|            if (!result) return NULL;
  ------------------
  |  Branch (27139:17): [True: 0, False: 0]
  ------------------
27140|      0|            if (s->captures->count > old_cap) {
  ------------------
  |  Branch (27140:17): [True: 0, False: 0]
  ------------------
27141|       |                /* Throw last capture */
27142|      0|                janet_panicv(s->captures->data[s->captures->count - 1]);
27143|      0|            } else {
27144|       |                /* Throw generic error */
27145|      0|                int32_t start = (int32_t)(text - s->text_start);
27146|      0|                LineCol lc = get_linecol_from_position(s, start);
27147|      0|                janet_panicf("match error at line %d, column %d", lc.line, lc.col);
27148|      0|            }
27149|      0|            return NULL;
27150|      0|        }
27151|       |
27152|      0|        case RULE_BACKMATCH: {
  ------------------
  |  Branch (27152:9): [True: 0, False: 185k]
  ------------------
27153|      0|            uint32_t search = rule[1];
27154|      0|            for (int32_t i = s->tags->count - 1; i >= 0; i--) {
  ------------------
  |  Branch (27154:50): [True: 0, False: 0]
  ------------------
27155|      0|                if (s->tags->data[i] == search) {
  ------------------
  |  Branch (27155:21): [True: 0, False: 0]
  ------------------
27156|      0|                    Janet capture = s->tagged_captures->data[i];
27157|      0|                    if (!janet_checktype(capture, JANET_STRING))
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (27157:25): [True: 0, False: 0]
  ------------------
27158|      0|                        return NULL;
27159|      0|                    const uint8_t *bytes = janet_unwrap_string(capture);
  ------------------
  |  |  858|      0|#define janet_unwrap_string(x) ((JanetString)janet_nanbox_to_pointer(x))
  ------------------
27160|      0|                    int32_t len = janet_string_length(bytes);
  ------------------
  |  | 1803|      0|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|      0|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
27161|      0|                    if (text + len > s->text_end)
  ------------------
  |  Branch (27161:25): [True: 0, False: 0]
  ------------------
27162|      0|                        return NULL;
27163|      0|                    return memcmp(text, bytes, len) ? NULL : text + len;
  ------------------
  |  Branch (27163:28): [True: 0, False: 0]
  ------------------
27164|      0|                }
27165|      0|            }
27166|      0|            return NULL;
27167|      0|        }
27168|       |
27169|      0|        case RULE_LENPREFIX: {
  ------------------
  |  Branch (27169:9): [True: 0, False: 185k]
  ------------------
27170|      0|            int oldmode = s->mode;
27171|      0|            s->mode = PEG_MODE_NORMAL;
27172|      0|            const uint8_t *next_text;
27173|      0|            CapState cs = cap_save(s);
27174|      0|            down1(s);
  ------------------
  |  |26585|      0|#define down1(s) do { \
  |  |26586|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26587|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27175|      0|            next_text = peg_rule(s, s->bytecode + rule[1], text);
27176|      0|            up1(s);
  ------------------
  |  |26588|      0|#define up1(s) ((s)->depth++)
  ------------------
27177|      0|            if (NULL == next_text) return NULL;
  ------------------
  |  Branch (27177:17): [True: 0, False: 0]
  ------------------
27178|      0|            s->mode = oldmode;
27179|      0|            int32_t num_sub_captures = s->captures->count - cs.cap;
27180|      0|            Janet lencap;
27181|      0|            if (num_sub_captures <= 0 ||
  ------------------
  |  Branch (27181:17): [True: 0, False: 0]
  ------------------
27182|      0|                    (lencap = s->captures->data[cs.cap], !janet_checkint(lencap))) {
  ------------------
  |  Branch (27182:21): [True: 0, False: 0]
  ------------------
27183|      0|                cap_load(s, cs);
27184|      0|                return NULL;
27185|      0|            }
27186|      0|            int32_t nrep = janet_unwrap_integer(lencap);
  ------------------
  |  |  957|      0|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
27187|       |            /* drop captures from len pattern */
27188|      0|            cap_load(s, cs);
27189|      0|            for (int32_t i = 0; i < nrep; i++) {
  ------------------
  |  Branch (27189:33): [True: 0, False: 0]
  ------------------
27190|      0|                down1(s);
  ------------------
  |  |26585|      0|#define down1(s) do { \
  |  |26586|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26587|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27191|      0|                next_text = peg_rule(s, s->bytecode + rule[2], next_text);
27192|      0|                up1(s);
  ------------------
  |  |26588|      0|#define up1(s) ((s)->depth++)
  ------------------
27193|      0|                if (NULL == next_text) {
  ------------------
  |  Branch (27193:21): [True: 0, False: 0]
  ------------------
27194|      0|                    cap_load(s, cs);
27195|      0|                    return NULL;
27196|      0|                }
27197|      0|            }
27198|      0|            return next_text;
27199|      0|        }
27200|       |
27201|      0|        case RULE_READINT: {
  ------------------
  |  Branch (27201:9): [True: 0, False: 185k]
  ------------------
27202|      0|            uint32_t tag = rule[2];
27203|      0|            uint32_t signedness = rule[1] & 0x10;
27204|      0|            uint32_t endianness = rule[1] & 0x20;
27205|      0|            int width = (int)(rule[1] & 0xF);
27206|      0|            if (text + width > s->text_end) return NULL;
  ------------------
  |  Branch (27206:17): [True: 0, False: 0]
  ------------------
27207|      0|            uint64_t accum = 0;
27208|      0|            if (endianness) {
  ------------------
  |  Branch (27208:17): [True: 0, False: 0]
  ------------------
27209|       |                /* BE */
27210|      0|                for (int i = 0; i < width; i++) accum = (accum << 8) | text[i];
  ------------------
  |  Branch (27210:33): [True: 0, False: 0]
  ------------------
27211|      0|            } else {
27212|       |                /* LE */
27213|      0|                for (int i = width - 1; i >= 0; i--) accum = (accum << 8) | text[i];
  ------------------
  |  Branch (27213:41): [True: 0, False: 0]
  ------------------
27214|      0|            }
27215|       |
27216|      0|            Janet capture_value;
27217|       |            /* We can only parse integeres of greater than 6 bytes reliable if int-types are enabled.
27218|       |             * Otherwise, we may lose precision, so 6 is the maximum size when int-types are disabled. */
27219|      0|#ifdef JANET_INT_TYPES
27220|      0|            if (width > 6) {
  ------------------
  |  Branch (27220:17): [True: 0, False: 0]
  ------------------
27221|      0|                if (signedness) {
  ------------------
  |  Branch (27221:21): [True: 0, False: 0]
  ------------------
27222|      0|                    capture_value = janet_wrap_s64(peg_convert_u64_s64(accum, width));
27223|      0|                } else {
27224|      0|                    capture_value = janet_wrap_u64(accum);
27225|      0|                }
27226|      0|            } else
27227|      0|#endif
27228|      0|            {
27229|      0|                double double_value;
27230|      0|                if (signedness) {
  ------------------
  |  Branch (27230:21): [True: 0, False: 0]
  ------------------
27231|      0|                    double_value = (double)(peg_convert_u64_s64(accum, width));
27232|      0|                } else {
27233|      0|                    double_value = (double)accum;
27234|      0|                }
27235|      0|                capture_value = janet_wrap_number(double_value);
  ------------------
  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
27236|      0|            }
27237|       |
27238|      0|            pushcap(s, capture_value, tag);
27239|      0|            return text + width;
27240|      0|        }
27241|       |
27242|      0|        case RULE_UNREF: {
  ------------------
  |  Branch (27242:9): [True: 0, False: 185k]
  ------------------
27243|      0|            int32_t tcap = s->tags->count;
27244|      0|            down1(s);
  ------------------
  |  |26585|      0|#define down1(s) do { \
  |  |26586|      0|    if (0 == --((s)->depth)) janet_panic("peg/match recursed too deeply"); \
  |  |  ------------------
  |  |  |  Branch (26586:9): [True: 0, False: 0]
  |  |  ------------------
  |  |26587|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (26587:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
27245|      0|            const uint8_t *result = peg_rule(s, s->bytecode + rule[1], text);
27246|      0|            up1(s);
  ------------------
  |  |26588|      0|#define up1(s) ((s)->depth++)
  ------------------
27247|      0|            if (!result) return NULL;
  ------------------
  |  Branch (27247:17): [True: 0, False: 0]
  ------------------
27248|      0|            int32_t final_tcap = s->tags->count;
27249|       |            /* Truncate tagged captures to not include items of the given tag */
27250|      0|            int32_t w = tcap;
27251|       |            /* If no tag is given, drop ALL tagged captures */
27252|      0|            if (rule[2]) {
  ------------------
  |  Branch (27252:17): [True: 0, False: 0]
  ------------------
27253|      0|                for (int32_t i = tcap; i < final_tcap; i++) {
  ------------------
  |  Branch (27253:40): [True: 0, False: 0]
  ------------------
27254|      0|                    if (s->tags->data[i] != (0xFF & rule[2])) {
  ------------------
  |  Branch (27254:25): [True: 0, False: 0]
  ------------------
27255|      0|                        s->tags->data[w] = s->tags->data[i];
27256|      0|                        s->tagged_captures->data[w] = s->tagged_captures->data[i];
27257|      0|                        w++;
27258|      0|                    }
27259|      0|                }
27260|      0|            }
27261|      0|            s->tags->count = w;
27262|      0|            s->tagged_captures->count = w;
27263|      0|            return result;
27264|      0|        }
27265|       |
27266|   185k|    }
27267|   185k|}
janet.c:cap_save:
26490|   149k|static CapState cap_save(PegState *s) {
26491|   149k|    CapState cs;
26492|   149k|    cs.scratch = s->scratch->count;
26493|   149k|    cs.cap = s->captures->count;
26494|   149k|    cs.tcap = s->tagged_captures->count;
26495|   149k|    return cs;
26496|   149k|}
janet.c:cap_load:
26499|  11.6k|static void cap_load(PegState *s, CapState cs) {
26500|  11.6k|    s->scratch->count = cs.scratch;
26501|  11.6k|    s->captures->count = cs.cap;
26502|  11.6k|    s->tags->count = cs.tcap;
26503|  11.6k|    s->tagged_captures->count = cs.tcap;
26504|  11.6k|}
janet.c:pushcap:
26514|  2.58k|static void pushcap(PegState *s, Janet capture, uint32_t tag) {
26515|  2.58k|    if (s->mode == PEG_MODE_ACCUMULATE) {
  ------------------
  |  Branch (26515:9): [True: 0, False: 2.58k]
  ------------------
26516|      0|        janet_to_string_b(s->scratch, capture);
26517|      0|    }
26518|  2.58k|    if (s->mode == PEG_MODE_NORMAL) {
  ------------------
  |  Branch (26518:9): [True: 2.58k, False: 0]
  ------------------
26519|  2.58k|        janet_array_push(s->captures, capture);
26520|  2.58k|    }
26521|  2.58k|    if (s->has_backref) {
  ------------------
  |  Branch (26521:9): [True: 0, False: 2.58k]
  ------------------
26522|      0|        janet_array_push(s->tagged_captures, capture);
26523|      0|        janet_buffer_push_u8(s->tags, tag);
26524|      0|    }
26525|  2.58k|}
janet.c:cap_load_keept:
26508|      9|static void cap_load_keept(PegState *s, CapState cs) {
26509|      9|    s->scratch->count = cs.scratch;
26510|      9|    s->captures->count = cs.cap;
26511|      9|}
janet.c:peg_call_reset:
28399|  16.2k|static void peg_call_reset(PegCall *c) {
28400|  16.2k|    c->s.depth = JANET_RECURSION_GUARD;
  ------------------
  |  |  291|  16.2k|#define JANET_RECURSION_GUARD 1024
  ------------------
28401|  16.2k|    c->s.captures->count = 0;
28402|  16.2k|    c->s.tagged_captures->count = 0;
28403|  16.2k|    c->s.scratch->count = 0;
28404|  16.2k|    c->s.tags->count = 0;
28405|  16.2k|}
janet.c:cfun_peg_replace_generic:
28441|    447|static Janet cfun_peg_replace_generic(int32_t argc, Janet *argv, int only_one) {
28442|    447|    PegCall c = peg_cfun_init(argc, argv, 1);
28443|    447|    JanetBuffer *ret = janet_buffer(0);
28444|    447|    int32_t trail = 0;
28445|  12.3k|    for (int32_t i = c.start; i < c.bytes.len;) {
  ------------------
  |  Branch (28445:31): [True: 11.9k, False: 411]
  ------------------
28446|  11.9k|        peg_call_reset(&c);
28447|  11.9k|        const uint8_t *result = peg_rule(&c.s, c.s.bytecode, c.bytes.bytes + i);
28448|  11.9k|        if (NULL != result) {
  ------------------
  |  Branch (28448:13): [True: 439, False: 11.5k]
  ------------------
28449|    439|            if (trail < i) {
  ------------------
  |  Branch (28449:17): [True: 271, False: 168]
  ------------------
28450|    271|                janet_buffer_push_bytes(ret, c.bytes.bytes + trail, (i - trail));
28451|    271|                trail = i;
28452|    271|            }
28453|    439|            int32_t nexti = (int32_t)(result - c.bytes.bytes);
28454|    439|            JanetByteView subst = janet_text_substitution(&c.subst, c.bytes.bytes + i, nexti - i, c.s.captures);
28455|    439|            janet_buffer_push_bytes(ret, subst.bytes, subst.len);
28456|    439|            trail = nexti;
28457|    439|            if (nexti == i) nexti++;
  ------------------
  |  Branch (28457:17): [True: 258, False: 181]
  ------------------
28458|    439|            i = nexti;
28459|    439|            if (only_one) break;
  ------------------
  |  Branch (28459:17): [True: 36, False: 403]
  ------------------
28460|  11.5k|        } else {
28461|  11.5k|            i++;
28462|  11.5k|        }
28463|  11.9k|    }
28464|    447|    if (trail < c.bytes.len) {
  ------------------
  |  Branch (28464:9): [True: 221, False: 226]
  ------------------
28465|    221|        janet_buffer_push_bytes(ret, c.bytes.bytes + trail, (c.bytes.len - trail));
28466|    221|    }
28467|    447|    return janet_wrap_buffer(ret);
  ------------------
  |  |  842|    447|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  820|    447|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    447|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    447|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28468|    447|}
janet.c:number_to_string_b:
28576|  5.32M|static void number_to_string_b(JanetBuffer *buffer, double x) {
28577|  5.32M|    janet_buffer_ensure(buffer, buffer->count + BUFSIZE, 2);
  ------------------
  |  |28570|  5.32M|#define BUFSIZE 64
  ------------------
28578|  5.32M|    const char *fmt = (x == floor(x) &&
  ------------------
  |  Branch (28578:24): [True: 5.32M, False: 198]
  ------------------
28579|  5.32M|                       x <= JANET_INTMAX_DOUBLE &&
  ------------------
  |  |  160|  10.6M|#define JANET_INTMAX_DOUBLE 9007199254740992.0
  ------------------
  |  Branch (28579:24): [True: 5.32M, False: 173]
  ------------------
28580|  5.32M|                       x >= JANET_INTMIN_DOUBLE) ? "%.0f" : ("%." STR(DBL_DIG) "g");
  ------------------
  |  |  161|  5.32M|#define JANET_INTMIN_DOUBLE (-9007199254740992.0)
  ------------------
  |  Branch (28580:24): [True: 5.32M, False: 31]
  ------------------
28581|  5.32M|    int count;
28582|  5.32M|    if (x == 0.0) {
  ------------------
  |  Branch (28582:9): [True: 74.4k, False: 5.24M]
  ------------------
28583|       |        /* Prevent printing of '-0' */
28584|  74.4k|        count = 1;
28585|  74.4k|        buffer->data[buffer->count] = '0';
28586|  5.24M|    } else {
28587|  5.24M|        count = snprintf((char *) buffer->data + buffer->count, BUFSIZE, fmt, x);
  ------------------
  |  |28570|  5.24M|#define BUFSIZE 64
  ------------------
28588|  5.24M|    }
28589|  5.32M|    buffer->count += count;
28590|  5.32M|}
janet.c:string_description_b:
28636|  67.0k|static void string_description_b(JanetBuffer *buffer, const char *title, void *pointer) {
28637|  67.0k|    janet_buffer_ensure(buffer, buffer->count + BUFSIZE, 2);
  ------------------
  |  |28570|  67.0k|#define BUFSIZE 64
  ------------------
28638|  67.0k|    uint8_t *c = buffer->data + buffer->count;
28639|  67.0k|    int32_t i;
28640|  67.0k|    union {
28641|  67.0k|        uint8_t bytes[sizeof(void *)];
28642|  67.0k|        void *p;
28643|  67.0k|    } pbuf;
28644|       |
28645|  67.0k|    pbuf.p = pointer;
28646|  67.0k|    *c++ = '<';
28647|       |    /* Maximum of 32 bytes for abstract type name */
28648|   402k|    for (i = 0; i < 32 && title[i]; ++i)
  ------------------
  |  Branch (28648:17): [True: 402k, False: 0]
  |  Branch (28648:27): [True: 335k, False: 67.0k]
  ------------------
28649|   335k|        *c++ = ((uint8_t *)title) [i];
28650|  67.0k|    *c++ = ' ';
28651|  67.0k|    *c++ = '0';
28652|  67.0k|    *c++ = 'x';
28653|  67.0k|#if defined(JANET_64)
28654|  67.0k|#define POINTSIZE 6
28655|       |#else
28656|       |#define POINTSIZE (sizeof(void *))
28657|       |#endif
28658|   469k|    for (i = POINTSIZE; i > 0; --i) {
  ------------------
  |  |28654|  67.0k|#define POINTSIZE 6
  ------------------
  |  Branch (28658:25): [True: 402k, False: 67.0k]
  ------------------
28659|   402k|        uint8_t byte = pbuf.bytes[i - 1];
28660|   402k|        *c++ = HEX(byte >> 4);
  ------------------
  |  |28632|   402k|#define HEX(i) (((uint8_t *) janet_base64)[(i)])
  ------------------
28661|   402k|        *c++ = HEX(byte & 0xF);
  ------------------
  |  |28632|   402k|#define HEX(i) (((uint8_t *) janet_base64)[(i)])
  ------------------
28662|   402k|    }
28663|  67.0k|    *c++ = '>';
28664|  67.0k|    buffer->count = (int32_t)(c - buffer->data);
28665|  67.0k|#undef POINTSIZE
28666|  67.0k|}
janet.c:janet_escape_string_b:
28738|  7.32k|static void janet_escape_string_b(JanetBuffer *buffer, const uint8_t *str) {
28739|       |    janet_escape_string_impl(buffer, str, janet_string_length(str));
  ------------------
  |  | 1803|  7.32k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|  7.32k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
28740|  7.32k|}
janet.c:janet_escape_string_impl:
28668|  8.72k|static int janet_escape_string_impl(JanetBuffer *buffer, const uint8_t *str, int32_t len) {
28669|  8.72k|    janet_buffer_push_u8(buffer, '"');
28670|  8.72k|    int align = 1;
28671|  98.5k|    for (int32_t i = 0; i < len; ++i) {
  ------------------
  |  Branch (28671:25): [True: 89.8k, False: 8.72k]
  ------------------
28672|  89.8k|        uint8_t c = str[i];
28673|  89.8k|        switch (c) {
28674|    851|            case '"':
  ------------------
  |  Branch (28674:13): [True: 851, False: 88.9k]
  ------------------
28675|    851|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\\"", 2);
28676|    851|                align += 2;
28677|    851|                break;
28678|  1.28k|            case '\n':
  ------------------
  |  Branch (28678:13): [True: 1.28k, False: 88.5k]
  ------------------
28679|  1.28k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\n", 2);
28680|  1.28k|                align += 2;
28681|  1.28k|                break;
28682|    535|            case '\r':
  ------------------
  |  Branch (28682:13): [True: 535, False: 89.2k]
  ------------------
28683|    535|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\r", 2);
28684|    535|                align += 2;
28685|    535|                break;
28686|  14.8k|            case '\0':
  ------------------
  |  Branch (28686:13): [True: 14.8k, False: 74.9k]
  ------------------
28687|  14.8k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\0", 2);
28688|  14.8k|                align += 2;
28689|  14.8k|                break;
28690|  1.07k|            case '\f':
  ------------------
  |  Branch (28690:13): [True: 1.07k, False: 88.7k]
  ------------------
28691|  1.07k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\f", 2);
28692|  1.07k|                align += 2;
28693|  1.07k|                break;
28694|    331|            case '\v':
  ------------------
  |  Branch (28694:13): [True: 331, False: 89.4k]
  ------------------
28695|    331|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\v", 2);
28696|    331|                align += 2;
28697|    331|                break;
28698|    312|            case '\a':
  ------------------
  |  Branch (28698:13): [True: 312, False: 89.4k]
  ------------------
28699|    312|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\a", 2);
28700|    312|                align += 2;
28701|    312|                break;
28702|    318|            case '\b':
  ------------------
  |  Branch (28702:13): [True: 318, False: 89.4k]
  ------------------
28703|    318|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\b", 2);
28704|    318|                align += 2;
28705|    318|                break;
28706|    238|            case 27:
  ------------------
  |  Branch (28706:13): [True: 238, False: 89.5k]
  ------------------
28707|    238|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\e", 2);
28708|    238|                align += 2;
28709|    238|                break;
28710|  2.08k|            case '\\':
  ------------------
  |  Branch (28710:13): [True: 2.08k, False: 87.7k]
  ------------------
28711|  2.08k|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\\\", 2);
28712|  2.08k|                align += 2;
28713|  2.08k|                break;
28714|    498|            case '\t':
  ------------------
  |  Branch (28714:13): [True: 498, False: 89.3k]
  ------------------
28715|    498|                janet_buffer_push_bytes(buffer, (const uint8_t *)"\\t", 2);
28716|    498|                align += 2;
28717|    498|                break;
28718|  67.4k|            default:
  ------------------
  |  Branch (28718:13): [True: 67.4k, False: 22.3k]
  ------------------
28719|  67.4k|                if (c < 32 || c > 126) {
  ------------------
  |  Branch (28719:21): [True: 1.65k, False: 65.7k]
  |  Branch (28719:31): [True: 8.50k, False: 57.2k]
  ------------------
28720|  10.1k|                    uint8_t buf[4];
28721|  10.1k|                    buf[0] = '\\';
28722|  10.1k|                    buf[1] = 'x';
28723|  10.1k|                    buf[2] = janet_base64[(c >> 4) & 0xF];
28724|  10.1k|                    buf[3] = janet_base64[c & 0xF];
28725|  10.1k|                    janet_buffer_push_bytes(buffer, buf, 4);
28726|  10.1k|                    align += 4;
28727|  57.2k|                } else {
28728|  57.2k|                    janet_buffer_push_u8(buffer, c);
28729|  57.2k|                    align++;
28730|  57.2k|                }
28731|  67.4k|                break;
28732|  89.8k|        }
28733|  89.8k|    }
28734|  8.72k|    janet_buffer_push_u8(buffer, '"');
28735|  8.72k|    return align + 1;
28736|  8.72k|}
janet.c:janet_escape_buffer_b:
28742|  1.40k|static void janet_escape_buffer_b(JanetBuffer *buffer, JanetBuffer *bx) {
28743|  1.40k|    if (bx == buffer) {
  ------------------
  |  Branch (28743:9): [True: 0, False: 1.40k]
  ------------------
28744|       |        /* Ensures buffer won't resize while escaping */
28745|      0|        janet_buffer_ensure(bx, bx->count + 5 * bx->count + 3, 1);
28746|      0|    }
28747|  1.40k|    janet_buffer_push_u8(buffer, '@');
28748|  1.40k|    janet_escape_string_impl(buffer, bx->data, bx->count);
28749|  1.40k|}
janet.c:janet_pretty_:
29334|  2.02k|                                  int flags, Janet x, int32_t startlen, int32_t lookback_barrier) {
29335|  2.02k|    struct pretty S;
29336|  2.02k|    if (NULL == buffer) {
  ------------------
  |  Branch (29336:9): [True: 0, False: 2.02k]
  ------------------
29337|      0|        buffer = janet_buffer(0);
29338|      0|    }
29339|  2.02k|    S.buffer = buffer;
29340|  2.02k|    S.depth = depth;
29341|  2.02k|    S.width = width;
29342|  2.02k|    S.align = 0;
29343|  2.02k|    S.flags = flags;
29344|  2.02k|    S.bufstartlen = startlen;
29345|  2.02k|    S.lookback_barrier = lookback_barrier;
29346|  2.02k|    S.keysort_capacity = 0;
29347|       |    S.keysort_buffer = NULL;
29348|  2.02k|    S.keysort_start = 0;
29349|  2.02k|    janet_table_init(&S.seen, 10);
29350|  2.02k|    janet_pretty_one(&S, x);
29351|  2.02k|    backtrack_newlines(&S);
29352|  2.02k|    janet_table_deinit(&S.seen);
29353|  2.02k|    return S.buffer;
29354|  2.02k|}
janet.c:janet_pretty_one:
29103|   644k|static void janet_pretty_one(struct pretty *S, Janet x) {
29104|       |    /* Add to seen */
29105|   644k|    switch (janet_type(x)) {
  ------------------
  |  |  790|   644k|    (isnan((x).number) \
  |  |  791|   644k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|   644k|        : JANET_NUMBER)
  ------------------
  |  Branch (29105:13): [True: 643k, False: 635]
  ------------------
29106|      0|        case JANET_NIL:
  ------------------
  |  Branch (29106:9): [True: 0, False: 644k]
  ------------------
29107|    635|        case JANET_NUMBER:
  ------------------
  |  Branch (29107:9): [True: 635, False: 643k]
  ------------------
29108|   376k|        case JANET_SYMBOL:
  ------------------
  |  Branch (29108:9): [True: 375k, False: 268k]
  ------------------
29109|   376k|        case JANET_BOOLEAN:
  ------------------
  |  Branch (29109:9): [True: 13, False: 644k]
  ------------------
29110|   376k|            break;
29111|   268k|        default: {
  ------------------
  |  Branch (29111:9): [True: 268k, False: 376k]
  ------------------
29112|   268k|            Janet seenid = janet_table_get(&S->seen, x);
29113|   268k|            if (janet_checktype(seenid, JANET_NUMBER)) {
  ------------------
  |  |  801|   268k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 268k]
  |  |  |  Branch (801:6): [True: 268k, Folded]
  |  |  ------------------
  |  |  802|   268k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|   268k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 268k]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 268k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   268k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29114|      0|                if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1957|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29114:21): [True: 0, False: 0]
  ------------------
29115|      0|                    janet_buffer_push_cstring(S->buffer, janet_cycle_color);
29116|      0|                }
29117|      0|                janet_buffer_push_cstring(S->buffer, "<cycle ");
29118|      0|                S->align += 8 + integer_to_string_b(S->buffer, janet_unwrap_integer(seenid));
  ------------------
  |  |  957|      0|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
29119|      0|                janet_buffer_push_u8(S->buffer, '>');
29120|      0|                if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1957|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29120:21): [True: 0, False: 0]
  ------------------
29121|      0|                    janet_buffer_push_cstring(S->buffer, "\x1B[0m");
29122|      0|                }
29123|      0|                return;
29124|   268k|            } else {
29125|   268k|                janet_table_put(&S->seen, x, janet_wrap_integer(S->seen.count));
  ------------------
  |  |  958|   268k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|   268k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
29126|   268k|                break;
29127|   268k|            }
29128|   268k|        }
29129|   644k|    }
29130|       |
29131|   644k|    switch (janet_type(x)) {
  ------------------
  |  |  790|   644k|    (isnan((x).number) \
  |  |  791|   644k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|   644k|        : JANET_NUMBER)
  ------------------
  |  Branch (29131:13): [True: 643k, False: 635]
  ------------------
29132|   378k|        default: {
  ------------------
  |  Branch (29132:9): [True: 378k, False: 265k]
  ------------------
29133|   378k|            const char *color = janet_pretty_colors[janet_type(x)];
  ------------------
  |  |  790|   378k|    (isnan((x).number) \
  |  |  791|   378k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|   378k|        : JANET_NUMBER)
  ------------------
  |  Branch (29133:53): [True: 378k, False: 635]
  ------------------
29134|   378k|            if (color && (S->flags & JANET_PRETTY_COLOR)) {
  ------------------
  |  | 1957|   378k|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29134:17): [True: 378k, False: 0]
  |  Branch (29134:26): [True: 579, False: 378k]
  ------------------
29135|    579|                janet_buffer_push_cstring(S->buffer, color);
29136|    579|            }
29137|   378k|            if (janet_checktype(x, JANET_BUFFER) && janet_unwrap_buffer(x) == S->buffer) {
  ------------------
  |  |  801|   757k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 110, False: 378k]
  |  |  |  Branch (801:6): [Folded, False: 378k]
  |  |  ------------------
  |  |  802|   757k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   757k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   378k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   378k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   378k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   378k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          if (janet_checktype(x, JANET_BUFFER) && janet_unwrap_buffer(x) == S->buffer) {
  ------------------
  |  |  857|    110|#define janet_unwrap_buffer(x) ((JanetBuffer *)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (29137:53): [True: 0, False: 110]
  ------------------
29138|      0|                janet_buffer_ensure(S->buffer, S->buffer->count + S->bufstartlen * 4 + 3, 1);
29139|      0|                janet_buffer_push_u8(S->buffer, '@');
29140|       |                /* Use start len to print to self better */
29141|      0|                S->align += 1 + janet_escape_string_impl(S->buffer, S->buffer->data, S->bufstartlen);
29142|   378k|            } else {
29143|   378k|                S->align -= S->buffer->count;
29144|   378k|                janet_description_b(S->buffer, x);
29145|   378k|                S->align += S->buffer->count;
29146|   378k|            }
29147|   378k|            if (color && (S->flags & JANET_PRETTY_COLOR)) {
  ------------------
  |  | 1957|   378k|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29147:17): [True: 378k, False: 0]
  |  Branch (29147:26): [True: 579, False: 378k]
  ------------------
29148|    579|                janet_buffer_push_cstring(S->buffer, "\x1B[0m");
29149|    579|            }
29150|   378k|            break;
29151|      0|        }
29152|    140|        case JANET_ARRAY:
  ------------------
  |  Branch (29152:9): [True: 140, False: 644k]
  ------------------
29153|   262k|        case JANET_TUPLE: {
  ------------------
  |  Branch (29153:9): [True: 262k, False: 382k]
  ------------------
29154|   262k|            int32_t i = 0, len = 0;
29155|   262k|            const Janet *arr = NULL;
29156|   262k|            int isarray = janet_checktype(x, JANET_ARRAY);
  ------------------
  |  |  801|   262k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 262k]
  |  |  ------------------
  |  |  802|   262k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   262k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   262k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   262k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   262k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   262k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29157|   262k|            janet_indexed_view(x, &arr, &len);
29158|   262k|            int hasbrackets = !isarray && (janet_tuple_flag(arr) & JANET_TUPLE_FLAG_BRACKETCTOR);
  ------------------
  |  | 1796|   262k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1790|   262k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                          int hasbrackets = !isarray && (janet_tuple_flag(arr) & JANET_TUPLE_FLAG_BRACKETCTOR);
  ------------------
  |  | 1788|   262k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (29158:31): [True: 262k, False: 140]
  |  Branch (29158:43): [True: 129, False: 262k]
  ------------------
29159|   262k|            const char *startstr = isarray ? "@[" : hasbrackets ? "[" : "(";
  ------------------
  |  Branch (29159:36): [True: 140, False: 262k]
  |  Branch (29159:53): [True: 129, False: 262k]
  ------------------
29160|   262k|            const char endchar = isarray ? ']' : hasbrackets ? ']' : ')';
  ------------------
  |  Branch (29160:34): [True: 140, False: 262k]
  |  Branch (29160:50): [True: 129, False: 262k]
  ------------------
29161|   262k|            janet_buffer_push_cstring(S->buffer, startstr);
29162|   262k|            S->align += strlen(startstr);
29163|   262k|            const int align = S->leaf_align = S->align;
29164|   262k|            S->depth--;
29165|   262k|            if (S->depth == 0) {
  ------------------
  |  Branch (29165:17): [True: 44, False: 262k]
  ------------------
29166|     44|                janet_buffer_push_cstring(S->buffer, "...");
29167|     44|                S->align += 3;
29168|   262k|            } else {
29169|   262k|                if (len > JANET_PRETTY_ARRAY_LIMIT && !(S->flags & JANET_PRETTY_NOTRUNC)) {
  ------------------
  |  |29100|   524k|#define JANET_PRETTY_ARRAY_LIMIT 160
  ------------------
                              if (len > JANET_PRETTY_ARRAY_LIMIT && !(S->flags & JANET_PRETTY_NOTRUNC)) {
  ------------------
  |  | 1959|     29|#define JANET_PRETTY_NOTRUNC 4
  ------------------
  |  Branch (29169:21): [True: 29, False: 262k]
  |  Branch (29169:55): [True: 29, False: 0]
  ------------------
29170|    116|                    for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (29170:33): [True: 87, False: 29]
  ------------------
29171|     87|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (29171:29): [True: 58, False: 29]
  ------------------
29172|     87|                        janet_pretty_one(S, arr[i]);
29173|     87|                    }
29174|     29|                    print_newline(S, align);
29175|     29|                    janet_buffer_push_cstring(S->buffer, "...");
29176|     29|                    S->align += 3;
29177|    116|                    for (i = len - 3; i < len; i++) {
  ------------------
  |  Branch (29177:39): [True: 87, False: 29]
  ------------------
29178|     87|                        print_newline(S, align);
29179|     87|                        janet_pretty_one(S, arr[i]);
29180|     87|                    }
29181|   262k|                } else {
29182|   892k|                    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (29182:33): [True: 629k, False: 262k]
  ------------------
29183|   629k|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (29183:29): [True: 367k, False: 262k]
  ------------------
29184|   629k|                        janet_pretty_one(S, arr[i]);
29185|   629k|                    }
29186|   262k|                }
29187|   262k|            }
29188|   262k|            S->depth++;
29189|   262k|            janet_buffer_push_u8(S->buffer, endchar);
29190|   262k|            S->align++;
29191|   262k|            break;
29192|    140|        }
29193|  3.02k|        case JANET_STRUCT:
  ------------------
  |  Branch (29193:9): [True: 3.02k, False: 641k]
  ------------------
29194|  3.05k|        case JANET_TABLE: {
  ------------------
  |  Branch (29194:9): [True: 28, False: 644k]
  ------------------
29195|  3.05k|            int istable = janet_checktype(x, JANET_TABLE);
  ------------------
  |  |  801|  3.05k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 3.05k]
  |  |  ------------------
  |  |  802|  3.05k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  3.05k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  3.05k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  3.05k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  3.05k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  3.05k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29196|       |
29197|       |            /* For object-like tables, print class name */
29198|  3.05k|            if (istable) {
  ------------------
  |  Branch (29198:17): [True: 28, False: 3.02k]
  ------------------
29199|     28|                JanetTable *t = janet_unwrap_table(x);
  ------------------
  |  |  856|     28|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
29200|     28|                JanetTable *proto = t->proto;
29201|     28|                S->align++;
29202|     28|                janet_buffer_push_cstring(S->buffer, "@");
29203|     28|                if (NULL != proto) {
  ------------------
  |  Branch (29203:21): [True: 1, False: 27]
  ------------------
29204|      1|                    Janet name = janet_table_get(proto, janet_ckeywordv("_name"));
  ------------------
  |  | 1833|      1|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      1|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      1|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29205|      1|                    const uint8_t *n;
29206|      1|                    int32_t len;
29207|      1|                    if (janet_bytes_view(name, &n, &len)) {
  ------------------
  |  Branch (29207:25): [True: 0, False: 1]
  ------------------
29208|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1957|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29208:29): [True: 0, False: 0]
  ------------------
29209|      0|                            janet_buffer_push_cstring(S->buffer, janet_class_color);
29210|      0|                        }
29211|      0|                        janet_buffer_push_bytes(S->buffer, n, len);
29212|      0|                        S->align += len;
29213|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1957|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29213:29): [True: 0, False: 0]
  ------------------
29214|      0|                            janet_buffer_push_cstring(S->buffer, "\x1B[0m");
29215|      0|                        }
29216|      0|                    }
29217|      1|                }
29218|  3.02k|            } else {
29219|  3.02k|                JanetStruct st = janet_unwrap_struct(x);
  ------------------
  |  |  852|  3.02k|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
29220|  3.02k|                JanetStruct proto = janet_struct_proto(st);
  ------------------
  |  | 1841|  3.02k|#define janet_struct_proto(t) (janet_struct_head(t)->proto)
  |  |  ------------------
  |  |  |  | 1836|  3.02k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
29221|  3.02k|                if (NULL != proto) {
  ------------------
  |  Branch (29221:21): [True: 0, False: 3.02k]
  ------------------
29222|      0|                    Janet name = janet_struct_get(proto, janet_ckeywordv("_name"));
  ------------------
  |  | 1833|      0|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      0|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29223|      0|                    const uint8_t *n;
29224|      0|                    int32_t len;
29225|      0|                    if (janet_bytes_view(name, &n, &len)) {
  ------------------
  |  Branch (29225:25): [True: 0, False: 0]
  ------------------
29226|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1957|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29226:29): [True: 0, False: 0]
  ------------------
29227|      0|                            janet_buffer_push_cstring(S->buffer, janet_class_color);
29228|      0|                        }
29229|      0|                        janet_buffer_push_bytes(S->buffer, n, len);
29230|      0|                        S->align += len;
29231|      0|                        if (S->flags & JANET_PRETTY_COLOR) {
  ------------------
  |  | 1957|      0|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29231:29): [True: 0, False: 0]
  ------------------
29232|      0|                            janet_buffer_push_cstring(S->buffer, "\x1B[0m");
29233|      0|                        }
29234|      0|                    }
29235|      0|                }
29236|  3.02k|            }
29237|  3.05k|            janet_buffer_push_u8(S->buffer, '{');
29238|  3.05k|            const int align = S->leaf_align = ++S->align;
29239|       |
29240|  3.05k|            S->depth--;
29241|  3.05k|            if (S->depth == 0) {
  ------------------
  |  Branch (29241:17): [True: 0, False: 3.05k]
  ------------------
29242|      0|                janet_buffer_push_cstring(S->buffer, "...");
29243|      0|                S->align += 3;
29244|  3.05k|            } else {
29245|  3.05k|                int32_t len = 0, cap = 0;
29246|  3.05k|                const JanetKV *kvs = NULL;
29247|  3.05k|                janet_dictionary_view(x, &kvs, &len, &cap);
29248|  3.05k|                int32_t ks_start = S->keysort_start;
29249|  3.05k|                int truncated = 0;
29250|       |
29251|       |                /* Shortcut for huge dictionaries, don't bother sorting keys */
29252|  3.05k|                if (len > JANET_PRETTY_DICT_KEYSORT_LIMIT) {
  ------------------
  |  |29099|  3.05k|#define JANET_PRETTY_DICT_KEYSORT_LIMIT 2000
  ------------------
  |  Branch (29252:21): [True: 0, False: 3.05k]
  ------------------
29253|      0|                    if (!(S->flags & JANET_PRETTY_NOTRUNC) && (len > JANET_PRETTY_DICT_LIMIT)) {
  ------------------
  |  | 1959|      0|#define JANET_PRETTY_NOTRUNC 4
  ------------------
                                  if (!(S->flags & JANET_PRETTY_NOTRUNC) && (len > JANET_PRETTY_DICT_LIMIT)) {
  ------------------
  |  |29098|      0|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
  |  Branch (29253:25): [True: 0, False: 0]
  |  Branch (29253:63): [True: 0, False: 0]
  ------------------
29254|      0|                        len = JANET_PRETTY_DICT_LIMIT;
  ------------------
  |  |29098|      0|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
29255|      0|                        truncated = 1;
29256|      0|                    }
29257|      0|                    int32_t j = 0;
29258|      0|                    for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (29258:41): [True: 0, False: 0]
  ------------------
29259|      0|                        while (janet_checktype(kvs[j].key, JANET_NIL)) j++;
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 0]
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
29260|      0|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (29260:29): [True: 0, False: 0]
  ------------------
29261|      0|                        janet_pretty_one(S, kvs[j].key);
29262|      0|                        janet_buffer_push_u8(S->buffer, ' ');
29263|      0|                        S->align++;
29264|      0|                        janet_pretty_one(S, kvs[j].value);
29265|      0|                        j++;
29266|      0|                    }
29267|      0|                    if (truncated) {
  ------------------
  |  Branch (29267:25): [True: 0, False: 0]
  ------------------
29268|      0|                        print_newline(S, align);
29269|      0|                        janet_buffer_push_cstring(S->buffer, "...");
29270|      0|                        S->align += 3;
29271|      0|                    }
29272|  3.05k|                } else {
29273|       |                    /* Sorted keys dictionaries */
29274|       |
29275|       |                    /* Ensure buffer is large enough to sort keys. */
29276|  3.05k|                    int64_t mincap = (int64_t) len + (int64_t) ks_start;
29277|  3.05k|                    if (mincap > INT32_MAX) {
  ------------------
  |  Branch (29277:25): [True: 0, False: 3.05k]
  ------------------
29278|      0|                        truncated = 1;
29279|      0|                        len = 0;
29280|      0|                        mincap = ks_start;
29281|      0|                    }
29282|       |
29283|  3.05k|                    if (S->keysort_capacity < mincap) {
  ------------------
  |  Branch (29283:25): [True: 72, False: 2.98k]
  ------------------
29284|     72|                        if (mincap >= INT32_MAX / 2) {
  ------------------
  |  Branch (29284:29): [True: 0, False: 72]
  ------------------
29285|      0|                            S->keysort_capacity = INT32_MAX;
29286|     72|                        } else {
29287|     72|                            S->keysort_capacity = (int32_t)(mincap * 2);
29288|     72|                        }
29289|     72|                        S->keysort_buffer = janet_srealloc(S->keysort_buffer, sizeof(int32_t) * S->keysort_capacity);
29290|     72|                        if (NULL == S->keysort_buffer) {
  ------------------
  |  Branch (29290:29): [True: 0, False: 72]
  ------------------
29291|      0|                            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
29292|      0|                        }
29293|     72|                    }
29294|       |
29295|  3.05k|                    janet_sorted_keys(kvs, cap, S->keysort_buffer == NULL ? NULL : S->keysort_buffer + ks_start);
  ------------------
  |  Branch (29295:49): [True: 60, False: 2.99k]
  ------------------
29296|  3.05k|                    S->keysort_start += len;
29297|  3.05k|                    if (!(S->flags & JANET_PRETTY_NOTRUNC) && (len > JANET_PRETTY_DICT_LIMIT)) {
  ------------------
  |  | 1959|  3.05k|#define JANET_PRETTY_NOTRUNC 4
  ------------------
                                  if (!(S->flags & JANET_PRETTY_NOTRUNC) && (len > JANET_PRETTY_DICT_LIMIT)) {
  ------------------
  |  |29098|  3.05k|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
  |  Branch (29297:25): [True: 3.05k, False: 3]
  |  Branch (29297:63): [True: 0, False: 3.05k]
  ------------------
29298|      0|                        len = JANET_PRETTY_DICT_LIMIT;
  ------------------
  |  |29098|      0|#define JANET_PRETTY_DICT_LIMIT 30
  ------------------
29299|      0|                        truncated = 1;
29300|      0|                    }
29301|       |
29302|  9.15k|                    for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (29302:41): [True: 6.10k, False: 3.05k]
  ------------------
29303|  6.10k|                        if (i) print_newline(S, align);
  ------------------
  |  Branch (29303:29): [True: 3.18k, False: 2.92k]
  ------------------
29304|  6.10k|                        int32_t j = S->keysort_buffer[i + ks_start];
29305|  6.10k|                        janet_pretty_one(S, kvs[j].key);
29306|  6.10k|                        janet_buffer_push_u8(S->buffer, ' ');
29307|  6.10k|                        S->align++;
29308|  6.10k|                        janet_pretty_one(S, kvs[j].value);
29309|  6.10k|                    }
29310|       |
29311|  3.05k|                    if (truncated) {
  ------------------
  |  Branch (29311:25): [True: 0, False: 3.05k]
  ------------------
29312|      0|                        print_newline(S, align);
29313|      0|                        janet_buffer_push_cstring(S->buffer, "...");
29314|      0|                        S->align += 3;
29315|      0|                    }
29316|       |
29317|  3.05k|                }
29318|  3.05k|                S->keysort_start = ks_start;
29319|  3.05k|            }
29320|  3.05k|            S->depth++;
29321|  3.05k|            janet_buffer_push_u8(S->buffer, '}');
29322|  3.05k|            S->align++;
29323|  3.05k|            break;
29324|  3.05k|        }
29325|   644k|    }
29326|       |    /* Remove from seen */
29327|   644k|    janet_table_remove(&S->seen, x);
29328|   644k|    return;
29329|   644k|}
janet.c:print_newline:
29062|   371k|static void print_newline(struct pretty *S, int align) {
29063|   371k|    int i;
29064|   371k|    if (S->flags & JANET_PRETTY_ONELINE) {
  ------------------
  |  | 1958|   371k|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (29064:9): [True: 331k, False: 40.1k]
  ------------------
29065|   331k|        janet_buffer_push_u8(S->buffer, ' ');
29066|   331k|        return;
29067|   331k|    }
29068|  40.1k|    backtrack_newlines(S);
29069|  40.1k|    janet_buffer_push_u8(S->buffer, '\n');
29070|  40.1k|    S->leaf_align = S->align = align;
29071|  4.85M|    for (i = 0; i < S->align; i++) {
  ------------------
  |  Branch (29071:17): [True: 4.81M, False: 40.1k]
  ------------------
29072|  4.81M|        janet_buffer_push_u8(S->buffer, ' ');
29073|  4.81M|    }
29074|  40.1k|}
janet.c:backtrack_newlines:
29002|  42.1k|static void backtrack_newlines(const struct pretty *S) {
29003|  42.1k|    if (S->flags & JANET_PRETTY_ONELINE || S->buffer->count <= 0)
  ------------------
  |  | 1958|  84.2k|#define JANET_PRETTY_ONELINE 2
  ------------------
  |  Branch (29003:9): [True: 1.80k, False: 40.3k]
  |  Branch (29003:44): [True: 0, False: 40.3k]
  ------------------
29004|  1.80k|        return;
29005|  40.3k|    switch (S->buffer->data[S->buffer->count - 1]) {
29006|  2.73k|        case ')':
  ------------------
  |  Branch (29006:9): [True: 2.73k, False: 37.6k]
  ------------------
29007|  2.76k|        case '}':
  ------------------
  |  Branch (29007:9): [True: 36, False: 40.3k]
  ------------------
29008|  2.77k|        case ']':
  ------------------
  |  Branch (29008:9): [True: 11, False: 40.3k]
  ------------------
29009|  2.77k|            break;
29010|  37.5k|        default:
  ------------------
  |  Branch (29010:9): [True: 37.5k, False: 2.77k]
  ------------------
29011|  37.5k|            return;
29012|  40.3k|    }
29013|  2.77k|    int32_t removed = 0;
29014|  2.77k|    int32_t old_count = S->buffer->count;
29015|  2.77k|    int32_t offset = old_count;
29016|  2.77k|    int32_t b0 = S->lookback_barrier;
29017|  2.77k|    int32_t columns = S->width;
29018|  2.77k|    int32_t align = 0;
29019|   119k|    while (--offset >= b0) {
  ------------------
  |  Branch (29019:12): [True: 119k, False: 49]
  ------------------
29020|   119k|        const char *s = (const char *)S->buffer->data + offset;
29021|   119k|        if (*s == '\n') {
  ------------------
  |  Branch (29021:13): [True: 4.26k, False: 115k]
  ------------------
29022|  4.26k|            if (align < S->leaf_align) {
  ------------------
  |  Branch (29022:17): [True: 1.92k, False: 2.34k]
  ------------------
29023|  1.92k|                break;
29024|  1.92k|            }
29025|  2.34k|            columns += align;
29026|  2.34k|            removed += align;
29027|  2.34k|            align = 0;
29028|   115k|        } else if (*s == ' ') {
  ------------------
  |  Branch (29028:20): [True: 55.3k, False: 60.2k]
  ------------------
29029|  55.3k|            align++;
29030|  60.2k|        } else {
29031|  60.2k|            align = 0;
29032|       |            /* Don't count color sequences: \x1B(0|3\d)m */
29033|  60.2k|            if (S->flags & JANET_PRETTY_COLOR && *s == 'm') {
  ------------------
  |  | 1957|   120k|#define JANET_PRETTY_COLOR 1
  ------------------
  |  Branch (29033:17): [True: 3.39k, False: 56.8k]
  |  Branch (29033:50): [True: 938, False: 2.46k]
  ------------------
29034|    938|                if (offset >= (3 + b0) && strncmp("\x1B[0m", s - 3, 4) == 0) {
  ------------------
  |  Branch (29034:21): [True: 938, False: 0]
  |  Branch (29034:43): [True: 384, False: 554]
  ------------------
29035|    384|                    offset -= 3;
29036|    384|                    columns++;
29037|    554|                } else if (offset >= (4 + b0) && strncmp("\x1B[3", s - 4, 3) == 0) {
  ------------------
  |  Branch (29037:28): [True: 554, False: 0]
  |  Branch (29037:50): [True: 382, False: 172]
  ------------------
29038|    382|                    offset -= 4;
29039|    382|                    columns++;
29040|    382|                }
29041|    938|            }
29042|  60.2k|        }
29043|   117k|        if (--columns <= 0) {
  ------------------
  |  Branch (29043:13): [True: 807, False: 117k]
  ------------------
29044|    807|            return;
29045|    807|        }
29046|   117k|    }
29047|  1.97k|    offset++; /* Don't mess with the last newline we found */
29048|  1.97k|    janet_assert(offset >= b0, "bad buffer index");
  ------------------
  |  |  386|  1.97k|#define janet_assert(c, m) do { \
  |  |  387|  1.97k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 1.97k]
  |  |  ------------------
  |  |  388|  1.97k|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 1.97k]
  |  |  ------------------
  ------------------
29049|  1.97k|    S->buffer->count -= removed;
29050|  42.1k|    for (int32_t i = offset; i < S->buffer->count; i++) {
  ------------------
  |  Branch (29050:30): [True: 40.1k, False: 1.97k]
  ------------------
29051|  40.1k|        if (S->buffer->data[offset] == '\n') {
  ------------------
  |  Branch (29051:13): [True: 1.99k, False: 38.1k]
  ------------------
29052|  1.99k|            S->buffer->data[i] = ' ';
29053|  13.4k|            while (S->buffer->data[++offset] == ' ') {
  ------------------
  |  Branch (29053:20): [True: 11.4k, False: 1.99k]
  ------------------
29054|  11.4k|                janet_assert(offset < old_count, "bad replacement of newline");
  ------------------
  |  |  386|  11.4k|#define janet_assert(c, m) do { \
  |  |  387|  11.4k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 11.4k]
  |  |  ------------------
  |  |  388|  11.4k|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 11.4k]
  |  |  ------------------
  ------------------
29055|  11.4k|            }
29056|  38.1k|        } else {
29057|  38.1k|            S->buffer->data[i] = S->buffer->data[offset++];
29058|  38.1k|        }
29059|  40.1k|    }
29060|  1.97k|}
janet.c:janet_jdn_:
29363|    573|static JanetBuffer *janet_jdn_(JanetBuffer *buffer, int depth, Janet x, int32_t startlen, int32_t lookback_barrier) {
29364|    573|    struct pretty S;
29365|    573|    if (NULL == buffer) {
  ------------------
  |  Branch (29365:9): [True: 0, False: 573]
  ------------------
29366|      0|        buffer = janet_buffer(0);
29367|      0|    }
29368|    573|    S.buffer = buffer;
29369|    573|    S.depth = depth;
29370|    573|    S.align = 0;
29371|    573|    S.flags = 0;
29372|    573|    S.bufstartlen = startlen;
29373|    573|    S.lookback_barrier = lookback_barrier;
29374|    573|    S.keysort_capacity = 0;
29375|    573|    S.keysort_buffer = NULL;
29376|    573|    S.keysort_start = 0;
29377|    573|    janet_table_init(&S.seen, 10);
29378|    573|    int res = print_jdn_one(&S, x, depth);
29379|    573|    janet_table_deinit(&S.seen);
29380|    573|    if (res) {
  ------------------
  |  Branch (29380:9): [True: 8, False: 565]
  ------------------
29381|      8|        janet_panic("could not print to jdn format");
29382|      8|    }
29383|    565|    return S.buffer;
29384|    573|}
janet.c:print_jdn_one:
28920|  39.0k|static int print_jdn_one(struct pretty *S, Janet x, int depth) {
28921|  39.0k|    if (depth == 0) return 1;
  ------------------
  |  Branch (28921:9): [True: 1, False: 39.0k]
  ------------------
28922|  39.0k|    switch (janet_type(x)) {
  ------------------
  |  |  790|  39.0k|    (isnan((x).number) \
  |  |  791|  39.0k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  39.0k|        : JANET_NUMBER)
  ------------------
  |  Branch (28922:13): [True: 38.1k, False: 897]
  ------------------
28923|      8|        case JANET_NIL:
  ------------------
  |  Branch (28923:9): [True: 8, False: 39.0k]
  ------------------
28924|     10|        case JANET_BOOLEAN:
  ------------------
  |  Branch (28924:9): [True: 2, False: 39.0k]
  ------------------
28925|     24|        case JANET_BUFFER:
  ------------------
  |  Branch (28925:9): [True: 14, False: 39.0k]
  ------------------
28926|    162|        case JANET_STRING:
  ------------------
  |  Branch (28926:9): [True: 138, False: 38.8k]
  ------------------
28927|    162|            janet_description_b(S->buffer, x);
28928|    162|            break;
28929|    897|        case JANET_NUMBER:
  ------------------
  |  Branch (28929:9): [True: 897, False: 38.1k]
  ------------------
28930|    897|            janet_buffer_ensure(S->buffer, S->buffer->count + BUFSIZE, 2);
  ------------------
  |  |28570|    897|#define BUFSIZE 64
  ------------------
28931|    897|            double num = janet_unwrap_number(x);
  ------------------
  |  |  834|    897|#define janet_unwrap_number(x) ((x).number)
  ------------------
28932|    897|            if (isnan(num)) return 1;
  ------------------
  |  Branch (28932:17): [True: 0, False: 897]
  ------------------
28933|    897|            if (isinf(num)) return 1;
  ------------------
  |  Branch (28933:17): [True: 2, False: 895]
  ------------------
28934|    895|            janet_buffer_dtostr(S->buffer, num);
28935|    895|            break;
28936|  20.2k|        case JANET_SYMBOL:
  ------------------
  |  Branch (28936:9): [True: 20.2k, False: 18.7k]
  ------------------
28937|  20.5k|        case JANET_KEYWORD:
  ------------------
  |  Branch (28937:9): [True: 290, False: 38.7k]
  ------------------
28938|  20.5k|            if (contains_bad_chars(janet_unwrap_keyword(x), janet_type(x) == JANET_SYMBOL)) return 1;
  ------------------
  |  |  860|  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;
  ------------------
  |  |  790|  20.5k|    (isnan((x).number) \
  |  |  791|  20.5k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  20.5k|        : JANET_NUMBER)
  ------------------
  |  Branch (28938:17): [True: 0, False: 20.5k]
  |  Branch (28938:61): [True: 20.5k, False: 0]
  ------------------
28939|  20.5k|            janet_description_b(S->buffer, x);
28940|  20.5k|            break;
28941|  16.8k|        case JANET_TUPLE: {
  ------------------
  |  Branch (28941:9): [True: 16.8k, False: 22.1k]
  ------------------
28942|  16.8k|            JanetTuple t = janet_unwrap_tuple(x);
  ------------------
  |  |  853|  16.8k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
28943|  16.8k|            int isb = janet_tuple_flag(t) & JANET_TUPLE_FLAG_BRACKETCTOR;
  ------------------
  |  | 1796|  16.8k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1790|  16.8k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                          int isb = janet_tuple_flag(t) & JANET_TUPLE_FLAG_BRACKETCTOR;
  ------------------
  |  | 1788|  16.8k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
28944|  16.8k|            janet_buffer_push_u8(S->buffer, isb ? '[' : '(');
  ------------------
  |  Branch (28944:45): [True: 14, False: 16.8k]
  ------------------
28945|  50.1k|            for (int32_t i = 0; i < janet_tuple_length(t); i++) {
  ------------------
  |  | 1792|  50.1k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|  50.1k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (28945:33): [True: 34.5k, False: 15.6k]
  ------------------
28946|  34.5k|                if (i) janet_buffer_push_u8(S->buffer, ' ');
  ------------------
  |  Branch (28946:21): [True: 17.7k, False: 16.8k]
  ------------------
28947|  34.5k|                if (print_jdn_one(S, t[i], depth - 1)) return 1;
  ------------------
  |  Branch (28947:21): [True: 1.28k, False: 33.2k]
  ------------------
28948|  34.5k|            }
28949|  15.6k|            janet_buffer_push_u8(S->buffer, isb ? ']' : ')');
  ------------------
  |  Branch (28949:45): [True: 14, False: 15.5k]
  ------------------
28950|  15.6k|        }
28951|      0|        break;
28952|    100|        case JANET_ARRAY: {
  ------------------
  |  Branch (28952:9): [True: 100, False: 38.9k]
  ------------------
28953|    100|            janet_table_put(&S->seen, x, janet_wrap_true());
  ------------------
  |  |  827|    100|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  817|    100|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    100|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    100|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28954|    100|            JanetArray *a = janet_unwrap_array(x);
  ------------------
  |  |  855|    100|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
28955|    100|            janet_buffer_push_cstring(S->buffer, "@[");
28956|  1.87k|            for (int32_t i = 0; i < a->count; i++) {
  ------------------
  |  Branch (28956:33): [True: 1.77k, False: 97]
  ------------------
28957|  1.77k|                if (i) janet_buffer_push_u8(S->buffer, ' ');
  ------------------
  |  Branch (28957:21): [True: 1.69k, False: 79]
  ------------------
28958|  1.77k|                if (print_jdn_one(S, a->data[i], depth - 1)) return 1;
  ------------------
  |  Branch (28958:21): [True: 3, False: 1.77k]
  ------------------
28959|  1.77k|            }
28960|     97|            janet_buffer_push_u8(S->buffer, ']');
28961|     97|        }
28962|      0|        break;
28963|     24|        case JANET_TABLE: {
  ------------------
  |  Branch (28963:9): [True: 24, False: 39.0k]
  ------------------
28964|     24|            janet_table_put(&S->seen, x, janet_wrap_true());
  ------------------
  |  |  827|     24|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  817|     24|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     24|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     24|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28965|     24|            JanetTable *tab = janet_unwrap_table(x);
  ------------------
  |  |  856|     24|#define janet_unwrap_table(x) ((JanetTable *)janet_nanbox_to_pointer(x))
  ------------------
28966|     24|            janet_buffer_push_cstring(S->buffer, "@{");
28967|     24|            int isFirst = 1;
28968|    119|            for (int32_t i = 0; i < tab->capacity; i++) {
  ------------------
  |  Branch (28968:33): [True: 95, False: 24]
  ------------------
28969|     95|                const JanetKV *kv = tab->data + i;
28970|     95|                if (janet_checktype(kv->key, JANET_NIL)) continue;
  ------------------
  |  |  801|     95|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 64, False: 31]
  |  |  |  Branch (801:6): [Folded, False: 95]
  |  |  ------------------
  |  |  802|     95|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|     95|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|     95|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|     95|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     95|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     95|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28971|     31|                if (!isFirst) janet_buffer_push_u8(S->buffer, ' ');
  ------------------
  |  Branch (28971:21): [True: 18, False: 13]
  ------------------
28972|     31|                isFirst = 0;
28973|     31|                if (print_jdn_one(S, kv->key, depth - 1)) return 1;
  ------------------
  |  Branch (28973:21): [True: 0, False: 31]
  ------------------
28974|     31|                janet_buffer_push_u8(S->buffer, ' ');
28975|     31|                if (print_jdn_one(S, kv->value, depth - 1)) return 1;
  ------------------
  |  Branch (28975:21): [True: 0, False: 31]
  ------------------
28976|     31|            }
28977|     24|            janet_buffer_push_u8(S->buffer, '}');
28978|     24|        }
28979|      0|        break;
28980|    406|        case JANET_STRUCT: {
  ------------------
  |  Branch (28980:9): [True: 406, False: 38.6k]
  ------------------
28981|    406|            JanetStruct st = janet_unwrap_struct(x);
  ------------------
  |  |  852|    406|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
28982|    406|            janet_buffer_push_u8(S->buffer, '{');
28983|    406|            int isFirst = 1;
28984|  3.24k|            for (int32_t i = 0; i < janet_struct_capacity(st); i++) {
  ------------------
  |  | 1839|  3.24k|#define janet_struct_capacity(t) (janet_struct_head(t)->capacity)
  |  |  ------------------
  |  |  |  | 1836|  3.24k|#define janet_struct_head(t) ((JanetStructHead *)((char *)t - offsetof(JanetStructHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (28984:33): [True: 2.84k, False: 404]
  ------------------
28985|  2.84k|                const JanetKV *kv = st + i;
28986|  2.84k|                if (janet_checktype(kv->key, JANET_NIL)) continue;
  ------------------
  |  |  801|  2.84k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 1.81k, False: 1.02k]
  |  |  |  Branch (801:6): [Folded, False: 2.84k]
  |  |  ------------------
  |  |  802|  2.84k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  2.84k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  2.84k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  2.84k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  2.84k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  2.84k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
28987|  1.02k|                if (!isFirst) janet_buffer_push_u8(S->buffer, ' ');
  ------------------
  |  Branch (28987:21): [True: 674, False: 353]
  ------------------
28988|  1.02k|                isFirst = 0;
28989|  1.02k|                if (print_jdn_one(S, kv->key, depth - 1)) return 1;
  ------------------
  |  Branch (28989:21): [True: 1, False: 1.02k]
  ------------------
28990|  1.02k|                janet_buffer_push_u8(S->buffer, ' ');
28991|  1.02k|                if (print_jdn_one(S, kv->value, depth - 1)) return 1;
  ------------------
  |  Branch (28991:21): [True: 1, False: 1.02k]
  ------------------
28992|  1.02k|            }
28993|    404|            janet_buffer_push_u8(S->buffer, '}');
28994|    404|        }
28995|      0|        break;
28996|      5|        default:
  ------------------
  |  Branch (28996:9): [True: 5, False: 39.0k]
  ------------------
28997|      5|            return 1;
28998|  39.0k|    }
28999|  37.7k|    return 0;
29000|  39.0k|}
janet.c:contains_bad_chars:
28827|  20.5k|static int contains_bad_chars(const uint8_t *sym, int issym) {
28828|  20.5k|    int32_t len = janet_string_length(sym);
  ------------------
  |  | 1803|  20.5k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|  20.5k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
28829|  20.5k|    if (len && issym && sym[0] >= '0' && sym[0] <= '9') return 1;
  ------------------
  |  Branch (28829:9): [True: 20.3k, False: 237]
  |  Branch (28829:16): [True: 20.2k, False: 53]
  |  Branch (28829:25): [True: 19.4k, False: 833]
  |  Branch (28829:42): [True: 0, False: 19.4k]
  ------------------
28830|  20.5k|    if (!janet_valid_utf8(sym, len)) return 1;
  ------------------
  |  Branch (28830:9): [True: 0, False: 20.5k]
  ------------------
28831|   157k|    for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (28831:25): [True: 136k, False: 20.5k]
  ------------------
28832|   136k|        if (!janet_is_symbol_char(sym[i])) return 1;
  ------------------
  |  Branch (28832:13): [True: 0, False: 136k]
  ------------------
28833|   136k|    }
28834|  20.5k|    return 0;
28835|  20.5k|}
janet.c:scanformat:
29453|   186k|    char precision[3]) {
29454|   186k|    const char *p = strfrmt;
29455|       |
29456|       |    /* Parse strfrmt */
29457|   186k|    memset(width, '\0', 3);
29458|   186k|    memset(precision, '\0', 3);
29459|   186k|    while (*p != '\0' && strchr(FMT_FLAGS, *p) != NULL)
  ------------------
  |  |29419|   186k|#define FMT_FLAGS "-+ #0"
  ------------------
  |  Branch (29459:12): [True: 186k, False: 3]
  |  Branch (29459:26): [True: 157, False: 186k]
  ------------------
29460|    157|        p++; /* skip flags */
29461|   186k|    if ((size_t)(p - strfrmt) >= sizeof(FMT_FLAGS)) janet_panic("invalid format (repeated flags)");
  ------------------
  |  |29419|   186k|#define FMT_FLAGS "-+ #0"
  ------------------
  |  Branch (29461:9): [True: 4, False: 186k]
  ------------------
29462|   186k|    if (isdigit((int)(*p)))
  ------------------
  |  Branch (29462:9): [True: 6, False: 186k]
  ------------------
29463|      6|        width[0] = *p++; /* skip width */
29464|   186k|    if (isdigit((int)(*p)))
  ------------------
  |  Branch (29464:9): [True: 2, False: 186k]
  ------------------
29465|      2|        width[1] = *p++; /* (2 digits at most) */
29466|   186k|    if (*p == '.') {
  ------------------
  |  Branch (29466:9): [True: 18, False: 186k]
  ------------------
29467|     18|        p++;
29468|     18|        if (isdigit((int)(*p)))
  ------------------
  |  Branch (29468:13): [True: 14, False: 4]
  ------------------
29469|     14|            precision[0] = *p++; /* skip precision */
29470|     18|        if (isdigit((int)(*p)))
  ------------------
  |  Branch (29470:13): [True: 5, False: 13]
  ------------------
29471|      5|            precision[1] = *p++; /* (2 digits at most) */
29472|     18|    }
29473|   186k|    if (isdigit((int)(*p)))
  ------------------
  |  Branch (29473:9): [True: 2, False: 186k]
  ------------------
29474|      2|        janet_panic("invalid format (width or precision too long)");
29475|       |
29476|       |    /* Write to form - replace characters with fixed size stuff */
29477|   186k|    *(form++) = '%';
29478|   186k|    const char *p2 = strfrmt;
29479|   372k|    while (p2 <= p) {
  ------------------
  |  Branch (29479:12): [True: 186k, False: 186k]
  ------------------
29480|   186k|        char *loc = strchr(FMT_REPLACE_INTTYPES, *p2);
  ------------------
  |  |29420|   186k|#define FMT_REPLACE_INTTYPES "diouxX"
  ------------------
29481|   186k|        if (loc != NULL && *loc != '\0') {
  ------------------
  |  Branch (29481:13): [True: 77.5k, False: 108k]
  |  Branch (29481:28): [True: 77.5k, False: 3]
  ------------------
29482|  77.5k|            const char *mapping = get_fmt_mapping(*p2++);
29483|  77.5k|            size_t len = strlen(mapping);
29484|  77.5k|            memcpy(form, mapping, len);
29485|  77.5k|            form += len;
29486|   108k|        } else {
29487|   108k|            *(form++) = *(p2++);
29488|   108k|        }
29489|   186k|    }
29490|   186k|    *form = '\0';
29491|       |
29492|   186k|    return p;
29493|   186k|}
janet.c:get_fmt_mapping:
29441|  77.5k|static const char *get_fmt_mapping(char c) {
29442|   232k|    for (size_t i = 0; i < (sizeof(format_mappings) / sizeof(struct FmtMapping)); i++) {
  ------------------
  |  Branch (29442:24): [True: 232k, False: 0]
  ------------------
29443|   232k|        if (format_mappings[i].c == c)
  ------------------
  |  Branch (29443:13): [True: 77.5k, False: 155k]
  ------------------
29444|  77.5k|            return format_mappings[i].mapping;
29445|   232k|    }
29446|      0|    janet_assert(0, "bad format mapping");
  ------------------
  |  |  386|      0|#define janet_assert(c, m) do { \
  |  |  387|      0|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, Folded]
  |  |  ------------------
  |  |  388|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
29447|      0|}
janet.c:typestr:
29390|    191|static const char *typestr(Janet x) {
29391|    191|    JanetType t = janet_type(x);
  ------------------
  |  |  790|    191|    (isnan((x).number) \
  |  |  791|    191|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|    191|        : JANET_NUMBER)
  ------------------
  |  Branch (29391:19): [True: 167, False: 24]
  ------------------
29392|    191|    return (t == JANET_ABSTRACT)
  ------------------
  |  Branch (29392:12): [True: 3, False: 188]
  ------------------
29393|    191|           ? janet_abstract_type(janet_unwrap_abstract(x))->name
  ------------------
  |  | 1889|      3|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|      3|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
29394|    191|           : janet_type_names[t];
29395|    191|}
janet.c:pushtypes:
29397|    637|static void pushtypes(JanetBuffer *buffer, int types) {
29398|    637|    int first = 1;
29399|    637|    int i = 0;
29400|  7.36k|    while (types) {
  ------------------
  |  Branch (29400:12): [True: 6.73k, False: 637]
  ------------------
29401|  6.73k|        if (1 & types) {
  ------------------
  |  Branch (29401:13): [True: 3.43k, False: 3.29k]
  ------------------
29402|  3.43k|            if (first) {
  ------------------
  |  Branch (29402:17): [True: 637, False: 2.79k]
  ------------------
29403|    637|                first = 0;
29404|  2.79k|            } else {
29405|  2.79k|                janet_buffer_push_cstring(buffer, (types == 1) ? " or " : ", ");
  ------------------
  |  Branch (29405:51): [True: 489, False: 2.31k]
  ------------------
29406|  2.79k|            }
29407|  3.43k|            janet_buffer_push_cstring(buffer, janet_type_names[i]);
29408|  3.43k|        }
29409|  6.73k|        i++;
29410|  6.73k|        types >>= 1;
29411|  6.73k|    }
29412|    637|}
janet.c:pushchunk:
29889|  4.50M|static void pushchunk(JanetcRegisterAllocator *ra) {
29890|       |    /* Registers 240-255 are always allocated (reserved) */
29891|  4.50M|    uint32_t chunk = ra->count == 7 ? 0xFFFF0000 : 0;
  ------------------
  |  Branch (29891:22): [True: 13.0k, False: 4.49M]
  ------------------
29892|  4.50M|    int32_t newcount = ra->count + 1;
29893|  4.50M|    if (newcount > ra->capacity) {
  ------------------
  |  Branch (29893:9): [True: 1.48M, False: 3.01M]
  ------------------
29894|  1.48M|        int32_t newcapacity = newcount * 2;
29895|  1.48M|        ra->chunks = janet_realloc(ra->chunks, (size_t) newcapacity * sizeof(uint32_t));
  ------------------
  |  | 2396|  1.48M|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
29896|  1.48M|        if (!ra->chunks) {
  ------------------
  |  Branch (29896:13): [True: 0, False: 1.48M]
  ------------------
29897|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
29898|      0|        }
29899|  1.48M|        ra->capacity = newcapacity;
29900|  1.48M|    }
29901|  4.50M|    ra->chunks[ra->count] = chunk;
29902|  4.50M|    ra->count = newcount;
29903|  4.50M|}
janet.c:janetc_break:
30948|     10|static JanetSlot janetc_break(JanetFopts opts, int32_t argn, const Janet *argv) {
30949|     10|    JanetCompiler *c = opts.compiler;
30950|     10|    JanetScope *scope = c->scope;
30951|     10|    if (argn > 1) {
  ------------------
  |  Branch (30951:9): [True: 1, False: 9]
  ------------------
30952|      1|        janetc_cerror(c, "expected at most 1 argument");
30953|      1|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30954|      1|    }
30955|       |
30956|       |    /* Find scope to break from */
30957|     10|    while (scope) {
  ------------------
  |  Branch (30957:12): [True: 10, False: 0]
  ------------------
30958|     10|        if (scope->flags & (JANET_SCOPE_FUNCTION | JANET_SCOPE_WHILE))
  ------------------
  |  | 1003|     10|#define JANET_SCOPE_FUNCTION 1
  ------------------
                      if (scope->flags & (JANET_SCOPE_FUNCTION | JANET_SCOPE_WHILE))
  ------------------
  |  | 1008|     10|#define JANET_SCOPE_WHILE 32
  ------------------
  |  Branch (30958:13): [True: 9, False: 1]
  ------------------
30959|      9|            break;
30960|      1|        scope = scope->parent;
30961|      1|    }
30962|      9|    if (NULL == scope) {
  ------------------
  |  Branch (30962:9): [True: 0, False: 9]
  ------------------
30963|      0|        janetc_cerror(c, "break must occur in while loop or closure");
30964|      0|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30965|      0|    }
30966|       |
30967|       |    /* Emit code to break from that scope */
30968|      9|    JanetFopts subopts = janetc_fopts_default(c);
30969|      9|    if (scope->flags & JANET_SCOPE_FUNCTION) {
  ------------------
  |  | 1003|      9|#define JANET_SCOPE_FUNCTION 1
  ------------------
  |  Branch (30969:9): [True: 3, False: 6]
  ------------------
30970|      3|        if (!(scope->flags & JANET_SCOPE_WHILE) && argn) {
  ------------------
  |  | 1008|      3|#define JANET_SCOPE_WHILE 32
  ------------------
  |  Branch (30970:13): [True: 3, False: 0]
  |  Branch (30970:52): [True: 0, False: 3]
  ------------------
30971|       |            /* Closure body with return argument */
30972|      0|            subopts.flags |= JANET_FOPTS_TAIL;
  ------------------
  |  | 1091|      0|#define JANET_FOPTS_TAIL 0x10000
  ------------------
30973|      0|            janetc_value(subopts, argv[0]);
30974|      0|            return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30975|      3|        } else {
30976|       |            /* while loop IIFE or no argument */
30977|      3|            if (argn) {
  ------------------
  |  Branch (30977:17): [True: 0, False: 3]
  ------------------
30978|      0|                subopts.flags |= JANET_FOPTS_DROP;
  ------------------
  |  | 1093|      0|#define JANET_FOPTS_DROP 0x40000
  ------------------
30979|      0|                janetc_value(subopts, argv[0]);
30980|      0|            }
30981|      3|            janetc_emit(c, JOP_RETURN_NIL);
30982|      3|            return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|      3|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      3|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30983|      3|        }
30984|      6|    } else {
30985|      6|        if (argn) {
  ------------------
  |  Branch (30985:13): [True: 0, False: 6]
  ------------------
30986|      0|            subopts.flags |= JANET_FOPTS_DROP;
  ------------------
  |  | 1093|      0|#define JANET_FOPTS_DROP 0x40000
  ------------------
30987|      0|            janetc_value(subopts, argv[0]);
30988|      0|        }
30989|       |        /* Tag the instruction so the while special can turn it into a proper jump */
30990|      6|        janetc_emit(c, 0x80 | JOP_JUMP);
30991|      6|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|      6|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      6|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      6|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      6|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30992|      6|    }
30993|      9|}
janet.c:janetc_def:
30724|  10.5k|static JanetSlot janetc_def(JanetFopts opts, int32_t argn, const Janet *argv) {
30725|  10.5k|    JanetCompiler *c = opts.compiler;
30726|  10.5k|    JanetTable *attr_table = handleattr(c, "def", argn, argv);
30727|  10.5k|    if (c->result.status == JANET_COMPILE_ERROR) {
  ------------------
  |  Branch (30727:9): [True: 15, False: 10.5k]
  ------------------
30728|     15|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|     15|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|     15|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     15|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     15|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30729|     15|    }
30730|  10.5k|    check_metadata_lint(c, attr_table);
30731|  10.5k|    opts.flags &= ~JANET_FOPTS_HINT;
  ------------------
  |  | 1092|  10.5k|#define JANET_FOPTS_HINT 0x20000
  ------------------
30732|  10.5k|    SlotHeadPair *into = NULL;
30733|  10.5k|    into = dohead_destructure(c, into, opts, argv[0], argv[argn - 1]);
30734|  10.5k|    if (c->result.status == JANET_COMPILE_ERROR) {
  ------------------
  |  Branch (30734:9): [True: 190, False: 10.3k]
  ------------------
30735|    190|        janet_v_free(into);
  ------------------
  |  |  705|    190|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  713|    190|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (705:34): [True: 190, False: 0]
  |  |  ------------------
  ------------------
30736|    190|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|    190|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|    190|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    190|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    190|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30737|    190|    }
30738|  10.3k|    JanetSlot ret;
30739|  10.3k|    janet_assert(janet_v_count(into) > 0, "bad destructure");
  ------------------
  |  |  386|  10.3k|#define janet_assert(c, m) do { \
  |  |  387|  20.6k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 10.3k]
  |  |  |  Branch (387:11): [True: 10.3k, False: 0]
  |  |  ------------------
  |  |  388|  10.3k|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 10.3k]
  |  |  ------------------
  ------------------
30740|  26.4k|    for (int32_t i = 0; i < janet_v_count(into); i++) {
  ------------------
  |  |  708|  26.4k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  26.4k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  26.4k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 26.4k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (30740:25): [True: 16.0k, False: 10.3k]
  ------------------
30741|  16.0k|        destructure(c, into[i].lhs, into[i].rhs, defleaf, attr_table);
30742|  16.0k|        ret = into[i].rhs;
30743|  16.0k|    }
30744|       |    janet_v_free(into);
  ------------------
  |  |  705|  10.3k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  713|  10.3k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (705:34): [True: 10.3k, False: 0]
  |  |  ------------------
  ------------------
30745|  10.3k|    return ret;
30746|  10.3k|}
janet.c:handleattr:
30480|  11.9k|static JanetTable *handleattr(JanetCompiler *c, const char *kind, int32_t argn, const Janet *argv) {
30481|  11.9k|    int32_t i;
30482|  11.9k|    if (argn < 2) {
  ------------------
  |  Branch (30482:9): [True: 1, False: 11.9k]
  ------------------
30483|      1|        janetc_error(c, janet_formatc("expected at least 2 arguments to %s", kind));
30484|      1|        return NULL;
30485|      1|    }
30486|  11.9k|    JanetTable *tab = janet_table(2);
30487|  11.9k|    const char *binding_name = janet_type(argv[0]) == JANET_SYMBOL
  ------------------
  |  |  790|  11.9k|    (isnan((x).number) \
  |  |  791|  11.9k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  11.9k|        : JANET_NUMBER)
  ------------------
  |  Branch (30487:32): [True: 11.9k, False: 11]
  |  Branch (30487:32): [True: 10.0k, False: 1.90k]
  ------------------
30488|  11.9k|                               ? ((const char *)janet_unwrap_symbol(argv[0]))
  ------------------
  |  |  859|  10.0k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
30489|  11.9k|                               : "<multiple bindings>";
30490|  19.6k|    for (i = 1; i < argn - 1; i++) {
  ------------------
  |  Branch (30490:17): [True: 7.67k, False: 11.9k]
  ------------------
30491|  7.67k|        Janet attr = argv[i];
30492|  7.67k|        switch (janet_type(attr)) {
  ------------------
  |  |  790|  7.67k|    (isnan((x).number) \
  |  |  791|  7.67k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  7.67k|        : JANET_NUMBER)
  ------------------
  |  Branch (30492:17): [True: 7.50k, False: 172]
  ------------------
30493|  4.97k|            case JANET_TUPLE:
  ------------------
  |  Branch (30493:13): [True: 4.97k, False: 2.69k]
  ------------------
30494|  4.97k|                janetc_cerror(c, "unexpected form - did you intend to use defn?");
30495|  4.97k|                break;
30496|    672|            default:
  ------------------
  |  Branch (30496:13): [True: 672, False: 7.00k]
  ------------------
30497|    672|                janetc_error(c, janet_formatc("cannot add metadata %v to binding %s", attr, binding_name));
30498|    672|                break;
30499|  1.56k|            case JANET_KEYWORD:
  ------------------
  |  Branch (30499:13): [True: 1.56k, False: 6.11k]
  ------------------
30500|  1.56k|                janet_table_put(tab, attr, janet_wrap_true());
  ------------------
  |  |  827|  1.56k|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  817|  1.56k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.56k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.56k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30501|  1.56k|                break;
30502|    434|            case JANET_STRING:
  ------------------
  |  Branch (30502:13): [True: 434, False: 7.24k]
  ------------------
30503|    434|                janet_table_put(tab, janet_ckeywordv("doc"), attr);
  ------------------
  |  | 1833|    434|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|    434|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|    434|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|    434|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|    434|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30504|    434|                break;
30505|     27|            case JANET_STRUCT:
  ------------------
  |  Branch (30505:13): [True: 27, False: 7.64k]
  ------------------
30506|     27|                janet_table_merge_struct(tab, janet_unwrap_struct(attr));
  ------------------
  |  |  852|     27|#define janet_unwrap_struct(x) ((JanetStruct)janet_nanbox_to_pointer(x))
  ------------------
30507|     27|                break;
30508|  7.67k|        }
30509|  7.67k|    }
30510|  11.9k|    return tab;
30511|  11.9k|}
janet.c:check_metadata_lint:
30646|  11.9k|static void check_metadata_lint(JanetCompiler *c, JanetTable *attr_table) {
30647|  11.9k|    if (!(c->scope->flags & JANET_SCOPE_TOP) && attr_table && attr_table->count) {
  ------------------
  |  | 1005|  11.9k|#define JANET_SCOPE_TOP 4
  ------------------
  |  Branch (30647:9): [True: 11.7k, False: 224]
  |  Branch (30647:49): [True: 11.7k, False: 0]
  |  Branch (30647:63): [True: 1.57k, False: 10.1k]
  ------------------
30648|       |        /* A macro is a normal lint, other metadata is a strict lint */
30649|  1.57k|        if (janet_truthy(janet_table_get_keyword(attr_table, "macro"))) {
  ------------------
  |  |  813|  1.57k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|  3.15k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 1.57k]
  |  |  |  |  ------------------
  |  |  |  |  802|  3.15k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|  3.15k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|  1.57k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|  1.57k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  1.57k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  1.57k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:5): [True: 0, False: 1.57k]
  |  |  |  Branch (813:6): [True: 0, False: 1.57k]
  |  |  ------------------
  |  |  814|  1.57k|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 0, False: 0]
  |  |  |  Branch (814:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
30650|      0|            janetc_lintf(c, JANET_C_LINT_NORMAL, "macro tag is ignored in inner scopes");
30651|      0|        }
30652|  1.57k|    }
30653|  11.9k|}
janet.c:destructure:
30319|  3.12M|                       JanetTable *attr) {
30320|  3.12M|    switch (janet_type(left)) {
  ------------------
  |  |  790|  3.12M|    (isnan((x).number) \
  |  |  791|  3.12M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  3.12M|        : JANET_NUMBER)
  ------------------
  |  Branch (30320:13): [True: 3.11M, False: 2.66k]
  ------------------
30321|  11.0k|        default:
  ------------------
  |  Branch (30321:9): [True: 11.0k, False: 3.11M]
  ------------------
30322|  11.0k|            janetc_error(c, janet_formatc("unexpected type in destructuring, got %v", left));
30323|  11.0k|            return 1;
30324|  1.61M|        case JANET_SYMBOL:
  ------------------
  |  Branch (30324:9): [True: 1.61M, False: 1.51M]
  ------------------
30325|       |            /* Leaf, assign right to left */
30326|  1.61M|            return leaf(c, janet_unwrap_symbol(left), right, attr);
  ------------------
  |  |  859|  1.61M|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
30327|  1.49M|        case JANET_TUPLE:
  ------------------
  |  Branch (30327:9): [True: 1.49M, False: 1.62M]
  ------------------
30328|  1.49M|        case JANET_ARRAY: {
  ------------------
  |  Branch (30328:9): [True: 176, False: 3.12M]
  ------------------
30329|  1.49M|            int32_t len = 0;
30330|  1.49M|            const Janet *values = NULL;
30331|  1.49M|            janet_indexed_view(left, &values, &len);
30332|  4.58M|            for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (30332:33): [True: 3.08M, False: 1.49M]
  ------------------
30333|  3.08M|                JanetSlot nextright = janetc_farslot(c);
30334|  3.08M|                Janet subval = values[i];
30335|       |
30336|  3.08M|                if (janet_checktype(subval, JANET_SYMBOL) && !janet_cstrcmp(janet_unwrap_symbol(subval), "&")) {
  ------------------
  |  |  801|  6.17M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 1.60M, False: 1.48M]
  |  |  |  Branch (801:6): [Folded, False: 3.08M]
  |  |  ------------------
  |  |  802|  6.17M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  6.17M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  3.08M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  3.08M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  3.08M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  3.08M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                              if (janet_checktype(subval, JANET_SYMBOL) && !janet_cstrcmp(janet_unwrap_symbol(subval), "&")) {
  ------------------
  |  |  859|  1.60M|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (30336:62): [True: 377, False: 1.60M]
  ------------------
30337|    377|                    if (i + 1 >= len) {
  ------------------
  |  Branch (30337:25): [True: 212, False: 165]
  ------------------
30338|    212|                        janetc_cerror(c, "expected symbol following '& in destructuring pattern");
30339|    212|                        return 1;
30340|    212|                    }
30341|       |
30342|    165|                    if (i + 2 < len) {
  ------------------
  |  Branch (30342:25): [True: 127, False: 38]
  ------------------
30343|    127|                        int32_t num_extra = len - i - 1;
30344|    127|                        Janet *extra = janet_tuple_begin(num_extra);
30345|    127|                        janet_tuple_flag(extra) |= JANET_TUPLE_FLAG_BRACKETCTOR;
  ------------------
  |  | 1796|    127|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1790|    127|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                                      janet_tuple_flag(extra) |= JANET_TUPLE_FLAG_BRACKETCTOR;
  ------------------
  |  | 1788|    127|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
30346|       |
30347|   203k|                        for (int32_t j = 0; j < num_extra; ++j) {
  ------------------
  |  Branch (30347:45): [True: 203k, False: 127]
  ------------------
30348|   203k|                            extra[j] = values[j + i + 1];
30349|   203k|                        }
30350|       |
30351|    127|                        janetc_error(c, janet_formatc("expected a single symbol follow '& in destructuring pattern, found %q", janet_wrap_tuple(janet_tuple_end(extra))));
  ------------------
  |  |  838|    127|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|    127|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    127|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    127|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30352|    127|                        return 1;
30353|    127|                    }
30354|       |
30355|     38|                    if (!janet_checktype(values[i + 1], JANET_SYMBOL)) {
  ------------------
  |  |  801|     38|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 38]
  |  |  ------------------
  |  |  802|     38|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|     38|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|     38|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|     38|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     38|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     38|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30355:25): [True: 6, False: 32]
  ------------------
30356|      6|                        janetc_error(c, janet_formatc("expected symbol following '& in destructuring pattern, found %q", values[i + 1]));
30357|      6|                        return 1;
30358|      6|                    }
30359|       |
30360|     32|                    JanetSlot argi = janetc_farslot(c);
30361|     32|                    JanetSlot arg  = janetc_farslot(c);
30362|     32|                    JanetSlot len  = janetc_farslot(c);
30363|       |
30364|     32|                    janetc_emit_si(c, JOP_LOAD_INTEGER, argi, i, 0);
30365|     32|                    janetc_emit_ss(c, JOP_LENGTH, len, right, 0);
30366|       |
30367|       |                    /* loop condition - reuse arg slot for the condition result */
30368|     32|                    int32_t label_loop_start = janetc_emit_sss(c, JOP_LESS_THAN, arg, argi, len, 0);
30369|     32|                    int32_t label_loop_cond_jump = janetc_emit_si(c, JOP_JUMP_IF_NOT, arg, 0, 0);
30370|       |
30371|       |                    /* loop body */
30372|     32|                    janetc_emit_sss(c, JOP_GET, arg, right, argi, 0);
30373|     32|                    janetc_emit_s(c, JOP_PUSH, arg, 0);
30374|     32|                    janetc_emit_ssi(c, JOP_ADD_IMMEDIATE, argi, argi, 1, 0);
30375|       |
30376|       |                    /* loop - jump back to the start of the loop */
30377|     32|                    int32_t label_loop_loop = janet_v_count(c->buffer);
  ------------------
  |  |  708|     32|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|     32|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|     32|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 32, False: 0]
  |  |  ------------------
  ------------------
30378|     32|                    janetc_emit(c, JOP_JUMP);
30379|     32|                    int32_t label_loop_exit = janet_v_count(c->buffer);
  ------------------
  |  |  708|     32|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|     32|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|     32|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 32, False: 0]
  |  |  ------------------
  ------------------
30380|       |
30381|       |                    /* avoid shifting negative numbers */
30382|     32|                    check_16bit_jump(c, label_loop_cond_jump, label_loop_exit);
30383|     32|                    check_24bit_jump(c, label_loop_start, label_loop_loop);
30384|     32|                    c->buffer[label_loop_cond_jump] |= (uint32_t)(label_loop_exit - label_loop_cond_jump) << 16;
30385|     32|                    c->buffer[label_loop_loop] |= (uint32_t)(label_loop_start - label_loop_loop) << 8;
30386|       |
30387|     32|                    janetc_freeslot(c, argi);
30388|     32|                    janetc_freeslot(c, arg);
30389|     32|                    janetc_freeslot(c, len);
30390|       |
30391|     32|                    janetc_emit_s(c, JOP_MAKE_TUPLE, nextright, 1);
30392|       |
30393|     32|                    leaf(c, janet_unwrap_symbol(values[i + 1]), nextright, attr);
  ------------------
  |  |  859|     32|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
30394|     32|                    janetc_freeslot(c, nextright);
30395|     32|                    break;
30396|     38|                }
30397|       |
30398|  3.08M|                if (i < 0x100) {
  ------------------
  |  Branch (30398:21): [True: 3.07M, False: 18.9k]
  ------------------
30399|  3.07M|                    janetc_emit_ssu(c, JOP_GET_INDEX, nextright, right, (uint8_t) i, 1);
30400|  3.07M|                } else {
30401|  18.9k|                    JanetSlot k = janetc_cslot(janet_wrap_integer(i));
  ------------------
  |  |  958|  18.9k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|  18.9k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
30402|  18.9k|                    janetc_emit_sss(c, JOP_IN, nextright, right, k, 1);
30403|  18.9k|                }
30404|  3.08M|                if (destructure(c, subval, nextright, leaf, attr))
  ------------------
  |  Branch (30404:21): [True: 3.08M, False: 0]
  ------------------
30405|  3.08M|                    janetc_freeslot(c, nextright);
30406|  3.08M|            }
30407|  1.49M|        }
30408|  1.49M|        return 1;
30409|     67|        case JANET_TABLE:
  ------------------
  |  Branch (30409:9): [True: 67, False: 3.12M]
  ------------------
30410|    905|        case JANET_STRUCT: {
  ------------------
  |  Branch (30410:9): [True: 838, False: 3.12M]
  ------------------
30411|    905|            const JanetKV *kvs = NULL;
30412|    905|            int32_t cap = 0, len = 0;
30413|    905|            janet_dictionary_view(left, &kvs, &len, &cap);
30414|  7.19k|            for (int32_t i = 0; i < cap; i++) {
  ------------------
  |  Branch (30414:33): [True: 6.29k, False: 905]
  ------------------
30415|  6.29k|                if (janet_checktype(kvs[i].key, JANET_NIL)) continue;
  ------------------
  |  |  801|  6.29k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 4.39k, False: 1.90k]
  |  |  |  Branch (801:6): [Folded, False: 6.29k]
  |  |  ------------------
  |  |  802|  6.29k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  6.29k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  6.29k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  6.29k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  6.29k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  6.29k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30416|  1.90k|                JanetSlot nextright = janetc_farslot(c);
30417|  1.90k|                JanetSlot k = janetc_value(janetc_fopts_default(c), kvs[i].key);
30418|  1.90k|                janetc_emit_sss(c, JOP_IN, nextright, right, k, 1);
30419|  1.90k|                if (destructure(c, kvs[i].value, nextright, leaf, attr))
  ------------------
  |  Branch (30419:21): [True: 1.90k, False: 0]
  ------------------
30420|  1.90k|                    janetc_freeslot(c, nextright);
30421|  1.90k|            }
30422|    905|        }
30423|    905|        return 1;
30424|  3.12M|    }
30425|  3.12M|}
janet.c:check_16bit_jump:
30184|  6.51k|static void check_16bit_jump(JanetCompiler *c, int32_t lab1, int32_t lab2) {
30185|  6.51k|    if (bad_16bit_jump(lab1, lab2)) {
  ------------------
  |  Branch (30185:9): [True: 47, False: 6.47k]
  ------------------
30186|     47|        janetc_cerror(c, "bad 16-bit jump, too large");
30187|     47|    }
30188|  6.51k|}
janet.c:bad_16bit_jump:
30178|  6.51k|static int bad_16bit_jump(int32_t lab1, int32_t lab2) {
30179|  6.51k|    if (lab2 - lab1 > INT16_MAX) return 1;
  ------------------
  |  Branch (30179:9): [True: 47, False: 6.47k]
  ------------------
30180|  6.47k|    if (lab2 - lab1 < INT16_MIN) return 1;
  ------------------
  |  Branch (30180:9): [True: 0, False: 6.47k]
  ------------------
30181|  6.47k|    return 0;
30182|  6.47k|}
janet.c:check_24bit_jump:
30196|  1.94k|static void check_24bit_jump(JanetCompiler *c, int32_t lab1, int32_t lab2) {
30197|  1.94k|    if (bad_24bit_jump(lab1, lab2)) {
  ------------------
  |  Branch (30197:9): [True: 0, False: 1.94k]
  ------------------
30198|      0|        janetc_cerror(c, "bad 24-bit jump, too large");
30199|      0|    }
30200|  1.94k|}
janet.c:bad_24bit_jump:
30190|  1.94k|static int bad_24bit_jump(int32_t lab1, int32_t lab2) {
30191|  1.94k|    if (lab2 - lab1 > 0xFFFFFF) return 1;
  ------------------
  |  Branch (30191:9): [True: 0, False: 1.94k]
  ------------------
30192|  1.94k|    if (lab2 - lab1 < -0x1000000) return 1;
  ------------------
  |  Branch (30192:9): [True: 0, False: 1.94k]
  ------------------
30193|  1.94k|    return 0;
30194|  1.94k|}
janet.c:defleaf:
30682|  1.59M|    JanetTable *tab) {
30683|  1.59M|    JanetTable *entry = NULL;
30684|  1.59M|    int is_redef = 0;
30685|  1.59M|    if (c->scope->flags & JANET_SCOPE_TOP) {
  ------------------
  |  | 1005|  1.59M|#define JANET_SCOPE_TOP 4
  ------------------
  |  Branch (30685:9): [True: 380, False: 1.59M]
  ------------------
30686|    380|        entry = janet_table_clone(tab);
30687|    380|        janet_table_put(entry, janet_ckeywordv("source-map"),
  ------------------
  |  | 1833|    380|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|    380|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|    380|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|    380|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|    380|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30688|    380|                        janet_wrap_tuple(janetc_make_sourcemap(c)));
  ------------------
  |  |  838|    380|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|    380|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    380|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    380|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30689|       |
30690|    380|        is_redef = c->is_redef;
30691|    380|        if (is_redef) janet_table_put(entry, janet_ckeywordv("redef"), janet_wrap_true());
  ------------------
  |  | 1833|      0|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      0|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      if (is_redef) janet_table_put(entry, janet_ckeywordv("redef"), janet_wrap_true());
  ------------------
  |  |  827|      0|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30691:13): [True: 0, False: 380]
  ------------------
30692|       |
30693|    380|        if (is_redef) {
  ------------------
  |  Branch (30693:13): [True: 0, False: 380]
  ------------------
30694|      0|            JanetBinding binding = janet_resolve_ext(c->env, sym);
30695|      0|            JanetArray *ref;
30696|      0|            if (binding.type == JANET_BINDING_DYNAMIC_DEF || binding.type == JANET_BINDING_DYNAMIC_MACRO) {
  ------------------
  |  Branch (30696:17): [True: 0, False: 0]
  |  Branch (30696:62): [True: 0, False: 0]
  ------------------
30697|      0|                ref = janet_unwrap_array(binding.value);
  ------------------
  |  |  855|      0|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
30698|      0|            } else {
30699|      0|                ref = janet_array(1);
30700|      0|                janet_array_push(ref, janet_wrap_nil());
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30701|      0|            }
30702|      0|            janet_table_put(entry, janet_ckeywordv("ref"), janet_wrap_array(ref));
  ------------------
  |  | 1833|      0|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|      0|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          janet_table_put(entry, janet_ckeywordv("ref"), janet_wrap_array(ref));
  ------------------
  |  |  840|      0|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30703|      0|            JanetSlot refslot = janetc_cslot(janet_wrap_array(ref));
  ------------------
  |  |  840|      0|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30704|      0|            janetc_emit_ssu(c, JOP_PUT_INDEX, refslot, s, 0, 0);
30705|    380|        } else {
30706|    380|            JanetSlot valsym = janetc_cslot(janet_ckeywordv("value"));
  ------------------
  |  | 1833|    380|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|    380|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|    380|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|    380|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|    380|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30707|    380|            JanetSlot tabslot = janetc_cslot(janet_wrap_table(entry));
  ------------------
  |  |  841|    380|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|    380|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    380|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    380|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30708|    380|            janetc_emit_sss(c, JOP_PUT, tabslot, valsym, s, 0);
30709|    380|        }
30710|    380|    }
30711|  1.59M|    int no_unused = tab && tab->count && janet_truthy(janet_table_get_keyword(tab, "unused"));
  ------------------
  |  |  813|  1.59M|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|  3.38k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 1.69k]
  |  |  |  |  ------------------
  |  |  |  |  802|  3.38k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|  3.38k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|  1.69k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|  1.69k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  1.69k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  1.69k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 1.54k, False: 151]
  |  |  ------------------
  |  |  814|  1.59M|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|  3.08k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 1.54k]
  |  |  |  |  ------------------
  |  |  |  |  802|  3.08k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|  3.08k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|  1.54k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|  1.54k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  1.54k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  1.54k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 0, False: 1.54k]
  |  |  |  Branch (814:47): [True: 1.54k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (30711:21): [True: 1.47M, False: 116k]
  |  Branch (30711:28): [True: 1.69k, False: 1.47M]
  ------------------
30712|  1.59M|    int no_shadow = is_redef || (tab && tab->count && janet_truthy(janet_table_get_keyword(tab, "shadow")));
  ------------------
  |  |  813|  1.69k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|  3.38k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 1.69k]
  |  |  |  |  ------------------
  |  |  |  |  802|  3.38k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|  3.38k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|  1.69k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|  1.69k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  1.69k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  1.69k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 0, False: 1.69k]
  |  |  ------------------
  |  |  814|  1.69k|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 0, False: 0]
  |  |  |  Branch (814:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (30712:21): [True: 0, False: 1.59M]
  |  Branch (30712:34): [True: 1.47M, False: 116k]
  |  Branch (30712:41): [True: 1.69k, False: 1.47M]
  ------------------
30713|  1.59M|    uint32_t def_flags = 0;
30714|  1.59M|    if (no_unused) def_flags |= JANET_DEFFLAG_NO_UNUSED;
  ------------------
  |  | 1127|  1.54k|#define JANET_DEFFLAG_NO_UNUSED 2
  ------------------
  |  Branch (30714:9): [True: 1.54k, False: 1.59M]
  ------------------
30715|  1.59M|    if (no_shadow) def_flags |= JANET_DEFFLAG_NO_SHADOWCHECK;
  ------------------
  |  | 1126|      0|#define JANET_DEFFLAG_NO_SHADOWCHECK 1
  ------------------
  |  Branch (30715:9): [True: 0, False: 1.59M]
  ------------------
30716|  1.59M|    int result = namelocal(c, sym, 0, s, def_flags);
30717|  1.59M|    if (entry) {
  ------------------
  |  Branch (30717:9): [True: 380, False: 1.59M]
  ------------------
30718|       |        /* Add env entry to env AFTER namelocal to avoid the shadowcheck false positive */
30719|    380|        janet_table_put(c->env, janet_wrap_symbol(sym), janet_wrap_table(entry));
  ------------------
  |  |  844|    380|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  823|    380|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    380|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    380|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      janet_table_put(c->env, janet_wrap_symbol(sym), janet_wrap_table(entry));
  ------------------
  |  |  841|    380|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|    380|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    380|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    380|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30720|    380|    }
30721|  1.59M|    return result;
30722|  1.59M|}
janet.c:janetc_make_sourcemap:
30428|  3.42k|static const Janet *janetc_make_sourcemap(JanetCompiler *c) {
30429|  3.42k|    Janet *tup = janet_tuple_begin(3);
30430|  3.42k|    tup[0] = c->source ? janet_wrap_string(c->source) : janet_wrap_nil();
  ------------------
  |  |  843|  3.42k|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|  3.42k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  3.42k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  3.42k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  tup[0] = c->source ? janet_wrap_string(c->source) : janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  3.42k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30430:14): [True: 3.42k, False: 0]
  ------------------
30431|  3.42k|    tup[1] = janet_wrap_integer(c->current_mapping.line);
  ------------------
  |  |  958|  3.42k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|  3.42k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
30432|  3.42k|    tup[2] = janet_wrap_integer(c->current_mapping.column);
  ------------------
  |  |  958|  3.42k|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|  3.42k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
30433|  3.42k|    return janet_tuple_end(tup);
30434|  3.42k|}
janet.c:namelocal:
30579|  1.60M|static int namelocal(JanetCompiler *c, const uint8_t *head, int32_t flags, JanetSlot ret, uint32_t def_flags) {
30580|  1.60M|    int isUnnamedRegister = !(ret.flags & JANET_SLOT_NAMED) &&
  ------------------
  |  |  984|  1.60M|#define JANET_SLOT_NAMED 0x20000
  ------------------
  |  Branch (30580:29): [True: 1.60M, False: 478]
  ------------------
30581|  1.60M|                            ret.index > 0 &&
  ------------------
  |  Branch (30581:29): [True: 1.60M, False: 5.28k]
  ------------------
30582|  1.60M|                            ret.envindex >= 0;
  ------------------
  |  Branch (30582:29): [True: 0, False: 1.60M]
  ------------------
30583|       |    /* optimization for `(def x my-def)` - don't emit a movn/movf instruction, we can just alias my-def */
30584|       |    /* TODO - implement optimization for `(def x my-var)` correctly as well w/ de-aliasing */
30585|  1.60M|    int canAlias = !(flags & JANET_SLOT_MUTABLE) &&
  ------------------
  |  |  985|  1.60M|#define JANET_SLOT_MUTABLE 0x40000
  ------------------
  |  Branch (30585:20): [True: 1.59M, False: 13.6k]
  ------------------
30586|  1.59M|                   !(ret.flags & JANET_SLOT_MUTABLE) &&
  ------------------
  |  |  985|  1.59M|#define JANET_SLOT_MUTABLE 0x40000
  ------------------
  |  Branch (30586:20): [True: 1.59M, False: 69]
  ------------------
30587|  1.59M|                   (ret.flags & JANET_SLOT_NAMED) &&
  ------------------
  |  |  984|  1.59M|#define JANET_SLOT_NAMED 0x20000
  ------------------
  |  Branch (30587:20): [True: 409, False: 1.59M]
  ------------------
30588|    409|                   (ret.index >= 0) &&
  ------------------
  |  Branch (30588:20): [True: 409, False: 0]
  ------------------
30589|    409|                   (ret.envindex == -1);
  ------------------
  |  Branch (30589:20): [True: 408, False: 1]
  ------------------
30590|  1.60M|    if (canAlias) {
  ------------------
  |  Branch (30590:9): [True: 408, False: 1.60M]
  ------------------
30591|    408|        ret.flags &= ~JANET_SLOT_MUTABLE;
  ------------------
  |  |  985|    408|#define JANET_SLOT_MUTABLE 0x40000
  ------------------
30592|    408|        isUnnamedRegister = 1; /* don't free slot after use - is an alias for another slot */
30593|  1.60M|    } else if (!isUnnamedRegister) {
  ------------------
  |  Branch (30593:16): [True: 1.60M, False: 0]
  ------------------
30594|       |        /* Slot is not able to be named */
30595|  1.60M|        JanetSlot localslot = janetc_farslot(c);
30596|  1.60M|        janetc_copy(c, localslot, ret);
30597|  1.60M|        ret = localslot;
30598|  1.60M|    }
30599|  1.60M|    ret.flags |= flags;
30600|  1.60M|    if (c->scope->flags & JANET_SCOPE_TOP) {
  ------------------
  |  | 1005|  1.60M|#define JANET_SCOPE_TOP 4
  ------------------
  |  Branch (30600:9): [True: 380, False: 1.60M]
  ------------------
30601|    380|        def_flags |= JANET_DEFFLAG_NO_UNUSED;
  ------------------
  |  | 1127|    380|#define JANET_DEFFLAG_NO_UNUSED 2
  ------------------
30602|    380|    }
30603|  1.60M|    janetc_nameslot(c, head, ret, def_flags);
30604|  1.60M|    return !isUnnamedRegister;
30605|  1.60M|}
janet.c:janetc_do:
30885|  8.24k|static JanetSlot janetc_do(JanetFopts opts, int32_t argn, const Janet *argv) {
30886|  8.24k|    int32_t i;
30887|  8.24k|    JanetSlot ret = janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|  8.24k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  8.24k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  8.24k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  8.24k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30888|  8.24k|    JanetCompiler *c = opts.compiler;
30889|  8.24k|    JanetFopts subopts = janetc_fopts_default(c);
30890|  8.24k|    JanetScope tempscope;
30891|  8.24k|    janetc_scope(&tempscope, c, 0, "do");
30892|  26.5k|    for (i = 0; i < argn; i++) {
  ------------------
  |  Branch (30892:17): [True: 18.2k, False: 8.24k]
  ------------------
30893|  18.2k|        if (i != argn - 1) {
  ------------------
  |  Branch (30893:13): [True: 10.0k, False: 8.22k]
  ------------------
30894|  10.0k|            subopts.flags = JANET_FOPTS_DROP;
  ------------------
  |  | 1093|  10.0k|#define JANET_FOPTS_DROP 0x40000
  ------------------
30895|  10.0k|        } else {
30896|  8.22k|            subopts = opts;
30897|  8.22k|            subopts.flags &= ~JANET_FOPTS_ACCEPT_SPLICE;
  ------------------
  |  | 1094|  8.22k|#define JANET_FOPTS_ACCEPT_SPLICE 0x80000
  ------------------
30898|  8.22k|        }
30899|  18.2k|        ret = janetc_value(subopts, argv[i]);
30900|  18.2k|        if (i != argn - 1) {
  ------------------
  |  Branch (30900:13): [True: 10.0k, False: 8.22k]
  ------------------
30901|  10.0k|            janetc_freeslot(c, ret);
30902|  10.0k|        }
30903|  18.2k|    }
30904|  8.24k|    janetc_popscope_keepslot(c, ret);
30905|  8.24k|    return ret;
30906|  8.24k|}
janet.c:janetc_fn:
31139|   476k|static JanetSlot janetc_fn(JanetFopts opts, int32_t argn, const Janet *argv) {
31140|   476k|    JanetCompiler *c = opts.compiler;
31141|   476k|    JanetFuncDef *def;
31142|   476k|    JanetSlot ret;
31143|   476k|    Janet head;
31144|   476k|    JanetScope fnscope;
31145|   476k|    int32_t paramcount, argi, parami, arity, min_arity = 0, max_arity, defindex, i;
31146|   476k|    JanetFopts subopts = janetc_fopts_default(c);
31147|   476k|    const Janet *params;
31148|   476k|    const char *errmsg = NULL;
31149|       |
31150|       |    /* Function flags */
31151|   476k|    int vararg = 0;
31152|   476k|    int structarg = 0;
31153|   476k|    int allow_extra = 0;
31154|   476k|    int selfref = 0;
31155|   476k|    int hasname = 0;
31156|   476k|    int seenamp = 0;
31157|   476k|    int seenopt = 0;
31158|   476k|    int namedargs = 0;
31159|       |
31160|       |    /* Begin function */
31161|   476k|    c->scope->flags |= JANET_SCOPE_CLOSURE;
  ------------------
  |  | 1007|   476k|#define JANET_SCOPE_CLOSURE 16
  ------------------
31162|   476k|    janetc_scope(&fnscope, c, JANET_SCOPE_FUNCTION, "function");
  ------------------
  |  | 1003|   476k|#define JANET_SCOPE_FUNCTION 1
  ------------------
31163|       |
31164|   476k|    if (argn == 0) {
  ------------------
  |  Branch (31164:9): [True: 0, False: 476k]
  ------------------
31165|      0|        errmsg = "expected at least 1 argument to function literal";
31166|      0|        goto error;
31167|      0|    }
31168|       |
31169|       |    /* Read function parameters */
31170|   476k|    parami = 0;
31171|   476k|    head = argv[0];
31172|   476k|    if (janet_checktype(head, JANET_SYMBOL)) {
  ------------------
  |  |  801|   476k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 378, False: 476k]
  |  |  |  Branch (801:6): [Folded, False: 476k]
  |  |  ------------------
  |  |  802|   476k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   476k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   476k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   476k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   476k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   476k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31173|    378|        selfref = 1;
31174|    378|        hasname = 1;
31175|    378|        parami = 1;
31176|   476k|    } else if (janet_checktype(head, JANET_KEYWORD)) {
  ------------------
  |  |  801|   476k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 476k, False: 420]
  |  |  |  Branch (801:6): [Folded, False: 476k]
  |  |  ------------------
  |  |  802|   476k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   476k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   476k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   476k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   476k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   476k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31177|   476k|        hasname = 1;
31178|   476k|        parami = 1;
31179|   476k|    }
31180|   476k|    if (parami >= argn || !janet_checktype(argv[parami], JANET_TUPLE)) {
  ------------------
  |  |  801|   476k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 476k]
  |  |  ------------------
  |  |  802|   476k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   476k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   476k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   476k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   476k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   476k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (31180:9): [True: 0, False: 476k]
  |  Branch (31180:27): [True: 12, False: 476k]
  ------------------
31181|     12|        errmsg = "expected function parameters";
31182|     12|        goto error;
31183|     12|    }
31184|       |
31185|       |    /* Keep track of destructured parameters */
31186|   476k|    JanetSlot *destructed_params = NULL;
31187|   476k|    JanetSlot *named_params = NULL;
31188|   476k|    JanetTable *named_table = NULL;
31189|   476k|    JanetSlot named_slot;
31190|       |
31191|       |    /* Compile function parameters */
31192|   476k|    params = janet_unwrap_tuple(argv[parami]);
  ------------------
  |  |  853|   476k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
31193|   476k|    paramcount = janet_tuple_length(params);
  ------------------
  |  | 1792|   476k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|   476k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
31194|   476k|    arity = paramcount;
31195|  5.49M|    for (i = 0; i < paramcount; i++) {
  ------------------
  |  Branch (31195:17): [True: 5.01M, False: 476k]
  ------------------
31196|  5.01M|        Janet param = params[i];
31197|  5.01M|        if (namedargs) {
  ------------------
  |  Branch (31197:13): [True: 0, False: 5.01M]
  ------------------
31198|      0|            arity--;
31199|      0|            if (!janet_checktype(param, JANET_SYMBOL)) {
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (31199:17): [True: 0, False: 0]
  ------------------
31200|      0|                errmsg = "only named arguments can follow &named";
31201|      0|                goto error;
31202|      0|            }
31203|      0|            Janet key = janet_wrap_keyword(janet_unwrap_symbol(param));
  ------------------
  |  |  845|      0|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  ------------------
  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31204|      0|            janet_table_put(named_table, key, param);
31205|      0|            janet_v_push(named_params, janetc_farslot(c));
  ------------------
  |  |  706|      0|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|      0|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|      0|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|      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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|      0|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (717:50): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|      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))
  |  |  ------------------
  |  |  |  |  715|      0|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31206|  5.01M|        } else if (janet_checktype(param, JANET_SYMBOL)) {
  ------------------
  |  |  801|  5.01M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 5.00M, False: 13.8k]
  |  |  |  Branch (801:6): [Folded, False: 5.01M]
  |  |  ------------------
  |  |  802|  5.01M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  5.01M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  5.01M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  5.01M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  5.01M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  5.01M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31207|       |            /* Check for varargs and unfixed arity */
31208|  5.00M|            const uint8_t *sym = janet_unwrap_symbol(param);
  ------------------
  |  |  859|  5.00M|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
31209|  5.00M|            if (sym[0] == '&') {
  ------------------
  |  Branch (31209:17): [True: 81, False: 5.00M]
  ------------------
31210|     81|                if (!janet_cstrcmp(sym, "&")) {
  ------------------
  |  Branch (31210:21): [True: 37, False: 44]
  ------------------
31211|     37|                    if (seenamp) {
  ------------------
  |  Branch (31211:25): [True: 0, False: 37]
  ------------------
31212|      0|                        errmsg = "& in unexpected location";
31213|      0|                        goto error;
31214|     37|                    } else if (i == paramcount - 1) {
  ------------------
  |  Branch (31214:32): [True: 6, False: 31]
  ------------------
31215|      6|                        allow_extra = 1;
31216|      6|                        arity--;
31217|     31|                    } else if (i == paramcount - 2) {
  ------------------
  |  Branch (31217:32): [True: 29, False: 2]
  ------------------
31218|     29|                        vararg = 1;
31219|     29|                        arity -= 2;
31220|     29|                    } else {
31221|      2|                        errmsg = "& in unexpected location";
31222|      2|                        goto error;
31223|      2|                    }
31224|     35|                    seenamp = 1;
31225|     44|                } else if (!janet_cstrcmp(sym, "&opt")) {
  ------------------
  |  Branch (31225:28): [True: 1, False: 43]
  ------------------
31226|      1|                    if (seenopt) {
  ------------------
  |  Branch (31226:25): [True: 0, False: 1]
  ------------------
31227|      0|                        errmsg = "only one &opt allowed";
31228|      0|                        goto error;
31229|      1|                    } else if (i == paramcount - 1) {
  ------------------
  |  Branch (31229:32): [True: 1, False: 0]
  ------------------
31230|      1|                        errmsg = "&opt cannot be last item in parameter list";
31231|      1|                        goto error;
31232|      1|                    }
31233|      0|                    min_arity = i;
31234|      0|                    arity--;
31235|      0|                    seenopt = 1;
31236|     43|                } else if (!janet_cstrcmp(sym, "&keys")) {
  ------------------
  |  Branch (31236:28): [True: 0, False: 43]
  ------------------
31237|      0|                    if (seenamp) {
  ------------------
  |  Branch (31237:25): [True: 0, False: 0]
  ------------------
31238|      0|                        errmsg = "&keys in unexpected location";
31239|      0|                        goto error;
31240|      0|                    } else if (i == paramcount - 2) {
  ------------------
  |  Branch (31240:32): [True: 0, False: 0]
  ------------------
31241|      0|                        vararg = 1;
31242|      0|                        structarg = 1;
31243|      0|                        arity -= 2;
31244|      0|                    } else {
31245|      0|                        errmsg = "&keys in unexpected location";
31246|      0|                        goto error;
31247|      0|                    }
31248|      0|                    seenamp = 1;
31249|     43|                } else if (!janet_cstrcmp(sym, "&named")) {
  ------------------
  |  Branch (31249:28): [True: 0, False: 43]
  ------------------
31250|      0|                    if (seenamp) {
  ------------------
  |  Branch (31250:25): [True: 0, False: 0]
  ------------------
31251|      0|                        errmsg = "&named in unexpected location";
31252|      0|                        goto error;
31253|      0|                    }
31254|      0|                    vararg = 1;
31255|      0|                    structarg = 1;
31256|      0|                    arity--;
31257|      0|                    seenamp = 1;
31258|      0|                    namedargs = 1;
31259|      0|                    named_table = janet_table(10);
31260|      0|                    named_slot = janetc_farslot(c);
31261|     43|                } else {
31262|     43|                    janetc_nameslot(c, sym, janetc_farslot(c), 0);
31263|     43|                }
31264|  5.00M|            } else {
31265|  5.00M|                janetc_nameslot(c, sym, janetc_farslot(c), 0);
31266|  5.00M|            }
31267|  5.00M|        } else {
31268|  13.8k|            janet_v_push(destructed_params, janetc_farslot(c));
  ------------------
  |  |  706|  13.8k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  13.8k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  13.8k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  13.3k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  13.3k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  13.3k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 456, False: 13.3k]
  |  |  |  |  |  |  |  Branch (717:50): [True: 1.02k, False: 12.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  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))
  |  |  ------------------
  |  |  |  |  715|  13.8k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  13.8k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31269|  13.8k|        }
31270|  5.01M|    }
31271|       |
31272|       |    /* Compile named arguments */
31273|   476k|    if (namedargs) {
  ------------------
  |  Branch (31273:9): [True: 0, False: 476k]
  ------------------
31274|      0|        Janet param = janet_wrap_table(named_table);
  ------------------
  |  |  841|      0|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|      0|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31275|      0|        destructure(c, param, named_slot, defleaf, NULL);
31276|      0|        janetc_freeslot(c, named_slot);
31277|      0|        janet_v_free(named_params);
  ------------------
  |  |  705|      0|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  713|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (705:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
31278|      0|    }
31279|       |
31280|       |    /* Compile destructed params */
31281|   476k|    int32_t j = 0;
31282|  5.49M|    for (i = 0; i < paramcount; i++) {
  ------------------
  |  Branch (31282:17): [True: 5.01M, False: 476k]
  ------------------
31283|  5.01M|        Janet param = params[i];
31284|  5.01M|        if (!janet_checktype(param, JANET_SYMBOL)) {
  ------------------
  |  |  801|  5.01M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 5.01M]
  |  |  ------------------
  |  |  802|  5.01M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  5.01M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  5.01M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  5.01M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  5.01M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  5.01M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (31284:13): [True: 13.7k, False: 5.00M]
  ------------------
31285|  13.7k|            janet_assert(janet_v_count(destructed_params) > j, "out of bounds");
  ------------------
  |  |  386|  13.7k|#define janet_assert(c, m) do { \
  |  |  387|  27.5k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 13.7k]
  |  |  |  Branch (387:11): [True: 13.7k, False: 0]
  |  |  ------------------
  |  |  388|  13.7k|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 13.7k]
  |  |  ------------------
  ------------------
31286|  13.7k|            JanetSlot reg = destructed_params[j++];
31287|  13.7k|            destructure(c, param, reg, defleaf, NULL);
31288|  13.7k|            janetc_freeslot(c, reg);
31289|  13.7k|        }
31290|  5.01M|    }
31291|   476k|    janet_v_free(destructed_params);
  ------------------
  |  |  705|   476k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  713|    454|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (705:34): [True: 454, False: 476k]
  |  |  ------------------
  ------------------
31292|       |
31293|   476k|    max_arity = (vararg || allow_extra) ? INT32_MAX : arity;
  ------------------
  |  Branch (31293:18): [True: 29, False: 476k]
  |  Branch (31293:28): [True: 6, False: 476k]
  ------------------
31294|   476k|    if (!seenopt) min_arity = arity;
  ------------------
  |  Branch (31294:9): [True: 476k, False: 0]
  ------------------
31295|       |
31296|       |    /* Check for self ref (also avoid if arguments shadow own name) */
31297|   476k|    if (selfref) {
  ------------------
  |  Branch (31297:9): [True: 374, False: 476k]
  ------------------
31298|       |        /* Check if the parameters shadow the function name. If so, don't
31299|       |         * emit JOP_LOAD_SELF and add a binding since that most users
31300|       |         * seem to expect that function parameters take precedence over the
31301|       |         * function name */
31302|    374|        const uint8_t *sym = janet_unwrap_symbol(head);
  ------------------
  |  |  859|    374|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
31303|    374|        int32_t len = janet_v_count(c->scope->syms);
  ------------------
  |  |  708|    374|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|    327|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|    327|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 327, False: 47]
  |  |  ------------------
  ------------------
31304|    374|        int found = 0;
31305|   116k|        for (int32_t i = 0; i < len; i++) {
  ------------------
  |  Branch (31305:29): [True: 116k, False: 374]
  ------------------
31306|   116k|            if (c->scope->syms[i].sym == sym) {
  ------------------
  |  Branch (31306:17): [True: 1.47k, False: 114k]
  ------------------
31307|  1.47k|                found = 1;
31308|  1.47k|            }
31309|   116k|        }
31310|    374|        if (!found) {
  ------------------
  |  Branch (31310:13): [True: 220, False: 154]
  ------------------
31311|    220|            JanetSlot slot = janetc_farslot(c);
31312|    220|            slot.flags = JANET_SLOT_NAMED | JANET_FUNCTION;
  ------------------
  |  |  984|    220|#define JANET_SLOT_NAMED 0x20000
  ------------------
31313|    220|            janetc_emit_s(c, JOP_LOAD_SELF, slot, 1);
31314|       |            /* We should figure out a better way to avoid `(def x 1) (def x :shadow (fn x [...] ...))` triggering a
31315|       |             * shadow lint for the last x */
31316|    220|            janetc_nameslot(c, sym, slot, JANET_DEFFLAG_NO_UNUSED | JANET_DEFFLAG_NO_SHADOWCHECK);
  ------------------
  |  | 1127|    220|#define JANET_DEFFLAG_NO_UNUSED 2
  ------------------
                          janetc_nameslot(c, sym, slot, JANET_DEFFLAG_NO_UNUSED | JANET_DEFFLAG_NO_SHADOWCHECK);
  ------------------
  |  | 1126|    220|#define JANET_DEFFLAG_NO_SHADOWCHECK 1
  ------------------
31317|    220|        }
31318|    374|    }
31319|       |
31320|       |    /* Compile function body */
31321|   476k|    if (parami + 1 == argn) {
  ------------------
  |  Branch (31321:9): [True: 221, False: 476k]
  ------------------
31322|    221|        janetc_emit(c, JOP_RETURN_NIL);
31323|   476k|    } else {
31324|   977k|        for (argi = parami + 1; argi < argn; argi++) {
  ------------------
  |  Branch (31324:33): [True: 511k, False: 465k]
  ------------------
31325|   511k|            subopts.flags = (argi == (argn - 1)) ? JANET_FOPTS_TAIL : JANET_FOPTS_DROP;
  ------------------
  |  | 1091|   476k|#define JANET_FOPTS_TAIL 0x10000
  ------------------
                          subopts.flags = (argi == (argn - 1)) ? JANET_FOPTS_TAIL : JANET_FOPTS_DROP;
  ------------------
  |  | 1093|   546k|#define JANET_FOPTS_DROP 0x40000
  ------------------
  |  Branch (31325:29): [True: 476k, False: 35.0k]
  ------------------
31326|   511k|            janetc_value(subopts, argv[argi]);
31327|   511k|            if (c->result.status == JANET_COMPILE_ERROR)
  ------------------
  |  Branch (31327:17): [True: 11.0k, False: 500k]
  ------------------
31328|  11.0k|                goto error2;
31329|   511k|        }
31330|   476k|    }
31331|       |
31332|       |    /* Build function */
31333|   465k|    def = janetc_pop_funcdef(c);
31334|   465k|    def->arity = arity;
31335|   465k|    def->min_arity = min_arity;
31336|   465k|    def->max_arity = max_arity;
31337|   465k|    if (named_table != NULL) {
  ------------------
  |  Branch (31337:9): [True: 0, False: 465k]
  ------------------
31338|      0|        def->named_args_count = named_table->count;
31339|      0|    }
31340|   465k|    if (vararg) def->flags |= JANET_FUNCDEF_FLAG_VARARG;
  ------------------
  |  | 1088|     13|#define JANET_FUNCDEF_FLAG_VARARG 0x10000
  ------------------
  |  Branch (31340:9): [True: 13, False: 465k]
  ------------------
31341|   465k|    if (structarg) def->flags |= JANET_FUNCDEF_FLAG_STRUCTARG;
  ------------------
  |  | 1096|      0|#define JANET_FUNCDEF_FLAG_STRUCTARG 0x1000000
  ------------------
  |  Branch (31341:9): [True: 0, False: 465k]
  ------------------
31342|   465k|    if (namedargs) def->flags |= JANET_FUNCDEF_FLAG_NAMEDARGS;
  ------------------
  |  | 1098|      0|#define JANET_FUNCDEF_FLAG_NAMEDARGS 0x4000000
  ------------------
  |  Branch (31342:9): [True: 0, False: 465k]
  ------------------
31343|       |
31344|   465k|    if (hasname) def->name = janet_unwrap_symbol(head); /* Also correctly unwraps keyword */
  ------------------
  |  |  859|   465k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
  |  Branch (31344:9): [True: 465k, False: 210]
  ------------------
31345|   465k|    janet_def_addflags(def);
31346|   465k|    defindex = janetc_addfuncdef(c, def);
31347|       |
31348|       |    /* Ensure enough slots for vararg function. */
31349|   465k|    if (arity + vararg > def->slotcount) def->slotcount = arity + vararg;
  ------------------
  |  Branch (31349:9): [True: 0, False: 465k]
  ------------------
31350|       |
31351|       |    /* Instantiate closure */
31352|   465k|    ret = janetc_gettarget(opts);
31353|   465k|    janetc_emit_su(c, JOP_CLOSURE, ret, defindex, 1);
31354|   465k|    return ret;
31355|       |
31356|     15|error:
31357|     15|    janetc_cerror(c, errmsg);
31358|  11.0k|error2:
31359|  11.0k|    janetc_popscope(c);
31360|  11.0k|    return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|  11.0k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  11.0k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  11.0k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  11.0k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31361|     15|}
janet.c:janetc_addfuncdef:
30931|   466k|static int32_t janetc_addfuncdef(JanetCompiler *c, JanetFuncDef *def) {
30932|   466k|    JanetScope *scope = c->scope;
30933|  1.96M|    while (scope) {
  ------------------
  |  Branch (30933:12): [True: 1.96M, False: 0]
  ------------------
30934|  1.96M|        if (scope->flags & JANET_SCOPE_FUNCTION)
  ------------------
  |  | 1003|  1.96M|#define JANET_SCOPE_FUNCTION 1
  ------------------
  |  Branch (30934:13): [True: 466k, False: 1.49M]
  ------------------
30935|   466k|            break;
30936|  1.49M|        scope = scope->parent;
30937|  1.49M|    }
30938|   466k|    janet_assert(scope, "could not add funcdef");
  ------------------
  |  |  386|   466k|#define janet_assert(c, m) do { \
  |  |  387|   466k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 466k]
  |  |  ------------------
  |  |  388|   466k|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 466k]
  |  |  ------------------
  ------------------
30939|   466k|    janet_v_push(scope->defs, def);
  ------------------
  |  |  706|   466k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|   466k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|   466k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|   102k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|   102k|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|   102k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|   102k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 364k, False: 102k]
  |  |  |  |  |  |  |  Branch (717:50): [True: 9.07k, False: 93.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|   373k|#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))
  |  |  ------------------
  |  |  |  |  715|   466k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|   466k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30940|       |    return janet_v_count(scope->defs) - 1;
  ------------------
  |  |  708|   466k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|   466k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|   466k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 466k, False: 0]
  |  |  ------------------
  ------------------
30941|   466k|}
janet.c:janetc_if:
30779|  6.76k|static JanetSlot janetc_if(JanetFopts opts, int32_t argn, const Janet *argv) {
30780|  6.76k|    JanetCompiler *c = opts.compiler;
30781|  6.76k|    int32_t labelr, labeljr, labeld, labeljd;
30782|  6.76k|    JanetFopts condopts, bodyopts;
30783|  6.76k|    JanetSlot cond, left, right, target;
30784|  6.76k|    Janet truebody, falsebody;
30785|  6.76k|    JanetScope condscope, tempscope;
30786|  6.76k|    const int tail = opts.flags & JANET_FOPTS_TAIL;
  ------------------
  |  | 1091|  6.76k|#define JANET_FOPTS_TAIL 0x10000
  ------------------
30787|  6.76k|    const int drop = opts.flags & JANET_FOPTS_DROP;
  ------------------
  |  | 1093|  6.76k|#define JANET_FOPTS_DROP 0x40000
  ------------------
30788|  6.76k|    uint8_t ifnjmp = JOP_JUMP_IF_NOT;
30789|       |
30790|  6.76k|    if (argn < 2 || argn > 3) {
  ------------------
  |  Branch (30790:9): [True: 0, False: 6.76k]
  |  Branch (30790:21): [True: 0, False: 6.76k]
  ------------------
30791|      0|        janetc_cerror(c, "expected 2 or 3 arguments to if");
30792|      0|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30793|      0|    }
30794|       |
30795|       |    /* Get the bodies of the if expression */
30796|  6.76k|    truebody = argv[1];
30797|  6.76k|    falsebody = argn > 2 ? argv[2] : janet_wrap_nil();
  ------------------
  |  |  826|     47|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  6.81k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     47|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     47|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30797:17): [True: 6.71k, False: 47]
  ------------------
30798|       |
30799|       |    /* Get options */
30800|  6.76k|    condopts = janetc_fopts_default(c);
30801|  6.76k|    bodyopts = opts;
30802|  6.76k|    bodyopts.flags &= ~JANET_FOPTS_ACCEPT_SPLICE;
  ------------------
  |  | 1094|  6.76k|#define JANET_FOPTS_ACCEPT_SPLICE 0x80000
  ------------------
30803|       |
30804|       |    /* Set target for compilation */
30805|  6.76k|    target = (drop || tail)
  ------------------
  |  Branch (30805:15): [True: 29, False: 6.73k]
  |  Branch (30805:23): [True: 5.28k, False: 1.44k]
  ------------------
30806|  6.76k|             ? janetc_cslot(janet_wrap_nil())
  ------------------
  |  |  826|  5.31k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  5.31k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  5.31k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  5.31k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30807|  6.76k|             : janetc_gettarget(opts);
30808|       |
30809|       |    /* Compile condition */
30810|  6.76k|    janetc_scope(&condscope, c, 0, "if");
30811|       |
30812|  6.76k|    Janet condform = argv[0];
30813|  6.76k|    if (janetc_check_nil_form(condform, &condform, JANET_FUN_EQ)) {
  ------------------
  |  |  962|  6.76k|#define JANET_FUN_EQ 24
  ------------------
  |  Branch (30813:9): [True: 0, False: 6.76k]
  ------------------
30814|      0|        ifnjmp = JOP_JUMP_IF_NOT_NIL;
30815|  6.76k|    } else if (janetc_check_nil_form(condform, &condform, JANET_FUN_NEQ)) {
  ------------------
  |  |  963|  6.76k|#define JANET_FUN_NEQ 25
  ------------------
  |  Branch (30815:16): [True: 0, False: 6.76k]
  ------------------
30816|      0|        ifnjmp = JOP_JUMP_IF_NIL;
30817|      0|    }
30818|       |
30819|  6.76k|    cond = janetc_value(condopts, condform);
30820|       |
30821|       |    /* Check constant condition. */
30822|       |    /* TODO: Use type info for more short circuits */
30823|  6.76k|    if (cond.flags & JANET_SLOT_CONSTANT) {
  ------------------
  |  |  983|  6.76k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (30823:9): [True: 747, False: 6.01k]
  ------------------
30824|    747|        int swap_condition = 0;
30825|    747|        if (ifnjmp == JOP_JUMP_IF_NOT && !janet_truthy(cond.constant)) swap_condition = 1;
  ------------------
  |  |  813|    747|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|  1.49k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 747]
  |  |  |  |  ------------------
  |  |  |  |  802|  1.49k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|  1.49k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|    747|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|    747|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|    747|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|    747|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 671, False: 76]
  |  |  ------------------
  |  |  814|    747|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|  1.34k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 671]
  |  |  |  |  ------------------
  |  |  |  |  802|  1.34k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|  1.34k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|    671|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|    671|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|    671|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|    671|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 571, False: 100]
  |  |  |  Branch (814:47): [True: 89, False: 11]
  |  |  ------------------
  ------------------
  |  Branch (30825:13): [True: 747, False: 0]
  ------------------
30826|    747|        if (ifnjmp == JOP_JUMP_IF_NIL && janet_checktype(cond.constant, JANET_NIL)) swap_condition = 1;
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 0]
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30826:13): [True: 0, False: 747]
  ------------------
30827|    747|        if (ifnjmp == JOP_JUMP_IF_NOT_NIL && !janet_checktype(cond.constant, JANET_NIL)) swap_condition = 1;
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30827:13): [True: 0, False: 747]
  |  Branch (30827:46): [True: 0, False: 0]
  ------------------
30828|    747|        if (swap_condition) {
  ------------------
  |  Branch (30828:13): [True: 87, False: 660]
  ------------------
30829|       |            /* Swap the true and false bodies */
30830|     87|            Janet temp = falsebody;
30831|     87|            falsebody = truebody;
30832|     87|            truebody = temp;
30833|     87|        }
30834|    747|        janetc_scope(&tempscope, c, 0, "if-true");
30835|    747|        right = janetc_value(bodyopts, truebody);
30836|    747|        if (!drop && !tail) janetc_copy(c, target, right);
  ------------------
  |  Branch (30836:13): [True: 738, False: 9]
  |  Branch (30836:22): [True: 221, False: 517]
  ------------------
30837|    747|        janetc_popscope(c);
30838|    747|        if (!janet_checktype(falsebody, JANET_NIL)) {
  ------------------
  |  |  801|    747|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 747]
  |  |  ------------------
  |  |  802|    747|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|    747|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|    747|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|    747|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    747|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    747|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30838:13): [True: 712, False: 35]
  ------------------
30839|    712|            janetc_throwaway(bodyopts, falsebody);
30840|    712|        }
30841|    747|        janetc_popscope(c);
30842|    747|        return target;
30843|    747|    }
30844|       |
30845|       |    /* Compile jump to right */
30846|  6.01k|    labeljr = janetc_emit_si(c, ifnjmp, cond, 0, 0);
30847|       |
30848|       |    /* Condition left body */
30849|  6.01k|    janetc_scope(&tempscope, c, 0, "if-true");
30850|  6.01k|    left = janetc_value(bodyopts, truebody);
30851|  6.01k|    if (!drop && !tail) janetc_copy(c, target, left);
  ------------------
  |  Branch (30851:9): [True: 5.99k, False: 20]
  |  Branch (30851:18): [True: 1.22k, False: 4.77k]
  ------------------
30852|  6.01k|    janetc_popscope(c);
30853|       |
30854|       |    /* Compile jump to done */
30855|  6.01k|    labeljd = janet_v_count(c->buffer);
  ------------------
  |  |  708|  6.01k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  6.01k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  6.01k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 6.01k, False: 0]
  |  |  ------------------
  ------------------
30856|  6.01k|    if (!tail && !(drop && janet_checktype(falsebody, JANET_NIL))) janetc_emit(c, JOP_JUMP);
  ------------------
  |  |  801|     20|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 3, False: 17]
  |  |  |  Branch (801:6): [Folded, False: 20]
  |  |  ------------------
  |  |  802|     20|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|     20|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|     20|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|     20|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     20|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     20|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30856:9): [True: 1.24k, False: 4.77k]
  |  Branch (30856:20): [True: 20, False: 1.22k]
  ------------------
30857|       |
30858|       |    /* Compile right body */
30859|  6.01k|    labelr = janet_v_count(c->buffer);
  ------------------
  |  |  708|  6.01k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  6.01k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  6.01k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 6.01k, False: 0]
  |  |  ------------------
  ------------------
30860|  6.01k|    janetc_scope(&tempscope, c, 0, "if-false");
30861|  6.01k|    right = janetc_value(bodyopts, falsebody);
30862|  6.01k|    if (!drop && !tail) janetc_copy(c, target, right);
  ------------------
  |  Branch (30862:9): [True: 5.99k, False: 20]
  |  Branch (30862:18): [True: 1.22k, False: 4.77k]
  ------------------
30863|  6.01k|    janetc_popscope(c);
30864|       |
30865|       |    /* Pop main scope */
30866|  6.01k|    janetc_popscope(c);
30867|       |
30868|       |    /* Write jumps - only add jump lengths if jump actually emitted */
30869|  6.01k|    labeld = janet_v_count(c->buffer);
  ------------------
  |  |  708|  6.01k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  6.01k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  6.01k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 6.01k, False: 0]
  |  |  ------------------
  ------------------
30870|  6.01k|    if (labeljr < labeld) {
  ------------------
  |  Branch (30870:9): [True: 6.01k, False: 0]
  ------------------
30871|  6.01k|        check_16bit_jump(c, labeljr, labelr);
30872|  6.01k|        c->buffer[labeljr] |= (uint32_t) (labelr - labeljr) << 16;
30873|  6.01k|        if (!tail && labeljd < labeld) {
  ------------------
  |  Branch (30873:13): [True: 1.24k, False: 4.77k]
  |  Branch (30873:22): [True: 1.24k, False: 3]
  ------------------
30874|  1.24k|            check_24bit_jump(c, labeljd, labeld);
30875|  1.24k|            c->buffer[labeljd] |= (uint32_t) (labeld - labeljd) << 8;
30876|  1.24k|        }
30877|  6.01k|    }
30878|       |
30879|  6.01k|    if (tail) target.flags |= JANET_SLOT_RETURNED;
  ------------------
  |  |  987|  4.77k|#define JANET_SLOT_RETURNED 0x100000
  ------------------
  |  Branch (30879:9): [True: 4.77k, False: 1.24k]
  ------------------
30880|  6.01k|    return target;
30881|  6.76k|}
janet.c:janetc_check_nil_form:
30749|  16.9k|static int janetc_check_nil_form(Janet x, Janet *capture, uint32_t fun_tag) {
30750|  16.9k|    if (!janet_checktype(x, JANET_TUPLE)) return 0;
  ------------------
  |  |  801|  16.9k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 16.9k]
  |  |  ------------------
  |  |  802|  16.9k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  16.9k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  16.9k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  16.9k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  16.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  16.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30750:9): [True: 11.4k, False: 5.53k]
  ------------------
30751|  5.53k|    JanetTuple tup = janet_unwrap_tuple(x);
  ------------------
  |  |  853|  5.53k|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
30752|  5.53k|    if (3 != janet_tuple_length(tup)) return 0;
  ------------------
  |  | 1792|  5.53k|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|  5.53k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (30752:9): [True: 2.45k, False: 3.07k]
  ------------------
30753|  3.07k|    Janet op1 = tup[0];
30754|  3.07k|    if (!janet_checktype(op1, JANET_FUNCTION)) return 0;
  ------------------
  |  |  801|  3.07k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 3.07k]
  |  |  ------------------
  |  |  802|  3.07k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  3.07k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  3.07k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  3.07k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  3.07k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  3.07k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30754:9): [True: 570, False: 2.50k]
  ------------------
30755|  2.50k|    JanetFunction *fun = janet_unwrap_function(op1);
  ------------------
  |  |  863|  2.50k|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
30756|  2.50k|    uint32_t tag = fun->def->flags & JANET_FUNCDEF_FLAG_TAG;
  ------------------
  |  | 1099|  2.50k|#define JANET_FUNCDEF_FLAG_TAG 0xFFFF
  ------------------
30757|  2.50k|    if (tag != fun_tag) return 0;
  ------------------
  |  Branch (30757:9): [True: 1.25k, False: 1.25k]
  ------------------
30758|  1.25k|    if (janet_checktype(tup[1], JANET_NIL)) {
  ------------------
  |  |  801|  1.25k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 1.24k, False: 4]
  |  |  |  Branch (801:6): [Folded, False: 1.25k]
  |  |  ------------------
  |  |  802|  1.25k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  1.25k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  1.25k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  1.25k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.25k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.25k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30759|  1.24k|        *capture = tup[2];
30760|  1.24k|        return 1;
30761|  1.24k|    } else if (janet_checktype(tup[2], JANET_NIL)) {
  ------------------
  |  |  801|      4|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 4]
  |  |  |  Branch (801:6): [Folded, False: 4]
  |  |  ------------------
  |  |  802|      4|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      4|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      4|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      4|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      4|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      4|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30762|      0|        *capture = tup[1];
30763|      0|        return 1;
30764|      0|    }
30765|      4|    return 0;
30766|  1.25k|}
janet.c:janetc_quasiquote:
30294|   306k|static JanetSlot janetc_quasiquote(JanetFopts opts, int32_t argn, const Janet *argv) {
30295|   306k|    if (argn != 1) {
  ------------------
  |  Branch (30295:9): [True: 5, False: 306k]
  ------------------
30296|      5|        janetc_cerror(opts.compiler, "expected 1 argument to quasiquote");
30297|      5|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|      5|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      5|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      5|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      5|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30298|      5|    }
30299|   306k|    return quasiquote(opts, argv[0], JANET_RECURSION_GUARD, 0);
  ------------------
  |  |  291|   306k|#define JANET_RECURSION_GUARD 1024
  ------------------
30300|   306k|}
janet.c:quasiquote:
30233|  2.71M|static JanetSlot quasiquote(JanetFopts opts, Janet x, int depth, int level) {
30234|  2.71M|    if (depth == 0) {
  ------------------
  |  Branch (30234:9): [True: 37, False: 2.71M]
  ------------------
30235|     37|        janetc_cerror(opts.compiler, "quasiquote too deeply nested");
30236|     37|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|     37|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|     37|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     37|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     37|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30237|     37|    }
30238|  2.71M|    JanetSlot *slots = NULL;
30239|  2.71M|    JanetFopts subopts = opts;
30240|  2.71M|    subopts.flags &= ~JANET_FOPTS_HINT;
  ------------------
  |  | 1092|  2.71M|#define JANET_FOPTS_HINT 0x20000
  ------------------
30241|  2.71M|    switch (janet_type(x)) {
  ------------------
  |  |  790|  2.71M|    (isnan((x).number) \
  |  |  791|  2.71M|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|  2.71M|        : JANET_NUMBER)
  ------------------
  |  Branch (30241:13): [True: 2.70M, False: 9.77k]
  ------------------
30242|  1.63M|        default:
  ------------------
  |  Branch (30242:9): [True: 1.63M, False: 1.07M]
  ------------------
30243|  1.63M|            return janetc_cslot(x);
30244|  1.06M|        case JANET_TUPLE: {
  ------------------
  |  Branch (30244:9): [True: 1.06M, False: 1.64M]
  ------------------
30245|  1.06M|            int32_t i, len;
30246|  1.06M|            const Janet *tup = janet_unwrap_tuple(x);
  ------------------
  |  |  853|  1.06M|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
30247|  1.06M|            len = janet_tuple_length(tup);
  ------------------
  |  | 1792|  1.06M|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|  1.06M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
30248|  1.06M|            if (len > 1 && janet_checktype(tup[0], JANET_SYMBOL)) {
  ------------------
  |  |  801|  1.00M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 999k, False: 1.56k]
  |  |  |  Branch (801:6): [Folded, False: 1.00M]
  |  |  ------------------
  |  |  802|  1.00M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  1.00M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  1.00M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  1.00M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.00M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.00M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (30248:17): [True: 1.00M, False: 65.6k]
  ------------------
30249|   999k|                const uint8_t *head = janet_unwrap_symbol(tup[0]);
  ------------------
  |  |  859|   999k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
30250|   999k|                if (!janet_cstrcmp(head, "unquote")) {
  ------------------
  |  Branch (30250:21): [True: 11.2k, False: 988k]
  ------------------
30251|  11.2k|                    if (level == 0) {
  ------------------
  |  Branch (30251:25): [True: 559, False: 10.6k]
  ------------------
30252|    559|                        JanetFopts subopts = janetc_fopts_default(opts.compiler);
30253|    559|                        subopts.flags |= JANET_FOPTS_ACCEPT_SPLICE;
  ------------------
  |  | 1094|    559|#define JANET_FOPTS_ACCEPT_SPLICE 0x80000
  ------------------
30254|    559|                        return janetc_value(subopts, tup[1]);
30255|  10.6k|                    } else {
30256|  10.6k|                        level--;
30257|  10.6k|                    }
30258|   988k|                } else if (!janet_cstrcmp(head, "quasiquote")) {
  ------------------
  |  Branch (30258:28): [True: 675k, False: 313k]
  ------------------
30259|   675k|                    level++;
30260|   675k|                }
30261|   999k|            }
30262|  3.46M|            for (i = 0; i < len; i++)
  ------------------
  |  Branch (30262:25): [True: 2.39M, False: 1.06M]
  ------------------
30263|  2.39M|                janet_v_push(slots, quasiquote(subopts, tup[i], depth - 1, level));
  ------------------
  |  |  706|  3.46M|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  2.39M|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  2.39M|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  1.39M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  1.39M|#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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  1.39M|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  1.39M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 1.00M, False: 1.39M]
  |  |  |  |  |  |  |  Branch (717:50): [True: 1.13M, False: 259k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  2.13M|#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))
  |  |  ------------------
  |  |  |  |  715|  2.39M|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  2.39M|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30264|  1.06M|            return qq_slots(opts, slots, (janet_tuple_flag(tup) & JANET_TUPLE_FLAG_BRACKETCTOR)
  ------------------
  |  | 1796|  1.06M|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1790|  1.06M|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                          return qq_slots(opts, slots, (janet_tuple_flag(tup) & JANET_TUPLE_FLAG_BRACKETCTOR)
  ------------------
  |  | 1788|  1.06M|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
  |  Branch (30264:42): [True: 65.3k, False: 1.00M]
  ------------------
30265|  1.06M|                            ? JOP_MAKE_BRACKET_TUPLE
30266|  1.06M|                            : JOP_MAKE_TUPLE);
30267|  1.06M|        }
30268|    356|        case JANET_ARRAY: {
  ------------------
  |  Branch (30268:9): [True: 356, False: 2.70M]
  ------------------
30269|    356|            int32_t i;
30270|    356|            JanetArray *array = janet_unwrap_array(x);
  ------------------
  |  |  855|    356|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
30271|  3.73k|            for (i = 0; i < array->count; i++)
  ------------------
  |  Branch (30271:25): [True: 3.37k, False: 356]
  ------------------
30272|  3.37k|                janet_v_push(slots, quasiquote(subopts, array->data[i], depth - 1, level));
  ------------------
  |  |  706|  3.73k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  3.37k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  3.37k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  3.10k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  3.10k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  3.10k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 271, False: 3.10k]
  |  |  |  |  |  |  |  Branch (717:50): [True: 473, False: 2.63k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|    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))
  |  |  ------------------
  |  |  |  |  715|  3.37k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  3.37k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30273|    356|            return qq_slots(opts, slots, JOP_MAKE_ARRAY);
30274|  1.06M|        }
30275|    114|        case JANET_TABLE:
  ------------------
  |  Branch (30275:9): [True: 114, False: 2.71M]
  ------------------
30276|  10.8k|        case JANET_STRUCT: {
  ------------------
  |  Branch (30276:9): [True: 10.7k, False: 2.69M]
  ------------------
30277|  10.8k|            const JanetKV *kv = NULL, *kvs = NULL;
30278|  10.8k|            int32_t len, cap = 0;
30279|  10.8k|            janet_dictionary_view(x, &kvs, &len, &cap);
30280|  12.6k|            while ((kv = janet_dictionary_next(kvs, cap, kv))) {
  ------------------
  |  Branch (30280:20): [True: 1.82k, False: 10.8k]
  ------------------
30281|  1.82k|                JanetSlot key = quasiquote(subopts, kv->key, depth - 1, level);
30282|  1.82k|                JanetSlot value =  quasiquote(subopts, kv->value, depth - 1, level);
30283|  1.82k|                key.flags &= ~JANET_SLOT_SPLICED;
  ------------------
  |  |  991|  1.82k|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
30284|  1.82k|                value.flags &= ~JANET_SLOT_SPLICED;
  ------------------
  |  |  991|  1.82k|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
30285|  1.82k|                janet_v_push(slots, key);
  ------------------
  |  |  706|  1.82k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  1.82k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  1.82k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  1.06k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  1.06k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  1.06k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 755, False: 1.06k]
  |  |  |  |  |  |  |  Branch (717:50): [True: 481, False: 588]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  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))
  |  |  ------------------
  |  |  |  |  715|  1.82k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  1.82k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30286|  1.82k|                janet_v_push(slots, value);
  ------------------
  |  |  706|  1.82k|#define janet_v_push(v, x)      (janet_v__maybegrow(v, 1), (v)[janet_v__cnt(v)++] = (x))
  |  |  ------------------
  |  |  |  |  718|  1.82k|#define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  717|  1.82k|#define janet_v__needgrow(v, n)  ((v) == NULL || janet_v__cnt(v) + (n) >= janet_v__cap(v))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  715|  1.82k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  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))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  714|  1.82k|#define janet_v__cap(v) janet_v__raw(v)[0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  713|  1.82k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (717:35): [True: 0, False: 1.82k]
  |  |  |  |  |  |  |  Branch (717:50): [True: 1.30k, False: 517]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define janet_v__maybegrow(v, n) (janet_v__needgrow((v), (n)) ? janet_v__grow((v), (n)) : 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  719|  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))
  |  |  ------------------
  |  |  |  |  715|  1.82k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  1.82k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30287|  1.82k|            }
30288|  10.8k|            return qq_slots(opts, slots,
30289|  10.8k|                            janet_checktype(x, JANET_TABLE) ? JOP_MAKE_TABLE : JOP_MAKE_STRUCT);
  ------------------
  |  |  801|  10.8k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 114, False: 10.7k]
  |  |  |  Branch (801:6): [Folded, False: 10.8k]
  |  |  ------------------
  |  |  802|  10.8k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  10.8k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  10.8k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  10.8k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  10.8k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  10.8k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30290|    114|        }
30291|  2.71M|    }
30292|  2.71M|}
janet.c:qq_slots:
30225|  1.07M|static JanetSlot qq_slots(JanetFopts opts, JanetSlot *slots, int makeop) {
30226|  1.07M|    JanetSlot target = janetc_gettarget(opts);
30227|  1.07M|    janetc_pushslots(opts.compiler, slots);
30228|  1.07M|    janetc_freeslots(opts.compiler, slots);
30229|  1.07M|    janetc_emit_s(opts.compiler, makeop, target, 1);
30230|  1.07M|    return target;
30231|  1.07M|}
janet.c:janetc_quote:
30202|  29.0k|static JanetSlot janetc_quote(JanetFopts opts, int32_t argn, const Janet *argv) {
30203|  29.0k|    if (argn != 1) {
  ------------------
  |  Branch (30203:9): [True: 1, False: 29.0k]
  ------------------
30204|      1|        janetc_cerror(opts.compiler, "expected 1 argument to quote");
30205|      1|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30206|      1|    }
30207|  29.0k|    return janetc_cslot(argv[0]);
30208|  29.0k|}
janet.c:janetc_varset:
30436|  1.88k|static JanetSlot janetc_varset(JanetFopts opts, int32_t argn, const Janet *argv) {
30437|  1.88k|    if (argn != 2) {
  ------------------
  |  Branch (30437:9): [True: 0, False: 1.88k]
  ------------------
30438|      0|        janetc_cerror(opts.compiler, "expected 2 arguments to set");
30439|      0|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30440|      0|    }
30441|  1.88k|    JanetFopts subopts = janetc_fopts_default(opts.compiler);
30442|  1.88k|    if (janet_checktype(argv[0], JANET_SYMBOL)) {
  ------------------
  |  |  801|  1.88k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 1.86k, False: 18]
  |  |  |  Branch (801:6): [Folded, False: 1.88k]
  |  |  ------------------
  |  |  802|  1.88k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  1.88k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  1.88k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  1.88k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.88k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.88k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30443|       |        /* Normal var - (set a 1) */
30444|  1.86k|        const uint8_t *sym = janet_unwrap_symbol(argv[0]);
  ------------------
  |  |  859|  1.86k|#define janet_unwrap_symbol(x) ((JanetSymbol)janet_nanbox_to_pointer(x))
  ------------------
30445|  1.86k|        JanetSlot dest = janetc_resolve(opts.compiler, sym);
30446|  1.86k|        if (!(dest.flags & JANET_SLOT_MUTABLE)) {
  ------------------
  |  |  985|  1.86k|#define JANET_SLOT_MUTABLE 0x40000
  ------------------
  |  Branch (30446:13): [True: 1, False: 1.86k]
  ------------------
30447|      1|            janetc_cerror(opts.compiler, "cannot set constant");
30448|      1|            return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|      1|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      1|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      1|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      1|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30449|      1|        }
30450|  1.86k|        subopts.flags = JANET_FOPTS_HINT;
  ------------------
  |  | 1092|  1.86k|#define JANET_FOPTS_HINT 0x20000
  ------------------
30451|  1.86k|        subopts.hint = dest;
30452|  1.86k|        JanetSlot ret = janetc_value(subopts, argv[1]);
30453|  1.86k|        janetc_copy(opts.compiler, dest, ret);
30454|  1.86k|        return ret;
30455|  1.86k|    } else if (janet_checktype(argv[0], JANET_TUPLE)) {
  ------------------
  |  |  801|     18|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 18, False: 0]
  |  |  |  Branch (801:6): [Folded, False: 18]
  |  |  ------------------
  |  |  802|     18|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|     18|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|     18|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|     18|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     18|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     18|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30456|       |        /* Set a field (setf behavior) - (set (tab :key) 2) */
30457|     18|        const Janet *tup = janet_unwrap_tuple(argv[0]);
  ------------------
  |  |  853|     18|#define janet_unwrap_tuple(x) ((JanetTuple)janet_nanbox_to_pointer(x))
  ------------------
30458|       |        /* Tuple must have 2 elements */
30459|     18|        if (janet_tuple_length(tup) != 2) {
  ------------------
  |  | 1792|     18|#define janet_tuple_length(t) (janet_tuple_head(t)->length)
  |  |  ------------------
  |  |  |  | 1790|     18|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
  |  Branch (30459:13): [True: 0, False: 18]
  ------------------
30460|      0|            janetc_cerror(opts.compiler, "expected 2 element tuple for l-value to set");
30461|      0|            return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30462|      0|        }
30463|     18|        JanetSlot ds = janetc_value(subopts, tup[0]);
30464|     18|        JanetSlot key = janetc_value(subopts, tup[1]);
30465|       |        /* Can't be tail position because we will emit a PUT instruction afterwards */
30466|       |        /* Also can't drop either */
30467|     18|        opts.flags &= ~(JANET_FOPTS_TAIL | JANET_FOPTS_DROP);
  ------------------
  |  | 1091|     18|#define JANET_FOPTS_TAIL 0x10000
  ------------------
                      opts.flags &= ~(JANET_FOPTS_TAIL | JANET_FOPTS_DROP);
  ------------------
  |  | 1093|     18|#define JANET_FOPTS_DROP 0x40000
  ------------------
30468|     18|        JanetSlot rvalue = janetc_value(opts, argv[1]);
30469|       |        /* Emit the PUT instruction */
30470|     18|        janetc_emit_sss(opts.compiler, JOP_PUT, ds, key, rvalue, 0);
30471|     18|        return rvalue;
30472|     18|    } else {
30473|       |        /* Error */
30474|      0|        janetc_cerror(opts.compiler, "expected symbol or tuple for l-value to set");
30475|      0|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30476|      0|    }
30477|  1.88k|}
janet.c:janetc_splice:
30210|  4.86k|static JanetSlot janetc_splice(JanetFopts opts, int32_t argn, const Janet *argv) {
30211|  4.86k|    JanetSlot ret;
30212|  4.86k|    if (!(opts.flags & JANET_FOPTS_ACCEPT_SPLICE)) {
  ------------------
  |  | 1094|  4.86k|#define JANET_FOPTS_ACCEPT_SPLICE 0x80000
  ------------------
  |  Branch (30212:9): [True: 35, False: 4.83k]
  ------------------
30213|     35|        janetc_cerror(opts.compiler, "splice can only be used in function parameters and data constructors, it has no effect here");
30214|     35|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|     35|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|     35|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     35|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     35|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30215|     35|    }
30216|  4.83k|    if (argn != 1) {
  ------------------
  |  Branch (30216:9): [True: 3, False: 4.83k]
  ------------------
30217|      3|        janetc_cerror(opts.compiler, "expected 1 argument to splice");
30218|      3|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|      3|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      3|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      3|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      3|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30219|      3|    }
30220|  4.83k|    ret = janetc_value(opts, argv[0]);
30221|  4.83k|    ret.flags |= JANET_SLOT_SPLICED;
  ------------------
  |  |  991|  4.83k|#define JANET_SLOT_SPLICED 0x1000000
  ------------------
30222|  4.83k|    return ret;
30223|  4.83k|}
janet.c:janetc_unquote:
30302|     50|static JanetSlot janetc_unquote(JanetFopts opts, int32_t argn, const Janet *argv) {
30303|     50|    (void) argn;
30304|     50|    (void) argv;
30305|     50|    janetc_cerror(opts.compiler, "cannot use unquote here");
30306|     50|    return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|     50|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|     50|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     50|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     50|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30307|     50|}
janet.c:janetc_var:
30655|  1.44k|static JanetSlot janetc_var(JanetFopts opts, int32_t argn, const Janet *argv) {
30656|  1.44k|    JanetCompiler *c = opts.compiler;
30657|  1.44k|    JanetTable *attr_table = handleattr(c, "var", argn, argv);
30658|  1.44k|    if (c->result.status == JANET_COMPILE_ERROR) {
  ------------------
  |  Branch (30658:9): [True: 24, False: 1.42k]
  ------------------
30659|     24|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|     24|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|     24|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     24|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     24|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30660|     24|    }
30661|  1.42k|    check_metadata_lint(c, attr_table);
30662|  1.42k|    SlotHeadPair *into = NULL;
30663|  1.42k|    into = dohead_destructure(c, into, opts, argv[0], argv[argn - 1]);
30664|  1.42k|    if (c->result.status == JANET_COMPILE_ERROR) {
  ------------------
  |  Branch (30664:9): [True: 0, False: 1.42k]
  ------------------
30665|      0|        janet_v_free(into);
  ------------------
  |  |  705|      0|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  713|      0|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (705:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
30666|      0|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30667|      0|    }
30668|  1.42k|    JanetSlot ret;
30669|  1.42k|    janet_assert(janet_v_count(into) > 0, "bad destructure");
  ------------------
  |  |  386|  1.42k|#define janet_assert(c, m) do { \
  |  |  387|  2.84k|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 1.42k]
  |  |  |  Branch (387:11): [True: 1.42k, False: 0]
  |  |  ------------------
  |  |  388|  1.42k|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 1.42k]
  |  |  ------------------
  ------------------
30670|  2.84k|    for (int32_t i = 0; i < janet_v_count(into); i++) {
  ------------------
  |  |  708|  2.84k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  2.84k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  2.84k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 2.84k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (30670:25): [True: 1.42k, False: 1.42k]
  ------------------
30671|  1.42k|        destructure(c, into[i].lhs, into[i].rhs, varleaf, attr_table);
30672|  1.42k|        ret = into[i].rhs;
30673|  1.42k|    }
30674|       |    janet_v_free(into);
  ------------------
  |  |  705|  1.42k|#define janet_v_free(v)         (((v) != NULL) ? (janet_sfree(janet_v__raw(v)), 0) : 0)
  |  |  ------------------
  |  |  |  |  713|  1.42k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  |  |  |  Branch (705:34): [True: 1.42k, False: 0]
  |  |  ------------------
  ------------------
30675|  1.42k|    return ret;
30676|  1.42k|}
janet.c:varleaf:
30611|  16.6k|    JanetTable *reftab) {
30612|  16.6k|    if (c->scope->flags & JANET_SCOPE_TOP) {
  ------------------
  |  | 1005|  16.6k|#define JANET_SCOPE_TOP 4
  ------------------
  |  Branch (30612:9): [True: 3.04k, False: 13.6k]
  ------------------
30613|       |        /* Global var, generate var */
30614|  3.04k|        JanetSlot refslot;
30615|  3.04k|        JanetTable *entry = janet_table_clone(reftab);
30616|       |
30617|  3.04k|        int is_redef = c->is_redef;
30618|       |
30619|  3.04k|        JanetArray *ref;
30620|  3.04k|        JanetBinding old_binding;
30621|  3.04k|        if (is_redef && (old_binding = janet_resolve_ext(c->env, sym),
  ------------------
  |  Branch (30621:13): [True: 0, False: 3.04k]
  |  Branch (30621:25): [True: 0, False: 0]
  ------------------
30622|      0|                         old_binding.type == JANET_BINDING_VAR)) {
30623|      0|            ref = janet_unwrap_array(old_binding.value);
  ------------------
  |  |  855|      0|#define janet_unwrap_array(x) ((JanetArray *)janet_nanbox_to_pointer(x))
  ------------------
30624|  3.04k|        } else {
30625|  3.04k|            ref = janet_array(1);
30626|  3.04k|            janet_array_push(ref, janet_wrap_nil());
  ------------------
  |  |  826|  3.04k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  3.04k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  3.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  3.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30627|  3.04k|        }
30628|       |
30629|  3.04k|        janet_table_put(entry, janet_ckeywordv("ref"), janet_wrap_array(ref));
  ------------------
  |  | 1833|  3.04k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|  3.04k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|  3.04k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  3.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  3.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      janet_table_put(entry, janet_ckeywordv("ref"), janet_wrap_array(ref));
  ------------------
  |  |  840|  3.04k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  820|  3.04k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  3.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  3.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30630|  3.04k|        janet_table_put(entry, janet_ckeywordv("source-map"),
  ------------------
  |  | 1833|  3.04k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|  3.04k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|  3.04k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  3.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  3.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30631|  3.04k|                        janet_wrap_tuple(janetc_make_sourcemap(c)));
  ------------------
  |  |  838|  3.04k|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|  3.04k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  3.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  3.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30632|  3.04k|        janet_table_put(c->env, janet_wrap_symbol(sym), janet_wrap_table(entry));
  ------------------
  |  |  844|  3.04k|#define janet_wrap_symbol(s) janet_nanbox_wrap_c((s), JANET_SYMBOL)
  |  |  ------------------
  |  |  |  |  823|  3.04k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  3.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  3.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      janet_table_put(c->env, janet_wrap_symbol(sym), janet_wrap_table(entry));
  ------------------
  |  |  841|  3.04k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|  3.04k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  3.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  3.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30633|  3.04k|        refslot = janetc_cslot(janet_wrap_array(ref));
  ------------------
  |  |  840|  3.04k|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  820|  3.04k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  3.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  3.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
30634|  3.04k|        janetc_emit_ssu(c, JOP_PUT_INDEX, refslot, s, 0, 0);
30635|  3.04k|        return 1;
30636|  13.6k|    } else {
30637|  13.6k|        int no_unused = reftab && reftab->count && janet_truthy(janet_table_get_keyword(reftab, "unused"));
  ------------------
  |  |  813|  13.7k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|    168|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 84]
  |  |  |  |  ------------------
  |  |  |  |  802|    168|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|    168|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|     84|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|     84|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|     84|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|     84|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 0, False: 84]
  |  |  ------------------
  |  |  814|  13.7k|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 0, False: 0]
  |  |  |  Branch (814:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (30637:25): [True: 13.6k, False: 0]
  |  Branch (30637:35): [True: 84, False: 13.5k]
  ------------------
30638|  13.6k|        int no_shadow = reftab && reftab->count && janet_truthy(janet_table_get_keyword(reftab, "shadow"));
  ------------------
  |  |  813|  13.7k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|    168|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 84]
  |  |  |  |  ------------------
  |  |  |  |  802|    168|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|    168|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|     84|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|     84|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|     84|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|     84|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 0, False: 84]
  |  |  ------------------
  |  |  814|  13.7k|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 0, False: 0]
  |  |  |  Branch (814:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (30638:25): [True: 13.6k, False: 0]
  |  Branch (30638:35): [True: 84, False: 13.5k]
  ------------------
30639|  13.6k|        uint32_t def_flags = 0;
30640|  13.6k|        if (no_unused) def_flags |= JANET_DEFFLAG_NO_UNUSED;
  ------------------
  |  | 1127|      0|#define JANET_DEFFLAG_NO_UNUSED 2
  ------------------
  |  Branch (30640:13): [True: 0, False: 13.6k]
  ------------------
30641|  13.6k|        if (no_shadow) def_flags |= JANET_DEFFLAG_NO_SHADOWCHECK;
  ------------------
  |  | 1126|      0|#define JANET_DEFFLAG_NO_SHADOWCHECK 1
  ------------------
  |  Branch (30641:13): [True: 0, False: 13.6k]
  ------------------
30642|  13.6k|        return namelocal(c, sym, JANET_SLOT_MUTABLE, s, def_flags);
  ------------------
  |  |  985|  13.6k|#define JANET_SLOT_MUTABLE 0x40000
  ------------------
30643|  13.6k|    }
30644|  16.6k|}
janet.c:janetc_while:
31004|  1.72k|static JanetSlot janetc_while(JanetFopts opts, int32_t argn, const Janet *argv) {
31005|  1.72k|    JanetCompiler *c = opts.compiler;
31006|  1.72k|    JanetSlot cond;
31007|  1.72k|    JanetFopts subopts = janetc_fopts_default(c);
31008|  1.72k|    JanetScope tempscope;
31009|  1.72k|    int32_t labelwt, labeld, labeljt, labelc, i;
31010|  1.72k|    int infinite = 0;
31011|  1.72k|    int is_nil_form = 0;
31012|  1.72k|    int is_notnil_form = 0;
31013|  1.72k|    uint8_t ifjmp = JOP_JUMP_IF;
31014|  1.72k|    uint8_t ifnjmp = JOP_JUMP_IF_NOT;
31015|       |
31016|  1.72k|    if (argn < 1) {
  ------------------
  |  Branch (31016:9): [True: 0, False: 1.72k]
  ------------------
31017|      0|        janetc_cerror(c, "expected at least 1 argument to while");
31018|      0|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31019|      0|    }
31020|       |
31021|  1.72k|    labelwt = janet_v_count(c->buffer);
  ------------------
  |  |  708|  1.72k|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|  1.60k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|  1.60k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 1.60k, False: 116]
  |  |  ------------------
  ------------------
31022|       |
31023|  1.72k|    janetc_scope(&tempscope, c, JANET_SCOPE_WHILE, "while");
  ------------------
  |  | 1008|  1.72k|#define JANET_SCOPE_WHILE 32
  ------------------
31024|       |
31025|       |    /* Check for `(= nil _)` or `(not= nil _)` in condition, and if so, use the
31026|       |     * jmpnl or jmpnn instructions. This let's us implement `(each ...)`
31027|       |     * more efficiently. */
31028|  1.72k|    Janet condform = argv[0];
31029|  1.72k|    if (janetc_check_nil_form(condform, &condform, JANET_FUN_EQ)) {
  ------------------
  |  |  962|  1.72k|#define JANET_FUN_EQ 24
  ------------------
  |  Branch (31029:9): [True: 0, False: 1.72k]
  ------------------
31030|      0|        is_nil_form = 1;
31031|      0|        ifjmp = JOP_JUMP_IF_NIL;
31032|      0|        ifnjmp = JOP_JUMP_IF_NOT_NIL;
31033|      0|    }
31034|  1.72k|    if (janetc_check_nil_form(condform, &condform, JANET_FUN_NEQ)) {
  ------------------
  |  |  963|  1.72k|#define JANET_FUN_NEQ 25
  ------------------
  |  Branch (31034:9): [True: 1.24k, False: 476]
  ------------------
31035|  1.24k|        is_notnil_form = 1;
31036|  1.24k|        ifjmp = JOP_JUMP_IF_NOT_NIL;
31037|  1.24k|        ifnjmp = JOP_JUMP_IF_NIL;
31038|  1.24k|    }
31039|       |
31040|       |    /* Compile condition */
31041|  1.72k|    cond = janetc_value(subopts, condform);
31042|       |
31043|       |    /* Check for constant condition */
31044|  1.72k|    if (cond.flags & JANET_SLOT_CONSTANT) {
  ------------------
  |  |  983|  1.72k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (31044:9): [True: 236, False: 1.48k]
  ------------------
31045|       |        /* Loop never executes */
31046|    236|        int never_executes = is_nil_form
  ------------------
  |  Branch (31046:30): [True: 0, False: 236]
  ------------------
31047|    236|                             ? !janet_checktype(cond.constant, JANET_NIL)
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31048|    236|                             : is_notnil_form
  ------------------
  |  Branch (31048:32): [True: 0, False: 236]
  ------------------
31049|    236|                             ? janet_checktype(cond.constant, JANET_NIL)
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31050|    236|                             : !janet_truthy(cond.constant);
  ------------------
  |  |  813|    236|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|    472|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 236]
  |  |  |  |  ------------------
  |  |  |  |  802|    472|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|    472|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|    236|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|    236|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|    236|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|    236|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 211, False: 25]
  |  |  ------------------
  |  |  814|    236|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|    422|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 211]
  |  |  |  |  ------------------
  |  |  |  |  802|    422|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|    422|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|    211|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|    211|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|    211|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|    211|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 211, False: 0]
  |  |  |  Branch (814:47): [True: 0, False: 0]
  |  |  ------------------
  ------------------
31051|    236|        if (never_executes) {
  ------------------
  |  Branch (31051:13): [True: 25, False: 211]
  ------------------
31052|     25|            janetc_popscope(c);
31053|     25|            return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|     25|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|     25|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     25|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     25|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31054|     25|        }
31055|       |        /* Infinite loop */
31056|    211|        infinite = 1;
31057|    211|    }
31058|       |
31059|       |    /* Infinite loop does not need to check condition */
31060|  1.69k|    labelc = infinite
  ------------------
  |  Branch (31060:14): [True: 211, False: 1.48k]
  ------------------
31061|  1.69k|             ? 0
31062|  1.69k|             : janetc_emit_si(c, ifnjmp, cond, 0, 0);
31063|       |
31064|       |    /* Compile body */
31065|  48.6k|    for (i = 1; i < argn; i++) {
  ------------------
  |  Branch (31065:17): [True: 46.9k, False: 1.69k]
  ------------------
31066|  46.9k|        subopts.flags = JANET_FOPTS_DROP;
  ------------------
  |  | 1093|  46.9k|#define JANET_FOPTS_DROP 0x40000
  ------------------
31067|  46.9k|        janetc_freeslot(c, janetc_value(subopts, argv[i]));
31068|  46.9k|    }
31069|       |
31070|       |    /* Check if closure created in while scope. If so,
31071|       |     * recompile in a function scope. */
31072|  1.69k|    if (tempscope.flags & JANET_SCOPE_CLOSURE) {
  ------------------
  |  | 1007|  1.69k|#define JANET_SCOPE_CLOSURE 16
  ------------------
  |  Branch (31072:9): [True: 1.04k, False: 659]
  ------------------
31073|  1.04k|        subopts = janetc_fopts_default(c);
31074|  1.04k|        tempscope.flags |= JANET_SCOPE_UNUSED;
  ------------------
  |  | 1006|  1.04k|#define JANET_SCOPE_UNUSED 8
  ------------------
31075|  1.04k|        janetc_popscope(c);
31076|  1.04k|        if (c->buffer) janet_v__cnt(c->buffer) = labelwt;
  ------------------
  |  |  715|  1.03k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  ------------------
  |  |  |  |  713|  1.03k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
  |  Branch (31076:13): [True: 1.03k, False: 3]
  ------------------
31077|  1.04k|        if (c->mapbuffer) janet_v__cnt(c->mapbuffer) = labelwt;
  ------------------
  |  |  715|  1.03k|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  ------------------
  |  |  |  |  713|  1.03k|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  ------------------
  ------------------
  |  Branch (31077:13): [True: 1.03k, False: 3]
  ------------------
31078|       |
31079|  1.04k|        janetc_scope(&tempscope, c, JANET_SCOPE_FUNCTION, "while-iife");
  ------------------
  |  | 1003|  1.04k|#define JANET_SCOPE_FUNCTION 1
  ------------------
31080|       |
31081|       |        /* Recompile in the function scope */
31082|  1.04k|        cond = janetc_value(subopts, condform);
31083|  1.04k|        if (!(cond.flags & JANET_SLOT_CONSTANT)) {
  ------------------
  |  |  983|  1.04k|#define JANET_SLOT_CONSTANT 0x10000
  ------------------
  |  Branch (31083:13): [True: 971, False: 69]
  ------------------
31084|       |            /* If not an infinite loop, return nil when condition false */
31085|    971|            janetc_emit_si(c, ifjmp, cond, 2, 0);
31086|    971|            janetc_emit(c, JOP_RETURN_NIL);
31087|    971|        }
31088|  42.7k|        for (i = 1; i < argn; i++) {
  ------------------
  |  Branch (31088:21): [True: 41.7k, False: 1.04k]
  ------------------
31089|  41.7k|            subopts.flags = JANET_FOPTS_DROP;
  ------------------
  |  | 1093|  41.7k|#define JANET_FOPTS_DROP 0x40000
  ------------------
31090|  41.7k|            janetc_freeslot(c, janetc_value(subopts, argv[i]));
31091|  41.7k|        }
31092|       |        /* But now add tail recursion */
31093|  1.04k|        int32_t tempself = janetc_regalloc_temp(&tempscope.ra, JANETC_REGTEMP_0);
31094|  1.04k|        janetc_emit(c, JOP_LOAD_SELF | ((uint32_t) tempself << 8));
31095|  1.04k|        janetc_emit(c, JOP_TAILCALL | ((uint32_t) tempself << 8));
31096|  1.04k|        janetc_regalloc_freetemp(&c->scope->ra, tempself, JANETC_REGTEMP_0);
31097|       |        /* Compile function */
31098|  1.04k|        JanetFuncDef *def = janetc_pop_funcdef(c);
31099|  1.04k|        def->name = janet_cstring("while");
31100|  1.04k|        janet_def_addflags(def);
31101|  1.04k|        int32_t defindex = janetc_addfuncdef(c, def);
31102|       |        /* And then load the closure and call it. */
31103|  1.04k|        int32_t cloreg = janetc_regalloc_temp(&c->scope->ra, JANETC_REGTEMP_0);
31104|  1.04k|        janetc_emit(c, JOP_CLOSURE | ((uint32_t) cloreg << 8) | ((uint32_t) defindex << 16));
31105|  1.04k|        janetc_emit(c, JOP_CALL | ((uint32_t) cloreg << 8) | ((uint32_t) cloreg << 16));
31106|  1.04k|        janetc_regalloc_freetemp(&c->scope->ra, cloreg, JANETC_REGTEMP_0);
31107|  1.04k|        c->scope->flags |= JANET_SCOPE_CLOSURE;
  ------------------
  |  | 1007|  1.04k|#define JANET_SCOPE_CLOSURE 16
  ------------------
31108|  1.04k|        return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|  1.04k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  1.04k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.04k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.04k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31109|  1.04k|    }
31110|       |
31111|       |    /* Compile jump to :whiletop */
31112|    659|    labeljt = janet_v_count(c->buffer);
  ------------------
  |  |  708|    659|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|    641|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|    641|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 641, False: 18]
  |  |  ------------------
  ------------------
31113|    659|    janetc_emit(c, JOP_JUMP);
31114|       |
31115|       |    /* Calculate jumps */
31116|    659|    labeld = janet_v_count(c->buffer);
  ------------------
  |  |  708|    659|#define janet_v_count(v)        (((v) != NULL) ? janet_v__cnt(v) : 0)
  |  |  ------------------
  |  |  |  |  715|    659|#define janet_v__cnt(v) janet_v__raw(v)[1]
  |  |  |  |  ------------------
  |  |  |  |  |  |  713|    659|#define janet_v__raw(v) ((int32_t *)(v) - 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (708:34): [True: 659, False: 0]
  |  |  ------------------
  ------------------
31117|    659|    if (!infinite) {
  ------------------
  |  Branch (31117:9): [True: 469, False: 190]
  ------------------
31118|    469|        check_16bit_jump(c, labelc, labeld);
31119|    469|        c->buffer[labelc] |= (uint32_t)(labeld - labelc) << 16;
31120|    469|    }
31121|       |
31122|    659|    check_24bit_jump(c, labeljt, labelwt);
31123|    659|    c->buffer[labeljt] |= (uint32_t)(labelwt - labeljt) << 8;
31124|       |
31125|       |    /* Calculate breaks */
31126|  5.25M|    for (int32_t i = labelwt; i < labeld; i++) {
  ------------------
  |  Branch (31126:31): [True: 5.25M, False: 659]
  ------------------
31127|  5.25M|        if (c->buffer[i] == (0x80 | JOP_JUMP)) {
  ------------------
  |  Branch (31127:13): [True: 6, False: 5.25M]
  ------------------
31128|      6|            check_24bit_jump(c, i, labeld);
31129|      6|            c->buffer[i] = JOP_JUMP | ((uint32_t) (labeld - i) << 8);
31130|      6|        }
31131|  5.25M|    }
31132|       |
31133|       |    /* Pop scope and return nil slot */
31134|    659|    janetc_popscope(c);
31135|       |
31136|    659|    return janetc_cslot(janet_wrap_nil());
  ------------------
  |  |  826|    659|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|    659|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    659|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    659|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
31137|  1.69k|}
janet.c:findsetup:
31765|  12.9k|static void findsetup(int32_t argc, Janet *argv, struct kmp_state *s, int32_t extra) {
31766|  12.9k|    janet_arity(argc, 2, 3 + extra);
31767|  12.9k|    JanetByteView pat = janet_getbytes(argv, 0);
31768|  12.9k|    JanetByteView text = janet_getbytes(argv, 1);
31769|  12.9k|    int32_t start = 0;
31770|  12.9k|    if (argc >= 3) {
  ------------------
  |  Branch (31770:9): [True: 7, False: 12.8k]
  ------------------
31771|      7|        start = janet_getinteger(argv, 2);
31772|      7|        if (start < 0) janet_panic("expected non-negative start index");
  ------------------
  |  Branch (31772:13): [True: 2, False: 5]
  ------------------
31773|      7|    }
31774|  12.8k|    kmp_init(s, text.bytes, text.len, pat.bytes, pat.len);
31775|  12.8k|    s->i = start;
31776|  12.8k|}
janet.c:kmp_init:
31575|  18.5k|    const uint8_t *pat, int32_t patlen) {
31576|  18.5k|    if (patlen == 0) {
  ------------------
  |  Branch (31576:9): [True: 1, False: 18.5k]
  ------------------
31577|      1|        janet_panic("expected non-empty pattern");
31578|      1|    }
31579|  18.5k|    int32_t *lookup = janet_calloc(patlen, sizeof(int32_t));
  ------------------
  |  | 2399|  18.5k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
31580|  18.5k|    if (!lookup) {
  ------------------
  |  Branch (31580:9): [True: 0, False: 18.5k]
  ------------------
31581|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
31582|      0|    }
31583|  18.5k|    s->lookup = lookup;
31584|  18.5k|    s->i = 0;
31585|  18.5k|    s->j = 0;
31586|  18.5k|    s->text = text;
31587|  18.5k|    s->pat = pat;
31588|  18.5k|    s->textlen = textlen;
31589|  18.5k|    s->patlen = patlen;
31590|       |    /* Init state machine */
31591|  18.5k|    {
31592|  18.5k|        int32_t i, j;
31593|   896k|        for (i = 1, j = 0; i < patlen; i++) {
  ------------------
  |  Branch (31593:28): [True: 877k, False: 18.5k]
  ------------------
31594|   896k|            while (j && pat[j] != pat[i]) j = lookup[j - 1];
  ------------------
  |  Branch (31594:20): [True: 29.2k, False: 867k]
  |  Branch (31594:25): [True: 18.4k, False: 10.7k]
  ------------------
31595|   877k|            if (pat[j] == pat[i]) j++;
  ------------------
  |  Branch (31595:17): [True: 18.5k, False: 859k]
  ------------------
31596|   877k|            lookup[i] = j;
31597|   877k|        }
31598|  18.5k|    }
31599|  18.5k|}
janet.c:kmp_next:
31610|  18.7k|static int32_t kmp_next(struct kmp_state *state) {
31611|  18.7k|    int32_t i = state->i;
31612|  18.7k|    int32_t j = state->j;
31613|  18.7k|    int32_t textlen = state->textlen;
31614|  18.7k|    int32_t patlen = state->patlen;
31615|  18.7k|    const uint8_t *text = state->text;
31616|  18.7k|    const uint8_t *pat = state->pat;
31617|  18.7k|    int32_t *lookup = state->lookup;
31618|   181k|    while (i < textlen) {
  ------------------
  |  Branch (31618:12): [True: 163k, False: 18.4k]
  ------------------
31619|   163k|        if (text[i] == pat[j]) {
  ------------------
  |  Branch (31619:13): [True: 2.47k, False: 160k]
  ------------------
31620|  2.47k|            if (j == patlen - 1) {
  ------------------
  |  Branch (31620:17): [True: 351, False: 2.12k]
  ------------------
31621|    351|                state->i = i + 1;
31622|    351|                state->j = lookup[j];
31623|    351|                return i - j;
31624|  2.12k|            } else {
31625|  2.12k|                i++;
31626|  2.12k|                j++;
31627|  2.12k|            }
31628|   160k|        } else {
31629|   160k|            if (j > 0) {
  ------------------
  |  Branch (31629:17): [True: 1.78k, False: 158k]
  ------------------
31630|  1.78k|                j = lookup[j - 1];
31631|   158k|            } else {
31632|   158k|                i++;
31633|   158k|            }
31634|   160k|        }
31635|   163k|    }
31636|  18.4k|    return -1;
31637|  18.7k|}
janet.c:kmp_deinit:
31601|  18.5k|static void kmp_deinit(struct kmp_state *state) {
31602|  18.5k|    janet_free(state->lookup);
  ------------------
  |  | 2402|  18.5k|#define janet_free(X) free((X))
  ------------------
31603|  18.5k|}
janet.c:replacesetup:
31839|  5.67k|static void replacesetup(int32_t argc, Janet *argv, struct replace_state *s) {
31840|  5.67k|    janet_arity(argc, 3, 4);
31841|  5.67k|    JanetByteView pat = janet_getbytes(argv, 0);
31842|  5.67k|    Janet subst = argv[1];
31843|  5.67k|    JanetByteView text = janet_getbytes(argv, 2);
31844|  5.67k|    int32_t start = 0;
31845|  5.67k|    if (argc == 4) {
  ------------------
  |  Branch (31845:9): [True: 4, False: 5.67k]
  ------------------
31846|      4|        start = janet_getinteger(argv, 3);
31847|      4|        if (start < 0) janet_panic("expected non-negative start index");
  ------------------
  |  Branch (31847:13): [True: 0, False: 4]
  ------------------
31848|      4|    }
31849|  5.67k|    kmp_init(&s->kmp, text.bytes, text.len, pat.bytes, pat.len);
31850|  5.67k|    s->kmp.i = start;
31851|  5.67k|    s->subst = subst;
31852|  5.67k|}
janet.c:kmp_seti:
31605|    227|static void kmp_seti(struct kmp_state *state, int32_t i) {
31606|    227|    state->i = i;
31607|    227|    state->j = 0;
31608|    227|}
janet.c:trim_help_args:
32061|    144|static void trim_help_args(int32_t argc, Janet *argv, JanetByteView *str, JanetByteView *set) {
32062|    144|    janet_arity(argc, 1, 2);
32063|    144|    *str = janet_getbytes(argv, 0);
32064|    144|    if (argc >= 2) {
  ------------------
  |  Branch (32064:9): [True: 82, False: 62]
  ------------------
32065|     82|        *set = janet_getbytes(argv, 1);
32066|     82|    } else {
32067|     62|        set->bytes = (const uint8_t *)(" \t\r\n\v\f");
32068|     62|        set->len = 6;
32069|     62|    }
32070|    144|}
janet.c:trim_help_leftedge:
32047|     90|static int32_t trim_help_leftedge(JanetByteView str, JanetByteView set) {
32048|    658|    for (int32_t i = 0; i < str.len; i++)
  ------------------
  |  Branch (32048:25): [True: 644, False: 14]
  ------------------
32049|    644|        if (!trim_help_checkset(set, str.bytes[i]))
  ------------------
  |  Branch (32049:13): [True: 76, False: 568]
  ------------------
32050|     76|            return i;
32051|     14|    return str.len;
32052|     90|}
janet.c:trim_help_checkset:
32040|  2.36k|static int trim_help_checkset(JanetByteView set, uint8_t x) {
32041|   113k|    for (int32_t j = 0; j < set.len; j++)
  ------------------
  |  Branch (32041:25): [True: 113k, False: 174]
  ------------------
32042|   113k|        if (set.bytes[j] == x)
  ------------------
  |  Branch (32042:13): [True: 2.19k, False: 110k]
  ------------------
32043|  2.19k|            return 1;
32044|    174|    return 0;
32045|  2.36k|}
janet.c:trim_help_rightedge:
32054|    106|static int32_t trim_help_rightedge(JanetByteView str, JanetByteView set) {
32055|  1.73k|    for (int32_t i = str.len - 1; i >= 0; i--)
  ------------------
  |  Branch (32055:35): [True: 1.72k, False: 8]
  ------------------
32056|  1.72k|        if (!trim_help_checkset(set, str.bytes[i]))
  ------------------
  |  Branch (32056:13): [True: 98, False: 1.62k]
  ------------------
32057|     98|            return i + 1;
32058|      8|    return 0;
32059|    106|}
janet.c:bignat_zero:
32217|   526k|static void bignat_zero(struct BigNat *x) {
32218|   526k|    x->first_digit = 0;
32219|   526k|    x->n = 0;
32220|   526k|    x->cap = 0;
32221|       |    x->digits = NULL;
32222|   526k|}
janet.c:bignat_muladd:
32249|   297k|static void bignat_muladd(struct BigNat *mant, uint32_t factor, uint32_t term) {
32250|   297k|    int32_t i;
32251|   297k|    uint64_t carry = ((uint64_t) mant->first_digit) * factor + term;
32252|   297k|    mant->first_digit = carry % BIGNAT_BASE;
  ------------------
  |  |32206|   297k|#define BIGNAT_BASE 0x80000000U
  ------------------
32253|   297k|    carry /= BIGNAT_BASE;
  ------------------
  |  |32206|   297k|#define BIGNAT_BASE 0x80000000U
  ------------------
32254|  2.45M|    for (i = 0; i < mant->n; i++) {
  ------------------
  |  Branch (32254:17): [True: 2.15M, False: 297k]
  ------------------
32255|  2.15M|        carry += ((uint64_t) mant->digits[i]) * factor;
32256|  2.15M|        mant->digits[i] = carry % BIGNAT_BASE;
  ------------------
  |  |32206|  2.15M|#define BIGNAT_BASE 0x80000000U
  ------------------
32257|  2.15M|        carry /= BIGNAT_BASE;
  ------------------
  |  |32206|  2.15M|#define BIGNAT_BASE 0x80000000U
  ------------------
32258|  2.15M|    }
32259|   297k|    if (carry) bignat_append(mant, (uint32_t) carry);
  ------------------
  |  Branch (32259:9): [True: 42.9k, False: 254k]
  ------------------
32260|   297k|}
janet.c:bignat_append:
32242|  42.9k|static void bignat_append(struct BigNat *mant, uint32_t dig) {
32243|  42.9k|    bignat_extra(mant, 1)[0] = dig;
32244|  42.9k|}
janet.c:bignat_extra:
32225|  45.6k|static uint32_t *bignat_extra(struct BigNat *mant, int32_t n) {
32226|  45.6k|    int32_t oldn = mant->n;
32227|  45.6k|    int32_t newn = oldn + n;
32228|  45.6k|    if (mant->cap < newn) {
  ------------------
  |  Branch (32228:9): [True: 13.6k, False: 31.9k]
  ------------------
32229|  13.6k|        int32_t newcap = 2 * newn;
32230|  13.6k|        uint32_t *mem = janet_realloc(mant->digits, (size_t) newcap * sizeof(uint32_t));
  ------------------
  |  | 2396|  13.6k|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
32231|  13.6k|        if (NULL == mem) {
  ------------------
  |  Branch (32231:13): [True: 0, False: 13.6k]
  ------------------
32232|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
32233|      0|        }
32234|  13.6k|        mant->cap = newcap;
32235|  13.6k|        mant->digits = mem;
32236|  13.6k|    }
32237|  45.6k|    mant->n = newn;
32238|  45.6k|    return mant->digits + oldn;
32239|  45.6k|}
janet.c:convert:
32345|  54.1k|    int32_t exponent) {
32346|       |
32347|  54.1k|    int32_t exponent2 = 0;
32348|       |
32349|       |    /* Approximate exponent in base 2 of mant and exponent. This should get us a good estimate of the final size of the
32350|       |     * number, within * 2^32 or so. */
32351|  54.1k|    int64_t mant_exp2_approx = mant->n * 32 + 16;
32352|  54.1k|    int64_t exp_exp2_approx = (int64_t)(floor(log2(base) * exponent));
32353|  54.1k|    int64_t exp2_approx = mant_exp2_approx + exp_exp2_approx;
32354|       |
32355|       |    /* Short circuit zero, huge, and small numbers. We use the exponent range of valid IEEE754 doubles (-1022, 1023)
32356|       |     * with a healthy buffer to allow for inaccuracies in the approximation and denormailzed numbers. */
32357|  54.1k|    if (mant->n == 0 && mant->first_digit == 0)
  ------------------
  |  Branch (32357:9): [True: 51.1k, False: 2.97k]
  |  Branch (32357:25): [True: 12.4k, False: 38.6k]
  ------------------
32358|  12.4k|        return negative ? -0.0 : 0.0;
  ------------------
  |  Branch (32358:16): [True: 562, False: 11.8k]
  ------------------
32359|  41.6k|    if (exp2_approx > 1176)
  ------------------
  |  Branch (32359:9): [True: 307, False: 41.3k]
  ------------------
32360|    307|        return negative ? -INFINITY : INFINITY;
  ------------------
  |  Branch (32360:16): [True: 70, False: 237]
  ------------------
32361|  41.3k|    if (exp2_approx < -1175)
  ------------------
  |  Branch (32361:9): [True: 1.18k, False: 40.1k]
  ------------------
32362|  1.18k|        return negative ? -0.0 : 0.0;
  ------------------
  |  Branch (32362:16): [True: 1.16k, False: 25]
  ------------------
32363|       |
32364|       |    /* Final value is X = mant * base ^ exponent * 2 ^ exponent2
32365|       |     * Get exponent to zero while holding X constant. */
32366|       |
32367|       |    /* Positive exponents are simple */
32368|   108k|    for (; exponent > 3; exponent -= 4) bignat_muladd(mant, base * base * base * base, 0);
  ------------------
  |  Branch (32368:12): [True: 68.5k, False: 40.1k]
  ------------------
32369|  42.1k|    for (; exponent > 1; exponent -= 2) bignat_muladd(mant, base * base, 0);
  ------------------
  |  Branch (32369:12): [True: 1.94k, False: 40.1k]
  ------------------
32370|  42.1k|    for (; exponent > 0; exponent -= 1) bignat_muladd(mant, base, 0);
  ------------------
  |  Branch (32370:12): [True: 2.00k, False: 40.1k]
  ------------------
32371|       |
32372|       |    /* Negative exponents are tricky - we don't want to loose bits
32373|       |     * from integer division, so we need to premultiply. */
32374|  40.1k|    if (exponent < 0) {
  ------------------
  |  Branch (32374:9): [True: 2.66k, False: 37.5k]
  ------------------
32375|  2.66k|        int32_t shamt = 5 - exponent / 4;
32376|  2.66k|        bignat_lshift_n(mant, shamt);
32377|  2.66k|        exponent2 -= shamt * BIGNAT_NBIT;
  ------------------
  |  |32205|  2.66k|#define BIGNAT_NBIT 31
  ------------------
32378|  8.53k|        for (; exponent < -3; exponent += 4) bignat_div(mant, base * base * base * base);
  ------------------
  |  Branch (32378:16): [True: 5.87k, False: 2.66k]
  ------------------
32379|  3.73k|        for (; exponent < -1; exponent += 2) bignat_div(mant, base * base);
  ------------------
  |  Branch (32379:16): [True: 1.07k, False: 2.66k]
  ------------------
32380|  4.13k|        for (; exponent <  0; exponent += 1) bignat_div(mant, base);
  ------------------
  |  Branch (32380:16): [True: 1.47k, False: 2.66k]
  ------------------
32381|  2.66k|    }
32382|       |
32383|  40.1k|    return negative
  ------------------
  |  Branch (32383:12): [True: 2.86k, False: 37.3k]
  ------------------
32384|  40.1k|           ? -bignat_extract(mant, exponent2)
32385|  40.1k|           : bignat_extract(mant, exponent2);
32386|  41.3k|}
janet.c:bignat_lshift_n:
32281|  2.66k|static void bignat_lshift_n(struct BigNat *mant, int n) {
32282|  2.66k|    if (!n) return;
  ------------------
  |  Branch (32282:9): [True: 0, False: 2.66k]
  ------------------
32283|  2.66k|    int32_t oldn = mant->n;
32284|  2.66k|    bignat_extra(mant, n);
32285|  2.66k|    memmove(mant->digits + n, mant->digits, sizeof(uint32_t) * oldn);
32286|  2.66k|    memset(mant->digits, 0, sizeof(uint32_t) * (n - 1));
32287|  2.66k|    mant->digits[n - 1] = mant->first_digit;
32288|  2.66k|    mant->first_digit = 0;
32289|  2.66k|}
janet.c:bignat_div:
32263|  8.42k|static void bignat_div(struct BigNat *mant, uint32_t divisor) {
32264|  8.42k|    int32_t i;
32265|  8.42k|    uint32_t quotient, remainder;
32266|  8.42k|    uint64_t dividend;
32267|  8.42k|    remainder = 0, quotient = 0;
32268|   965k|    for (i = mant->n - 1; i >= 0; i--) {
  ------------------
  |  Branch (32268:27): [True: 956k, False: 8.42k]
  ------------------
32269|   956k|        dividend = ((uint64_t)remainder * BIGNAT_BASE) + mant->digits[i];
  ------------------
  |  |32206|   956k|#define BIGNAT_BASE 0x80000000U
  ------------------
32270|   956k|        if (i < mant->n - 1) mant->digits[i + 1] = quotient;
  ------------------
  |  Branch (32270:13): [True: 948k, False: 8.42k]
  ------------------
32271|   956k|        quotient = (uint32_t)(dividend / divisor);
32272|   956k|        remainder = (uint32_t)(dividend % divisor);
32273|   956k|        mant->digits[i] = remainder;
32274|   956k|    }
32275|  8.42k|    dividend = ((uint64_t)remainder * BIGNAT_BASE) + mant->first_digit;
  ------------------
  |  |32206|  8.42k|#define BIGNAT_BASE 0x80000000U
  ------------------
32276|  8.42k|    if (mant->n && mant->digits[mant->n - 1] == 0) mant->n--;
  ------------------
  |  Branch (32276:9): [True: 8.42k, False: 0]
  |  Branch (32276:20): [True: 3.66k, False: 4.75k]
  ------------------
32277|  8.42k|    mant->first_digit = (uint32_t)(dividend / divisor);
32278|  8.42k|}
janet.c:bignat_extract:
32306|  40.1k|static double bignat_extract(struct BigNat *mant, int32_t exponent2) {
32307|  40.1k|    uint64_t top53;
32308|  40.1k|    int32_t n = mant->n;
32309|       |    /* Get most significant 53 bits from mant. Bit 52 (0 indexed) should
32310|       |     * always be 1. This is essentially a large right shift on mant.*/
32311|  40.1k|    if (n) {
  ------------------
  |  Branch (32311:9): [True: 7.36k, False: 32.8k]
  ------------------
32312|       |        /* Two or more digits */
32313|  7.36k|        uint64_t d1 = mant->digits[n - 1]; /* MSD (non-zero) */
32314|  7.36k|        uint64_t d2 = (n == 1) ? mant->first_digit : mant->digits[n - 2];
  ------------------
  |  Branch (32314:23): [True: 1.93k, False: 5.42k]
  ------------------
32315|  7.36k|        uint64_t d3 = (n > 2) ? mant->digits[n - 3] : (n == 2) ? mant->first_digit : 0;
  ------------------
  |  Branch (32315:23): [True: 4.55k, False: 2.80k]
  |  Branch (32315:55): [True: 871, False: 1.93k]
  ------------------
32316|  7.36k|        int lz = clz((uint32_t) d1);
  ------------------
  |  |32292|  7.36k|#define clz(x) __builtin_clz(x)
  ------------------
32317|  7.36k|        int nbits = 32 - lz;
32318|       |        /* First get 54 bits */
32319|  7.36k|        top53 = (d2 << (54 - BIGNAT_NBIT)) + (d3 >> (2 * BIGNAT_NBIT - 54));
  ------------------
  |  |32205|  7.36k|#define BIGNAT_NBIT 31
  ------------------
                      top53 = (d2 << (54 - BIGNAT_NBIT)) + (d3 >> (2 * BIGNAT_NBIT - 54));
  ------------------
  |  |32205|  7.36k|#define BIGNAT_NBIT 31
  ------------------
32320|  7.36k|        top53 >>= nbits;
32321|  7.36k|        top53 |= (d1 << (54 - nbits));
32322|       |        /* Rounding based on lowest bit of 54 */
32323|  7.36k|        if (top53 & 1) top53++;
  ------------------
  |  Branch (32323:13): [True: 2.66k, False: 4.69k]
  ------------------
32324|  7.36k|        top53 >>= 1;
32325|  7.36k|        if (top53 > 0x1FffffFFFFffffUL) {
  ------------------
  |  Branch (32325:13): [True: 200, False: 7.16k]
  ------------------
32326|    200|            top53 >>= 1;
32327|    200|            exponent2++;
32328|    200|        }
32329|       |        /* Correct exponent - to correct for large right shift to mantissa. */
32330|  7.36k|        exponent2 += (nbits - 53) + BIGNAT_NBIT * n;
  ------------------
  |  |32205|  7.36k|#define BIGNAT_NBIT 31
  ------------------
32331|  32.8k|    } else {
32332|       |        /* One digit */
32333|  32.8k|        top53 = mant->first_digit;
32334|  32.8k|    }
32335|  40.1k|    return ldexp((double)top53, exponent2);
32336|  40.1k|}
janet.c:scan_uint64:
32546|  6.73k|    int *neg) {
32547|  6.73k|    const uint8_t *end = str + len;
32548|  6.73k|    int seenadigit = 0;
32549|  6.73k|    int base = 10;
32550|  6.73k|    *neg = 0;
32551|  6.73k|    *out = 0;
32552|  6.73k|    uint64_t accum = 0;
32553|  6.73k|    if (len > JANET_NUMBER_LENGTH_RIDICULOUS) return 0;
  ------------------
  |  |32190|  6.73k|#define JANET_NUMBER_LENGTH_RIDICULOUS 0xFFFF
  ------------------
  |  Branch (32553:9): [True: 1, False: 6.73k]
  ------------------
32554|       |    /* Get sign */
32555|  6.73k|    if (str >= end) return 0;
  ------------------
  |  Branch (32555:9): [True: 4, False: 6.72k]
  ------------------
32556|  6.72k|    if (*str == '-') {
  ------------------
  |  Branch (32556:9): [True: 1.82k, False: 4.90k]
  ------------------
32557|  1.82k|        *neg = 1;
32558|  1.82k|        str++;
32559|  4.90k|    } else if (*str == '+') {
  ------------------
  |  Branch (32559:16): [True: 23, False: 4.88k]
  ------------------
32560|     23|        str++;
32561|     23|    }
32562|       |    /* Check for leading 0x or digit digit r */
32563|  6.72k|    if (str + 1 < end && str[0] == '0' && str[1] == 'x') {
  ------------------
  |  Branch (32563:9): [True: 3.73k, False: 2.98k]
  |  Branch (32563:26): [True: 1.62k, False: 2.11k]
  |  Branch (32563:43): [True: 9, False: 1.61k]
  ------------------
32564|      9|        base = 16;
32565|      9|        str += 2;
32566|  6.71k|    } else if (str + 1 < end  &&
  ------------------
  |  Branch (32566:16): [True: 3.73k, False: 2.98k]
  ------------------
32567|  3.73k|               str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (32567:16): [True: 2.80k, False: 930]
  |  Branch (32567:33): [True: 2.77k, False: 28]
  ------------------
32568|  2.77k|               str[1] == 'r') {
  ------------------
  |  Branch (32568:16): [True: 0, False: 2.77k]
  ------------------
32569|      0|        base = str[0] - '0';
32570|      0|        str += 2;
32571|  6.71k|    } else if (str + 2 < end  &&
  ------------------
  |  Branch (32571:16): [True: 3.18k, False: 3.53k]
  ------------------
32572|  3.18k|               str[0] >= '0' && str[0] <= '9' &&
  ------------------
  |  Branch (32572:16): [True: 2.73k, False: 453]
  |  Branch (32572:33): [True: 2.71k, False: 24]
  ------------------
32573|  2.71k|               str[1] >= '0' && str[1] <= '9' &&
  ------------------
  |  Branch (32573:16): [True: 2.70k, False: 2]
  |  Branch (32573:33): [True: 2.66k, False: 40]
  ------------------
32574|  2.66k|               str[2] == 'r') {
  ------------------
  |  Branch (32574:16): [True: 10, False: 2.65k]
  ------------------
32575|     10|        base = 10 * (str[0] - '0') + (str[1] - '0');
32576|     10|        if (base < 2 || base > 36) return 0;
  ------------------
  |  Branch (32576:13): [True: 0, False: 10]
  |  Branch (32576:25): [True: 0, False: 10]
  ------------------
32577|     10|        str += 3;
32578|     10|    }
32579|       |
32580|       |    /* Skip leading zeros */
32581|  10.5k|    while (str < end && *str == '0') {
  ------------------
  |  Branch (32581:12): [True: 9.41k, False: 1.14k]
  |  Branch (32581:25): [True: 3.82k, False: 5.58k]
  ------------------
32582|  3.82k|        seenadigit = 1;
32583|  3.82k|        str++;
32584|  3.82k|    }
32585|       |    /* Parse significant digits */
32586|  18.5k|    while (str < end) {
  ------------------
  |  Branch (32586:12): [True: 13.0k, False: 5.49k]
  ------------------
32587|  13.0k|        if (*str == '_') {
  ------------------
  |  Branch (32587:13): [True: 620, False: 12.4k]
  ------------------
32588|    620|            if (!seenadigit) return 0;
  ------------------
  |  Branch (32588:17): [True: 1, False: 619]
  ------------------
32589|  12.4k|        } else {
32590|  12.4k|            int digit = digit_lookup[*str & 0x7F];
32591|  12.4k|            if (*str > 127 || digit >= base) return 0;
  ------------------
  |  Branch (32591:17): [True: 5, False: 12.4k]
  |  Branch (32591:31): [True: 1.20k, False: 11.2k]
  ------------------
32592|  11.2k|            if (accum > (UINT64_MAX - digit) / base) return 0;
  ------------------
  |  Branch (32592:17): [True: 15, False: 11.2k]
  ------------------
32593|  11.2k|            accum = accum * base + digit;
32594|  11.2k|            seenadigit = 1;
32595|  11.2k|        }
32596|  11.8k|        str++;
32597|  11.8k|    }
32598|       |
32599|  5.49k|    if (!seenadigit) return 0;
  ------------------
  |  Branch (32599:9): [True: 571, False: 4.92k]
  ------------------
32600|  4.92k|    *out = accum;
32601|  4.92k|    return 1;
32602|  5.49k|}
janet.c:janet_symcache_findmem:
33084|   229M|    int *success) {
33085|   229M|    uint32_t bounds[4];
33086|   229M|    uint32_t i, j, index;
33087|   229M|    const uint8_t **firstEmpty = NULL;
33088|       |
33089|       |    /* We will search two ranges - index to the end,
33090|       |     * and 0 to the index. */
33091|   229M|    index = (uint32_t)hash & (janet_vm.cache_capacity - 1);
33092|   229M|    bounds[0] = index;
33093|   229M|    bounds[1] = janet_vm.cache_capacity;
33094|   229M|    bounds[2] = 0;
33095|   229M|    bounds[3] = index;
33096|  18.4E|    for (j = 0; j < 4; j += 2)
  ------------------
  |  Branch (33096:17): [True: 229M, False: 18.4E]
  ------------------
33097|   272M|        for (i = bounds[j]; i < bounds[j + 1]; ++i) {
  ------------------
  |  Branch (33097:29): [True: 272M, False: 18.4E]
  ------------------
33098|   272M|            const uint8_t *test = janet_vm.cache[i];
33099|       |            /* Check empty spots */
33100|   272M|            if (NULL == test) {
  ------------------
  |  Branch (33100:17): [True: 46.7M, False: 225M]
  ------------------
33101|  46.7M|                if (NULL == firstEmpty)
  ------------------
  |  Branch (33101:21): [True: 46.5M, False: 132k]
  ------------------
33102|  46.5M|                    firstEmpty = janet_vm.cache + i;
33103|  46.7M|                goto notfound;
33104|  46.7M|            }
33105|       |            /* Check for marked deleted */
33106|   225M|            if (JANET_SYMCACHE_DELETED == test) {
  ------------------
  |  Branch (33106:17): [True: 376k, False: 225M]
  ------------------
33107|   376k|                if (firstEmpty == NULL)
  ------------------
  |  Branch (33107:21): [True: 236k, False: 139k]
  ------------------
33108|   236k|                    firstEmpty = janet_vm.cache + i;
33109|   376k|                continue;
33110|   376k|            }
33111|   225M|            if (janet_string_equalconst(test, str, len, hash)) {
  ------------------
  |  Branch (33111:17): [True: 182M, False: 42.5M]
  ------------------
33112|       |                /* Replace first deleted */
33113|   182M|                *success = 1;
33114|   182M|                if (firstEmpty != NULL) {
  ------------------
  |  Branch (33114:21): [True: 104k, False: 182M]
  ------------------
33115|   104k|                    *firstEmpty = test;
33116|   104k|                    janet_vm.cache[i] = JANET_SYMCACHE_DELETED;
33117|   104k|                    return firstEmpty;
33118|   104k|                }
33119|   182M|                return janet_vm.cache + i;
33120|   182M|            }
33121|   225M|        }
33122|  18.4E|notfound:
33123|  46.7M|    *success = 0;
33124|  46.7M|    janet_assert(firstEmpty != NULL, "symcache failed to get memory");
  ------------------
  |  |  386|  46.7M|#define janet_assert(c, m) do { \
  |  |  387|  46.7M|    if (!(c)) JANET_EXIT((m)); \
  |  |  ------------------
  |  |  |  |  375|      0|#define JANET_EXIT(m) do { \
  |  |  |  |  376|      0|    fprintf(stderr, "janet abort at %s:%d: %s\n",\
  |  |  |  |  377|      0|        __FILE__,\
  |  |  |  |  378|      0|        __LINE__,\
  |  |  |  |  379|      0|        (m));\
  |  |  |  |  380|      0|    abort();\
  |  |  |  |  381|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (381:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (387:9): [True: 0, False: 46.7M]
  |  |  ------------------
  |  |  388|  46.7M|} while (0)
  |  |  ------------------
  |  |  |  Branch (388:10): [Folded, False: 46.7M]
  |  |  ------------------
  ------------------
33125|  46.7M|    return firstEmpty;
33126|  46.7M|}
janet.c:janet_symcache_put:
33162|  21.6M|static void janet_symcache_put(const uint8_t *x, const uint8_t **bucket) {
33163|  21.6M|    if ((janet_vm.cache_count + janet_vm.cache_deleted) * 2 > janet_vm.cache_capacity) {
  ------------------
  |  Branch (33163:9): [True: 17.8k, False: 21.6M]
  ------------------
33164|  17.8k|        int status;
33165|  17.8k|        janet_cache_resize(janet_tablen((2 * janet_vm.cache_count + 1)));
33166|  17.8k|        bucket = janet_symcache_find(x, &status);
  ------------------
  |  |33129|  17.8k|    janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1803|  17.8k|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1802|  17.8k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1804|  17.8k|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1802|  17.8k|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33167|  17.8k|    }
33168|       |    /* Add x to the cache */
33169|  21.6M|    janet_vm.cache_count++;
33170|  21.6M|    *bucket = x;
33171|  21.6M|}
janet.c:janet_cache_resize:
33132|  17.8k|static void janet_cache_resize(uint32_t newCapacity) {
33133|  17.8k|    uint32_t i, oldCapacity;
33134|  17.8k|    const uint8_t **oldCache = janet_vm.cache;
33135|  17.8k|    const uint8_t **newCache = janet_calloc(1, (size_t) newCapacity * sizeof(const uint8_t *));
  ------------------
  |  | 2399|  17.8k|#define janet_calloc(X, Y) calloc((X), (Y))
  ------------------
33136|  17.8k|    if (newCache == NULL) {
  ------------------
  |  Branch (33136:9): [True: 0, False: 17.8k]
  ------------------
33137|      0|        JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
33138|      0|    }
33139|  17.8k|    oldCapacity = janet_vm.cache_capacity;
33140|  17.8k|    janet_vm.cache = newCache;
33141|  17.8k|    janet_vm.cache_capacity = newCapacity;
33142|  17.8k|    janet_vm.cache_deleted = 0;
33143|       |    /* Add all of the old cache entries back */
33144|  51.3M|    for (i = 0; i < oldCapacity; ++i) {
  ------------------
  |  Branch (33144:17): [True: 51.3M, False: 17.8k]
  ------------------
33145|  51.3M|        int status;
33146|  51.3M|        const uint8_t **bucket;
33147|  51.3M|        const uint8_t *x = oldCache[i];
33148|  51.3M|        if (x != NULL && x != JANET_SYMCACHE_DELETED) {
  ------------------
  |  Branch (33148:13): [True: 25.6M, False: 25.7M]
  |  Branch (33148:26): [True: 25.0M, False: 526k]
  ------------------
33149|  25.0M|            bucket = janet_symcache_find(x, &status);
  ------------------
  |  |33129|  25.0M|    janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1803|  25.0M|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1802|  25.0M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   janet_symcache_findmem((str), janet_string_length(str), janet_string_hash(str), (success))
  |  |  ------------------
  |  |  |  | 1804|  25.0M|#define janet_string_hash(s) (janet_string_head(s)->hash)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1802|  25.0M|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33150|  25.0M|            if (status || bucket == NULL) {
  ------------------
  |  Branch (33150:17): [True: 18.4E, False: 25.0M]
  |  Branch (33150:27): [True: 6, False: 25.0M]
  ------------------
33151|       |                /* there was a problem with the algorithm. */
33152|      0|                break;
33153|      0|            }
33154|  25.0M|            *bucket = x;
33155|  25.0M|        }
33156|  51.3M|    }
33157|       |    /* Free the old cache */
33158|  17.8k|    janet_free((void *)oldCache);
  ------------------
  |  | 2402|  17.8k|#define janet_free(X) free((X))
  ------------------
33159|  17.8k|}
janet.c:inc_gensym:
33208|  1.51M|static void inc_gensym(void) {
33209|  1.53M|    for (int i = sizeof(janet_vm.gensym_counter) - 2; i; i--) {
  ------------------
  |  Branch (33209:55): [True: 1.53M, False: 0]
  ------------------
33210|  1.53M|        if (janet_vm.gensym_counter[i] == '9') {
  ------------------
  |  Branch (33210:13): [True: 25.5k, False: 1.50M]
  ------------------
33211|  25.5k|            janet_vm.gensym_counter[i] = 'a';
33212|  25.5k|            break;
33213|  1.50M|        } else if (janet_vm.gensym_counter[i] == 'z') {
  ------------------
  |  Branch (33213:20): [True: 24.3k, False: 1.48M]
  ------------------
33214|  24.3k|            janet_vm.gensym_counter[i] = 'A';
33215|  24.3k|            break;
33216|  1.48M|        } else if (janet_vm.gensym_counter[i] == 'Z') {
  ------------------
  |  Branch (33216:20): [True: 22.8k, False: 1.46M]
  ------------------
33217|  22.8k|            janet_vm.gensym_counter[i] = '0';
33218|  1.46M|        } else {
33219|  1.46M|            janet_vm.gensym_counter[i]++;
33220|  1.46M|            break;
33221|  1.46M|        }
33222|  1.53M|    }
33223|  1.51M|}
janet.c:janet_table_init_impl:
33303|  5.79M|static JanetTable *janet_table_init_impl(JanetTable *table, int32_t capacity, int stackalloc) {
33304|  5.79M|    JanetKV *data;
33305|  5.79M|    capacity = janet_tablen(capacity);
33306|  5.79M|    if (stackalloc) table->gc.flags = JANET_TABLE_FLAG_STACK;
  ------------------
  |  |33289|  18.7k|#define JANET_TABLE_FLAG_STACK 0x10000
  ------------------
  |  Branch (33306:9): [True: 18.7k, False: 5.77M]
  ------------------
33307|  5.79M|    if (capacity) {
  ------------------
  |  Branch (33307:9): [True: 5.79M, False: 14]
  ------------------
33308|  5.79M|        if (stackalloc) {
  ------------------
  |  Branch (33308:13): [True: 18.7k, False: 5.77M]
  ------------------
33309|  18.7k|            data = janet_memalloc_empty_local(capacity);
33310|  5.77M|        } else {
33311|  5.77M|            data = (JanetKV *) janet_memalloc_empty(capacity);
33312|  5.77M|            if (NULL == data) {
  ------------------
  |  Branch (33312:17): [True: 0, False: 5.77M]
  ------------------
33313|      0|                JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
33314|      0|            }
33315|  5.77M|        }
33316|  5.79M|        table->data = data;
33317|  5.79M|        table->capacity = capacity;
33318|  5.79M|    } else {
33319|     14|        table->data = NULL;
33320|     14|        table->capacity = 0;
33321|     14|    }
33322|  5.79M|    table->count = 0;
33323|  5.79M|    table->deleted = 0;
33324|       |    table->proto = NULL;
33325|  5.79M|    return table;
33326|  5.79M|}
janet.c:janet_memalloc_empty_local:
33291|  53.8k|static void *janet_memalloc_empty_local(int32_t count) {
33292|  53.8k|    int32_t i;
33293|  53.8k|    void *mem = janet_smalloc((size_t) count * sizeof(JanetKV));
33294|  53.8k|    JanetKV *mmem = (JanetKV *)mem;
33295|  16.5M|    for (i = 0; i < count; i++) {
  ------------------
  |  Branch (33295:17): [True: 16.5M, False: 53.8k]
  ------------------
33296|  16.5M|        JanetKV *kv = mmem + i;
33297|  16.5M|        kv->key = janet_wrap_nil();
  ------------------
  |  |  826|  16.5M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  16.5M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  16.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  16.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33298|  16.5M|        kv->value = janet_wrap_nil();
  ------------------
  |  |  826|  16.5M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  16.5M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  16.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  16.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
33299|  16.5M|    }
33300|  53.8k|    return mem;
33301|  53.8k|}
janet.c:janet_table_rehash:
33376|  4.56M|static void janet_table_rehash(JanetTable *t, int32_t size) {
33377|  4.56M|    JanetKV *olddata = t->data;
33378|  4.56M|    JanetKV *newdata;
33379|  4.56M|    int islocal = t->gc.flags & JANET_TABLE_FLAG_STACK;
  ------------------
  |  |33289|  4.56M|#define JANET_TABLE_FLAG_STACK 0x10000
  ------------------
33380|  4.56M|    if (islocal) {
  ------------------
  |  Branch (33380:9): [True: 35.1k, False: 4.53M]
  ------------------
33381|  35.1k|        newdata = (JanetKV *) janet_memalloc_empty_local(size);
33382|  4.53M|    } else {
33383|  4.53M|        newdata = (JanetKV *) janet_memalloc_empty(size);
33384|  4.53M|        if (NULL == newdata) {
  ------------------
  |  Branch (33384:13): [True: 0, False: 4.53M]
  ------------------
33385|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
33386|      0|        }
33387|  4.53M|    }
33388|  4.56M|    int32_t oldcapacity = t->capacity;
33389|  4.56M|    t->data = newdata;
33390|  4.56M|    t->capacity = size;
33391|  4.56M|    t->deleted = 0;
33392|  63.6M|    for (int32_t i = 0; i < oldcapacity; i++) {
  ------------------
  |  Branch (33392:25): [True: 59.0M, False: 4.56M]
  ------------------
33393|  59.0M|        JanetKV *kv = olddata + i;
33394|  59.0M|        if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  801|  59.0M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 59.0M]
  |  |  ------------------
  |  |  802|  59.0M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  59.0M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  59.0M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  59.0M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  59.0M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  59.0M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33394:13): [True: 29.1M, False: 29.9M]
  ------------------
33395|  29.1M|            JanetKV *newkv = janet_table_find(t, kv->key);
33396|  29.1M|            *newkv = *kv;
33397|  29.1M|        }
33398|  59.0M|    }
33399|  4.56M|    if (islocal) {
  ------------------
  |  Branch (33399:9): [True: 35.1k, False: 4.53M]
  ------------------
33400|  35.1k|        janet_sfree(olddata);
33401|  4.53M|    } else {
33402|  4.53M|        janet_free(olddata);
  ------------------
  |  | 2402|  4.53M|#define janet_free(X) free((X))
  ------------------
33403|  4.53M|    }
33404|  4.56M|}
janet.c:janet_table_mergekv:
33530|     27|static void janet_table_mergekv(JanetTable *table, const JanetKV *kvs, int32_t cap) {
33531|     27|    int32_t i;
33532|    186|    for (i = 0; i < cap; i++) {
  ------------------
  |  Branch (33532:17): [True: 159, False: 27]
  ------------------
33533|    159|        const JanetKV *kv = kvs + i;
33534|    159|        if (!janet_checktype(kv->key, JANET_NIL)) {
  ------------------
  |  |  801|    159|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 159]
  |  |  ------------------
  |  |  802|    159|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|    159|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|    159|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|    159|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    159|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    159|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (33534:13): [True: 38, False: 121]
  ------------------
33535|     38|            janet_table_put(table, kv->key, kv->value);
33536|     38|        }
33537|    159|    }
33538|     27|}
janet.c:janet_registry_sort:
34353|  1.26k|static void janet_registry_sort(void) {
34354|   443k|    for (size_t i = 1; i < janet_vm.registry_count; i++) {
  ------------------
  |  Branch (34354:24): [True: 442k, False: 1.26k]
  ------------------
34355|   442k|        JanetCFunRegistry reg = janet_vm.registry[i];
34356|   442k|        size_t j;
34357|  31.1M|        for (j = i; j > 0; j--) {
  ------------------
  |  Branch (34357:21): [True: 31.1M, False: 3.78k]
  ------------------
34358|  31.1M|            if ((void *)(janet_vm.registry[j - 1].cfun) < (void *)(reg.cfun)) break;
  ------------------
  |  Branch (34358:17): [True: 438k, False: 30.7M]
  ------------------
34359|  30.7M|            janet_vm.registry[j] = janet_vm.registry[j - 1];
34360|  30.7M|        }
34361|   442k|        janet_vm.registry[j] = reg;
34362|   442k|    }
34363|  1.26k|    janet_vm.registry_dirty = 0;
34364|  1.26k|}
janet.c:janet_check_pointer_align:
34454|  2.58M|static void janet_check_pointer_align(void *p) {
34455|  2.58M|    (void) p;
34456|       |#if defined(JANET_NANBOX_64) && JANET_NANBOX_64_POINTER_SHIFT != 0
34457|       |    union {
34458|       |        void *p;
34459|       |        uintptr_t u;
34460|       |    } un;
34461|       |    un.p = p;
34462|       |    janet_assert(!(un.u & (uintptr_t) ((1 << JANET_NANBOX_64_POINTER_SHIFT) - 1)),
34463|       |                 "unaligned pointer wrap - cfunction pointers and abstract types must be aligned with this nanboxing configuration.");
34464|       |#endif
34465|  2.58M|}
janet.c:to_byte_view:
34629|      3|static JanetByteView to_byte_view(Janet value) {
34630|      3|    JanetByteView result;
34631|      3|    if (!janet_bytes_view(value, &result.bytes, &result.len)) {
  ------------------
  |  Branch (34631:9): [True: 3, False: 0]
  ------------------
34632|      3|        JanetString str = janet_to_string(value);
34633|      3|        result.bytes = str;
34634|       |        result.len = janet_string_length(str);
  ------------------
  |  | 1803|      3|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|      3|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
34635|      3|    }
34636|      3|    return result;
34637|      3|}
janet.c:memoize_byte_view:
34618|    383|static JanetByteView memoize_byte_view(Janet *value) {
34619|    383|    JanetByteView result;
34620|    383|    if (!janet_bytes_view(*value, &result.bytes, &result.len)) {
  ------------------
  |  Branch (34620:9): [True: 31, False: 352]
  ------------------
34621|     31|        JanetString str = janet_to_string(*value);
34622|     31|        *value = janet_wrap_string(str);
  ------------------
  |  |  843|     31|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|     31|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     31|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     31|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
34623|     31|        result.bytes = str;
34624|       |        result.len = janet_string_length(str);
  ------------------
  |  | 1803|     31|#define janet_string_length(s) (janet_string_head(s)->length)
  |  |  ------------------
  |  |  |  | 1802|     31|#define janet_string_head(s) ((JanetStringHead *)((char *)s - offsetof(JanetStringHead, data)))
  |  |  ------------------
  ------------------
34625|     31|    }
34626|    383|    return result;
34627|    383|}
janet.c:janet_compare_abstract:
35317|  9.12k|static int janet_compare_abstract(JanetAbstract xx, JanetAbstract yy) {
35318|  9.12k|    if (xx == yy) return 0;
  ------------------
  |  Branch (35318:9): [True: 5.58k, False: 3.53k]
  ------------------
35319|  3.53k|    const JanetAbstractType *xt = janet_abstract_type(xx);
  ------------------
  |  | 1889|  3.53k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|  3.53k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35320|  3.53k|    const JanetAbstractType *yt = janet_abstract_type(yy);
  ------------------
  |  | 1889|  3.53k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|  3.53k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
35321|  3.53k|    if (xt != yt) {
  ------------------
  |  Branch (35321:9): [True: 862, False: 2.67k]
  ------------------
35322|    862|        return xt > yt ? 1 : -1;
  ------------------
  |  Branch (35322:16): [True: 674, False: 188]
  ------------------
35323|    862|    }
35324|  2.67k|    if (xt->compare == NULL) {
  ------------------
  |  Branch (35324:9): [True: 92, False: 2.58k]
  ------------------
35325|     92|        return xx > yy ? 1 : -1;
  ------------------
  |  Branch (35325:16): [True: 20, False: 72]
  ------------------
35326|     92|    }
35327|  2.58k|    return xt->compare(xx, yy);
35328|  2.67k|}
janet.c:push_traversal_node:
35115|   324k|static void push_traversal_node(void *lhs, void *rhs, int32_t index2) {
35116|   324k|    JanetTraversalNode node;
35117|   324k|    node.self = (JanetGCObject *) lhs;
35118|   324k|    node.other = (JanetGCObject *) rhs;
35119|   324k|    node.index = 0;
35120|   324k|    node.index2 = index2;
35121|   324k|    int is_new = janet_vm.traversal_base == NULL;
35122|   324k|    if (is_new || (janet_vm.traversal + 1 >= janet_vm.traversal_top)) {
  ------------------
  |  Branch (35122:9): [True: 856, False: 323k]
  |  Branch (35122:19): [True: 25, False: 323k]
  ------------------
35123|    881|        size_t oldsize = is_new ? 0 : (janet_vm.traversal - janet_vm.traversal_base);
  ------------------
  |  Branch (35123:26): [True: 856, False: 25]
  ------------------
35124|    881|        size_t newsize = 2 * oldsize + 1;
35125|    881|        if (newsize < 128) {
  ------------------
  |  Branch (35125:13): [True: 856, False: 25]
  ------------------
35126|    856|            newsize = 128;
35127|    856|        }
35128|    881|        JanetTraversalNode *tn = janet_realloc(janet_vm.traversal_base, newsize * sizeof(JanetTraversalNode));
  ------------------
  |  | 2396|    881|#define janet_realloc(X, Y) realloc((X), (Y))
  ------------------
35129|    881|        if (tn == NULL) {
  ------------------
  |  Branch (35129:13): [True: 0, False: 881]
  ------------------
35130|      0|            JANET_OUT_OF_MEMORY;
  ------------------
  |  |  414|      0|#define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0)
  |  |  ------------------
  |  |  |  Branch (414:122): [Folded, False: 0]
  |  |  ------------------
  ------------------
35131|      0|        }
35132|    881|        janet_vm.traversal_base = tn;
35133|    881|        janet_vm.traversal_top = janet_vm.traversal_base + newsize;
35134|    881|        janet_vm.traversal = janet_vm.traversal_base + oldsize;
35135|    881|    }
35136|   324k|    *(++janet_vm.traversal) = node;
35137|   324k|}
janet.c:traversal_next:
35147|   150M|static int traversal_next(Janet *x, Janet *y) {
35148|   150M|    JanetTraversalNode *t = janet_vm.traversal;
35149|   150M|    while (t && t > janet_vm.traversal_base) {
  ------------------
  |  Branch (35149:12): [True: 15.6M, False: 134M]
  |  Branch (35149:17): [True: 990k, False: 14.6M]
  ------------------
35150|   990k|        JanetGCObject *self = t->self;
35151|   990k|        JanetTupleHead *tself = (JanetTupleHead *)self;
35152|   990k|        JanetStructHead *sself = (JanetStructHead *)self;
35153|   990k|        JanetGCObject *other = t->other;
35154|   990k|        JanetTupleHead *tother = (JanetTupleHead *)other;
35155|   990k|        JanetStructHead *sother = (JanetStructHead *)other;
35156|   990k|        if ((self->flags & JANET_MEM_TYPEBITS) == JANET_MEMORY_TUPLE) {
  ------------------
  |  |  624|   990k|#define JANET_MEM_TYPEBITS 0xFF
  ------------------
  |  Branch (35156:13): [True: 931k, False: 58.2k]
  ------------------
35157|       |            /* Node is a tuple at index t->index */
35158|   931k|            if (t->index < tself->length && t->index < tother->length) {
  ------------------
  |  Branch (35158:17): [True: 628k, False: 303k]
  |  Branch (35158:45): [True: 628k, False: 27]
  ------------------
35159|   628k|                int32_t index = t->index++;
35160|   628k|                *x = tself->data[index];
35161|   628k|                *y = tother->data[index];
35162|   628k|                janet_vm.traversal = t;
35163|   628k|                return 0;
35164|   628k|            }
35165|   303k|            if (t->index2 && tself->length != tother->length) {
  ------------------
  |  Branch (35165:17): [True: 28.9k, False: 274k]
  |  Branch (35165:30): [True: 145, False: 28.7k]
  ------------------
35166|    145|                return tself->length > tother->length ? 3 : 1;
  ------------------
  |  Branch (35166:24): [True: 27, False: 118]
  ------------------
35167|    145|            }
35168|   303k|        } else {
35169|       |            /* Node is a struct at index t->index: if t->index2 is true, we should return the values. */
35170|  58.2k|            if (t->index2) {
  ------------------
  |  Branch (35170:17): [True: 26.1k, False: 32.0k]
  ------------------
35171|  26.1k|                t->index2 = 0;
35172|  26.1k|                int32_t index = t->index++;
35173|  26.1k|                *x = sself->data[index].value;
35174|  26.1k|                *y = sother->data[index].value;
35175|  26.1k|                janet_vm.traversal = t;
35176|  26.1k|                return 0;
35177|  26.1k|            }
35178|  32.0k|            for (int32_t i = t->index; i < sself->capacity; i++) {
  ------------------
  |  Branch (35178:40): [True: 26.1k, False: 5.89k]
  ------------------
35179|  26.1k|                t->index2 = 1;
35180|  26.1k|                *x = sself->data[t->index].key;
35181|  26.1k|                *y = sother->data[t->index].key;
35182|  26.1k|                janet_vm.traversal = t;
35183|  26.1k|                return 0;
35184|  26.1k|            }
35185|       |            /* Traverse prototype */
35186|  5.89k|            JanetStruct sproto = sself->proto;
35187|  5.89k|            JanetStruct oproto = sother->proto;
35188|  5.89k|            if (sproto && !oproto) return 3;
  ------------------
  |  Branch (35188:17): [True: 0, False: 5.89k]
  |  Branch (35188:27): [True: 0, False: 0]
  ------------------
35189|  5.89k|            if (!sproto && oproto) return 1;
  ------------------
  |  Branch (35189:17): [True: 5.89k, False: 0]
  |  Branch (35189:28): [True: 0, False: 5.89k]
  ------------------
35190|  5.89k|            if (oproto && sproto) {
  ------------------
  |  Branch (35190:17): [True: 0, False: 5.89k]
  |  Branch (35190:27): [True: 0, False: 0]
  ------------------
35191|      0|                *x = janet_wrap_struct(sproto);
  ------------------
  |  |  837|      0|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35192|      0|                *y = janet_wrap_struct(oproto);
  ------------------
  |  |  837|      0|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
35193|      0|                janet_vm.traversal = t - 1;
35194|      0|                return 0;
35195|      0|            }
35196|  5.89k|        }
35197|   309k|        t--;
35198|   309k|    }
35199|   149M|    janet_vm.traversal = t;
35200|   149M|    return 2;
35201|   150M|}
janet.c:murmur64:
35380|   165M|static uint64_t murmur64(uint64_t h) {
35381|   165M|    h ^= h >> 33;
35382|   165M|    h *= 0xff51afd7ed558ccdUL;
35383|   165M|    h ^= h >> 33;
35384|   165M|    h *= 0xc4ceb9fe1a85ec53UL;
35385|   165M|    h ^= h >> 33;
35386|   165M|    return h;
35387|   165M|}
janet.c:getter_checkint:
35523|  97.8M|static int32_t getter_checkint(JanetType type, Janet key, int32_t max) {
35524|  97.8M|    if (!janet_checkint(key)) goto bad;
  ------------------
  |  Branch (35524:9): [True: 6, False: 97.8M]
  ------------------
35525|  97.8M|    int32_t ret = janet_unwrap_integer(key);
  ------------------
  |  |  957|  97.8M|#define janet_unwrap_integer(x) ((int32_t) janet_unwrap_number(x))
  |  |  ------------------
  |  |  |  |  834|  97.8M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  ------------------
35526|  97.8M|    if (ret < 0) goto bad;
  ------------------
  |  Branch (35526:9): [True: 2, False: 97.8M]
  ------------------
35527|  97.8M|    if (ret >= max) goto bad;
  ------------------
  |  Branch (35527:9): [True: 45, False: 97.8M]
  ------------------
35528|  97.8M|    return ret;
35529|     53|bad:
35530|     53|    janet_panicf("expected integer key for %s in range [0, %d), got %v", janet_type_names[type], max, key);
35531|  97.8M|}
janet.c:run_vm:
36307|   388k|static JanetSignal run_vm(JanetFiber *fiber, Janet in) {
36308|       |
36309|       |    /* opcode -> label lookup if using clang/GCC */
36310|   388k|#ifdef JANET_USE_COMPUTED_GOTOS
36311|   388k|    static void *op_lookup[255] = {
36312|   388k|        &&label_JOP_NOOP,
36313|   388k|        &&label_JOP_ERROR,
36314|   388k|        &&label_JOP_TYPECHECK,
36315|   388k|        &&label_JOP_RETURN,
36316|   388k|        &&label_JOP_RETURN_NIL,
36317|   388k|        &&label_JOP_ADD_IMMEDIATE,
36318|   388k|        &&label_JOP_ADD,
36319|   388k|        &&label_JOP_SUBTRACT_IMMEDIATE,
36320|   388k|        &&label_JOP_SUBTRACT,
36321|   388k|        &&label_JOP_MULTIPLY_IMMEDIATE,
36322|   388k|        &&label_JOP_MULTIPLY,
36323|   388k|        &&label_JOP_DIVIDE_IMMEDIATE,
36324|   388k|        &&label_JOP_DIVIDE,
36325|   388k|        &&label_JOP_DIVIDE_FLOOR,
36326|   388k|        &&label_JOP_MODULO,
36327|   388k|        &&label_JOP_REMAINDER,
36328|   388k|        &&label_JOP_BAND,
36329|   388k|        &&label_JOP_BOR,
36330|   388k|        &&label_JOP_BXOR,
36331|   388k|        &&label_JOP_BNOT,
36332|   388k|        &&label_JOP_SHIFT_LEFT,
36333|   388k|        &&label_JOP_SHIFT_LEFT_IMMEDIATE,
36334|   388k|        &&label_JOP_SHIFT_RIGHT,
36335|   388k|        &&label_JOP_SHIFT_RIGHT_IMMEDIATE,
36336|   388k|        &&label_JOP_SHIFT_RIGHT_UNSIGNED,
36337|   388k|        &&label_JOP_SHIFT_RIGHT_UNSIGNED_IMMEDIATE,
36338|   388k|        &&label_JOP_MOVE_FAR,
36339|   388k|        &&label_JOP_MOVE_NEAR,
36340|   388k|        &&label_JOP_JUMP,
36341|   388k|        &&label_JOP_JUMP_IF,
36342|   388k|        &&label_JOP_JUMP_IF_NOT,
36343|   388k|        &&label_JOP_JUMP_IF_NIL,
36344|   388k|        &&label_JOP_JUMP_IF_NOT_NIL,
36345|   388k|        &&label_JOP_GREATER_THAN,
36346|   388k|        &&label_JOP_GREATER_THAN_IMMEDIATE,
36347|   388k|        &&label_JOP_LESS_THAN,
36348|   388k|        &&label_JOP_LESS_THAN_IMMEDIATE,
36349|   388k|        &&label_JOP_EQUALS,
36350|   388k|        &&label_JOP_EQUALS_IMMEDIATE,
36351|   388k|        &&label_JOP_COMPARE,
36352|   388k|        &&label_JOP_LOAD_NIL,
36353|   388k|        &&label_JOP_LOAD_TRUE,
36354|   388k|        &&label_JOP_LOAD_FALSE,
36355|   388k|        &&label_JOP_LOAD_INTEGER,
36356|   388k|        &&label_JOP_LOAD_CONSTANT,
36357|   388k|        &&label_JOP_LOAD_UPVALUE,
36358|   388k|        &&label_JOP_LOAD_SELF,
36359|   388k|        &&label_JOP_SET_UPVALUE,
36360|   388k|        &&label_JOP_CLOSURE,
36361|   388k|        &&label_JOP_PUSH,
36362|   388k|        &&label_JOP_PUSH_2,
36363|   388k|        &&label_JOP_PUSH_3,
36364|   388k|        &&label_JOP_PUSH_ARRAY,
36365|   388k|        &&label_JOP_CALL,
36366|   388k|        &&label_JOP_TAILCALL,
36367|   388k|        &&label_JOP_RESUME,
36368|   388k|        &&label_JOP_SIGNAL,
36369|   388k|        &&label_JOP_PROPAGATE,
36370|   388k|        &&label_JOP_IN,
36371|   388k|        &&label_JOP_GET,
36372|   388k|        &&label_JOP_PUT,
36373|   388k|        &&label_JOP_GET_INDEX,
36374|   388k|        &&label_JOP_PUT_INDEX,
36375|   388k|        &&label_JOP_LENGTH,
36376|   388k|        &&label_JOP_MAKE_ARRAY,
36377|   388k|        &&label_JOP_MAKE_BUFFER,
36378|   388k|        &&label_JOP_MAKE_STRING,
36379|   388k|        &&label_JOP_MAKE_STRUCT,
36380|   388k|        &&label_JOP_MAKE_TABLE,
36381|   388k|        &&label_JOP_MAKE_TUPLE,
36382|   388k|        &&label_JOP_MAKE_BRACKET_TUPLE,
36383|   388k|        &&label_JOP_GREATER_THAN_EQUAL,
36384|   388k|        &&label_JOP_LESS_THAN_EQUAL,
36385|   388k|        &&label_JOP_NEXT,
36386|   388k|        &&label_JOP_NOT_EQUALS,
36387|   388k|        &&label_JOP_NOT_EQUALS_IMMEDIATE,
36388|   388k|        &&label_JOP_CANCEL,
36389|   388k|        &&label_unknown_op,
36390|   388k|        &&label_unknown_op,
36391|   388k|        &&label_unknown_op,
36392|   388k|        &&label_unknown_op,
36393|   388k|        &&label_unknown_op,
36394|   388k|        &&label_unknown_op,
36395|   388k|        &&label_unknown_op,
36396|   388k|        &&label_unknown_op,
36397|   388k|        &&label_unknown_op,
36398|   388k|        &&label_unknown_op,
36399|   388k|        &&label_unknown_op,
36400|   388k|        &&label_unknown_op,
36401|   388k|        &&label_unknown_op,
36402|   388k|        &&label_unknown_op,
36403|   388k|        &&label_unknown_op,
36404|   388k|        &&label_unknown_op,
36405|   388k|        &&label_unknown_op,
36406|   388k|        &&label_unknown_op,
36407|   388k|        &&label_unknown_op,
36408|   388k|        &&label_unknown_op,
36409|   388k|        &&label_unknown_op,
36410|   388k|        &&label_unknown_op,
36411|   388k|        &&label_unknown_op,
36412|   388k|        &&label_unknown_op,
36413|   388k|        &&label_unknown_op,
36414|   388k|        &&label_unknown_op,
36415|   388k|        &&label_unknown_op,
36416|   388k|        &&label_unknown_op,
36417|   388k|        &&label_unknown_op,
36418|   388k|        &&label_unknown_op,
36419|   388k|        &&label_unknown_op,
36420|   388k|        &&label_unknown_op,
36421|   388k|        &&label_unknown_op,
36422|   388k|        &&label_unknown_op,
36423|   388k|        &&label_unknown_op,
36424|   388k|        &&label_unknown_op,
36425|   388k|        &&label_unknown_op,
36426|   388k|        &&label_unknown_op,
36427|   388k|        &&label_unknown_op,
36428|   388k|        &&label_unknown_op,
36429|   388k|        &&label_unknown_op,
36430|   388k|        &&label_unknown_op,
36431|   388k|        &&label_unknown_op,
36432|   388k|        &&label_unknown_op,
36433|   388k|        &&label_unknown_op,
36434|   388k|        &&label_unknown_op,
36435|   388k|        &&label_unknown_op,
36436|   388k|        &&label_unknown_op,
36437|   388k|        &&label_unknown_op,
36438|   388k|        &&label_unknown_op,
36439|   388k|        &&label_unknown_op,
36440|   388k|        &&label_unknown_op,
36441|   388k|        &&label_unknown_op,
36442|   388k|        &&label_unknown_op,
36443|   388k|        &&label_unknown_op,
36444|   388k|        &&label_unknown_op,
36445|   388k|        &&label_unknown_op,
36446|   388k|        &&label_unknown_op,
36447|   388k|        &&label_unknown_op,
36448|   388k|        &&label_unknown_op,
36449|   388k|        &&label_unknown_op,
36450|   388k|        &&label_unknown_op,
36451|   388k|        &&label_unknown_op,
36452|   388k|        &&label_unknown_op,
36453|   388k|        &&label_unknown_op,
36454|   388k|        &&label_unknown_op,
36455|   388k|        &&label_unknown_op,
36456|   388k|        &&label_unknown_op,
36457|   388k|        &&label_unknown_op,
36458|   388k|        &&label_unknown_op,
36459|   388k|        &&label_unknown_op,
36460|   388k|        &&label_unknown_op,
36461|   388k|        &&label_unknown_op,
36462|   388k|        &&label_unknown_op,
36463|   388k|        &&label_unknown_op,
36464|   388k|        &&label_unknown_op,
36465|   388k|        &&label_unknown_op,
36466|   388k|        &&label_unknown_op,
36467|   388k|        &&label_unknown_op,
36468|   388k|        &&label_unknown_op,
36469|   388k|        &&label_unknown_op,
36470|   388k|        &&label_unknown_op,
36471|   388k|        &&label_unknown_op,
36472|   388k|        &&label_unknown_op,
36473|   388k|        &&label_unknown_op,
36474|   388k|        &&label_unknown_op,
36475|   388k|        &&label_unknown_op,
36476|   388k|        &&label_unknown_op,
36477|   388k|        &&label_unknown_op,
36478|   388k|        &&label_unknown_op,
36479|   388k|        &&label_unknown_op,
36480|   388k|        &&label_unknown_op,
36481|   388k|        &&label_unknown_op,
36482|   388k|        &&label_unknown_op,
36483|   388k|        &&label_unknown_op,
36484|   388k|        &&label_unknown_op,
36485|   388k|        &&label_unknown_op,
36486|   388k|        &&label_unknown_op,
36487|   388k|        &&label_unknown_op,
36488|   388k|        &&label_unknown_op,
36489|   388k|        &&label_unknown_op,
36490|   388k|        &&label_unknown_op,
36491|   388k|        &&label_unknown_op,
36492|   388k|        &&label_unknown_op,
36493|   388k|        &&label_unknown_op,
36494|   388k|        &&label_unknown_op,
36495|   388k|        &&label_unknown_op,
36496|   388k|        &&label_unknown_op,
36497|   388k|        &&label_unknown_op,
36498|   388k|        &&label_unknown_op,
36499|   388k|        &&label_unknown_op,
36500|   388k|        &&label_unknown_op,
36501|   388k|        &&label_unknown_op,
36502|   388k|        &&label_unknown_op,
36503|   388k|        &&label_unknown_op,
36504|   388k|        &&label_unknown_op,
36505|   388k|        &&label_unknown_op,
36506|   388k|        &&label_unknown_op,
36507|   388k|        &&label_unknown_op,
36508|   388k|        &&label_unknown_op,
36509|   388k|        &&label_unknown_op,
36510|   388k|        &&label_unknown_op,
36511|   388k|        &&label_unknown_op,
36512|   388k|        &&label_unknown_op,
36513|   388k|        &&label_unknown_op,
36514|   388k|        &&label_unknown_op,
36515|   388k|        &&label_unknown_op,
36516|   388k|        &&label_unknown_op,
36517|   388k|        &&label_unknown_op,
36518|   388k|        &&label_unknown_op,
36519|   388k|        &&label_unknown_op,
36520|   388k|        &&label_unknown_op,
36521|   388k|        &&label_unknown_op,
36522|   388k|        &&label_unknown_op,
36523|   388k|        &&label_unknown_op,
36524|   388k|        &&label_unknown_op,
36525|   388k|        &&label_unknown_op,
36526|   388k|        &&label_unknown_op,
36527|   388k|        &&label_unknown_op,
36528|   388k|        &&label_unknown_op,
36529|   388k|        &&label_unknown_op,
36530|   388k|        &&label_unknown_op,
36531|   388k|        &&label_unknown_op,
36532|   388k|        &&label_unknown_op,
36533|   388k|        &&label_unknown_op,
36534|   388k|        &&label_unknown_op,
36535|   388k|        &&label_unknown_op,
36536|   388k|        &&label_unknown_op,
36537|   388k|        &&label_unknown_op,
36538|   388k|        &&label_unknown_op,
36539|   388k|        &&label_unknown_op,
36540|   388k|        &&label_unknown_op,
36541|   388k|        &&label_unknown_op,
36542|   388k|        &&label_unknown_op,
36543|   388k|        &&label_unknown_op,
36544|   388k|        &&label_unknown_op,
36545|   388k|        &&label_unknown_op,
36546|   388k|        &&label_unknown_op,
36547|   388k|        &&label_unknown_op,
36548|   388k|        &&label_unknown_op,
36549|   388k|        &&label_unknown_op,
36550|   388k|        &&label_unknown_op,
36551|   388k|        &&label_unknown_op,
36552|   388k|        &&label_unknown_op,
36553|   388k|        &&label_unknown_op,
36554|   388k|        &&label_unknown_op,
36555|   388k|        &&label_unknown_op,
36556|   388k|        &&label_unknown_op,
36557|   388k|        &&label_unknown_op,
36558|   388k|        &&label_unknown_op,
36559|   388k|        &&label_unknown_op,
36560|   388k|        &&label_unknown_op,
36561|   388k|        &&label_unknown_op,
36562|   388k|        &&label_unknown_op,
36563|   388k|        &&label_unknown_op,
36564|   388k|        &&label_unknown_op,
36565|   388k|        &&label_unknown_op,
36566|   388k|        &&label_unknown_op
36567|   388k|    };
36568|   388k|#endif
36569|       |
36570|       |    /* Interpreter state */
36571|   388k|    register Janet *stack;
36572|   388k|    register uint32_t *pc;
36573|   388k|    register JanetFunction *func;
36574|       |
36575|   388k|    if (fiber->flags & JANET_FIBER_RESUME_SIGNAL) {
  ------------------
  |  |  780|   388k|#define JANET_FIBER_RESUME_SIGNAL 0x400000
  ------------------
  |  Branch (36575:9): [True: 0, False: 388k]
  ------------------
36576|      0|        JanetSignal sig = (fiber->gc.flags & JANET_FIBER_STATUS_MASK) >> JANET_FIBER_STATUS_OFFSET;
  ------------------
  |  |  779|      0|#define JANET_FIBER_STATUS_MASK 0x3F0000
  ------------------
                      JanetSignal sig = (fiber->gc.flags & JANET_FIBER_STATUS_MASK) >> JANET_FIBER_STATUS_OFFSET;
  ------------------
  |  |  781|      0|#define JANET_FIBER_STATUS_OFFSET 16
  ------------------
36577|      0|        fiber->gc.flags &= ~JANET_FIBER_STATUS_MASK;
  ------------------
  |  |  779|      0|#define JANET_FIBER_STATUS_MASK 0x3F0000
  ------------------
36578|      0|        fiber->flags &= ~(JANET_FIBER_RESUME_SIGNAL | JANET_FIBER_FLAG_MASK);
  ------------------
  |  |  780|      0|#define JANET_FIBER_RESUME_SIGNAL 0x400000
  ------------------
                      fiber->flags &= ~(JANET_FIBER_RESUME_SIGNAL | JANET_FIBER_FLAG_MASK);
  ------------------
  |  |  787|      0|#define JANET_FIBER_FLAG_MASK        0xF000000
  ------------------
36579|      0|        janet_vm.return_reg[0] = in;
36580|      0|        return sig;
36581|      0|    }
36582|       |
36583|   388k|    vm_restore();
  ------------------
  |  |36031|   388k|#define vm_restore() do { \
  |  |36032|   388k|    stack = fiber->data + fiber->frame; \
  |  |36033|   388k|    pc = janet_stack_frame(stack)->pc; \
  |  |  ------------------
  |  |  |  |  801|   388k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|   388k|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36034|   388k|    func = janet_stack_frame(stack)->func; \
  |  |  ------------------
  |  |  |  |  801|   388k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|   388k|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36035|   388k|} while (0)
  |  |  ------------------
  |  |  |  Branch (36035:10): [Folded, False: 388k]
  |  |  ------------------
  ------------------
36584|       |
36585|   388k|    if (fiber->flags & JANET_FIBER_DID_LONGJUMP) {
  ------------------
  |  |  786|   388k|#define JANET_FIBER_DID_LONGJUMP     0x8000000
  ------------------
  |  Branch (36585:9): [True: 46, False: 388k]
  ------------------
36586|     46|        if (janet_fiber_frame(fiber)->func == NULL) {
  ------------------
  |  |  802|     46|#define janet_fiber_frame(f) janet_stack_frame((f)->data + (f)->frame)
  |  |  ------------------
  |  |  |  |  801|     46|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|     46|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (36586:13): [True: 46, False: 0]
  ------------------
36587|       |            /* Inside a c function */
36588|     46|            janet_fiber_popframe(fiber);
36589|     46|            vm_restore();
  ------------------
  |  |36031|     46|#define vm_restore() do { \
  |  |36032|     46|    stack = fiber->data + fiber->frame; \
  |  |36033|     46|    pc = janet_stack_frame(stack)->pc; \
  |  |  ------------------
  |  |  |  |  801|     46|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|     46|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36034|     46|    func = janet_stack_frame(stack)->func; \
  |  |  ------------------
  |  |  |  |  801|     46|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|     46|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36035|     46|} while (0)
  |  |  ------------------
  |  |  |  Branch (36035:10): [Folded, False: 46]
  |  |  ------------------
  ------------------
36590|     46|        }
36591|       |        /* Check if we were at a tail call instruction. If so, do implicit return */
36592|     46|        if ((*pc & 0xFF) == JOP_TAILCALL) {
  ------------------
  |  Branch (36592:13): [True: 40, False: 6]
  ------------------
36593|       |            /* Tail call resume */
36594|     40|            int entrance_frame = janet_stack_frame(stack)->flags & JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  |  801|     40|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1017|     40|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
                          int entrance_frame = janet_stack_frame(stack)->flags & JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  | 1004|     40|#define JANET_STACKFRAME_ENTRANCE 2
  ------------------
36595|     40|            janet_fiber_popframe(fiber);
36596|     40|            if (entrance_frame) {
  ------------------
  |  Branch (36596:17): [True: 40, False: 0]
  ------------------
36597|     40|                fiber->flags &= ~JANET_FIBER_FLAG_MASK;
  ------------------
  |  |  787|     40|#define JANET_FIBER_FLAG_MASK        0xF000000
  ------------------
36598|     40|                vm_return(JANET_SIGNAL_OK, in);
  ------------------
  |  |36036|     40|#define vm_return(sig, val) do { \
  |  |36037|     40|    janet_vm.return_reg[0] = (val); \
  |  |36038|     40|    vm_commit(); \
  |  |  ------------------
  |  |  |  |36030|     40|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|     40|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|     40|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36030:70): [Folded, False: 40]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36039|     40|    return (sig); \
  |  |36040|     40|} while (0)
  |  |  ------------------
  |  |  |  Branch (36040:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
36599|     40|            }
36600|      0|            vm_restore();
  ------------------
  |  |36031|      0|#define vm_restore() do { \
  |  |36032|      0|    stack = fiber->data + fiber->frame; \
  |  |36033|      0|    pc = janet_stack_frame(stack)->pc; \
  |  |  ------------------
  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36034|      0|    func = janet_stack_frame(stack)->func; \
  |  |  ------------------
  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36035|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (36035:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
36601|      0|        }
36602|     46|    }
36603|       |
36604|   388k|    if (!(fiber->flags & JANET_FIBER_RESUME_NO_USEVAL)) stack[A] = in;
  ------------------
  |  |  784|   388k|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
                  if (!(fiber->flags & JANET_FIBER_RESUME_NO_USEVAL)) stack[A] = in;
  ------------------
  |  |35996|      6|#define A ((*pc >> 8)  & 0xFF)
  ------------------
  |  Branch (36604:9): [True: 6, False: 388k]
  ------------------
36605|   388k|    if (!(fiber->flags & JANET_FIBER_RESUME_NO_SKIP)) pc++;
  ------------------
  |  |  785|   388k|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  ------------------
  |  Branch (36605:9): [True: 6, False: 388k]
  ------------------
36606|       |
36607|   388k|    uint8_t first_opcode = *pc & ((fiber->flags & JANET_FIBER_BREAKPOINT) ? 0x7F : 0xFF);
  ------------------
  |  |  783|   388k|#define JANET_FIBER_BREAKPOINT       0x1000000
  ------------------
  |  Branch (36607:35): [True: 0, False: 388k]
  ------------------
36608|       |
36609|   388k|    fiber->flags &= ~JANET_FIBER_FLAG_MASK;
  ------------------
  |  |  787|   388k|#define JANET_FIBER_FLAG_MASK        0xF000000
  ------------------
36610|       |
36611|       |    /* Main interpreter loop. Semantically is a switch on
36612|       |     * (*pc & 0xFF) inside of an infinite loop. */
36613|   388k|    VM_START();
  ------------------
  |  |36015|   388k|#define VM_START() { goto *op_lookup[first_opcode];
  ------------------
36614|       |
36615|   388k|    VM_DEFAULT();
  ------------------
  |  |36018|      0|#define VM_DEFAULT() label_unknown_op:
  ------------------
36616|      0|    fiber->flags |= JANET_FIBER_BREAKPOINT | JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  783|      0|#define JANET_FIBER_BREAKPOINT       0x1000000
  ------------------
                  fiber->flags |= JANET_FIBER_BREAKPOINT | JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  784|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
                  fiber->flags |= JANET_FIBER_BREAKPOINT | JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP;
  ------------------
  |  |  785|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  ------------------
36617|      0|    vm_return(JANET_SIGNAL_DEBUG, janet_wrap_nil());
  ------------------
  |  |36036|      0|#define vm_return(sig, val) do { \
  |  |36037|      0|    janet_vm.return_reg[0] = (val); \
  |  |36038|      0|    vm_commit(); \
  |  |  ------------------
  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36039|      0|    return (sig); \
  |  |36040|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (36040:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
36618|       |
36619|      0|    VM_OP(JOP_NOOP)
  ------------------
  |  |36017|      0|#define VM_OP(op) label_##op :
  ------------------
36620|      0|    vm_pcnext();
  ------------------
  |  |36050|      0|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36621|       |
36622|    120|    VM_OP(JOP_ERROR)
  ------------------
  |  |36017|    120|#define VM_OP(op) label_##op :
  ------------------
36623|    120|    vm_return(JANET_SIGNAL_ERROR, stack[A]);
  ------------------
  |  |36036|    120|#define vm_return(sig, val) do { \
  |  |36037|    120|    janet_vm.return_reg[0] = (val); \
  |  |36038|    120|    vm_commit(); \
  |  |  ------------------
  |  |  |  |36030|    120|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|    120|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|    120|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36030:70): [Folded, False: 120]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36039|    120|    return (sig); \
  |  |36040|    120|} while (0)
  |  |  ------------------
  |  |  |  Branch (36040:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
36624|       |
36625|      0|    VM_OP(JOP_TYPECHECK)
  ------------------
  |  |36017|      0|#define VM_OP(op) label_##op :
  ------------------
36626|      0|    vm_assert_types(stack[A], E);
  ------------------
  |  |36062|      0|#define vm_assert_types(X, TS) do { \
  |  |36063|      0|    if (!(janet_checktypes((X), (TS)))) { \
  |  |  ------------------
  |  |  |  |  960|      0|#define janet_checktypes(x, tps) ((1 << janet_type(x)) & (tps))
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|    (isnan((x).number) \
  |  |  |  |  |  |  791|      0|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  |  |  |  |  792|      0|        : JANET_NUMBER)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36063:9): [True: 0, False: 0]
  |  |  ------------------
  |  |36064|      0|        vm_commit(); \
  |  |  ------------------
  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36065|      0|        janet_panicf("expected %T, got %v", (TS), (X)); \
  |  |36066|      0|    } \
  |  |36067|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (36067:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (36626:5): [True: 0, False: 0]
  ------------------
36627|      0|    vm_pcnext();
  ------------------
  |  |36050|      0|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36628|       |
36629|  94.9M|    VM_OP(JOP_RETURN) {
  ------------------
  |  |36017|  94.9M|#define VM_OP(op) label_##op :
  ------------------
36630|  94.9M|        Janet retval = stack[D];
  ------------------
  |  |35999|  94.9M|#define D (*pc >> 8)
  ------------------
36631|  94.9M|        int entrance_frame = janet_stack_frame(stack)->flags & JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  |  801|  94.9M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1017|  94.9M|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
                      int entrance_frame = janet_stack_frame(stack)->flags & JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  | 1004|  94.9M|#define JANET_STACKFRAME_ENTRANCE 2
  ------------------
36632|  94.9M|        janet_fiber_popframe(fiber);
36633|  94.9M|        if (entrance_frame) vm_return_no_restore(JANET_SIGNAL_OK, retval);
  ------------------
  |  |36041|   383k|#define vm_return_no_restore(sig, val) do { \
  |  |36042|   383k|    janet_vm.return_reg[0] = (val); \
  |  |36043|   383k|    return (sig); \
  |  |36044|   383k|} while (0)
  |  |  ------------------
  |  |  |  Branch (36044:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (36633:13): [True: 383k, False: 94.5M]
  ------------------
36634|  94.5M|        vm_restore();
  ------------------
  |  |36031|  94.5M|#define vm_restore() do { \
  |  |36032|  94.5M|    stack = fiber->data + fiber->frame; \
  |  |36033|  94.5M|    pc = janet_stack_frame(stack)->pc; \
  |  |  ------------------
  |  |  |  |  801|  94.5M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|  94.5M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36034|  94.5M|    func = janet_stack_frame(stack)->func; \
  |  |  ------------------
  |  |  |  |  801|  94.5M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|  94.5M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36035|  94.5M|} while (0)
  |  |  ------------------
  |  |  |  Branch (36035:10): [Folded, False: 94.5M]
  |  |  ------------------
  ------------------
36635|  94.5M|        stack[A] = retval;
  ------------------
  |  |35996|  94.5M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36636|  94.5M|        vm_checkgc_pcnext();
  ------------------
  |  |36051|  94.5M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36047|  94.5M|#define maybe_collect() do {\
  |  |  |  |36048|  94.5M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 64.7M, False: 29.7M]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 94.5M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36050|  94.5M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|  94.5M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36637|  94.5M|    }
36638|       |
36639|   106k|    VM_OP(JOP_RETURN_NIL) {
  ------------------
  |  |36017|   106k|#define VM_OP(op) label_##op :
  ------------------
36640|   106k|        Janet retval = janet_wrap_nil();
  ------------------
  |  |  826|   106k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|   106k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   106k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   106k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36641|   106k|        int entrance_frame = janet_stack_frame(stack)->flags & JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  |  801|   106k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1017|   106k|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
                      int entrance_frame = janet_stack_frame(stack)->flags & JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  | 1004|   106k|#define JANET_STACKFRAME_ENTRANCE 2
  ------------------
36642|   106k|        janet_fiber_popframe(fiber);
36643|   106k|        if (entrance_frame) vm_return_no_restore(JANET_SIGNAL_OK, retval);
  ------------------
  |  |36041|    263|#define vm_return_no_restore(sig, val) do { \
  |  |36042|    263|    janet_vm.return_reg[0] = (val); \
  |  |36043|    263|    return (sig); \
  |  |36044|    263|} while (0)
  |  |  ------------------
  |  |  |  Branch (36044:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (36643:13): [True: 263, False: 106k]
  ------------------
36644|   106k|        vm_restore();
  ------------------
  |  |36031|   106k|#define vm_restore() do { \
  |  |36032|   106k|    stack = fiber->data + fiber->frame; \
  |  |36033|   106k|    pc = janet_stack_frame(stack)->pc; \
  |  |  ------------------
  |  |  |  |  801|   106k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|   106k|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36034|   106k|    func = janet_stack_frame(stack)->func; \
  |  |  ------------------
  |  |  |  |  801|   106k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|   106k|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36035|   106k|} while (0)
  |  |  ------------------
  |  |  |  Branch (36035:10): [Folded, False: 106k]
  |  |  ------------------
  ------------------
36645|   106k|        stack[A] = retval;
  ------------------
  |  |35996|   106k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36646|   106k|        vm_checkgc_pcnext();
  ------------------
  |  |36051|   106k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36047|   106k|#define maybe_collect() do {\
  |  |  |  |36048|   106k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 11.5k, False: 94.7k]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 106k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36050|   106k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|   106k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36647|   106k|    }
36648|       |
36649|  36.8M|    VM_OP(JOP_ADD_IMMEDIATE)
  ------------------
  |  |36017|  36.8M|#define VM_OP(op) label_##op :
  ------------------
36650|  36.8M|    vm_binop_immediate(+);
  ------------------
  |  |36081|  36.8M|    {\
  |  |36082|  36.8M|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |35997|  36.8M|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36083|  36.8M|        if (!janet_checktype(op1, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  801|  36.8M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [True: 36.8M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  802|  36.8M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|  36.8M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 36.8M, False: 37]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 37]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|  36.8M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36083:13): [True: 37, False: 36.8M]
  |  |  ------------------
  |  |36084|     37|            vm_commit();\
  |  |  ------------------
  |  |  |  |36030|     37|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|     37|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|     37|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36030:70): [Folded, False: 37]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36085|     37|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  ------------------
  |  |  |  |  830|     37|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |36086|     37|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |36087|     37|            stack = fiber->data + fiber->frame;\
  |  |36088|     37|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |35996|     37|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36089|     37|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36051|     37|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36047|     37|#define maybe_collect() do {\
  |  |  |  |  |  |36048|     37|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36048:9): [True: 0, False: 37]
  |  |  |  |  |  |  |  Branch (36048:85): [Folded, False: 37]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36050|     37|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36019|     37|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36090|  36.8M|        } else {\
  |  |36091|  36.8M|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  834|  36.8M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36092|  36.8M|            stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |35996|  36.8M|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |  830|  36.8M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |36093|  36.8M|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36050|  36.8M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|  36.8M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36094|  36.8M|        }\
  |  |36095|  36.8M|    }
  ------------------
36651|       |
36652|  36.8M|    VM_OP(JOP_ADD)
  ------------------
  |  |36017|   647k|#define VM_OP(op) label_##op :
  ------------------
36653|   647k|    vm_binop(+);
  ------------------
  |  |36133|   647k|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  ------------------
  |  |  |  |36117|   647k|    {\
  |  |  |  |36118|   647k|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35997|   647k|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36119|   647k|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35998|   647k|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36120|   647k|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|  1.29M|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (801:5): [True: 647k, False: 103]
  |  |  |  |  |  |  |  Branch (801:6): [True: 647k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  802|  1.29M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  798|   647k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (798:6): [True: 647k, False: 103]
  |  |  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 103]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  803|  1.29M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                       if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|   647k|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (801:5): [True: 647k, False: 25]
  |  |  |  |  |  |  |  Branch (801:6): [True: 647k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  802|   647k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  798|   647k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (798:6): [True: 647k, False: 25]
  |  |  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 25]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  803|   647k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36121|   647k|            double x1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|   647k|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36122|   647k|            double x2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|   647k|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36123|   647k|            stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|   647k|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |36133|   647k|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  830|   647k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36124|   647k|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36050|   647k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36019|   647k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36125|   647k|        } else {\
  |  |  |  |36126|    128|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|    128|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|    128|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|    128|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 128]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36127|    128|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36128|    128|            stack = fiber->data + fiber->frame;\
  |  |  |  |36129|    128|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|    128|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36130|    128|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36051|    128|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36047|    128|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36048|    128|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36048:9): [True: 0, False: 128]
  |  |  |  |  |  |  |  |  |  Branch (36048:85): [Folded, False: 128]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36050|    128|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36019|    128|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36131|    128|        }\
  |  |  |  |36132|   647k|    }
  |  |  ------------------
  ------------------
36654|       |
36655|   647k|    VM_OP(JOP_SUBTRACT_IMMEDIATE)
  ------------------
  |  |36017|   518k|#define VM_OP(op) label_##op :
  ------------------
36656|   518k|    vm_binop_immediate(-);
  ------------------
  |  |36081|   518k|    {\
  |  |36082|   518k|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |35997|   518k|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36083|   518k|        if (!janet_checktype(op1, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  801|   518k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [True: 518k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  802|   518k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|   518k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 515k, False: 3.30k]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 3.30k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|   518k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36083:13): [True: 3.30k, False: 515k]
  |  |  ------------------
  |  |36084|  3.30k|            vm_commit();\
  |  |  ------------------
  |  |  |  |36030|  3.30k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|  3.30k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|  3.30k|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36030:70): [Folded, False: 3.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36085|  3.30k|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  ------------------
  |  |  |  |  830|  3.30k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |36086|  3.30k|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |36087|  3.30k|            stack = fiber->data + fiber->frame;\
  |  |36088|  3.30k|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |35996|  3.30k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36089|  3.30k|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36051|  3.30k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36047|  3.30k|#define maybe_collect() do {\
  |  |  |  |  |  |36048|  3.30k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36048:9): [True: 0, False: 3.30k]
  |  |  |  |  |  |  |  Branch (36048:85): [Folded, False: 3.30k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36050|  3.30k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36019|  3.30k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36090|   515k|        } else {\
  |  |36091|   515k|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  834|   515k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36092|   515k|            stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |35996|   515k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |  830|   515k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |36093|   515k|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36050|   515k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|   515k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36094|   515k|        }\
  |  |36095|   518k|    }
  ------------------
36657|       |
36658|   518k|    VM_OP(JOP_SUBTRACT)
  ------------------
  |  |36017|  24.9k|#define VM_OP(op) label_##op :
  ------------------
36659|  24.9k|    vm_binop(-);
  ------------------
  |  |36133|  24.9k|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  ------------------
  |  |  |  |36117|  24.9k|    {\
  |  |  |  |36118|  24.9k|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35997|  24.9k|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36119|  24.9k|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35998|  24.9k|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36120|  24.9k|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|  49.9k|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (801:5): [True: 24.7k, False: 211]
  |  |  |  |  |  |  |  Branch (801:6): [True: 24.9k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  802|  49.9k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  798|  24.9k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (798:6): [True: 24.7k, False: 211]
  |  |  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 211]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  803|  49.9k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                       if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|  24.7k|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (801:5): [True: 24.7k, False: 33]
  |  |  |  |  |  |  |  Branch (801:6): [True: 24.7k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  802|  24.7k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  798|  24.7k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (798:6): [True: 24.7k, False: 33]
  |  |  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 33]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  803|  24.7k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36121|  24.7k|            double x1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|  24.7k|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36122|  24.7k|            double x2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|  24.7k|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36123|  24.7k|            stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|  24.7k|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |36133|  24.7k|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  830|  24.7k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36124|  24.7k|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36050|  24.7k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36019|  24.7k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36125|  24.7k|        } else {\
  |  |  |  |36126|    244|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|    244|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|    244|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|    244|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 244]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36127|    244|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36128|    244|            stack = fiber->data + fiber->frame;\
  |  |  |  |36129|    244|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|    244|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36130|    244|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36051|    244|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36047|    244|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36048|    244|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36048:9): [True: 0, False: 244]
  |  |  |  |  |  |  |  |  |  Branch (36048:85): [Folded, False: 244]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36050|    244|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36019|    244|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36131|    244|        }\
  |  |  |  |36132|  24.9k|    }
  |  |  ------------------
  ------------------
36660|       |
36661|  24.9k|    VM_OP(JOP_MULTIPLY_IMMEDIATE)
  ------------------
  |  |36017|     94|#define VM_OP(op) label_##op :
  ------------------
36662|     94|    vm_binop_immediate(*);
  ------------------
  |  |36081|     94|    {\
  |  |36082|     94|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |35997|     94|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36083|     94|        if (!janet_checktype(op1, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  801|     94|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [True: 94, Folded]
  |  |  |  |  ------------------
  |  |  |  |  802|     94|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|     94|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 85, False: 9]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|     94|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36083:13): [True: 9, False: 85]
  |  |  ------------------
  |  |36084|      9|            vm_commit();\
  |  |  ------------------
  |  |  |  |36030|      9|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|      9|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|      9|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36030:70): [Folded, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36085|      9|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  ------------------
  |  |  |  |  830|      9|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |36086|      9|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |36087|      9|            stack = fiber->data + fiber->frame;\
  |  |36088|      9|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |35996|      9|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36089|      9|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36051|      9|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36047|      9|#define maybe_collect() do {\
  |  |  |  |  |  |36048|      9|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36048:9): [True: 0, False: 9]
  |  |  |  |  |  |  |  Branch (36048:85): [Folded, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36050|      9|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36019|      9|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36090|     85|        } else {\
  |  |36091|     85|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  834|     85|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36092|     85|            stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |35996|     85|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |  830|     85|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |36093|     85|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36050|     85|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|     85|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36094|     85|        }\
  |  |36095|     94|    }
  ------------------
36663|       |
36664|  2.23k|    VM_OP(JOP_MULTIPLY)
  ------------------
  |  |36017|  2.23k|#define VM_OP(op) label_##op :
  ------------------
36665|  2.23k|    vm_binop(*);
  ------------------
  |  |36133|  2.23k|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  ------------------
  |  |  |  |36117|  2.23k|    {\
  |  |  |  |36118|  2.23k|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35997|  2.23k|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36119|  2.23k|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35998|  2.23k|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36120|  2.23k|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|  4.47k|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (801:5): [True: 2.18k, False: 49]
  |  |  |  |  |  |  |  Branch (801:6): [True: 2.23k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  802|  4.47k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  798|  2.23k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (798:6): [True: 2.18k, False: 50]
  |  |  |  |  |  |  |  |  |  Branch (798:28): [True: 1, False: 49]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  803|  4.47k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                       if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|  2.18k|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (801:5): [True: 2.12k, False: 60]
  |  |  |  |  |  |  |  Branch (801:6): [True: 2.18k, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  802|  2.18k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  798|  2.18k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (798:6): [True: 2.12k, False: 60]
  |  |  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 60]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  803|  2.18k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36121|  2.12k|            double x1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|  2.12k|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36122|  2.12k|            double x2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|  2.12k|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36123|  2.12k|            stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|  2.12k|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |36133|  2.12k|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  830|  2.12k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36124|  2.12k|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36050|  2.12k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36019|  2.12k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36125|  2.12k|        } else {\
  |  |  |  |36126|    109|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|    109|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|    109|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|    109|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 109]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36127|    109|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36128|    109|            stack = fiber->data + fiber->frame;\
  |  |  |  |36129|    109|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|    109|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36130|    109|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36051|    109|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36047|    109|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36048|    109|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36048:9): [True: 0, False: 109]
  |  |  |  |  |  |  |  |  |  Branch (36048:85): [Folded, False: 109]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36050|    109|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36019|    109|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36131|    109|        }\
  |  |  |  |36132|  2.23k|    }
  |  |  ------------------
  ------------------
36666|       |
36667|  2.23k|    VM_OP(JOP_DIVIDE_IMMEDIATE)
  ------------------
  |  |36017|    166|#define VM_OP(op) label_##op :
  ------------------
36668|    166|    vm_binop_immediate( /);
  ------------------
  |  |36081|    166|    {\
  |  |36082|    166|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |35997|    166|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36083|    166|        if (!janet_checktype(op1, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  801|    166|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [True: 166, Folded]
  |  |  |  |  ------------------
  |  |  |  |  802|    166|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|    166|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 114, False: 52]
  |  |  |  |  |  |  |  Branch (798:28): [True: 2, False: 50]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|    166|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36083:13): [True: 50, False: 116]
  |  |  ------------------
  |  |36084|     50|            vm_commit();\
  |  |  ------------------
  |  |  |  |36030|     50|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|     50|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|     50|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36030:70): [Folded, False: 50]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36085|     50|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  ------------------
  |  |  |  |  830|     50|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |36086|     50|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |36087|     50|            stack = fiber->data + fiber->frame;\
  |  |36088|     50|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |35996|     50|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36089|     50|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36051|     50|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36047|     50|#define maybe_collect() do {\
  |  |  |  |  |  |36048|     50|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36048:9): [True: 0, False: 50]
  |  |  |  |  |  |  |  Branch (36048:85): [Folded, False: 50]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36050|     50|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36019|     50|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36090|    116|        } else {\
  |  |36091|    116|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  834|    116|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36092|    116|            stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |35996|    116|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_number(x1 op CS);\
  |  |  ------------------
  |  |  |  |  830|    116|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  |  |36093|    116|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36050|    116|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|    116|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36094|    116|        }\
  |  |36095|    166|    }
  ------------------
36669|       |
36670|    166|    VM_OP(JOP_DIVIDE)
  ------------------
  |  |36017|    161|#define VM_OP(op) label_##op :
  ------------------
36671|    161|    vm_binop( /);
  ------------------
  |  |36133|    161|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  ------------------
  |  |  |  |36117|    161|    {\
  |  |  |  |36118|    161|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35997|    161|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36119|    161|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35998|    161|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36120|    161|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|    322|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (801:5): [True: 64, False: 97]
  |  |  |  |  |  |  |  Branch (801:6): [True: 161, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  802|    322|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  798|    161|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (798:6): [True: 64, False: 97]
  |  |  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 97]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  803|    322|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                       if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|     64|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (801:5): [True: 38, False: 26]
  |  |  |  |  |  |  |  Branch (801:6): [True: 64, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  802|     64|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  798|     64|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (798:6): [True: 38, False: 26]
  |  |  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 26]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  803|     64|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36121|     38|            double x1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|     38|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36122|     38|            double x2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|     38|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36123|     38|            stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|     38|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = wrap(x1 op x2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |36133|     38|#define vm_binop(op) _vm_binop(op, janet_wrap_number)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  830|     38|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36124|     38|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36050|     38|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36019|     38|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36125|    123|        } else {\
  |  |  |  |36126|    123|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|    123|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|    123|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|    123|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 123]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36127|    123|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36128|    123|            stack = fiber->data + fiber->frame;\
  |  |  |  |36129|    123|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|    123|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36130|    123|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36051|    123|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36047|    123|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36048|    123|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36048:9): [True: 0, False: 123]
  |  |  |  |  |  |  |  |  |  Branch (36048:85): [Folded, False: 123]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36050|    123|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36019|    123|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36131|    123|        }\
  |  |  |  |36132|    161|    }
  |  |  ------------------
  ------------------
36672|       |
36673|  18.2k|    VM_OP(JOP_DIVIDE_FLOOR) {
  ------------------
  |  |36017|  18.2k|#define VM_OP(op) label_##op :
  ------------------
36674|  18.2k|        Janet op1 = stack[B];
  ------------------
  |  |35997|  18.2k|#define B ((*pc >> 16) & 0xFF)
  ------------------
36675|  18.2k|        Janet op2 = stack[C];
  ------------------
  |  |35998|  18.2k|#define C (*pc >> 24)
  ------------------
36676|  18.2k|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {
  ------------------
  |  |  801|  36.5k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 18.2k, False: 0]
  |  |  |  Branch (801:6): [True: 18.2k, Folded]
  |  |  ------------------
  |  |  802|  36.5k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|  18.2k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 18.2k, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  36.5k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {
  ------------------
  |  |  801|  18.2k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 18.2k, False: 0]
  |  |  |  Branch (801:6): [True: 18.2k, Folded]
  |  |  ------------------
  |  |  802|  18.2k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|  18.2k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 18.2k, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  18.2k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36677|  18.2k|            double x1 = janet_unwrap_number(op1);
  ------------------
  |  |  834|  18.2k|#define janet_unwrap_number(x) ((x).number)
  ------------------
36678|  18.2k|            double x2 = janet_unwrap_number(op2);
  ------------------
  |  |  834|  18.2k|#define janet_unwrap_number(x) ((x).number)
  ------------------
36679|  18.2k|            stack[A] = janet_wrap_number(floor(x1 / x2));
  ------------------
  |  |35996|  18.2k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                          stack[A] = janet_wrap_number(floor(x1 / x2));
  ------------------
  |  |  830|  18.2k|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
36680|  18.2k|            vm_pcnext();
  ------------------
  |  |36050|  18.2k|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|  18.2k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36681|  18.2k|        } else {
36682|      0|            vm_commit();
  ------------------
  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  ------------------
  ------------------
36683|      0|            Janet a = janet_binop_call("div", "rdiv", op1, op2);
36684|      0|            stack = fiber->data + fiber->frame;
36685|      0|            stack[A] = a;
  ------------------
  |  |35996|      0|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36686|      0|            vm_checkgc_pcnext();
  ------------------
  |  |36051|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36047|      0|#define maybe_collect() do {\
  |  |  |  |36048|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 0, False: 0]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36050|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36687|      0|        }
36688|  18.2k|    }
36689|       |
36690|  18.2k|    VM_OP(JOP_MODULO) {
  ------------------
  |  |36017|    305|#define VM_OP(op) label_##op :
  ------------------
36691|    305|        Janet op1 = stack[B];
  ------------------
  |  |35997|    305|#define B ((*pc >> 16) & 0xFF)
  ------------------
36692|    305|        Janet op2 = stack[C];
  ------------------
  |  |35998|    305|#define C (*pc >> 24)
  ------------------
36693|    305|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {
  ------------------
  |  |  801|    610|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 193, False: 112]
  |  |  |  Branch (801:6): [True: 305, Folded]
  |  |  ------------------
  |  |  802|    610|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|    305|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 193, False: 112]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 112]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|    610|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {
  ------------------
  |  |  801|    193|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 182, False: 11]
  |  |  |  Branch (801:6): [True: 193, Folded]
  |  |  ------------------
  |  |  802|    193|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|    193|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 182, False: 11]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|    193|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36694|    182|            double x1 = janet_unwrap_number(op1);
  ------------------
  |  |  834|    182|#define janet_unwrap_number(x) ((x).number)
  ------------------
36695|    182|            double x2 = janet_unwrap_number(op2);
  ------------------
  |  |  834|    182|#define janet_unwrap_number(x) ((x).number)
  ------------------
36696|    182|            if (x2 == 0) {
  ------------------
  |  Branch (36696:17): [True: 27, False: 155]
  ------------------
36697|     27|                stack[A] = janet_wrap_number(x1);
  ------------------
  |  |35996|     27|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                              stack[A] = janet_wrap_number(x1);
  ------------------
  |  |  830|     27|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
36698|    155|            } else {
36699|    155|                double intres = x2 * floor(x1 / x2);
36700|    155|                stack[A] = janet_wrap_number(x1 - intres);
  ------------------
  |  |35996|    155|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                              stack[A] = janet_wrap_number(x1 - intres);
  ------------------
  |  |  830|    155|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
36701|    155|            }
36702|    182|            vm_pcnext();
  ------------------
  |  |36050|    182|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|    182|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36703|    182|        } else {
36704|    123|            vm_commit();
  ------------------
  |  |36030|    123|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  801|    123|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|    123|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36030:70): [Folded, False: 123]
  |  |  ------------------
  ------------------
36705|    123|            Janet a = janet_binop_call("mod", "rmod", op1, op2);
36706|    123|            stack = fiber->data + fiber->frame;
36707|    123|            stack[A] = a;
  ------------------
  |  |35996|    123|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36708|    123|            vm_checkgc_pcnext();
  ------------------
  |  |36051|    123|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36047|    123|#define maybe_collect() do {\
  |  |  |  |36048|    123|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 0, False: 123]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 123]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36050|    123|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|    123|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36709|    123|        }
36710|    305|    }
36711|       |
36712|    463|    VM_OP(JOP_REMAINDER) {
  ------------------
  |  |36017|    463|#define VM_OP(op) label_##op :
  ------------------
36713|    463|        Janet op1 = stack[B];
  ------------------
  |  |35997|    463|#define B ((*pc >> 16) & 0xFF)
  ------------------
36714|    463|        Janet op2 = stack[C];
  ------------------
  |  |35998|    463|#define C (*pc >> 24)
  ------------------
36715|    463|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {
  ------------------
  |  |  801|    926|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 128, False: 335]
  |  |  |  Branch (801:6): [True: 463, Folded]
  |  |  ------------------
  |  |  802|    926|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|    463|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 117, False: 346]
  |  |  |  |  |  Branch (798:28): [True: 11, False: 335]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|    926|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {
  ------------------
  |  |  801|    128|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 63, False: 65]
  |  |  |  Branch (801:6): [True: 128, Folded]
  |  |  ------------------
  |  |  802|    128|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|    128|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 63, False: 65]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 65]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|    128|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36716|     63|            double x1 = janet_unwrap_number(op1);
  ------------------
  |  |  834|     63|#define janet_unwrap_number(x) ((x).number)
  ------------------
36717|     63|            double x2 = janet_unwrap_number(op2);
  ------------------
  |  |  834|     63|#define janet_unwrap_number(x) ((x).number)
  ------------------
36718|     63|            stack[A] = janet_wrap_number(fmod(x1, x2));
  ------------------
  |  |35996|     63|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                          stack[A] = janet_wrap_number(fmod(x1, x2));
  ------------------
  |  |  830|     63|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  ------------------
36719|     63|            vm_pcnext();
  ------------------
  |  |36050|     63|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|     63|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36720|    400|        } else {
36721|    400|            vm_commit();
  ------------------
  |  |36030|    400|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  801|    400|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|    400|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36030:70): [Folded, False: 400]
  |  |  ------------------
  ------------------
36722|    400|            Janet a = janet_binop_call("%", "r%", op1, op2);
36723|    400|            stack = fiber->data + fiber->frame;
36724|    400|            stack[A] = a;
  ------------------
  |  |35996|    400|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36725|    400|            vm_checkgc_pcnext();
  ------------------
  |  |36051|    400|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36047|    400|#define maybe_collect() do {\
  |  |  |  |36048|    400|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 0, False: 400]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 400]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36050|    400|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|    400|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36726|    400|        }
36727|    463|    }
36728|       |
36729|    463|    VM_OP(JOP_BAND)
  ------------------
  |  |36017|      0|#define VM_OP(op) label_##op :
  ------------------
36730|      0|    vm_bitop(&);
  ------------------
  |  |36155|      0|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  ------------------
  |  |  |  |36135|      0|    {\
  |  |  |  |36136|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35997|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36137|      0|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35998|      0|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36138|      0|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (801:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (801:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                       if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (801:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (801:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36139|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36140|      0|            double y2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36141|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36155|      0|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  953|      0|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (953:33): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (953:53): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (953:73): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36142|      0|            if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |  953|      0|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (953:33): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (953:53): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (953:73): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36143|      0|            type1 x1 = (type1) y1;\
  |  |  |  |36144|      0|            int32_t x2 = (int32_t) y2;\
  |  |  |  |36145|      0|            stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |36146|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36050|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36019|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36147|      0|        } else {\
  |  |  |  |36148|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36149|      0|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36150|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |36151|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36152|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36051|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36047|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36048|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36048:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (36048:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36050|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36019|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36153|      0|        }\
  |  |  |  |36154|      0|    }
  |  |  ------------------
  ------------------
36731|       |
36732|    166|    VM_OP(JOP_BOR)
  ------------------
  |  |36017|    166|#define VM_OP(op) label_##op :
  ------------------
36733|    166|    vm_bitop( |);
  ------------------
  |  |36155|    166|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  ------------------
  |  |  |  |36135|    166|    {\
  |  |  |  |36136|    166|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35997|    166|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36137|    166|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35998|    166|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36138|    166|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|    332|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (801:5): [True: 54, False: 112]
  |  |  |  |  |  |  |  Branch (801:6): [True: 166, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  802|    332|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  798|    166|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (798:6): [True: 54, False: 112]
  |  |  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 112]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  803|    332|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                       if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|     54|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (801:5): [True: 38, False: 16]
  |  |  |  |  |  |  |  Branch (801:6): [True: 54, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  802|     54|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  798|     54|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (798:6): [True: 38, False: 16]
  |  |  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 16]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  803|     54|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36139|     38|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|     38|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36140|     38|            double y2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|     38|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36141|     38|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36155|     38|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  953|     38|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (953:33): [True: 37, False: 1]
  |  |  |  |  |  |  |  |  |  Branch (953:53): [True: 37, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (953:73): [True: 36, False: 1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      2|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      2|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      2|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36142|     38|            if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |  953|     36|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (953:33): [True: 36, False: 0]
  |  |  |  |  |  |  |  Branch (953:53): [True: 36, False: 0]
  |  |  |  |  |  |  |  Branch (953:73): [True: 35, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      1|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      1|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      1|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36143|     36|            type1 x1 = (type1) y1;\
  |  |  |  |36144|     35|            int32_t x2 = (int32_t) y2;\
  |  |  |  |36145|     35|            stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|     35|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|     35|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |36146|     35|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36050|     35|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36019|     35|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36147|    128|        } else {\
  |  |  |  |36148|    128|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|    128|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|    128|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|    128|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 128]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36149|    128|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36150|    128|            stack = fiber->data + fiber->frame;\
  |  |  |  |36151|    128|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|    128|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36152|    128|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36051|    128|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36047|    128|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36048|    128|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36048:9): [True: 0, False: 128]
  |  |  |  |  |  |  |  |  |  Branch (36048:85): [Folded, False: 128]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36050|    128|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36019|    128|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36153|    128|        }\
  |  |  |  |36154|    166|    }
  |  |  ------------------
  ------------------
36734|       |
36735|    163|    VM_OP(JOP_BXOR)
  ------------------
  |  |36017|      0|#define VM_OP(op) label_##op :
  ------------------
36736|      0|    vm_bitop(^);
  ------------------
  |  |36155|      0|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  ------------------
  |  |  |  |36135|      0|    {\
  |  |  |  |36136|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35997|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36137|      0|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35998|      0|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36138|      0|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (801:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (801:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                       if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (801:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (801:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36139|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36140|      0|            double y2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36141|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36155|      0|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  953|      0|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (953:33): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (953:53): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (953:73): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36142|      0|            if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |  953|      0|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (953:33): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (953:53): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (953:73): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36143|      0|            type1 x1 = (type1) y1;\
  |  |  |  |36144|      0|            int32_t x2 = (int32_t) y2;\
  |  |  |  |36145|      0|            stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |36146|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36050|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36019|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36147|      0|        } else {\
  |  |  |  |36148|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36149|      0|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36150|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |36151|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36152|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36051|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36047|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36048|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36048:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (36048:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36050|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36019|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36153|      0|        }\
  |  |  |  |36154|      0|    }
  |  |  ------------------
  ------------------
36737|       |
36738|      0|    VM_OP(JOP_BNOT) {
  ------------------
  |  |36017|      0|#define VM_OP(op) label_##op :
  ------------------
36739|      0|        Janet op = stack[E];
  ------------------
  |  |36000|      0|#define E (*pc >> 16)
  ------------------
36740|      0|        if (janet_checktype(op, JANET_NUMBER)) {
  ------------------
  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 0, False: 0]
  |  |  |  Branch (801:6): [True: 0, Folded]
  |  |  ------------------
  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36741|      0|            stack[A] = janet_wrap_integer(~janet_unwrap_integer(op));
  ------------------
  |  |35996|      0|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                          stack[A] = janet_wrap_integer(~janet_unwrap_integer(op));
  ------------------
  |  |  958|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
36742|      0|            vm_pcnext();
  ------------------
  |  |36050|      0|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36743|      0|        } else {
36744|      0|            vm_commit();
  ------------------
  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  ------------------
  ------------------
36745|      0|            Janet a = janet_unary_call("~", op);
36746|      0|            stack = fiber->data + fiber->frame;
36747|      0|            stack[A] = a;
  ------------------
  |  |35996|      0|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36748|      0|            vm_checkgc_pcnext();
  ------------------
  |  |36051|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36047|      0|#define maybe_collect() do {\
  |  |  |  |36048|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 0, False: 0]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36050|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36749|      0|        }
36750|      0|    }
36751|       |
36752|      0|    VM_OP(JOP_SHIFT_RIGHT_UNSIGNED)
  ------------------
  |  |36017|      0|#define VM_OP(op) label_##op :
  ------------------
36753|      0|    vm_bitopu( >>);
  ------------------
  |  |36156|      0|#define vm_bitopu(op) _vm_bitop(op, uint32_t, janet_checkuintrange, "32-bit unsigned integers")
  |  |  ------------------
  |  |  |  |36135|      0|    {\
  |  |  |  |36136|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35997|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36137|      0|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35998|      0|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36138|      0|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (801:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (801:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                       if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (801:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (801:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36139|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36140|      0|            double y2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36141|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36156|      0|#define vm_bitopu(op) _vm_bitop(op, uint32_t, janet_checkuintrange, "32-bit unsigned integers")
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  954|      0|#define janet_checkuintrange(x) ((x) >= 0 && (x) <= UINT32_MAX && (x) == (uint32_t)(x))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (954:34): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (954:46): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (954:67): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36142|      0|            if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |  953|      0|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (953:33): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (953:53): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (953:73): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36143|      0|            type1 x1 = (type1) y1;\
  |  |  |  |36144|      0|            int32_t x2 = (int32_t) y2;\
  |  |  |  |36145|      0|            stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |36146|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36050|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36019|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36147|      0|        } else {\
  |  |  |  |36148|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36149|      0|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36150|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |36151|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36152|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36051|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36047|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36048|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36048:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (36048:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36050|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36019|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36153|      0|        }\
  |  |  |  |36154|      0|    }
  |  |  ------------------
  ------------------
36754|       |
36755|      0|    VM_OP(JOP_SHIFT_RIGHT_UNSIGNED_IMMEDIATE)
  ------------------
  |  |36017|      0|#define VM_OP(op) label_##op :
  ------------------
36756|      0|    vm_bitopu_immediate( >>);
  ------------------
  |  |36115|      0|#define vm_bitopu_immediate(op) _vm_bitop_immediate(op, uint32_t, janet_checkuintrange, "32-bit unsigned integers");
  |  |  ------------------
  |  |  |  |36097|      0|    {\
  |  |  |  |36098|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35997|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36099|      0|        if (!janet_checktype(op1, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (801:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36099:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |36100|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36101|      0|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |36102|      0|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |  |  |36103|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |36104|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36105|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36051|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36047|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36048|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36048:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (36048:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36050|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36019|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36106|      0|        } else {\
  |  |  |  |36107|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36108|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36115|      0|#define vm_bitopu_immediate(op) _vm_bitop_immediate(op, uint32_t, janet_checkuintrange, "32-bit unsigned integers");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  954|      0|#define janet_checkuintrange(x) ((x) >= 0 && (x) <= UINT32_MAX && (x) == (uint32_t)(x))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (954:34): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (954:46): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (954:67): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36109|      0|            type1 x1 = (type1) y1;\
  |  |  |  |36110|      0|            stack[A] = janet_wrap_number((type1) (x1 op CS));\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = janet_wrap_number((type1) (x1 op CS));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |36111|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36050|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36019|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36112|      0|        }\
  |  |  |  |36113|      0|    }
  |  |  ------------------
  ------------------
36757|       |
36758|      0|    VM_OP(JOP_SHIFT_RIGHT)
  ------------------
  |  |36017|      0|#define VM_OP(op) label_##op :
  ------------------
36759|      0|    vm_bitop( >>);
  ------------------
  |  |36155|      0|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  ------------------
  |  |  |  |36135|      0|    {\
  |  |  |  |36136|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35997|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36137|      0|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35998|      0|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36138|      0|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (801:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (801:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                       if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (801:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (801:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36139|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36140|      0|            double y2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36141|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36155|      0|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  953|      0|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (953:33): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (953:53): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (953:73): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36142|      0|            if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |  953|      0|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (953:33): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (953:53): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (953:73): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36143|      0|            type1 x1 = (type1) y1;\
  |  |  |  |36144|      0|            int32_t x2 = (int32_t) y2;\
  |  |  |  |36145|      0|            stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |36146|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36050|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36019|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36147|      0|        } else {\
  |  |  |  |36148|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36149|      0|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36150|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |36151|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36152|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36051|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36047|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36048|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36048:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (36048:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36050|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36019|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36153|      0|        }\
  |  |  |  |36154|      0|    }
  |  |  ------------------
  ------------------
36760|       |
36761|      0|    VM_OP(JOP_SHIFT_RIGHT_IMMEDIATE)
  ------------------
  |  |36017|      0|#define VM_OP(op) label_##op :
  ------------------
36762|      0|    vm_bitop_immediate( >>);
  ------------------
  |  |36114|      0|#define vm_bitop_immediate(op) _vm_bitop_immediate(op, int32_t, janet_checkintrange, "32-bit signed integers");
  |  |  ------------------
  |  |  |  |36097|      0|    {\
  |  |  |  |36098|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35997|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36099|      0|        if (!janet_checktype(op1, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (801:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36099:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |36100|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36101|      0|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |36102|      0|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |  |  |36103|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |36104|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36105|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36051|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36047|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36048|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36048:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (36048:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36050|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36019|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36106|      0|        } else {\
  |  |  |  |36107|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36108|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36114|      0|#define vm_bitop_immediate(op) _vm_bitop_immediate(op, int32_t, janet_checkintrange, "32-bit signed integers");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  953|      0|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (953:33): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (953:53): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (953:73): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36109|      0|            type1 x1 = (type1) y1;\
  |  |  |  |36110|      0|            stack[A] = janet_wrap_number((type1) (x1 op CS));\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = janet_wrap_number((type1) (x1 op CS));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |36111|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36050|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36019|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36112|      0|        }\
  |  |  |  |36113|      0|    }
  |  |  ------------------
  ------------------
36763|       |
36764|      0|    VM_OP(JOP_SHIFT_LEFT)
  ------------------
  |  |36017|      0|#define VM_OP(op) label_##op :
  ------------------
36765|      0|    vm_bitop( <<);
  ------------------
  |  |36155|      0|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  ------------------
  |  |  |  |36135|      0|    {\
  |  |  |  |36136|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35997|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36137|      0|        Janet op2 = stack[C];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35998|      0|#define C (*pc >> 24)
  |  |  |  |  ------------------
  |  |  |  |36138|      0|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (801:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (801:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                       if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (801:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (801:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36139|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36140|      0|            double y2 = janet_unwrap_number(op2);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36141|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36155|      0|#define vm_bitop(op) _vm_bitop(op, int32_t, janet_checkintrange, "32-bit signed integers")
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  953|      0|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (953:33): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (953:53): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (953:73): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36142|      0|            if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |  953|      0|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (953:33): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (953:53): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (953:73): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!janet_checkintrange(y2)) { vm_commit(); janet_panicf("rhs must be valid 32-bit signed integer, got %f", op2); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36143|      0|            type1 x1 = (type1) y1;\
  |  |  |  |36144|      0|            int32_t x2 = (int32_t) y2;\
  |  |  |  |36145|      0|            stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = janet_wrap_number((type1) (x1 op x2));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |36146|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36050|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36019|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36147|      0|        } else {\
  |  |  |  |36148|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36149|      0|            Janet a = janet_binop_call(#op, "r" #op, op1, op2);\
  |  |  |  |36150|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |36151|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36152|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36051|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36047|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36048|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36048:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (36048:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36050|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36019|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36153|      0|        }\
  |  |  |  |36154|      0|    }
  |  |  ------------------
  ------------------
36766|       |
36767|      0|    VM_OP(JOP_SHIFT_LEFT_IMMEDIATE)
  ------------------
  |  |36017|      0|#define VM_OP(op) label_##op :
  ------------------
36768|      0|    vm_bitop_immediate( <<);
  ------------------
  |  |36114|      0|#define vm_bitop_immediate(op) _vm_bitop_immediate(op, int32_t, janet_checkintrange, "32-bit signed integers");
  |  |  ------------------
  |  |  |  |36097|      0|    {\
  |  |  |  |36098|      0|        Janet op1 = stack[B];\
  |  |  |  |  ------------------
  |  |  |  |  |  |35997|      0|#define B ((*pc >> 16) & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36099|      0|        if (!janet_checktype(op1, JANET_NUMBER)) {\
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (801:6): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36099:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |36100|      0|            vm_commit();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36101|      0|            Janet _argv[2] = { op1, janet_wrap_number(CS) };\
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |36102|      0|            Janet a = janet_mcall(#op, 2, _argv);\
  |  |  |  |36103|      0|            stack = fiber->data + fiber->frame;\
  |  |  |  |36104|      0|            stack[A] = a;\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |36105|      0|            vm_checkgc_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36051|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36047|      0|#define maybe_collect() do {\
  |  |  |  |  |  |  |  |36048|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (36048:9): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (36048:85): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36050|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |36019|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36106|      0|        } else {\
  |  |  |  |36107|      0|            double y1 = janet_unwrap_number(op1);\
  |  |  |  |  ------------------
  |  |  |  |  |  |  834|      0|#define janet_unwrap_number(x) ((x).number)
  |  |  |  |  ------------------
  |  |  |  |36108|      0|            if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36114|      0|#define vm_bitop_immediate(op) _vm_bitop_immediate(op, int32_t, janet_checkintrange, "32-bit signed integers");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  953|      0|#define janet_checkintrange(x) ((x) >= INT32_MIN && (x) <= INT32_MAX && (x) == (int32_t)(x))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (953:33): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (953:53): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (953:73): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                           if (!rangecheck(y1)) { vm_commit(); janet_panicf("value %v out of range for " msg, op1); }\
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36109|      0|            type1 x1 = (type1) y1;\
  |  |  |  |36110|      0|            stack[A] = janet_wrap_number((type1) (x1 op CS));\
  |  |  |  |  ------------------
  |  |  |  |  |  |35996|      0|#define A ((*pc >> 8)  & 0xFF)
  |  |  |  |  ------------------
  |  |  |  |                           stack[A] = janet_wrap_number((type1) (x1 op CS));\
  |  |  |  |  ------------------
  |  |  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  |  |  ------------------
  |  |  |  |36111|      0|            vm_pcnext();\
  |  |  |  |  ------------------
  |  |  |  |  |  |36050|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36019|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36112|      0|        }\
  |  |  |  |36113|      0|    }
  |  |  ------------------
  ------------------
36769|       |
36770|   567M|    VM_OP(JOP_MOVE_NEAR)
  ------------------
  |  |36017|   567M|#define VM_OP(op) label_##op :
  ------------------
36771|   567M|    stack[A] = stack[E];
  ------------------
  |  |35996|   567M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  stack[A] = stack[E];
  ------------------
  |  |36000|   567M|#define E (*pc >> 16)
  ------------------
36772|   567M|    vm_pcnext();
  ------------------
  |  |36050|   567M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|   567M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36773|       |
36774|   567M|    VM_OP(JOP_MOVE_FAR)
  ------------------
  |  |36017|   108k|#define VM_OP(op) label_##op :
  ------------------
36775|   108k|    stack[E] = stack[A];
  ------------------
  |  |36000|   108k|#define E (*pc >> 16)
  ------------------
                  stack[E] = stack[A];
  ------------------
  |  |35996|   108k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36776|   108k|    vm_pcnext();
  ------------------
  |  |36050|   108k|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|   108k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36777|       |
36778|   121M|    VM_OP(JOP_JUMP)
  ------------------
  |  |36017|   121M|#define VM_OP(op) label_##op :
  ------------------
36779|   121M|    vm_maybe_auto_suspend(DS <= 0);
  ------------------
  |  |36071|   121M|#define vm_maybe_auto_suspend(COND) do { \
  |  |36072|   121M|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (36072:9): [True: 61.9M, False: 59.5M]
  |  |  |  Branch (36072:19): [True: 0, False: 61.9M]
  |  |  ------------------
  |  |36073|      0|        fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  784|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  |  |  ------------------
  |  |                       fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  785|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  |  |  ------------------
  |  |36074|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |36036|      0|#define vm_return(sig, val) do { \
  |  |  |  |36037|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |36038|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36039|      0|    return (sig); \
  |  |  |  |36040|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36040:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36075|      0|    } \
  |  |36076|   121M|} while (0)
  |  |  ------------------
  |  |  |  Branch (36076:10): [Folded, False: 121M]
  |  |  ------------------
  ------------------
36780|   121M|    pc += DS;
  ------------------
  |  |36004|   121M|#define DS (*((int32_t *)pc) >> 8)
  ------------------
36781|   121M|    vm_next();
  ------------------
  |  |36019|   121M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  ------------------
36782|       |
36783|   121M|    VM_OP(JOP_JUMP_IF)
  ------------------
  |  |36017|   125k|#define VM_OP(op) label_##op :
  ------------------
36784|   125k|    if (janet_truthy(stack[A])) {
  ------------------
  |  |  813|   125k|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|   251k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 125k]
  |  |  |  |  ------------------
  |  |  |  |  802|   251k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|   251k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|   125k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|   125k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|   125k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|   125k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 125k, False: 0]
  |  |  ------------------
  |  |  814|   125k|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|   251k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 125k]
  |  |  |  |  ------------------
  |  |  |  |  802|   251k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|   251k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|   125k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|   125k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|   125k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|   125k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 0, False: 125k]
  |  |  |  Branch (814:47): [True: 102k, False: 23.4k]
  |  |  ------------------
  ------------------
36785|   102k|        vm_maybe_auto_suspend(ES <= 0);
  ------------------
  |  |36071|   102k|#define vm_maybe_auto_suspend(COND) do { \
  |  |36072|   102k|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (36072:9): [True: 0, False: 102k]
  |  |  |  Branch (36072:19): [True: 0, False: 0]
  |  |  ------------------
  |  |36073|      0|        fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  784|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  |  |  ------------------
  |  |                       fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  785|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  |  |  ------------------
  |  |36074|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |36036|      0|#define vm_return(sig, val) do { \
  |  |  |  |36037|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |36038|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36039|      0|    return (sig); \
  |  |  |  |36040|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36040:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36075|      0|    } \
  |  |36076|   102k|} while (0)
  |  |  ------------------
  |  |  |  Branch (36076:10): [Folded, False: 102k]
  |  |  ------------------
  ------------------
36786|   102k|        pc += ES;
  ------------------
  |  |36005|   102k|#define ES (*((int32_t *)pc) >> 16)
  ------------------
36787|   102k|    } else {
36788|  23.4k|        pc++;
36789|  23.4k|    }
36790|   125k|    vm_next();
  ------------------
  |  |36019|   125k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  ------------------
36791|       |
36792|   414M|    VM_OP(JOP_JUMP_IF_NOT)
  ------------------
  |  |36017|   414M|#define VM_OP(op) label_##op :
  ------------------
36793|   414M|    if (janet_truthy(stack[A])) {
  ------------------
  |  |  813|   414M|    (!janet_checktype((x), JANET_NIL) && \
  |  |  ------------------
  |  |  |  |  801|   828M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 414M]
  |  |  |  |  ------------------
  |  |  |  |  802|   828M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|   828M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|   414M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|   414M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|   414M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|   414M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (813:6): [True: 401M, False: 12.6M]
  |  |  ------------------
  |  |  814|   414M|     (!janet_checktype((x), JANET_BOOLEAN) || ((x).u64 & 0x1)))
  |  |  ------------------
  |  |  |  |  801|   803M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 401M]
  |  |  |  |  ------------------
  |  |  |  |  802|   803M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|   803M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|   401M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|   401M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|   401M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|   401M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (814:7): [True: 26.3M, False: 375M]
  |  |  |  Branch (814:47): [True: 130M, False: 244M]
  |  |  ------------------
  ------------------
36794|   156M|        pc++;
36795|   257M|    } else {
36796|   257M|        vm_maybe_auto_suspend(ES <= 0);
  ------------------
  |  |36071|   257M|#define vm_maybe_auto_suspend(COND) do { \
  |  |36072|   257M|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (36072:9): [True: 264, False: 257M]
  |  |  |  Branch (36072:19): [True: 0, False: 264]
  |  |  ------------------
  |  |36073|      0|        fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  784|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  |  |  ------------------
  |  |                       fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  785|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  |  |  ------------------
  |  |36074|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |36036|      0|#define vm_return(sig, val) do { \
  |  |  |  |36037|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |36038|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36039|      0|    return (sig); \
  |  |  |  |36040|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36040:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36075|      0|    } \
  |  |36076|   257M|} while (0)
  |  |  ------------------
  |  |  |  Branch (36076:10): [Folded, False: 257M]
  |  |  ------------------
  ------------------
36797|   257M|        pc += ES;
  ------------------
  |  |36005|   257M|#define ES (*((int32_t *)pc) >> 16)
  ------------------
36798|   257M|    }
36799|   414M|    vm_next();
  ------------------
  |  |36019|   414M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  ------------------
36800|       |
36801|   414M|    VM_OP(JOP_JUMP_IF_NIL)
  ------------------
  |  |36017|  36.7M|#define VM_OP(op) label_##op :
  ------------------
36802|  36.7M|    if (janet_checktype(stack[A], JANET_NIL)) {
  ------------------
  |  |  801|  36.7M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 12.0M, False: 24.7M]
  |  |  |  Branch (801:6): [Folded, False: 36.7M]
  |  |  ------------------
  |  |  802|  36.7M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  36.7M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  36.7M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  36.7M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  36.7M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  36.7M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36803|  12.0M|        vm_maybe_auto_suspend(ES <= 0);
  ------------------
  |  |36071|  12.0M|#define vm_maybe_auto_suspend(COND) do { \
  |  |36072|  12.0M|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (36072:9): [True: 0, False: 12.0M]
  |  |  |  Branch (36072:19): [True: 0, False: 0]
  |  |  ------------------
  |  |36073|      0|        fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  784|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  |  |  ------------------
  |  |                       fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  785|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  |  |  ------------------
  |  |36074|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |36036|      0|#define vm_return(sig, val) do { \
  |  |  |  |36037|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |36038|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36039|      0|    return (sig); \
  |  |  |  |36040|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36040:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36075|      0|    } \
  |  |36076|  12.0M|} while (0)
  |  |  ------------------
  |  |  |  Branch (36076:10): [Folded, False: 12.0M]
  |  |  ------------------
  ------------------
36804|  12.0M|        pc += ES;
  ------------------
  |  |36005|  12.0M|#define ES (*((int32_t *)pc) >> 16)
  ------------------
36805|  24.7M|    } else {
36806|  24.7M|        pc++;
36807|  24.7M|    }
36808|  36.7M|    vm_next();
  ------------------
  |  |36019|  36.7M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  ------------------
36809|       |
36810|  36.7M|    VM_OP(JOP_JUMP_IF_NOT_NIL)
  ------------------
  |  |36017|  1.37M|#define VM_OP(op) label_##op :
  ------------------
36811|  1.37M|    if (janet_checktype(stack[A], JANET_NIL)) {
  ------------------
  |  |  801|  1.37M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 834k, False: 544k]
  |  |  |  Branch (801:6): [Folded, False: 1.37M]
  |  |  ------------------
  |  |  802|  1.37M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  1.37M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  1.37M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  1.37M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.37M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.37M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36812|   834k|        pc++;
36813|   834k|    } else {
36814|   544k|        vm_maybe_auto_suspend(ES <= 0);
  ------------------
  |  |36071|   544k|#define vm_maybe_auto_suspend(COND) do { \
  |  |36072|   544k|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (36072:9): [True: 0, False: 544k]
  |  |  |  Branch (36072:19): [True: 0, False: 0]
  |  |  ------------------
  |  |36073|      0|        fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  784|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  |  |  ------------------
  |  |                       fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  785|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  |  |  ------------------
  |  |36074|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |36036|      0|#define vm_return(sig, val) do { \
  |  |  |  |36037|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |36038|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36039|      0|    return (sig); \
  |  |  |  |36040|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36040:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36075|      0|    } \
  |  |36076|   544k|} while (0)
  |  |  ------------------
  |  |  |  Branch (36076:10): [Folded, False: 544k]
  |  |  ------------------
  ------------------
36815|   544k|        pc += ES;
  ------------------
  |  |36005|   544k|#define ES (*((int32_t *)pc) >> 16)
  ------------------
36816|   544k|    }
36817|  1.37M|    vm_next();
  ------------------
  |  |36019|  1.37M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  ------------------
36818|       |
36819|  47.6M|    VM_OP(JOP_LESS_THAN)
  ------------------
  |  |36017|  47.6M|#define VM_OP(op) label_##op :
  ------------------
36820|  47.6M|    vm_compop( <);
  ------------------
  |  |36158|  47.6M|    {\
  |  |36159|  47.6M|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |35997|  47.6M|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36160|  47.6M|        Janet op2 = stack[C];\
  |  |  ------------------
  |  |  |  |35998|  47.6M|#define C (*pc >> 24)
  |  |  ------------------
  |  |36161|  47.6M|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  801|  95.2M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:5): [True: 47.3M, False: 207k]
  |  |  |  |  |  Branch (801:6): [True: 47.6M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  802|  95.2M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|  47.6M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 47.3M, False: 207k]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 207k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|  95.2M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                       if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  801|  47.3M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:5): [True: 47.3M, False: 146]
  |  |  |  |  |  Branch (801:6): [True: 47.3M, Folded]
  |  |  |  |  ------------------
  |  |  |  |  802|  47.3M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|  47.3M|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 47.3M, False: 146]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 146]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|  47.3M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36162|  47.3M|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  834|  47.3M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36163|  47.3M|            double x2 = janet_unwrap_number(op2);\
  |  |  ------------------
  |  |  |  |  834|  47.3M|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36164|  47.3M|            stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |35996|  47.3M|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |  829|  47.3M|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  817|  47.3M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  47.3M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  47.3M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36165|  47.3M|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36050|  47.3M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|  47.3M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36166|  47.3M|        } else {\
  |  |36167|   207k|            vm_commit();\
  |  |  ------------------
  |  |  |  |36030|   207k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|   207k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|   207k|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36030:70): [Folded, False: 207k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36168|   207k|            Janet a = janet_wrap_boolean(janet_compare(op1, op2) op 0);\
  |  |  ------------------
  |  |  |  |  829|   207k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  817|   207k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|   207k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|   207k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36169|   207k|            stack = fiber->data + fiber->frame;\
  |  |36170|   207k|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |35996|   207k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36171|   207k|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36051|   207k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36047|   207k|#define maybe_collect() do {\
  |  |  |  |  |  |36048|   207k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36048:9): [True: 0, False: 207k]
  |  |  |  |  |  |  |  Branch (36048:85): [Folded, False: 207k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36050|   207k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36019|   207k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36172|   207k|        }\
  |  |36173|  47.6M|    }
  ------------------
36821|       |
36822|  47.6M|    VM_OP(JOP_LESS_THAN_EQUAL)
  ------------------
  |  |36017|   106k|#define VM_OP(op) label_##op :
  ------------------
36823|   106k|    vm_compop( <=);
  ------------------
  |  |36158|   106k|    {\
  |  |36159|   106k|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |35997|   106k|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36160|   106k|        Janet op2 = stack[C];\
  |  |  ------------------
  |  |  |  |35998|   106k|#define C (*pc >> 24)
  |  |  ------------------
  |  |36161|   106k|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  801|   212k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:5): [True: 61.2k, False: 44.9k]
  |  |  |  |  |  Branch (801:6): [True: 106k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  802|   212k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|   106k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 61.2k, False: 44.9k]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 44.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|   212k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                       if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  801|  61.2k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:5): [True: 61.2k, False: 11]
  |  |  |  |  |  Branch (801:6): [True: 61.2k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  802|  61.2k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|  61.2k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 61.2k, False: 11]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 11]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|  61.2k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36162|  61.2k|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  834|  61.2k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36163|  61.2k|            double x2 = janet_unwrap_number(op2);\
  |  |  ------------------
  |  |  |  |  834|  61.2k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36164|  61.2k|            stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |35996|  61.2k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |  829|  61.2k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  817|  61.2k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  61.2k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  61.2k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36165|  61.2k|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36050|  61.2k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|  61.2k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36166|  61.2k|        } else {\
  |  |36167|  44.9k|            vm_commit();\
  |  |  ------------------
  |  |  |  |36030|  44.9k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|  44.9k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|  44.9k|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36030:70): [Folded, False: 44.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36168|  44.9k|            Janet a = janet_wrap_boolean(janet_compare(op1, op2) op 0);\
  |  |  ------------------
  |  |  |  |  829|  44.9k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  817|  44.9k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  44.9k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  44.9k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36169|  44.9k|            stack = fiber->data + fiber->frame;\
  |  |36170|  44.9k|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |35996|  44.9k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36171|  44.9k|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36051|  44.9k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36047|  44.9k|#define maybe_collect() do {\
  |  |  |  |  |  |36048|  44.9k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36048:9): [True: 0, False: 44.9k]
  |  |  |  |  |  |  |  Branch (36048:85): [Folded, False: 44.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36050|  44.9k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36019|  44.9k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36172|  44.9k|        }\
  |  |36173|   106k|    }
  ------------------
36824|       |
36825|   106k|    VM_OP(JOP_LESS_THAN_IMMEDIATE)
  ------------------
  |  |36017|    167|#define VM_OP(op) label_##op :
  ------------------
36826|    167|    vm_compop_imm( <);
  ------------------
  |  |36175|    167|    {\
  |  |36176|    167|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |35997|    167|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36177|    167|        if (janet_checktype(op1, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  801|    167|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:5): [True: 51, False: 116]
  |  |  |  |  |  Branch (801:6): [True: 167, Folded]
  |  |  |  |  ------------------
  |  |  |  |  802|    167|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|    167|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 51, False: 116]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 116]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|    167|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36178|     51|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  834|     51|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36179|     51|            double x2 = (double) CS; \
  |  |  ------------------
  |  |  |  |36003|     51|#define CS (*((int32_t *)pc) >> 24)
  |  |  ------------------
  |  |36180|     51|            stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |35996|     51|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |  829|     51|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  817|     51|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|     51|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|     51|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36181|     51|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36050|     51|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|     51|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36182|    116|        } else {\
  |  |36183|    116|            vm_commit();\
  |  |  ------------------
  |  |  |  |36030|    116|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|    116|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|    116|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36030:70): [Folded, False: 116]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36184|    116|            Janet a = janet_wrap_boolean(janet_compare(op1, janet_wrap_integer(CS)) op 0);\
  |  |  ------------------
  |  |  |  |  829|    116|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  817|    116|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|    116|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|    116|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36185|    116|            stack = fiber->data + fiber->frame;\
  |  |36186|    116|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |35996|    116|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36187|    116|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36051|    116|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36047|    116|#define maybe_collect() do {\
  |  |  |  |  |  |36048|    116|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36048:9): [True: 0, False: 116]
  |  |  |  |  |  |  |  Branch (36048:85): [Folded, False: 116]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36050|    116|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36019|    116|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36188|    116|        }\
  |  |36189|    167|    }
  ------------------
36827|       |
36828|   675k|    VM_OP(JOP_GREATER_THAN)
  ------------------
  |  |36017|   675k|#define VM_OP(op) label_##op :
  ------------------
36829|   675k|    vm_compop( >);
  ------------------
  |  |36158|   675k|    {\
  |  |36159|   675k|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |35997|   675k|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36160|   675k|        Janet op2 = stack[C];\
  |  |  ------------------
  |  |  |  |35998|   675k|#define C (*pc >> 24)
  |  |  ------------------
  |  |36161|   675k|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  801|  1.35M|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:5): [True: 675k, False: 721]
  |  |  |  |  |  Branch (801:6): [True: 675k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  802|  1.35M|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|   675k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 675k, False: 721]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 721]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|  1.35M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                       if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  801|   675k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:5): [True: 675k, False: 35]
  |  |  |  |  |  Branch (801:6): [True: 675k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  802|   675k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|   675k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 675k, False: 35]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 35]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|   675k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36162|   675k|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  834|   675k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36163|   675k|            double x2 = janet_unwrap_number(op2);\
  |  |  ------------------
  |  |  |  |  834|   675k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36164|   675k|            stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |35996|   675k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |  829|   675k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  817|   675k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|   675k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|   675k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36165|   675k|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36050|   675k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|   675k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36166|   675k|        } else {\
  |  |36167|    756|            vm_commit();\
  |  |  ------------------
  |  |  |  |36030|    756|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|    756|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|    756|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36030:70): [Folded, False: 756]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36168|    756|            Janet a = janet_wrap_boolean(janet_compare(op1, op2) op 0);\
  |  |  ------------------
  |  |  |  |  829|    756|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  817|    756|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|    756|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|    756|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36169|    756|            stack = fiber->data + fiber->frame;\
  |  |36170|    756|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |35996|    756|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36171|    756|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36051|    756|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36047|    756|#define maybe_collect() do {\
  |  |  |  |  |  |36048|    756|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36048:9): [True: 0, False: 756]
  |  |  |  |  |  |  |  Branch (36048:85): [Folded, False: 756]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36050|    756|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36019|    756|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36172|    756|        }\
  |  |36173|   675k|    }
  ------------------
36830|       |
36831|   675k|    VM_OP(JOP_GREATER_THAN_EQUAL)
  ------------------
  |  |36017|  55.9k|#define VM_OP(op) label_##op :
  ------------------
36832|  55.9k|    vm_compop( >=);
  ------------------
  |  |36158|  55.9k|    {\
  |  |36159|  55.9k|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |35997|  55.9k|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36160|  55.9k|        Janet op2 = stack[C];\
  |  |  ------------------
  |  |  |  |35998|  55.9k|#define C (*pc >> 24)
  |  |  ------------------
  |  |36161|  55.9k|        if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  801|   111k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:5): [True: 52.6k, False: 3.31k]
  |  |  |  |  |  Branch (801:6): [True: 55.9k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  802|   111k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|  55.9k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 52.6k, False: 3.31k]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 3.31k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|   111k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                       if (janet_checktype(op1, JANET_NUMBER) && janet_checktype(op2, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  801|  52.6k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:5): [True: 52.6k, False: 12]
  |  |  |  |  |  Branch (801:6): [True: 52.6k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  802|  52.6k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|  52.6k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 52.6k, False: 12]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|  52.6k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36162|  52.6k|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  834|  52.6k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36163|  52.6k|            double x2 = janet_unwrap_number(op2);\
  |  |  ------------------
  |  |  |  |  834|  52.6k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36164|  52.6k|            stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |35996|  52.6k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |  829|  52.6k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  817|  52.6k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  52.6k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  52.6k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36165|  52.6k|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36050|  52.6k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|  52.6k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36166|  52.6k|        } else {\
  |  |36167|  3.32k|            vm_commit();\
  |  |  ------------------
  |  |  |  |36030|  3.32k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|  3.32k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|  3.32k|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36030:70): [Folded, False: 3.32k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36168|  3.32k|            Janet a = janet_wrap_boolean(janet_compare(op1, op2) op 0);\
  |  |  ------------------
  |  |  |  |  829|  3.32k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  817|  3.32k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  3.32k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  3.32k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36169|  3.32k|            stack = fiber->data + fiber->frame;\
  |  |36170|  3.32k|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |35996|  3.32k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36171|  3.32k|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36051|  3.32k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36047|  3.32k|#define maybe_collect() do {\
  |  |  |  |  |  |36048|  3.32k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36048:9): [True: 0, False: 3.32k]
  |  |  |  |  |  |  |  Branch (36048:85): [Folded, False: 3.32k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36050|  3.32k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36019|  3.32k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36172|  3.32k|        }\
  |  |36173|  55.9k|    }
  ------------------
36833|       |
36834|   145k|    VM_OP(JOP_GREATER_THAN_IMMEDIATE)
  ------------------
  |  |36017|   145k|#define VM_OP(op) label_##op :
  ------------------
36835|   145k|    vm_compop_imm( >);
  ------------------
  |  |36175|   145k|    {\
  |  |36176|   145k|        Janet op1 = stack[B];\
  |  |  ------------------
  |  |  |  |35997|   145k|#define B ((*pc >> 16) & 0xFF)
  |  |  ------------------
  |  |36177|   145k|        if (janet_checktype(op1, JANET_NUMBER)) {\
  |  |  ------------------
  |  |  |  |  801|   145k|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:5): [True: 145k, False: 44]
  |  |  |  |  |  Branch (801:6): [True: 145k, Folded]
  |  |  |  |  ------------------
  |  |  |  |  802|   145k|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|   145k|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 145k, False: 44]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 44]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|   145k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36178|   145k|            double x1 = janet_unwrap_number(op1);\
  |  |  ------------------
  |  |  |  |  834|   145k|#define janet_unwrap_number(x) ((x).number)
  |  |  ------------------
  |  |36179|   145k|            double x2 = (double) CS; \
  |  |  ------------------
  |  |  |  |36003|   145k|#define CS (*((int32_t *)pc) >> 24)
  |  |  ------------------
  |  |36180|   145k|            stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |35996|   145k|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |                           stack[A] = janet_wrap_boolean(x1 op x2);\
  |  |  ------------------
  |  |  |  |  829|   145k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  817|   145k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|   145k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|   145k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36181|   145k|            vm_pcnext();\
  |  |  ------------------
  |  |  |  |36050|   145k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|   145k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36182|   145k|        } else {\
  |  |36183|     44|            vm_commit();\
  |  |  ------------------
  |  |  |  |36030|     44|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|     44|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|     44|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36030:70): [Folded, False: 44]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36184|     44|            Janet a = janet_wrap_boolean(janet_compare(op1, janet_wrap_integer(CS)) op 0);\
  |  |  ------------------
  |  |  |  |  829|     44|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  |  |  ------------------
  |  |  |  |  |  |  817|     44|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|     44|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|     44|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36185|     44|            stack = fiber->data + fiber->frame;\
  |  |36186|     44|            stack[A] = a;\
  |  |  ------------------
  |  |  |  |35996|     44|#define A ((*pc >> 8)  & 0xFF)
  |  |  ------------------
  |  |36187|     44|            vm_checkgc_pcnext();\
  |  |  ------------------
  |  |  |  |36051|     44|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36047|     44|#define maybe_collect() do {\
  |  |  |  |  |  |36048|     44|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36048:9): [True: 0, False: 44]
  |  |  |  |  |  |  |  Branch (36048:85): [Folded, False: 44]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  |  |  ------------------
  |  |  |  |  |  |36050|     44|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |36019|     44|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36188|     44|        }\
  |  |36189|   145k|    }
  ------------------
36836|       |
36837|   216M|    VM_OP(JOP_EQUALS)
  ------------------
  |  |36017|   216M|#define VM_OP(op) label_##op :
  ------------------
36838|   216M|    stack[A] = janet_wrap_boolean(janet_equals(stack[B], stack[C]));
  ------------------
  |  |35996|   216M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  stack[A] = janet_wrap_boolean(janet_equals(stack[B], stack[C]));
  ------------------
  |  |  829|   216M|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  817|   216M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   216M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   216M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36839|   216M|    vm_pcnext();
  ------------------
  |  |36050|   216M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|   216M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36840|       |
36841|   216M|    VM_OP(JOP_EQUALS_IMMEDIATE)
  ------------------
  |  |36017|  12.1M|#define VM_OP(op) label_##op :
  ------------------
36842|  12.1M|    stack[A] = janet_wrap_boolean(janet_checktype(stack[B], JANET_NUMBER) && (janet_unwrap_number(stack[B]) == (double) CS));
  ------------------
  |  |35996|  12.1M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  stack[A] = janet_wrap_boolean(janet_checktype(stack[B], JANET_NUMBER) && (janet_unwrap_number(stack[B]) == (double) CS));
  ------------------
  |  |  829|  12.1M|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  817|  60.5M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  12.1M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  12.1M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (817:51): [True: 12.1M, False: 418]
  |  |  |  |  |  Branch (817:51): [True: 0, False: 418]
  |  |  |  |  |  Branch (817:51): [True: 12.1M, Folded]
  |  |  |  |  |  Branch (817:51): [True: 12.1M, False: 418]
  |  |  |  |  |  Branch (817:51): [True: 11.8M, False: 289k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36843|  12.1M|    vm_pcnext();
  ------------------
  |  |36050|  12.1M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|  12.1M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36844|       |
36845|  64.1M|    VM_OP(JOP_NOT_EQUALS)
  ------------------
  |  |36017|  64.1M|#define VM_OP(op) label_##op :
  ------------------
36846|  64.1M|    stack[A] = janet_wrap_boolean(!janet_equals(stack[B], stack[C]));
  ------------------
  |  |35996|  64.1M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  stack[A] = janet_wrap_boolean(!janet_equals(stack[B], stack[C]));
  ------------------
  |  |  829|  64.1M|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  817|  64.1M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  64.1M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  64.1M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36847|  64.1M|    vm_pcnext();
  ------------------
  |  |36050|  64.1M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|  64.1M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36848|       |
36849|  64.1M|    VM_OP(JOP_NOT_EQUALS_IMMEDIATE)
  ------------------
  |  |36017|  65.7k|#define VM_OP(op) label_##op :
  ------------------
36850|  65.7k|    stack[A] = janet_wrap_boolean(!janet_checktype(stack[B], JANET_NUMBER) || (janet_unwrap_number(stack[B]) != (double) CS));
  ------------------
  |  |35996|  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));
  ------------------
  |  |  829|  65.7k|#define janet_wrap_boolean(b) janet_nanbox_from_payload(JANET_BOOLEAN, !!(b))
  |  |  ------------------
  |  |  |  |  817|   328k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  65.7k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  65.7k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (817:51): [True: 65.7k, False: 0]
  |  |  |  |  |  Branch (817:51): [True: 0, False: 0]
  |  |  |  |  |  Branch (817:51): [True: 65.7k, Folded]
  |  |  |  |  |  Branch (817:51): [True: 0, False: 65.7k]
  |  |  |  |  |  Branch (817:51): [True: 65.5k, False: 215]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36851|  65.7k|    vm_pcnext();
  ------------------
  |  |36050|  65.7k|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|  65.7k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36852|       |
36853|  65.7k|    VM_OP(JOP_COMPARE) {
  ------------------
  |  |36017|    100|#define VM_OP(op) label_##op :
  ------------------
36854|    100|        Janet a = janet_wrap_integer(janet_compare(stack[B], stack[C]));
  ------------------
  |  |  958|    100|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|    100|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
36855|    100|        stack = fiber->data + fiber->frame;
36856|    100|        stack[A] = a;
  ------------------
  |  |35996|    100|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36857|    100|    }
36858|    100|    vm_pcnext();
  ------------------
  |  |36050|    100|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|    100|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36859|       |
36860|  42.6M|    VM_OP(JOP_NEXT)
  ------------------
  |  |36017|  42.6M|#define VM_OP(op) label_##op :
  ------------------
36861|  42.6M|    vm_commit();
  ------------------
  |  |36030|  42.6M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  801|  42.6M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|  42.6M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36030:70): [Folded, False: 42.6M]
  |  |  ------------------
  ------------------
36862|  42.6M|    {
36863|  42.6M|        Janet temp = janet_next_impl(stack[B], stack[C], 1);
  ------------------
  |  |35997|  42.6M|#define B ((*pc >> 16) & 0xFF)
  ------------------
                      Janet temp = janet_next_impl(stack[B], stack[C], 1);
  ------------------
  |  |35998|  42.6M|#define C (*pc >> 24)
  ------------------
36864|  42.6M|        vm_restore();
  ------------------
  |  |36031|  42.6M|#define vm_restore() do { \
  |  |36032|  42.6M|    stack = fiber->data + fiber->frame; \
  |  |36033|  42.6M|    pc = janet_stack_frame(stack)->pc; \
  |  |  ------------------
  |  |  |  |  801|  42.6M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|  42.6M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36034|  42.6M|    func = janet_stack_frame(stack)->func; \
  |  |  ------------------
  |  |  |  |  801|  42.6M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|  42.6M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36035|  42.6M|} while (0)
  |  |  ------------------
  |  |  |  Branch (36035:10): [Folded, False: 42.6M]
  |  |  ------------------
  ------------------
36865|  42.6M|        stack[A] = temp;
  ------------------
  |  |35996|  42.6M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36866|  42.6M|    }
36867|  42.6M|    vm_pcnext();
  ------------------
  |  |36050|  42.6M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|  42.6M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36868|       |
36869|  42.6M|    VM_OP(JOP_LOAD_NIL)
  ------------------
  |  |36017|  23.7M|#define VM_OP(op) label_##op :
  ------------------
36870|  23.7M|    stack[D] = janet_wrap_nil();
  ------------------
  |  |35999|  23.7M|#define D (*pc >> 8)
  ------------------
                  stack[D] = janet_wrap_nil();
  ------------------
  |  |  826|  23.7M|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|  23.7M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  23.7M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  23.7M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36871|  23.7M|    vm_pcnext();
  ------------------
  |  |36050|  23.7M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|  23.7M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36872|       |
36873|  23.7M|    VM_OP(JOP_LOAD_TRUE)
  ------------------
  |  |36017|   302k|#define VM_OP(op) label_##op :
  ------------------
36874|   302k|    stack[D] = janet_wrap_true();
  ------------------
  |  |35999|   302k|#define D (*pc >> 8)
  ------------------
                  stack[D] = janet_wrap_true();
  ------------------
  |  |  827|   302k|#define janet_wrap_true() janet_nanbox_from_payload(JANET_BOOLEAN, 1)
  |  |  ------------------
  |  |  |  |  817|   302k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   302k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   302k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36875|   302k|    vm_pcnext();
  ------------------
  |  |36050|   302k|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|   302k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36876|       |
36877|  11.2M|    VM_OP(JOP_LOAD_FALSE)
  ------------------
  |  |36017|  11.2M|#define VM_OP(op) label_##op :
  ------------------
36878|  11.2M|    stack[D] = janet_wrap_false();
  ------------------
  |  |35999|  11.2M|#define D (*pc >> 8)
  ------------------
                  stack[D] = janet_wrap_false();
  ------------------
  |  |  828|  11.2M|#define janet_wrap_false() janet_nanbox_from_payload(JANET_BOOLEAN, 0)
  |  |  ------------------
  |  |  |  |  817|  11.2M|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  11.2M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  11.2M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36879|  11.2M|    vm_pcnext();
  ------------------
  |  |36050|  11.2M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|  11.2M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36880|       |
36881|  32.2M|    VM_OP(JOP_LOAD_INTEGER)
  ------------------
  |  |36017|  32.2M|#define VM_OP(op) label_##op :
  ------------------
36882|  32.2M|    stack[A] = janet_wrap_integer(ES);
  ------------------
  |  |35996|  32.2M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  stack[A] = janet_wrap_integer(ES);
  ------------------
  |  |  958|  32.2M|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|  32.2M|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
36883|  32.2M|    vm_pcnext();
  ------------------
  |  |36050|  32.2M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|  32.2M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36884|       |
36885|   684M|    VM_OP(JOP_LOAD_CONSTANT) {
  ------------------
  |  |36017|   684M|#define VM_OP(op) label_##op :
  ------------------
36886|   684M|        int32_t cindex = (int32_t)E;
  ------------------
  |  |36000|   684M|#define E (*pc >> 16)
  ------------------
36887|   684M|        vm_assert(cindex < func->def->constants_length, "invalid constant");
  ------------------
  |  |36055|   684M|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |36054|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36054:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36055:36): [True: 0, False: 684M]
  |  |  |  Branch (36055:69): [Folded, False: 684M]
  |  |  ------------------
  ------------------
36888|   684M|        stack[A] = func->def->constants[cindex];
  ------------------
  |  |35996|   684M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36889|   684M|        vm_pcnext();
  ------------------
  |  |36050|   684M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|   684M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36890|   684M|    }
36891|       |
36892|  57.9M|    VM_OP(JOP_LOAD_SELF)
  ------------------
  |  |36017|  57.9M|#define VM_OP(op) label_##op :
  ------------------
36893|  57.9M|    stack[D] = janet_wrap_function(func);
  ------------------
  |  |35999|  57.9M|#define D (*pc >> 8)
  ------------------
                  stack[D] = janet_wrap_function(func);
  ------------------
  |  |  847|  57.9M|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  820|  57.9M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  57.9M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  57.9M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36894|  57.9M|    vm_pcnext();
  ------------------
  |  |36050|  57.9M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|  57.9M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36895|       |
36896|  57.9M|    VM_OP(JOP_LOAD_UPVALUE) {
  ------------------
  |  |36017|  51.3M|#define VM_OP(op) label_##op :
  ------------------
36897|  51.3M|        int32_t eindex = B;
  ------------------
  |  |35997|  51.3M|#define B ((*pc >> 16) & 0xFF)
  ------------------
36898|  51.3M|        int32_t vindex = C;
  ------------------
  |  |35998|  51.3M|#define C (*pc >> 24)
  ------------------
36899|  51.3M|        JanetFuncEnv *env;
36900|  51.3M|        vm_assert(func->def->environments_length > eindex, "invalid upvalue environment");
  ------------------
  |  |36055|  51.3M|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |36054|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36054:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36055:36): [True: 0, False: 51.3M]
  |  |  |  Branch (36055:69): [Folded, False: 51.3M]
  |  |  ------------------
  ------------------
36901|  51.3M|        env = func->envs[eindex];
36902|  51.3M|        vm_assert(env->length > vindex, "invalid upvalue index");
  ------------------
  |  |36055|  51.3M|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |36054|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36054:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36055:36): [True: 0, False: 51.3M]
  |  |  |  Branch (36055:69): [Folded, False: 51.3M]
  |  |  ------------------
  ------------------
36903|  51.3M|        vm_assert(janet_env_valid(env), "invalid upvalue environment");
  ------------------
  |  |36055|  51.3M|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |36054|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36054:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36055:36): [True: 0, False: 51.3M]
  |  |  |  Branch (36055:69): [Folded, False: 51.3M]
  |  |  ------------------
  ------------------
36904|  51.3M|        if (env->offset > 0) {
  ------------------
  |  Branch (36904:13): [True: 51.1M, False: 227k]
  ------------------
36905|       |            /* On stack */
36906|  51.1M|            stack[A] = env->as.fiber->data[env->offset + vindex];
  ------------------
  |  |35996|  51.1M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36907|  51.1M|        } else {
36908|       |            /* Off stack */
36909|   227k|            stack[A] = env->as.values[vindex];
  ------------------
  |  |35996|   227k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36910|   227k|        }
36911|  51.3M|        vm_pcnext();
  ------------------
  |  |36050|  51.3M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|  51.3M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36912|  51.3M|    }
36913|       |
36914|   176k|    VM_OP(JOP_SET_UPVALUE) {
  ------------------
  |  |36017|   176k|#define VM_OP(op) label_##op :
  ------------------
36915|   176k|        int32_t eindex = B;
  ------------------
  |  |35997|   176k|#define B ((*pc >> 16) & 0xFF)
  ------------------
36916|   176k|        int32_t vindex = C;
  ------------------
  |  |35998|   176k|#define C (*pc >> 24)
  ------------------
36917|   176k|        JanetFuncEnv *env;
36918|   176k|        vm_assert(func->def->environments_length > eindex, "invalid upvalue environment");
  ------------------
  |  |36055|   176k|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |36054|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36054:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36055:36): [True: 0, False: 176k]
  |  |  |  Branch (36055:69): [Folded, False: 176k]
  |  |  ------------------
  ------------------
36919|   176k|        env = func->envs[eindex];
36920|   176k|        vm_assert(env->length > vindex, "invalid upvalue index");
  ------------------
  |  |36055|   176k|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |36054|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36054:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36055:36): [True: 0, False: 176k]
  |  |  |  Branch (36055:69): [Folded, False: 176k]
  |  |  ------------------
  ------------------
36921|   176k|        vm_assert(janet_env_valid(env), "invalid upvalue environment");
  ------------------
  |  |36055|   176k|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |36054|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36054:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36055:36): [True: 0, False: 176k]
  |  |  |  Branch (36055:69): [Folded, False: 176k]
  |  |  ------------------
  ------------------
36922|   176k|        if (env->offset > 0) {
  ------------------
  |  Branch (36922:13): [True: 176k, False: 0]
  ------------------
36923|   176k|            env->as.fiber->data[env->offset + vindex] = stack[A];
  ------------------
  |  |35996|   176k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36924|   176k|        } else {
36925|      0|            env->as.values[vindex] = stack[A];
  ------------------
  |  |35996|      0|#define A ((*pc >> 8)  & 0xFF)
  ------------------
36926|      0|        }
36927|   176k|        vm_pcnext();
  ------------------
  |  |36050|   176k|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|   176k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
36928|   176k|    }
36929|       |
36930|  85.4M|    VM_OP(JOP_CLOSURE) {
  ------------------
  |  |36017|  85.4M|#define VM_OP(op) label_##op :
  ------------------
36931|  85.4M|        JanetFuncDef *fd;
36932|  85.4M|        JanetFunction *fn;
36933|  85.4M|        int32_t elen;
36934|  85.4M|        int32_t defindex = (int32_t)E;
  ------------------
  |  |36000|  85.4M|#define E (*pc >> 16)
  ------------------
36935|  85.4M|        vm_assert(defindex < func->def->defs_length, "invalid funcdef");
  ------------------
  |  |36055|  85.4M|#define vm_assert(cond, e) do {if (!(cond)) vm_throw((e)); } while (0)
  |  |  ------------------
  |  |  |  |36054|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36054:64): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36055:36): [True: 0, False: 85.4M]
  |  |  |  Branch (36055:69): [Folded, False: 85.4M]
  |  |  ------------------
  ------------------
36936|  85.4M|        fd = func->def->defs[defindex];
36937|  85.4M|        elen = fd->environments_length;
36938|  85.4M|        fn = janet_gcalloc(JANET_MEMORY_FUNCTION, sizeof(JanetFunction) + ((size_t) elen * sizeof(JanetFuncEnv *)));
36939|  85.4M|        fn->def = fd;
36940|  85.4M|        {
36941|  85.4M|            int32_t i;
36942|   169M|            for (i = 0; i < elen; ++i) {
  ------------------
  |  Branch (36942:25): [True: 84.3M, False: 85.4M]
  ------------------
36943|  84.3M|                int32_t inherit = fd->environments[i];
36944|  84.3M|                if (inherit == -1 || inherit >= func->def->environments_length) {
  ------------------
  |  Branch (36944:21): [True: 84.1M, False: 193k]
  |  Branch (36944:38): [True: 0, False: 193k]
  ------------------
36945|  84.1M|                    JanetStackFrame *frame = janet_stack_frame(stack);
  ------------------
  |  |  801|  84.1M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1017|  84.1M|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
36946|  84.1M|                    if (!frame->env) {
  ------------------
  |  Branch (36946:25): [True: 11.1M, False: 72.9M]
  ------------------
36947|       |                        /* Lazy capture of current stack frame */
36948|  11.1M|                        JanetFuncEnv *env = janet_gcalloc(JANET_MEMORY_FUNCENV, sizeof(JanetFuncEnv));
36949|  11.1M|                        env->offset = fiber->frame;
36950|  11.1M|                        env->as.fiber = fiber;
36951|  11.1M|                        env->length = func->def->slotcount;
36952|  11.1M|                        frame->env = env;
36953|  11.1M|                    }
36954|  84.1M|                    fn->envs[i] = frame->env;
36955|  84.1M|                } else {
36956|   193k|                    fn->envs[i] = func->envs[inherit];
36957|   193k|                }
36958|  84.3M|            }
36959|  85.4M|        }
36960|  85.4M|        stack[A] = janet_wrap_function(fn);
  ------------------
  |  |35996|  85.4M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                      stack[A] = janet_wrap_function(fn);
  ------------------
  |  |  847|  85.4M|#define janet_wrap_function(s) janet_nanbox_wrap_((s), JANET_FUNCTION)
  |  |  ------------------
  |  |  |  |  820|  85.4M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  85.4M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  85.4M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36961|  85.4M|        vm_checkgc_pcnext();
  ------------------
  |  |36051|  85.4M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36047|  85.4M|#define maybe_collect() do {\
  |  |  |  |36048|  85.4M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 56.3M, False: 29.1M]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 85.4M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36050|  85.4M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|  85.4M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36962|  85.4M|    }
36963|       |
36964|   270M|    VM_OP(JOP_PUSH)
  ------------------
  |  |36017|   270M|#define VM_OP(op) label_##op :
  ------------------
36965|   270M|    janet_fiber_push(fiber, stack[D]);
  ------------------
  |  |35999|   270M|#define D (*pc >> 8)
  ------------------
36966|   270M|    stack = fiber->data + fiber->frame;
36967|   270M|    vm_checkgc_pcnext();
  ------------------
  |  |36051|   270M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36047|   270M|#define maybe_collect() do {\
  |  |  |  |36048|   270M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 184M, False: 85.3M]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 270M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36050|   270M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|   270M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36968|       |
36969|   270M|    VM_OP(JOP_PUSH_2)
  ------------------
  |  |36017|   128M|#define VM_OP(op) label_##op :
  ------------------
36970|   128M|    janet_fiber_push2(fiber, stack[A], stack[E]);
  ------------------
  |  |35996|   128M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  janet_fiber_push2(fiber, stack[A], stack[E]);
  ------------------
  |  |36000|   128M|#define E (*pc >> 16)
  ------------------
36971|   128M|    stack = fiber->data + fiber->frame;
36972|   128M|    vm_checkgc_pcnext();
  ------------------
  |  |36051|   128M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36047|   128M|#define maybe_collect() do {\
  |  |  |  |36048|   128M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 86.8M, False: 41.6M]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 128M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36050|   128M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|   128M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36973|       |
36974|   128M|    VM_OP(JOP_PUSH_3)
  ------------------
  |  |36017|  79.2M|#define VM_OP(op) label_##op :
  ------------------
36975|  79.2M|    janet_fiber_push3(fiber, stack[A], stack[B], stack[C]);
  ------------------
  |  |35996|  79.2M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  janet_fiber_push3(fiber, stack[A], stack[B], stack[C]);
  ------------------
  |  |35997|  79.2M|#define B ((*pc >> 16) & 0xFF)
  ------------------
                  janet_fiber_push3(fiber, stack[A], stack[B], stack[C]);
  ------------------
  |  |35998|  79.2M|#define C (*pc >> 24)
  ------------------
36976|  79.2M|    stack = fiber->data + fiber->frame;
36977|  79.2M|    vm_checkgc_pcnext();
  ------------------
  |  |36051|  79.2M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36047|  79.2M|#define maybe_collect() do {\
  |  |  |  |36048|  79.2M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 52.1M, False: 27.0M]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 79.2M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36050|  79.2M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|  79.2M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36978|       |
36979|  79.2M|    VM_OP(JOP_PUSH_ARRAY) {
  ------------------
  |  |36017|  21.5M|#define VM_OP(op) label_##op :
  ------------------
36980|  21.5M|        const Janet *vals;
36981|  21.5M|        int32_t len;
36982|  21.5M|        if (janet_indexed_view(stack[D], &vals, &len)) {
  ------------------
  |  |35999|  21.5M|#define D (*pc >> 8)
  ------------------
  |  Branch (36982:13): [True: 21.5M, False: 43]
  ------------------
36983|  21.5M|            janet_fiber_pushn(fiber, vals, len);
36984|  21.5M|        } else {
36985|     43|            janet_panicf("expected %T, got %v", JANET_TFLAG_INDEXED, stack[D]);
  ------------------
  |  |  608|     43|#define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  ------------------
  |  |  |  |  597|     43|#define JANET_TFLAG_ARRAY (1 << JANET_ARRAY)
  |  |  ------------------
  |  |               #define JANET_TFLAG_INDEXED (JANET_TFLAG_ARRAY | JANET_TFLAG_TUPLE)
  |  |  ------------------
  |  |  |  |  598|     43|#define JANET_TFLAG_TUPLE (1 << JANET_TUPLE)
  |  |  ------------------
  ------------------
                          janet_panicf("expected %T, got %v", JANET_TFLAG_INDEXED, stack[D]);
  ------------------
  |  |35999|     43|#define D (*pc >> 8)
  ------------------
36986|     43|        }
36987|  21.5M|    }
36988|  21.5M|    stack = fiber->data + fiber->frame;
36989|  21.5M|    vm_checkgc_pcnext();
  ------------------
  |  |36051|  21.5M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36047|  21.5M|#define maybe_collect() do {\
  |  |  |  |36048|  21.5M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 14.3M, False: 7.18M]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 21.5M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36050|  21.5M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|  21.5M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36990|       |
36991|   343M|    VM_OP(JOP_CALL) {
  ------------------
  |  |36017|   343M|#define VM_OP(op) label_##op :
  ------------------
36992|   343M|        vm_maybe_auto_suspend(1);
  ------------------
  |  |36071|   343M|#define vm_maybe_auto_suspend(COND) do { \
  |  |36072|   343M|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (36072:9): [True: 343M, Folded]
  |  |  |  Branch (36072:19): [True: 0, False: 343M]
  |  |  ------------------
  |  |36073|      0|        fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  784|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  |  |  ------------------
  |  |                       fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  785|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  |  |  ------------------
  |  |36074|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |36036|      0|#define vm_return(sig, val) do { \
  |  |  |  |36037|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |36038|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36039|      0|    return (sig); \
  |  |  |  |36040|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36040:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36075|      0|    } \
  |  |36076|   343M|} while (0)
  |  |  ------------------
  |  |  |  Branch (36076:10): [Folded, False: 343M]
  |  |  ------------------
  ------------------
36993|   343M|        Janet callee = stack[E];
  ------------------
  |  |36000|   343M|#define E (*pc >> 16)
  ------------------
36994|   343M|        if (fiber->stacktop > fiber->maxstack) {
  ------------------
  |  Branch (36994:13): [True: 0, False: 343M]
  ------------------
36995|      0|            vm_throw("stack overflow");
  ------------------
  |  |36054|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  ------------------
  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36054:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
36996|      0|        }
36997|   343M|        if (janet_checktype(callee, JANET_KEYWORD)) {
  ------------------
  |  |  801|   343M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 313k, False: 343M]
  |  |  |  Branch (801:6): [Folded, False: 343M]
  |  |  ------------------
  |  |  802|   343M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   343M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   343M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   343M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   343M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   343M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36998|   313k|            vm_commit();
  ------------------
  |  |36030|   313k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  801|   313k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|   313k|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36030:70): [Folded, False: 313k]
  |  |  ------------------
  ------------------
36999|   313k|            callee = resolve_method(callee, fiber);
37000|   313k|        }
37001|   343M|        if (janet_checktype(callee, JANET_FUNCTION)) {
  ------------------
  |  |  801|   343M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 107M, False: 236M]
  |  |  |  Branch (801:6): [Folded, False: 343M]
  |  |  ------------------
  |  |  802|   343M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   343M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   343M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   343M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   343M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   343M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37002|   107M|            func = janet_unwrap_function(callee);
  ------------------
  |  |  863|   107M|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
37003|   107M|            if (func->gc.flags & JANET_FUNCFLAG_TRACE) {
  ------------------
  |  | 1155|   107M|#define JANET_FUNCFLAG_TRACE (1 << 16)
  ------------------
  |  Branch (37003:17): [True: 0, False: 107M]
  ------------------
37004|      0|                vm_do_trace(func, fiber->stacktop - fiber->stackstart, fiber->data + fiber->stackstart);
  ------------------
  |  |36194|      0|#define vm_do_trace(func, argc, argv) do { \
  |  |36195|      0|    JanetFunction* _func = (func);\
  |  |36196|      0|    if (_func->def->name) {\
  |  |  ------------------
  |  |  |  Branch (36196:9): [True: 0, False: 0]
  |  |  ------------------
  |  |36197|      0|        janet_eprintf("trace (%S", _func->def->name);\
  |  |  ------------------
  |  |  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36198|      0|    } else {\
  |  |36199|      0|        janet_eprintf("trace (%p", janet_wrap_function(_func));\
  |  |  ------------------
  |  |  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36200|      0|    }\
  |  |36201|      0|    int32_t _argc = (argc);\
  |  |36202|      0|    for (int32_t i = 0; i < _argc; i++) {\
  |  |  ------------------
  |  |  |  Branch (36202:25): [True: 0, False: 0]
  |  |  ------------------
  |  |36203|      0|        janet_eprintf(" %p", (argv)[i]);\
  |  |  ------------------
  |  |  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36204|      0|    }\
  |  |36205|      0|    janet_eprintf(")\n");\
  |  |  ------------------
  |  |  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36206|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (36206:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37005|      0|            }
37006|   107M|            vm_commit();
  ------------------
  |  |36030|   107M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  801|   107M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|   107M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36030:70): [Folded, False: 107M]
  |  |  ------------------
  ------------------
37007|   107M|            if (janet_fiber_funcframe(fiber, func)) {
  ------------------
  |  Branch (37007:17): [True: 12, False: 107M]
  ------------------
37008|     12|                int32_t n = fiber->stacktop - fiber->stackstart;
37009|     12|                janet_panicf("%v called with %d argument%s, expected %d",
37010|     12|                             callee, n, n == 1 ? "" : "s", func->def->arity);
  ------------------
  |  Branch (37010:41): [True: 6, False: 6]
  ------------------
37011|     12|            }
37012|   107M|            stack = fiber->data + fiber->frame;
37013|   107M|            pc = func->def->bytecode;
37014|   107M|            vm_checkgc_next();
  ------------------
  |  |36049|   107M|#define vm_checkgc_next() maybe_collect(); vm_next()
  |  |  ------------------
  |  |  |  |36047|   107M|#define maybe_collect() do {\
  |  |  |  |36048|   107M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 72.8M, False: 34.3M]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 107M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_next() maybe_collect(); vm_next()
  |  |  ------------------
  |  |  |  |36019|   107M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37015|   236M|        } else if (janet_checktype(callee, JANET_CFUNCTION)) {
  ------------------
  |  |  801|   236M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 235M, False: 864k]
  |  |  |  Branch (801:6): [Folded, False: 236M]
  |  |  ------------------
  |  |  802|   236M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   236M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   236M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   236M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   236M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   236M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37016|   235M|            vm_commit();
  ------------------
  |  |36030|   235M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  801|   235M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|   235M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36030:70): [Folded, False: 235M]
  |  |  ------------------
  ------------------
37017|   235M|            int32_t argc = fiber->stacktop - fiber->stackstart;
37018|   235M|            janet_fiber_cframe(fiber, janet_unwrap_cfunction(callee));
  ------------------
  |  |  864|   235M|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
37019|   235M|            Janet ret = janet_unwrap_cfunction(callee)(argc, fiber->data + fiber->frame);
  ------------------
  |  |  864|   235M|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
37020|   235M|            janet_fiber_popframe(fiber);
37021|   235M|            stack = fiber->data + fiber->frame;
37022|   235M|            stack[A] = ret;
  ------------------
  |  |35996|   235M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37023|   235M|            vm_checkgc_pcnext();
  ------------------
  |  |36051|   235M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36047|   235M|#define maybe_collect() do {\
  |  |  |  |36048|   235M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 159M, False: 75.9M]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 235M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36050|   235M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|   235M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37024|   235M|        } else {
37025|   864k|            vm_commit();
  ------------------
  |  |36030|   864k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  801|   864k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|   864k|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36030:70): [Folded, False: 864k]
  |  |  ------------------
  ------------------
37026|   864k|            stack[A] = call_nonfn(fiber, callee);
  ------------------
  |  |35996|   864k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37027|   864k|            vm_pcnext();
  ------------------
  |  |36050|   864k|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|   864k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37028|   864k|        }
37029|   343M|    }
37030|       |
37031|   343M|    VM_OP(JOP_TAILCALL) {
  ------------------
  |  |36017|  53.9M|#define VM_OP(op) label_##op :
  ------------------
37032|  53.9M|        vm_maybe_auto_suspend(1);
  ------------------
  |  |36071|  53.9M|#define vm_maybe_auto_suspend(COND) do { \
  |  |36072|  53.9M|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (36072:9): [True: 53.9M, Folded]
  |  |  |  Branch (36072:19): [True: 0, False: 53.9M]
  |  |  ------------------
  |  |36073|      0|        fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  784|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  |  |  ------------------
  |  |                       fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  785|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  |  |  ------------------
  |  |36074|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |36036|      0|#define vm_return(sig, val) do { \
  |  |  |  |36037|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |36038|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36039|      0|    return (sig); \
  |  |  |  |36040|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36040:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36075|      0|    } \
  |  |36076|  53.9M|} while (0)
  |  |  ------------------
  |  |  |  Branch (36076:10): [Folded, False: 53.9M]
  |  |  ------------------
  ------------------
37033|  53.9M|        Janet callee = stack[D];
  ------------------
  |  |35999|  53.9M|#define D (*pc >> 8)
  ------------------
37034|  53.9M|        if (fiber->stacktop > fiber->maxstack) {
  ------------------
  |  Branch (37034:13): [True: 0, False: 53.9M]
  ------------------
37035|      0|            vm_throw("stack overflow");
  ------------------
  |  |36054|      0|#define vm_throw(e) do { vm_commit(); janet_panic(e); } while (0)
  |  |  ------------------
  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36054:64): [Folded, False: 0]
  |  |  ------------------
  ------------------
37036|      0|        }
37037|  53.9M|        if (janet_checktype(callee, JANET_KEYWORD)) {
  ------------------
  |  |  801|  53.9M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 10, False: 53.9M]
  |  |  |  Branch (801:6): [Folded, False: 53.9M]
  |  |  ------------------
  |  |  802|  53.9M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  53.9M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  53.9M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  53.9M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  53.9M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  53.9M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37038|     10|            vm_commit();
  ------------------
  |  |36030|     10|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  801|     10|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|     10|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36030:70): [Folded, False: 10]
  |  |  ------------------
  ------------------
37039|     10|            callee = resolve_method(callee, fiber);
37040|     10|        }
37041|  53.9M|        if (janet_checktype(callee, JANET_FUNCTION)) {
  ------------------
  |  |  801|  53.9M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 41.4M, False: 12.5M]
  |  |  |  Branch (801:6): [Folded, False: 53.9M]
  |  |  ------------------
  |  |  802|  53.9M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  53.9M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  53.9M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  53.9M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  53.9M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  53.9M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37042|  41.4M|            func = janet_unwrap_function(callee);
  ------------------
  |  |  863|  41.4M|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
37043|  41.4M|            if (func->gc.flags & JANET_FUNCFLAG_TRACE) {
  ------------------
  |  | 1155|  41.4M|#define JANET_FUNCFLAG_TRACE (1 << 16)
  ------------------
  |  Branch (37043:17): [True: 0, False: 41.4M]
  ------------------
37044|      0|                vm_do_trace(func, fiber->stacktop - fiber->stackstart, fiber->data + fiber->stackstart);
  ------------------
  |  |36194|      0|#define vm_do_trace(func, argc, argv) do { \
  |  |36195|      0|    JanetFunction* _func = (func);\
  |  |36196|      0|    if (_func->def->name) {\
  |  |  ------------------
  |  |  |  Branch (36196:9): [True: 0, False: 0]
  |  |  ------------------
  |  |36197|      0|        janet_eprintf("trace (%S", _func->def->name);\
  |  |  ------------------
  |  |  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36198|      0|    } else {\
  |  |36199|      0|        janet_eprintf("trace (%p", janet_wrap_function(_func));\
  |  |  ------------------
  |  |  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36200|      0|    }\
  |  |36201|      0|    int32_t _argc = (argc);\
  |  |36202|      0|    for (int32_t i = 0; i < _argc; i++) {\
  |  |  ------------------
  |  |  |  Branch (36202:25): [True: 0, False: 0]
  |  |  ------------------
  |  |36203|      0|        janet_eprintf(" %p", (argv)[i]);\
  |  |  ------------------
  |  |  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36204|      0|    }\
  |  |36205|      0|    janet_eprintf(")\n");\
  |  |  ------------------
  |  |  |  | 2184|      0|#define janet_eprintf(...) janet_dynprintf("err", stderr, __VA_ARGS__)
  |  |  ------------------
  |  |36206|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (36206:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37045|      0|            }
37046|  41.4M|            if (janet_fiber_funcframe_tail(fiber, func)) {
  ------------------
  |  Branch (37046:17): [True: 8, False: 41.4M]
  ------------------
37047|      8|                janet_stack_frame(fiber->data + fiber->frame)->pc = pc;
  ------------------
  |  |  801|      8|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1017|      8|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
37048|      8|                int32_t n = fiber->stacktop - fiber->stackstart;
37049|      8|                janet_panicf("%v called with %d argument%s, expected %d",
37050|      8|                             callee, n, n == 1 ? "" : "s", func->def->arity);
  ------------------
  |  Branch (37050:41): [True: 0, False: 8]
  ------------------
37051|      8|            }
37052|  41.4M|            stack = fiber->data + fiber->frame;
37053|  41.4M|            pc = func->def->bytecode;
37054|  41.4M|            vm_checkgc_next();
  ------------------
  |  |36049|  41.4M|#define vm_checkgc_next() maybe_collect(); vm_next()
  |  |  ------------------
  |  |  |  |36047|  41.4M|#define maybe_collect() do {\
  |  |  |  |36048|  41.4M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 29.8M, False: 11.5M]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 41.4M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_next() maybe_collect(); vm_next()
  |  |  ------------------
  |  |  |  |36019|  41.4M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37055|  41.4M|        } else {
37056|  12.5M|            Janet retreg;
37057|  12.5M|            int entrance_frame = janet_stack_frame(stack)->flags & JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  |  801|  12.5M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1017|  12.5M|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
                          int entrance_frame = janet_stack_frame(stack)->flags & JANET_STACKFRAME_ENTRANCE;
  ------------------
  |  | 1004|  12.5M|#define JANET_STACKFRAME_ENTRANCE 2
  ------------------
37058|  12.5M|            vm_commit();
  ------------------
  |  |36030|  12.5M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  801|  12.5M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|  12.5M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36030:70): [Folded, False: 12.5M]
  |  |  ------------------
  ------------------
37059|  12.5M|            if (janet_checktype(callee, JANET_CFUNCTION)) {
  ------------------
  |  |  801|  12.5M|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 12.5M, False: 484]
  |  |  |  Branch (801:6): [Folded, False: 12.5M]
  |  |  ------------------
  |  |  802|  12.5M|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  12.5M|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  12.5M|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  12.5M|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  12.5M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  12.5M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37060|  12.5M|                int32_t argc = fiber->stacktop - fiber->stackstart;
37061|  12.5M|                janet_fiber_cframe(fiber, janet_unwrap_cfunction(callee));
  ------------------
  |  |  864|  12.5M|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
37062|  12.5M|                retreg = janet_unwrap_cfunction(callee)(argc, fiber->data + fiber->frame);
  ------------------
  |  |  864|  12.5M|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
37063|  12.5M|                janet_fiber_popframe(fiber);
37064|  12.5M|            } else {
37065|    484|                retreg = call_nonfn(fiber, callee);
37066|    484|            }
37067|  12.5M|            janet_fiber_popframe(fiber);
37068|  12.5M|            if (entrance_frame) {
  ------------------
  |  Branch (37068:17): [True: 410, False: 12.5M]
  ------------------
37069|    410|                vm_return_no_restore(JANET_SIGNAL_OK, retreg);
  ------------------
  |  |36041|    410|#define vm_return_no_restore(sig, val) do { \
  |  |36042|    410|    janet_vm.return_reg[0] = (val); \
  |  |36043|    410|    return (sig); \
  |  |36044|    410|} while (0)
  |  |  ------------------
  |  |  |  Branch (36044:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37070|    410|            }
37071|  12.5M|            vm_restore();
  ------------------
  |  |36031|  12.5M|#define vm_restore() do { \
  |  |36032|  12.5M|    stack = fiber->data + fiber->frame; \
  |  |36033|  12.5M|    pc = janet_stack_frame(stack)->pc; \
  |  |  ------------------
  |  |  |  |  801|  12.5M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|  12.5M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36034|  12.5M|    func = janet_stack_frame(stack)->func; \
  |  |  ------------------
  |  |  |  |  801|  12.5M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|  12.5M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36035|  12.5M|} while (0)
  |  |  ------------------
  |  |  |  Branch (36035:10): [Folded, False: 12.5M]
  |  |  ------------------
  ------------------
37072|  12.5M|            stack[A] = retreg;
  ------------------
  |  |35996|  12.5M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37073|  12.5M|            vm_checkgc_pcnext();
  ------------------
  |  |36051|  12.5M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36047|  12.5M|#define maybe_collect() do {\
  |  |  |  |36048|  12.5M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 8.28M, False: 4.26M]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 12.5M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36050|  12.5M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|  12.5M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37074|  12.5M|        }
37075|  53.9M|    }
37076|       |
37077|  53.9M|    VM_OP(JOP_RESUME) {
  ------------------
  |  |36017|    111|#define VM_OP(op) label_##op :
  ------------------
37078|    111|        Janet retreg;
37079|    111|        vm_maybe_auto_suspend(1);
  ------------------
  |  |36071|    111|#define vm_maybe_auto_suspend(COND) do { \
  |  |36072|    111|    if ((COND) && janet_atomic_load_relaxed(&janet_vm.auto_suspend)) { \
  |  |  ------------------
  |  |  |  Branch (36072:9): [True: 111, Folded]
  |  |  |  Branch (36072:19): [True: 0, False: 111]
  |  |  ------------------
  |  |36073|      0|        fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  784|      0|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  |  |  ------------------
  |  |                       fiber->flags |= (JANET_FIBER_RESUME_NO_USEVAL | JANET_FIBER_RESUME_NO_SKIP); \
  |  |  ------------------
  |  |  |  |  785|      0|#define JANET_FIBER_RESUME_NO_SKIP   0x4000000
  |  |  ------------------
  |  |36074|      0|        vm_return(JANET_SIGNAL_INTERRUPT, janet_wrap_nil()); \
  |  |  ------------------
  |  |  |  |36036|      0|#define vm_return(sig, val) do { \
  |  |  |  |36037|      0|    janet_vm.return_reg[0] = (val); \
  |  |  |  |36038|      0|    vm_commit(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |36039|      0|    return (sig); \
  |  |  |  |36040|      0|} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36040:10): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36075|      0|    } \
  |  |36076|    111|} while (0)
  |  |  ------------------
  |  |  |  Branch (36076:10): [Folded, False: 111]
  |  |  ------------------
  ------------------
37080|    111|        vm_assert_type(stack[B], JANET_FIBER);
  ------------------
  |  |36056|    111|#define vm_assert_type(X, T) do { \
  |  |36057|    111|    if (!(janet_checktype((X), (T)))) { \
  |  |  ------------------
  |  |  |  |  801|    111|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 111]
  |  |  |  |  ------------------
  |  |  |  |  802|    111|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|    111|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|    111|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|    111|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|    111|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|    111|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36057:9): [True: 0, False: 111]
  |  |  ------------------
  |  |36058|      0|        vm_commit(); \
  |  |  ------------------
  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36059|      0|        janet_panicf("expected %T, got %v", (1 << (T)), (X)); \
  |  |36060|      0|    } \
  |  |36061|    111|} while (0)
  |  |  ------------------
  |  |  |  Branch (36061:10): [Folded, False: 111]
  |  |  ------------------
  ------------------
37081|    111|        JanetFiber *child = janet_unwrap_fiber(stack[B]);
  ------------------
  |  |  854|    111|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
37082|    111|        if (janet_check_can_resume(child, &retreg, 0)) {
  ------------------
  |  Branch (37082:13): [True: 0, False: 111]
  ------------------
37083|      0|            vm_commit();
  ------------------
  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  ------------------
  ------------------
37084|      0|            janet_panicv(retreg);
37085|      0|        }
37086|    111|        fiber->child = child;
37087|    111|        JanetSignal sig = janet_continue_no_check(child, stack[C], &retreg);
  ------------------
  |  |35998|    111|#define C (*pc >> 24)
  ------------------
37088|    111|        stack = fiber->data + fiber->frame;
37089|    111|        if (sig != JANET_SIGNAL_OK && !(child->flags & (1 << sig))) {
  ------------------
  |  Branch (37089:13): [True: 77, False: 34]
  |  Branch (37089:39): [True: 38, False: 39]
  ------------------
37090|     38|            vm_return(sig, retreg);
  ------------------
  |  |36036|     38|#define vm_return(sig, val) do { \
  |  |36037|     38|    janet_vm.return_reg[0] = (val); \
  |  |36038|     38|    vm_commit(); \
  |  |  ------------------
  |  |  |  |36030|     38|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|     38|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|     38|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36030:70): [Folded, False: 38]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36039|     38|    return (sig); \
  |  |36040|     38|} while (0)
  |  |  ------------------
  |  |  |  Branch (36040:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37091|     38|        }
37092|     73|        fiber->child = NULL;
37093|     73|        stack[A] = retreg;
  ------------------
  |  |35996|     73|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37094|     73|        vm_checkgc_pcnext();
  ------------------
  |  |36051|     73|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36047|     73|#define maybe_collect() do {\
  |  |  |  |36048|     73|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 0, False: 73]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 73]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36050|     73|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|     73|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37095|     73|    }
37096|       |
37097|      1|    VM_OP(JOP_SIGNAL) {
  ------------------
  |  |36017|      1|#define VM_OP(op) label_##op :
  ------------------
37098|      1|        int32_t s = C;
  ------------------
  |  |35998|      1|#define C (*pc >> 24)
  ------------------
37099|      1|        if (s > JANET_SIGNAL_USER9) s = JANET_SIGNAL_USER9;
  ------------------
  |  Branch (37099:13): [True: 0, False: 1]
  ------------------
37100|      1|        if (s < 0) s = 0;
  ------------------
  |  Branch (37100:13): [True: 0, False: 1]
  ------------------
37101|      1|        vm_return(s, stack[B]);
  ------------------
  |  |36036|      1|#define vm_return(sig, val) do { \
  |  |36037|      1|    janet_vm.return_reg[0] = (val); \
  |  |36038|      1|    vm_commit(); \
  |  |  ------------------
  |  |  |  |36030|      1|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|      1|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|      1|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36030:70): [Folded, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36039|      1|    return (sig); \
  |  |36040|      1|} while (0)
  |  |  ------------------
  |  |  |  Branch (36040:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37102|      1|    }
37103|       |
37104|     13|    VM_OP(JOP_PROPAGATE) {
  ------------------
  |  |36017|     13|#define VM_OP(op) label_##op :
  ------------------
37105|     13|        Janet fv = stack[C];
  ------------------
  |  |35998|     13|#define C (*pc >> 24)
  ------------------
37106|     13|        vm_assert_type(fv, JANET_FIBER);
  ------------------
  |  |36056|     13|#define vm_assert_type(X, T) do { \
  |  |36057|     13|    if (!(janet_checktype((X), (T)))) { \
  |  |  ------------------
  |  |  |  |  801|     13|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 13]
  |  |  |  |  ------------------
  |  |  |  |  802|     13|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|     13|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|     13|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|     13|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|     13|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|     13|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36057:9): [True: 0, False: 13]
  |  |  ------------------
  |  |36058|      0|        vm_commit(); \
  |  |  ------------------
  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36059|      0|        janet_panicf("expected %T, got %v", (1 << (T)), (X)); \
  |  |36060|      0|    } \
  |  |36061|     13|} while (0)
  |  |  ------------------
  |  |  |  Branch (36061:10): [Folded, False: 13]
  |  |  ------------------
  ------------------
37107|     13|        JanetFiber *f = janet_unwrap_fiber(fv);
  ------------------
  |  |  854|     13|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
37108|     13|        JanetFiberStatus sub_status = janet_fiber_status(f);
37109|     13|        if (sub_status > JANET_STATUS_USER9) {
  ------------------
  |  Branch (37109:13): [True: 0, False: 13]
  ------------------
37110|      0|            vm_commit();
  ------------------
  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  ------------------
  ------------------
37111|      0|            janet_panicf("cannot propagate from fiber with status :%s",
37112|      0|                         janet_status_names[sub_status]);
37113|      0|        }
37114|     13|        fiber->child = f;
37115|     13|        vm_return((int) sub_status, stack[B]);
  ------------------
  |  |36036|     13|#define vm_return(sig, val) do { \
  |  |36037|     13|    janet_vm.return_reg[0] = (val); \
  |  |36038|     13|    vm_commit(); \
  |  |  ------------------
  |  |  |  |36030|     13|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|     13|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|     13|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36030:70): [Folded, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36039|     13|    return (sig); \
  |  |36040|     13|} while (0)
  |  |  ------------------
  |  |  |  Branch (36040:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37116|     13|    }
37117|       |
37118|      0|    VM_OP(JOP_CANCEL) {
  ------------------
  |  |36017|      0|#define VM_OP(op) label_##op :
  ------------------
37119|      0|        Janet retreg;
37120|      0|        vm_assert_type(stack[B], JANET_FIBER);
  ------------------
  |  |36056|      0|#define vm_assert_type(X, T) do { \
  |  |36057|      0|    if (!(janet_checktype((X), (T)))) { \
  |  |  ------------------
  |  |  |  |  801|      0|    (((t) == JANET_NUMBER) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (801:6): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  802|      0|        ? janet_nanbox_isnumber(x) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  803|      0|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  795|      0|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  785|      0|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36057:9): [True: 0, False: 0]
  |  |  ------------------
  |  |36058|      0|        vm_commit(); \
  |  |  ------------------
  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36059|      0|        janet_panicf("expected %T, got %v", (1 << (T)), (X)); \
  |  |36060|      0|    } \
  |  |36061|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (36061:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37121|      0|        JanetFiber *child = janet_unwrap_fiber(stack[B]);
  ------------------
  |  |  854|      0|#define janet_unwrap_fiber(x) ((JanetFiber *)janet_nanbox_to_pointer(x))
  ------------------
37122|      0|        if (janet_check_can_resume(child, &retreg, 1)) {
  ------------------
  |  Branch (37122:13): [True: 0, False: 0]
  ------------------
37123|      0|            vm_commit();
  ------------------
  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  ------------------
  ------------------
37124|      0|            janet_panicv(retreg);
37125|      0|        }
37126|      0|        fiber->child = child;
37127|      0|        JanetSignal sig = janet_continue_signal(child, stack[C], &retreg, JANET_SIGNAL_ERROR);
  ------------------
  |  |35998|      0|#define C (*pc >> 24)
  ------------------
37128|      0|        if (sig != JANET_SIGNAL_OK && !(child->flags & (1 << sig))) {
  ------------------
  |  Branch (37128:13): [True: 0, False: 0]
  |  Branch (37128:39): [True: 0, False: 0]
  ------------------
37129|      0|            vm_return(sig, retreg);
  ------------------
  |  |36036|      0|#define vm_return(sig, val) do { \
  |  |36037|      0|    janet_vm.return_reg[0] = (val); \
  |  |36038|      0|    vm_commit(); \
  |  |  ------------------
  |  |  |  |36030|      0|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36030:70): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |36039|      0|    return (sig); \
  |  |36040|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (36040:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37130|      0|        }
37131|      0|        fiber->child = NULL;
37132|      0|        stack = fiber->data + fiber->frame;
37133|      0|        stack[A] = retreg;
  ------------------
  |  |35996|      0|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37134|      0|        vm_checkgc_pcnext();
  ------------------
  |  |36051|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36047|      0|#define maybe_collect() do {\
  |  |  |  |36048|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 0, False: 0]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36050|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37135|      0|    }
37136|       |
37137|   647k|    VM_OP(JOP_PUT)
  ------------------
  |  |36017|   647k|#define VM_OP(op) label_##op :
  ------------------
37138|   647k|    vm_commit();
  ------------------
  |  |36030|   647k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  801|   647k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|   647k|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36030:70): [Folded, False: 647k]
  |  |  ------------------
  ------------------
37139|   647k|    fiber->flags |= JANET_FIBER_RESUME_NO_USEVAL;
  ------------------
  |  |  784|   647k|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
37140|   647k|    janet_put(stack[A], stack[B], stack[C]);
  ------------------
  |  |35996|   647k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  janet_put(stack[A], stack[B], stack[C]);
  ------------------
  |  |35997|   647k|#define B ((*pc >> 16) & 0xFF)
  ------------------
                  janet_put(stack[A], stack[B], stack[C]);
  ------------------
  |  |35998|   647k|#define C (*pc >> 24)
  ------------------
37141|   647k|    stack = fiber->data + fiber->frame;
37142|   647k|    fiber->flags &= ~JANET_FIBER_RESUME_NO_USEVAL;
  ------------------
  |  |  784|   647k|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
37143|   647k|    vm_checkgc_pcnext();
  ------------------
  |  |36051|   647k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36047|   647k|#define maybe_collect() do {\
  |  |  |  |36048|   647k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 220k, False: 427k]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 647k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36050|   647k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|   647k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37144|       |
37145|   647k|    VM_OP(JOP_PUT_INDEX)
  ------------------
  |  |36017|     17|#define VM_OP(op) label_##op :
  ------------------
37146|     17|    vm_commit();
  ------------------
  |  |36030|     17|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  801|     17|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|     17|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36030:70): [Folded, False: 17]
  |  |  ------------------
  ------------------
37147|     17|    fiber->flags |= JANET_FIBER_RESUME_NO_USEVAL;
  ------------------
  |  |  784|     17|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
37148|     17|    janet_putindex(stack[A], C, stack[B]);
  ------------------
  |  |35996|     17|#define A ((*pc >> 8)  & 0xFF)
  ------------------
                  janet_putindex(stack[A], C, stack[B]);
  ------------------
  |  |35998|     17|#define C (*pc >> 24)
  ------------------
                  janet_putindex(stack[A], C, stack[B]);
  ------------------
  |  |35997|     17|#define B ((*pc >> 16) & 0xFF)
  ------------------
37149|     17|    stack = fiber->data + fiber->frame;
37150|     17|    fiber->flags &= ~JANET_FIBER_RESUME_NO_USEVAL;
  ------------------
  |  |  784|     17|#define JANET_FIBER_RESUME_NO_USEVAL 0x2000000
  ------------------
37151|     17|    vm_checkgc_pcnext();
  ------------------
  |  |36051|     17|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36047|     17|#define maybe_collect() do {\
  |  |  |  |36048|     17|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 0, False: 17]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 17]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36050|     17|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|     17|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37152|       |
37153|   109M|    VM_OP(JOP_IN)
  ------------------
  |  |36017|   109M|#define VM_OP(op) label_##op :
  ------------------
37154|   109M|    vm_commit();
  ------------------
  |  |36030|   109M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  801|   109M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|   109M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36030:70): [Folded, False: 109M]
  |  |  ------------------
  ------------------
37155|   109M|    {
37156|   109M|        Janet a = janet_in(stack[B], stack[C]);
  ------------------
  |  |35997|   109M|#define B ((*pc >> 16) & 0xFF)
  ------------------
                      Janet a = janet_in(stack[B], stack[C]);
  ------------------
  |  |35998|   109M|#define C (*pc >> 24)
  ------------------
37157|   109M|        stack = fiber->data + fiber->frame;
37158|   109M|        stack[A] = a;
  ------------------
  |  |35996|   109M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37159|   109M|    }
37160|   109M|    vm_pcnext();
  ------------------
  |  |36050|   109M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|   109M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37161|       |
37162|   109M|    VM_OP(JOP_GET)
  ------------------
  |  |36017|  13.5M|#define VM_OP(op) label_##op :
  ------------------
37163|  13.5M|    vm_commit();
  ------------------
  |  |36030|  13.5M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  801|  13.5M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|  13.5M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36030:70): [Folded, False: 13.5M]
  |  |  ------------------
  ------------------
37164|  13.5M|    {
37165|  13.5M|        Janet a = janet_get(stack[B], stack[C]);
  ------------------
  |  |35997|  13.5M|#define B ((*pc >> 16) & 0xFF)
  ------------------
                      Janet a = janet_get(stack[B], stack[C]);
  ------------------
  |  |35998|  13.5M|#define C (*pc >> 24)
  ------------------
37166|  13.5M|        stack = fiber->data + fiber->frame;
37167|  13.5M|        stack[A] = a;
  ------------------
  |  |35996|  13.5M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37168|  13.5M|    }
37169|  13.5M|    vm_pcnext();
  ------------------
  |  |36050|  13.5M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|  13.5M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37170|       |
37171|  13.5M|    VM_OP(JOP_GET_INDEX)
  ------------------
  |  |36017|   373k|#define VM_OP(op) label_##op :
  ------------------
37172|   373k|    vm_commit();
  ------------------
  |  |36030|   373k|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  801|   373k|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|   373k|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36030:70): [Folded, False: 373k]
  |  |  ------------------
  ------------------
37173|   373k|    {
37174|   373k|        Janet a = janet_getindex(stack[B], C);
  ------------------
  |  |35997|   373k|#define B ((*pc >> 16) & 0xFF)
  ------------------
                      Janet a = janet_getindex(stack[B], C);
  ------------------
  |  |35998|   373k|#define C (*pc >> 24)
  ------------------
37175|   373k|        stack = fiber->data + fiber->frame;
37176|   373k|        stack[A] = a;
  ------------------
  |  |35996|   373k|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37177|   373k|    }
37178|   373k|    vm_pcnext();
  ------------------
  |  |36050|   373k|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|   373k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37179|       |
37180|  44.8M|    VM_OP(JOP_LENGTH)
  ------------------
  |  |36017|  44.8M|#define VM_OP(op) label_##op :
  ------------------
37181|  44.8M|    vm_commit();
  ------------------
  |  |36030|  44.8M|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  801|  44.8M|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|  44.8M|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36030:70): [Folded, False: 44.8M]
  |  |  ------------------
  ------------------
37182|  44.8M|    {
37183|  44.8M|        Janet a = janet_lengthv(stack[E]);
  ------------------
  |  |36000|  44.8M|#define E (*pc >> 16)
  ------------------
37184|  44.8M|        stack = fiber->data + fiber->frame;
37185|  44.8M|        stack[A] = a;
  ------------------
  |  |35996|  44.8M|#define A ((*pc >> 8)  & 0xFF)
  ------------------
37186|  44.8M|    }
37187|  44.8M|    vm_pcnext();
  ------------------
  |  |36050|  44.8M|#define vm_pcnext() pc++; vm_next()
  |  |  ------------------
  |  |  |  |36019|  44.8M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  ------------------
  ------------------
37188|       |
37189|  44.8M|    VM_OP(JOP_MAKE_ARRAY) {
  ------------------
  |  |36017|  12.6M|#define VM_OP(op) label_##op :
  ------------------
37190|  12.6M|        int32_t count = fiber->stacktop - fiber->stackstart;
37191|  12.6M|        Janet *mem = fiber->data + fiber->stackstart;
37192|  12.6M|        stack[D] = janet_wrap_array(janet_array_n(mem, count));
  ------------------
  |  |35999|  12.6M|#define D (*pc >> 8)
  ------------------
                      stack[D] = janet_wrap_array(janet_array_n(mem, count));
  ------------------
  |  |  840|  12.6M|#define janet_wrap_array(s) janet_nanbox_wrap_((s), JANET_ARRAY)
  |  |  ------------------
  |  |  |  |  820|  12.6M|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  12.6M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  12.6M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37193|  12.6M|        fiber->stacktop = fiber->stackstart;
37194|  12.6M|        vm_checkgc_pcnext();
  ------------------
  |  |36051|  12.6M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36047|  12.6M|#define maybe_collect() do {\
  |  |  |  |36048|  12.6M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 8.09M, False: 4.51M]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 12.6M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36050|  12.6M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|  12.6M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37195|  12.6M|    }
37196|       |
37197|  12.6M|    VM_OP(JOP_MAKE_TUPLE)
  ------------------
  |  |36017|  2.06M|#define VM_OP(op) label_##op :
  ------------------
37198|       |    /* fallthrough */
37199|  2.64M|    VM_OP(JOP_MAKE_BRACKET_TUPLE) {
  ------------------
  |  |36017|  2.64M|#define VM_OP(op) label_##op :
  ------------------
37200|  2.64M|        int32_t count = fiber->stacktop - fiber->stackstart;
37201|  2.64M|        Janet *mem = fiber->data + fiber->stackstart;
37202|  2.64M|        const Janet *tup = janet_tuple_n(mem, count);
37203|  2.64M|        if (opcode == JOP_MAKE_BRACKET_TUPLE)
  ------------------
  |  |36020|  2.64M|#define opcode (*pc & 0xFF)
  ------------------
  |  Branch (37203:13): [True: 572k, False: 2.06M]
  ------------------
37204|   572k|            janet_tuple_flag(tup) |= JANET_TUPLE_FLAG_BRACKETCTOR;
  ------------------
  |  | 1796|   572k|#define janet_tuple_flag(t) (janet_tuple_head(t)->gc.flags)
  |  |  ------------------
  |  |  |  | 1790|   572k|#define janet_tuple_head(t) ((JanetTupleHead *)((char *)t - offsetof(JanetTupleHead, data)))
  |  |  ------------------
  ------------------
                          janet_tuple_flag(tup) |= JANET_TUPLE_FLAG_BRACKETCTOR;
  ------------------
  |  | 1788|   572k|#define JANET_TUPLE_FLAG_BRACKETCTOR 0x10000
  ------------------
37205|  2.64M|        stack[D] = janet_wrap_tuple(tup);
  ------------------
  |  |35999|  2.64M|#define D (*pc >> 8)
  ------------------
                      stack[D] = janet_wrap_tuple(tup);
  ------------------
  |  |  838|  2.64M|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|  2.64M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  2.64M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  2.64M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37206|  2.64M|        fiber->stacktop = fiber->stackstart;
37207|  2.64M|        vm_checkgc_pcnext();
  ------------------
  |  |36051|  2.64M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36047|  2.64M|#define maybe_collect() do {\
  |  |  |  |36048|  2.64M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 523k, False: 2.11M]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 2.64M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36050|  2.64M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|  2.64M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37208|  2.64M|    }
37209|       |
37210|  2.64M|    VM_OP(JOP_MAKE_TABLE) {
  ------------------
  |  |36017|   234k|#define VM_OP(op) label_##op :
  ------------------
37211|   234k|        int32_t count = fiber->stacktop - fiber->stackstart;
37212|   234k|        Janet *mem = fiber->data + fiber->stackstart;
37213|   234k|        if (count & 1) {
  ------------------
  |  Branch (37213:13): [True: 1, False: 234k]
  ------------------
37214|      1|            vm_commit();
  ------------------
  |  |36030|      1|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  801|      1|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|      1|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36030:70): [Folded, False: 1]
  |  |  ------------------
  ------------------
37215|      1|            janet_panicf("expected even number of arguments to table constructor, got %d", count);
37216|      1|        }
37217|   234k|        JanetTable *table = janet_table(count / 2);
37218|   245k|        for (int32_t i = 0; i < count; i += 2)
  ------------------
  |  Branch (37218:29): [True: 10.2k, False: 234k]
  ------------------
37219|  10.2k|            janet_table_put(table, mem[i], mem[i + 1]);
37220|   234k|        stack[D] = janet_wrap_table(table);
  ------------------
  |  |35999|   234k|#define D (*pc >> 8)
  ------------------
                      stack[D] = janet_wrap_table(table);
  ------------------
  |  |  841|   234k|#define janet_wrap_table(s) janet_nanbox_wrap_((s), JANET_TABLE)
  |  |  ------------------
  |  |  |  |  820|   234k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   234k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   234k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37221|   234k|        fiber->stacktop = fiber->stackstart;
37222|   234k|        vm_checkgc_pcnext();
  ------------------
  |  |36051|   234k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36047|   234k|#define maybe_collect() do {\
  |  |  |  |36048|   234k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 40.7k, False: 194k]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 234k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36050|   234k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|   234k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37223|   234k|    }
37224|       |
37225|  10.4M|    VM_OP(JOP_MAKE_STRUCT) {
  ------------------
  |  |36017|  10.4M|#define VM_OP(op) label_##op :
  ------------------
37226|  10.4M|        int32_t count = fiber->stacktop - fiber->stackstart;
37227|  10.4M|        Janet *mem = fiber->data + fiber->stackstart;
37228|  10.4M|        if (count & 1) {
  ------------------
  |  Branch (37228:13): [True: 1, False: 10.4M]
  ------------------
37229|      1|            vm_commit();
  ------------------
  |  |36030|      1|#define vm_commit() do { janet_stack_frame(stack)->pc = pc; } while (0)
  |  |  ------------------
  |  |  |  |  801|      1|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|      1|#define JANET_FRAME_SIZE 4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (36030:70): [Folded, False: 1]
  |  |  ------------------
  ------------------
37230|      1|            janet_panicf("expected even number of arguments to struct constructor, got %d", count);
37231|      1|        }
37232|  10.4M|        JanetKV *st = janet_struct_begin(count / 2);
37233|   124M|        for (int32_t i = 0; i < count; i += 2)
  ------------------
  |  Branch (37233:29): [True: 113M, False: 10.4M]
  ------------------
37234|   113M|            janet_struct_put(st, mem[i], mem[i + 1]);
37235|  10.4M|        stack[D] = janet_wrap_struct(janet_struct_end(st));
  ------------------
  |  |35999|  10.4M|#define D (*pc >> 8)
  ------------------
                      stack[D] = janet_wrap_struct(janet_struct_end(st));
  ------------------
  |  |  837|  10.4M|#define janet_wrap_struct(s) janet_nanbox_wrap_c((s), JANET_STRUCT)
  |  |  ------------------
  |  |  |  |  823|  10.4M|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  10.4M|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  10.4M|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37236|  10.4M|        fiber->stacktop = fiber->stackstart;
37237|  10.4M|        vm_checkgc_pcnext();
  ------------------
  |  |36051|  10.4M|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36047|  10.4M|#define maybe_collect() do {\
  |  |  |  |36048|  10.4M|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 6.98M, False: 3.43M]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 10.4M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36050|  10.4M|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|  10.4M|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37238|  10.4M|    }
37239|       |
37240|      0|    VM_OP(JOP_MAKE_STRING) {
  ------------------
  |  |36017|      0|#define VM_OP(op) label_##op :
  ------------------
37241|      0|        int32_t count = fiber->stacktop - fiber->stackstart;
37242|      0|        Janet *mem = fiber->data + fiber->stackstart;
37243|      0|        JanetBuffer buffer;
37244|      0|        janet_buffer_init(&buffer, 10 * count);
37245|      0|        for (int32_t i = 0; i < count; i++)
  ------------------
  |  Branch (37245:29): [True: 0, False: 0]
  ------------------
37246|      0|            janet_to_string_b(&buffer, mem[i]);
37247|      0|        stack[D] = janet_stringv(buffer.data, buffer.count);
  ------------------
  |  |35999|      0|#define D (*pc >> 8)
  ------------------
                      stack[D] = janet_stringv(buffer.data, buffer.count);
  ------------------
  |  | 1817|      0|#define janet_stringv(str, len) janet_wrap_string(janet_string((str), (len)))
  |  |  ------------------
  |  |  |  |  843|      0|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37248|      0|        janet_buffer_deinit(&buffer);
37249|      0|        fiber->stacktop = fiber->stackstart;
37250|      0|        vm_checkgc_pcnext();
  ------------------
  |  |36051|      0|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36047|      0|#define maybe_collect() do {\
  |  |  |  |36048|      0|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 0, False: 0]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36050|      0|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|      0|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37251|      0|    }
37252|       |
37253|   102k|    VM_OP(JOP_MAKE_BUFFER) {
  ------------------
  |  |36017|   102k|#define VM_OP(op) label_##op :
  ------------------
37254|   102k|        int32_t count = fiber->stacktop - fiber->stackstart;
37255|   102k|        Janet *mem = fiber->data + fiber->stackstart;
37256|   102k|        JanetBuffer *buffer = janet_buffer(10 * count);
37257|   205k|        for (int32_t i = 0; i < count; i++)
  ------------------
  |  Branch (37257:29): [True: 102k, False: 102k]
  ------------------
37258|   102k|            janet_to_string_b(buffer, mem[i]);
37259|   102k|        stack[D] = janet_wrap_buffer(buffer);
  ------------------
  |  |35999|   102k|#define D (*pc >> 8)
  ------------------
                      stack[D] = janet_wrap_buffer(buffer);
  ------------------
  |  |  842|   102k|#define janet_wrap_buffer(s) janet_nanbox_wrap_((s), JANET_BUFFER)
  |  |  ------------------
  |  |  |  |  820|   102k|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   102k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   102k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37260|   102k|        fiber->stacktop = fiber->stackstart;
37261|   102k|        vm_checkgc_pcnext();
  ------------------
  |  |36051|   102k|#define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36047|   102k|#define maybe_collect() do {\
  |  |  |  |36048|   102k|    if (janet_vm.next_collection >= janet_vm.gc_interval) janet_collect(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36048:9): [True: 0, False: 102k]
  |  |  |  |  |  Branch (36048:85): [Folded, False: 102k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define vm_checkgc_pcnext() maybe_collect(); vm_pcnext()
  |  |  ------------------
  |  |  |  |36050|   102k|#define vm_pcnext() pc++; vm_next()
  |  |  |  |  ------------------
  |  |  |  |  |  |36019|   102k|#define vm_next() goto *op_lookup[*pc & 0xFF]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37262|   102k|    }
37263|       |
37264|   102k|    VM_END()
  ------------------
  |  |36016|   102k|#define VM_END() }
  ------------------
37265|   102k|}
janet.c:janet_binop_call:
36284|  1.25k|static Janet janet_binop_call(const char *lmethod, const char *rmethod, Janet lhs, Janet rhs) {
36285|  1.25k|    Janet lm = janet_method_lookup(lhs, lmethod);
36286|  1.25k|    if (janet_checktype(lm, JANET_NIL)) {
  ------------------
  |  |  801|  1.25k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 294, False: 961]
  |  |  |  Branch (801:6): [Folded, False: 1.25k]
  |  |  ------------------
  |  |  802|  1.25k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|  1.25k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|  1.25k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|  1.25k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|  1.25k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|  1.25k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36287|       |        /* Invert order for rmethod */
36288|    294|        Janet lr = janet_method_lookup(rhs, rmethod);
36289|    294|        Janet argv[2] = { rhs, lhs };
36290|    294|        if (janet_checktype(lr, JANET_NIL)) {
  ------------------
  |  |  801|    294|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 193, False: 101]
  |  |  |  Branch (801:6): [Folded, False: 294]
  |  |  ------------------
  |  |  802|    294|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|    294|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|    294|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|    294|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    294|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    294|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36291|    193|            janet_panicf("could not find method :%s for %v or :%s for %v",
36292|    193|                         lmethod, lhs,
36293|    193|                         rmethod, rhs);
36294|    193|        }
36295|    101|        return janet_method_invoke(lr, 2, argv);
36296|    961|    } else {
36297|    961|        Janet argv[2] = { lhs, rhs };
36298|    961|        return janet_method_invoke(lm, 2, argv);
36299|    961|    }
36300|  1.25k|}
janet.c:resolve_method:
36259|   313k|static Janet resolve_method(Janet name, JanetFiber *fiber) {
36260|   313k|    int32_t argc = fiber->stacktop - fiber->stackstart;
36261|   313k|    if (argc < 1) janet_panicf("method call (%v) takes at least 1 argument, got 0", name);
  ------------------
  |  Branch (36261:9): [True: 7, False: 313k]
  ------------------
36262|   313k|    Janet callee = method_to_fun(name, fiber->data[fiber->stackstart]);
36263|   313k|    if (janet_checktype(callee, JANET_NIL))
  ------------------
  |  |  801|   313k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:5): [True: 20, False: 313k]
  |  |  |  Branch (801:6): [Folded, False: 313k]
  |  |  ------------------
  |  |  802|   313k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   313k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   313k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   313k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   313k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   313k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36264|     20|        janet_panicf("unknown method %v invoked on %v", name, fiber->data[fiber->stackstart]);
36265|   313k|    return callee;
36266|   313k|}
janet.c:method_to_fun:
36254|   318k|static Janet method_to_fun(Janet method, Janet obj) {
36255|   318k|    return janet_get(obj, method);
36256|   318k|}
janet.c:call_nonfn:
36247|   864k|static Janet call_nonfn(JanetFiber *fiber, Janet callee) {
36248|   864k|    int32_t argc = fiber->stacktop - fiber->stackstart;
36249|   864k|    fiber->stacktop = fiber->stackstart;
36250|   864k|    return janet_method_invoke(callee, argc, fiber->data + fiber->stacktop);
36251|   864k|}
janet.c:janet_check_can_resume:
37404|   387k|static JanetSignal janet_check_can_resume(JanetFiber *fiber, Janet *out, int is_cancel) {
37405|       |    /* Check conditions */
37406|   387k|    JanetFiberStatus old_status = janet_fiber_status(fiber);
37407|   387k|    if (janet_vm.stackn >= JANET_RECURSION_GUARD) {
  ------------------
  |  |  291|   387k|#define JANET_RECURSION_GUARD 1024
  ------------------
  |  Branch (37407:9): [True: 0, False: 387k]
  ------------------
37408|      0|        janet_fiber_set_status(fiber, JANET_STATUS_ERROR);
  ------------------
  |  |  796|      0|#define janet_fiber_set_status(f, s) do {\
  |  |  797|      0|    (f)->flags &= ~JANET_FIBER_STATUS_MASK;\
  |  |  ------------------
  |  |  |  |  779|      0|#define JANET_FIBER_STATUS_MASK 0x3F0000
  |  |  ------------------
  |  |  798|      0|    (f)->flags |= (s) << JANET_FIBER_STATUS_OFFSET;\
  |  |  ------------------
  |  |  |  |  781|      0|#define JANET_FIBER_STATUS_OFFSET 16
  |  |  ------------------
  |  |  799|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (799:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37409|      0|        *out = janet_cstringv("C stack recursed too deeply");
  ------------------
  |  | 1816|      0|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  843|      0|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37410|      0|        return JANET_SIGNAL_ERROR;
37411|      0|    }
37412|       |    /* If a "task" fiber is trying to be used as a normal fiber, detect that. See bug #920.
37413|       |     * Fibers must be marked as root fibers manually, or by the ev scheduler. */
37414|   387k|    if (janet_vm.fiber != NULL && (fiber->gc.flags & JANET_FIBER_FLAG_ROOT)) {
  ------------------
  |  |  791|    114|#define JANET_FIBER_FLAG_ROOT 0x40000
  ------------------
  |  Branch (37414:9): [True: 114, False: 387k]
  |  Branch (37414:35): [True: 0, False: 114]
  ------------------
37415|      0|#ifdef JANET_EV
37416|      0|        *out = janet_cstringv(is_cancel
  ------------------
  |  | 1816|      0|#define janet_cstringv(cstr) janet_wrap_string(janet_cstring(cstr))
  |  |  ------------------
  |  |  |  |  843|      0|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (823:33): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37417|      0|                              ? "cannot cancel root fiber, use ev/cancel"
37418|      0|                              : "cannot resume root fiber, use ev/go");
37419|       |#else
37420|       |        *out = janet_cstringv(is_cancel
37421|       |                              ? "cannot cancel root fiber"
37422|       |                              : "cannot resume root fiber");
37423|       |#endif
37424|      0|        return JANET_SIGNAL_ERROR;
37425|      0|    }
37426|   387k|    if (old_status == JANET_STATUS_ALIVE ||
  ------------------
  |  Branch (37426:9): [True: 0, False: 387k]
  ------------------
37427|   387k|            old_status == JANET_STATUS_DEAD ||
  ------------------
  |  Branch (37427:13): [True: 0, False: 387k]
  ------------------
37428|   387k|            (old_status >= JANET_STATUS_USER0 && old_status <= JANET_STATUS_USER4) ||
  ------------------
  |  Branch (37428:14): [True: 387k, False: 0]
  |  Branch (37428:50): [True: 0, False: 387k]
  ------------------
37429|   387k|            old_status == JANET_STATUS_ERROR) {
  ------------------
  |  Branch (37429:13): [True: 0, False: 387k]
  ------------------
37430|      0|        const uint8_t *str = janet_formatc("cannot resume fiber with status :%s",
37431|      0|                                           janet_status_names[old_status]);
37432|      0|        *out = janet_wrap_string(str);
  ------------------
  |  |  843|      0|#define janet_wrap_string(s) janet_nanbox_wrap_c((s), JANET_STRING)
  |  |  ------------------
  |  |  |  |  823|      0|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37433|      0|        return JANET_SIGNAL_ERROR;
37434|      0|    }
37435|   387k|    return JANET_SIGNAL_OK;
37436|   387k|}
janet.c:janet_continue_no_check:
37459|   387k|static JanetSignal janet_continue_no_check(JanetFiber *fiber, Janet in, Janet *out) {
37460|       |
37461|   387k|    JanetFiberStatus old_status = janet_fiber_status(fiber);
37462|       |
37463|   387k|#ifdef JANET_EV
37464|   387k|    janet_fiber_did_resume(fiber);
37465|   387k|#endif
37466|       |
37467|       |    /* Clear last value */
37468|   387k|    fiber->last_value = janet_wrap_nil();
  ------------------
  |  |  826|   387k|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|   387k|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   387k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   387k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37469|       |
37470|       |    /* Continue child fiber if it exists */
37471|   387k|    if (fiber->child) {
  ------------------
  |  Branch (37471:9): [True: 0, False: 387k]
  ------------------
37472|      0|        if (janet_vm.root_fiber == NULL) janet_vm.root_fiber = fiber;
  ------------------
  |  Branch (37472:13): [True: 0, False: 0]
  ------------------
37473|      0|        JanetFiber *child = fiber->child;
37474|      0|        uint32_t instr = (janet_stack_frame(fiber->data + fiber->frame)->pc)[0];
  ------------------
  |  |  801|      0|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1017|      0|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
37475|      0|        janet_vm.stackn++;
37476|      0|        JanetSignal sig = janet_continue(child, in, &in);
37477|      0|        janet_vm.stackn--;
37478|      0|        if (janet_vm.root_fiber == fiber) janet_vm.root_fiber = NULL;
  ------------------
  |  Branch (37478:13): [True: 0, False: 0]
  ------------------
37479|      0|        if (sig != JANET_SIGNAL_OK && !(child->flags & (1 << sig))) {
  ------------------
  |  Branch (37479:13): [True: 0, False: 0]
  |  Branch (37479:39): [True: 0, False: 0]
  ------------------
37480|      0|            *out = in;
37481|      0|            janet_fiber_set_status(fiber, sig);
  ------------------
  |  |  796|      0|#define janet_fiber_set_status(f, s) do {\
  |  |  797|      0|    (f)->flags &= ~JANET_FIBER_STATUS_MASK;\
  |  |  ------------------
  |  |  |  |  779|      0|#define JANET_FIBER_STATUS_MASK 0x3F0000
  |  |  ------------------
  |  |  798|      0|    (f)->flags |= (s) << JANET_FIBER_STATUS_OFFSET;\
  |  |  ------------------
  |  |  |  |  781|      0|#define JANET_FIBER_STATUS_OFFSET 16
  |  |  ------------------
  |  |  799|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (799:10): [Folded, False: 0]
  |  |  ------------------
  ------------------
37482|      0|            fiber->last_value = child->last_value;
37483|      0|            return sig;
37484|      0|        }
37485|       |        /* Check if we need any special handling for certain opcodes */
37486|      0|        switch (instr & 0x7F) {
37487|      0|            default:
  ------------------
  |  Branch (37487:13): [True: 0, False: 0]
  ------------------
37488|      0|                break;
37489|      0|            case JOP_NEXT: {
  ------------------
  |  Branch (37489:13): [True: 0, False: 0]
  ------------------
37490|      0|                if (sig == JANET_SIGNAL_OK ||
  ------------------
  |  Branch (37490:21): [True: 0, False: 0]
  ------------------
37491|      0|                        sig == JANET_SIGNAL_ERROR ||
  ------------------
  |  Branch (37491:25): [True: 0, False: 0]
  ------------------
37492|      0|                        sig == JANET_SIGNAL_USER0 ||
  ------------------
  |  Branch (37492:25): [True: 0, False: 0]
  ------------------
37493|      0|                        sig == JANET_SIGNAL_USER1 ||
  ------------------
  |  Branch (37493:25): [True: 0, False: 0]
  ------------------
37494|      0|                        sig == JANET_SIGNAL_USER2 ||
  ------------------
  |  Branch (37494:25): [True: 0, False: 0]
  ------------------
37495|      0|                        sig == JANET_SIGNAL_USER3 ||
  ------------------
  |  Branch (37495:25): [True: 0, False: 0]
  ------------------
37496|      0|                        sig == JANET_SIGNAL_USER4) {
  ------------------
  |  Branch (37496:25): [True: 0, False: 0]
  ------------------
37497|      0|                    in = janet_wrap_nil();
  ------------------
  |  |  826|      0|#define janet_wrap_nil() janet_nanbox_from_payload(JANET_NIL, 1)
  |  |  ------------------
  |  |  |  |  817|      0|    janet_nanbox_from_bits(janet_nanbox_tag(t) | (p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|      0|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37498|      0|                } else {
37499|      0|                    in = janet_wrap_integer(0);
  ------------------
  |  |  958|      0|#define janet_wrap_integer(x) janet_wrap_number((int32_t)(x))
  |  |  ------------------
  |  |  |  |  830|      0|#define janet_wrap_number(r) janet_nanbox_from_double(r)
  |  |  ------------------
  ------------------
37500|      0|                }
37501|      0|                break;
37502|      0|            }
37503|      0|        }
37504|      0|        fiber->child = NULL;
37505|      0|    }
37506|       |
37507|       |    /* Handle new fibers being resumed with a non-nil value */
37508|   387k|    if (old_status == JANET_STATUS_NEW && !janet_checktype(in, JANET_NIL)) {
  ------------------
  |  |  801|   387k|    (((t) == JANET_NUMBER) \
  |  |  ------------------
  |  |  |  Branch (801:6): [Folded, False: 387k]
  |  |  ------------------
  |  |  802|   387k|        ? janet_nanbox_isnumber(x) \
  |  |  ------------------
  |  |  |  |  798|      0|    (!isnan((x).number) || ((((x).u64 >> 47) & 0xF) == JANET_NUMBER))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (798:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (798:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  803|   387k|        : janet_nanbox_checkauxtype((x), (t)))
  |  |  ------------------
  |  |  |  |  795|   387k|    (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  785|   387k|#define JANET_NANBOX_TAGBITS     0xFFFF800000000000llu
  |  |  |  |  ------------------
  |  |  |  |                   (((x).u64 & JANET_NANBOX_TAGBITS) == janet_nanbox_tag((type)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|   387k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|   387k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (37508:9): [True: 387k, False: 46]
  |  Branch (37508:43): [True: 185, False: 387k]
  ------------------
37509|    185|        Janet *stack = fiber->data + fiber->frame;
37510|    185|        JanetFunction *func = janet_stack_frame(stack)->func;
  ------------------
  |  |  801|    185|#define janet_stack_frame(s) ((JanetStackFrame *)((s) - JANET_FRAME_SIZE))
  |  |  ------------------
  |  |  |  | 1017|    185|#define JANET_FRAME_SIZE 4
  |  |  ------------------
  ------------------
37511|    185|        if (func) {
  ------------------
  |  Branch (37511:13): [True: 185, False: 0]
  ------------------
37512|    185|            if (func->def->arity > 0) {
  ------------------
  |  Branch (37512:17): [True: 2, False: 183]
  ------------------
37513|      2|                stack[0] = in;
37514|    183|            } else if (func->def->flags & JANET_FUNCDEF_FLAG_VARARG) {
  ------------------
  |  | 1088|    183|#define JANET_FUNCDEF_FLAG_VARARG 0x10000
  ------------------
  |  Branch (37514:24): [True: 41, False: 142]
  ------------------
37515|     41|                stack[0] = janet_wrap_tuple(janet_tuple_n(&in, 1));
  ------------------
  |  |  838|     41|#define janet_wrap_tuple(s) janet_nanbox_wrap_c((s), JANET_TUPLE)
  |  |  ------------------
  |  |  |  |  823|     41|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|     41|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|     41|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37516|     41|            }
37517|    185|        }
37518|    185|    }
37519|       |
37520|       |    /* If this is a nested continue (root_fiber already set), root the fiber
37521|       |     * so it survives GC. janet_collect only marks root_fiber, so without
37522|       |     * this a nested fiber (e.g., from janet_pcall in a C function) would be
37523|       |     * invisible to GC and could be collected while actively running. */
37524|   387k|    int fiber_rooted = (janet_vm.root_fiber != NULL);
37525|   387k|    if (fiber_rooted) {
  ------------------
  |  Branch (37525:9): [True: 114, False: 387k]
  ------------------
37526|    114|        janet_gcroot(janet_wrap_fiber(fiber));
  ------------------
  |  |  839|    114|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|    114|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    114|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    114|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37527|    114|    }
37528|       |
37529|       |    /* Save global state */
37530|   387k|    JanetTryState tstate;
37531|   387k|    JanetSignal sig = janet_try(&tstate);
  ------------------
  |  | 1971|   387k|#define janet_try(state) (janet_try_init(state), (JanetSignal) setjmp((state)->buf))
  ------------------
37532|   387k|    if (!sig) {
  ------------------
  |  Branch (37532:9): [True: 387k, False: 0]
  ------------------
37533|       |        /* Normal setup */
37534|   387k|        if (janet_vm.root_fiber == NULL) janet_vm.root_fiber = fiber;
  ------------------
  |  Branch (37534:13): [True: 387k, False: 114]
  ------------------
37535|   387k|        janet_vm.fiber = fiber;
37536|   387k|        janet_fiber_set_status(fiber, JANET_STATUS_ALIVE);
  ------------------
  |  |  796|   387k|#define janet_fiber_set_status(f, s) do {\
  |  |  797|   387k|    (f)->flags &= ~JANET_FIBER_STATUS_MASK;\
  |  |  ------------------
  |  |  |  |  779|   387k|#define JANET_FIBER_STATUS_MASK 0x3F0000
  |  |  ------------------
  |  |  798|   387k|    (f)->flags |= (s) << JANET_FIBER_STATUS_OFFSET;\
  |  |  ------------------
  |  |  |  |  781|   387k|#define JANET_FIBER_STATUS_OFFSET 16
  |  |  ------------------
  |  |  799|   387k|} while (0)
  |  |  ------------------
  |  |  |  Branch (799:10): [Folded, False: 387k]
  |  |  ------------------
  ------------------
37537|   387k|        sig = run_vm(fiber, in);
37538|   387k|    }
37539|       |
37540|       |    /* Restore */
37541|   387k|    if (janet_vm.root_fiber == fiber) janet_vm.root_fiber = NULL;
  ------------------
  |  Branch (37541:9): [True: 387k, False: 114]
  ------------------
37542|   387k|    janet_fiber_set_status(fiber, sig);
  ------------------
  |  |  796|   387k|#define janet_fiber_set_status(f, s) do {\
  |  |  797|   387k|    (f)->flags &= ~JANET_FIBER_STATUS_MASK;\
  |  |  ------------------
  |  |  |  |  779|   387k|#define JANET_FIBER_STATUS_MASK 0x3F0000
  |  |  ------------------
  |  |  798|   387k|    (f)->flags |= (s) << JANET_FIBER_STATUS_OFFSET;\
  |  |  ------------------
  |  |  |  |  781|   387k|#define JANET_FIBER_STATUS_OFFSET 16
  |  |  ------------------
  |  |  799|   387k|} while (0)
  |  |  ------------------
  |  |  |  Branch (799:10): [Folded, False: 387k]
  |  |  ------------------
  ------------------
37543|   387k|    janet_restore(&tstate);
37544|   387k|    if (fiber_rooted) {
  ------------------
  |  Branch (37544:9): [True: 114, False: 387k]
  ------------------
37545|    114|        janet_gcunroot(janet_wrap_fiber(fiber));
  ------------------
  |  |  839|    114|#define janet_wrap_fiber(s) janet_nanbox_wrap_((s), JANET_FIBER)
  |  |  ------------------
  |  |  |  |  820|    114|    janet_nanbox_from_pointer((p), janet_nanbox_tag(t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|    114|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  787|    114|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
37546|    114|    }
37547|   387k|    fiber->last_value = tstate.payload;
37548|   387k|    *out = tstate.payload;
37549|       |
37550|   387k|    return sig;
37551|   387k|}
janet.c:janet_method_lookup:
36269|  4.95k|static Janet janet_method_lookup(Janet x, const char *name) {
36270|  4.95k|    return method_to_fun(janet_ckeywordv(name), x);
  ------------------
  |  | 1833|  4.95k|#define janet_ckeywordv(cstr) janet_wrap_keyword(janet_ckeyword(cstr))
  |  |  ------------------
  |  |  |  |  845|  4.95k|#define janet_wrap_keyword(s) janet_nanbox_wrap_c((s), JANET_KEYWORD)
  |  |  |  |  ------------------
  |  |  |  |  |  |  823|  4.95k|    janet_nanbox_from_cpointer((p), janet_nanbox_tag(t))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  788|  4.95k|#define janet_nanbox_tag(type) (janet_nanbox_lowtag(type) << 47)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  787|  4.95k|#define janet_nanbox_lowtag(type) ((uint64_t)(type) | 0x1FFF0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
36271|  4.95k|}
janet.c:janet_method_invoke:
36209|   869k|static Janet janet_method_invoke(Janet method, int32_t argc, Janet *argv) {
36210|   869k|    switch (janet_type(method)) {
  ------------------
  |  |  790|   869k|    (isnan((x).number) \
  |  |  791|   869k|        ? (JanetType) (((x).u64 >> 47) & 0xF) \
  |  |  792|   869k|        : JANET_NUMBER)
  ------------------
  |  Branch (36210:13): [True: 869k, False: 27]
  ------------------
36211|  4.44k|        case JANET_CFUNCTION:
  ------------------
  |  Branch (36211:9): [True: 4.44k, False: 864k]
  ------------------
36212|  4.44k|            return (janet_unwrap_cfunction(method))(argc, argv);
  ------------------
  |  |  864|  4.44k|#define janet_unwrap_cfunction(x) ((JanetCFunction)janet_nanbox_to_pointer(x))
  ------------------
36213|      0|        case JANET_FUNCTION: {
  ------------------
  |  Branch (36213:9): [True: 0, False: 869k]
  ------------------
36214|      0|            JanetFunction *fun = janet_unwrap_function(method);
  ------------------
  |  |  863|      0|#define janet_unwrap_function(x) ((JanetFunction *)janet_nanbox_to_pointer(x))
  ------------------
36215|      0|            return janet_call(fun, argc, argv);
36216|      0|        }
36217|   408k|        case JANET_ABSTRACT: {
  ------------------
  |  Branch (36217:9): [True: 408k, False: 460k]
  ------------------
36218|   408k|            JanetAbstract abst = janet_unwrap_abstract(method);
  ------------------
  |  |  861|   408k|#define janet_unwrap_abstract(x) (janet_nanbox_to_pointer(x))
  ------------------
36219|   408k|            const JanetAbstractType *at = janet_abstract_type(abst);
  ------------------
  |  | 1889|   408k|#define janet_abstract_type(u) (janet_abstract_head(u)->type)
  |  |  ------------------
  |  |  |  | 1887|   408k|#define janet_abstract_head(u) ((JanetAbstractHead *)((char *)u - offsetof(JanetAbstractHead, data)))
  |  |  ------------------
  ------------------
36220|   408k|            if (NULL != at->call) {
  ------------------
  |  Branch (36220:17): [True: 0, False: 408k]
  ------------------
36221|      0|                return at->call(abst, argc, argv);
36222|      0|            }
36223|   408k|        }
36224|       |        /* fallthrough */
36225|   408k|        case JANET_STRING:
  ------------------
  |  Branch (36225:9): [True: 2, False: 869k]
  ------------------
36226|   408k|        case JANET_BUFFER:
  ------------------
  |  Branch (36226:9): [True: 16, False: 869k]
  ------------------
36227|   661k|        case JANET_TABLE:
  ------------------
  |  Branch (36227:9): [True: 253k, False: 616k]
  ------------------
36228|   661k|        case JANET_STRUCT:
  ------------------
  |  Branch (36228:9): [True: 2, False: 869k]
  ------------------
36229|   701k|        case JANET_ARRAY:
  ------------------
  |  Branch (36229:9): [True: 39.9k, False: 829k]
  ------------------
36230|   864k|        case JANET_TUPLE: {
  ------------------
  |  Branch (36230:9): [True: 163k, False: 705k]
  ------------------
36231|   864k|            if (argc != 1) {
  ------------------
  |  Branch (36231:17): [True: 24, False: 864k]
  ------------------
36232|     24|                janet_panicf("%v called with %d arguments, possibly expected 1", method, argc);
36233|     24|            }
36234|   864k|            return janet_in(method, argv[0]);
36235|   864k|        }
36236|     45|        default: {
  ------------------
  |  Branch (36236:9): [True: 45, False: 869k]
  ------------------
36237|     45|            if (argc != 1) {
  ------------------
  |  Branch (36237:17): [True: 17, False: 28]
  ------------------
36238|     17|                janet_panicf("%v called with %d arguments, possibly expected 1", method, argc);
36239|     17|            }
36240|     28|            return janet_in(argv[0], method);
36241|     45|        }
36242|   869k|    }
36243|   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) {
  ------------------
  |  | 1971|  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|}

